Source-Changes-HG archive

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

[src/trunk]: src/sys revert this change from early this year. it appears the



details:   https://anonhg.NetBSD.org/src/rev/82e0808381aa
branches:  trunk
changeset: 465879:82e0808381aa
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Dec 06 06:38:39 2019 +0000

description:
revert this change from early this year.  it appears the
changes macallan@ commited to fix FIRMWORKSBUGS issues
in openfirmware() have fixed the hangs seen on PegasosII.

hooray!

---
Log Message:
workaround a problem with the pegasos firmware interface:
attempting to use /dev/openfirm on this machine hangs hard.

this isn't a new problem, and i've been meaning to try to
figure it out for years, but it's become a problem since
the xf86-video-radeon driver gained code to look for the
macppc model using this interface.

this is why xorg-server 1.18 and 1.20 hang recently on the
pegasosII.

this change is fairly ugly but i couldn't think of a less
ugly method to avoid /dev/openfirm working just on this
one platform.  introduce new __OPENFIRMIO_OPEN_CHECK_BROKEN
macro and associated __openfirmio_open_check_broken(), and
use them in the new openfirmopen() to fail opens.

include proplib.h in macppc and ofppc autoconf.h since they
use it.
---

diffstat:

 sys/arch/powerpc/include/types.h    |   4 +---
 sys/arch/powerpc/powerpc/openfirm.c |  12 ++----------
 sys/dev/ofw/openfirmio.c            |   8 ++------
 3 files changed, 5 insertions(+), 19 deletions(-)

diffs (78 lines):

diff -r 4ae3ddfbeb82 -r 82e0808381aa sys/arch/powerpc/include/types.h
--- a/sys/arch/powerpc/include/types.h  Fri Dec 06 05:53:20 2019 +0000
+++ b/sys/arch/powerpc/include/types.h  Fri Dec 06 06:38:39 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.59 2019/04/07 05:25:55 thorpej Exp $       */
+/*     $NetBSD: types.h,v 1.60 2019/12/06 06:38:39 mrg Exp $   */
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -87,8 +87,6 @@
 #define        __HAVE___LWP_GETTCB_FAST
 #define        __HAVE___LWP_SETTCB
 #define        __HAVE_TLS_VARIANT_I
-#define        __OPENFIRMIO_OPEN_CHECK_BROKEN
-int __openfirmio_open_check_broken(void);
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #define        PCU_FPU         0       /* FPU */
diff -r 4ae3ddfbeb82 -r 82e0808381aa sys/arch/powerpc/powerpc/openfirm.c
--- a/sys/arch/powerpc/powerpc/openfirm.c       Fri Dec 06 05:53:20 2019 +0000
+++ b/sys/arch/powerpc/powerpc/openfirm.c       Fri Dec 06 06:38:39 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirm.c,v 1.29 2019/11/16 00:16:55 macallan Exp $   */
+/*     $NetBSD: openfirm.c,v 1.30 2019/12/06 06:38:39 mrg Exp $        */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.29 2019/11/16 00:16:55 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.30 2019/12/06 06:38:39 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -762,11 +762,3 @@
        while (len-- > 0)
                *dp++ = *sp++;
 }
-
-#ifdef __OPENFIRMIO_OPEN_CHECK_BROKEN
-int
-__openfirmio_open_check_broken(void)
-{
-       return strncmp(model_name, "Pegasos", 7) == 0 ? ENXIO : 0;
-}
-#endif
diff -r 4ae3ddfbeb82 -r 82e0808381aa sys/dev/ofw/openfirmio.c
--- a/sys/dev/ofw/openfirmio.c  Fri Dec 06 05:53:20 2019 +0000
+++ b/sys/dev/ofw/openfirmio.c  Fri Dec 06 06:38:39 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirmio.c,v 1.14 2019/01/08 07:46:11 mrg Exp $ */
+/*     $NetBSD: openfirmio.c,v 1.15 2019/12/06 06:38:39 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.14 2019/01/08 07:46:11 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openfirmio.c,v 1.15 2019/12/06 06:38:39 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -122,11 +122,7 @@
 openfirmopen(dev_t dev, int flag, int mode, struct lwp *l)
 {
 
-#ifdef __OPENFIRMIO_OPEN_CHECK_BROKEN
-       return __openfirmio_open_check_broken();
-#else
        return 0;
-#endif
 }
 
 static int



Home | Main Index | Thread Index | Old Index