[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-bugs
Subject: kern/55963: #ifdef __HAVE_PCI_CONF_HOOK is needed to define pcihost_conf_hook() at pcihost_fdt.c
From: hashikaw () mail ! ru
Date: 2021-01-29 6:50:00
Message-ID: 20210129065000.8EA091A923D () mollari ! NetBSD ! org
[Download RAW message or body]
> Number: 55963
> Category: kern
> Synopsis: #ifdef __HAVE_PCI_CONF_HOOK is needed to define pcihost_conf_hook() \
> at pcihost_fdt.c
> Confidential: no
> Severity: serious
> Priority: medium
> Responsible: kern-bug-people
> State: open
> Class: sw-bug
> Submitter-Id: net
> Arrival-Date: Fri Jan 29 06:50:00 +0000 2021
> Originator: Kouichi Hashikawa
> Release: NetBSD-9.99.79
> Organization:
> Environment:
> Description:
On src/sys/arch/arm/fdt/pcihost_fdt.c, I think #ifdef __HAVE_PCI_CONF_HOOK is needed \
to define pcihost_conf_hook(). Please refer src/sys/arch/arm/include/pci_machdep.h.
> How-To-Repeat:
> Fix:
I think,
--- ../fdt/pcihost_fdt.c-dist 2021-01-29 15:28:38.947344323 +0900
+++ ../fdt/pcihost_fdt.c 2021-01-29 15:35:40.763832665 +0900
@@ -74,7 +74,9 @@
static u_int pcihost_get_segment(void *);
static pcireg_t pcihost_conf_read(void *, pcitag_t, int);
static void pcihost_conf_write(void *, pcitag_t, int, pcireg_t);
+#ifdef __HAVE_PCI_CONF_HOOK
static int pcihost_conf_hook(void *, int, int, int, pcireg_t);
+#endif /* __HAVE_PCI_CONF_HOOK */
static void pcihost_conf_interrupt(void *, int, int, int, int, int *);
static int pcihost_intr_map(const struct pci_attach_args *,
@@ -85,12 +87,12 @@
static int pcihost_intr_setattr(void *, pci_intr_handle_t *, int,
uint64_t);
static void * pcihost_intr_establish(void *, pci_intr_handle_t,
- int, int (*)(void *), void *,
- const char *);
+ int, int (*)(void *), void *,
+ const char *);
static void pcihost_intr_disestablish(void *, void *);
static int pcihost_bus_space_map(void *, bus_addr_t, bus_size_t,
- int, bus_space_handle_t *);
+ int, bus_space_handle_t *);
CFATTACH_DECL_NEW(pcihost_fdt, sizeof(struct pcihost_softc),
pcihost_match, pcihost_attach, NULL, NULL);
@@ -208,7 +210,9 @@
pc->pc_get_segment = pcihost_get_segment;
pc->pc_conf_read = pcihost_conf_read;
pc->pc_conf_write = pcihost_conf_write;
+#ifdef __HAVE_PCI_CONF_HOOK
pc->pc_conf_hook = pcihost_conf_hook;
+#endif /* __HAVE_PCI_CONF_HOOK */
pc->pc_conf_interrupt = pcihost_conf_interrupt;
pc->pc_intr_v = priv;
@@ -452,11 +456,13 @@
bus_space_write_4(sc->sc_bst, sc->sc_bsh, reg, val);
}
+#ifdef __HAVE_PCI_CONF_HOOK
static int
pcihost_conf_hook(void *v, int b, int d, int f, pcireg_t id)
{
return PCI_CONF_DEFAULT;
}
+#endif /* __HAVE_PCI_CONF_HOOK */
static void
pcihost_conf_interrupt(void *v, int bus, int dev, int ipin, int swiz, int *ilinep)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic