Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbppc/virtex Make VIRTEX_* kernels compile. Not te...



details:   https://anonhg.NetBSD.org/src/rev/f394d09b9244
branches:  trunk
changeset: 1020067:f394d09b9244
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Mar 29 13:14:13 2021 +0000

description:
Make VIRTEX_* kernels compile. Not tested.

diffstat:

 sys/arch/evbppc/virtex/autoconf.c     |  6 +++---
 sys/arch/evbppc/virtex/consinit.c     |  5 ++---
 sys/arch/evbppc/virtex/design_gsrd2.c |  8 ++++++--
 sys/arch/evbppc/virtex/dev/if_temac.c |  8 ++++----
 sys/arch/evbppc/virtex/dev/tft_ll.c   |  8 +++++---
 sys/arch/evbppc/virtex/machdep.c      |  5 ++---
 6 files changed, 22 insertions(+), 18 deletions(-)

diffs (190 lines):

diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/autoconf.c
--- a/sys/arch/evbppc/virtex/autoconf.c Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/autoconf.c Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $ */
+/*     $NetBSD: autoconf.c,v 1.6 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2012/07/29 18:05:42 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.6 2021/03/29 13:14:13 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -76,7 +76,7 @@
 
 
 /* List of port-specific devices to attach to the processor local bus. */
-static const struct plb_dev local_plb_devs [] = {
+static struct plb_dev local_plb_devs [] = {
        { XILVIRTEX, "xcvbus" },
        { 0, NULL }
 };
diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/consinit.c
--- a/sys/arch/evbppc/virtex/consinit.c Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/consinit.c Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.3 2011/07/01 19:03:50 dyoung Exp $ */
+/*     $NetBSD: consinit.c,v 1.4 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -33,7 +33,7 @@
 #include "xlcom.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.3 2011/07/01 19:03:50 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2021/03/29 13:14:13 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,7 +54,6 @@
 #endif
 #endif
 
-struct consdev                 *cn_tab = NULL;
 bus_space_tag_t        consdev_iot;
 bus_space_handle_t     consdev_ioh;
 
diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/design_gsrd2.c
--- a/sys/arch/evbppc/virtex/design_gsrd2.c     Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/design_gsrd2.c     Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: design_gsrd2.c,v 1.4 2011/06/18 06:44:27 matt Exp $ */
+/*     $NetBSD: design_gsrd2.c,v 1.5 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -32,7 +32,7 @@
 #include "opt_virtex.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: design_gsrd2.c,v 1.4 2011/06/18 06:44:27 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: design_gsrd2.c,v 1.5 2021/03/29 13:14:13 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -96,6 +96,7 @@
  * DCR bus space leaf access routines.
  */
 
+#ifndef DESIGN_DFC
 static void
 tft0_write_4(bus_space_tag_t t, bus_space_handle_t h, uint32_t addr,
     uint32_t val)
@@ -124,6 +125,7 @@
 
        return (val);
 }
+#endif /* !DESIGN_DFC */
 
 static void
 tft1_write_4(bus_space_tag_t t, bus_space_handle_t h, uint32_t addr,
@@ -232,9 +234,11 @@
        DCR_BST_BODY(DCR_TEMAC_BASE, temac_read_4, temac_write_4)
 };
 
+#ifndef DESIGN_DFC
 static const struct powerpc_bus_space tft0_bst = {
        DCR_BST_BODY(DCR_TFT0_BASE, tft0_read_4, tft0_write_4)
 };
+#endif
 
 static const struct powerpc_bus_space tft1_bst = {
        DCR_BST_BODY(DCR_TFT1_BASE, tft1_read_4, tft1_write_4)
diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/dev/if_temac.c
--- a/sys/arch/evbppc/virtex/dev/if_temac.c     Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/dev/if_temac.c     Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $ */
+/*     $NetBSD: if_temac.c,v 1.17 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.16 2020/02/04 07:36:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_temac.c,v 1.17 2021/03/29 13:14:13 rin Exp $");
 
 
 #include <sys/param.h>
@@ -230,7 +230,7 @@
 static inline void     gmi_write_4(uint32_t, uint32_t);
 static inline void     gmi_read_8(uint32_t, uint32_t *, uint32_t *);
 static inline uint32_t         gmi_read_4(uint32_t);
-static inline void     hif_wait_stat(uint32_t);
+static inline int      hif_wait_stat(uint32_t);
 
 #define cdmac_rx_stat(sc) \
     bus_space_read_4((sc)->sc_dma_rxt, (sc)->sc_dma_rsh, 0 /* XXX hack */)
@@ -1029,7 +1029,7 @@
                m_freem(txs->txs_mbuf);
                txs->txs_mbuf = NULL;
 
-               sc->sc_if.if_opackets++;
+               if_statinc(&sc->sc_if, if_opackets);
                sent = 1;
 
                sc->sc_txsreap = TEMAC_TXSNEXT(sc->sc_txsreap);
diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/dev/tft_ll.c
--- a/sys/arch/evbppc/virtex/dev/tft_ll.c       Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/dev/tft_ll.c       Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tft_ll.c,v 1.4 2011/07/01 19:03:50 dyoung Exp $ */
+/*     $NetBSD: tft_ll.c,v 1.5 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tft_ll.c,v 1.4 2011/07/01 19:03:50 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tft_ll.c,v 1.5 2021/03/29 13:14:13 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,7 +60,9 @@
 struct ll_tft_control {
        struct cdmac_descr      cd_dsc;
        u_char                  cd_img[];
-} __packed;
+};
+
+CTASSERT(offsetof(struct ll_tft_control, cd_img) == sizeof(struct cdmac_descr));
 
 struct ll_tft_softc {
        struct tft_softc        lsc_sc;
diff -r b4196882b71a -r f394d09b9244 sys/arch/evbppc/virtex/machdep.c
--- a/sys/arch/evbppc/virtex/machdep.c  Mon Mar 29 13:12:38 2021 +0000
+++ b/sys/arch/evbppc/virtex/machdep.c  Mon Mar 29 13:14:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.25 2020/06/11 19:20:43 ad Exp $ */
+/*     $NetBSD: machdep.c,v 1.26 2021/03/29 13:14:13 rin Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2020/06/11 19:20:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2021/03/29 13:14:13 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -100,7 +100,6 @@
 char machine_arch[] = MACHINE_ARCH;    /* from <machine/param.h> */
 
 char bootpath[256];
-vaddr_t msgbuf_vaddr;
 
 void initppc(vaddr_t, vaddr_t);
 



Home | Main Index | Thread Index | Old Index