Source-Changes-HG archive

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

[src/trunk]: src/sys make pci_intr_string and eisa_intr_string take a buffer ...



details:   https://anonhg.NetBSD.org/src/rev/a033e3694614
branches:  trunk
changeset: 794966:a033e3694614
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 29 19:28:24 2014 +0000

description:
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.

diffstat:

 sys/arch/algor/algor/algor_p4032_intr.c       |  11 +++++----
 sys/arch/algor/algor/algor_p5064_intr.c       |  11 +++++----
 sys/arch/algor/algor/algor_p6032_intr.c       |  11 +++++----
 sys/arch/alpha/eisa/eisa_machdep.c            |  11 +--------
 sys/arch/alpha/include/eisa_machdep.h         |   5 +--
 sys/arch/alpha/include/pci_machdep.h          |   5 +--
 sys/arch/alpha/jensenio/lpt_jensenio.c        |   6 ++--
 sys/arch/alpha/pci/pci_machdep.c              |  11 +--------
 sys/arch/alpha/sableio/com_sableio.c          |   8 +++---
 sys/arch/alpha/sableio/fdc_sableio.c          |   8 +++---
 sys/arch/alpha/sableio/lpt_sableio.c          |   8 +++---
 sys/arch/alpha/sableio/pckbc_sableio.c        |   8 +++---
 sys/arch/amiga/include/pci_machdep.h          |  10 ++++----
 sys/arch/amiga/pci/pci_machdep.c              |  10 ++++----
 sys/arch/arc/include/pci_machdep.h            |   8 +++---
 sys/arch/arc/pci/necpb.c                      |  20 ++++++++++--------
 sys/arch/arm/footbridge/footbridge_pci.c      |  28 +++++++++++---------------
 sys/arch/arm/gemini/gemini_pci.c              |  13 +++++------
 sys/arch/arm/include/pci_machdep.h            |   9 ++++---
 sys/arch/arm/marvell/pci_machdep.c            |  14 +++++-------
 sys/arch/arm/s3c2xx0/s3c2800_pci.c            |  11 +++++----
 sys/arch/arm/xscale/becc_pci.c                |  11 +++++----
 sys/arch/atari/include/pci_machdep.h          |   4 +-
 sys/arch/atari/pci/pci_machdep.c              |  12 ++++------
 sys/arch/cobalt/include/pci_machdep.h         |   4 +-
 sys/arch/cobalt/pci/pci_machdep.c             |  14 +++++-------
 sys/arch/dreamcast/include/pci_machdep.h      |   9 ++++---
 sys/arch/evbarm/cp3100/cp3100_pci.c           |  11 +++++----
 sys/arch/evbarm/hdl_g/hdlg_pci.c              |  11 +++++----
 sys/arch/evbarm/ifpga/ifpga_pci.c             |  19 +++++------------
 sys/arch/evbarm/iq31244/iq31244_pci.c         |  11 +++++----
 sys/arch/evbarm/iq80310/iq80310_pci.c         |  14 +++++-------
 sys/arch/evbarm/iq80321/iq80321_pci.c         |  11 +++++----
 sys/arch/evbarm/ixdp425/ixdp425_pci.c         |  14 +++++-------
 sys/arch/evbarm/ixm1200/ixm1200_pci.c         |  14 +++++-------
 sys/arch/evbarm/ixm1200/nappi_nppb.c          |   7 +++--
 sys/arch/evbarm/npwr_fc/npwr_fc_pci.c         |  11 +++++----
 sys/arch/evbarm/nslu2/nslu2_pci.c             |  22 +++++++++++++-------
 sys/arch/evbmips/gdium/gdium_intr.c           |  11 +++++----
 sys/arch/evbmips/loongson/generic2e_machdep.c |   8 +++---
 sys/arch/evbmips/loongson/loongson_intr.c     |  25 +++++++++++------------
 sys/arch/evbmips/loongson/loongson_intr.h     |   6 ++--
 sys/arch/evbmips/loongson/yeeloong_machdep.c  |  11 +++++----
 sys/arch/evbmips/malta/malta_intr.c           |  13 ++++++-----
 sys/arch/evbmips/malta/pci/pcib.c             |  16 ++++++--------
 sys/arch/hpcmips/include/pci_machdep.h        |   9 ++++---
 sys/arch/hpcmips/vr/vrc4172pci.c              |  16 +++++++-------
 sys/arch/hpcmips/vr/vrc4173bcu.c              |   7 +++--
 sys/arch/hppa/dev/ssio.c                      |   5 ++-
 sys/arch/hppa/include/eisa_machdep.h          |   6 ++--
 sys/arch/hppa/include/pci_machdep.h           |   7 +++--
 sys/arch/i386/eisa/eisa_machdep.c             |  17 +++++++--------
 sys/arch/i386/include/eisa_machdep.h          |   5 ++-
 sys/arch/i386/pci/gcscehci.c                  |   7 +++--
 sys/arch/iyonix/iyonix/iyonix_pci.c           |  11 +++++----
 sys/arch/landisk/include/pci_machdep.h        |   9 ++++---
 sys/arch/landisk/landisk/shpcic_machdep.c     |  12 ++++------
 sys/arch/macppc/dev/if_gm.c                   |   7 +++--
 sys/arch/macppc/dev/kauai.c                   |   8 ++++--
 sys/arch/mips/adm5120/dev/admpci.c            |  14 +++++-------
 sys/arch/mips/alchemy/dev/aupci.c             |  14 +++++-------
 sys/arch/mips/atheros/dev/arpci.c             |   9 ++++---
 sys/arch/mips/include/isa_machdep.h           |   6 ++--
 sys/arch/mips/include/pci_machdep.h           |   9 ++++---
 sys/arch/mips/sibyte/pci/sbbrz_pci.c          |  22 ++++++++++++--------
 sys/arch/powerpc/booke/e500_intr.c            |  11 +++++----
 sys/arch/powerpc/booke/pci/pq3pci.c           |  14 +++++++-----
 sys/arch/powerpc/include/booke/intr.h         |   6 ++--
 sys/arch/powerpc/include/pci_machdep.h        |  15 ++++++++-----
 sys/arch/powerpc/pci/pci_machdep_common.c     |  12 ++++------
 sys/arch/powerpc/powerpc/intr_stubs.c         |   8 +++---
 sys/arch/prep/eisa/eisa_machdep.c             |  13 +++++------
 sys/arch/prep/include/eisa_machdep.h          |   5 ++-
 sys/arch/sandpoint/include/pci_machdep.h      |   5 ++-
 sys/arch/sandpoint/pci/pci_machdep.c          |  13 +++++------
 sys/arch/sgimips/gio/pci_gio.c                |  17 +++++++--------
 sys/arch/sgimips/include/eisa_machdep.h       |   5 ++-
 sys/arch/sgimips/include/pci_machdep.h        |   7 +++--
 sys/arch/sgimips/mace/pci_mace.c              |  16 +++++++-------
 sys/arch/sgimips/pci/pci_machdep.c            |   9 ++++---
 sys/arch/sparc/include/pci_machdep.h          |   5 ++-
 sys/arch/sparc/sparc/pci_machdep.c            |  12 +++++-----
 sys/arch/sparc64/dev/pci_machdep.c            |  15 ++++++-------
 sys/arch/sparc64/include/pci_machdep.h        |   5 ++-
 sys/arch/x86/include/intr.h                   |   4 +-
 sys/arch/x86/include/pci_machdep_common.h     |   5 ++-
 sys/arch/x86/pci/pci_intr_machdep.c           |  12 ++++++----
 sys/arch/x86/pci/pciide_machdep.c             |   7 +++--
 sys/arch/x86/x86/intr.c                       |  17 +++++++--------
 sys/arch/xen/xen/pci_intr_machdep.c           |  16 +++++++-------
 sys/arch/xen/xen/pciback.c                    |  11 +++++----
 sys/dev/eisa/ahb.c                            |   7 +++--
 sys/dev/eisa/ahc_eisa.c                       |   7 +++--
 sys/dev/eisa/bha_eisa.c                       |   7 +++--
 sys/dev/eisa/cac_eisa.c                       |   7 +++--
 sys/dev/eisa/depca_eisa.c                     |   7 +++--
 sys/dev/eisa/dpt_eisa.c                       |   7 +++--
 sys/dev/eisa/eisareg.h                        |   6 ++++-
 sys/dev/eisa/if_ep_eisa.c                     |   7 +++--
 sys/dev/eisa/if_fea.c                         |   7 +++--
 sys/dev/eisa/if_tlp_eisa.c                    |   7 +++--
 sys/dev/eisa/mlx_eisa.c                       |   7 +++--
 sys/dev/eisa/uha_eisa.c                       |   7 +++--
 sys/dev/pci/aac_pci.c                         |   7 +++--
 sys/dev/pci/adv_pci.c                         |   7 +++--
 sys/dev/pci/adw_pci.c                         |   7 +++--
 sys/dev/pci/ahc_pci.c                         |   7 +++--
 sys/dev/pci/ahcisata_pci.c                    |  11 +++++----
 sys/dev/pci/ahd_pci.c                         |   7 +++--
 sys/dev/pci/amr.c                             |   7 +++--
 sys/dev/pci/arcmsr.c                          |   7 +++--
 sys/dev/pci/artsata.c                         |  11 +++++----
 sys/dev/pci/atppc_puc.c                       |   8 ++++--
 sys/dev/pci/auacer.c                          |   7 +++--
 sys/dev/pci/auich.c                           |   7 +++--
 sys/dev/pci/auixp.c                           |   7 +++--
 sys/dev/pci/autri.c                           |   7 +++--
 sys/dev/pci/auvia.c                           |   7 +++--
 sys/dev/pci/azalia.c                          |   7 +++--
 sys/dev/pci/bha_pci.c                         |   7 +++--
 sys/dev/pci/bktr/bktr_os.c                    |  10 +++++---
 sys/dev/pci/btvmei.c                          |   7 +++--
 sys/dev/pci/cac_pci.c                         |   7 +++--
 sys/dev/pci/ciss_pci.c                        |   7 +++--
 sys/dev/pci/cmpci.c                           |   7 +++--
 sys/dev/pci/com_puc.c                         |   7 +++--
 sys/dev/pci/coram.c                           |   7 +++--
 sys/dev/pci/cs4280.c                          |   7 +++--
 sys/dev/pci/cs4281.c                          |   7 +++--
 sys/dev/pci/cxdtv.c                           |   7 +++--
 sys/dev/pci/cy_pci.c                          |   7 +++--
 sys/dev/pci/cz.c                              |   7 +++--
 sys/dev/pci/dpt_pci.c                         |   7 +++--
 sys/dev/pci/eap.c                             |   7 +++--
 sys/dev/pci/ehci_pci.c                        |   7 +++--
 sys/dev/pci/emuxki.c                          |   7 +++--
 sys/dev/pci/esa.c                             |   7 +++--
 sys/dev/pci/esm.c                             |   7 +++--
 sys/dev/pci/eso.c                             |   7 +++--
 sys/dev/pci/fms.c                             |   7 +++--
 sys/dev/pci/fwohci_pci.c                      |   7 +++--
 sys/dev/pci/gcscaudio.c                       |   7 +++--
 sys/dev/pci/hdaudio/hdaudio_pci.c             |   7 +++--
 sys/dev/pci/hifn7751.c                        |   7 +++--
 sys/dev/pci/iavc_pci.c                        |   8 ++++--
 sys/dev/pci/ichsmb.c                          |   7 +++--
 sys/dev/pci/icp_pci.c                         |   7 +++--
 sys/dev/pci/if_age.c                          |   7 +++--
 sys/dev/pci/if_alc.c                          |   3 +-
 sys/dev/pci/if_ale.c                          |   7 +++--
 sys/dev/pci/if_an_pci.c                       |   7 +++--
 sys/dev/pci/if_ath_pci.c                      |   7 +++--
 sys/dev/pci/if_athn_pci.c                     |   7 +++--
 sys/dev/pci/if_atw_pci.c                      |   7 +++--
 sys/dev/pci/if_bce.c                          |   7 +++--
 sys/dev/pci/if_bge.c                          |   7 +++--
 sys/dev/pci/if_bnx.c                          |   7 +++--
 sys/dev/pci/if_bwi_pci.c                      |   7 +++--
 sys/dev/pci/if_cas.c                          |   7 +++--
 sys/dev/pci/if_de.c                           |   8 ++++--
 sys/dev/pci/if_dge.c                          |   7 +++--
 sys/dev/pci/if_en_pci.c                       |   7 +++--
 sys/dev/pci/if_ep_pci.c                       |   7 +++--
 sys/dev/pci/if_epic_pci.c                     |   7 +++--
 sys/dev/pci/if_esh_pci.c                      |   7 +++--
 sys/dev/pci/if_et.c                           |   7 +++--
 sys/dev/pci/if_ex_pci.c                       |   7 +++--
 sys/dev/pci/if_fpa.c                          |   7 +++--
 sys/dev/pci/if_fxp_pci.c                      |   7 +++--
 sys/dev/pci/if_gem_pci.c                      |   7 +++--
 sys/dev/pci/if_hme_pci.c                      |   7 +++--
 sys/dev/pci/if_ipw.c                          |   7 +++--
 sys/dev/pci/if_iwi.c                          |   7 +++--
 sys/dev/pci/if_iwn.c                          |   7 +++--
 sys/dev/pci/if_jme.c                          |   7 +++--
 sys/dev/pci/if_kse.c                          |   7 +++--
 sys/dev/pci/if_le_pci.c                       |   7 +++--
 sys/dev/pci/if_lii.c                          |   7 +++--
 sys/dev/pci/if_lmc.c                          |   7 +++--
 sys/dev/pci/if_malo_pci.c                     |   7 +++--
 sys/dev/pci/if_msk.c                          |   7 +++--
 sys/dev/pci/if_mtd_pci.c                      |   7 +++--
 sys/dev/pci/if_ne_pci.c                       |   7 +++--
 sys/dev/pci/if_nfe.c                          |   7 +++--
 sys/dev/pci/if_ntwoc_pci.c                    |   7 +++--
 sys/dev/pci/if_pcn.c                          |   7 +++--
 sys/dev/pci/if_ral_pci.c                      |   7 +++--
 sys/dev/pci/if_re_pci.c                       |   7 +++--
 sys/dev/pci/if_rtk_pci.c                      |   7 +++--
 sys/dev/pci/if_rtw_pci.c                      |   7 +++--
 sys/dev/pci/if_sf_pci.c                       |   7 +++--
 sys/dev/pci/if_sip.c                          |   7 +++--
 sys/dev/pci/if_sk.c                           |   7 +++--
 sys/dev/pci/if_ste.c                          |   7 +++--
 sys/dev/pci/if_stge.c                         |   7 +++--
 sys/dev/pci/if_ti.c                           |   7 +++--
 sys/dev/pci/if_tl.c                           |   7 +++--
 sys/dev/pci/if_tlp_pci.c                      |   7 +++--
 sys/dev/pci/if_txp.c                          |   7 +++--
 sys/dev/pci/if_vge.c                          |   7 +++--
 sys/dev/pci/if_vr.c                           |   7 +++--
 sys/dev/pci/if_vte.c                          |   7 +++--
 sys/dev/pci/if_wi_pci.c                       |   7 +++--
 sys/dev/pci/if_wm.c                           |   7 +++--
 sys/dev/pci/if_wpi.c                          |   7 +++--
 sys/dev/pci/if_xge.c                          |   7 +++--
 sys/dev/pci/ifpci.c                           |   9 ++++---
 sys/dev/pci/ifpci2.c                          |   9 ++++---
 sys/dev/pci/iha_pci.c                         |   7 +++--
 sys/dev/pci/iop_pci.c                         |   7 +++--
 sys/dev/pci/isic_pci.c                        |   7 +++--
 sys/dev/pci/isp_pci.c                         |   7 +++--
 sys/dev/pci/iwic_pci.c                        |   7 +++--
 sys/dev/pci/ixgbe/ixgbe.c                     |   5 ++-
 sys/dev/pci/jmide.c                           |   7 +++--
 sys/dev/pci/lpt_puc.c                         |   7 +++--
 sys/dev/pci/mfi_pci.c                         |   7 +++--
 sys/dev/pci/mlx_pci.c                         |   7 +++--
 sys/dev/pci/mly.c                             |   7 +++--
 sys/dev/pci/mpii.c                            |   7 +++--
 sys/dev/pci/mpt_pci.c                         |   7 +++--
 sys/dev/pci/mvsata_pci.c                      |   7 +++--
 sys/dev/pci/n8/nsp.c                          |   3 +-
 sys/dev/pci/neo.c                             |   7 +++--
 sys/dev/pci/njs_pci.c                         |   7 +++--
 sys/dev/pci/oboe.c                            |   7 +++--
 sys/dev/pci/ohci_pci.c                        |   7 +++--
 sys/dev/pci/pccbb.c                           |   7 +++--
 sys/dev/pci/pciide_common.c                   |   7 +++--
 sys/dev/pci/pcireg.h                          |   7 +++++-
 sys/dev/pci/pcivar.h                          |   4 +-
 sys/dev/pci/pcscp.c                           |   7 +++--
 sys/dev/pci/pdcsata.c                         |   7 +++--
 sys/dev/pci/piixpm.c                          |   7 +++--
 sys/dev/pci/rtsx_pci.c                        |   7 +++--
 sys/dev/pci/satalink.c                        |   7 +++--
 sys/dev/pci/sdhc_pci.c                        |   7 +++--
 sys/dev/pci/siisata_pci.c                     |   7 +++--
 sys/dev/pci/siop_pci_common.c                 |   7 +++--
 sys/dev/pci/sv.c                              |   7 +++--
 sys/dev/pci/svwsata.c                         |   7 +++--
 sys/dev/pci/tga.c                             |   7 +++--
 sys/dev/pci/trm.c                             |   7 +++--
 sys/dev/pci/twa.c                             |   7 +++--
 sys/dev/pci/twe.c                             |   7 +++--
 sys/dev/pci/ubsec.c                           |   7 +++--
 sys/dev/pci/uhci_pci.c                        |   7 +++--
 sys/dev/pci/universe_pci.c                    |   7 +++--
 sys/dev/pci/viaide.c                          |   7 +++--
 sys/dev/pci/virtio.c                          |   7 +++--
 sys/dev/pci/voodoofb.c                        |   7 +++--
 sys/dev/pci/voyager.c                         |   7 +++--
 sys/dev/pci/xhci_pci.c                        |   7 +++--
 sys/dev/pci/yds.c                             |   7 +++--
 254 files changed, 1150 insertions(+), 975 deletions(-)

