Re: CVS commit: src/sbin/gpt

2014-10-03 Thread S.P.Zeidler
Hi Jörg,

Thus wrote Joerg Sonnenberger (jo...@netbsd.org):

 Module Name:  src
 Committed By: joerg
 Date: Thu Oct  2 19:15:21 UTC 2014
 
 Modified Files:
   src/sbin/gpt: biosboot.c gpt.c
 
 Log Message:
 Fix tools build on !NetBSD.

It would be nice if it still built on NetBSD, too.

/home/spz/cvs/src/tools/gpt/../../sbin/gpt/biosboot.c: In function 'cmd_biosboot
':
/home/spz/cvs/src/tools/gpt/../../sbin/gpt/biosboot.c:274:22: error: storage siz
e of 'dkw' isn't known
  struct dkwedge_info dkw;

regards,
spz


Re: CVS commit: src/sys/arch/xen/xen

2014-10-03 Thread Maxime Villard

Le 27/09/2014 17:51, Christos Zoulas a écrit :

On Sep 27,  8:36am, m...@m00nbsd.net (Maxime Villard) wrote:
-- Subject: Re: CVS commit: src/sys/arch/xen/xen

| One however returns an error without freeing:
|
|   if (newstart != start) {
|   printf(uvm_map didn't give us back our vm space\n);
|   return EINVAL;
|   }
|
| I think this one is the real bug; isn't it?

So the fix should be this, right?



Yes perhaps. But you should ask someone else...


christos

Index: privcmd.c
===
RCS file: /cvsroot/src/sys/arch/xen/xen/privcmd.c,v
retrieving revision 1.47
diff -u -u -r1.47 privcmd.c
--- privcmd.c   21 Sep 2014 16:56:44 -  1.47
+++ privcmd.c   27 Sep 2014 15:50:56 -
@@ -576,12 +576,13 @@
if (error) {
if (obj)
obj-uobj.pgops-pgo_detach(obj-uobj);
-   kmem_free(maddr, sizeof(paddr_t) * npages);
-   kmem_free(obj, sizeof(*obj));
return error;
}
if (newstart != start) {
printf(uvm_map didn't give us back our vm space\n);
+   uvm_unmap1(map, newstart, newstart + size, 0);
+   if (obj)
+   obj-uobj.pgops-pgo_detach(obj-uobj);
return EINVAL;
}
return 0;






CVS commit: src/sys/net

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 06:46:02 UTC 2014

Modified Files:
src/sys/net: if_tap.c

Log Message:
Remove unneeded #include


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/net/if_tap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_tap.c
diff -u src/sys/net/if_tap.c:1.78 src/sys/net/if_tap.c:1.79
--- src/sys/net/if_tap.c:1.78	Fri Sep  5 09:22:22 2014
+++ src/sys/net/if_tap.c	Fri Oct  3 06:46:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tap.c,v 1.78 2014/09/05 09:22:22 matt Exp $	*/
+/*	$NetBSD: if_tap.c,v 1.79 2014/10/03 06:46:02 skrll Exp $	*/
 
 /*
  *  Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.78 2014/09/05 09:22:22 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1.79 2014/10/03 06:46:02 skrll Exp $);
 
 #if defined(_KERNEL_OPT)
 
@@ -50,7 +50,6 @@ __KERNEL_RCSID(0, $NetBSD: if_tap.c,v 1
 #include sys/device.h
 #include sys/file.h
 #include sys/filedesc.h
-#include sys/ksyms.h
 #include sys/poll.h
 #include sys/proc.h
 #include sys/select.h



CVS commit: src/sys/dev/usb

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 11:05:36 UTC 2014

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Convert to USB_HIST.

From Takahiro HAYASHI with tweaks from me.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.26 src/sys/dev/usb/xhci.c:1.27
--- src/sys/dev/usb/xhci.c:1.26	Tue Aug 12 13:50:42 2014
+++ src/sys/dev/usb/xhci.c	Fri Oct  3 11:05:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.27 2014/10/03 11:05:36 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,9 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.27 2014/10/03 11:05:36 skrll Exp $);
+
+#include opt_usb.h
 
 #include sys/param.h
 #include sys/systm.h
@@ -42,12 +44,14 @@ __KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.2
 #include sys/condvar.h
 #include sys/bus.h
 #include sys/cpu.h
+#include sys/sysctl.h
 
 #include machine/endian.h
 
 #include dev/usb/usb.h
 #include dev/usb/usbdi.h
 #include dev/usb/usbdivar.h
+#include dev/usb/usbhist.h
 #include dev/usb/usb_mem.h
 #include dev/usb/usb_quirks.h
 
@@ -55,14 +59,46 @@ __KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.2
 #include dev/usb/xhcivar.h
 #include dev/usb/usbroothub_subr.h
 
-#ifdef XHCI_DEBUG
-int xhcidebug = 0;
-#define DPRINTF(x)	do { if (xhcidebug) printf x; } while(0)
-#define DPRINTFN(n,x)	do { if (xhcidebug(n)) printf x; } while (0)
+
+#ifdef USB_DEBUG
+#ifndef XHCI_DEBUG
+#define xhcidebug 0
 #else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
-#endif
+static int xhcidebug = 0;
+
+SYSCTL_SETUP(sysctl_hw_xhci_setup, sysctl hw.xhci setup)
+{
+	int err;
+	const struct sysctlnode *rnode;
+	const struct sysctlnode *cnode;
+
+	err = sysctl_createv(clog, 0, NULL, rnode,
+	CTLFLAG_PERMANENT, CTLTYPE_NODE, xhci,
+	SYSCTL_DESCR(xhci global controls),
+	NULL, 0, NULL, 0, CTL_HW, CTL_CREATE, CTL_EOL);
+
+	if (err)
+		goto fail;
+
+	/* control debugging printfs */
+	err = sysctl_createv(clog, 0, rnode, cnode,
+	CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT,
+	debug, SYSCTL_DESCR(Enable debugging output),
+	NULL, 0, xhcidebug, sizeof(xhcidebug), CTL_CREATE, CTL_EOL);
+	if (err)
+		goto fail;
+
+	return;
+fail:
+	aprint_error(%s: sysctl_createv failed (err = %d)\n, __func__, err);
+}
+
+#endif /* XHCI_DEBUG */
+#endif /* USB_DEBUG */
+
+#define DPRINTFN(N,FMT,A,B,C,D) USBHIST_LOGN(xhcidebug,N,FMT,A,B,C,D)
+#define XHCIHIST_FUNC() USBHIST_FUNC()
+#define XHCIHIST_CALLED(name) USBHIST_CALLED(xhcidebug)
 
 #define XHCI_DCI_SLOT 0
 #define XHCI_DCI_EP_CONTROL 1
@@ -577,7 +613,7 @@ xhci_init(struct xhci_softc *sc)
 	uint16_t hciversion;
 	uint8_t caplength;
 
-	DPRINTF((%s\n, __func__));
+	XHCIHIST_FUNC(); XHCIHIST_CALLED();
 
 	/* XXX Low/Full/High speeds for now */
 	sc-sc_bus.usbrev = USBREV_2_0;
@@ -855,6 +891,8 @@ xhci_intr(void *v)
 	struct xhci_softc * const sc = v;
 	int ret = 0;
 
+	XHCIHIST_FUNC(); XHCIHIST_CALLED();
+
 	if (sc == NULL)
 		return 0;
 
@@ -863,12 +901,10 @@ xhci_intr(void *v)
 	if (sc-sc_dying || !device_has_power(sc-sc_dev))
 		goto done;
 
-	DPRINTF((%s: %s\n, __func__, device_xname(sc-sc_dev)));
-
 	/* If we get an interrupt while polling, then just ignore it. */
 	if (sc-sc_bus.use_polling) {
 #ifdef DIAGNOSTIC
-		DPRINTFN(16, (xhci_intr: ignored interrupt while polling\n));
+		DPRINTFN(16, ignored interrupt while polling, 0, 0, 0, 0);
 #endif
 		goto done;
 	}
@@ -885,8 +921,10 @@ xhci_intr1(struct xhci_softc * const sc)
 	uint32_t usbsts;
 	uint32_t iman;
 
+	XHCIHIST_FUNC(); XHCIHIST_CALLED();
+
 	usbsts = xhci_op_read_4(sc, XHCI_USBSTS);
-	//device_printf(sc-sc_dev, %s USBSTS %08x\n, __func__, usbsts);
+	DPRINTFN(16, USBSTS %08x, usbsts, 0, 0, 0);
 #if 0
 	if ((usbsts  (XHCI_STS_EINT|XHCI_STS_PCD)) == 0) {
 		return 0;
@@ -895,18 +933,18 @@ xhci_intr1(struct xhci_softc * const sc)
 	xhci_op_write_4(sc, XHCI_USBSTS,
 	usbsts  (2|XHCI_STS_EINT|XHCI_STS_PCD)); /* XXX */
 	usbsts = xhci_op_read_4(sc, XHCI_USBSTS);
-	//device_printf(sc-sc_dev, %s USBSTS %08x\n, __func__, usbsts);
+	DPRINTFN(16, USBSTS %08x, usbsts, 0, 0, 0);
 
 	iman = xhci_rt_read_4(sc, XHCI_IMAN(0));
-	//device_printf(sc-sc_dev, %s IMAN0 %08x\n, __func__, iman);
+	DPRINTFN(16, IMAN0 %08x, iman, 0, 0, 0);
 	if ((iman  XHCI_IMAN_INTR_PEND) == 0) {
 		return 0;
 	}
 	xhci_rt_write_4(sc, XHCI_IMAN(0), iman);
 	iman = xhci_rt_read_4(sc, XHCI_IMAN(0));
-	//device_printf(sc-sc_dev, %s IMAN0 %08x\n, __func__, iman);
+	DPRINTFN(16, IMAN0 %08x, iman, 0, 0, 0);
 	usbsts = xhci_op_read_4(sc, XHCI_USBSTS);
-	//device_printf(sc-sc_dev, %s USBSTS %08x\n, __func__, usbsts);
+	DPRINTFN(16, USBSTS %08x, usbsts, 0, 0, 0);
 
 	sc-sc_bus.no_intrs++;
 

CVS commit: src/sys/arch/arm/allwinner

2014-10-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct  3 11:21:56 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_reg.h

Log Message:
add some more bit definitions


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/allwinner/awin_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.25 src/sys/arch/arm/allwinner/awin_reg.h:1.26
--- src/sys/arch/arm/allwinner/awin_reg.h:1.25	Sat Sep 13 17:48:00 2014
+++ src/sys/arch/arm/allwinner/awin_reg.h	Fri Oct  3 11:21:56 2014
@@ -867,6 +867,10 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_PLL2_CFG_FACTOR_N		__BITS(14,8)
 #define AWIN_PLL2_CFG_PREVDIV		__BITS(4,0)
 
+#define AWIN_PLL3_MODE_SEL		__BIT(15)
+#define AWIN_PLL3_FRAC_SET		__BIT(14)
+#define AWIN_PLL3_FACTOR_M		__BITS(6,0)
+
 #define AWIN_PLL5_CFG_DDR_CLK_EN	__BIT(29)
 #define AWIN_PLL5_CFG_LDO_EN		__BIT(7)
 #define AWIN_PLL5_CFG_FACTOR_M1		__BITS(3,2)
@@ -1012,6 +1016,14 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_GMAC_CLK_TCS_EXT_125	1
 #define AWIN_GMAC_CLK_TCS_INT_RGMII	2
 
+#define AWIN_LCDx_CH0_CLK_LCDx_RST	__BIT(30)
+#define AWIN_LCDx_CHx_CLK_SRC_SEL	__BITS(25,24)
+#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL3	0
+#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL7	1
+#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL3_2X 2
+#define AWIN_LCDx_CHx_CLK_SRC_SEL_PLL6_2 3
+#define AWIN_LCDx_CH1_CLK_DIV_RATIO_M	__BITS(3,0)
+
 #define AWIN_HDMI_CLK_SRC_SEL		__BITS(25,24)
 #define AWIN_HDMI_CLK_SRC_SEL_PLL3	0
 #define AWIN_HDMI_CLK_SRC_SEL_PLL7	1
@@ -1019,6 +1031,9 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_HDMI_CLK_SRC_SEL_PLL7_2X	3
 #define AWIN_HDMI_CLK_DIV_RATIO_M	__BITS(3,0)
 
+#define AWIN_SD_CLK_PHASE_CTR		__BITS(22,20)
+#define AWIN_SD_CLK_OUTPUT_PHASE_CTR	__BITS(10,8)
+
 #define AWIN_CLK_OUT_ENABLE		__BIT(31)
 #define AWIN_CLK_OUT_SRC_SEL		__BITS(25,24)
 #define AWIN_CLK_OUT_SRC_SEL_32K	0
@@ -1578,6 +1593,7 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_HDMI_VID_TIMING_3_HSPW	__BITS(11,0)
 
 #define AWIN_HDMI_VID_TIMING_4_TX_CLOCK	__BITS(25,16)
+#define AWIN_HDMI_VID_TIMING_4_TX_CLOCK_NORMAL	0x3e0
 #define AWIN_HDMI_VID_TIMING_4_VSYNC_ACTIVE_SEL __BIT(1)
 #define AWIN_HDMI_VID_TIMING_4_HSYNC_ACTIVE_SEL __BIT(0)
 



CVS commit: src/sys/arch/arm/allwinner

2014-10-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct  3 11:23:29 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_mmc.c

Log Message:
Use SDn_CLK_REG instead of MMC_CLKCR to setup bus clock; gives a nearly 2x 
boost in performance in HS mode. Also, make sure to setup PLL6 before probing 
clocks.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/allwinner/awin_mmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/allwinner/awin_mmc.c
diff -u src/sys/arch/arm/allwinner/awin_mmc.c:1.10 src/sys/arch/arm/allwinner/awin_mmc.c:1.11
--- src/sys/arch/arm/allwinner/awin_mmc.c:1.10	Thu Sep 11 08:20:52 2014
+++ src/sys/arch/arm/allwinner/awin_mmc.c	Fri Oct  3 11:23:29 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.10 2014/09/11 08:20:52 matt Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.11 2014/10/03 11:23:29 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.10 2014/09/11 08:20:52 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_mmc.c,v 1.11 2014/10/03 11:23:29 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -87,6 +87,7 @@ struct awin_mmc_softc {
 	device_t sc_dev;
 	bus_space_tag_t sc_bst;
 	bus_space_handle_t sc_bsh;
+	bus_space_handle_t sc_clk_bsh;
 	bus_dma_tag_t sc_dmat;
 
 	bool sc_use_dma;
@@ -237,6 +238,8 @@ awin_mmc_attach(device_t parent, device_
 	cv_init(sc-sc_idst_cv, awinmmcdma);
 	bus_space_subregion(sc-sc_bst, aio-aio_core_bsh,
 	loc-loc_offset, loc-loc_size, sc-sc_bsh);
+	bus_space_subregion(sc-sc_bst, aio-aio_ccm_bsh,
+	AWIN_SD0_CLK_REG + (loc-loc_port * 8), 0, sc-sc_clk_bsh);
 
 	sc-sc_use_dma = true;
 	prop_dictionary_get_bool(cfg, dma, sc-sc_use_dma);
@@ -244,6 +247,7 @@ awin_mmc_attach(device_t parent, device_
 	aprint_naive(\n);
 	aprint_normal(: SD3.0 (%s)\n, sc-sc_use_dma ? DMA : PIO);
 
+	awin_pll6_enable();
 	awin_mmc_probe_clocks(sc, aio);
 
 	if (prop_dictionary_get_cstring_nocopy(cfg, detect-gpio, pin_name)) {
@@ -494,13 +498,26 @@ static int
 awin_mmc_bus_clock(sdmmc_chipset_handle_t sch, int freq)
 {
 	struct awin_mmc_softc *sc = sch;
-	unsigned int div, freq_hz;
-	uint32_t clkcr;
+	uint32_t odly, sdly, clkcr;
 
 #ifdef AWIN_MMC_DEBUG
 	aprint_normal_dev(sc-sc_dev, freq = %d\n, freq);
 #endif
 
+	if (freq = 400) {
+		odly = 0;
+		sdly = 7;
+	} else if (freq = 25000) {
+		odly = 0;
+		sdly = 5;
+	} else if (freq = 5) {
+		odly = 3;
+		sdly = 5;
+	} else {
+		/* UHS speeds not implemented yet */
+		return 1;
+	}
+
 	clkcr = MMC_READ(sc, AWIN_MMC_CLKCR);
 	clkcr = ~AWIN_MMC_CLKCR_CARDCLKON;
 	MMC_WRITE(sc, AWIN_MMC_CLKCR, clkcr);
@@ -508,15 +525,19 @@ awin_mmc_bus_clock(sdmmc_chipset_handle_
 		return 1;
 
 	if (freq) {
-		freq_hz = freq * 1000;
-		div = (sc-sc_mod_clk + (freq_hz  1)) / freq_hz / 2;
 
 		clkcr = ~AWIN_MMC_CLKCR_DIV;
-		clkcr |= div;
 		MMC_WRITE(sc, AWIN_MMC_CLKCR, clkcr);
 		if (awin_mmc_update_clock(sc) != 0)
 			return 1;
 
+		uint32_t clk = bus_space_read_4(sc-sc_bst, sc-sc_clk_bsh, 0);
+		clk = ~AWIN_SD_CLK_OUTPUT_PHASE_CTR;
+		clk |= __SHIFTIN(odly, AWIN_SD_CLK_OUTPUT_PHASE_CTR);
+		clk = ~AWIN_SD_CLK_PHASE_CTR;
+		clk |= __SHIFTIN(sdly, AWIN_SD_CLK_PHASE_CTR);
+		bus_space_write_4(sc-sc_bst, sc-sc_clk_bsh, 0, clk);
+
 		clkcr |= AWIN_MMC_CLKCR_CARDCLKON;
 		MMC_WRITE(sc, AWIN_MMC_CLKCR, clkcr);
 		if (awin_mmc_update_clock(sc) != 0)



CVS commit: src/sys/arch/evbarm

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 11:40:55 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: RPI files.rpi
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Introduce RPI_HWCURSOR and default to off. The existing code causes
problems with vchiq at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/RPI
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/files.rpi
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/evbarm/rpi/rpi_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/conf/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.55 src/sys/arch/evbarm/conf/RPI:1.56
--- src/sys/arch/evbarm/conf/RPI:1.55	Thu Sep 25 16:05:44 2014
+++ src/sys/arch/evbarm/conf/RPI	Fri Oct  3 11:40:54 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.55 2014/09/25 16:05:44 jakllsch Exp $
+#	$NetBSD: RPI,v 1.56 2014/10/03 11:40:54 skrll Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -197,6 +197,7 @@ plcom0		at obio?
 genfb0		at obio?
 wsdisplay*	at genfb?
 options		VCONS_DRAW_INTR
+#options 	RPI_HWCURSOR
 
 # System timer
 bcmtmr0		at obio?

Index: src/sys/arch/evbarm/conf/files.rpi
diff -u src/sys/arch/evbarm/conf/files.rpi:1.6 src/sys/arch/evbarm/conf/files.rpi:1.7
--- src/sys/arch/evbarm/conf/files.rpi:1.6	Tue Sep 30 18:13:29 2014
+++ src/sys/arch/evbarm/conf/files.rpi	Fri Oct  3 11:40:54 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.rpi,v 1.6 2014/09/30 18:13:29 macallan Exp $
+#	$NetBSD: files.rpi,v 1.7 2014/10/03 11:40:54 skrll Exp $
 #
 # Raspberry Pi
 #
@@ -23,3 +23,4 @@ file	arch/evbarm/rpi/rpi_vcmbox.c		vcmbo
 
 # Maximum command-line length
 defparam opt_vcprop.hVCPROP_MAXCMDLINE
+defflag opt_rpi.hRPI_HWCURSOR

Index: src/sys/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.52 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.53
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.52	Wed Oct  1 13:31:27 2014
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Fri Oct  3 11:40:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.52 2014/10/01 13:31:27 mlelstv Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.53 2014/10/03 11:40:55 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,12 +30,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.52 2014/10/01 13:31:27 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.53 2014/10/03 11:40:55 skrll Exp $);
 
 #include opt_evbarm_boardtype.h
 #include opt_ddb.h
 #include opt_kgdb.h
 #include opt_arm_debug.h
+#include opt_rpi.h
 #include opt_vcprop.h
 
 #include sdhc.h
@@ -380,11 +381,13 @@ static struct __aligned(16) {
 extern void bcmgenfb_set_console_dev(device_t dev);
 void bcmgenfb_set_ioctl(int(*)(void *, void *, u_long, void *, int, struct lwp *));
 extern void bcmgenfb_ddb_trap_callback(int where);
-static int	rpi_ioctl(void *, void *, u_long, void *, int, lwp_t *);
+static int rpi_ioctl(void *, void *, u_long, void *, int, lwp_t *);
 
+static int rpi_video_on = WSDISPLAYIO_VIDEO_ON;
+
+#if defined(RPI_HWCURSOR)
 #define CURSOR_BITMAP_SIZE	(64 * 8)
 #define CURSOR_ARGB_SIZE	(64 * 64 * 4)
-static int rpi_video_on = WSDISPLAYIO_VIDEO_ON;
 static uint32_t hcursor = 0;
 static bus_addr_t pcursor = 0;
 static uint32_t *cmem = NULL;
@@ -392,6 +395,7 @@ static int cursor_x = 0, cursor_y = 0, h
 static uint32_t cursor_cmap[4];
 static uint8_t cursor_mask[8 * 64], cursor_bitmap[8 * 64];
 #endif
+#endif
 
 
 static void
@@ -741,8 +745,6 @@ rpi_fb_get_edid_mode(uint32_t *pwidth, u
 static bool
 rpi_fb_init(prop_dictionary_t dict, void *aux)
 {
-	struct amba_attach_args *aaa = aux;
-	bus_space_handle_t hc;
 	uint32_t width = 0, height = 0;
 	uint32_t res;
 	char *ptr;
@@ -828,6 +830,10 @@ rpi_fb_init(prop_dictionary_t dict, void
 		prop_dictionary_set_uint32(dict, wsdisplay_type, integer);
 	}
 
+#if defined(RPI_HWCURSOR)
+	struct amba_attach_args *aaa = aux;
+	bus_space_handle_t hc;
+
 	hcursor = rpi_alloc_mem(CURSOR_ARGB_SIZE, PAGE_SIZE,
 	MEM_FLAG_L1_NONALLOCATING | MEM_FLAG_HINT_PERMALOCK);
 	pcursor = rpi_lock_mem(hcursor);
@@ -853,15 +859,19 @@ rpi_fb_init(prop_dictionary_t dict, void
 		}
 		cpu_dcache_wb_range((vaddr_t)cmem, CURSOR_ARGB_SIZE);
 		rpi_fb_initcursor(pcursor, 0, 0);
-	}	
 #ifdef RPI_IOCTL_DEBUG
-	rpi_fb_movecursor(600, 400, 1);
+		rpi_fb_movecursor(600, 400, 1);
 #else
-	rpi_fb_movecursor(cursor_x, cursor_y, cursor_on);
+		rpi_fb_movecursor(cursor_x, cursor_y, cursor_on);
 #endif
+	}	
+#endif
+
 	return true;
 }
 
+
+#if defined(RPI_HWCURSOR)
 static int
 rpi_fb_do_cursor(struct wsdisplay_cursor *cur)
 {
@@ -928,6 +938,7 @@ rpi_fb_do_cursor(struct wsdisplay_cursor
 	}
 	return 0;
 }
+#endif
 
 static int
 rpi_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, lwp_t *l)
@@ -941,13 +952,16 @@ rpi_ioctl(void *v, void *vs, u_long cmd,
 return 0;
 			rpi_video_on = d;
 			rpi_fb_set_video(d);
+#if 

CVS commit: src/external/gpl3/gcc/lib/libgcc/libgcc_s

2014-10-03 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Oct  3 12:41:41 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile

Log Message:
Add space before ] in if [ ... ] to fix usage error
and test for existence of the correct file.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.10 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.11
--- src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile:1.10	Sun Jun  1 19:51:01 2014
+++ src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile	Fri Oct  3 12:41:41 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2014/06/01 19:51:01 mrg Exp $
+#	$NetBSD: Makefile,v 1.11 2014/10/03 12:41:41 apb Exp $
 
 USE_SHLIBDIR=	yes
 REQUIRETOOLS=	yes
@@ -59,7 +59,7 @@ libgcc.map:	${LIBGCC_S_OBJS} ${G_SHLIB_M
 		${NM} ${G_SHLIB_NM_FLAGS} ${LIBGCC_S_OBJS}; \
 		echo %%; \
 		for f in ${G_SHLIB_MAPFILES}; do \
-			if [ -f ${.OBJDIR}/$${f}]; then \
+			if [ -f ${.OBJDIR}/$${f} ]; then \
 cat ${.OBJDIR}/$${f}; \
 			else \
 cat $${f}; \



CVS commit: src/sys/kern

2014-10-03 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct  3 14:45:38 UTC 2014

Modified Files:
src/sys/kern: vfs_vnode.c

Log Message:
When creating a vnode with vcache_get() mark the vnode VI_CHANGING until
it is fully initialised.  It may be on the specnode list before it is
fully initialised and revoking it then would panic.

Should prevent the panic from PR kern/49171 (panic when closing a pty).


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.38 src/sys/kern/vfs_vnode.c:1.39
--- src/sys/kern/vfs_vnode.c:1.38	Fri Sep  5 05:57:21 2014
+++ src/sys/kern/vfs_vnode.c	Fri Oct  3 14:45:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.38 2014/09/05 05:57:21 matt Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.39 2014/10/03 14:45:38 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -116,7 +116,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.38 2014/09/05 05:57:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_vnode.c,v 1.39 2014/10/03 14:45:38 hannken Exp $);
 
 #define _VFS_VNODE_PRIVATE
 
@@ -1293,6 +1293,7 @@ again:
 	}
 
 	/* Load the fs node.  Exclusive as new_node-vn_vnode is NULL. */
+	vp-v_iflag |= VI_CHANGING;
 	error = VFS_LOADVNODE(mp, vp, key, key_len, new_key);
 	if (error) {
 		mutex_enter(vcache.lock);
@@ -1320,6 +1321,10 @@ again:
 	new_node-vn_key.vk_key = new_key;
 	new_node-vn_vnode = vp;
 	mutex_exit(vcache.lock);
+	mutex_enter(vp-v_interlock);
+	vp-v_iflag = ~VI_CHANGING;
+	cv_broadcast(vp-v_cv);
+	mutex_exit(vp-v_interlock);
 	*vpp = vp;
 	return 0;
 }



CVS commit: [netbsd-7] src/sys/dev/wsfb

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 16:22:58 UTC 2014

Modified Files:
src/sys/dev/wsfb [netbsd-7]: genfb.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #125):
sys/dev/wsfb/genfb.c: revision 1.56
handle WSDISPLAYIO_GET_EDID and WSDISPLAYIO_GET_FBINFO only if the bus
frontend doesn't ( as in, returns EPASSTHROUGH or doesn't register a
handler )
Now flags passed from things like bcm2835_genfb.c are actually seen by
xf86-video-wsfb again and automatically disabling shadowfb works again,
which results in a major speedup on this kind of hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.2.1 src/sys/dev/wsfb/genfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.55 src/sys/dev/wsfb/genfb.c:1.55.2.1
--- src/sys/dev/wsfb/genfb.c:1.55	Thu Jul 24 21:35:13 2014
+++ src/sys/dev/wsfb/genfb.c	Fri Oct  3 16:22:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.55 2014/07/24 21:35:13 riastradh Exp $ */
+/*	$NetBSD: genfb.c,v 1.55.2.1 2014/10/03 16:22:58 martin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.55 2014/07/24 21:35:13 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfb.c,v 1.55.2.1 2014/10/03 16:22:58 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -354,7 +354,7 @@ genfb_ioctl(void *v, void *vs, u_long cm
 	struct wsdisplay_fbinfo *wdf;
 	struct vcons_screen *ms = vd-active;
 	struct wsdisplay_param *param;
-	int new_mode, error, val;
+	int new_mode, error, val, ret;
 
 	switch (cmd) {
 		case WSDISPLAYIO_GINFO:
@@ -459,9 +459,22 @@ genfb_ioctl(void *v, void *vs, u_long cm
 return sc-sc_backlight-gpc_set_parameter(
 sc-sc_backlight-gpc_cookie, val);
 			}
-			return EPASSTHROUGH;
-		
+			return EPASSTHROUGH;		
+	}
+	ret = EPASSTHROUGH;
+	if (sc-sc_ops.genfb_ioctl)
+		ret = sc-sc_ops.genfb_ioctl(sc, vs, cmd, data, flag, l);
+	if (ret != EPASSTHROUGH)
+		return ret;
+	/*
+	 * XXX
+	 * handle these only if there either is no ioctl() handler or it didn't
+	 * know how to deal with them. This allows bus frontends to override
+	 * them but still provides fallback implementations
+	 */
+	switch (cmd) {
 		case WSDISPLAYIO_GET_EDID: {
+			
 			struct wsdisplayio_edid_info *d = data;
 			return wsdisplayio_get_edid(sc-sc_dev, d);
 		}
@@ -470,11 +483,6 @@ genfb_ioctl(void *v, void *vs, u_long cm
 			struct wsdisplayio_fbinfo *fbi = data;
 			return wsdisplayio_get_fbinfo(ms-scr_ri, fbi);
 		}
-		
-		default:
-			if (sc-sc_ops.genfb_ioctl)
-return sc-sc_ops.genfb_ioctl(sc, vs, cmd,
-data, flag, l);
 	}
 	return EPASSTHROUGH;
 }



CVS commit: [netbsd-7] src/doc

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 16:42:46 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #125


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.41 src/doc/CHANGES-7.0:1.1.2.42
--- src/doc/CHANGES-7.0:1.1.2.41	Thu Oct  2 14:43:59 2014
+++ src/doc/CHANGES-7.0	Fri Oct  3 16:42:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.41 2014/10/02 14:43:59 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.42 2014/10/03 16:42:46 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -1012,3 +1012,13 @@ sys/dev/sdmmc/sdhc.c1.49
 
 	Correct clk div calculation for SD 3.0 controllers.
 	[jmcneill, ticket #124]
+
+sys/dev/wsfb/genfb.c1.56
+
+	Handle WSDISPLAYIO_GET_EDID and WSDISPLAYIO_GET_FBINFO only if the bus
+	frontend doesn't (as in, returns EPASSTHROUGH or doesn't register a
+	handler).
+	Now flags passed from things like bcm2835_genfb.c are actually seen by
+	xf86-video-wsfb again and automatically disabling shadowfb works again,
+	which results in a major speedup on this kind of hardware.
+	[skrll, ticket #125]



CVS commit: src/sys/arch/evbarm/rpi

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 17:57:48 UTC 2014

Modified Files:
src/sys/arch/evbarm/rpi: vcprop_subr.c

Log Message:
Better error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/vcprop_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/rpi/vcprop_subr.c
diff -u src/sys/arch/evbarm/rpi/vcprop_subr.c:1.1 src/sys/arch/evbarm/rpi/vcprop_subr.c:1.2
--- src/sys/arch/evbarm/rpi/vcprop_subr.c:1.1	Sun Sep 28 14:38:29 2014
+++ src/sys/arch/evbarm/rpi/vcprop_subr.c	Fri Oct  3 17:57:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vcprop_subr.c,v 1.1 2014/09/28 14:38:29 macallan Exp $	*/
+/*	$NetBSD: vcprop_subr.c,v 1.2 2014/10/03 17:57:48 skrll Exp $	*/
 
 /*
  * Copyright (c) 2014 Michael Lorenz
@@ -90,7 +90,15 @@ rpi_fb_set_video(int b)
 	vb_setblank.vbt_blank.state, error, res,
 	vb_setblank.vbt_blank.tag.vpt_rcode);
 #endif
-	return (error == 0);
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_setblank.vb_hdr) ||
+	!vcprop_tag_success_p(vb_setblank.vbt_blank.tag)) {
+		return EIO;
+	}
+
+	return 0;
 }
 
 uint32_t
@@ -131,9 +139,16 @@ rpi_alloc_mem(uint32_t size, uint32_t al
 	vb_allocmem.vbt_am.size, error, res,
 	vb_allocmem.vbt_am.tag.vpt_rcode);
 #endif
-	if (error == 0)
-		return vb_allocmem.vbt_am.size;
-	return 0;
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_allocmem.vb_hdr) ||
+	!vcprop_tag_success_p(vb_allocmem.vbt_am.tag)) {
+		return EIO;
+	}
+
+	/* Return the handle from the VC */
+	return vb_allocmem.vbt_am.size;
 }
 
 bus_addr_t
@@ -172,9 +187,15 @@ rpi_lock_mem(uint32_t handle)
 	vb_lockmem.vbt_lm.handle, error, res,
 	vb_lockmem.vbt_lm.tag.vpt_rcode);
 #endif
-	if (error == 0)
-		return (vb_lockmem.vbt_lm.handle /* 0x3fff*/);
-	return 0;
+	if (error)
+		return 0;
+
+	if (!vcprop_buffer_success_p(vb_lockmem.vb_hdr) ||
+	!vcprop_tag_success_p(vb_lockmem.vbt_lm.tag)) {
+		return 0;
+	}
+
+	return vb_lockmem.vbt_lm.handle;
 }
 
 int
@@ -213,7 +234,15 @@ rpi_unlock_mem(uint32_t handle)
 	vb_unlockmem.vbt_lm.handle, error, res,
 	vb_unlockmem.vbt_lm.tag.vpt_rcode);
 #endif
-	return (error == 0);
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_unlockmem.vb_hdr) ||
+	!vcprop_tag_success_p(vb_unlockmem.vbt_lm.tag)) {
+		return EIO;
+	}
+
+	return 0;
 }
 
 int
