Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/landisk landisk: Add stub pci_intr_setattr.



details:   https://anonhg.NetBSD.org/src/rev/a67853c65fa5
branches:  trunk
changeset: 372165:a67853c65fa5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Oct 29 11:04:23 2022 +0000

description:
landisk: Add stub pci_intr_setattr.

No MP on sh4 as far as I know so no need to do anything for
PCI_INTR_MPSAFE.

diffstat:

 sys/arch/landisk/include/pci_machdep.h    |   6 +++++-
 sys/arch/landisk/landisk/shpcic_machdep.c |  17 +++++++++++++++--
 2 files changed, 20 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r cddc13c8e94a -r a67853c65fa5 sys/arch/landisk/include/pci_machdep.h
--- a/sys/arch/landisk/include/pci_machdep.h    Sat Oct 29 10:52:36 2022 +0000
+++ b/sys/arch/landisk/include/pci_machdep.h    Sat Oct 29 11:04:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.h,v 1.5 2014/03/29 23:51:02 joerg Exp $    */
+/*     $NetBSD: pci_machdep.h,v 1.6 2022/10/29 11:04:23 riastradh Exp $        */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -58,6 +58,8 @@
 void landisk_pci_attach_hook(device_t, device_t,
     struct pcibus_attach_args *);
 int landisk_pci_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
+int landisk_pci_intr_setattr(const struct pci_attach_args *,
+    pci_intr_handle_t *, int, uint64_t);
 const char *landisk_pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t,
     char *, size_t);
 const struct evcnt *landisk_pci_intr_evcnt(pci_chipset_tag_t,pci_intr_handle_t);
@@ -83,6 +85,8 @@
        landisk_pci_attach_hook(pa, self, pba)
 #define        pci_intr_map(pa, ihp) \
        landisk_pci_intr_map(pa, ihp)
+#define        pci_intr_setattr(pa, ihp, attr, data) \
+       landisk_pci_intr_setattr(pa, ihp, attr, data)
 #define        pci_intr_string(v, ih, buf, len) \
        landisk_pci_intr_string(v, ih, buf, len)
 #define        pci_intr_evcnt(v, ih) \
diff -r cddc13c8e94a -r a67853c65fa5 sys/arch/landisk/landisk/shpcic_machdep.c
--- a/sys/arch/landisk/landisk/shpcic_machdep.c Sat Oct 29 10:52:36 2022 +0000
+++ b/sys/arch/landisk/landisk/shpcic_machdep.c Sat Oct 29 11:04:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shpcic_machdep.c,v 1.7 2014/03/29 19:28:29 christos Exp $      */
+/*     $NetBSD: shpcic_machdep.c,v 1.8 2022/10/29 11:04:23 riastradh Exp $     */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.7 2014/03/29 19:28:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.8 2022/10/29 11:04:23 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -117,6 +117,19 @@
        return 1;
 }
 
+int
+landisk_pci_intr_setattr(const struct pci_attach_args *pa,
+    pci_intr_handle_t *ihp, int attr, uint64_t data)
+{
+
+       switch (attr) {
+       case PCI_INTR_MPSAFE:
+               return 0;
+       default:
+               return ENODEV;
+       }
+}
+
 const char *
 landisk_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
 {



Home | Main Index | Thread Index | Old Index