diffs (truncated from 9069 to 300 lines):

diff -r f0086cddbc1c -r a033e3694614 sys/arch/algor/algor/algor_p4032_intr.c
--- a/sys/arch/algor/algor/algor_p4032_intr.c   Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/algor/algor/algor_p4032_intr.c   Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_intr.c,v 1.24 2011/07/09 16:03:00 matt Exp $       */
+/*     $NetBSD: algor_p4032_intr.c,v 1.25 2014/03/29 19:28:25 christos Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.24 2011/07/09 16:03:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.25 2014/03/29 19:28:25 christos Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -221,7 +221,7 @@
 
 int    algor_p4032_pci_intr_map(const struct pci_attach_args *,
            pci_intr_handle_t *);
-const char *algor_p4032_pci_intr_string(void *, pci_intr_handle_t);
+const char *algor_p4032_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 const struct evcnt *algor_p4032_pci_intr_evcnt(void *, pci_intr_handle_t);
 void   *algor_p4032_pci_intr_establish(void *, pci_intr_handle_t, int,
            int (*)(void *), void *);
@@ -532,13 +532,14 @@
 }
 
 const char *
-algor_p4032_pci_intr_string(void *v, pci_intr_handle_t ih)
+algor_p4032_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
 {
 
        if (ih >= NPCIIRQS)
                panic("algor_p4032_intr_string: bogus IRQ %ld", ih);
 
-       return (p4032_intrnames[ih]);
+       strlcpy(buf, p4032_intrnames[ih], len);
+       return buf;
 }
 
 const struct evcnt *
diff -r f0086cddbc1c -r a033e3694614 sys/arch/algor/algor/algor_p5064_intr.c
--- a/sys/arch/algor/algor/algor_p5064_intr.c   Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/algor/algor/algor_p5064_intr.c   Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p5064_intr.c,v 1.27 2011/07/09 16:03:00 matt Exp $       */
+/*     $NetBSD: algor_p5064_intr.c,v 1.28 2014/03/29 19:28:25 christos Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.27 2011/07/09 16:03:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.28 2014/03/29 19:28:25 christos Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -292,7 +292,7 @@
 
 int    algor_p5064_pci_intr_map(const struct pci_attach_args *,
            pci_intr_handle_t *);
-const char *algor_p5064_pci_intr_string(void *, pci_intr_handle_t);
+const char *algor_p5064_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 const struct evcnt *algor_p5064_pci_intr_evcnt(void *, pci_intr_handle_t);
 void   *algor_p5064_pci_intr_establish(void *, pci_intr_handle_t, int,
            int (*)(void *), void *);
@@ -620,13 +620,14 @@
 }
 
 const char *
-algor_p5064_pci_intr_string(void *v, pci_intr_handle_t ih)
+algor_p5064_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
 {
 
        if (ih >= NPCIIRQS)
                panic("algor_p5064_intr_string: bogus IRQ %ld", ih);
 
-       return (p5064_intrnames[ih]);
+       strlcpy(buf, p5064_intrnames[ih], len);
+       return buf;
 }
 
 const struct evcnt *
diff -r f0086cddbc1c -r a033e3694614 sys/arch/algor/algor/algor_p6032_intr.c
--- a/sys/arch/algor/algor/algor_p6032_intr.c   Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/algor/algor/algor_p6032_intr.c   Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p6032_intr.c,v 1.21 2011/07/09 16:03:00 matt Exp $       */
+/*     $NetBSD: algor_p6032_intr.c,v 1.22 2014/03/29 19:28:25 christos Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.21 2011/07/09 16:03:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.22 2014/03/29 19:28:25 christos Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -177,7 +177,7 @@
 
 int    algor_p6032_pci_intr_map(const struct pci_attach_args *,
            pci_intr_handle_t *);
-const char *algor_p6032_pci_intr_string(void *, pci_intr_handle_t);
+const char *algor_p6032_pci_intr_string(void *, pci_intr_handle_t, char *, size_t);
 const struct evcnt *algor_p6032_pci_intr_evcnt(void *, pci_intr_handle_t);
 void   *algor_p6032_pci_intr_establish(void *, pci_intr_handle_t, int,
            int (*)(void *), void *);
@@ -477,13 +477,14 @@
 }
 
 const char *
-algor_p6032_pci_intr_string(void *v, pci_intr_handle_t ih)
+algor_p6032_pci_intr_string(void *v, pci_intr_handle_t ih, char *buf, size_t len)
 {
 
        if (ih >= NIRQMAPS)
                panic("algor_p6032_intr_string: bogus IRQ %ld", ih);
 
-       return (p6032_intrnames[ih]);
+       strlcpy(buf, p6032_intrnames[ih], len);
+       return buf;
 }
 
 const struct evcnt *
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/eisa/eisa_machdep.c
--- a/sys/arch/alpha/eisa/eisa_machdep.c        Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/eisa/eisa_machdep.c        Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa_machdep.c,v 1.11 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: eisa_machdep.c,v 1.12 2014/03/29 19:28:25 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.11 2014/03/21 16:39:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.12 2014/03/29 19:28:25 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -677,10 +677,3 @@
        *dp = ecuio->ecuio_io;
        return (0);
 }
-
-const char *
-eisa_intr_string(eisa_chipset_tag_t c, eisa_intr_handle_t handle)
-{
-       static char buf[64];
-       return eisa_intr_string_internal(c, handle, buf, sizeof(buf));
-}
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/include/eisa_machdep.h
--- a/sys/arch/alpha/include/eisa_machdep.h     Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/include/eisa_machdep.h     Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa_machdep.h,v 1.11 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: eisa_machdep.h,v 1.12 2014/03/29 19:28:25 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -57,7 +57,7 @@
     (*(c)->ec_maxslots)((c)->ec_v)
 #define        eisa_intr_map(c, i, hp)                                         \
     (*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
-#define        eisa_intr_string_internal(c, h, buf, len)                       \
+#define        eisa_intr_string(c, h, buf, len)                                \
     (*(c)->ec_intr_string)((c)->ec_v, (h), (buf), (len))
 #define        eisa_intr_evcnt(c, h)                                           \
     (*(c)->ec_intr_evcnt)((c)->ec_v, (h))
@@ -80,7 +80,6 @@
  */
 
 void   eisa_init(eisa_chipset_tag_t);