@@ -252,7 +281,15 @@ rpi_release_mem(uint32_t handle)
 	vb_releasemem.vbt_lm.handle, error, res,
 	vb_releasemem.vbt_lm.tag.vpt_rcode);
 #endif
-	return (error == 0);
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_releasemem.vb_hdr) ||
+	!vcprop_tag_success_p(vb_releasemem.vbt_lm.tag)) {
+		return EIO;
+	}
+
+	return 0;
 }
 
 int
@@ -294,7 +331,15 @@ rpi_fb_movecursor(int x, int y, int on)
 	vb_cursorstate.vbt_cs.enable, error, res,
 	vb_cursorstate.vbt_cs.tag.vpt_rcode);
 #endif
-	return (error == 0);
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_cursorstate.vb_hdr) ||
+	!vcprop_tag_success_p(vb_cursorstate.vbt_cs.tag)) {
+		return EIO;
+	}
+
+	return 0;
 }
 
 int
@@ -339,5 +384,13 @@ rpi_fb_initcursor(bus_addr_t pixels, int
 	vb_cursorinfo.vbt_ci.width, error, res,
 	vb_cursorinfo.vbt_ci.tag.vpt_rcode);
 #endif
-	return (error == 0);
+	if (error)
+		return error;
+
+	if (!vcprop_buffer_success_p(vb_cursorinfo.vb_hdr) ||
+	!vcprop_tag_success_p(vb_cursorinfo.vbt_ci.tag)) {
+		return EIO;
+	}
+
+	return 0;
 }



