Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cpsw build fix (Re: CVS commit: src/sys/arch/evbarm/conf)



Hi,

On 2019/10/27 18:00, Jared D. McNeill wrote:
> Module Name:	src
> Committed By:	jmcneill
> Date:		Sun Oct 27 18:00:46 UTC 2019
> 
> Modified Files:
> 	src/sys/arch/evbarm/conf: GENERIC
> 
> Log Message:
> Add support for TI AM335x

This patch should fix if_cpsw.c build when KERNHIST is enabled.

--- src/sys/arch/arm/ti/if_cpsw.c.orig	2019-11-03 11:47:41.761668066 +0000
+++ src/sys/arch/arm/ti/if_cpsw.c	2019-11-22 20:47:58.241695788 +0000
@@ -182,7 +182,7 @@ KERNHIST_DEFINE(cpswhist);
 #define KERNHIST_CALLED_5(NAME, i, j, k, l) \
 do { \
 	_kernhist_call = atomic_inc_uint_nv(&_kernhist_cnt); \
-	KERNHIST_LOG(NAME, "called! %x %x %x %x", i, j, k, l); \
+	KERNHIST_LOG(NAME, "called! %jx %jx %jx %jx", i, j, k, l); \
 } while (/*CONSTCOND*/ 0)
 #else
 #define KERNHIST_CALLED_5(NAME, i, j, k, l)
@@ -219,7 +219,7 @@ cpsw_set_txdesc_next(struct cpsw_softc *
 	const bus_size_t o = sizeof(struct cpsw_cpdma_bd) * i + 0;
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, n, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, n, 0);
 
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh_txdescs, o, n);
 }
@@ -230,7 +230,7 @@ cpsw_set_rxdesc_next(struct cpsw_softc *
 	const bus_size_t o = sizeof(struct cpsw_cpdma_bd) * i + 0;
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, n, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, n, 0);
 
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh_rxdescs, o, n);
 }
@@ -244,7 +244,7 @@ cpsw_get_txdesc(struct cpsw_softc * cons
 	const bus_size_t c = __arraycount(bdp->word);
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, bdp, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, (uintptr_t)bdp, 0);
 
 	bus_space_read_region_4(sc->sc_bst, sc->sc_bsh_txdescs, o, dp, c);
 	KERNHIST_LOG(cpswhist, "%08x %08x %08x %08x\n",
@@ -260,7 +260,7 @@ cpsw_set_txdesc(struct cpsw_softc * cons
 	const bus_size_t c = __arraycount(bdp->word);
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, bdp, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, (uintptr_t)bdp, 0);
 	KERNHIST_LOG(cpswhist, "%08x %08x %08x %08x\n",
 	    dp[0], dp[1], dp[2], dp[3]);
 
@@ -276,7 +276,7 @@ cpsw_get_rxdesc(struct cpsw_softc * cons
 	const bus_size_t c = __arraycount(bdp->word);
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, bdp, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, (uintptr_t)bdp, 0);
 
 	bus_space_read_region_4(sc->sc_bst, sc->sc_bsh_rxdescs, o, dp, c);
 
@@ -293,7 +293,7 @@ cpsw_set_rxdesc(struct cpsw_softc * cons
 	const bus_size_t c = __arraycount(bdp->word);
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, i, bdp, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, i, (uintptr_t)bdp, 0);
 	KERNHIST_LOG(cpswhist, "%08x %08x %08x %08x\n",
 	    dp[0], dp[1], dp[2], dp[3]);
 
@@ -607,7 +607,7 @@ cpsw_start(struct ifnet *ifp)
 	u_int mlen;
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, 0, 0, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, 0, 0, 0);
 
 	if (__predict_false((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) !=
 	    IFF_RUNNING)) {
@@ -1140,7 +1140,7 @@ cpsw_rxintr(void *arg)
 	u_int len, off;
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, 0, 0, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, 0, 0, 0);
 
 	for (;;) {
 		KASSERT(sc->sc_rxhead < CPSW_NRXDESCS);
@@ -1225,7 +1225,7 @@ cpsw_txintr(void *arg)
 	u_int cpi;
 
 	KERNHIST_FUNC(__func__);
-	KERNHIST_CALLED_5(cpswhist, sc, 0, 0, 0);
+	KERNHIST_CALLED_5(cpswhist, (uintptr_t)sc, 0, 0, 0);
 
 	KASSERT(sc->sc_txrun);
 

> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/GENERIC
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


Home | Main Index | Thread Index | Old Index