-const char *eisa_intr_string(eisa_chipset_tag_t, eisa_intr_handle_t);
 
 extern bus_size_t eisa_config_stride;
 extern paddr_t eisa_config_addr;
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/include/pci_machdep.h
--- a/sys/arch/alpha/include/pci_machdep.h      Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/include/pci_machdep.h      Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.h,v 1.17 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: pci_machdep.h,v 1.18 2014/03/29 19:28:25 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -91,7 +91,7 @@
     (*(c)->pc_conf_write)((c)->pc_conf_v, (t), (r), (v))
 #define        pci_intr_map(pa, ihp)                                           \
     (*(pa)->pa_pc->pc_intr_map)((pa), (ihp))
-#define        pci_intr_string_internal(c, ih, buf, len)                       \
+#define        pci_intr_string(c, ih, buf, len)                                \
     (*(c)->pc_intr_string)((c)->pc_intr_v, (ih), (buf), (len))
 #define        pci_intr_evcnt(c, ih)                                           \
     (*(c)->pc_intr_evcnt)((c)->pc_intr_v, (ih))
@@ -104,7 +104,6 @@
  * alpha-specific PCI functions.
  * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
  */
-const char    *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t);
 void   pci_display_console(bus_space_tag_t, bus_space_tag_t,
            pci_chipset_tag_t, int, int, int);
 #define        alpha_pciide_compat_intr_establish(c, d, p, ch, f, a)           \
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/jensenio/lpt_jensenio.c
--- a/sys/arch/alpha/jensenio/lpt_jensenio.c    Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/jensenio/lpt_jensenio.c    Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lpt_jensenio.c,v 1.12 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: lpt_jensenio.c,v 1.13 2014/03/29 19:28:25 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.12 2014/03/21 16:39:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.13 2014/03/29 19:28:25 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,7 +107,7 @@
 
        lpt_attach_subr(sc);
 