CVS commit: [netbsd-7] src/sys

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 18:53:57 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-7]: bcm2835_dmac.c bcm2835_dmac.h
bcm2835_emmc.c bcm2835reg.h files.bcm2835
src/sys/arch/evbarm/conf [netbsd-7]: RPI
src/sys/arch/evbarm/rpi [netbsd-7]: rpi_machdep.c
src/sys/dev/sdmmc [netbsd-7]: sdhc.c sdhcvar.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/arch/arm/broadcom/bcm2835_dmac.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/broadcom/bcm2835_dmac.h
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/arm/broadcom/bcm2835_emmc.c
cvs rdiff -u -r1.10.12.1 -r1.10.12.2 src/sys/arch/arm/broadcom/bcm2835reg.h
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/arm/broadcom/files.bcm2835
cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/sys/arch/evbarm/conf/RPI
cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/arch/evbarm/rpi/rpi_machdep.c
cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.13 -r1.13.12.1 src/sys/dev/sdmmc/sdhcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/broadcom/bcm2835_dmac.c
diff -u src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.2.2.2 src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.2.2.3
--- src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.2.2.2	Thu Sep 11 14:20:11 2014
+++ src/sys/arch/arm/broadcom/bcm2835_dmac.c	Fri Oct  3 18:53:56 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_dmac.c,v 1.2.2.2 2014/09/11 14:20:11 martin Exp $ */
+/* $NetBSD: bcm2835_dmac.c,v 1.2.2.3 2014/10/03 18:53:56 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_dmac.c,v 1.2.2.2 2014/09/11 14:20:11 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_dmac.c,v 1.2.2.3 2014/10/03 18:53:56 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -45,7 +45,7 @@ __KERNEL_RCSID(0, $NetBSD: bcm2835_dmac
 
 #include arm/broadcom/bcm2835_dmac.h
 
-#define BCM_DMAC_CHANNELMASK	0x0ff2
+#define BCM_DMAC_CHANNELMASK	0x0fff
 
 struct bcm_dmac_softc;
 
@@ -109,6 +109,7 @@ static void
 bcm_dmac_attach(device_t parent, device_t self, void *aux)
 {
 	struct bcm_dmac_softc *sc = device_private(self);
+	const prop_dictionary_t cfg = device_properties(self);
 	struct bcm_dmac_channel *ch;
 	struct amba_attach_args *aaa = aux;
 	uint32_t val;
@@ -123,12 +124,12 @@ bcm_dmac_attach(device_t parent, device_
 		return;
 	}
 
-	sc-sc_channelmask = BCM_DMAC_CHANNELMASK;
-	sc-sc_nchannels = 31 - __builtin_clz(sc-sc_channelmask);
+	prop_dictionary_get_uint32(cfg, chanmask, sc-sc_channelmask);
+	sc-sc_channelmask = BCM_DMAC_CHANNELMASK;
 
 	mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_SCHED);
 
-	sc-sc_nchannels = 31 - __builtin_clz(BCM_DMAC_CHANNELMASK);
+	sc-sc_nchannels = 31 - __builtin_clz(sc-sc_channelmask);
 	sc-sc_channels = kmem_alloc(
 	sizeof(*sc-sc_channels) * sc-sc_nchannels, KM_SLEEP);
 	if (sc-sc_channels == NULL) {
@@ -143,6 +144,7 @@ bcm_dmac_attach(device_t parent, device_
 		ch-ch_index = index;
 		ch-ch_callback = NULL;
 		ch-ch_callbackarg = NULL;
+		ch-ch_ih = NULL;
 		if ((__BIT(index)  sc-sc_channelmask) == 0)
 			continue;
 
@@ -153,13 +155,6 @@ bcm_dmac_attach(device_t parent, device_
 		val = DMAC_READ(sc, DMAC_CS(index));
 		val 

CVS commit: [netbsd-7] src/doc

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 18:55:37 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #126


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.42 src/doc/CHANGES-7.0:1.1.2.43
--- src/doc/CHANGES-7.0:1.1.2.42	Fri Oct  3 16:42:46 2014
+++ src/doc/CHANGES-7.0	Fri Oct  3 18:55:37 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.42 2014/10/03 16:42:46 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.43 2014/10/03 18:55:37 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -1022,3 +1022,17 @@ sys/dev/wsfb/genfb.c1.56
 	xf86-video-wsfb again and automatically disabling shadowfb works again,
 	which results in a major speedup on this kind of hardware.
 	[skrll, ticket #125]
+
+sys/arch/arm/broadcom/bcm2835_dmac.c		1.3-1.9
+sys/arch/arm/broadcom/bcm2835_dmac.h		1.2-1.3
+sys/arch/arm/broadcom/bcm2835_emmc.c		1.10-1.15, 1.18
+sys/arch/arm/broadcom/bcm2835reg.h		1.12
+sys/arch/arm/broadcom/files.bcm2835		1.23
+sys/arch/evbarm/conf/RPI			1.52-1.54
+sys/arch/evbarm/rpi/rpi_machdep.c		1.47
+sys/dev/sdmmc/sdhc.c1.45-1.47
+sys/dev/sdmmc/sdhcvar.h1.14
+
+	Various RPI DMAC and sdhc improvements.
+	[skrll, ticket #126]
+



CVS commit: src/sbin/gpt

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct  3 20:30:06 UTC 2014

Modified Files:
src/sbin/gpt: biosboot.c create.c gpt_uuid.c gpt_uuid.h migrate.c

Log Message:
provide a copy of the kernel uuid generator (with portable API calls) for
tools.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/biosboot.c
cvs rdiff -u -r1.11 -r1.12 src/sbin/gpt/create.c
cvs rdiff -u -r1.6 -r1.7 src/sbin/gpt/gpt_uuid.c
cvs rdiff -u -r1.2 -r1.3 src/sbin/gpt/gpt_uuid.h
cvs rdiff -u -r1.20 -r1.21 src/sbin/gpt/migrate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/biosboot.c
diff -u src/sbin/gpt/biosboot.c:1.13 src/sbin/gpt/biosboot.c:1.14
--- src/sbin/gpt/biosboot.c:1.13	Thu Oct  2 15:15:21 2014
+++ src/sbin/gpt/biosboot.c	Fri Oct  3 16:30:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosboot.c,v 1.13 2014/10/02 19:15:21 joerg Exp $ */
+/*	$NetBSD: biosboot.c,v 1.14 2014/10/03 20:30:06 christos Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -37,13 +37,13 @@
 
 #include sys/cdefs.h
 #ifdef __RCSID
-__RCSID($NetBSD: biosboot.c,v 1.13 2014/10/02 19:15:21 joerg Exp $);
+__RCSID($NetBSD: biosboot.c,v 1.14 2014/10/03 20:30:06 christos Exp $);
 #endif
 
 #include sys/stat.h
 #include sys/types.h
 #include sys/ioctl.h
-#ifndef HAVE_NBTOOL_CONFIG_H
+#ifdef DIOCGWEDGEINFO
 #include sys/disk.h
 #endif
 #include sys/param.h

Index: src/sbin/gpt/create.c
diff -u src/sbin/gpt/create.c:1.11 src/sbin/gpt/create.c:1.12
--- src/sbin/gpt/create.c:1.11	Thu Oct  2 20:51:31 2014
+++ src/sbin/gpt/create.c	Fri Oct  3 16:30:06 2014
@@ -33,7 +33,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/create.c,v 1.11 2005/08/31 01:47:19 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: create.c,v 1.11 2014/10/03 00:51:31 jnemeth Exp $);
+__RCSID($NetBSD: create.c,v 1.12 2014/10/03 20:30:06 christos Exp $);
 #endif
 
 #include sys/types.h
@@ -174,7 +174,7 @@ create(int fd)
 	hdr-hdr_lba_alt = htole64(last);
 	hdr-hdr_lba_start = htole64(tbl-map_start + blocks);
 	hdr-hdr_lba_end = htole64(last - blocks - 1LL);
-	gpt_uuid_create_new(hdr-hdr_guid);
+	gpt_uuid_generate(hdr-hdr_guid);
 	hdr-hdr_lba_table = htole64(tbl-map_start);
 	hdr-hdr_entries = htole32((blocks * secsz) / sizeof(struct gpt_ent));
 	if (le32toh(hdr-hdr_entries)  parts)
@@ -183,7 +183,7 @@ create(int fd)
 
 	ent = tbl-map_data;
 	for (i = 0; i  le32toh(hdr-hdr_entries); i++) {
-		gpt_uuid_create_new(ent[i].ent_guid);
+		gpt_uuid_generate(ent[i].ent_guid);
 	}
 
 	hdr-hdr_crc_table = htole32(crc32(ent, le32toh(hdr-hdr_entries) *

Index: src/sbin/gpt/gpt_uuid.c
diff -u src/sbin/gpt/gpt_uuid.c:1.6 src/sbin/gpt/gpt_uuid.c:1.7
--- src/sbin/gpt/gpt_uuid.c:1.6	Thu Oct  2 20:51:31 2014
+++ src/sbin/gpt/gpt_uuid.c	Fri Oct  3 16:30:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gpt_uuid.c,v 1.6 2014/10/03 00:51:31 jnemeth Exp $	*/
+/*	$NetBSD: gpt_uuid.c,v 1.7 2014/10/03 20:30:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include sys/cdefs.h
 #ifdef __RCSID
-__RCSID($NetBSD: gpt_uuid.c,v 1.6 2014/10/03 00:51:31 jnemeth Exp $);
+__RCSID($NetBSD: gpt_uuid.c,v 1.7 2014/10/03 20:30:06 christos Exp $);
 #endif
 
 #include stdio.h
@@ -44,10 +44,6 @@ __RCSID($NetBSD: gpt_uuid.c,v 1.6 2014/
 #include sys/endian.h
 #endif
 
-#if !defined(HAVE_NBTOOL_CONFIG_H)
-#include sys/types.h
-#include sys/uuid.h
-#endif
 
 const gpt_uuid_t gpt_uuid_nil;
 
@@ -60,6 +56,12 @@ struct dce_uuid {
 	uint8_t		node[6];
 };
 
+struct kern_uuid {
+	uint64_t	ll;
+	uint16_t	seq;
+	uint8_t		node[6];
+};
+
 static const struct {
 	struct dce_uuid u;
 	const char *n;
@@ -237,12 +239,95 @@ gpt_uuid_create(gpt_type_t t, gpt_uuid_t
 }
 
 #if !defined(HAVE_NBTOOL_CONFIG_H)
-void
-gpt_uuid_create_new(gpt_uuid_t t)
+#include sys/types.h
+#include sys/uuid.h
+#else
+#include time.h
+/*
+ * Get the current time as a 5x bit count of 10-microsecond intervals
+ * since 00:00:00.00, October 15,1582. We apply a magic offset to convert
+ * the Unix time since 00:00:00.00, January 1, 1970 to the date of the
+ * Gregorian reform to the Christian calendar.
+ */
+static uint64_t
+uuid_time(void)
+{
+	struct timeval tv;
+	uint64_t xtime = 0x01B21DD213814000LL;
+
+	(void)gettimeofday(tv, NULL);
+	xtime += (uint64_t)tv.tv_sec * 1000LL;
+	xtime += (uint64_t)(tv.tv_usec / 10);
+	return (xtime  ((1LL  60) - 1LL));
+}
+
+/*
+ * No portable way to get ethernet, use hostid instead
+ */
+static void
+uuid_node(uint8_t node[6])
+{
+	long hid = gethostid();
+	node[0] = 'N';
+	node[1] = 'B';
+	node[2] = (hid  24)  0xff;
+	node[3] = (hid  16)  0xff;
+	node[4] = (hid   8)  0xff;
+	node[5] = (hid   0)  0xff;
+}
+
+static void
+uuid_generate(void *u, uint64_t *timep, int count)
 {
-	struct uuid u;
+	static struct kern_uuid uuid_last;
+	uint64_t xtime, ltime;
+	uint16_t lseq;
+	struct kern_uuid *uuid = u;
+
+	uuid_node(uuid-node);
+	xtime = 

CVS commit: src/sys/arch/xen/xen

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct  3 20:56:24 UTC 2014

Modified Files:
src/sys/arch/xen/xen: privcmd.c

Log Message:
correct error paths; still need to verify that the didn't give us back...
case is correct.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/xen/xen/privcmd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xen/privcmd.c
diff -u src/sys/arch/xen/xen/privcmd.c:1.47 src/sys/arch/xen/xen/privcmd.c:1.48
--- src/sys/arch/xen/xen/privcmd.c:1.47	Sun Sep 21 12:56:44 2014
+++ src/sys/arch/xen/xen/privcmd.c	Fri Oct  3 16:56:24 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $ */
+/* $NetBSD: privcmd.c,v 1.48 2014/10/03 20:56:24 christos Exp $ */
 
 /*-
  * Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.48 2014/10/03 20:56:24 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -576,12 +576,13 @@ privcmd_map_obj(struct vm_map *map, vadd
 	if (error) {
 		if (obj)
 			obj-uobj.pgops-pgo_detach(obj-uobj);
-		kmem_free(maddr, sizeof(paddr_t) * npages);
-		kmem_free(obj, sizeof(*obj));
 		return error;
 	}
 	if (newstart != start) {
 		printf(uvm_map didn't give us back our vm space\n);
+		uvm_unmap1(map, newstart, newstart + size, 0);
+		if (obj)
+			obj-uobj.pgops-pgo_detach(obj-uobj);
 		return EINVAL;
 	}
 	return 0;



CVS commit: src/sbin/gpt

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  4 01:00:42 UTC 2014

Modified Files:
src/sbin/gpt: gpt.8 gpt.c

Log Message:
Allow specifying sector and media size on the command line.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sbin/gpt/gpt.8
cvs rdiff -u -r1.35 -r1.36 src/sbin/gpt/gpt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.32 src/sbin/gpt/gpt.8:1.33
--- src/sbin/gpt/gpt.8:1.32	Mon Sep 29 01:56:43 2014
+++ src/sbin/gpt/gpt.8	Fri Oct  3 21:00:42 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: gpt.8,v 1.32 2014/09/29 05:56:43 jnemeth Exp $
+.\ $NetBSD: gpt.8,v 1.33 2014/10/04 01:00:42 christos Exp $
 .\
 .\ Copyright (c) 2002 Marcel Moolenaar
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $
 .\
-.Dd September 29, 2014
+.Dd October 3, 2014
 .Dt GPT 8
 .Os
 .Sh NAME
@@ -68,6 +68,12 @@ Not all commands use all default setting
 have an effect on all commands.
 .Pp
 The
+.Fl m Ar mediasize
+option overrides the default media size for the device (obtained
+from the kernel if possible) or defaulting to the file size for
+plain files.
+.Pp
+The
 .Fl p Ar partitions
 option allows the user to change the number of partitions the GPT can
 accommodate.
@@ -86,6 +92,13 @@ Currently this option is primarily usefu
 command, but the intent
 is to use it to implement dry-run behaviour.
 .Pp
+The 
+.Fl s Ar sectorsize
+option overrides the default sector size for the device (obtained
+from the kernel if possible) or
+.Dv 512
+for plain files.
+.Pp
 The
 .Fl v
 option controls the verbosity level.

Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.35 src/sbin/gpt/gpt.c:1.36
--- src/sbin/gpt/gpt.c:1.35	Thu Oct  2 15:15:21 2014
+++ src/sbin/gpt/gpt.c	Fri Oct  3 21:00:42 2014
@@ -35,7 +35,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: gpt.c,v 1.35 2014/10/02 19:15:21 joerg Exp $);
+__RCSID($NetBSD: gpt.c,v 1.36 2014/10/04 01:00:42 christos Exp $);
 #endif
 
 #include sys/param.h
@@ -375,6 +375,9 @@ drvctl(const char *name, u_int *sector_s
 	int dfd, res;
 	char *dname, *p;
 
+	if (*sector_size  *media_size)
+		return 0;
+
 	if ((dfd = open(/dev/drvctl, O_RDONLY)) == -1) {
 		warn(%s: /dev/drvctl, __func__);
 		return -1;
@@ -434,13 +437,15 @@ drvctl(const char *name, u_int *sector_s
 	if (number == NULL)
 		goto out;
 
-	*sector_size = prop_number_integer_value(number);
+	if (*sector_size == 0)
+		*sector_size = prop_number_integer_value(number);
 
 	number = prop_dictionary_get(geometry, sectors-per-unit);
 	if (number == NULL)
 		goto out;
 
-	*media_size = prop_number_integer_value(number) * *sector_size;
+	if (*media_size == 0)
+		*media_size = prop_number_integer_value(number) * *sector_size;
 
 	return 0;
 out:
@@ -572,21 +577,26 @@ gpt_open(const char *dev)
 
 	if ((sb.st_mode  S_IFMT) != S_IFREG) {
 #ifdef DIOCGSECTORSIZE
-		if (ioctl(fd, DIOCGSECTORSIZE, secsz) == -1 ||
-		ioctl(fd, DIOCGMEDIASIZE, mediasz) == -1)
+		if ((secsz == 0  ioctl(fd, DIOCGSECTORSIZE, secsz) == -1) ||
+		(mediasz == 0  ioctl(fd, DIOCGMEDIASIZE, mediasz) == -1))
 			goto close;
 #endif
 #ifndef HAVE_NBTOOL_CONFIG_H
 		if (drvctl(device_name, secsz, mediasz) == -1)
 			goto close;
 #endif
+		if (secsz == 0 || mediasz == 0)
+			errx(1, Please specify sector/media size);
 	} else {
-		secsz = 512;	/* Fixed size for files. */
-		if (sb.st_size % secsz) {
-			errno = EINVAL;
-			goto close;
+		if (secsz == 0)
+			secsz = 512;	/* Fixed size for files. */
+		if (mediasz == 0) {
+			if (sb.st_size % secsz) {
+errno = EINVAL;
+goto close;
+			}
+			mediasz = sb.st_size;
 		}
-		mediasz = sb.st_size;
 	}
 
 	/*
@@ -670,61 +680,53 @@ usage(void)
 #ifndef HAVE_NBTOOL_CONFIG_H
 	extern const char backupmsg[], restoremsg[];
 #endif
-
+	const char *p = getprogname();
+	const char *f =
+	[-rv] [-m mediasize] [-p partitionnum] [-s sectorsize];
 
 	fprintf(stderr,
-	usage: %s %s\n
-	   %s %s\n
-#ifndef HAVE_NBTOOL_CONFIG_H
-	   %s %s\n
-#endif
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %*s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
+	Usage: %s %s command [args]\n, p, f);
+	fprintf(stderr, 
+	Commands:\n
 #ifndef HAVE_NBTOOL_CONFIG_H
-	   %s %s\n
+	   %s\n
+	   %s\n
 #endif
-	   %s %s\n
-	   %s %s\n
-	   %s %s\n
-	   %*s %s\n
-	   %s %s\n,
-	getprogname(), addmsg1,
-	getprogname(), addmsg2,
+	   %s\n
+	   %s\n
+	   %s\n
+	   %s\n
+	   %s\n
+	   %s\n
+	   %s\n
+	   

CVS commit: src/sys/net

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 06:46:02 UTC 2014

Modified Files:
src/sys/net: if_tap.c

Log Message:
Remove unneeded #include


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/net/if_tap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/usb

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 11:05:36 UTC 2014

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Convert to USB_HIST.

From Takahiro HAYASHI with tweaks from me.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/allwinner

2014-10-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct  3 11:21:56 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_reg.h

Log Message:
add some more bit definitions


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/allwinner/awin_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/arm/allwinner

2014-10-03 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Oct  3 11:23:29 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_mmc.c

Log Message:
Use SDn_CLK_REG instead of MMC_CLKCR to setup bus clock; gives a nearly 2x 
boost in performance in HS mode. Also, make sure to setup PLL6 before probing 
clocks.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/allwinner/awin_mmc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 11:40:55 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: RPI files.rpi
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Introduce RPI_HWCURSOR and default to off. The existing code causes
problems with vchiq at the moment.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/RPI
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/files.rpi
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/evbarm/rpi/rpi_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/gpl3/gcc/lib/libgcc/libgcc_s

2014-10-03 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Oct  3 12:41:41 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile

Log Message:
Add space before ] in if [ ... ] to fix usage error
and test for existence of the correct file.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2014-10-03 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri Oct  3 14:45:38 UTC 2014

Modified Files:
src/sys/kern: vfs_vnode.c

Log Message:
When creating a vnode with vcache_get() mark the vnode VI_CHANGING until
it is fully initialised.  It may be on the specnode list before it is
fully initialised and revoking it then would panic.

Should prevent the panic from PR kern/49171 (panic when closing a pty).


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/vfs_vnode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/sys/dev/wsfb

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 16:22:58 UTC 2014

Modified Files:
src/sys/dev/wsfb [netbsd-7]: genfb.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #125):
sys/dev/wsfb/genfb.c: revision 1.56
handle WSDISPLAYIO_GET_EDID and WSDISPLAYIO_GET_FBINFO only if the bus
frontend doesn't ( as in, returns EPASSTHROUGH or doesn't register a
handler )
Now flags passed from things like bcm2835_genfb.c are actually seen by
xf86-video-wsfb again and automatically disabling shadowfb works again,
which results in a major speedup on this kind of hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.2.1 src/sys/dev/wsfb/genfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/doc

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 16:42:46 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #125


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/evbarm/rpi

2014-10-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Oct  3 17:57:48 UTC 2014

Modified Files:
src/sys/arch/evbarm/rpi: vcprop_subr.c

Log Message:
Better error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/rpi/vcprop_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/sys

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 18:53:57 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [netbsd-7]: bcm2835_dmac.c bcm2835_dmac.h
bcm2835_emmc.c bcm2835reg.h files.bcm2835
src/sys/arch/evbarm/conf [netbsd-7]: RPI
src/sys/arch/evbarm/rpi [netbsd-7]: rpi_machdep.c
src/sys/dev/sdmmc [netbsd-7]: sdhc.c sdhcvar.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #126):
sys/arch/evbarm/rpi/rpi_machdep.c: revision 1.47
sys/arch/arm/broadcom/bcm2835reg.h: revision 1.12
sys/arch/evbarm/conf/RPI: revision 1.52
sys/arch/evbarm/conf/RPI: revision 1.53
sys/arch/evbarm/conf/RPI: revision 1.54
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.10
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.11
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.12
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.13
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.14
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.15
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.4
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.2
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.5
sys/arch/arm/broadcom/bcm2835_emmc.c: revision 1.18
sys/arch/arm/broadcom/bcm2835_dmac.h: revision 1.3
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.6
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.7
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.8
sys/arch/arm/broadcom/bcm2835_dmac.c: revision 1.9
sys/arch/arm/broadcom/files.bcm2835: revision 1.23
sys/dev/sdmmc/sdhc.c: revision 1.45
sys/dev/sdmmc/sdhc.c: revision 1.46
sys/dev/sdmmc/sdhc.c: revision 1.47
sys/dev/sdmmc/sdhcvar.h: revision 1.14
Various RPI DMAC and sdhc improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/arch/arm/broadcom/bcm2835_dmac.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/arm/broadcom/bcm2835_dmac.h
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/arm/broadcom/bcm2835_emmc.c
cvs rdiff -u -r1.10.12.1 -r1.10.12.2 src/sys/arch/arm/broadcom/bcm2835reg.h
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/arm/broadcom/files.bcm2835
cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/sys/arch/evbarm/conf/RPI
cvs rdiff -u -r1.43.2.1 -r1.43.2.2 src/sys/arch/evbarm/rpi/rpi_machdep.c
cvs rdiff -u -r1.44.2.2 -r1.44.2.3 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.13 -r1.13.12.1 src/sys/dev/sdmmc/sdhcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-7] src/doc

2014-10-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Oct  3 18:55:37 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #126


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-7.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/gpt

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct  3 20:30:06 UTC 2014

Modified Files:
src/sbin/gpt: biosboot.c create.c gpt_uuid.c gpt_uuid.h migrate.c

Log Message:
provide a copy of the kernel uuid generator (with portable API calls) for
tools.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/gpt/biosboot.c
cvs rdiff -u -r1.11 -r1.12 src/sbin/gpt/create.c
cvs rdiff -u -r1.6 -r1.7 src/sbin/gpt/gpt_uuid.c
cvs rdiff -u -r1.2 -r1.3 src/sbin/gpt/gpt_uuid.h
cvs rdiff -u -r1.20 -r1.21 src/sbin/gpt/migrate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/xen/xen

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct  3 20:56:24 UTC 2014

Modified Files:
src/sys/arch/xen/xen: privcmd.c

Log Message:
correct error paths; still need to verify that the didn't give us back...
case is correct.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/xen/xen/privcmd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/gpt

2014-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  4 01:00:42 UTC 2014

Modified Files:
src/sbin/gpt: gpt.8 gpt.c

Log Message:
Allow specifying sector and media size on the command line.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sbin/gpt/gpt.8
cvs rdiff -u -r1.35 -r1.36 src/sbin/gpt/gpt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.