[rtems commit] libchip,greth: disable driver if SMP kernel

Daniel Hellstrom danielh at rtems.org
Tue Aug 29 07:09:27 UTC 2017


Module:    rtems
Branch:    master
Commit:    1ccce05337be6e81f823039932a8a10d2b07c2d8
Changeset: http://git.rtems.org/rtems/commit/?id=1ccce05337be6e81f823039932a8a10d2b07c2d8

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Tue Aug 22 10:57:41 2017 +0200

libchip,greth: disable driver if SMP kernel

Update #2355

---

 c/src/configure.ac                       | 2 ++
 c/src/lib/libbsp/sparc/leon3/Makefile.am | 2 ++
 c/src/libchip/Makefile.am                | 4 +++-
 c/src/libchip/preinstall.am              | 3 ++-
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/c/src/configure.ac b/c/src/configure.ac
index 1543b5d..d228b5e 100644
--- a/c/src/configure.ac
+++ b/c/src/configure.ac
@@ -23,6 +23,7 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
 
 RTEMS_CHECK_NETWORKING(RTEMS_BSP)
 RTEMS_CHECK_POSIX_API(RTEMS_BSP)
+RTEMS_CHECK_SMP
 
 AC_MSG_NOTICE([setting up make/custom])
 
@@ -197,6 +198,7 @@ AS_IF([test "$host_cpu" = sparc],[
 ])
 
 AM_CONDITIONAL([HAS_NETWORKING],[test "$HAS_NETWORKING" = "yes"])
+AM_CONDITIONAL(HAS_SMP,[test "$rtems_cv_HAS_SMP" = "yes"])
 
 AM_CONDITIONAL(RTEMS_ADA,[test x"$enable_ada" = x"yes" \
   && test x"$rtems_cv_HAS_POSIX_API" = x"yes"])
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 667efb7..5e83f13 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -282,7 +282,9 @@ endif
 
 if HAS_NETWORKING
 noinst_PROGRAMS += leon_greth.rel
+if !HAS_SMP
 libbsp_a_SOURCES += leon_greth/leon_greth.c
+endif
 leon_greth_rel_SOURCES = ../../sparc/shared/net/greth.c
 include_bsp_HEADERS += ../../sparc/shared/include/greth.h
 leon_greth_rel_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/c/src/libchip/Makefile.am b/c/src/libchip/Makefile.am
index b0b54bc..cc7b27f 100644
--- a/c/src/libchip/Makefile.am
+++ b/c/src/libchip/Makefile.am
@@ -37,11 +37,13 @@ libnetchip_a_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
 include_libchip_HEADERS += network/cs8900.h network/i82586var.h \
     network/if_fxpvar.h network/sonic.h
 include_libchip_HEADERS += network/open_eth.h network/if_dcreg.h
-include_libchip_HEADERS += network/greth.h
 libnetchip_a_SOURCES = network/cs8900.c network/dec21140.c network/i82586.c \
     network/sonic.c network/if_fxp.c network/elnk.c network/open_eth.c \
     network/if_dc.c
+if !HAS_SMP
 libnetchip_a_SOURCES += network/greth.c
+include_libchip_HEADERS += network/greth.h
+endif
 include_libchip_HEADERS += network/smc91111.h network/smc91111exp.h
 libnetchip_a_SOURCES += network/smc91111.c network/smc91111config.h
 endif
diff --git a/c/src/libchip/preinstall.am b/c/src/libchip/preinstall.am
index 896dbe6..a280315 100644
--- a/c/src/libchip/preinstall.am
+++ b/c/src/libchip/preinstall.am
@@ -86,10 +86,11 @@ $(PROJECT_INCLUDE)/libchip/if_dcreg.h: network/if_dcreg.h $(PROJECT_INCLUDE)/lib
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/if_dcreg.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/if_dcreg.h
 
+if !HAS_SMP
 $(PROJECT_INCLUDE)/libchip/greth.h: network/greth.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/greth.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/greth.h
-
+endif
 $(PROJECT_INCLUDE)/libchip/smc91111.h: network/smc91111.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/smc91111.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/smc91111.h




More information about the vc mailing list