CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sun Apr 21 23:54:44 UTC 2013 Modified Files: src/sys/dev/pci: pci_subr.c Log Message: - Print PCIe 2.0 or higher capability registers. - Print Link related registers only if the device is PCI Express Endpoint, Legacy PCI Express Endpoint or Root Port of PCI Express Root Complex. - Don't print Root related registers if the device is Root Complex Integrated Endpoint and print if the device is Root Complex Event Collector. - Not Gb/s but GT/s. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/pci_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.104 src/sys/dev/pci/pci_subr.c:1.105 --- src/sys/dev/pci/pci_subr.c:1.104 Sun Apr 21 23:46:06 2013 +++ src/sys/dev/pci/pci_subr.c Sun Apr 21 23:54:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.104 2013/04/21 23:46:06 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.105 2013/04/21 23:54:44 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.104 2013/04/21 23:46:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.105 2013/04/21 23:54:44 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -857,32 +857,64 @@ pci_print_pcie_L1_latency(uint32_t val) } static void +pci_print_pcie_compl_timeout(uint32_t val) +{ + + switch (val) { + case 0x0: + printf("50us to 50ms\n"); + break; + case 0x5: + printf("16ms to 55ms\n"); + break; + case 0x6: + printf("65ms to 210ms\n"); + break; + case 0x9: + printf("260ms to 900ms\n"); + break; + case 0xa: + printf("1s to 3.5s\n"); + break; + default: + printf("unknown %u value\n", val); + break; + } +} + +static void pci_conf_print_pcie_cap(const pcireg_t *regs, int capoff) { pcireg_t reg; /* for each register */ pcireg_t val; /* for each bitfield */ + bool check_link = false; bool check_slot = false; bool check_rootport = false; + unsigned int pciever; static const char * const linkspeeds[] = {"2.5", "5.0", "8.0"}; + int i; printf("\n PCI Express Capabilities Register\n"); /* Capability Register */ reg = regs[o2i(capoff)]; printf("Capability register: %04x\n", reg >> 16); - printf(" Capability version: %x\n", - (unsigned int)((reg & 0x000f) >> 16)); + pciever = (unsigned int)((reg & 0x000f) >> 16); + printf(" Capability version: %u\n", pciever); printf(" Device type: "); switch ((reg & 0x00f0) >> 20) { case 0x0: printf("PCI Express Endpoint device\n"); + check_link = true; break; case 0x1: printf("Legacy PCI Express Endpoint device\n"); + check_link = true; break; case 0x4: printf("Root Port of PCI Express Root Complex\n"); + check_link = true; check_slot = true; - check_rootport = true; /* XXX right? */ + check_rootport = true; break; case 0x5: printf("Upstream Port of PCI Express Switch\n"); @@ -890,7 +922,7 @@ pci_conf_print_pcie_cap(const pcireg_t * case 0x6: printf("Downstream Port of PCI Express Switch\n"); check_slot = true; - check_rootport = true; /* XXX right? */ + check_rootport = true; break; case 0x7: printf("PCI Express to PCI/PCI-X Bridge\n"); @@ -900,9 +932,9 @@ pci_conf_print_pcie_cap(const pcireg_t * break; case 0x9: printf("Root Complex Integrated Endpoint\n"); - check_rootport = true; /* XXX right? */ break; case 0xa: + check_rootport = true; printf("Root Complex Event Collector\n"); break; default: @@ -997,103 +1029,104 @@ pci_conf_print_pcie_cap(const pcireg_t * printf(" Transaction Pending: %s\n", (reg & PCIE_DCSR_TRANSACTION_PND) != 0 ? "on" : "off"); - /* Link Capability Register */ - reg = regs[o2i(capoff + PCIE_LCAP)]; - printf("Link Capabilities Register: 0x%08x\n", reg); - printf(" Maximum Link Speed: "); - val = reg & PCIE_LCAP_MAX_SPEED; - if (val < 1 || val > 3) { - printf("unknown %u value\n", val); - } else { - printf("%sGb/s\n", linkspeeds[val - 1]); - } - printf(" Maximum Link Width: x%u lanes\n", - (unsigned int)(reg & PCIE_LCAP_MAX_WIDTH) >> 4); - printf(" Active State PM Support: "); - val = (reg & PCIE_LCAP_ASPM) >> 10; - switch (val) { - case 0x1: - printf("L0s Entry supported\n"); - break; - case 0x3: - printf("L0s and L1 supported\n"); - break; - default: - printf("Reserved value\n"); - break; - } - printf(" L0 Exit Latency: "); - pci_print_pcie_L0s_latency((reg & PCIE_LCAP_L0S_EXIT) >> 12); - printf(" L1 Exit Latency: "); - pci_print_pcie_L1_latency((reg & PCIE_LCAP_L1_EXIT) >> 15); - printf(" Port Number: %u\n", reg >> 24); - - /* Link Control Register */ - reg = regs[o2i(capoff + PCIE_LCSR)]; - printf("Link Control Register: 0x%04x\n", reg & 0x); - printf(" Active State PM Cont
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sun Apr 21 23:46:06 UTC 2013 Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h Log Message: - Add some PCIe 2.0 or higher capability register definitions. - Rename some registers. - Add comments. - Indent. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.103 src/sys/dev/pci/pci_subr.c:1.104 --- src/sys/dev/pci/pci_subr.c:1.103 Sun Apr 21 19:59:41 2013 +++ src/sys/dev/pci/pci_subr.c Sun Apr 21 23:46:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.103 2013/04/21 19:59:41 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.104 2013/04/21 23:46:06 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.103 2013/04/21 19:59:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.104 2013/04/21 23:46:06 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -1222,10 +1222,10 @@ pci_conf_print_pcie_cap(const pcireg_t * reg = regs[o2i(capoff + PCIE_RSR)]; printf("Root Status Register: %08x\n", reg); printf(" PME Requester ID: %04x\n", - (unsigned int)(reg & PCIE_RSR_REQESTER)); - if ((reg & PCIE_RSR_PMESTAT) != 0) + (unsigned int)(reg & PCIE_RSR_PME_REQESTER)); + if ((reg & PCIE_RSR_PME_STAT) != 0) printf(" PME was asserted\n"); - if ((reg & PCIE_RSR_PMEPEND) != 0) + if ((reg & PCIE_RSR_PME_PEND) != 0) printf(" another PME is pending\n"); } } Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.83 src/sys/dev/pci/pcireg.h:1.84 --- src/sys/dev/pci/pcireg.h:1.83 Sun Apr 21 19:59:41 2013 +++ src/sys/dev/pci/pcireg.h Sun Apr 21 23:46:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.83 2013/04/21 19:59:41 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.84 2013/04/21 23:46:06 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -629,143 +629,179 @@ struct pci_msix_table_entry { /* * PCI Express; access via capability pointer. */ -#define PCIE_XCAP 0x00 /* Capability List & Capabilities - * Register - */ -#define PCIE_XCAP_MASK __BITS(31, 16) +#define PCIE_XCAP 0x00 /* Capability List & Capabilities Register */ +#define PCIE_XCAP_MASK __BITS(31, 16) /* Capability Version */ #define PCIE_XCAP_VER_MASK __SHIFTIN(__BITS(3, 0), PCIE_XCAP_MASK) -#define PCIE_XCAP_VER_1_0 __SHIFTIN(1, PCIE_XCAP_VER_MASK) -#define PCIE_XCAP_VER_2_0 __SHIFTIN(2, PCIE_XCAP_VER_MASK) +#define PCIE_XCAP_VER_1_0 __SHIFTIN(1, PCIE_XCAP_VER_MASK) +#define PCIE_XCAP_VER_2_0 __SHIFTIN(2, PCIE_XCAP_VER_MASK) #define PCIE_XCAP_TYPE_MASK __SHIFTIN(__BITS(7, 4), PCIE_XCAP_MASK) -#define PCIE_XCAP_TYPE_PCIE_DEV __SHIFTIN(0x0, PCIE_XCAP_TYPE_MASK) +#define PCIE_XCAP_TYPE_PCIE_DEV __SHIFTIN(0x0, PCIE_XCAP_TYPE_MASK) #define PCIE_XCAP_TYPE_PCI_DEV __SHIFTIN(0x1, PCIE_XCAP_TYPE_MASK) #define PCIE_XCAP_TYPE_ROOT __SHIFTIN(0x4, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_TYPE_UP __SHIFTIN(0x5, PCIE_XCAP_TYPE_MASK) +#define PCIE_XCAP_TYPE_UP __SHIFTIN(0x5, PCIE_XCAP_TYPE_MASK) #define PCIE_XCAP_TYPE_DOWN __SHIFTIN(0x6, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_TYPE_PCIE2PCI __SHIFTIN(0x7, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_TYPE_PCI2PCIE __SHIFTIN(0x8, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_TYPE_ROOT_INTEP __SHIFTIN(0x9, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_TYPE_ROOT_EVNTC __SHIFTIN(0xa, PCIE_XCAP_TYPE_MASK) -#define PCIE_XCAP_SI __SHIFTIN(__BIT(8), PCIE_XCAP_MASK) /* Slot Implemented */ -#define PCIE_XCAP_IRQ __SHIFTIN(__BITS(13, 9), PCIE_XCAP_MASK) -#define PCIE_DCAP 0x04 /* Device Capabilities Register */ -#define PCIE_DCAP_MAX_PAYLOAD __BITS(2, 0) -#define PCIE_DCAP_PHANTOM_FUNCS __BITS(4, 3) -#define PCIE_DCAP_EXT_TAG_FIELD __BIT(5) -#define PCIE_DCAP_L0S_LATENCY __BITS(8, 6) -#define PCIE_DCAP_L1_LATENCY __BITS(11, 9) -#define PCIE_DCAP_ATTN_BUTTON __BIT(12) -#define PCIE_DCAP_ATTN_IND __BIT(13) -#define PCIE_DCAP_PWR_IND __BIT(14) -#define PCIE_DCAP_ROLE_ERR_RPT __BIT(15) -#define PCIE_DCAP_SLOT_PWR_LIM_VAL __BITS(25, 18) -#define PCIE_DCAP_SLOT_PWR_LIM_SCALE __BITS(27, 26) -#define PCIE_DCAP_FLR __BIT(28) -#define PCIE_DCSR 0x08 /* Device Control & Status Register */ -#define PCIE_DCSR_ENA_COR_ERR __BIT(0) -#define PCIE_DCSR_ENA_NFER __BIT(1) -#define PCIE_DCSR_ENA_FER __BIT(2) -#define PCIE_DCSR_ENA_URR __BIT(3) -#define PCIE_DCSR_ENA_RELAX_ORD __BIT(4) -#define PCIE_DCSR_MAX_PAYLOAD __BITS(7, 5) -#define PCIE_DCSR_EXT_TAG_FIELD __BIT(8) -#define PCIE_DCSR_PHANTOM_FUNCS __BIT(9) -#define PCIE_DCSR_AUX_POWER_PM __BIT(10) -#define PCIE_DCSR_ENA_NO_SNOOP __BIT(11) -#define PCIE_DCSR_MAX_READ_REQ __BITS(14, 12) -#define PCIE_DCSR_BRDG_CFG_RETRY __BI
CVS commit: src/sys
Module Name:src Committed By: msaitoh Date: Sun Apr 21 19:59:41 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm53xx_pax.c src/sys/dev/pci: ahd_pci.c if_alc.c if_athn_pci.c if_bge.c if_bgereg.h if_iwn.c if_wm.c if_wmreg.h pci_subr.c pcireg.h ppb.c Log Message: Delete "PCI_" from PCIX and PICE capability registers. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/broadcom/bcm53xx_pax.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/ahd_pci.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_alc.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_athn_pci.c cvs rdiff -u -r1.237 -r1.238 src/sys/dev/pci/if_bge.c cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/if_bgereg.h cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/if_iwn.c cvs rdiff -u -r1.247 -r1.248 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_wmreg.h src/sys/dev/pci/ppb.c cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.82 -r1.83 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm53xx_pax.c diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.9 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.10 --- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.9 Tue Feb 19 02:15:18 2013 +++ src/sys/arch/arm/broadcom/bcm53xx_pax.c Sun Apr 21 19:59:39 2013 @@ -34,7 +34,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.9 2013/02/19 02:15:18 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.10 2013/04/21 19:59:39 msaitoh Exp $"); #include #include @@ -299,21 +299,21 @@ bcmpax_ccb_attach(device_t parent, devic * This will force the device to negotiate to a max of gen1. */ if (cf->cf_flags & 1) { - bcmpax_conf_write(sc, 0, offset + PCI_PCIE_LCSR2, 1); + bcmpax_conf_write(sc, 0, offset + PCIE_LCSR2, 1); } /* * Now we wait (.25 sec) for the link to come up. */ - offset += PCI_PCIE_LCSR; + offset += PCIE_LCSR; for (size_t timo = 0;; timo++) { const pcireg_t lcsr = bcmpax_conf_read(sc, 0, offset); - sc->sc_linkup = __SHIFTOUT(lcsr, PCI_PCIE_LCSR_NLW) != 0 - && (1 || (lcsr & PCI_PCIE_LCSR_DLACTIVE) != 0); + sc->sc_linkup = __SHIFTOUT(lcsr, PCIE_LCSR_NLW) != 0 + && (1 || (lcsr & PCIE_LCSR_DLACTIVE) != 0); if (sc->sc_linkup || timo == 250) { aprint_debug_dev(self, "lcsr=%#x nlw=%jd linkup=%d, timo=%zu\n", - lcsr, __SHIFTOUT(lcsr, PCI_PCIE_LCSR_NLW), + lcsr, __SHIFTOUT(lcsr, PCIE_LCSR_NLW), sc->sc_linkup, timo); break; } Index: src/sys/dev/pci/ahd_pci.c diff -u src/sys/dev/pci/ahd_pci.c:1.33 src/sys/dev/pci/ahd_pci.c:1.34 --- src/sys/dev/pci/ahd_pci.c:1.33 Fri Dec 30 18:20:46 2011 +++ src/sys/dev/pci/ahd_pci.c Sun Apr 21 19:59:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ahd_pci.c,v 1.33 2011/12/30 18:20:46 christos Exp $ */ +/* $NetBSD: ahd_pci.c,v 1.34 2013/04/21 19:59:40 msaitoh Exp $ */ /* * Product specific probe and attach routines for: @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.33 2011/12/30 18:20:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.34 2013/04/21 19:59:40 msaitoh Exp $"); #define AHD_PCI_IOADDR PCI_MAPREG_START /* I/O Address */ #define AHD_PCI_MEMADDR (PCI_MAPREG_START + 4) /* Mem I/O Address */ @@ -1033,7 +1033,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd * additionally have SG engine splits to look at. */ pcix_status = pci_conf_read(bd->pc, bd->tag, - bd->pcix_off + PCI_PCIX_STATUS); + bd->pcix_off + PCIX_STATUS); printf("%s: PCI Split Interrupt - PCI-X status = 0x%x\n", ahd_name(ahd), pcix_status); @@ -1082,7 +1082,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd /* * Clear PCI-X status bits. */ - pci_conf_write(bd->pc, bd->tag, bd->pcix_off + PCI_PCIX_STATUS, + pci_conf_write(bd->pc, bd->tag, bd->pcix_off + PCIX_STATUS, pcix_status); ahd_outb(ahd, CLRINT, CLRSPLTINT); ahd_restore_modes(ahd, saved_modes); Index: src/sys/dev/pci/if_alc.c diff -u src/sys/dev/pci/if_alc.c:1.8 src/sys/dev/pci/if_alc.c:1.9 --- src/sys/dev/pci/if_alc.c:1.8 Sat Mar 30 03:21:02 2013 +++ src/sys/dev/pci/if_alc.c Sun Apr 21 19:59:40 2013 @@ -567,7 +567,7 @@ alc_aspm(struct alc_softc *sc, int media if ((sc->alc_flags & (ALC_FLAG_APS | ALC_FLAG_PCIE)) == (ALC_FLAG_APS | ALC_FLAG_PCIE)) linkcfg = CSR_READ_2(sc, sc->alc_expcap + - PCI_PCIE_LCSR); + PCIE_LCSR); else linkcfg = 0; pmcfg &= ~PM_CFG_SERDES_PD_EX_L1; @@ -582,7 +582,7 @@ alc_aspm(struct alc_softc *sc, int media if (sc->alc_ident->deviceid == PCI_PRODUCT_ATTANSIC_AR8152_B && sc->alc_rev == ATHEROS_AR8152_B_V10) linkcfg |= 0x80; - CSR_WRITE_2(sc, sc->alc_expcap + PCI_PCIE_LCSR, + CSR_WRITE_2(sc, sc->alc_expcap + PCIE_LCSR, linkcfg); pmcfg &= ~(PM_CFG_EN_BUFS_RX_L0S | PM_CFG_SA_DLY_ENB | PM_CFG_HOTRST); @@ -719,7 +719,7 @@ alc_atta
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: jakllsch Date: Sun Apr 21 19:34:14 UTC 2013 Modified Files: src/external/gpl2/xcvs/dist/src: error.c Log Message: Use LOG_ERR instead of LOG_EMERG, as LOG_EMERG causes syslogd to tell all ttys. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/error.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/dist/src/error.c diff -u src/external/gpl2/xcvs/dist/src/error.c:1.1.1.1 src/external/gpl2/xcvs/dist/src/error.c:1.2 --- src/external/gpl2/xcvs/dist/src/error.c:1.1.1.1 Tue Apr 7 22:10:26 2009 +++ src/external/gpl2/xcvs/dist/src/error.c Sun Apr 21 19:34:13 2013 @@ -208,7 +208,7 @@ memerror: * with the message here. */ #if HAVE_SYSLOG_H -syslog (LOG_DAEMON | LOG_EMERG, "Memory exhausted. Aborting."); +syslog (LOG_DAEMON | LOG_ERR, "Memory exhausted. Aborting."); #endif /* HAVE_SYSLOG_H */ goto sidestep_done; @@ -219,18 +219,18 @@ recursion_error: * error while attempting to send the last error message to the client. */ -syslog (LOG_DAEMON | LOG_EMERG, +syslog (LOG_DAEMON | LOG_ERR, "error (%d, %d) called recursively. Original message was:", last_status, last_errnum); -syslog (LOG_DAEMON | LOG_EMERG, "%s", last_message); +syslog (LOG_DAEMON | LOG_ERR, "%s", last_message); -syslog (LOG_DAEMON | LOG_EMERG, +syslog (LOG_DAEMON | LOG_ERR, "error (%d, %d) called recursively. Second message was:", status, errnum); -syslog (LOG_DAEMON | LOG_EMERG, "%s", buf2); +syslog (LOG_DAEMON | LOG_ERR, "%s", buf2); -syslog (LOG_DAEMON | LOG_EMERG, "Aborting."); +syslog (LOG_DAEMON | LOG_ERR, "Aborting."); #endif /* HAVE_SYSLOG_H */ sidestep_done:
CVS commit: src/include
Module Name:src Committed By: joerg Date: Sun Apr 21 18:41:32 UTC 2013 Modified Files: src/include: string.h Log Message: __BEGIN_DECLS/__END_DECLS To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/include/string.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/string.h diff -u src/include/string.h:1.42 src/include/string.h:1.43 --- src/include/string.h:1.42 Fri Apr 19 23:28:47 2013 +++ src/include/string.h Sun Apr 21 18:41:32 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: string.h,v 1.42 2013/04/19 23:28:47 joerg Exp $ */ +/* $NetBSD: string.h,v 1.43 2013/04/21 18:41:32 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -119,8 +119,10 @@ __END_DECLS typedef struct _locale *locale_t; # define __LOCALE_T_DECLARED # endif +__BEGIN_DECLS int strcoll_l(const char *, const char *, locale_t); size_t strxfrm_l(char * __restrict, const char * __restrict, size_t, locale_t); +__END_DECLS #endif /* _POSIX_C_SOURCE || _NETBSD_SOURCE */ #if _FORTIFY_SOURCE > 0
CVS commit: src/include
Module Name:src Committed By: joerg Date: Sun Apr 21 17:54:56 UTC 2013 Modified Files: src/include: time.h Log Message: strftime_l is part of POSIX2008. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/include/time.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/time.h diff -u src/include/time.h:1.42 src/include/time.h:1.43 --- src/include/time.h:1.42 Sun Apr 21 17:45:46 2013 +++ src/include/time.h Sun Apr 21 17:54:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: time.h,v 1.42 2013/04/21 17:45:46 joerg Exp $ */ +/* $NetBSD: time.h,v 1.43 2013/04/21 17:54:56 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -174,6 +174,16 @@ struct tm *localtime_r(const time_t * __ #endif #endif +#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) +# ifndef __LOCALE_T_DECLARED +typedef struct _locale *locale_t; +# define __LOCALE_T_DECLARED +# endif +size_t strftime_l(char * __restrict, size_t, const char * __restrict, +const struct tm * __restrict, locale_t) +__attribute__((__format__(__strftime__, 3, 0))); +#endif + #if defined(_NETBSD_SOURCE) typedef struct __state *timezone_t; @@ -200,24 +210,14 @@ void tzfree(const timezone_t) __RENAME(_ const char *tzgetname(const timezone_t, int) __RENAME(__tzgetname50); #endif -size_t strftime_z(const timezone_t, char * __restrict, size_t, -const char * __restrict, const struct tm * __restrict) -__attribute__((__format__(__strftime__, 4, 0))); - -#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) -# ifndef __LOCALE_T_DECLARED -typedef struct _locale *locale_t; -# define __LOCALE_T_DECLARED -# endif -size_t strftime_l(char * __restrict, size_t, const char * __restrict, -const struct tm * __restrict, locale_t) -__attribute__((__format__(__strftime__, 3, 0))); size_t strftime_lz(const timezone_t, char * __restrict, size_t, const char * __restrict, const struct tm * __restrict, locale_t) __attribute__((__format__(__strftime__, 4, 0))); +size_t strftime_z(const timezone_t, char * __restrict, size_t, +const char * __restrict, const struct tm * __restrict) +__attribute__((__format__(__strftime__, 4, 0))); char *strptime_l(const char * __restrict, const char * __restrict, struct tm * __restrict, locale_t); -#endif #endif /* _NETBSD_SOURCE */
CVS commit: src
Module Name:src Committed By: joerg Date: Sun Apr 21 17:45:47 UTC 2013 Modified Files: src/include: time.h src/lib/libc/include: namespace.h src/lib/libc/locale: _def_time.c c_locale.c global_locale.c nb_lc_time_misc.h src/lib/libc/time: strftime.c strptime.c Log Message: Store time-specific locale data directly in the locale. Ad dstrftime_l, strftime_lz and strptime_l. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/include/time.h cvs rdiff -u -r1.164 -r1.165 src/lib/libc/include/namespace.h cvs rdiff -u -r1.10 -r1.11 src/lib/libc/locale/_def_time.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/locale/c_locale.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/locale/global_locale.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/locale/nb_lc_time_misc.h cvs rdiff -u -r1.24 -r1.25 src/lib/libc/time/strftime.c cvs rdiff -u -r1.36 -r1.37 src/lib/libc/time/strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/time.h diff -u src/include/time.h:1.41 src/include/time.h:1.42 --- src/include/time.h:1.41 Tue Oct 2 01:42:06 2012 +++ src/include/time.h Sun Apr 21 17:45:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: time.h,v 1.41 2012/10/02 01:42:06 christos Exp $ */ +/* $NetBSD: time.h,v 1.42 2013/04/21 17:45:46 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -204,6 +204,21 @@ size_t strftime_z(const timezone_t, char const char * __restrict, const struct tm * __restrict) __attribute__((__format__(__strftime__, 4, 0))); +#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE) +# ifndef __LOCALE_T_DECLARED +typedef struct _locale *locale_t; +# define __LOCALE_T_DECLARED +# endif +size_t strftime_l(char * __restrict, size_t, const char * __restrict, +const struct tm * __restrict, locale_t) +__attribute__((__format__(__strftime__, 3, 0))); +size_t strftime_lz(const timezone_t, char * __restrict, size_t, +const char * __restrict, const struct tm * __restrict, locale_t) +__attribute__((__format__(__strftime__, 4, 0))); +char *strptime_l(const char * __restrict, const char * __restrict, +struct tm * __restrict, locale_t); +#endif + #endif /* _NETBSD_SOURCE */ __END_DECLS Index: src/lib/libc/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.164 src/lib/libc/include/namespace.h:1.165 --- src/lib/libc/include/namespace.h:1.164 Fri Apr 19 23:32:16 2013 +++ src/lib/libc/include/namespace.h Sun Apr 21 17:45:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.164 2013/04/19 23:32:16 joerg Exp $ */ +/* $NetBSD: namespace.h,v 1.165 2013/04/21 17:45:46 joerg Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -613,10 +613,13 @@ #define strcoll_l _strcoll_l #define strdup _strdup #define stresep _stresep +#define strftime_l _strftime_l +#define strftime_lz _strftime_lz #define strftime_z _strftime_z #define strndup _strndup #define strncasecmp _strncasecmp #define strptime _strptime +#define strptime_l _strptime_l #define strsep _strsep #define strsignal _strsignal #define strsuftoll _strsuftoll Index: src/lib/libc/locale/_def_time.c diff -u src/lib/libc/locale/_def_time.c:1.10 src/lib/libc/locale/_def_time.c:1.11 --- src/lib/libc/locale/_def_time.c:1.10 Sat May 17 03:49:54 2008 +++ src/lib/libc/locale/_def_time.c Sun Apr 21 17:45:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _def_time.c,v 1.10 2008/05/17 03:49:54 ginsbach Exp $ */ +/* $NetBSD: _def_time.c,v 1.11 2013/04/21 17:45:46 joerg Exp $ */ /* * Written by J.T. Conklin . @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _def_time.c,v 1.10 2008/05/17 03:49:54 ginsbach Exp $"); +__RCSID("$NetBSD: _def_time.c,v 1.11 2013/04/21 17:45:46 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -38,5 +38,3 @@ const _TimeLocale _DefaultTimeLocale = "%H:%M:%S", "%I:%M:%S %p" }; - -const _TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale; Index: src/lib/libc/locale/c_locale.c diff -u src/lib/libc/locale/c_locale.c:1.1 src/lib/libc/locale/c_locale.c:1.2 --- src/lib/libc/locale/c_locale.c:1.1 Sun Apr 14 23:44:54 2013 +++ src/lib/libc/locale/c_locale.c Sun Apr 21 17:45:46 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: c_locale.c,v 1.1 2013/04/14 23:44:54 joerg Exp $ */ +/* $NetBSD: c_locale.c,v 1.2 2013/04/21 17:45:46 joerg Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: c_locale.c,v 1.1 2013/04/14 23:44:54 joerg Exp $"); +__RCSID("$NetBSD: c_locale.c,v 1.2 2013/04/21 17:45:46 joerg Exp $"); #include #include @@ -168,6 +168,8 @@ static const struct _locale __C_locale = __UNCONST(&_DefaultNumericLocale), [(size_t)LC_MESSAGES] = (_locale_part_t) __UNCONST(&_DefaultMessagesLocale), + [(size_t)LC_TIME] = (_locale_part_t) + __UNCONST(&_DefaultTimeLocale), }, }; Index: src/lib/libc/locale/glo
CVS commit: src/sys/arch
Module Name:src Committed By: kiyohara Date: Sun Apr 21 15:42:12 UTC 2013 Modified Files: src/sys/arch/bebox/bebox: machdep.c src/sys/arch/evbppc/ev64260: gt_mainbus.c src/sys/arch/macppc/macppc: pic_ohare.c src/sys/arch/ofppc/ofppc: mainbus.c src/sys/arch/prep/prep: machdep.c src/sys/arch/sandpoint/sandpoint: machdep.c Log Message: Fix hangup to interrupt on cascading PIC. tested on bebox and evbppc/OPENBLOCKS600. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/bebox/bebox/machdep.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbppc/ev64260/gt_mainbus.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/macppc/pic_ohare.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/ofppc/ofppc/mainbus.c cvs rdiff -u -r1.73 -r1.74 src/sys/arch/prep/prep/machdep.c cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sandpoint/sandpoint/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/bebox/bebox/machdep.c diff -u src/sys/arch/bebox/bebox/machdep.c:1.106 src/sys/arch/bebox/bebox/machdep.c:1.107 --- src/sys/arch/bebox/bebox/machdep.c:1.106 Sat Oct 13 17:58:54 2012 +++ src/sys/arch/bebox/bebox/machdep.c Sun Apr 21 15:42:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.106 2012/10/13 17:58:54 jdc Exp $ */ +/* $NetBSD: machdep.c,v 1.107 2013/04/21 15:42:11 kiyohara Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2012/10/13 17:58:54 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2013/04/21 15:42:11 kiyohara Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -164,7 +164,7 @@ cpu_startup(void) /* * set up i8259 as a cascade on BeInterruptController irq 26. */ - intr_establish(16 + 26, IST_LEVEL, IPL_NONE, pic_handle_intr, isa_pic); + intr_establish(16 + 26, IST_LEVEL, IPL_HIGH, pic_handle_intr, isa_pic); oea_install_extint(pic_ext_intr); Index: src/sys/arch/evbppc/ev64260/gt_mainbus.c diff -u src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.17 src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.18 --- src/sys/arch/evbppc/ev64260/gt_mainbus.c:1.17 Fri Jul 1 20:46:39 2011 +++ src/sys/arch/evbppc/ev64260/gt_mainbus.c Sun Apr 21 15:42:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: gt_mainbus.c,v 1.17 2011/07/01 20:46:39 dyoung Exp $ */ +/* $NetBSD: gt_mainbus.c,v 1.18 2013/04/21 15:42:11 kiyohara Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gt_mainbus.c,v 1.17 2011/07/01 20:46:39 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt_mainbus.c,v 1.18 2013/04/21 15:42:11 kiyohara Exp $"); #include "opt_ev64260.h" #include "opt_pci.h" @@ -203,13 +203,13 @@ gt_attach(device_t parent, device_t self GPP_EXTERNAL_INTERRUPS); discovery_pic->pic_cookie = sc; - intr_establish(IRQ_GPP7_0, IST_LEVEL, IPL_NONE, + intr_establish(IRQ_GPP7_0, IST_LEVEL, IPL_HIGH, pic_handle_intr, discovery_gpp_pic[0]); - intr_establish(IRQ_GPP15_8, IST_LEVEL, IPL_NONE, + intr_establish(IRQ_GPP15_8, IST_LEVEL, IPL_HIGH, pic_handle_intr, discovery_gpp_pic[1]); - intr_establish(IRQ_GPP23_16, IST_LEVEL, IPL_NONE, + intr_establish(IRQ_GPP23_16, IST_LEVEL, IPL_HIGH, pic_handle_intr, discovery_gpp_pic[2]); - intr_establish(IRQ_GPP31_24, IST_LEVEL, IPL_NONE, + intr_establish(IRQ_GPP31_24, IST_LEVEL, IPL_HIGH, pic_handle_intr, discovery_gpp_pic[3]); cpumstr = bus_space_read_4(sc->sc_iot, sc->sc_ioh, GT_CPU_Master_Ctl); Index: src/sys/arch/macppc/macppc/pic_ohare.c diff -u src/sys/arch/macppc/macppc/pic_ohare.c:1.11 src/sys/arch/macppc/macppc/pic_ohare.c:1.12 --- src/sys/arch/macppc/macppc/pic_ohare.c:1.11 Tue Mar 13 18:24:54 2012 +++ src/sys/arch/macppc/macppc/pic_ohare.c Sun Apr 21 15:42:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_ohare.c,v 1.11 2012/03/13 18:24:54 macallan Exp $ */ +/* $NetBSD: pic_ohare.c,v 1.12 2013/04/21 15:42:11 kiyohara Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pic_ohare.c,v 1.11 2012/03/13 18:24:54 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_ohare.c,v 1.12 2013/04/21 15:42:11 kiyohara Exp $"); #include "opt_interrupt.h" @@ -160,7 +160,7 @@ setup_ohare2(uint32_t addr, int irq) pic = setup_ohare(addr, 0); strcpy(pic->pic.pic_name, "ohare2"); - intr_establish(irq, IST_LEVEL, IPL_NONE, pic_handle_intr, pic); + intr_establish(irq, IST_LEVEL, IPL_HIGH, pic_handle_intr, pic); } static void Index: src/sys/arch/ofppc/ofppc/mainbus.c diff -u src/sys/arch/ofppc/ofppc/mainbus.c:1.28 src/sys/arch/ofppc/ofppc/mainbus.c:1.29 --- src/sys/arch/ofppc/ofppc/mainbus.c:1.28 Thu Jun 30 00:52:58 2011 +++ src/sys/arch/ofppc/ofppc/mainbus.c Sun Apr 21 15:42:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.28 2011/06/30 00:52:58 matt Exp $ */ +/* $NetBSD: mainbus.c,v 1
CVS commit: src/etc/etc.x68k
Module Name:src Committed By: isaki Date: Sun Apr 21 08:47:28 UTC 2013 Added Files: src/etc/etc.x68k: rc.conf.append Log Message: Add powerd=YES in default. It's recommended for a power switch on x68k. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/etc/etc.x68k/rc.conf.append Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/etc/etc.x68k/rc.conf.append diff -u /dev/null src/etc/etc.x68k/rc.conf.append:1.1 --- /dev/null Sun Apr 21 08:47:28 2013 +++ src/etc/etc.x68k/rc.conf.append Sun Apr 21 08:47:28 2013 @@ -0,0 +1,7 @@ +# $NetBSD: rc.conf.append,v 1.1 2013/04/21 08:47:28 isaki Exp $ +# +# Arch-specific rc.conf(5) configuration. + +# powerd(8) is recommended for a front power switch. +# +powerd=YES
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Sun Apr 21 08:38:17 UTC 2013 Modified Files: src/sys/dev/spi: m25p.c Log Message: Add support for STMicro M25PX64 and Numonyx N25Q128. Obtained from Marvell, Semihalf. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/m25p.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/spi/m25p.c diff -u src/sys/dev/spi/m25p.c:1.2 src/sys/dev/spi/m25p.c:1.3 --- src/sys/dev/spi/m25p.c:1.2 Sun May 4 14:21:55 2008 +++ src/sys/dev/spi/m25p.c Sun Apr 21 08:38:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: m25p.c,v 1.2 2008/05/04 14:21:55 xtraeme Exp $ */ +/* $NetBSD: m25p.c,v 1.3 2013/04/21 08:38:16 rkujawa Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.2 2008/05/04 14:21:55 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.3 2013/04/21 08:38:16 rkujawa Exp $"); #include #include @@ -93,6 +93,8 @@ static const struct m25p_info { } m25p_infos[] = { { 0x16, 0x20, 0x2017, "STMicro M25P64", 8192, 64 }, /* 64Mbit */ { 0x12, 0x20, 0x2013, "STMicro M25P40", 512, 64 }, /* 4Mbit */ + { 0xc0, 0x20, 0x7117, "STMicro M25PX64", 8192, 64 }, /* 64Mbit */ + { 0x0, 0x20, 0xBB18, "Numonyx N25Q128", 16384, 64 }, /* 128Mbit */ { 0 } };