Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys Pull up following revision(s) (requested by spz in ti...
details: https://anonhg.NetBSD.org/src/rev/af95e07ef7ff
branches: netbsd-8
changeset: 434844:af95e07ef7ff
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Apr 09 12:49:31 2018 +0000
description:
Pull up following revision(s) (requested by spz in ticket #708):
sys/conf/files: revision 1.1194
sys/dev/ic/cissvar.h: revision 1.7
sys/dev/ic/ciss.c: revision 1.38
sys/dev/pci/ciss_pci.c: revision 1.14
sys/arch/amd64/conf/ALL: revision 1.81
Add a new option CISS_NO_INTERRUPT_HACK for driving ciss(4) by callouts.
This is intended as workaround for certain Xen issues with dom0 kernels
and will likely want to have a high HZ value as well for decent
performance.
diffstat:
sys/arch/amd64/conf/ALL | 6 ++++--
sys/conf/files | 3 ++-
sys/dev/ic/ciss.c | 8 ++++++--
sys/dev/ic/cissvar.h | 7 ++++++-
sys/dev/pci/ciss_pci.c | 28 ++++++++++++++++++++++++++--
5 files changed, 44 insertions(+), 8 deletions(-)
diffs (187 lines):
diff -r 0cb2ccc88df3 -r af95e07ef7ff sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL Mon Apr 09 04:04:41 2018 +0000
+++ b/sys/arch/amd64/conf/ALL Mon Apr 09 12:49:31 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.59.2.3 2018/02/11 21:17:34 snj Exp $
+# $NetBSD: ALL,v 1.59.2.4 2018/04/09 12:49:32 bouyer Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.59.2.3 $"
+#ident "ALL-$Revision: 1.59.2.4 $"
maxusers 64 # estimated number of users
@@ -815,6 +815,8 @@
arcmsr* at pci? dev ? function ? # Areca SATA RAID controllers
cac* at pci? dev ? function ? # Compaq PCI array controllers
ciss* at pci? dev ? function ? # HP Smart Array controllers
+options CISS_NO_INTERRUPT_HACK
+
icp* at pci? dev ? function ? # ICP-Vortex GDT & Intel RAID
mlx* at pci? dev ? function ? # Mylex DAC960 & DEC SWXCR family
twa* at pci? dev ? function ? # 3ware Escalade 95xx RAID controllers
diff -r 0cb2ccc88df3 -r af95e07ef7ff sys/conf/files
--- a/sys/conf/files Mon Apr 09 04:04:41 2018 +0000
+++ b/sys/conf/files Mon Apr 09 12:49:31 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1173.2.4 2018/02/11 21:17:34 snj Exp $
+# $NetBSD: files,v 1.1173.2.5 2018/04/09 12:49:31 bouyer Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20170615
@@ -516,6 +516,7 @@
# HP/Compaq Command Interface for SCSI-3 Support
#
+defflag opt_ciss.h CISS_NO_INTERRUPT_HACK
device ciss: scsi
file dev/ic/ciss.c ciss
diff -r 0cb2ccc88df3 -r af95e07ef7ff sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Mon Apr 09 04:04:41 2018 +0000
+++ b/sys/dev/ic/ciss.c Mon Apr 09 12:49:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciss.c,v 1.36.10.1 2017/08/09 05:18:26 snj Exp $ */
+/* $NetBSD: ciss.c,v 1.36.10.2 2018/04/09 12:49:31 bouyer Exp $ */
/* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.36.10.1 2017/08/09 05:18:26 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.36.10.2 2018/04/09 12:49:31 bouyer Exp $");
#include "bio.h"
@@ -593,9 +593,11 @@
bus_dmamap_sync(sc->sc_dmat, sc->cmdmap, 0, sc->cmdmap->dm_mapsize,
BUS_DMASYNC_PREWRITE);
+#ifndef CISS_NO_INTERRUPT_HACK
if ((wait & (XS_CTL_POLL|XS_CTL_NOSLEEP)) == (XS_CTL_POLL|XS_CTL_NOSLEEP))
bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR,
bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) | sc->iem);
+#endif
mutex_enter(&sc->sc_mutex);
TAILQ_INSERT_TAIL(&sc->sc_ccbq, ccb, ccb_link);
@@ -637,9 +639,11 @@
ccb->ccb_err.cmd_stat, ccb->ccb_err.scsi_stat));
}
+#ifndef CISS_NO_INTERRUPT_HACK
if ((wait & (XS_CTL_POLL|XS_CTL_NOSLEEP)) == (XS_CTL_POLL|XS_CTL_NOSLEEP))
bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR,
bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) & ~sc->iem);
+#endif
return (error);
}
diff -r 0cb2ccc88df3 -r af95e07ef7ff sys/dev/ic/cissvar.h
--- a/sys/dev/ic/cissvar.h Mon Apr 09 04:04:41 2018 +0000
+++ b/sys/dev/ic/cissvar.h Mon Apr 09 12:49:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cissvar.h,v 1.6 2013/10/12 16:52:21 christos Exp $ */
+/* $NetBSD: cissvar.h,v 1.6.22.1 2018/04/09 12:49:31 bouyer Exp $ */
/* $OpenBSD: cissvar.h,v 1.15 2013/05/30 16:15:02 deraadt Exp $ */
/*
@@ -24,6 +24,8 @@
#include <dev/sysmon/sysmonvar.h>
#include <sys/envsys.h>
+#include "opt_ciss.h"
+
struct ciss_ld {
struct ciss_blink bling; /* a copy of blink state */
char xname[16]; /* copy of the sdN name */
@@ -43,6 +45,9 @@
void *sc_sh; /* shutdown hook */
struct proc *sc_thread;
int sc_flush;
+#ifdef CISS_NO_INTERRUPT_HACK
+ struct callout sc_interrupt_hack;
+#endif
struct scsipi_channel sc_channel;
struct scsipi_channel *sc_channel_raw;
diff -r 0cb2ccc88df3 -r af95e07ef7ff sys/dev/pci/ciss_pci.c
--- a/sys/dev/pci/ciss_pci.c Mon Apr 09 04:04:41 2018 +0000
+++ b/sys/dev/pci/ciss_pci.c Mon Apr 09 12:49:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciss_pci.c,v 1.13 2016/07/14 04:00:46 msaitoh Exp $ */
+/* $NetBSD: ciss_pci.c,v 1.13.10.1 2018/04/09 12:49:31 bouyer Exp $ */
/* $OpenBSD: ciss_pci.c,v 1.9 2005/12/13 15:56:01 brad Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.13 2016/07/14 04:00:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss_pci.c,v 1.13.10.1 2018/04/09 12:49:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -243,6 +243,20 @@
return 0;
}
+#ifdef CISS_NO_INTERRUPT_HACK
+static void
+ciss_intr_wrapper(void *sc_)
+{
+ struct ciss_softc *sc = sc_;
+ int s;
+
+ s = splbio();
+ ciss_intr(sc);
+ splx(s);
+ callout_schedule(&sc->sc_interrupt_hack, 1);
+}
+#endif
+
void
ciss_pci_attach(device_t parent, device_t self, void *aux)
{
@@ -256,6 +270,10 @@
int i;
char intrbuf[PCI_INTRSTR_LEN];
+#ifdef CISS_NO_INTERRUPT_HACK
+ callout_init(&sc->sc_interrupt_hack, 0);
+ callout_setfunc(&sc->sc_interrupt_hack, ciss_intr_wrapper, sc);
+#endif
sc->sc_dev = self;
aprint_naive("\n");
@@ -316,8 +334,10 @@
}
/* disable interrupts until ready */
+#ifndef CISS_NO_INTERRUPT_HACK
bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR,
bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) | sc->iem);
+#endif
if (pci_intr_map(pa, &ih)) {
aprint_error_dev(self, "can't map interrupt\n");
@@ -350,7 +370,11 @@
return;
}
+#ifndef CISS_NO_INTERRUPT_HACK
/* enable interrupts now */
bus_space_write_4(sc->sc_iot, sc->sc_ioh, CISS_IMR,
bus_space_read_4(sc->sc_iot, sc->sc_ioh, CISS_IMR) & ~sc->iem);
+#else
+ callout_schedule(&sc->sc_interrupt_hack, 1);
+#endif
}
Home |
Main Index |
Thread Index |
Old Index