-       intrstr = eisa_intr_string_internal(ja->ja_ec, ja->ja_irq[0],
+       intrstr = eisa_intr_string(ja->ja_ec, ja->ja_irq[0],
            buf, sizeof(buf));
        jsc->sc_ih = eisa_intr_establish(ja->ja_ec, ja->ja_irq[0],
            IST_EDGE, IPL_TTY, lptintr, sc);
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/pci/pci_machdep.c
--- a/sys/arch/alpha/pci/pci_machdep.c  Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/pci/pci_machdep.c  Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_machdep.c,v 1.21 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: pci_machdep.c,v 1.22 2014/03/29 19:28:25 christos Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.21 2014/03/21 16:39:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.22 2014/03/29 19:28:25 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -120,10 +120,3 @@
                prop_dictionary_set_bool(dict, "is_console", true);
        }
 }
-
-const char *
-pci_intr_string(pci_chipset_tag_t c, pci_intr_handle_t handle)
-{
-       static char buf[64];
-       return pci_intr_string_internal(c, handle, buf, sizeof(buf));
-}
diff -r f0086cddbc1c -r a033e3694614 sys/arch/alpha/sableio/com_sableio.c
--- a/sys/arch/alpha/sableio/com_sableio.c      Sat Mar 29 19:26:28 2014 +0000
+++ b/sys/arch/alpha/sableio/com_sableio.c      Sat Mar 29 19:28:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com_sableio.c,v 1.12 2014/03/21 16:39:29 christos Exp $ */
+/* $NetBSD: com_sableio.c,v 1.13 2014/03/29 19:28:25 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: com_sableio.c,v 1.12 2014/03/21 16:39:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_sableio.c,v 1.13 2014/03/29 19:28:25 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -90,7 +90,7 @@
        struct com_softc *sc = &ssc->sc_com;
        struct sableio_attach_args *sa = aux;
        const char *intrstr;
-       char buf[64];
+       char buf[PCI_INTRSTR_LEN];
        bus_space_handle_t ioh;
 
        sc->sc_dev = self;
@@ -106,7 +106,7 @@
 
        com_attach_subr(sc);
 



Home | Main Index | Thread Index | Old Index