NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-evbmips/54197
The following reply was made to PR port-evbmips/54197; it has been noted by GNATS.
From: Jan Prunk <janprunk%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-evbmips/54197
Date: Wed, 10 Nov 2021 22:23:15 +0100
--ilu64zt2TiONFKQ9
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
A solution for this issue might be the following change in code,
=66rom OpenBSD.
1 -
https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
759
2 -
https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
759.patch
3 -
https://github.com/openbsd/src/commit/5114a369c866e511a0af801150b6c3cf09e97=
759.diff
4 -
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/loongson/loongson/yee=
loong_machdep.c.diff?r1=3D1.25&r2=3D1.26
---
=46rom 5114a369c866e511a0af801150b6c3cf09e97759 Mon Sep 17 00:00:00 2001
=46rom: visa <visa%openbsd.org@localhost>
Date: Tue, 23 May 2017 16:53:15 +0000
Subject: [PATCH] Rate limit messages about spurious ISA interrupts on yeelo=
ong
systems. On suspend, the USB driver is put to polling mode and it no longer
claims interrupt requests. If the USB controller keeps raising new requests
faster than spurious interrupt messages can be printed, interrupt processi=
ng
hogs all CPU time and the suspend code gets stuck. The rate limiting should
prevent this from happening.
Suspend issue with USB Wi-Fi reported by fcambus@
Fix tested by and OK fcambus@
---
sys/arch/loongson/loongson/yeeloong_machdep.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys/arch/loongson/loongson/yeeloong_machdep.c b/sys/arch/loong=
son/loongson/yeeloong_machdep.c
index 2b48b92dcf82..5dab0e02181f 100644
--- a/sys/arch/loongson/loongson/yeeloong_machdep.c
+++ b/sys/arch/loongson/loongson/yeeloong_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yeeloong_machdep.c,v 1.25 2016/03/06 19:42:27 mpi Exp $ */
+/* $OpenBSD: yeeloong_machdep.c,v 1.26 2017/05/23 16:53:15 visa Exp $ */
=20
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -341,6 +341,8 @@ lemote_isa_intr_disestablish(void *v, void *ih)
uint32_t
lemote_isa_intr(uint32_t hwpend, struct trapframe *frame)
{
+ static const struct timeval ierr_interval =3D { 0, 500000 };
+ static struct timeval ierr_last;
uint64_t imr, isr, mask;
int bit;
struct intrhand *ih;
@@ -414,7 +416,8 @@ lemote_isa_intr(uint32_t hwpend, struct trapframe *fram=
e)
if (ret =3D=3D 1)
break;
}
- if (rc =3D=3D 0)
+ if (rc =3D=3D 0 &&
+ ratecheck(&ierr_last, &ierr_interval))
printf("spurious isa interrupt %d\n",
bitno);
=20
--ilu64zt2TiONFKQ9
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEVxs8bLWVyN7faNljGsBCVe0Hhh8FAmGMODcACgkQGsBCVe0H
hh/dmA//d/hAOSE+Xm/16Qe7PgLElualHyuGhmuUntkPQ8BlrUyBNCWKXDB2BSrt
cib34/6ALjG1WyG1QeQm0nfFRVJQe+U4/t49dxkPKfPxruhTi0Ciwd0cyDV5shQ5
vWyiA66ITj8Uqdgo/jwQZnUobwnW93hwScEUBoVkSkPbjQi3Az/VRiXb2/f47oo/
pT3Z6kR2qbyEtLvwnuYpyaR5ULTUE20tojkwVqsoZWm1FUvisbJ/j0Faa8vjRCM/
U9zdMerx3peH1dFJSyqluO/Q/QV1/MpQFU6ezjOKVZpX0W9aUv5N2RKI4lr81ZdI
8FVxFEH8kdM1ypVJV1tVNUnxXzK2dYxdXK21S2QgpAORuE4sgaw/MW0aj7kqwEPp
S5T2ndB5jGtqPPKS/gsmpChMqhX0aKlHIoGxEsa1kRCDVrm7dpEfKaCqjJzeLBj0
dqCNYYTiOGMsLPeHyjdBitz+WWoF/JFCOCpYgK+sAin6QsJbRexxH3C+tQM5Om3a
aVPA94uuYVf/9yNj5X5i6QWKwIZQIFvdSSk4vIty4iPEuyIHV4OHUXnOWF0DXEeO
cibQJq+B+6y7gTmDuq2Sv5nWZHWTj2yF8YdCzk2KyfiUNXpd3Y1g44eDwN9np6jx
QMWICWMteqNETCxggLf1fzwUnASduRRvI3vfr0F2J22v/gl7/Kk=
=Cvlr
-----END PGP SIGNATURE-----
--ilu64zt2TiONFKQ9--
Home |
Main Index |
Thread Index |
Old Index