svn commit: r281441 - head/sys/dev/atkbdc

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 18:45:22 2015
New Revision: 281441
URL: https://svnweb.freebsd.org/changeset/base/281441

Log:
  Add support for controlling the trackpoint when Synaptics is enabled.
  
  To accomplish this, we must put the Synaptics hardware in passthrough
  mode when talking to the trackpoint.
  
  I only performed minor style modifications.
  
  Submitted by: Jan Kokemüller jan.kokemueller at gmail.com
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:44:07 2015(r281440)
+++ head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:45:22 2015(r281441)
@@ -191,7 +191,8 @@ enum {
SYNAPTICS_SYSCTL_VSCROLL_VER_AREA,
SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA,
SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN,
-   SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX
+   SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX,
+   SYNAPTICS_SYSCTL_TOUCHPAD_OFF
 };
 
 typedef struct synapticsinfo {
@@ -229,6 +230,7 @@ typedef struct synapticsinfo {
int  vscroll_min_delta;
int  vscroll_div_min;
int  vscroll_div_max;
+   int  touchpad_off;
 } synapticsinfo_t;
 
 typedef struct synapticspacket {
@@ -478,6 +480,10 @@ static probefunc_t enable_synaptics;
 static probefunc_t enable_trackpoint;
 static probefunc_t enable_versapad;
 
+static void set_trackpoint_parameters(struct psm_softc *sc);
+static void synaptics_passthrough_on(struct psm_softc *sc);
+static void synaptics_passthrough_off(struct psm_softc *sc);
+
 static struct {
int model;
u_char  syncmask;
@@ -885,6 +891,13 @@ doinitialize(struct psm_softc *sc, mouse
set_mouse_resolution(kbdc, mode-resolution);
set_mouse_scaling(kbdc, 1);
set_mouse_mode(kbdc);
+
+   /*
+* Trackpoint settings are lost on resume.
+* Restore them here.
+*/
+   if (sc-tphw  0)
+   set_trackpoint_parameters(sc);
}
 
/* Record sync on the next data packet we see. */
@@ -2725,6 +2738,12 @@ proc_synaptics(struct psm_softc *sc, pac
goto SYNAPTICS_END;
}
 
+   if (sc-syninfo.touchpad_off) {
+   *x = *y = *z = 0;
+   ms-button = ms-obutton;
+   goto SYNAPTICS_END;
+   }
+
/* Button presses */
touchpad_buttons = 0;
if (pb-ipacket[0]  0x01)
@@ -4131,6 +4150,10 @@ synaptics_sysctl(SYSCTL_HANDLER_ARGS)
if (arg  -6143 || arg  6143)
return (EINVAL);
break;
+case SYNAPTICS_SYSCTL_TOUCHPAD_OFF:
+   if (arg  0 || arg  1)
+   return (EINVAL);
+   break;
default:
return (EINVAL);
}
@@ -4458,6 +4481,15 @@ synaptics_sysctl_create_tree(struct psm_
sc-syninfo.vscroll_div_max, SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX,
synaptics_sysctl, I,
Divisor for slow scrolling);
+
+   /* hw.psm.synaptics.touchpad_off. */
+   sc-syninfo.touchpad_off = 0;
+   SYSCTL_ADD_PROC(sc-syninfo.sysctl_ctx,
+   SYSCTL_CHILDREN(sc-syninfo.sysctl_tree), OID_AUTO,
+   touchpad_off, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY,
+   sc-syninfo.touchpad_off, SYNAPTICS_SYSCTL_TOUCHPAD_OFF,
+   synaptics_sysctl, I,
+   Turn off touchpad);
 }
 
 static int
@@ -4689,25 +4721,75 @@ enable_synaptics(KBDC kbdc, struct psm_s
VLOG(3, (LOG_DEBUG, synaptics: END init (%d buttons)\n, buttons));
 
if (sc != NULL) {
+   if (trackpoint_support  synhw.capPassthrough) {
+   synaptics_passthrough_on(sc);
+   enable_trackpoint(kbdc, sc);
+   synaptics_passthrough_off(sc);
+   }
/* Create sysctl tree. */
synaptics_sysctl_create_tree(sc);
-
sc-hw.buttons = buttons;
}
 
return (TRUE);
 }
 
+static void
+synaptics_passthrough_on(struct psm_softc *sc)
+{
+   int mode_byte;
+
+   mode_byte = 0xc1 | (1  5);
+   VLOG(2, (LOG_NOTICE, psm: setting pass-through mode. %d\n,
+   mode_byte));
+   mouse_ext_command(sc-kbdc, mode_byte);
+
+   /* Commit the Set Mode Byte command sent above. */
+   set_mouse_sampling_rate(sc-kbdc, 20);
+}
+
+static void
+synaptics_passthrough_off(struct psm_softc *sc)
+{
+   int mode_byte;
+
+   mode_byte = 0xc1;
+   VLOG(2, (LOG_NOTICE, psm: turning pass-through mode off.\n));
+   set_mouse_scaling(sc-kbdc, 2);
+   set_mouse_scaling(sc-kbdc, 1);
+   mouse_ext_command(sc-kbdc, mode_byte);
+
+   /* Commit the Set Mode Byte command sent above. */

svn commit: r281440 - in head/sys: dev/atkbdc sys

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 18:44:07 2015
New Revision: 281440
URL: https://svnweb.freebsd.org/changeset/base/281440

Log:
  Improve Synaptics support for newer touchpads.
  
  Enable two finger scrolling by default and disable the edge scrolling if
  the touchpad has no physical zone for it.  Disable directional scrolling
  by default to avoid using extended buttons as scroll buttons.
  
  Add support for ClickPad.  On Lenovo laptops, this is the button
  reported when one presses the touchpad.
  
  While there, fix a problem where the extended buttons were not reporting
  the button release event correctly: we need to save the state of the
  buttons and report it to sysmouse until we receive a packet from the
  touchpad indicating the button has been released.  This makes it
  possible to use an extended button to resize a window.  On Lenovo
  laptops, the major buttons are actually reported as extended buttons.
  
  Tested by:many (current@)
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Sat Apr 11 17:52:47 2015(r281439)
+++ head/sys/dev/atkbdc/psm.c   Sat Apr 11 18:44:07 2015(r281440)
@@ -198,6 +198,7 @@ typedef struct synapticsinfo {
struct sysctl_ctx_list   sysctl_ctx;
struct sysctl_oid   *sysctl_tree;
int  directional_scrolls;
+   int  two_finger_scroll;
int  min_pressure;
int  max_pressure;
int  max_width;
@@ -336,6 +337,7 @@ struct psm_softc {  /* Driver status inf
int lasterr;
int cmdcount;
struct sigio*async; /* Processes waiting for SIGIO */
+   int extended_buttons;
 };
 static devclass_t psm_devclass;
 
@@ -2752,7 +2754,13 @@ proc_synaptics(struct psm_softc *sc, pac
if (pb-ipacket[5]  0x02)
touchpad_buttons |= MOUSE_BUTTON7DOWN;
} else {
-   touchpad_buttons |= MOUSE_BUTTON2DOWN;
+   if (pb-ipacket[4]  0x01)
+   touchpad_buttons |= MOUSE_BUTTON1DOWN;
+   if (pb-ipacket[5]  0x01)
+   touchpad_buttons |= MOUSE_BUTTON3DOWN;
+   if (pb-ipacket[4]  0x02)
+   touchpad_buttons |= MOUSE_BUTTON2DOWN;
+   sc-extended_buttons = touchpad_buttons;
}
 
/*
@@ -2774,13 +2782,26 @@ proc_synaptics(struct psm_softc *sc, pac
mask = (1  maskedbits) - 1;
pb-ipacket[4] = ~(mask);
pb-ipacket[5] = ~(mask);
+   } else  if (!sc-syninfo.directional_scrolls 
+   !sc-synaction.in_vscroll) {
+   /*
+* Keep reporting MOUSE DOWN until we get a new packet
+* indicating otherwise.
+*/
+   touchpad_buttons |= sc-extended_buttons;
}
}
+   /* Handle ClickPad. */
+   if (sc-synhw.capClickPad 
+   ((pb-ipacket[0] ^ pb-ipacket[3])  0x01))
+   touchpad_buttons |= MOUSE_BUTTON1DOWN;
 
ms-button = touchpad_buttons | guest_buttons;
 
-   /* Check pressure to detect a real wanted action on the
-* touchpad. */
+   /*
+* Check pressure to detect a real wanted action on the
+* touchpad.
+*/
if (*z = sc-syninfo.min_pressure) {
synapticsaction_t *synaction;
int cursor, peer, window;
@@ -2793,7 +2814,7 @@ proc_synaptics(struct psm_softc *sc, pac
int weight_current, weight_previous, weight_len_squared;
int div_min, div_max, div_len;
int vscroll_hor_area, vscroll_ver_area;
-
+   int two_finger_scroll;
int len, weight_prev_x, weight_prev_y;
int div_max_x, div_max_y, div_x, div_y;
 
@@ -2820,6 +2841,7 @@ proc_synaptics(struct psm_softc *sc, pac
div_len = sc-syninfo.div_len;
vscroll_hor_area = sc-syninfo.vscroll_hor_area;
vscroll_ver_area = sc-syninfo.vscroll_ver_area;
+   two_finger_scroll = sc-syninfo.two_finger_scroll;
 
/* Palm detection. */
if (!(
@@ -2979,33 +3001,57 @@ proc_synaptics(struct psm_softc *sc, pac
if (timevalcmp(sc-lastsoftintr, sc-taptimeout, ) ||
dxp = sc-syninfo.vscroll_min_delta ||
dyp = 

svn commit: r281443 - head/sys/arm/qemu

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 20:44:21 2015
New Revision: 281443
URL: https://svnweb.freebsd.org/changeset/base/281443

Log:
  Change the virtual address used to not be 0xc000, the arm loader
  doesn't handle this address.

Modified:
  head/sys/arm/qemu/std.virt

Modified: head/sys/arm/qemu/std.virt
==
--- head/sys/arm/qemu/std.virt  Sat Apr 11 18:51:41 2015(r281442)
+++ head/sys/arm/qemu/std.virt  Sat Apr 11 20:44:21 2015(r281443)
@@ -5,8 +5,8 @@ makeoptions CONF_CFLAGS=-march=armv7a
 makeoptionsARM_LITTLE_ENDIAN
 optionsARM_L2_PIPT
 
-optionsKERNVIRTADDR= 0xc000
-makeoptionsKERNVIRTADDR= 0xc000
+optionsKERNVIRTADDR= 0xc100
+makeoptionsKERNVIRTADDR= 0xc100
 
 optionsIPI_IRQ_START=0
 optionsIPI_IRQ_END=15
___
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: r281388 - head/sys/netinet

2015-04-11 Thread Gleb Smirnoff
On Sat, Apr 11, 2015 at 01:07:00AM +, Xin LI wrote:
X Author: delphij
X Date: Sat Apr 11 01:06:59 2015
X New Revision: 281388
X URL: https://svnweb.freebsd.org/changeset/base/281388
X 
X Log:
X   Attempt to fix build after 281351 by defining full prototype for the
X   functions that were moved to ip_reass.c.

Thanks, Xin!

-- 
Totus tuus, Glebius.
___
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: r281442 - head/sys/kern

2015-04-11 Thread Will Andrews
Author: will
Date: Sat Apr 11 18:51:41 2015
New Revision: 281442
URL: https://svnweb.freebsd.org/changeset/base/281442

Log:
  uiomove_object_page(): Avoid instantiating pages in sparse regions on reads.
  
  Check whether the page being requested is either resident or on swap.  If
  not, read from the zero_region instead of instantiating an unnecessary page.
  
  This avoids consuming memory for sparse files on tmpfs, when they are read
  by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them).
  
  Reviewed by:  kib
  MFC after:1 week
  Sponsored by: Spectra Logic

Modified:
  head/sys/kern/uipc_shm.c

Modified: head/sys/kern/uipc_shm.c
==
--- head/sys/kern/uipc_shm.cSat Apr 11 18:45:22 2015(r281441)
+++ head/sys/kern/uipc_shm.cSat Apr 11 18:51:41 2015(r281442)
@@ -163,6 +163,17 @@ uiomove_object_page(vm_object_t obj, siz
VM_OBJECT_WLOCK(obj);
 
/*
+* Read I/O without either a corresponding resident page or swap
+* page: use zero_region.  This is intended to avoid instantiating
+* pages on read from a sparse region.
+*/
+   if (uio-uio_rw == UIO_READ  vm_page_lookup(obj, idx) == NULL 
+   !vm_pager_has_page(obj, idx, NULL, NULL)) {
+   VM_OBJECT_WUNLOCK(obj);
+   return (uiomove(__DECONST(void *, zero_region), len, uio));
+   }
+
+   /*
 * Parallel reads of the page content from disk are prevented
 * by exclusive busy.
 *
___
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: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contri

2015-04-11 Thread Dimitry Andric
On 11 Apr 2015, at 05:23, Jung-uk Kim j...@freebsd.org wrote:
 
 Author: jkim
 Date: Sat Apr 11 03:23:41 2015
 New Revision: 281396
 URL: https://svnweb.freebsd.org/changeset/base/281396
 
 Log:
  Merge ACPICA 20150410.

Shall we MFC this at some point? :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r281411 - head/tools/regression/sockets/reconnect

2015-04-11 Thread Garrett Cooper
Author: ngie
Date: Sat Apr 11 07:37:21 2015
New Revision: 281411
URL: https://svnweb.freebsd.org/changeset/base/281411

Log:
  Fix even more warnings..
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/regression/sockets/reconnect/Makefile
  head/tools/regression/sockets/reconnect/reconnect.c

Modified: head/tools/regression/sockets/reconnect/Makefile
==
--- head/tools/regression/sockets/reconnect/MakefileSat Apr 11 07:35:30 
2015(r281410)
+++ head/tools/regression/sockets/reconnect/MakefileSat Apr 11 07:37:21 
2015(r281411)
@@ -4,5 +4,6 @@
 
 PROG=  reconnect
 MAN=
+WARNS?=6
 
 .include bsd.prog.mk

Modified: head/tools/regression/sockets/reconnect/reconnect.c
==
--- head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:35:30 
2015(r281410)
+++ head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:37:21 
2015(r281411)
@@ -62,7 +62,7 @@ prepare_ifsun(struct sockaddr_un *ifsun,
 strcpy(ifsun-sun_path, path);
 }
 
-int
+static int
 create_uds_server(const char *path)
 {
 struct sockaddr_un ifsun;
@@ -82,7 +82,7 @@ create_uds_server(const char *path)
 return sock;
 }
 
-void
+static void
 connect_uds_server(int sock, const char *path)
 {
 struct sockaddr_un ifsun;
@@ -95,7 +95,7 @@ connect_uds_server(int sock, const char 
 err(1, can't connect to a socket);
 }
 
-void
+static void
 cleanup(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


Re: svn commit: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contri

2015-04-11 Thread Bjoern A. Zeeb

On Sat, 11 Apr 2015, Jung-uk Kim wrote:


Author: jkim
Date: Sat Apr 11 03:23:41 2015
New Revision: 281396
URL: https://svnweb.freebsd.org/changeset/base/281396

Log:
 Merge ACPICA 20150410.


This seems to have broken i386 kernels.

--
Bjoern A. Zeeb Come on. Learn, goddamn it., WarGames, 1983
___
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: r281412 - head/sys/gnu/dts/arm

2015-04-11 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Sat Apr 11 08:17:39 2015
New Revision: 281412
URL: https://svnweb.freebsd.org/changeset/base/281412

Log:
  The GNU Amlogic DTS files have some errors (e.g. bad register
  address, bad IRQ, etc) which are fixed by this patch.
  
  John has sent these changes to the author of the files who said
  he'll propagate the changes further upstream.
  
  Submitted by: John Wehle
  Reviewed by:  imp

Modified:
  head/sys/gnu/dts/arm/meson.dtsi
  head/sys/gnu/dts/arm/meson6.dtsi
  head/sys/gnu/dts/arm/meson8.dtsi

Modified: head/sys/gnu/dts/arm/meson.dtsi
==
--- head/sys/gnu/dts/arm/meson.dtsi Sat Apr 11 07:37:21 2015
(r281411)
+++ head/sys/gnu/dts/arm/meson.dtsi Sat Apr 11 08:17:39 2015
(r281412)
@@ -67,7 +67,7 @@
 
timer@c1109940 {
compatible = amlogic,meson6-timer;
-   reg = 0xc1109940 0x14;
+   reg = 0xc1109940 0x18;
interrupts = 0 10 1;
};
 
@@ -80,36 +80,37 @@
wdt: watchdog@c1109900 {
compatible = amlogic,meson6-wdt;
reg = 0xc1109900 0x8;
+   interrupts = 0 0 1;
};
 
uart_AO: serial@c81004c0 {
compatible = amlogic,meson-uart;
-   reg = 0xc81004c0 0x14;
+   reg = 0xc81004c0 0x18;
interrupts = 0 90 1;
clocks = clk81;
status = disabled;
};
 
-   uart_A: serial@c81084c0 {
+   uart_A: serial@c11084c0 {
compatible = amlogic,meson-uart;
-   reg = 0xc81084c0 0x14;
-   interrupts = 0 90 1;
+   reg = 0xc11084c0 0x18;
+   interrupts = 0 26 1;
clocks = clk81;
status = disabled;
};
 
-   uart_B: serial@c81084dc {
+   uart_B: serial@c11084dc {
compatible = amlogic,meson-uart;
-   reg = 0xc81084dc 0x14;
-   interrupts = 0 90 1;
+   reg = 0xc11084dc 0x18;
+   interrupts = 0 75 1;
clocks = clk81;
status = disabled;
};
 
-   uart_C: serial@c8108700 {
+   uart_C: serial@c1108700 {
compatible = amlogic,meson-uart;
-   reg = 0xc8108700 0x14;
-   interrupts = 0 90 1;
+   reg = 0xc1108700 0x18;
+   interrupts = 0 93 1;
clocks = clk81;
status = disabled;
};

Modified: head/sys/gnu/dts/arm/meson6.dtsi
==
--- head/sys/gnu/dts/arm/meson6.dtsiSat Apr 11 07:37:21 2015
(r281411)
+++ head/sys/gnu/dts/arm/meson6.dtsiSat Apr 11 08:17:39 2015
(r281412)
@@ -78,3 +78,7 @@
clock-frequency = 2;
};
 }; /* end of / */
+
+L2 {
+   interrupts = 0 61 1;
+};

Modified: head/sys/gnu/dts/arm/meson8.dtsi
==
--- head/sys/gnu/dts/arm/meson8.dtsiSat Apr 11 07:37:21 2015
(r281411)
+++ head/sys/gnu/dts/arm/meson8.dtsiSat Apr 11 08:17:39 2015
(r281412)
@@ -90,3 +90,7 @@
clock-frequency = 14166;
};
 }; /* end of / */
+
+L2 {
+   interrupts = 0 143 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: r281418 - head/sys/arm/amlogic/aml8726

2015-04-11 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Sat Apr 11 08:34:41 2015
New Revision: 281418
URL: https://svnweb.freebsd.org/changeset/base/281418

Log:
  This modifies several FreeBSD drivers to use the GNU approach to
  supply clk81 information.  It also changes the hardware strings
  in some of the drivers to match what's present in the GNU files.
  
  Submitted by:  John Wehle
  Reviewed by:   imp

Modified:
  head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c
  head/sys/arm/amlogic/aml8726/aml8726_identsoc.c
  head/sys/arm/amlogic/aml8726/aml8726_machdep.c
  head/sys/arm/amlogic/aml8726/aml8726_mmc.c
  head/sys/arm/amlogic/aml8726/aml8726_soc.h
  head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c

Modified: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c   Sat Apr 11 08:34:34 
2015(r281417)
+++ head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c   Sat Apr 11 08:34:41 
2015(r281418)
@@ -56,6 +56,7 @@ __FBSDID($FreeBSD$);
 #include dev/ofw/ofw_bus.h
 #include dev/ofw/ofw_bus_subr.h
 
+#include arm/amlogic/aml8726/aml8726_soc.h
 #include arm/amlogic/aml8726/aml8726_clkmsr.h
 
 
@@ -147,6 +148,30 @@ aml8726_clkmsr_clock_frequency(struct am
return value;
 }
 
+static void
+aml8726_clkmsr_fixup_clk81(struct aml8726_clkmsr_softc *sc, int freq)
+{
+   pcell_t prop;
+   ssize_t len;
+   phandle_t clk_node;
+   phandle_t node;
+
+   node = ofw_bus_get_node(sc-dev);
+
+   len = OF_getencprop(node, clocks, prop, sizeof(prop));
+   if ((len / sizeof(prop)) != 1 || prop == 0 ||
+   (clk_node = OF_node_from_xref(prop)) == 0)
+   return;
+
+   len = OF_getencprop(clk_node, clock-frequency, prop, sizeof(prop));
+   if ((len / sizeof(prop)) != 1 || prop != 0)
+   return;
+
+   freq = cpu_to_fdt32(freq);
+
+   OF_setprop(clk_node, clock-frequency, (void *)freq, sizeof(freq));
+}
+
 static int
 aml8726_clkmsr_probe(device_t dev)
 {
@@ -178,6 +203,8 @@ aml8726_clkmsr_attach(device_t dev)
freq = aml8726_clkmsr_clock_frequency(sc, AML_CLKMSR_CLK81);
device_printf(sc-dev, bus clock %u MHz\n, freq);
 
+   aml8726_clkmsr_fixup_clk81(sc, freq * 100);
+
return (0);
 }
 
@@ -209,8 +236,8 @@ static driver_t aml8726_clkmsr_driver = 
 
 static devclass_t aml8726_clkmsr_devclass;
 
-DRIVER_MODULE(clkmsr, simplebus, aml8726_clkmsr_driver,
-aml8726_clkmsr_devclass, 0, 0);
+EARLY_DRIVER_MODULE(clkmsr, simplebus, aml8726_clkmsr_driver,
+aml8726_clkmsr_devclass, 0, 0,  BUS_PASS_CPU + BUS_PASS_ORDER_EARLY);
 
 int
 aml8726_clkmsr_bus_frequency()
@@ -222,6 +249,9 @@ aml8726_clkmsr_bus_frequency()
u_long start, size;
int freq;
 
+   KASSERT(aml8726_soc_hw_rev != AML_SOC_HW_REV_UNKNOWN,
+   (aml8726_soc_hw_rev isn't initialized));
+
/*
 * Try to access the clkmsr node directly i.e. through /aliases/.
 */

Modified: head/sys/arm/amlogic/aml8726/aml8726_identsoc.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_identsoc.c Sat Apr 11 08:34:34 
2015(r281417)
+++ head/sys/arm/amlogic/aml8726/aml8726_identsoc.c Sat Apr 11 08:34:41 
2015(r281418)
@@ -59,8 +59,8 @@ __FBSDID($FreeBSD$);
 
 #include arm/amlogic/aml8726/aml8726_soc.h
 
-uint32_t aml8726_soc_hw_rev = 0x;
-uint32_t aml8726_soc_metal_rev = 0x;
+uint32_t aml8726_soc_hw_rev = AML_SOC_HW_REV_UNKNOWN;
+uint32_t aml8726_soc_metal_rev = AML_SOC_METAL_REV_UNKNOWN;
 
 static const struct {
uint32_t hw_rev;
@@ -86,11 +86,10 @@ static const struct {
{ 0xff, NULL }
 };
 
-static void
-aml8726_identify_soc(void *dummy)
+void
+aml8726_identify_soc()
 {
int err;
-   int i;
struct resource res;
 
memset(res, 0, sizeof(res));
@@ -108,6 +107,12 @@ aml8726_identify_soc(void *dummy)
aml8726_soc_metal_rev = bus_read_4(res, AML_SOC_METAL_REV_REG);
 
bus_space_unmap(res.r_bustag, res.r_bushandle, 0x10);
+}
+
+static void
+aml8726_identify_announce_soc(void *dummy)
+{
+   int i;
 
for (i = 0; aml8726_soc_desc[i].desc; i++)
if (aml8726_soc_desc[i].hw_rev == aml8726_soc_hw_rev)
@@ -133,5 +138,5 @@ aml8726_identify_soc(void *dummy)
printf(\n);
 }
 
-SYSINIT(aml8726_identify_soc, SI_SUB_CPU, SI_ORDER_SECOND,
-aml8726_identify_soc, NULL);
+SYSINIT(aml8726_identify_announce_soc, SI_SUB_CPU, SI_ORDER_SECOND,
+aml8726_identify_announce_soc, NULL);

Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_machdep.c  Sat Apr 11 08:34:34 
2015(r281417)
+++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c  Sat Apr 11 08:34:41 
2015(r281418)
@@ -44,6 +44,7 @@ __FBSDID($FreeBSD$);
 
 

svn commit: r281409 - head/tools/regression/sockets/pr_atomic

2015-04-11 Thread Garrett Cooper
Author: ngie
Date: Sat Apr 11 07:33:04 2015
New Revision: 281409
URL: https://svnweb.freebsd.org/changeset/base/281409

Log:
  Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in 
/tmp
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/regression/sockets/pr_atomic/Makefile
  head/tools/regression/sockets/pr_atomic/pr_atomic.c

Modified: head/tools/regression/sockets/pr_atomic/Makefile
==
--- head/tools/regression/sockets/pr_atomic/MakefileSat Apr 11 06:40:38 
2015(r281408)
+++ head/tools/regression/sockets/pr_atomic/MakefileSat Apr 11 07:33:04 
2015(r281409)
@@ -2,6 +2,6 @@
 
 PROG=  pr_atomic
 MAN=
-WARNS?=3
+WARNS?=6
 
 .include bsd.prog.mk

Modified: head/tools/regression/sockets/pr_atomic/pr_atomic.c
==
--- head/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 11 06:40:38 
2015(r281408)
+++ head/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 11 07:33:04 
2015(r281409)
@@ -42,31 +42,31 @@
 #include errno.h
 #include unistd.h
 
-#define TEST_SOCKET /tmp/test_socket
+static char socket_path[] = tmp.XX;
 
 static jmp_buf myjmpbuf;
 
-void handle_sigalrm(int signo);
-
-void handle_sigalrm(int signo)
+static void handle_sigalrm(int signo __unused)
 {
longjmp(myjmpbuf, 1);
 }
 
 int
-main(int argc, char *argv[])
+main(void)
 {
struct sockaddr_un un;
pid_t pid;
int s;
 
+   if (mkstemp(socket_path) == -1)
+   err(1, mkstemp);
s = socket(PF_LOCAL, SOCK_DGRAM, 0);
if (s == -1)
errx(-1, socket);
memset(un, 0, sizeof(un));
un.sun_family = AF_LOCAL;
-   unlink(TEST_SOCKET);
-   strcpy(un.sun_path, TEST_SOCKET);
+   unlink(socket_path);
+   strcpy(un.sun_path, socket_path);
if (bind(s, (struct sockaddr *)un, sizeof(un)) == -1)
errx(-1, bind);
pid = fork();
___
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: r281406 - head/sys/dev/netmap

2015-04-11 Thread Rui Paulo
Author: rpaulo
Date: Sat Apr 11 06:20:46 2015
New Revision: 281406
URL: https://svnweb.freebsd.org/changeset/base/281406

Log:
  netmap: improve the netmap attach message on FreeBSD.
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==
--- head/sys/dev/netmap/netmap.cSat Apr 11 05:38:07 2015
(r281405)
+++ head/sys/dev/netmap/netmap.cSat Apr 11 06:20:46 2015
(r281406)
@@ -2710,11 +2710,17 @@ netmap_attach(struct netmap_adapter *arg
}
 #endif /* linux */
 
+#ifdef __FreeBSD__
+   if_printf(ifp, netmap queues/slots: TX %d/%d, RX %d/%d\n,
+   hwna-up.num_tx_rings, hwna-up.num_tx_desc,
+   hwna-up.num_rx_rings, hwna-up.num_rx_desc);
+#else
D(success for %s tx %d/%d rx %d/%d queues/slots,
hwna-up.name,
hwna-up.num_tx_rings, hwna-up.num_tx_desc,
hwna-up.num_rx_rings, hwna-up.num_rx_desc
);
+#endif
return 0;
 
 fail:
___
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: r281416 - head/sys/arm/amlogic/aml8726

2015-04-11 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Sat Apr 11 08:30:37 2015
New Revision: 281416
URL: https://svnweb.freebsd.org/changeset/base/281416

Log:
  This modifies several FreeBSD drivers to use the hardware strings
  present in the GNU dts files.
  
  Submitted by:  John Wehle
  Reviewed by:   imp

Modified:
  head/sys/arm/amlogic/aml8726/aml8726_i2c.c
  head/sys/arm/amlogic/aml8726/aml8726_timer.c
  head/sys/arm/amlogic/aml8726/aml8726_wdt.c

Modified: head/sys/arm/amlogic/aml8726/aml8726_i2c.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_i2c.c  Sat Apr 11 08:27:38 2015
(r281415)
+++ head/sys/arm/amlogic/aml8726/aml8726_i2c.c  Sat Apr 11 08:30:37 2015
(r281416)
@@ -93,7 +93,7 @@ aml8726_iic_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, amlogic,aml8726-i2c))
+   if (!ofw_bus_is_compatible(dev, amlogic,meson6-i2c))
return (ENXIO);
 
device_set_desc(dev, Amlogic aml8726 I2C);

Modified: head/sys/arm/amlogic/aml8726/aml8726_timer.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_timer.cSat Apr 11 08:27:38 
2015(r281415)
+++ head/sys/arm/amlogic/aml8726/aml8726_timer.cSat Apr 11 08:30:37 
2015(r281416)
@@ -226,7 +226,7 @@ aml8726_timer_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, amlogic,aml8726-timer))
+   if (!ofw_bus_is_compatible(dev, amlogic,meson6-timer))
return (ENXIO);
 
device_set_desc(dev, Amlogic aml8726 timer);

Modified: head/sys/arm/amlogic/aml8726/aml8726_wdt.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_wdt.c  Sat Apr 11 08:27:38 2015
(r281415)
+++ head/sys/arm/amlogic/aml8726/aml8726_wdt.c  Sat Apr 11 08:30:37 2015
(r281416)
@@ -167,7 +167,7 @@ aml8726_wdt_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, amlogic,aml8726-wdt))
+   if (!ofw_bus_is_compatible(dev, amlogic,meson6-wdt))
return (ENXIO);
 
device_set_desc(dev, Amlogic aml8726 WDT);
___
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: r281407 - head/tools/regression/sockets/so_setfib

2015-04-11 Thread Garrett Cooper
Author: ngie
Date: Sat Apr 11 06:38:50 2015
New Revision: 281407
URL: https://svnweb.freebsd.org/changeset/base/281407

Log:
  Fix the knob twiddling to work properly per src.opts.mk
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/regression/sockets/so_setfib/Makefile

Modified: head/tools/regression/sockets/so_setfib/Makefile
==
--- head/tools/regression/sockets/so_setfib/MakefileSat Apr 11 06:20:46 
2015(r281406)
+++ head/tools/regression/sockets/so_setfib/MakefileSat Apr 11 06:38:50 
2015(r281407)
@@ -1,14 +1,16 @@
 # $FreeBSD$
 
+.include src.opts.mk
+
 PROG=  so_setfib
 MAN=
 WARNS?=6
 
-.ifdef INET6
-CFLAGS+=   -DINET6
-.endif
-.ifdef INET
+.if ${MK_INET} != no
 CFLAGS+=   -DINET
 .endif
+.if ${MK_INET6} != no
+CFLAGS+=   -DINET6
+.endif
 
 .include bsd.prog.mk
___
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: r281408 - head/tools/regression/sockets/so_setfib

2015-04-11 Thread Garrett Cooper
Author: ngie
Date: Sat Apr 11 06:40:38 2015
New Revision: 281408
URL: https://svnweb.freebsd.org/changeset/base/281408

Log:
  - Remove the .t wrapper and put the magic of determining the number of
testcases into the .c file
  - Require root for now because it fails with SOCK_RAW without root privileges
  - Increment the test count properly on socket create failure
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Deleted:
  head/tools/regression/sockets/so_setfib/so_setfib.t
Modified:
  head/tools/regression/sockets/so_setfib/so_setfib.c

Modified: head/tools/regression/sockets/so_setfib/so_setfib.c
==
--- head/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 11 06:38:50 
2015(r281407)
+++ head/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 11 06:40:38 
2015(r281408)
@@ -45,6 +45,7 @@
  * 5. Repeat for next domain family and type from (2) on.
  */
 
+#include sys/param.h
 #include sys/types.h
 #include sys/socket.h
 #include sys/sysctl.h
@@ -143,6 +144,7 @@ t(u_int dom, u_int type)
if (s == -1) {
printf(not ok %d %s_%s # socket(): %s\n, testno,
t_dom[dom].name, t_type[type].name, strerror(errno));
+   testno++;
return;
}

@@ -168,6 +170,11 @@ main(int argc __unused, char *argv[] __u
u_int i, j;
size_t s;
 
+   if (geteuid() != 0) {
+   printf(1..0 # SKIP: must be root);
+   return (0);
+   }
+
/* Initalize randomness. */
srandomdev();
 
@@ -175,6 +182,10 @@ main(int argc __unused, char *argv[] __u
s = sizeof(rt_numfibs);
if (sysctlbyname(net.fibs, rt_numfibs, s, NULL, 0) == -1)
err(1, sysctlbyname(net.fibs, ..));
+
+   printf(1..%lu\n,
+   (nitems(t_dom) - 1) * nitems(t_type) * (2 + rt_numfibs + 2 + 3));
+
/* Adjust from number to index. */
rt_numfibs -= 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: r281410 - head/tools/regression/sockets/reconnect

2015-04-11 Thread Garrett Cooper
Author: ngie
Date: Sat Apr 11 07:35:30 2015
New Revision: 281410
URL: https://svnweb.freebsd.org/changeset/base/281410

Log:
  Fix more warnings I didn't catch in the first go-around
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/tools/regression/sockets/reconnect/Makefile
  head/tools/regression/sockets/reconnect/reconnect.c

Modified: head/tools/regression/sockets/reconnect/Makefile
==
--- head/tools/regression/sockets/reconnect/MakefileSat Apr 11 07:33:04 
2015(r281409)
+++ head/tools/regression/sockets/reconnect/MakefileSat Apr 11 07:35:30 
2015(r281410)
@@ -4,6 +4,5 @@
 
 PROG=  reconnect
 MAN=
-WARNS?=2
 
 .include bsd.prog.mk

Modified: head/tools/regression/sockets/reconnect/reconnect.c
==
--- head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:33:04 
2015(r281409)
+++ head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:35:30 
2015(r281410)
@@ -50,7 +50,7 @@ static char uds_name2[] = reconnect.XXX
 
 #definesstosa(ss)  ((struct sockaddr *)(ss))
 
-void
+static void
 prepare_ifsun(struct sockaddr_un *ifsun, const char *path)
 {
 
@@ -99,10 +99,8 @@ void
 cleanup(void)
 {
 
-if (uds_name1 != NULL)
-unlink(uds_name1);
-if (uds_name2 != NULL)
-unlink(uds_name2);
+unlink(uds_name1);
+unlink(uds_name2);
 }
 
 int
___
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: r281415 - head/sys/boot/fdt/dts/arm

2015-04-11 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Sat Apr 11 08:27:38 2015
New Revision: 281415
URL: https://svnweb.freebsd.org/changeset/base/281415

Log:
  This modifies the FreeBSD Amlogic DTS files to use the GNU files
  as the base.
  
  Submitted by: John Wehle
  Reviewed by:  imp

Modified:
  head/sys/boot/fdt/dts/arm/odroidc1.dts
  head/sys/boot/fdt/dts/arm/vsatv102-m6.dts

Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts
==
--- head/sys/boot/fdt/dts/arm/odroidc1.dts  Sat Apr 11 08:27:34 2015
(r281414)
+++ head/sys/boot/fdt/dts/arm/odroidc1.dts  Sat Apr 11 08:27:38 2015
(r281415)
@@ -39,6 +39,8 @@
 
 /memreserve/ 0x790 0x0060; /* 6MB frame buffer */
 
+#include meson8b.dtsi
+
 / {
model = hardkernel,odroid-c1;
compatible = hardkernel,odroid-c1, amlogic,s805;
@@ -46,41 +48,10 @@
#address-cells = 1;
#size-cells = 1;
 
-   interrupt-parent = gic;
-
aliases {
soc = soc;
screen = screen;
-   uart0 = uart0;
-   };
-
-   cpus {
-   #address-cells = 1;
-   #size-cells = 0;
-
-   cpu@0 {
-   device_type = cpu;
-   compatible = arm,cortex-a5;
-   reg = 0x0;
-   };
-
-   cpu@1 {
-   device_type = cpu;
-   compatible = arm,cortex-a5;
-   reg = 0x1;
-   };
-
-   cpu@2 {
-   device_type = cpu;
-   compatible = arm,cortex-a5;
-   reg = 0x2;
-   };
-
-   cpu@3 {
-   device_type = cpu;
-   compatible = arm,cortex-a5;
-   reg = 0x3;
-   };
+   uart0 = uart_AO;
};
 
memory {
@@ -88,60 +59,37 @@
reg = 0x0 0x4000; /* 1GB RAM */
};
 
-   soc: soc@c000 {
+   soc: soc {
device_type = soc;
-   compatible = simple-bus;
bus-frequency = 0;
 
-   #address-cells = 1;
-   #size-cells = 1;
-
-   ranges = 0x0 0xc000 0x1a10;
-
-   gic: gic@4301000 {
-   device_type = interrupt-controller;
-   compatible = arm,gic;
-   reg = 0x4301000 0x1000, // distributer registers
- 0x4300100 0x0100; // CPU if registers
-
-   interrupt-controller;
-   #interrupt-cells = 1;
-   };
-
-   scu: scu@430 {
+   scu: scu@c430 {
compatible = arm,cortex-a5-scu;
-   reg = 0x430 0x1000;
+   reg = 0xc430 0x1000;
};
 
-   cpuconfig: cpuconfig@1901ff80 {
+   cpuconfig: cpuconfig@d901ff80 {
compatible = amlogic,aml8726-cpuconfig;
-   reg = 0x1901ff80 16;
+   reg = 0xd901ff80 16;
};
 
-   pl310@420 {
-   compatible = arm,pl310;
-   reg = 0x420 0x1000;
-   interrupts = 61;
-   interrupt-parent = gic;
-   };
-
-   ccm@1104140 {
+   ccm@c1104140 {
compatible = amlogic,aml8726-ccm;
-   reg = 0x1104140 20;   /* cbus 0x1050 */
+   reg = 0xc1104140 20;  /* cbus 0x1050 */
 
functions = ethernet, i2c, rng, sdio, sdxc,
uart-a, uart-b, uart-c,
usb-a, usb-b;
};
 
-   pinctrl@11080b0 {
+   pinctrl@c11080b0 {
compatible = amlogic,aml8726-pinctrl;
-   reg = 0x11080b0 40,   /* mux */
- 0x11080e8 24,   /* pu/pd */
- 0x1108120 24,   /* pull enable */
- 0x8100014 4,/* ao mux */
- 0x810002c 4,/* ao pu/pd */
- 0x810002c 4;/* ao pull enable */
+   reg = 0xc11080b0 40,  /* mux */
+ 0xc11080e8 24,  /* pu/pd */
+ 0xc1108120 24,  /* pull enable */
+ 0xc8100014 4,   /* ao mux */
+ 0xc810002c 4,   /* ao pu/pd */
+ 0xc810002c 4;   /* ao pull enable */
 
/*
 * Currently only pin muxing that deviates
@@ -242,24 +190,10 @@
};
};
 
-   

svn commit: r281413 - head/sys/boot/fdt/dts/arm

2015-04-11 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Sat Apr 11 08:25:53 2015
New Revision: 281413
URL: https://svnweb.freebsd.org/changeset/base/281413

Log:
  The GNU files don't include a DTS for the aml8726-m8b (which has
  cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores).
  
  Submitted by: John Wehle
  Reviewed by:  imp

Added:
  head/sys/boot/fdt/dts/arm/meson8b.dtsi   (contents, props changed)

Added: head/sys/boot/fdt/dts/arm/meson8b.dtsi
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/meson8b.dtsi  Sat Apr 11 08:25:53 2015
(r281413)
@@ -0,0 +1,79 @@
+/*-
+ * Copyright (c) 2015 John Wehle j...@feith.com
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/include/ meson.dtsi
+
+/ {
+   model = Amlogic Meson8b SoC;
+   compatible = amlogic,meson8b;
+
+   interrupt-parent = gic;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   cpu@200 {
+   device_type = cpu;
+   compatible = arm,cortex-a5;
+   next-level-cache = L2;
+   reg = 0x200;
+   };
+
+   cpu@201 {
+   device_type = cpu;
+   compatible = arm,cortex-a5;
+   next-level-cache = L2;
+   reg = 0x201;
+   };
+
+   cpu@202 {
+   device_type = cpu;
+   compatible = arm,cortex-a5;
+   next-level-cache = L2;
+   reg = 0x202;
+   };
+
+   cpu@203 {
+   device_type = cpu;
+   compatible = arm,cortex-a5;
+   next-level-cache = L2;
+   reg = 0x203;
+   };
+   };
+
+   clk81: clk@0 {
+   #clock-cells = 0;
+   compatible = fixed-clock;
+   clock-frequency = 0;
+   };
+};
+
+L2 {
+   interrupts = 0 143 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: r281433 - in head/sys/boot/efi/loader: . arch/amd64 arch/arm arch/i386

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 10:21:26 2015
New Revision: 281433
URL: https://svnweb.freebsd.org/changeset/base/281433

Log:
  Move reloc.c to the top level Makefile as it has become generic.

Modified:
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/amd64/Makefile.inc
  head/sys/boot/efi/loader/arch/arm/Makefile.inc
  head/sys/boot/efi/loader/arch/i386/Makefile.inc

Modified: head/sys/boot/efi/loader/Makefile
==
--- head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:14:59 2015
(r281432)
+++ head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:21:26 2015
(r281433)
@@ -20,6 +20,7 @@ SRCS= autoload.c \
copy.c \
devicename.c \
main.c \
+   reloc.c \
smbios.c \
vers.c
 

Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/amd64/Makefile.incSat Apr 11 10:14:59 
2015(r281432)
+++ head/sys/boot/efi/loader/arch/amd64/Makefile.incSat Apr 11 10:21:26 
2015(r281433)
@@ -3,8 +3,7 @@
 SRCS+= amd64_tramp.S \
start.S \
framebuffer.c \
-   elf64_freebsd.c \
-   reloc.c
+   elf64_freebsd.c
 
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \

Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/arm/Makefile.inc  Sat Apr 11 10:14:59 
2015(r281432)
+++ head/sys/boot/efi/loader/arch/arm/Makefile.inc  Sat Apr 11 10:21:26 
2015(r281433)
@@ -1,5 +1,4 @@
 # $FreeBSD$
 
 SRCS+= exec.c \
-   start.S \
-   reloc.c
+   start.S

Modified: head/sys/boot/efi/loader/arch/i386/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:14:59 
2015(r281432)
+++ head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:21:26 
2015(r281433)
@@ -3,8 +3,7 @@
 SRCS+= start.S \
efimd.c \
elf32_freebsd.c \
-   exec.c \
-   reloc.c
+   exec.c
 
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r281435 - head/sys/boot/efi/loader/arch/arm

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 11:00:53 2015
New Revision: 281435
URL: https://svnweb.freebsd.org/changeset/base/281435

Log:
  Add fdt support to the arm loader.efi

Modified:
  head/sys/boot/efi/loader/arch/arm/Makefile.inc

Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/arm/Makefile.inc  Sat Apr 11 10:36:48 
2015(r281434)
+++ head/sys/boot/efi/loader/arch/arm/Makefile.inc  Sat Apr 11 11:00:53 
2015(r281435)
@@ -2,3 +2,5 @@
 
 SRCS+= exec.c \
start.S
+
+LOADER_FDT_SUPPORT=yes
___
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: r281436 - in head/sys: compat/svr4 dev/streams kern netinet ofed/include/linux sys

2015-04-11 Thread Mateusz Guzik
Author: mjg
Date: Sat Apr 11 15:40:28 2015
New Revision: 281436
URL: https://svnweb.freebsd.org/changeset/base/281436

Log:
  fd: remove filedesc argument from fdclose
  
  Just accept a thread instead. This makes it consistent with fdalloc.
  
  No functional changes.

Modified:
  head/sys/compat/svr4/svr4_stream.c
  head/sys/dev/streams/streams.c
  head/sys/kern/kern_descrip.c
  head/sys/kern/kern_fork.c
  head/sys/kern/sys_pipe.c
  head/sys/kern/tty_pts.c
  head/sys/kern/uipc_mqueue.c
  head/sys/kern/uipc_sem.c
  head/sys/kern/uipc_shm.c
  head/sys/kern/uipc_syscalls.c
  head/sys/netinet/sctp_syscalls.c
  head/sys/ofed/include/linux/file.h
  head/sys/sys/filedesc.h

Modified: head/sys/compat/svr4/svr4_stream.c
==
--- head/sys/compat/svr4/svr4_stream.c  Sat Apr 11 11:00:53 2015
(r281435)
+++ head/sys/compat/svr4/svr4_stream.c  Sat Apr 11 15:40:28 2015
(r281436)
@@ -1829,7 +1829,7 @@ svr4_do_getmsg(td, uap, fp)
break;
 
default:
-   fdclose(td-td_proc-p_fd, afp, st-s_afd, td);
+   fdclose(td, afp, st-s_afd);
fdrop(afp, td);
st-s_afd = -1;
mtx_unlock(Giant);
@@ -1967,7 +1967,7 @@ svr4_do_getmsg(td, uap, fp)
 
if (error) {
if (afp) {
-   fdclose(td-td_proc-p_fd, afp, st-s_afd, td);
+   fdclose(td, afp, st-s_afd);
fdrop(afp, td);
st-s_afd = -1;
}

Modified: head/sys/dev/streams/streams.c
==
--- head/sys/dev/streams/streams.c  Sat Apr 11 11:00:53 2015
(r281435)
+++ head/sys/dev/streams/streams.c  Sat Apr 11 15:40:28 2015
(r281436)
@@ -180,7 +180,6 @@ MODULE_VERSION(streams, 1);
 static  int
 streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
-   struct filedesc *fdp;
struct svr4_strm *st;
struct socket *so;
struct file *fp;
@@ -236,14 +235,13 @@ streamsopen(struct cdev *dev, int oflags
  return EOPNOTSUPP;
}
 
-   fdp = td-td_proc-p_fd;
if ((error = falloc(td, fp, fd, 0)) != 0)
  return error;
/* An extra reference on `fp' has been held for us by falloc(). */
 
error = socreate(family, so, type, protocol, td-td_ucred, td);
if (error) {
-  fdclose(fdp, fp, fd, td);
+  fdclose(td, fp, fd);
   fdrop(fp, td);
   return error;
}

Modified: head/sys/kern/kern_descrip.c
==
--- head/sys/kern/kern_descrip.cSat Apr 11 11:00:53 2015
(r281435)
+++ head/sys/kern/kern_descrip.cSat Apr 11 15:40:28 2015
(r281436)
@@ -2155,8 +2155,9 @@ fdsetugidsafety(struct thread *td)
  * file descriptor out from under the thread creating the file object.
  */
 void
-fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td)
+fdclose(struct thread *td, struct file *fp, int idx)
 {
+   struct filedesc *fdp = td-td_proc-p_fd;
 
FILEDESC_XLOCK(fdp);
if (fdp-fd_ofiles[idx].fde_file == fp) {

Modified: head/sys/kern/kern_fork.c
==
--- head/sys/kern/kern_fork.c   Sat Apr 11 11:00:53 2015(r281435)
+++ head/sys/kern/kern_fork.c   Sat Apr 11 15:40:28 2015(r281436)
@@ -949,7 +949,7 @@ fail2:
vmspace_free(vm2);
uma_zfree(proc_zone, newproc);
if ((flags  RFPROCDESC) != 0  fp_procdesc != NULL) {
-   fdclose(td-td_proc-p_fd, fp_procdesc, *procdescp, td);
+   fdclose(td, fp_procdesc, *procdescp);
fdrop(fp_procdesc, td);
}
pause(fork, hz / 2);

Modified: head/sys/kern/sys_pipe.c
==
--- head/sys/kern/sys_pipe.cSat Apr 11 11:00:53 2015(r281435)
+++ head/sys/kern/sys_pipe.cSat Apr 11 15:40:28 2015(r281436)
@@ -406,13 +406,11 @@ kern_pipe(struct thread *td, int fildes[
 int
 kern_pipe2(struct thread *td, int fildes[2], int flags)
 {
-   struct filedesc *fdp; 
struct file *rf, *wf;
struct pipe *rpipe, *wpipe;
struct pipepair *pp;
int fd, fflags, error;
 
-   fdp = td-td_proc-p_fd;
pipe_paircreate(td, pp);
rpipe = pp-pp_rpipe;
wpipe = pp-pp_wpipe;
@@ -438,7 +436,7 @@ kern_pipe2(struct thread *td, int fildes
finit(rf, fflags, DTYPE_PIPE, rpipe, pipeops);
error = falloc(td, wf, fd, flags);
if (error) {
-   fdclose(fdp, rf, fildes[0], td);
+   fdclose(td, rf, fildes[0]);
fdrop(rf, td);
/* 

svn commit: r281439 - in head/sys/arm: conf qemu

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 17:52:47 2015
New Revision: 281439
URL: https://svnweb.freebsd.org/changeset/base/281439

Log:
  Add support for the QEMU virt SoC. This is a SoC built depending on the
  command line arguments passed in. It will then generate a dtb on the fly,
  as such no dts will be added as it may be incorrect.
  
  Relnotes: yes

Added:
  head/sys/arm/conf/VIRT   (contents, props changed)
  head/sys/arm/qemu/
  head/sys/arm/qemu/files.qemu   (contents, props changed)
  head/sys/arm/qemu/std.virt   (contents, props changed)
  head/sys/arm/qemu/virt_common.c   (contents, props changed)
  head/sys/arm/qemu/virt_machdep.c   (contents, props changed)

Added: head/sys/arm/conf/VIRT
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/VIRT  Sat Apr 11 17:52:47 2015(r281439)
@@ -0,0 +1,95 @@
+#
+# VIRT -- Custom configuration for the qemu virt platform
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident  VIRT
+
+include../qemu/std.virt
+
+optionsHZ=100
+optionsSCHED_4BSD  # 4BSD scheduler
+optionsPREEMPTION  # Enable kernel thread preemption
+optionsINET# InterNETworking
+optionsINET6   # IPv6 communications protocols
+optionsSCTP# Stream Control Transmission Protocol
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates support
+optionsUFS_ACL # Support for access control lists
+optionsUFS_DIRHASH # Improve performance on big directories
+optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+optionsQUOTA   # Enable disk quotas for UFS
+optionsNFSCL   # Network Filesystem Client
+optionsNFSLOCKD# Network Lock Manager
+optionsNFS_ROOT# NFS usable as /, requires NFSCL
+optionsMSDOSFS # MSDOS Filesystem
+optionsCD9660  # ISO 9660 Filesystem
+optionsPROCFS  # Process filesystem (requires PSEUDOFS)
+optionsPSEUDOFS# Pseudo-filesystem framework
+optionsTMPFS   # Efficient memory filesystem
+optionsGEOM_PART_GPT   # GUID Partition Tables
+optionsGEOM_PART_BSD   # BSD partition scheme
+optionsGEOM_PART_MBR   # MBR partition scheme
+optionsGEOM_LABEL  # Provides labelization
+optionsCOMPAT_43   # Compatible with BSD 4.3 [KEEP THIS!]
+optionsSCSI_DELAY=5000 # Delay (in ms) before probing SCSI
+optionsKTRACE  # ktrace(1) support
+optionsSYSVSHM # SYSV-style shared memory
+optionsSYSVMSG # SYSV-style message queues
+optionsSYSVSEM # SYSV-style semaphores
+options_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
+optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
+optionsPLATFORM
+optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
+optionsVFP # Enable floating point hardware support
+
+# Debugging for use in -current
+makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+optionsBREAK_TO_DEBUGGER
+optionsALT_BREAK_TO_DEBUGGER
+#options   VERBOSE_SYSINIT # Enable verbose sysinit messages
+optionsKDB # Enable kernel debugger support
+# For minimum debugger support (stable branch) use:
+#options   KDB_TRACE   # Print a stack trace for a panic
+# For full debugger support use this instead:
+optionsDDB # Enable the kernel debugger
+optionsINVARIANTS  # Enable calls of extra sanity checking
+optionsINVARIANT_SUPPORT   # Extra sanity checks of internal 
structures, required by INVARIANTS
+#options   WITNESS # Enable checks to detect 

svn commit: r281437 - in head/sys: kern netinet sys

2015-04-11 Thread Mateusz Guzik
Author: mjg
Date: Sat Apr 11 16:00:33 2015
New Revision: 281437
URL: https://svnweb.freebsd.org/changeset/base/281437

Log:
  Replace struct filedesc argument in getsock_cap with struct thread
  
  This is is a step towards removal of spurious arguments.

Modified:
  head/sys/kern/uipc_syscalls.c
  head/sys/netinet/sctp_syscalls.c
  head/sys/sys/socketvar.h

Modified: head/sys/kern/uipc_syscalls.c
==
--- head/sys/kern/uipc_syscalls.c   Sat Apr 11 15:40:28 2015
(r281436)
+++ head/sys/kern/uipc_syscalls.c   Sat Apr 11 16:00:33 2015
(r281437)
@@ -150,17 +150,17 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, sfstat,
  * A reference on the file entry is held upon returning.
  */
 int
-getsock_cap(struct filedesc *fdp, int fd, cap_rights_t *rightsp,
+getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp,
 struct file **fpp, u_int *fflagp)
 {
struct file *fp;
int error;
 
-   error = fget_unlocked(fdp, fd, rightsp, fp, NULL);
+   error = fget_unlocked(td-td_proc-p_fd, fd, rightsp, fp, NULL);
if (error != 0)
return (error);
if (fp-f_type != DTYPE_SOCKET) {
-   fdrop(fp, curthread);
+   fdrop(fp, td);
return (ENOTSOCK);
}
if (fflagp != NULL)
@@ -258,8 +258,8 @@ kern_bindat(struct thread *td, int dirfd
 
AUDIT_ARG_FD(fd);
AUDIT_ARG_SOCKADDR(td, dirfd, sa);
-   error = getsock_cap(td-td_proc-p_fd, fd,
-   cap_rights_init(rights, CAP_BIND), fp, NULL);
+   error = getsock_cap(td, fd, cap_rights_init(rights, CAP_BIND),
+   fp, NULL);
if (error != 0)
return (error);
so = fp-f_data;
@@ -319,8 +319,8 @@ sys_listen(td, uap)
int error;
 
AUDIT_ARG_FD(uap-s);
-   error = getsock_cap(td-td_proc-p_fd, uap-s,
-   cap_rights_init(rights, CAP_LISTEN), fp, NULL);
+   error = getsock_cap(td, uap-s, cap_rights_init(rights, CAP_LISTEN),
+   fp, NULL);
if (error == 0) {
so = fp-f_data;
 #ifdef MAC
@@ -390,7 +390,6 @@ int
 kern_accept4(struct thread *td, int s, struct sockaddr **name,
 socklen_t *namelen, int flags, struct file **fp)
 {
-   struct filedesc *fdp;
struct file *headfp, *nfp = NULL;
struct sockaddr *sa = NULL;
struct socket *head, *so;
@@ -403,8 +402,7 @@ kern_accept4(struct thread *td, int s, s
*name = NULL;
 
AUDIT_ARG_FD(s);
-   fdp = td-td_proc-p_fd;
-   error = getsock_cap(fdp, s, cap_rights_init(rights, CAP_ACCEPT),
+   error = getsock_cap(td, s, cap_rights_init(rights, CAP_ACCEPT),
headfp, fflag);
if (error != 0)
return (error);
@@ -604,8 +602,8 @@ kern_connectat(struct thread *td, int di
 
AUDIT_ARG_FD(fd);
AUDIT_ARG_SOCKADDR(td, dirfd, sa);
-   error = getsock_cap(td-td_proc-p_fd, fd,
-   cap_rights_init(rights, CAP_CONNECT), fp, NULL);
+   error = getsock_cap(td, fd, cap_rights_init(rights, CAP_CONNECT),
+   fp, NULL);
if (error != 0)
return (error);
so = fp-f_data;
@@ -865,7 +863,7 @@ kern_sendit(td, s, mp, flags, control, s
AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp-msg_name);
cap_rights_set(rights, CAP_CONNECT);
}
-   error = getsock_cap(td-td_proc-p_fd, s, rights, fp, NULL);
+   error = getsock_cap(td, s, rights, fp, NULL);
if (error != 0)
return (error);
so = (struct socket *)fp-f_data;
@@ -1065,8 +1063,8 @@ kern_recvit(td, s, mp, fromseg, controlp
*controlp = NULL;
 
AUDIT_ARG_FD(s);
-   error = getsock_cap(td-td_proc-p_fd, s,
-   cap_rights_init(rights, CAP_RECV), fp, NULL);
+   error = getsock_cap(td, s, cap_rights_init(rights, CAP_RECV),
+   fp, NULL);
if (error != 0)
return (error);
so = fp-f_data;
@@ -1380,8 +1378,8 @@ sys_shutdown(td, uap)
int error;
 
AUDIT_ARG_FD(uap-s);
-   error = getsock_cap(td-td_proc-p_fd, uap-s,
-   cap_rights_init(rights, CAP_SHUTDOWN), fp, NULL);
+   error = getsock_cap(td, uap-s, cap_rights_init(rights, CAP_SHUTDOWN),
+   fp, NULL);
if (error == 0) {
so = fp-f_data;
error = soshutdown(so, uap-how);
@@ -1445,8 +1443,8 @@ kern_setsockopt(td, s, level, name, val,
}
 
AUDIT_ARG_FD(s);
-   error = getsock_cap(td-td_proc-p_fd, s,
-   cap_rights_init(rights, CAP_SETSOCKOPT), fp, NULL);
+   error = getsock_cap(td, s, cap_rights_init(rights, CAP_SETSOCKOPT),
+   fp, NULL);
if (error == 0) {
so = fp-f_data;
error = sosetopt(so, sopt);
@@ -1526,8 +1524,8 @@ kern_getsockopt(td, s, level, name, val,
}
 
AUDIT_ARG_FD(s);
-   error = 

svn commit: r281438 - in head/sys: arm/amlogic/aml8726 arm/freescale/vybrid arm/samsung/exynos arm/samsung/s3c2xx0 dev/uart mips/adm5120 mips/atheros mips/cavium mips/rt305x sparc64/pci

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 17:16:23 2015
New Revision: 281438
URL: https://svnweb.freebsd.org/changeset/base/281438

Log:
  Add support for the uart classes to set their default register shift value.
  This is needed with the pl011 driver. Before this change it would default
  to a shift of 0, however the hardware places the registers at 4-byte
  addresses meaning the value should be 2.
  
  This patch fixes this for the pl011 when configured using the fdt. The
  other drivers have a default value of 0 to keep this a no-op.
  
  MFC after:1 week

Modified:
  head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c
  head/sys/arm/freescale/vybrid/vf_uart.c
  head/sys/arm/samsung/exynos/exynos_uart.c
  head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c
  head/sys/dev/uart/uart_bus.h
  head/sys/dev/uart/uart_bus_fdt.c
  head/sys/dev/uart/uart_core.c
  head/sys/dev/uart/uart_cpu.h
  head/sys/dev/uart/uart_cpu_fdt.c
  head/sys/dev/uart/uart_dev_imx.c
  head/sys/dev/uart/uart_dev_lpc.c
  head/sys/dev/uart/uart_dev_msm.c
  head/sys/dev/uart/uart_dev_ns8250.c
  head/sys/dev/uart/uart_dev_pl011.c
  head/sys/dev/uart/uart_dev_quicc.c
  head/sys/dev/uart/uart_dev_sab82532.c
  head/sys/dev/uart/uart_dev_ti8250.c
  head/sys/dev/uart/uart_dev_z8530.c
  head/sys/mips/adm5120/uart_dev_adm5120.c
  head/sys/mips/atheros/uart_dev_ar933x.c
  head/sys/mips/cavium/uart_dev_oct16550.c
  head/sys/mips/rt305x/uart_dev_rt305x.c
  head/sys/sparc64/pci/sbbc.c

Modified: head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c
==
--- head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 16:00:33 
2015(r281437)
+++ head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 17:16:23 
2015(r281438)
@@ -724,7 +724,8 @@ struct uart_class uart_aml8726_class = {
sizeof(struct uart_softc),
.uc_ops = aml8726_uart_ops,
.uc_range = 24,
-   .uc_rclk = 0
+   .uc_rclk = 0,
+   .uc_rshift = 0
 };
 
 static struct ofw_compat_data compat_data[] = {

Modified: head/sys/arm/freescale/vybrid/vf_uart.c
==
--- head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 11 16:00:33 2015
(r281437)
+++ head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 11 17:16:23 2015
(r281438)
@@ -276,7 +276,8 @@ static struct uart_class uart_vybrid_cla
sizeof(struct vf_uart_softc),
.uc_ops = uart_vybrid_ops,
.uc_range = 0x100,
-   .uc_rclk = 2400 /* TODO: get value from CCM */
+   .uc_rclk = 2400, /* TODO: get value from CCM */
+   .uc_rshift = 0
 };
 
 static struct ofw_compat_data compat_data[] = {

Modified: head/sys/arm/samsung/exynos/exynos_uart.c
==
--- head/sys/arm/samsung/exynos/exynos_uart.c   Sat Apr 11 16:00:33 2015
(r281437)
+++ head/sys/arm/samsung/exynos/exynos_uart.c   Sat Apr 11 17:16:23 2015
(r281438)
@@ -380,6 +380,7 @@ static struct uart_class uart_exynos4210
.uc_ops = uart_exynos4210_ops,
.uc_range = 8,
.uc_rclk = 0,
+   .uc_rshift = 0
 };
 
 static struct ofw_compat_data compat_data[] = {

Modified: head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c
==
--- head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c Sat Apr 11 16:00:33 
2015(r281437)
+++ head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c Sat Apr 11 17:16:23 
2015(r281438)
@@ -402,4 +402,5 @@ struct uart_class uart_s3c2410_class = {
.uc_ops = uart_s3c2410_ops,
.uc_range = 8,
.uc_rclk = 0,
+   .uc_rshift = 0
 };

Modified: head/sys/dev/uart/uart_bus.h
==
--- head/sys/dev/uart/uart_bus.hSat Apr 11 16:00:33 2015
(r281437)
+++ head/sys/dev/uart/uart_bus.hSat Apr 11 17:16:23 2015
(r281438)
@@ -70,6 +70,7 @@ struct uart_class {
struct uart_ops *uc_ops;/* Low-level console operations. */
u_int   uc_range;   /* Bus space address range. */
u_int   uc_rclk;/* Default rclk for this device. */
+   u_int   uc_rshift;  /* Default regshift for this device. */
 };
 
 struct uart_softc {

Modified: head/sys/dev/uart/uart_bus_fdt.c
==
--- head/sys/dev/uart/uart_bus_fdt.cSat Apr 11 16:00:33 2015
(r281437)
+++ head/sys/dev/uart/uart_bus_fdt.cSat Apr 11 17:16:23 2015
(r281438)
@@ -83,16 +83,10 @@ uart_fdt_get_clock(phandle_t node, pcell
 int
 uart_fdt_get_shift(phandle_t node, pcell_t *cell)
 {
-#ifdef __aarch64__
-#define DEFAULT_SHIFT  2
-#else
-#define DEFAULT_SHIFT  0
-#endif
 
if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 

svn commit: r281434 - in head/sys/boot/efi/loader: . arch/amd64 arch/i386

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 10:36:48 2015
New Revision: 281434
URL: https://svnweb.freebsd.org/changeset/base/281434

Log:
  Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
  shouldn't be used on arm.

Modified:
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/amd64/Makefile.inc
  head/sys/boot/efi/loader/arch/i386/Makefile.inc

Modified: head/sys/boot/efi/loader/Makefile
==
--- head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:21:26 2015
(r281433)
+++ head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:36:48 2015
(r281434)
@@ -29,7 +29,6 @@ SRCS= autoload.c \
 .PATH: ${.CURDIR}/../../i386/libi386
 .include ${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc
 
-CFLAGS+=   -fPIC
 CFLAGS+=   -I${.CURDIR}
 CFLAGS+=   -I${.CURDIR}/arch/${MACHINE_CPUARCH}
 CFLAGS+=   -I${.CURDIR}/../include
@@ -72,7 +71,7 @@ FILES=loader.efi
 FILESMODE_loader.efi=  ${BINMODE}
 
 LDSCRIPT=  ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
-LDFLAGS=   -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc
+LDFLAGS+=  -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
 
 CLEANFILES=vers.c loader.efi
 

Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/amd64/Makefile.incSat Apr 11 10:21:26 
2015(r281433)
+++ head/sys/boot/efi/loader/arch/amd64/Makefile.incSat Apr 11 10:36:48 
2015(r281434)
@@ -8,3 +8,6 @@ SRCS+=  amd64_tramp.S \
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \
comconsole.c
+
+CFLAGS+=   -fPIC
+LDFLAGS+=  -Wl,-znocombreloc

Modified: head/sys/boot/efi/loader/arch/i386/Makefile.inc
==
--- head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:21:26 
2015(r281433)
+++ head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:36:48 
2015(r281434)
@@ -8,3 +8,6 @@ SRCS+=  start.S \
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \
comconsole.c
+
+CFLAGS+=   -fPIC
+LDFLAGS+=  -Wl,-znocombreloc
___
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: r281431 - head/sys/boot/efi/loader/arch/arm

2015-04-11 Thread Andrew Turner
Author: andrew
Date: Sat Apr 11 10:07:58 2015
New Revision: 281431
URL: https://svnweb.freebsd.org/changeset/base/281431

Log:
  Update the arm efi ldscript to generate a valid efi binary

Modified:
  head/sys/boot/efi/loader/arch/arm/ldscript.arm

Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm
==
--- head/sys/boot/efi/loader/arch/arm/ldscript.arm  Sat Apr 11 09:28:53 
2015(r281430)
+++ head/sys/boot/efi/loader/arch/arm/ldscript.arm  Sat Apr 11 10:07:58 
2015(r281431)
@@ -8,10 +8,8 @@ SECTIONS
   /* Read-only sections, merged into text segment: */
   . = 0;
   ImageBase = .;
-  .peheader: {
-*(.peheader)
-  }
   .text: {
+*(.peheader)
 *(.text .stub .text.* .gnu.linkonce.t.*)
 /* .gnu.warning sections are handled specially by elf32.em. */
 *(.gnu.warning)
@@ -22,65 +20,43 @@ SECTIONS
   . = ALIGN(4096);
   .data:
   {
-*(.data)
+*(.data *.data.*)
 *(.gnu.linkonce.d*)
 *(.rodata)
 *(.rodata.*)
 CONSTRUCTORS
+
+PROVIDE (__bss_start = .);
+*(.sbss)
+*(.scommon)
+*(.dynsbss)
+*(.dynbss)
+*(.bss)
+*(COMMON)
+PROVIDE (__bss_end = .);
   }
-  .data1   : { *(.data1) }
-  .got1   : { *(.got1) }
-  .dynamic: { *(.dynamic) }
-  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
- get relocated with -mrelocatable. Also put in the .fixup pointers.
- The current compiler no longer needs this, but keep it around for 2.7.2  
*/
-PROVIDE (_GOT2_START_ = .);
-  .got2   :  { *(.got2) }
-PROVIDE (__CTOR_LIST__ = .);
-  .ctors  : { *(.ctors) }
-PROVIDE (__CTOR_END__ = .);
-PROVIDE (__DTOR_LIST__ = .);
-  .dtors  : { *(.dtors) }
-PROVIDE (__DTOR_END__ = .);
-PROVIDE (_FIXUP_START_ = .);
-  .fixup  : { *(.fixup) }
-PROVIDE (_FIXUP_END_ = .);
-PROVIDE (_GOT2_END_ = .);
-PROVIDE (_GOT_START_ = .);
-  .got: { *(.got) }
-  .got.plt: { *(.got.plt) }
-PROVIDE (_GOT_END_ = .);
   /* We want the small data sections together, so single-instruction offsets
  can access them all, and initialized data all before uninitialized, so
  we can shorten the on-disk segment size.  */
-  .sdata : { *(.sdata) }
-  _edata  =  .;
-  PROVIDE (edata = .);
+  .sdata : {
+*(.got.plt .got)
+*(.sdata*.sdata.* .gnu.linkonce.s.*)
+  }
   set_Xcommand_set : {
 __start_set_Xcommand_set = .;
 *(set_Xcommand_set)
 __stop_set_Xcommand_set = .;
   }
   __gp = .;
-   PROVIDE (__bss_start = .);
-  .sbss  :
-  {
-*(.sbss)
-*(.scommon)
-*(.dynsbss)
-  }
-  .bss   :
-  {
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-   PROVIDE (__bss_end = .);
   .plt   : { *(.plt) }
   .dynamic : { *(.dynamic) }
   .reloc   : { *(.reloc) }
-  .hash: { *(.hash) }
   .dynsym  : { *(.dynsym) }
   .dynstr  : { *(.dynstr) }
+  .rel.dyn : {
+*(.rel.*)
+*(.relset_*)
+  }
   _edata = .;
+  .hash: { *(.hash) }
 }
___
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: r281445 - head/sys/mips/conf

2015-04-11 Thread Adrian Chadd
Author: adrian
Date: Sun Apr 12 00:02:32 2015
New Revision: 281445
URL: https://svnweb.freebsd.org/changeset/base/281445

Log:
  Start enabling the available GPIO pins on the Carambola 2.
  
  The carambola2 exposes all the gpio pins, but some are reserved for
  core functions (eg usb, ethernet, etc.) Others are configured by default
  to be available as normal GPIO pins to do interesting things with.
  
  GPIO 18-23 is the I2S, SLIC and SPDIF device pins, but none of those
  are currently used.  So, just allow those to show up.
  
  Tested:
  
  * AR9344, Carambola 2
  * (.. bitbang SPI to an Adafruit LCD via libgpio, because FreeBSD could
do with more shiny output devices that aren't network interfaces.)
  
  TODO:
  
  There are some other pins aren't currently included here, but should be.
  The LED pins are for the internal switch inside the AR9344.
  
  * GPIO 0+1 are LED0 + LED1, but they're tied to high for bootstrapping.
  * GPIO 13-17 are LED2..7, but they're tied (H, L, L, L, H) for 
bootstrapping.
  * GPIO 11 and 12 are UART RTS/CTS or I2S; but GPIO 12 is tied L for bootstrap.

Modified:
  head/sys/mips/conf/CARAMBOLA2.hints

Modified: head/sys/mips/conf/CARAMBOLA2.hints
==
--- head/sys/mips/conf/CARAMBOLA2.hints Sat Apr 11 22:57:13 2015
(r281444)
+++ head/sys/mips/conf/CARAMBOLA2.hints Sun Apr 12 00:02:32 2015
(r281445)
@@ -98,19 +98,4 @@ hint.gpio.0.function_set=0x
 hint.gpio.0.function_clear=0x
 
 # These are the GPIO LEDs and buttons which can be software controlled.
-#hint.gpio.0.pinmask=0x001c02ae
-hint.gpio.0.pinmask=0x1803
-
-# gpio0 - WLAN LED
-# gpio1 - USB LED
-# gpio11 - Jumpstart button
-# gpio12 - Reset button
-
-# LEDs are configured separately and driven by the LED device
-hint.gpioled.0.at=gpiobus0
-hint.gpioled.0.name=wlan
-hint.gpioled.0.pins=0x0001
-
-hint.gpioled.1.at=gpiobus0
-hint.gpioled.1.name=usb
-hint.gpioled.1.pins=0x0002
+hint.gpio.0.pinmask=0x00fc1803
___
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: r281444 - head/sys/vm

2015-04-11 Thread Alan Cox
Author: alc
Date: Sat Apr 11 22:57:13 2015
New Revision: 281444
URL: https://svnweb.freebsd.org/changeset/base/281444

Log:
  Correct an off-by-one error in vm_reserv_reclaim_contig() that results in
  an infinite loop.
  
  Submitted by: Svatopluk Kraus
  MFC after:1 week

Modified:
  head/sys/vm/vm_reserv.c

Modified: head/sys/vm/vm_reserv.c
==
--- head/sys/vm/vm_reserv.c Sat Apr 11 20:44:21 2015(r281443)
+++ head/sys/vm/vm_reserv.c Sat Apr 11 22:57:13 2015(r281444)
@@ -983,8 +983,18 @@ vm_reserv_reclaim_contig(u_long npages, 
break;
} else if ((pa  (alignment - 1)) != 0 ||
((pa ^ (pa + size - 1))  ~(boundary - 1)) != 0) {
-   /* Continue with this reservation. */
-   hi = lo;
+   /*
+* The current page doesn't meet the alignment
+* and/or boundary requirements.  Continue
+* searching this reservation until the rest
+* of its free pages are either excluded or
+* exhausted.
+*/
+   hi = lo + 1;
+   if (hi = NBPOPMAP) {
+   hi = 0;
+   i++;
+   }
continue;
}
/* Find the next used page. */
___
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