From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 04:49:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F1691065675; Sun, 7 Jun 2009 04:49:25 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE048FC1B; Sun, 7 Jun 2009 04:49:25 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n574nPcd081886; Sun, 7 Jun 2009 04:49:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n574nNgV081882; Sun, 7 Jun 2009 04:49:23 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906070449.n574nNgV081882@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 7 Jun 2009 04:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193610 - in stable/7/games/fortune: . datfiles fortune X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 04:49:26 -0000 Author: edwin Date: Sun Jun 7 04:49:23 2009 New Revision: 193610 URL: http://svn.freebsd.org/changeset/base/193610 Log: MFC of r193486 Misc fixed to fortunes PR: conf/112024 Submitted by: Niclas Zeising Modified: stable/7/games/fortune/ (props changed) stable/7/games/fortune/datfiles/ (props changed) stable/7/games/fortune/datfiles/fortunes stable/7/games/fortune/datfiles/fortunes-o.real stable/7/games/fortune/datfiles/freebsd-tips (props changed) stable/7/games/fortune/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/fortunes ============================================================================== --- stable/7/games/fortune/datfiles/fortunes Sun Jun 7 04:45:50 2009 (r193609) +++ stable/7/games/fortune/datfiles/fortunes Sun Jun 7 04:49:23 2009 (r193610) @@ -674,8 +674,9 @@ Liza Minnelli. % ... with liberty and justice for all who can afford it. % - 12 + 144 + 20 + 3(4) 2 - ---------------------- + 5(11) = 9 + 0 + 1/2 + 12 + 144 + 20 + 3*4 2 + ---------------------- + 5 * 11 = 9 + 0 7 A dozen, a gross and a score, @@ -758,7 +759,7 @@ his honeymoon a chastened man. He'd bec A farm in the country side had several turkeys, it was known as the house of seven gobbles. % - A father gave his teen-age daughter an untrained pedigreed pup for + A father gave his teenage daughter an untrained pedigreed pup for her birthday. An hour later, when wandered through the house, he found her looking at a puddle in the center of the kitchen. "My pup," she murmured sadly, "runneth over." @@ -2541,7 +2542,7 @@ library and I'm half way through the sec should find what I'm looking for by mid May. I hope I can remember what it was by the time I find it. I had this idea for a new horror film, "VMS Manuals from Hell" or maybe -"The Paper Chase : IBM vs. DEC". It's based on Hitchcock's "The Birds", except +"The Paper Chase: IBM vs. DEC". It's based on Hitchcock's "The Birds", except that it's centered around a programmer who is attacked by a swarm of binder pages with an index number and the single line "This page intentionally left blank." @@ -2935,7 +2936,7 @@ Esther and hustle them off to prison. They can't prove who they are because they've left their passports in their hotel room. For three weeks they're tortured day and night to get them to name their contacts in the liberation -movement.. Finally they're hauled in front of a military court, +movement. Finally they're hauled in front of a military court, charged with espionage, and sentenced to death. The next morning they're lined up in front of the wall where they'll be shot. The sergeant in charge of the firing squad asks them @@ -2992,7 +2993,7 @@ a girl should not do before twenty." "Your mother is right," said the executive, "I don't like a large audience, either." % - NEW YORK-- Kraft Foods, Inc. announced today that its board of + NEW YORK -- Kraft Foods, Inc. announced today that its board of directors unanimously rejected the $11 billion takeover bid by Philip Morris and Co. A Kraft spokesman stated in a press conference that the offer was rejected because the $90-per-share bid did not reflect the @@ -4077,7 +4078,7 @@ right! Can I have a dollar?" % The master programmer moves from program to program without fear. No change in management can harm him. He will not be fired, even if the project -is canceled. Why is this? He is filled with the Tao. +is canceled. Why is this? He is filled with the Tao. -- Geoffrey James, "The Tao of Programming" % The Minnesota Board of Education voted to consider requiring all @@ -4242,7 +4243,7 @@ With a lot of these folks you'd have to make sure that they are Earthlings. Then there's the police. In Portland, when some guy goes bananas, the cops rope off a sixteen block area around him and call a shrink from the medical school who stands atop a patrol car -with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! +with a megaphone and shouts, "OK! THIS! ALL! STARTED! WHEN! YOU! WERE! THREE! YEARS! OLD! ON! ACCOUNT! OF! YOUR MOTHER! RIGHT? SO! LET'S! TALK! ABOUT! IT!" Down here they don't waste that kind of time. The LAPD has SWAT teams composed of guys who make Darth Vader look like Mr. Peepers. @@ -4377,7 +4378,7 @@ against a wall, and this was inscribed o warlord Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?" "An operating system," replied the programmer. - The warlord uttered an exclamation of disbelief. "Surely an + The warlord uttered an exclamation of disbelief. "Surely an accounting package is trivial next to the complexity of an operating system," he said. "Not so," said the programmer, "when designing an accounting package, @@ -4387,7 +4388,7 @@ tax laws. By contrast, an operating sys appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design." - The warlord of Wu nodded and smiled. "That is all good and well," + The warlord of Wu nodded and smiled. "That is all good and well," he said, "but which is easier to debug?" The programmer made no reply. -- Geoffrey James, "The Tao of Programming" @@ -4828,7 +4829,7 @@ invariably he can't speak English, and i sure, little lady, it's eleven-thirty. Wanna get high? Don't bother thinking that instant lust will turn into the real thing. It may, but then you may also wake up one morning to find you're the Queen of -Rumania. +Romania. -- Cynthia Hemiel, "Sex Tips for Girls" % "When you wake up in the morning, Pooh," said Piglet at last, @@ -5270,9 +5271,9 @@ marked "450 volts", react as you would n For those who have had too much of Esalen, Topanga, and Kairos. Tired of being genuine all the time? Would you like to learn how to be a little phony again? Have you disclosed so much that you're -beginning to avoid people? Have you touched so many people that -they're all beginning to feel the same? Like to be a little dependent? -Are perfect orgasms beginning to bore you? Would you like, for once, +beginning to avoid people? Have you touched so many people that +they're all beginning to feel the same? Like to be a little dependent? +Are perfect orgasms beginning to bore you? Would you like, for once, not to express a feeling? Or better yet, not be in touch with it at all? Come to us. We promise to relieve you of the burden of your great potential. @@ -6572,7 +6573,7 @@ A critic is a bundle of biases held loos -- Whitney Balliett % A "critic" is a man who creates nothing and thereby feels -qualified to judge the work of creative men. There is logic +qualified to judge the work of creative men. There is logic in this; he is unbiased -- he hates all creative people equally. % A cynic is a person searching for an honest man, with a stolen lantern. @@ -7264,7 +7265,7 @@ A little inaccuracy sometimes saves tons % A little kid went up to Santa and asked him, "Santa, you know when I'm bad right?" And Santa says, "Yes, I do." The little kid then asks, "And you -know when I'm sleeping?" To which Santa replies, "Every minute." So the +know when I'm sleeping?" To which Santa replies, "Every minute." So the little kid then says, "Well, if you know when I'm bad and when I'm good, then how come you don't know what I want for Christmas?" % Modified: stable/7/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/7/games/fortune/datfiles/fortunes-o.real Sun Jun 7 04:45:50 2009 (r193609) +++ stable/7/games/fortune/datfiles/fortunes-o.real Sun Jun 7 04:49:23 2009 (r193610) @@ -1636,7 +1636,7 @@ Jerry Falwell, would get upset about see claim," he jeered, "that my client came at you with a broken bottle in his hand. But is it not true, that you had something in YOUR hand?" - "Yes," he admitted, "his wife. Very charming, of course, but + "Yes," he admitted, "his wife. Very charming, of course, but not much good in a fight." % The devout Jew was beside himself because his son had been dating From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:08:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 748F0106564A; Sun, 7 Jun 2009 05:08:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61A548FC16; Sun, 7 Jun 2009 05:08:21 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5758Lw5082336; Sun, 7 Jun 2009 05:08:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5758L1Z082335; Sun, 7 Jun 2009 05:08:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070508.n5758L1Z082335@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193612 - in stable/7/sys: . contrib/pf dev/age dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:08:22 -0000 Author: yongari Date: Sun Jun 7 05:08:20 2009 New Revision: 193612 URL: http://svn.freebsd.org/changeset/base/193612 Log: MFC r192418: pci(4) handles PCIM_CMD_INTxDIS so there is no need to poke this bit in driver. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/age/if_age.c stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/dev/age/if_age.c ============================================================================== --- stable/7/sys/dev/age/if_age.c Sun Jun 7 04:58:34 2009 (r193611) +++ stable/7/sys/dev/age/if_age.c Sun Jun 7 05:08:20 2009 (r193612) @@ -1477,23 +1477,11 @@ age_resume(device_t dev) { struct age_softc *sc; struct ifnet *ifp; - uint16_t cmd; sc = device_get_softc(dev); AGE_LOCK(sc); - /* - * Clear INTx emulation disable for hardwares that - * is set in resume event. From Linux. - */ - cmd = pci_read_config(sc->age_dev, PCIR_COMMAND, 2); - if ((cmd & 0x0400) != 0) { - cmd &= ~0x0400; - pci_write_config(sc->age_dev, PCIR_COMMAND, cmd, 2); - } - AGE_UNLOCK(sc); age_phy_reset(sc); - AGE_LOCK(sc); ifp = sc->age_ifp; if ((ifp->if_flags & IFF_UP) != 0) age_init_locked(sc); From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:12:52 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A3C106566C; Sun, 7 Jun 2009 05:12:52 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9DE78FC0A; Sun, 7 Jun 2009 05:12:51 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n575Cof2082477; Sun, 7 Jun 2009 05:12:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n575CoBr082476; Sun, 7 Jun 2009 05:12:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070512.n575CoBr082476@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193613 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/nfe X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:12:52 -0000 Author: yongari Date: Sun Jun 7 05:12:50 2009 New Revision: 193613 URL: http://svn.freebsd.org/changeset/base/193613 Log: MFC r192706: NVIDIA MCP controllers have no Rx buffer alignment restrictions. Remove PAGE_SIZE alignment used in Rx buffer DMA tag creation. The alignment restriction was used in old local jumbo allocator and nfe(4) switched to UMA backed page allocator for jumbo frame. This change should fix jumbo buffer allocation failure. Reported by: Pascal Braun ( pascal.braun <> continum dot net ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/nfe/if_nfe.c Modified: stable/7/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/7/sys/dev/nfe/if_nfe.c Sun Jun 7 05:08:20 2009 (r193612) +++ stable/7/sys/dev/nfe/if_nfe.c Sun Jun 7 05:12:50 2009 (r193613) @@ -1153,7 +1153,7 @@ nfe_alloc_jrx_ring(struct nfe_softc *sc, /* Create DMA tag for jumbo Rx buffers. */ error = bus_dma_tag_create(sc->nfe_parent_tag, - PAGE_SIZE, 0, /* alignment, boundary */ + 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:22:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32484106564A; Sun, 7 Jun 2009 05:22:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF348FC17; Sun, 7 Jun 2009 05:22:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n575MMVd082704; Sun, 7 Jun 2009 05:22:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n575MMWB082703; Sun, 7 Jun 2009 05:22:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070522.n575MMWB082703@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193614 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:22:24 -0000 Author: yongari Date: Sun Jun 7 05:22:22 2009 New Revision: 193614 URL: http://svn.freebsd.org/changeset/base/193614 Log: MFC r190314: Togging ALLMULTI does not require controller reset so have Rx filtering handle this. Introduce a new function msk_rxfilter that handles Rx filter configuration and multicast setup as well as promiscuous mode. This simplifies code a lot. Promiscuous mode always have preference to any other Rx filtering so don't disable the mode when ALLMULTI is set. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/msk/if_msk.c Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sun Jun 7 05:12:50 2009 (r193613) +++ stable/7/sys/dev/msk/if_msk.c Sun Jun 7 05:22:22 2009 (r193614) @@ -287,9 +287,8 @@ static int msk_miibus_writereg(device_t, static void msk_miibus_statchg(device_t); static void msk_link_task(void *, int); -static void msk_setmulti(struct msk_if_softc *); +static void msk_rxfilter(struct msk_if_softc *); static void msk_setvlan(struct msk_if_softc *, struct ifnet *); -static void msk_setpromisc(struct msk_if_softc *); static void msk_stats_clear(struct msk_if_softc *); static void msk_stats_update(struct msk_if_softc *); @@ -560,7 +559,7 @@ msk_link_task(void *arg, int pending) } static void -msk_setmulti(struct msk_if_softc *sc_if) +msk_rxfilter(struct msk_if_softc *sc_if) { struct msk_softc *sc; struct ifnet *ifp; @@ -577,15 +576,14 @@ msk_setmulti(struct msk_if_softc *sc_if) bzero(mchash, sizeof(mchash)); mode = GMAC_READ_2(sc, sc_if->msk_port, GM_RX_CTRL); - mode |= GM_RXCR_UCF_ENA; - if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { - if ((ifp->if_flags & IFF_PROMISC) != 0) - mode &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA); - else if ((ifp->if_flags & IFF_ALLMULTI) != 0) { - mchash[0] = 0xffff; - mchash[1] = 0xffff; - } + if ((ifp->if_flags & IFF_PROMISC) != 0) + mode &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA); + else if ((ifp->if_flags & IFF_ALLMULTI) != 0) { + mode |= GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA; + mchash[0] = 0xffff; + mchash[1] = 0xffff; } else { + mode |= GM_RXCR_UCF_ENA; IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -598,7 +596,8 @@ msk_setmulti(struct msk_if_softc *sc_if) mchash[crc >> 5] |= 1 << (crc & 0x1f); } IF_ADDR_UNLOCK(ifp); - mode |= GM_RXCR_MCF_ENA; + if (mchash[0] != 0 || mchash[1] != 0) + mode |= GM_RXCR_MCF_ENA; } GMAC_WRITE_2(sc, sc_if->msk_port, GM_MC_ADDR_H1, @@ -631,26 +630,6 @@ msk_setvlan(struct msk_if_softc *sc_if, } } -static void -msk_setpromisc(struct msk_if_softc *sc_if) -{ - struct msk_softc *sc; - struct ifnet *ifp; - uint16_t mode; - - MSK_IF_LOCK_ASSERT(sc_if); - - sc = sc_if->msk_softc; - ifp = sc_if->msk_ifp; - - mode = GMAC_READ_2(sc, sc_if->msk_port, GM_RX_CTRL); - if (ifp->if_flags & IFF_PROMISC) - mode &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA); - else - mode |= (GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA); - GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_CTRL, mode); -} - static int msk_init_rx_ring(struct msk_if_softc *sc_if) { @@ -954,10 +933,8 @@ msk_ioctl(struct ifnet *ifp, u_long comm if ((ifp->if_flags & IFF_UP) != 0) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { if (((ifp->if_flags ^ sc_if->msk_if_flags) - & IFF_PROMISC) != 0) { - msk_setpromisc(sc_if); - msk_setmulti(sc_if); - } + & (IFF_PROMISC | IFF_ALLMULTI)) != 0) + msk_rxfilter(sc_if); } else { if (sc_if->msk_detach == 0) msk_init_locked(sc_if); @@ -973,7 +950,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm case SIOCDELMULTI: MSK_IF_LOCK(sc_if); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) - msk_setmulti(sc_if); + msk_rxfilter(sc_if); MSK_IF_UNLOCK(sc_if); break; case SIOCGIFMEDIA: @@ -3594,11 +3571,8 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_OPER_ON | GMF_RX_F_FL_ON); - /* Set promiscuous mode. */ - msk_setpromisc(sc_if); - - /* Set multicast filter. */ - msk_setmulti(sc_if); + /* Set receive filter. */ + msk_rxfilter(sc_if); /* Flush Rx MAC FIFO on any flow control or error. */ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_MSK), From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:41:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D58106566B; Sun, 7 Jun 2009 05:41:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8758FC18; Sun, 7 Jun 2009 05:41:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n575fDsa083182; Sun, 7 Jun 2009 05:41:13 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n575fDBq083180; Sun, 7 Jun 2009 05:41:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070541.n575fDBq083180@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193615 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/nge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:41:15 -0000 Author: yongari Date: Sun Jun 7 05:41:13 2009 New Revision: 193615 URL: http://svn.freebsd.org/changeset/base/193615 Log: MFC r192288-192292,192294,192297-192299: r192288: Use ANSI C declarations for all functions. r192289: Remove register keyword. r192290: Remove trailling whitespaces. r192291: Remove return statement at the end of functions that return void. r192292: style(9) - space after keyword. r192294: s/u_int8_t/uint8_t/g s/u_int16_t/uint16_t/g s/u_int32_t/uint32_t/g r192297: style(9) r192298: Consistently use tab characters instead of spaces. r192299: Remove extra parenthesis used in macros. These macros are not used in driver, though. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/nge/if_nge.c stable/7/sys/dev/nge/if_ngereg.h Modified: stable/7/sys/dev/nge/if_nge.c ============================================================================== --- stable/7/sys/dev/nge/if_nge.c Sun Jun 7 05:22:22 2009 (r193614) +++ stable/7/sys/dev/nge/if_nge.c Sun Jun 7 05:41:13 2009 (r193615) @@ -151,7 +151,7 @@ static int nge_attach(device_t); static int nge_detach(device_t); static int nge_newbuf(struct nge_softc *, struct nge_desc *, struct mbuf *); -static int nge_encap(struct nge_softc *, struct mbuf *, u_int32_t *); +static int nge_encap(struct nge_softc *, struct mbuf *, uint32_t *); #ifdef NGE_FIXUP_RX static __inline void nge_fixup_rx (struct mbuf *); #endif @@ -174,11 +174,11 @@ static void nge_ifmedia_sts(struct ifnet static void nge_delay(struct nge_softc *); static void nge_eeprom_idle(struct nge_softc *); static void nge_eeprom_putbyte(struct nge_softc *, int); -static void nge_eeprom_getword(struct nge_softc *, int, u_int16_t *); +static void nge_eeprom_getword(struct nge_softc *, int, uint16_t *); static void nge_read_eeprom(struct nge_softc *, caddr_t, int, int, int); static void nge_mii_sync(struct nge_softc *); -static void nge_mii_send(struct nge_softc *, u_int32_t, int); +static void nge_mii_send(struct nge_softc *, uint32_t, int); static int nge_mii_readreg(struct nge_softc *, struct nge_mii_frame *); static int nge_mii_writereg(struct nge_softc *, struct nge_mii_frame *); @@ -244,22 +244,18 @@ DRIVER_MODULE(miibus, nge, miibus_driver CSR_WRITE_4(sc, NGE_MEAR, CSR_READ_4(sc, NGE_MEAR) & ~(x)) static void -nge_delay(sc) - struct nge_softc *sc; +nge_delay(struct nge_softc *sc) { - int idx; + int idx; for (idx = (300 / 33) + 1; idx > 0; idx--) CSR_READ_4(sc, NGE_CSR); - - return; } static void -nge_eeprom_idle(sc) - struct nge_softc *sc; +nge_eeprom_idle(struct nge_softc *sc) { - register int i; + int i; SIO_SET(NGE_MEAR_EE_CSEL); nge_delay(sc); @@ -278,19 +274,15 @@ nge_eeprom_idle(sc) SIO_CLR(NGE_MEAR_EE_CSEL); nge_delay(sc); CSR_WRITE_4(sc, NGE_MEAR, 0x00000000); - - return; } /* * Send a read command and address to the EEPROM, check for ACK. */ static void -nge_eeprom_putbyte(sc, addr) - struct nge_softc *sc; - int addr; +nge_eeprom_putbyte(struct nge_softc *sc, int addr) { - register int d, i; + int d, i; d = addr | NGE_EECMD_READ; @@ -309,21 +301,16 @@ nge_eeprom_putbyte(sc, addr) SIO_CLR(NGE_MEAR_EE_CLK); nge_delay(sc); } - - return; } /* * Read a word of data stored in the EEPROM at address 'addr.' */ static void -nge_eeprom_getword(sc, addr, dest) - struct nge_softc *sc; - int addr; - u_int16_t *dest; +nge_eeprom_getword(struct nge_softc *sc, int addr, uint16_t *dest) { - register int i; - u_int16_t word = 0; + int i; + uint16_t word = 0; /* Force EEPROM to idle state. */ nge_eeprom_idle(sc); @@ -357,44 +344,34 @@ nge_eeprom_getword(sc, addr, dest) nge_eeprom_idle(sc); *dest = word; - - return; } /* * Read a sequence of words from the EEPROM. */ static void -nge_read_eeprom(sc, dest, off, cnt, swap) - struct nge_softc *sc; - caddr_t dest; - int off; - int cnt; - int swap; +nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt, int swap) { - int i; - u_int16_t word = 0, *ptr; + int i; + uint16_t word = 0, *ptr; for (i = 0; i < cnt; i++) { nge_eeprom_getword(sc, off + i, &word); - ptr = (u_int16_t *)(dest + (i * 2)); + ptr = (uint16_t *)(dest + (i * 2)); if (swap) *ptr = ntohs(word); else *ptr = word; } - - return; } /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ static void -nge_mii_sync(sc) - struct nge_softc *sc; +nge_mii_sync(struct nge_softc *sc) { - register int i; + int i; SIO_SET(NGE_MEAR_MII_DIR|NGE_MEAR_MII_DATA); @@ -404,29 +381,24 @@ nge_mii_sync(sc) SIO_CLR(NGE_MEAR_MII_CLK); DELAY(1); } - - return; } /* * Clock a series of bits through the MII. */ static void -nge_mii_send(sc, bits, cnt) - struct nge_softc *sc; - u_int32_t bits; - int cnt; +nge_mii_send(struct nge_softc *sc, uint32_t bits, int cnt) { - int i; + int i; SIO_CLR(NGE_MEAR_MII_CLK); for (i = (0x1 << (cnt - 1)); i; i >>= 1) { - if (bits & i) { + if (bits & i) { SIO_SET(NGE_MEAR_MII_DATA); - } else { + } else { SIO_CLR(NGE_MEAR_MII_DATA); - } + } DELAY(1); SIO_CLR(NGE_MEAR_MII_CLK); DELAY(1); @@ -438,12 +410,9 @@ nge_mii_send(sc, bits, cnt) * Read an PHY register through the MII. */ static int -nge_mii_readreg(sc, frame) - struct nge_softc *sc; - struct nge_mii_frame *frame; - +nge_mii_readreg(struct nge_softc *sc, struct nge_mii_frame *frame) { - int i, ack; + int i, ack; /* * Set up frame for RX. @@ -452,7 +421,7 @@ nge_mii_readreg(sc, frame) frame->mii_opcode = NGE_MII_READOP; frame->mii_turnaround = 0; frame->mii_data = 0; - + CSR_WRITE_4(sc, NGE_MEAR, 0); /* @@ -490,7 +459,7 @@ nge_mii_readreg(sc, frame) * need to clock through 16 cycles to keep the PHY(s) in sync. */ if (ack) { - for(i = 0; i < 16; i++) { + for (i = 0; i < 16; i++) { SIO_CLR(NGE_MEAR_MII_CLK); DELAY(1); SIO_SET(NGE_MEAR_MII_CLK); @@ -519,18 +488,15 @@ fail: DELAY(1); if (ack) - return(1); - return(0); + return (1); + return (0); } /* * Write to a PHY register through the MII. */ static int -nge_mii_writereg(sc, frame) - struct nge_softc *sc; - struct nge_mii_frame *frame; - +nge_mii_writereg(struct nge_softc *sc, struct nge_mii_frame *frame) { /* @@ -540,7 +506,7 @@ nge_mii_writereg(sc, frame) frame->mii_stdelim = NGE_MII_STARTDELIM; frame->mii_opcode = NGE_MII_WRITEOP; frame->mii_turnaround = NGE_MII_TURNAROUND; - + /* * Turn on data output. */ @@ -566,16 +532,14 @@ nge_mii_writereg(sc, frame) */ SIO_CLR(NGE_MEAR_MII_DIR); - return(0); + return (0); } static int -nge_miibus_readreg(dev, phy, reg) - device_t dev; - int phy, reg; +nge_miibus_readreg(device_t dev, int phy, int reg) { - struct nge_softc *sc; - struct nge_mii_frame frame; + struct nge_softc *sc; + struct nge_mii_frame frame; sc = device_get_softc(dev); @@ -585,16 +549,14 @@ nge_miibus_readreg(dev, phy, reg) frame.mii_regaddr = reg; nge_mii_readreg(sc, &frame); - return(frame.mii_data); + return (frame.mii_data); } static int -nge_miibus_writereg(dev, phy, reg, data) - device_t dev; - int phy, reg, data; +nge_miibus_writereg(device_t dev, int phy, int reg, int data) { - struct nge_softc *sc; - struct nge_mii_frame frame; + struct nge_softc *sc; + struct nge_mii_frame frame; sc = device_get_softc(dev); @@ -605,16 +567,15 @@ nge_miibus_writereg(dev, phy, reg, data) frame.mii_data = data; nge_mii_writereg(sc, &frame); - return(0); + return (0); } static void -nge_miibus_statchg(dev) - device_t dev; +nge_miibus_statchg(device_t dev) { - int status; - struct nge_softc *sc; - struct mii_data *mii; + int status; + struct nge_softc *sc; + struct mii_data *mii; sc = device_get_softc(dev); if (sc->nge_tbi) { @@ -631,7 +592,7 @@ nge_miibus_statchg(dev) NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); } - } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) + } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) != IFM_FDX) { NGE_CLRBIT(sc, NGE_TX_CFG, (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); @@ -662,17 +623,15 @@ nge_miibus_statchg(dev) NGE_CLRBIT(sc, NGE_CFG, NGE_CFG_MODE_1000); } } - return; } static void -nge_setmulti(sc) - struct nge_softc *sc; +nge_setmulti(struct nge_softc *sc) { - struct ifnet *ifp; - struct ifmultiaddr *ifma; - u_int32_t h = 0, i, filtsave; - int bit, index; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + uint32_t h = 0, i, filtsave; + int bit, index; NGE_LOCK_ASSERT(sc); ifp = sc->nge_ifp; @@ -723,15 +682,12 @@ nge_setmulti(sc) IF_ADDR_UNLOCK(ifp); CSR_WRITE_4(sc, NGE_RXFILT_CTL, filtsave); - - return; } static void -nge_reset(sc) - struct nge_softc *sc; +nge_reset(struct nge_softc *sc) { - register int i; + int i; NGE_SETBIT(sc, NGE_CSR, NGE_CSR_RESET); @@ -752,8 +708,6 @@ nge_reset(sc) */ CSR_WRITE_4(sc, NGE_CLKRUN, NGE_CLKRUN_PMESTS); CSR_WRITE_4(sc, NGE_CLKRUN, 0); - - return; } /* @@ -761,23 +715,22 @@ nge_reset(sc) * IDs against our list and return a device name if we find a match. */ static int -nge_probe(dev) - device_t dev; +nge_probe(device_t dev) { - struct nge_type *t; + struct nge_type *t; t = nge_devs; - while(t->nge_name != NULL) { + while (t->nge_name != NULL) { if ((pci_get_vendor(dev) == t->nge_vid) && (pci_get_device(dev) == t->nge_did)) { device_set_desc(dev, t->nge_name); - return(BUS_PROBE_DEFAULT); + return (BUS_PROBE_DEFAULT); } t++; } - return(ENXIO); + return (ENXIO); } /* @@ -785,13 +738,12 @@ nge_probe(dev) * setup and ethernet/BPF attach. */ static int -nge_attach(dev) - device_t dev; +nge_attach(device_t dev) { - u_char eaddr[ETHER_ADDR_LEN]; - struct nge_softc *sc; - struct ifnet *ifp = NULL; - int error = 0, rid; + u_char eaddr[ETHER_ADDR_LEN]; + struct nge_softc *sc; + struct ifnet *ifp = NULL; + int error = 0, rid; sc = device_get_softc(dev); sc->nge_dev = dev; @@ -877,10 +829,10 @@ nge_attach(dev) if (CSR_READ_4(sc, NGE_CFG) & NGE_CFG_TBI_EN) { sc->nge_tbi = 1; device_printf(dev, "Using TBI\n"); - + sc->nge_miibus = dev; - ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd, + ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd, nge_ifmedia_sts); #define ADD(m, c) ifmedia_add(&sc->nge_ifmedia, (m), (c), NULL) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, 0), 0); @@ -889,16 +841,16 @@ nge_attach(dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0), 0); #undef ADD device_printf(dev, " 1000baseSX, 1000baseSX-FDX, auto\n"); - - ifmedia_set(&sc->nge_ifmedia, + + ifmedia_set(&sc->nge_ifmedia, IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0)); - + CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) - | NGE_GPIO_GP4_OUT - | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB + | NGE_GPIO_GP4_OUT + | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB | NGE_GPIO_GP3_OUTENB | NGE_GPIO_GP3_IN | NGE_GPIO_GP4_IN); - + } else { device_printf(dev, "MII without any PHY!\n"); error = ENXIO; @@ -934,15 +886,14 @@ fail: if (sc->nge_res) bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res); NGE_LOCK_DESTROY(sc); - return(error); + return (error); } static int -nge_detach(dev) - device_t dev; +nge_detach(device_t dev) { - struct nge_softc *sc; - struct ifnet *ifp; + struct nge_softc *sc; + struct ifnet *ifp; sc = device_get_softc(dev); ifp = sc->nge_ifp; @@ -971,19 +922,18 @@ nge_detach(dev) NGE_LOCK_DESTROY(sc); - return(0); + return (0); } /* * Initialize the transmit descriptors. */ static int -nge_list_tx_init(sc) - struct nge_softc *sc; +nge_list_tx_init(struct nge_softc *sc) { - struct nge_list_data *ld; - struct nge_ring_data *cd; - int i; + struct nge_list_data *ld; + struct nge_ring_data *cd; + int i; cd = &sc->nge_cdata; ld = sc->nge_ldata; @@ -1007,7 +957,7 @@ nge_list_tx_init(sc) cd->nge_tx_prod = cd->nge_tx_cons = cd->nge_tx_cnt = 0; - return(0); + return (0); } @@ -1017,19 +967,18 @@ nge_list_tx_init(sc) * points back to the first. */ static int -nge_list_rx_init(sc) - struct nge_softc *sc; +nge_list_rx_init(struct nge_softc *sc) { - struct nge_list_data *ld; - struct nge_ring_data *cd; - int i; + struct nge_list_data *ld; + struct nge_ring_data *cd; + int i; ld = sc->nge_ldata; cd = &sc->nge_cdata; for (i = 0; i < NGE_RX_LIST_CNT; i++) { if (nge_newbuf(sc, &ld->nge_rx_list[i], NULL) == ENOBUFS) - return(ENOBUFS); + return (ENOBUFS); if (i == (NGE_RX_LIST_CNT - 1)) { ld->nge_rx_list[i].nge_nextdesc = &ld->nge_rx_list[0]; @@ -1046,17 +995,14 @@ nge_list_rx_init(sc) cd->nge_rx_prod = 0; sc->nge_head = sc->nge_tail = NULL; - return(0); + return (0); } /* * Initialize an RX descriptor and attach an MBUF cluster. */ static int -nge_newbuf(sc, c, m) - struct nge_softc *sc; - struct nge_desc *c; - struct mbuf *m; +nge_newbuf(struct nge_softc *sc, struct nge_desc *c, struct mbuf *m) { if (m == NULL) { @@ -1068,34 +1014,33 @@ nge_newbuf(sc, c, m) m->m_len = m->m_pkthdr.len = MCLBYTES; - m_adj(m, sizeof(u_int64_t)); + m_adj(m, sizeof(uint64_t)); c->nge_mbuf = m; c->nge_ptr = vtophys(mtod(m, caddr_t)); c->nge_ctl = m->m_len; c->nge_extsts = 0; - return(0); + return (0); } #ifdef NGE_FIXUP_RX static __inline void -nge_fixup_rx(m) - struct mbuf *m; -{ - int i; - uint16_t *src, *dst; - +nge_fixup_rx(struct mbuf *m) +{ + int i; + uint16_t *src, *dst; + src = mtod(m, uint16_t *); dst = src - 1; - + for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++) *dst++ = *src++; - + m->m_data -= ETHER_ALIGN; - + return; -} +} #endif /* @@ -1103,21 +1048,20 @@ nge_fixup_rx(m) * the higher level protocols. */ static void -nge_rxeof(sc) - struct nge_softc *sc; +nge_rxeof(struct nge_softc *sc) { - struct mbuf *m; - struct ifnet *ifp; - struct nge_desc *cur_rx; - int i, total_len = 0; - u_int32_t rxstat; + struct mbuf *m; + struct ifnet *ifp; + struct nge_desc *cur_rx; + int i, total_len = 0; + uint32_t rxstat; NGE_LOCK_ASSERT(sc); ifp = sc->nge_ifp; i = sc->nge_cdata.nge_rx_prod; - while(NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) { - u_int32_t extsts; + while (NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) { + uint32_t extsts; #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { @@ -1237,8 +1181,6 @@ nge_rxeof(sc) } sc->nge_cdata.nge_rx_prod = i; - - return; } /* @@ -1247,12 +1189,11 @@ nge_rxeof(sc) */ static void -nge_txeof(sc) - struct nge_softc *sc; +nge_txeof(struct nge_softc *sc) { - struct nge_desc *cur_tx; - struct ifnet *ifp; - u_int32_t idx; + struct nge_desc *cur_tx; + struct ifnet *ifp; + uint32_t idx; NGE_LOCK_ASSERT(sc); ifp = sc->nge_ifp; @@ -1300,17 +1241,14 @@ nge_txeof(sc) if (idx == sc->nge_cdata.nge_tx_prod) ifp->if_timer = 0; - - return; } static void -nge_tick(xsc) - void *xsc; +nge_tick(void *xsc) { - struct nge_softc *sc; - struct mii_data *mii; - struct ifnet *ifp; + struct nge_softc *sc; + struct mii_data *mii; + struct ifnet *ifp; sc = xsc; NGE_LOCK_ASSERT(sc); @@ -1318,10 +1256,10 @@ nge_tick(xsc) if (sc->nge_tbi) { if (!sc->nge_link) { - if (CSR_READ_4(sc, NGE_TBI_BMSR) + if (CSR_READ_4(sc, NGE_TBI_BMSR) & NGE_TBIBMSR_ANEG_DONE) { if (bootverbose) - device_printf(sc->nge_dev, + device_printf(sc->nge_dev, "gigabit link up\n"); nge_miibus_statchg(sc->nge_miibus); sc->nge_link++; @@ -1337,9 +1275,9 @@ nge_tick(xsc) if (mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->nge_link++; - if (IFM_SUBTYPE(mii->mii_media_active) + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T && bootverbose) - device_printf(sc->nge_dev, + device_printf(sc->nge_dev, "gigabit link up\n"); if (ifp->if_snd.ifq_head != NULL) nge_start_locked(ifp); @@ -1347,8 +1285,6 @@ nge_tick(xsc) } } callout_reset(&sc->nge_stat_ch, hz, nge_tick, sc); - - return; } #ifdef DEVICE_POLLING @@ -1357,7 +1293,7 @@ static poll_handler_t nge_poll; static void nge_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct nge_softc *sc = ifp->if_softc; + struct nge_softc *sc = ifp->if_softc; NGE_LOCK(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1379,7 +1315,7 @@ nge_poll(struct ifnet *ifp, enum poll_cm nge_start_locked(ifp); if (sc->rxcycles > 0 || cmd == POLL_AND_CHECK_STATUS) { - u_int32_t status; + uint32_t status; /* Reading the ISR register clears all interrupts. */ status = CSR_READ_4(sc, NGE_ISR); @@ -1400,12 +1336,11 @@ nge_poll(struct ifnet *ifp, enum poll_cm #endif /* DEVICE_POLLING */ static void -nge_intr(arg) - void *arg; +nge_intr(void *arg) { - struct nge_softc *sc; - struct ifnet *ifp; - u_int32_t status; + struct nge_softc *sc; + struct ifnet *ifp; + uint32_t status; sc = arg; ifp = sc->nge_ifp; @@ -1429,7 +1364,7 @@ nge_intr(arg) CSR_WRITE_4(sc, NGE_IER, 0); /* Data LED on for TBI mode */ - if(sc->nge_tbi) + if (sc->nge_tbi) CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) | NGE_GPIO_GP3_OUT); @@ -1464,7 +1399,7 @@ nge_intr(arg) } #if 0 - /* + /* * XXX: nge_tick() is not ready to be called this way * it screws up the aneg timeout because mii_tick() is * only to be called once per second. @@ -1484,13 +1419,11 @@ nge_intr(arg) /* Data LED off for TBI mode */ - if(sc->nge_tbi) + if (sc->nge_tbi) CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) & ~NGE_GPIO_GP3_OUT); NGE_UNLOCK(sc); - - return; } /* @@ -1498,14 +1431,11 @@ nge_intr(arg) * pointers to the fragment pointers. */ static int -nge_encap(sc, m_head, txidx) - struct nge_softc *sc; - struct mbuf *m_head; - u_int32_t *txidx; -{ - struct nge_desc *f = NULL; - struct mbuf *m; - int frag, cur, cnt = 0; +nge_encap(struct nge_softc *sc, struct mbuf *m_head, uint32_t *txidx) +{ + struct nge_desc *f = NULL; + struct mbuf *m; + int frag, cur, cnt = 0; /* * Start packing the mbufs in this chain into @@ -1519,7 +1449,7 @@ nge_encap(sc, m_head, txidx) if (m->m_len != 0) { if ((NGE_TX_LIST_CNT - (sc->nge_cdata.nge_tx_cnt + cnt)) < 2) - return(ENOBUFS); + return (ENOBUFS); f = &sc->nge_ldata->nge_tx_list[frag]; f->nge_ctl = NGE_CMDSTS_MORE | m->m_len; f->nge_ptr = vtophys(mtod(m, vm_offset_t)); @@ -1532,7 +1462,7 @@ nge_encap(sc, m_head, txidx) } if (m != NULL) - return(ENOBUFS); + return (ENOBUFS); sc->nge_ldata->nge_tx_list[*txidx].nge_extsts = 0; if (m_head->m_pkthdr.csum_flags) { @@ -1558,7 +1488,7 @@ nge_encap(sc, m_head, txidx) sc->nge_cdata.nge_tx_cnt += cnt; *txidx = frag; - return(0); + return (0); } /* @@ -1569,10 +1499,9 @@ nge_encap(sc, m_head, txidx) */ static void -nge_start(ifp) - struct ifnet *ifp; +nge_start(struct ifnet *ifp) { - struct nge_softc *sc; + struct nge_softc *sc; sc = ifp->if_softc; NGE_LOCK(sc); @@ -1581,12 +1510,11 @@ nge_start(ifp) } static void -nge_start_locked(ifp) - struct ifnet *ifp; +nge_start_locked(struct ifnet *ifp) { - struct nge_softc *sc; - struct mbuf *m_head = NULL; - u_int32_t idx; + struct nge_softc *sc; + struct mbuf *m_head = NULL; + uint32_t idx; sc = ifp->if_softc; @@ -1598,7 +1526,7 @@ nge_start_locked(ifp) if (ifp->if_drv_flags & IFF_DRV_OACTIVE) return; - while(sc->nge_ldata->nge_tx_list[idx].nge_mbuf == NULL) { + while (sc->nge_ldata->nge_tx_list[idx].nge_mbuf == NULL) { IF_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -1625,15 +1553,12 @@ nge_start_locked(ifp) * Set a timeout in case the chip goes out to lunch. */ ifp->if_timer = 5; - - return; } static void -nge_init(xsc) - void *xsc; +nge_init(void *xsc) { - struct nge_softc *sc = xsc; + struct nge_softc *sc = xsc; NGE_LOCK(sc); nge_init_locked(sc); @@ -1641,11 +1566,10 @@ nge_init(xsc) } static void -nge_init_locked(sc) - struct nge_softc *sc; +nge_init_locked(struct nge_softc *sc) { - struct ifnet *ifp = sc->nge_ifp; - struct mii_data *mii; + struct ifnet *ifp = sc->nge_ifp; + struct mii_data *mii; NGE_LOCK_ASSERT(sc); @@ -1666,13 +1590,13 @@ nge_init_locked(sc) /* Set MAC address */ CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR0); CSR_WRITE_4(sc, NGE_RXFILT_DATA, - ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[0]); + ((uint16_t *)IF_LLADDR(sc->nge_ifp))[0]); CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR1); CSR_WRITE_4(sc, NGE_RXFILT_DATA, - ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[1]); + ((uint16_t *)IF_LLADDR(sc->nge_ifp))[1]); CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR2); CSR_WRITE_4(sc, NGE_RXFILT_DATA, - ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[2]); + ((uint16_t *)IF_LLADDR(sc->nge_ifp))[2]); /* Init circular RX list. */ if (nge_list_rx_init(sc) == ENOBUFS) { @@ -1760,7 +1684,7 @@ nge_init_locked(sc) /* Set full/half duplex mode. */ if (sc->nge_tbi) { - if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) + if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) == IFM_FDX) { NGE_SETBIT(sc, NGE_TX_CFG, (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); @@ -1824,18 +1748,15 @@ nge_init_locked(sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - - return; } /* * Set media options. */ static int -nge_ifmedia_upd(ifp) - struct ifnet *ifp; +nge_ifmedia_upd(struct ifnet *ifp) { - struct nge_softc *sc; + struct nge_softc *sc; sc = ifp->if_softc; NGE_LOCK(sc); @@ -1845,26 +1766,25 @@ nge_ifmedia_upd(ifp) } static void -nge_ifmedia_upd_locked(ifp) - struct ifnet *ifp; +nge_ifmedia_upd_locked(struct ifnet *ifp) { - struct nge_softc *sc; - struct mii_data *mii; + struct nge_softc *sc; + struct mii_data *mii; sc = ifp->if_softc; NGE_LOCK_ASSERT(sc); if (sc->nge_tbi) { - if (IFM_SUBTYPE(sc->nge_ifmedia.ifm_cur->ifm_media) + if (IFM_SUBTYPE(sc->nge_ifmedia.ifm_cur->ifm_media) == IFM_AUTO) { - CSR_WRITE_4(sc, NGE_TBI_ANAR, + CSR_WRITE_4(sc, NGE_TBI_ANAR, CSR_READ_4(sc, NGE_TBI_ANAR) | NGE_TBIANAR_HDX | NGE_TBIANAR_FDX | NGE_TBIANAR_PS1 | NGE_TBIANAR_PS2); CSR_WRITE_4(sc, NGE_TBI_BMCR, NGE_TBIBMCR_ENABLE_ANEG | NGE_TBIBMCR_RESTART_ANEG); CSR_WRITE_4(sc, NGE_TBI_BMCR, NGE_TBIBMCR_ENABLE_ANEG); - } else if ((sc->nge_ifmedia.ifm_cur->ifm_media + } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) == IFM_FDX) { NGE_SETBIT(sc, NGE_TX_CFG, (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); @@ -1880,7 +1800,7 @@ nge_ifmedia_upd_locked(ifp) CSR_WRITE_4(sc, NGE_TBI_ANAR, 0); CSR_WRITE_4(sc, NGE_TBI_BMCR, 0); } - + CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) & ~NGE_GPIO_GP3_OUT); } else { @@ -1900,12 +1820,10 @@ nge_ifmedia_upd_locked(ifp) * Report current media status. */ static void -nge_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +nge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { - struct nge_softc *sc; - struct mii_data *mii; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:46:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC46C106566B; Sun, 7 Jun 2009 05:46:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C771C8FC19; Sun, 7 Jun 2009 05:46:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n575kC49083331; Sun, 7 Jun 2009 05:46:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n575kCDE083329; Sun, 7 Jun 2009 05:46:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070546.n575kCDE083329@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:46:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193616 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/nge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:46:13 -0000 Author: yongari Date: Sun Jun 7 05:46:12 2009 New Revision: 193616 URL: http://svn.freebsd.org/changeset/base/193616 Log: MFC r192506: bus_dma(9) conversion and make nge(4) work on all architectures. o Header file cleanup. o bus_dma(9) conversion. - Removed all consumers of vtophys(9) and converted to use bus_dma(9). - 64bit DMA support was disabled because DP83821 is not capable of handling the DMA request. 64bit DMA request on DP83820 requires different descriptor structures and it's hard to dynamically change descriptor format at run time so I disabled it. Note, this is the same behavior as previous one but previously nge(4) didn't explicitly disable 64bit mode on DP83820. - Added Tx/Rx descriptor ring alignment requirements(8 bytes alignment). - Limit maximum number of Tx DMA segments to 16. In fact, controller does not seem to have limitations on number of Tx DMA segments but 16 should be enough for most cases and m_collapse(9) will handle highly fragmented frames without consuming a lot of CPU cycles. - Added Rx buffer alignment requirements(8 bytes alignment). This means driver should fixup received frames to align on 16bits boundary on strict-alignment architectures. - Nuked driver private data structure in descriptor ring. - Added endianness support code in Tx/Rx descriptor access. o Prefer faster memory mapped register access to I/O mapped access. Added fall-back mechanism to use alternative register access. The hardware supports both memory and I/O mapped access. o Added suspend/resume methods but it wasn't tested as controller I have does not support PCI PME. o Removed swap argument in nge_read_eeprom() since endianness should be handled after reading EEPROM. o Implemented experimental 802.3x full-duplex flow-control. ATM it was commented out but will be activated after we have generic flow-control framework in mii(4) layer. o Rearranged promiscuous mode settings and simplified logic. o Always disable Rx filter prior to changing Rx filter functions as indicated in DP83820/DP83821 datasheet. o Added an explicit DELAY in timeout loop of nge_reset(). o Added a sysctl variable dev.nge.%d.int_holdoff to control interrupt moderation. Valid ranges are 1 to 255(default 1) in units of 100us. The actual delivery of interrupt would be delayed based on the sysctl value. The interface has to be brought down and up again before a change takes effect. With proper tuning value, users do not need to resort to polling(4) anymore. o Added ALTQ(4) support. o Added missing IFCAP_VLAN_HWCSUM as nge(4) can offload Tx/Rx checksum calculation on VLAN tagged frames as well as VLAN tag insertion/stripping. Also add IFCAP_VLAN_MTU capability as nge(4) can handle VLAN tagged oversized frames. o Fixed media header length for VLAN. o Rearranged nge_detach routine such that it's now used for general clean-up routine. o Enabled MWI. o Accessing EEPROM takes very long time so read 6 bytes ethernet address with one call instead of 3 separate accesses. o Don't set if_mtu in device attach, it's already set in ether_ifattach(). o Don't do any special things for TBI interface. Remove TBI specific media handling in the driver and have gentbi(4) handle it. Add glue code to read/write TBI PHY registers in miibus method. This change removes a lot of PHY handling code in driver and now its functionality is handled by mii(4). o Alignment fixup code is now applied only for strict-alignment architectures. Previously the code was applied for all architectures except i386. With this change amd64 will get instant Rx performance boost. o When driver fails to allocate a new mbuf, update if_qdrops so users can see what was wrong in Rx path. o Added a workaround for a hardware bug which resulted in short VLAN tagged frames(e.g. ARP) was rejected as if runt frame was received. With this workaround nge(4) now accepts the short VLAN tagged frame and nge(4) can take full advantage of hardware VLAN tag stripping. I have no idea how this bug wasn't known so far, without the workaround nge(4) may never work on VLAN environments. o Fixed Rx checksum offload logic such that it now honors active interface capability configured with ifconfig(8). o In nge_start()/nge_txencap(), always leave at least one free descriptor as indicated in datasheet. Without this the hardware would be confused with ring descriptor structure(e.g. no clue for the end of descriptor ring). o Removed dead-code that checks interrupts on PHY hardware. The code was designed to detect link state changes but it was disabled as driving nge_tick clock would break auto-negotiation timer. This code is no longer needed as nge(4) now uses mii(4) and link state change handling is done with mii callback. o Rearranged ethernet address programming logic such that it works on strict-alignment architectures. o Added IFCAP_VLAN_HWTAGGING/IFCAP_VLAN_HWCSUM handler in nge_ioctl() such that the functionality is configurable with ifconfig(8). DP83820/DP83821 can do checksum offload for VLAN tagged frames so enable Tx/Rx checksum offload for VLAN interfaces. o Simplified IFCAP_POLLING selection logic in nge_ioctl(). o Fixed module unload panic when bpf listeners are active. o Tx/Rx descriptor ring address uses 64bit DMA address for readability. High address part of DMA would be 0 as nge(4) disabled 64bit DMA transfers so it's ok for DP83821. o Removed volatile keyword in softc as bus_dmamap_sync(9) should take care of this. o Removed extra driver private structures in descriptor ring. These extra elements are not part of descriptor structure. Embedding private driver structure into descriptor ring is not good idea as its size may be different on 32bit/64bit architectures. o Added miibus_linkchg method handler to catch link state changes. o Removed unneeded nge_ifmedia in softc. All TBI access is handled in gentbi(4). There is no difference between TBI and non-TBI case now. o Removed "gigabit link up" message handling in nge_tick. Link state change notification is already performed by mii(4) and checking link state by accessing PHY registers in periodic timer handler of driver is wrong. All link state and speed/duplex monitoring should be handled in PHY driver. o Use our own timer for watchdog instead of if_watchdog/if_timer interface. o Added hardware MAC statistics counter, users canget current MAC statistics from dev.nge.%d.stats sysctl node(%d is unit number of a device). o Removed unused macros, NGE_LASTDESC, NGE_MODE, NGE_OWNDESC, NGE_RXBYTES. o Increased number of Tx/Rx descriptors from 128 to 256. From my experience on gigabit ethernet controllers, number of descriptors should be 256 or higher to get an optimal performance on gigabit link. o Increased jumbo frame length to 9022 bytes to cope with other gigabit ethernet drivers. Experimentation shows no problems with 9022 bytes. o Removed unused member variables in softc. o Switched from bus_space_{read|write}_4 to bus_{read|write}_4. o Added support for WOL. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/nge/if_nge.c stable/7/sys/dev/nge/if_ngereg.h Modified: stable/7/sys/dev/nge/if_nge.c ============================================================================== --- stable/7/sys/dev/nge/if_nge.c Sun Jun 7 05:41:13 2009 (r193615) +++ stable/7/sys/dev/nge/if_nge.c Sun Jun 7 05:46:12 2009 (r193616) @@ -94,13 +94,20 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include +#include +#include #include +#include #include -#include +#include +#include #include +#include +#include +#include #include #include #include @@ -109,32 +116,23 @@ __FBSDID("$FreeBSD$"); #include #include -#include - -#include /* for vtophys */ -#include /* for vtophys */ -#include -#include -#include -#include - #include #include #include #include -#define NGE_USEIOSPACE +#include #include +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + MODULE_DEPEND(nge, pci, 1, 1, 1); MODULE_DEPEND(nge, ether, 1, 1, 1); MODULE_DEPEND(nge, miibus, 1, 1, 1); -/* "device miibus" required. See GENERIC if you get errors here. */ -#include "miibus_if.h" - #define NGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) /* @@ -149,33 +147,38 @@ static struct nge_type nge_devs[] = { static int nge_probe(device_t); static int nge_attach(device_t); static int nge_detach(device_t); +static int nge_shutdown(device_t); +static int nge_suspend(device_t); +static int nge_resume(device_t); -static int nge_newbuf(struct nge_softc *, struct nge_desc *, struct mbuf *); -static int nge_encap(struct nge_softc *, struct mbuf *, uint32_t *); -#ifdef NGE_FIXUP_RX -static __inline void nge_fixup_rx (struct mbuf *); +static __inline void nge_discard_rxbuf(struct nge_softc *, int); +static int nge_newbuf(struct nge_softc *, int); +static int nge_encap(struct nge_softc *, struct mbuf **); +#ifndef __NO_STRICT_ALIGNMENT +static __inline void nge_fixup_rx(struct mbuf *); #endif static void nge_rxeof(struct nge_softc *); static void nge_txeof(struct nge_softc *); static void nge_intr(void *); static void nge_tick(void *); +static void nge_stats_update(struct nge_softc *); static void nge_start(struct ifnet *); static void nge_start_locked(struct ifnet *); static int nge_ioctl(struct ifnet *, u_long, caddr_t); static void nge_init(void *); static void nge_init_locked(struct nge_softc *); +static int nge_stop_mac(struct nge_softc *); static void nge_stop(struct nge_softc *); -static void nge_watchdog(struct ifnet *); -static int nge_shutdown(device_t); -static int nge_ifmedia_upd(struct ifnet *); -static void nge_ifmedia_upd_locked(struct ifnet *); -static void nge_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void nge_wol(struct nge_softc *); +static void nge_watchdog(struct nge_softc *); +static int nge_mediachange(struct ifnet *); +static void nge_mediastatus(struct ifnet *, struct ifmediareq *); static void nge_delay(struct nge_softc *); static void nge_eeprom_idle(struct nge_softc *); static void nge_eeprom_putbyte(struct nge_softc *, int); static void nge_eeprom_getword(struct nge_softc *, int, uint16_t *); -static void nge_read_eeprom(struct nge_softc *, caddr_t, int, int, int); +static void nge_read_eeprom(struct nge_softc *, caddr_t, int, int); static void nge_mii_sync(struct nge_softc *); static void nge_mii_send(struct nge_softc *, uint32_t, int); @@ -186,18 +189,16 @@ static int nge_miibus_readreg(device_t, static int nge_miibus_writereg(device_t, int, int, int); static void nge_miibus_statchg(device_t); -static void nge_setmulti(struct nge_softc *); +static void nge_rxfilter(struct nge_softc *); static void nge_reset(struct nge_softc *); +static void nge_dmamap_cb(void *, bus_dma_segment_t *, int, int); +static int nge_dma_alloc(struct nge_softc *); +static void nge_dma_free(struct nge_softc *); static int nge_list_rx_init(struct nge_softc *); static int nge_list_tx_init(struct nge_softc *); - -#ifdef NGE_USEIOSPACE -#define NGE_RES SYS_RES_IOPORT -#define NGE_RID NGE_PCI_LOIO -#else -#define NGE_RES SYS_RES_MEMORY -#define NGE_RID NGE_PCI_LOMEM -#endif +static void nge_sysctl_node(struct nge_softc *); +static int sysctl_int_range(SYSCTL_HANDLER_ARGS, int, int); +static int sysctl_hw_nge_int_holdoff(SYSCTL_HANDLER_ARGS); static device_method_t nge_methods[] = { /* Device interface */ @@ -205,6 +206,8 @@ static device_method_t nge_methods[] = { DEVMETHOD(device_attach, nge_attach), DEVMETHOD(device_detach, nge_detach), DEVMETHOD(device_shutdown, nge_shutdown), + DEVMETHOD(device_suspend, nge_suspend), + DEVMETHOD(device_resume, nge_resume), /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), @@ -215,7 +218,7 @@ static device_method_t nge_methods[] = { DEVMETHOD(miibus_writereg, nge_miibus_writereg), DEVMETHOD(miibus_statchg, nge_miibus_statchg), - { 0, 0 } + { NULL, NULL } }; static driver_t nge_driver = { @@ -350,7 +353,7 @@ nge_eeprom_getword(struct nge_softc *sc, * Read a sequence of words from the EEPROM. */ static void -nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt, int swap) +nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt) { int i; uint16_t word = 0, *ptr; @@ -358,10 +361,7 @@ nge_read_eeprom(struct nge_softc *sc, ca for (i = 0; i < cnt; i++) { nge_eeprom_getword(sc, off + i, &word); ptr = (uint16_t *)(dest + (i * 2)); - if (swap) - *ptr = ntohs(word); - else - *ptr = word; + *ptr = word; } } @@ -540,8 +540,48 @@ nge_miibus_readreg(device_t dev, int phy { struct nge_softc *sc; struct nge_mii_frame frame; + int rv; sc = device_get_softc(dev); + if ((sc->nge_flags & NGE_FLAG_TBI) != 0) { + /* Pretend PHY is at address 0. */ + if (phy != 0) + return (0); + switch (reg) { + case MII_BMCR: + reg = NGE_TBI_BMCR; + break; + case MII_BMSR: + /* 83820/83821 has different bit layout for BMSR. */ + rv = BMSR_ANEG | BMSR_EXTCAP | BMSR_EXTSTAT; + reg = CSR_READ_4(sc, NGE_TBI_BMSR); + if ((reg & NGE_TBIBMSR_ANEG_DONE) != 0) + rv |= BMSR_ACOMP; + if ((reg & NGE_TBIBMSR_LINKSTAT) != 0) + rv |= BMSR_LINK; + return (rv); + case MII_ANAR: + reg = NGE_TBI_ANAR; + break; + case MII_ANLPAR: + reg = NGE_TBI_ANLPAR; + break; + case MII_ANER: + reg = NGE_TBI_ANER; + break; + case MII_EXTSR: + reg = NGE_TBI_ESR; + break; + case MII_PHYIDR1: + case MII_PHYIDR2: + return (0); + default: + device_printf(sc->nge_dev, + "bad phy register read : %d\n", reg); + return (0); + } + return (CSR_READ_4(sc, reg)); + } bzero((char *)&frame, sizeof(frame)); @@ -559,6 +599,39 @@ nge_miibus_writereg(device_t dev, int ph struct nge_mii_frame frame; sc = device_get_softc(dev); + if ((sc->nge_flags & NGE_FLAG_TBI) != 0) { + /* Pretend PHY is at address 0. */ + if (phy != 0) + return (0); + switch (reg) { + case MII_BMCR: + reg = NGE_TBI_BMCR; + break; + case MII_BMSR: + return (0); + case MII_ANAR: + reg = NGE_TBI_ANAR; + break; + case MII_ANLPAR: + reg = NGE_TBI_ANLPAR; + break; + case MII_ANER: + reg = NGE_TBI_ANER; + break; + case MII_EXTSR: + reg = NGE_TBI_ESR; + break; + case MII_PHYIDR1: + case MII_PHYIDR2: + return (0); + default: + device_printf(sc->nge_dev, + "bad phy register write : %d\n", reg); + return (0); + } + CSR_WRITE_4(sc, reg, data); + return (0); + } bzero((char *)&frame, sizeof(frame)); @@ -570,90 +643,213 @@ nge_miibus_writereg(device_t dev, int ph return (0); } +/* + * media status/link state change handler. + */ static void nge_miibus_statchg(device_t dev) { - int status; struct nge_softc *sc; struct mii_data *mii; + struct ifnet *ifp; + struct nge_txdesc *txd; + uint32_t done, reg, status; + int i; sc = device_get_softc(dev); - if (sc->nge_tbi) { - if (IFM_SUBTYPE(sc->nge_ifmedia.ifm_cur->ifm_media) - == IFM_AUTO) { - status = CSR_READ_4(sc, NGE_TBI_ANLPAR); - if (status == 0 || status & NGE_TBIANAR_FDX) { - NGE_SETBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); - NGE_SETBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); - } else { - NGE_CLRBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); - NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); - } + NGE_LOCK_ASSERT(sc); - } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) - != IFM_FDX) { - NGE_CLRBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); - NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); - } else { - NGE_SETBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); - NGE_SETBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); + mii = device_get_softc(sc->nge_miibus); + ifp = sc->nge_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + + sc->nge_flags &= ~NGE_FLAG_LINK; + if ((mii->mii_media_status & (IFM_AVALID | IFM_ACTIVE)) == + (IFM_AVALID | IFM_ACTIVE)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + case IFM_1000_T: + case IFM_1000_SX: + case IFM_1000_LX: + case IFM_1000_CX: + sc->nge_flags |= NGE_FLAG_LINK; + break; + default: + break; } - } else { - mii = device_get_softc(sc->nge_miibus); + } + + /* Stop Tx/Rx MACs. */ + if (nge_stop_mac(sc) == ETIMEDOUT) + device_printf(sc->nge_dev, + "%s: unable to stop Tx/Rx MAC\n", __func__); + nge_txeof(sc); + nge_rxeof(sc); + if (sc->nge_head != NULL) { + m_freem(sc->nge_head); + sc->nge_head = sc->nge_tail = NULL; + } + + /* Release queued frames. */ + for (i = 0; i < NGE_TX_RING_CNT; i++) { + txd = &sc->nge_cdata.nge_txdesc[i]; + if (txd->tx_m != NULL) { + bus_dmamap_sync(sc->nge_cdata.nge_tx_tag, + txd->tx_dmamap, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->nge_cdata.nge_tx_tag, + txd->tx_dmamap); + m_freem(txd->tx_m); + txd->tx_m = NULL; + } + } - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) { - NGE_SETBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); + /* Program MAC with resolved speed/duplex. */ + if ((sc->nge_flags & NGE_FLAG_LINK) != 0) { + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { + NGE_SETBIT(sc, NGE_TX_CFG, + (NGE_TXCFG_IGN_HBEAT | NGE_TXCFG_IGN_CARR)); NGE_SETBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); +#ifdef notyet + /* Enable flow-control. */ + if ((IFM_OPTIONS(mii->mii_media_active) & + (IFM_ETH_RXPAUSE | IFM_ETH_TXPAUSE)) != 0) + NGE_SETBIT(sc, NGE_PAUSECSR, + NGE_PAUSECSR_PAUSE_ENB); +#endif } else { NGE_CLRBIT(sc, NGE_TX_CFG, - (NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR)); + (NGE_TXCFG_IGN_HBEAT | NGE_TXCFG_IGN_CARR)); NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX); + NGE_CLRBIT(sc, NGE_PAUSECSR, NGE_PAUSECSR_PAUSE_ENB); } - /* If we have a 1000Mbps link, set the mode_1000 bit. */ - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || - IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) { - NGE_SETBIT(sc, NGE_CFG, NGE_CFG_MODE_1000); - } else { - NGE_CLRBIT(sc, NGE_CFG, NGE_CFG_MODE_1000); + reg = CSR_READ_4(sc, NGE_CFG); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_1000_SX: + case IFM_1000_LX: + case IFM_1000_CX: + case IFM_1000_T: + reg |= NGE_CFG_MODE_1000; + break; + default: + reg &= ~NGE_CFG_MODE_1000; + break; + } + CSR_WRITE_4(sc, NGE_CFG, reg); + + /* Reset Tx/Rx MAC. */ + reg = CSR_READ_4(sc, NGE_CSR); + reg |= NGE_CSR_TX_RESET | NGE_CSR_RX_RESET; + CSR_WRITE_4(sc, NGE_CSR, reg); + /* Check the completion of reset. */ + done = 0; + for (i = 0; i < NGE_TIMEOUT; i++) { + DELAY(1); + status = CSR_READ_4(sc, NGE_ISR); + if ((status & NGE_ISR_RX_RESET_DONE) != 0) + done |= NGE_ISR_RX_RESET_DONE; + if ((status & NGE_ISR_TX_RESET_DONE) != 0) + done |= NGE_ISR_TX_RESET_DONE; + if (done == + (NGE_ISR_TX_RESET_DONE | NGE_ISR_RX_RESET_DONE)) + break; + } + if (i == NGE_TIMEOUT) + device_printf(sc->nge_dev, + "%s: unable to reset Tx/Rx MAC\n", __func__); + /* Reuse Rx buffer and reset consumer pointer. */ + sc->nge_cdata.nge_rx_cons = 0; + /* + * It seems that resetting Rx/Tx MAC results in + * resetting Tx/Rx descriptor pointer registers such + * that reloading Tx/Rx lists address are needed. + */ + CSR_WRITE_4(sc, NGE_RX_LISTPTR_HI, + NGE_ADDR_HI(sc->nge_rdata.nge_rx_ring_paddr)); + CSR_WRITE_4(sc, NGE_RX_LISTPTR_LO, + NGE_ADDR_LO(sc->nge_rdata.nge_rx_ring_paddr)); + CSR_WRITE_4(sc, NGE_TX_LISTPTR_HI, + NGE_ADDR_HI(sc->nge_rdata.nge_tx_ring_paddr)); + CSR_WRITE_4(sc, NGE_TX_LISTPTR_LO, + NGE_ADDR_LO(sc->nge_rdata.nge_tx_ring_paddr)); + /* Reinitialize Tx buffers. */ + nge_list_tx_init(sc); + + /* Restart Rx MAC. */ + reg = CSR_READ_4(sc, NGE_CSR); + reg |= NGE_CSR_RX_ENABLE; + CSR_WRITE_4(sc, NGE_CSR, reg); + for (i = 0; i < NGE_TIMEOUT; i++) { + if ((CSR_READ_4(sc, NGE_CSR) & NGE_CSR_RX_ENABLE) != 0) + break; + DELAY(1); } + if (i == NGE_TIMEOUT) + device_printf(sc->nge_dev, + "%s: unable to restart Rx MAC\n", __func__); } + + /* Data LED off for TBI mode */ + if ((sc->nge_flags & NGE_FLAG_TBI) != 0) + CSR_WRITE_4(sc, NGE_GPIO, + CSR_READ_4(sc, NGE_GPIO) & ~NGE_GPIO_GP3_OUT); } static void -nge_setmulti(struct nge_softc *sc) +nge_rxfilter(struct nge_softc *sc) { struct ifnet *ifp; struct ifmultiaddr *ifma; - uint32_t h = 0, i, filtsave; + uint32_t h, i, rxfilt; int bit, index; NGE_LOCK_ASSERT(sc); ifp = sc->nge_ifp; - if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { - NGE_CLRBIT(sc, NGE_RXFILT_CTL, - NGE_RXFILTCTL_MCHASH|NGE_RXFILTCTL_UCHASH); - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ALLMULTI); - return; + /* Make sure to stop Rx filtering. */ + rxfilt = CSR_READ_4(sc, NGE_RXFILT_CTL); + rxfilt &= ~NGE_RXFILTCTL_ENABLE; + CSR_WRITE_4(sc, NGE_RXFILT_CTL, rxfilt); + CSR_BARRIER_WRITE_4(sc, NGE_RXFILT_CTL); + + rxfilt &= ~(NGE_RXFILTCTL_ALLMULTI | NGE_RXFILTCTL_ALLPHYS); + rxfilt &= ~NGE_RXFILTCTL_BROAD; + /* + * We don't want to use the hash table for matching unicast + * addresses. + */ + rxfilt &= ~(NGE_RXFILTCTL_MCHASH | NGE_RXFILTCTL_UCHASH); + + /* + * For the NatSemi chip, we have to explicitly enable the + * reception of ARP frames, as well as turn on the 'perfect + * match' filter where we store the station address, otherwise + * we won't receive unicasts meant for this host. + */ + rxfilt |= NGE_RXFILTCTL_ARP | NGE_RXFILTCTL_PERFECT; + + /* + * Set the capture broadcast bit to capture broadcast frames. + */ + if ((ifp->if_flags & IFF_BROADCAST) != 0) + rxfilt |= NGE_RXFILTCTL_BROAD; + + if ((ifp->if_flags & IFF_PROMISC) != 0 || + (ifp->if_flags & IFF_ALLMULTI) != 0) { + rxfilt |= NGE_RXFILTCTL_ALLMULTI; + if ((ifp->if_flags & IFF_PROMISC) != 0) + rxfilt |= NGE_RXFILTCTL_ALLPHYS; + goto done; } /* * We have to explicitly enable the multicast hash table * on the NatSemi chip if we want to use it, which we do. - * We also have to tell it that we don't want to use the - * hash table for matching unicast addresses. */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_MCHASH); - NGE_CLRBIT(sc, NGE_RXFILT_CTL, - NGE_RXFILTCTL_ALLMULTI|NGE_RXFILTCTL_UCHASH); - - filtsave = CSR_READ_4(sc, NGE_RXFILT_CTL); + rxfilt |= NGE_RXFILTCTL_MCHASH; /* first, zot all the existing hash bits */ for (i = 0; i < NGE_MCAST_FILTER_LEN; i += 2) { @@ -681,12 +877,18 @@ nge_setmulti(struct nge_softc *sc) } IF_ADDR_UNLOCK(ifp); - CSR_WRITE_4(sc, NGE_RXFILT_CTL, filtsave); +done: + CSR_WRITE_4(sc, NGE_RXFILT_CTL, rxfilt); + /* Turn the receive filter on. */ + rxfilt |= NGE_RXFILTCTL_ENABLE; + CSR_WRITE_4(sc, NGE_RXFILT_CTL, rxfilt); + CSR_BARRIER_WRITE_4(sc, NGE_RXFILT_CTL); } static void nge_reset(struct nge_softc *sc) { + uint32_t v; int i; NGE_SETBIT(sc, NGE_CSR, NGE_CSR_RESET); @@ -694,6 +896,7 @@ nge_reset(struct nge_softc *sc) for (i = 0; i < NGE_TIMEOUT; i++) { if (!(CSR_READ_4(sc, NGE_CSR) & NGE_CSR_RESET)) break; + DELAY(1); } if (i == NGE_TIMEOUT) @@ -708,6 +911,18 @@ nge_reset(struct nge_softc *sc) */ CSR_WRITE_4(sc, NGE_CLKRUN, NGE_CLKRUN_PMESTS); CSR_WRITE_4(sc, NGE_CLKRUN, 0); + + /* Clear WOL events which may interfere normal Rx filter opertaion. */ + CSR_WRITE_4(sc, NGE_WOLCSR, 0); + + /* + * Only DP83820 supports 64bits addressing/data transfers and + * 64bit addressing requires different descriptor structures. + * To make it simple, disable 64bit addressing/data transfers. + */ + v = CSR_READ_4(sc, NGE_CFG); + v &= ~(NGE_CFG_64BIT_ADDR_ENB | NGE_CFG_64BIT_DATA_ENB); + CSR_WRITE_4(sc, NGE_CFG, v); } /* @@ -740,11 +955,13 @@ nge_probe(device_t dev) static int nge_attach(device_t dev) { - u_char eaddr[ETHER_ADDR_LEN]; + uint8_t eaddr[ETHER_ADDR_LEN]; + uint16_t ea[ETHER_ADDR_LEN/2], ea_temp, reg; struct nge_softc *sc; - struct ifnet *ifp = NULL; - int error = 0, rid; + struct ifnet *ifp; + int error, i, rid; + error = 0; sc = device_get_softc(dev); sc->nge_dev = dev; @@ -756,18 +973,35 @@ nge_attach(device_t dev) */ pci_enable_busmaster(dev); - rid = NGE_RID; - sc->nge_res = bus_alloc_resource_any(dev, NGE_RES, &rid, RF_ACTIVE); +#ifdef NGE_USEIOSPACE + sc->nge_res_type = SYS_RES_IOPORT; + sc->nge_res_id = PCIR_BAR(0); +#else + sc->nge_res_type = SYS_RES_MEMORY; + sc->nge_res_id = PCIR_BAR(1); +#endif + sc->nge_res = bus_alloc_resource_any(dev, sc->nge_res_type, + &sc->nge_res_id, RF_ACTIVE); if (sc->nge_res == NULL) { - device_printf(dev, "couldn't map ports/memory\n"); - error = ENXIO; - goto fail; + if (sc->nge_res_type == SYS_RES_MEMORY) { + sc->nge_res_type = SYS_RES_IOPORT; + sc->nge_res_id = PCIR_BAR(0); + } else { + sc->nge_res_type = SYS_RES_MEMORY; + sc->nge_res_id = PCIR_BAR(1); + } + sc->nge_res = bus_alloc_resource_any(dev, sc->nge_res_type, + &sc->nge_res_id, RF_ACTIVE); + if (sc->nge_res == NULL) { + device_printf(dev, "couldn't allocate %s resources\n", + sc->nge_res_type == SYS_RES_MEMORY ? "memory" : + "I/O"); + NGE_LOCK_DESTROY(sc); + return (ENXIO); + } } - sc->nge_btag = rman_get_bustag(sc->nge_res); - sc->nge_bhandle = rman_get_bushandle(sc->nge_res); - /* Allocate interrupt */ rid = 0; sc->nge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -779,83 +1013,77 @@ nge_attach(device_t dev) goto fail; } + /* Enable MWI. */ + reg = pci_read_config(dev, PCIR_COMMAND, 2); + reg |= PCIM_CMD_MWRICEN; + pci_write_config(dev, PCIR_COMMAND, reg, 2); + /* Reset the adapter. */ nge_reset(sc); /* * Get station address from the EEPROM. */ - nge_read_eeprom(sc, (caddr_t)&eaddr[4], NGE_EE_NODEADDR, 1, 0); - nge_read_eeprom(sc, (caddr_t)&eaddr[2], NGE_EE_NODEADDR + 1, 1, 0); - nge_read_eeprom(sc, (caddr_t)&eaddr[0], NGE_EE_NODEADDR + 2, 1, 0); + nge_read_eeprom(sc, (caddr_t)ea, NGE_EE_NODEADDR, 3); + for (i = 0; i < ETHER_ADDR_LEN / 2; i++) + ea[i] = le16toh(ea[i]); + ea_temp = ea[0]; + ea[0] = ea[2]; + ea[2] = ea_temp; + bcopy(ea, eaddr, sizeof(eaddr)); - sc->nge_ldata = contigmalloc(sizeof(struct nge_list_data), M_DEVBUF, - M_NOWAIT|M_ZERO, 0, 0xffffffff, PAGE_SIZE, 0); - - if (sc->nge_ldata == NULL) { - device_printf(dev, "no memory for list buffers!\n"); + if (nge_dma_alloc(sc) != 0) { error = ENXIO; goto fail; } + nge_sysctl_node(sc); + ifp = sc->nge_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); + device_printf(dev, "can not allocate ifnet structure\n"); error = ENOSPC; goto fail; } ifp->if_softc = sc; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = nge_ioctl; ifp->if_start = nge_start; - ifp->if_watchdog = nge_watchdog; ifp->if_init = nge_init; - ifp->if_snd.ifq_maxlen = NGE_TX_LIST_CNT - 1; + ifp->if_snd.ifq_drv_maxlen = NGE_TX_RING_CNT - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); ifp->if_hwassist = NGE_CSUM_FEATURES; - ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING; + ifp->if_capabilities = IFCAP_HWCSUM; + /* + * It seems that some hardwares doesn't provide 3.3V auxiliary + * supply(3VAUX) to drive PME such that checking PCI power + * management capability is necessary. + */ + if (pci_find_extcap(sc->nge_dev, PCIY_PMG, &i) == 0) + ifp->if_capabilities |= IFCAP_WOL; ifp->if_capenable = ifp->if_capabilities; -#ifdef DEVICE_POLLING - ifp->if_capabilities |= IFCAP_POLLING; -#endif + + if ((CSR_READ_4(sc, NGE_CFG) & NGE_CFG_TBI_EN) != 0) { + sc->nge_flags |= NGE_FLAG_TBI; + device_printf(dev, "Using TBI\n"); + /* Configure GPIO. */ + CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) + | NGE_GPIO_GP4_OUT + | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB + | NGE_GPIO_GP3_OUTENB + | NGE_GPIO_GP3_IN | NGE_GPIO_GP4_IN); + } /* * Do MII setup. */ - /* XXX: leaked on error */ - if (mii_phy_probe(dev, &sc->nge_miibus, - nge_ifmedia_upd, nge_ifmedia_sts)) { - if (CSR_READ_4(sc, NGE_CFG) & NGE_CFG_TBI_EN) { - sc->nge_tbi = 1; - device_printf(dev, "Using TBI\n"); - - sc->nge_miibus = dev; - - ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd, - nge_ifmedia_sts); -#define ADD(m, c) ifmedia_add(&sc->nge_ifmedia, (m), (c), NULL) - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, 0), 0); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, 0), 0); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, 0),0); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0), 0); -#undef ADD - device_printf(dev, " 1000baseSX, 1000baseSX-FDX, auto\n"); - - ifmedia_set(&sc->nge_ifmedia, - IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0)); - - CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO) - | NGE_GPIO_GP4_OUT - | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB - | NGE_GPIO_GP3_OUTENB - | NGE_GPIO_GP3_IN | NGE_GPIO_GP4_IN); - - } else { - device_printf(dev, "MII without any PHY!\n"); - error = ENXIO; - goto fail; - } + error = mii_phy_probe(dev, &sc->nge_miibus, nge_mediachange, + nge_mediastatus); + if (error != 0) { + device_printf(dev, "no PHY found!\n"); + goto fail; } /* @@ -863,6 +1091,20 @@ nge_attach(device_t dev) */ ether_ifattach(ifp, eaddr); + /* VLAN capability setup. */ + ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; + ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; + ifp->if_capenable = ifp->if_capabilities; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; +#endif + /* + * Tell the upper layer(s) we support long frames. + * Must appear after the call to ether_ifattach() because + * ether_ifattach() sets ifi_hdrlen to the default value. + */ + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + /* * Hookup IRQ last. */ @@ -873,19 +1115,9 @@ nge_attach(device_t dev) goto fail; } - return (0); - fail: - if (sc->nge_ldata) - contigfree(sc->nge_ldata, - sizeof(struct nge_list_data), M_DEVBUF); - if (ifp) - if_free(ifp); - if (sc->nge_irq) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq); - if (sc->nge_res) - bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res); - NGE_LOCK_DESTROY(sc); + if (error != 0) + nge_detach(dev); return (error); } @@ -899,68 +1131,339 @@ nge_detach(device_t dev) ifp = sc->nge_ifp; #ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) + if (ifp != NULL && ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(ifp); #endif - NGE_LOCK(sc); - nge_reset(sc); - nge_stop(sc); - NGE_UNLOCK(sc); - callout_drain(&sc->nge_stat_ch); - ether_ifdetach(ifp); - bus_generic_detach(dev); - if (!sc->nge_tbi) { + if (device_is_attached(dev)) { + NGE_LOCK(sc); + sc->nge_flags |= NGE_FLAG_DETACH; + nge_stop(sc); + NGE_UNLOCK(sc); + callout_drain(&sc->nge_stat_ch); + if (ifp != NULL) + ether_ifdetach(ifp); + } + + if (sc->nge_miibus != NULL) { device_delete_child(dev, sc->nge_miibus); + sc->nge_miibus = NULL; } - bus_teardown_intr(dev, sc->nge_irq, sc->nge_intrhand); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq); - bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res); + bus_generic_detach(dev); + if (sc->nge_intrhand != NULL) + bus_teardown_intr(dev, sc->nge_irq, sc->nge_intrhand); + if (sc->nge_irq != NULL) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->nge_irq); + if (sc->nge_res != NULL) + bus_release_resource(dev, sc->nge_res_type, sc->nge_res_id, + sc->nge_res); - contigfree(sc->nge_ldata, sizeof(struct nge_list_data), M_DEVBUF); - if_free(ifp); + nge_dma_free(sc); + if (ifp != NULL) + if_free(ifp); NGE_LOCK_DESTROY(sc); return (0); } +struct nge_dmamap_arg { + bus_addr_t nge_busaddr; +}; + +static void +nge_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) +{ + struct nge_dmamap_arg *ctx; + + if (error != 0) + return; + ctx = arg; + ctx->nge_busaddr = segs[0].ds_addr; +} + +static int +nge_dma_alloc(struct nge_softc *sc) +{ + struct nge_dmamap_arg ctx; + struct nge_txdesc *txd; + struct nge_rxdesc *rxd; + int error, i; + + /* Create parent DMA tag. */ + error = bus_dma_tag_create( + bus_get_dma_tag(sc->nge_dev), /* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + 0, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->nge_cdata.nge_parent_tag); + if (error != 0) { + device_printf(sc->nge_dev, "failed to create parent DMA tag\n"); + goto fail; + } + /* Create tag for Tx ring. */ + error = bus_dma_tag_create(sc->nge_cdata.nge_parent_tag,/* parent */ + NGE_RING_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + NGE_TX_RING_SIZE, /* maxsize */ + 1, /* nsegments */ + NGE_TX_RING_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->nge_cdata.nge_tx_ring_tag); + if (error != 0) { + device_printf(sc->nge_dev, "failed to create Tx ring DMA tag\n"); + goto fail; + } + + /* Create tag for Rx ring. */ + error = bus_dma_tag_create(sc->nge_cdata.nge_parent_tag,/* parent */ + NGE_RING_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + NGE_RX_RING_SIZE, /* maxsize */ + 1, /* nsegments */ + NGE_RX_RING_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->nge_cdata.nge_rx_ring_tag); + if (error != 0) { + device_printf(sc->nge_dev, + "failed to create Rx ring DMA tag\n"); + goto fail; + } + + /* Create tag for Tx buffers. */ + error = bus_dma_tag_create(sc->nge_cdata.nge_parent_tag,/* parent */ + 1, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES * NGE_MAXTXSEGS, /* maxsize */ + NGE_MAXTXSEGS, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->nge_cdata.nge_tx_tag); + if (error != 0) { + device_printf(sc->nge_dev, "failed to create Tx DMA tag\n"); + goto fail; + } + + /* Create tag for Rx buffers. */ + error = bus_dma_tag_create(sc->nge_cdata.nge_parent_tag,/* parent */ + NGE_RX_ALIGN, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, /* maxsize */ + 1, /* nsegments */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->nge_cdata.nge_rx_tag); + if (error != 0) { + device_printf(sc->nge_dev, "failed to create Rx DMA tag\n"); + goto fail; + } + + /* Allocate DMA'able memory and load the DMA map for Tx ring. */ + error = bus_dmamem_alloc(sc->nge_cdata.nge_tx_ring_tag, + (void **)&sc->nge_rdata.nge_tx_ring, BUS_DMA_WAITOK | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->nge_cdata.nge_tx_ring_map); + if (error != 0) { + device_printf(sc->nge_dev, + "failed to allocate DMA'able memory for Tx ring\n"); + goto fail; + } + + ctx.nge_busaddr = 0; + error = bus_dmamap_load(sc->nge_cdata.nge_tx_ring_tag, + sc->nge_cdata.nge_tx_ring_map, sc->nge_rdata.nge_tx_ring, + NGE_TX_RING_SIZE, nge_dmamap_cb, &ctx, 0); + if (error != 0 || ctx.nge_busaddr == 0) { + device_printf(sc->nge_dev, + "failed to load DMA'able memory for Tx ring\n"); + goto fail; + } + sc->nge_rdata.nge_tx_ring_paddr = ctx.nge_busaddr; + + /* Allocate DMA'able memory and load the DMA map for Rx ring. */ + error = bus_dmamem_alloc(sc->nge_cdata.nge_rx_ring_tag, + (void **)&sc->nge_rdata.nge_rx_ring, BUS_DMA_WAITOK | + BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->nge_cdata.nge_rx_ring_map); + if (error != 0) { + device_printf(sc->nge_dev, + "failed to allocate DMA'able memory for Rx ring\n"); + goto fail; + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 05:49:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F7331065679; Sun, 7 Jun 2009 05:49:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BFCB8FC14; Sun, 7 Jun 2009 05:49:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n575nbFo083440; Sun, 7 Jun 2009 05:49:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n575nbYZ083439; Sun, 7 Jun 2009 05:49:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070549.n575nbYZ083439@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 05:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193617 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sparc64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 05:49:38 -0000 Author: yongari Date: Sun Jun 7 05:49:37 2009 New Revision: 193617 URL: http://svn.freebsd.org/changeset/base/193617 Log: MFC r192508: Add nge(4), nge(4) should work on all architectures. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sparc64/conf/GENERIC Modified: stable/7/sys/sparc64/conf/GENERIC ============================================================================== --- stable/7/sys/sparc64/conf/GENERIC Sun Jun 7 05:46:12 2009 (r193616) +++ stable/7/sys/sparc64/conf/GENERIC Sun Jun 7 05:49:37 2009 (r193617) @@ -167,6 +167,7 @@ device dc # DEC/Intel 21143 and variou device fxp # Intel EtherExpress PRO/100B (82557, 82558) device gem # Sun GEM/Sun ERI/Apple GMAC device hme # Sun HME (Happy Meal Ethernet) +device nge # NatSemi DP83820 gigabit Ethernet #device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 06:22:00 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068281065673; Sun, 7 Jun 2009 06:22:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E83508FC12; Sun, 7 Jun 2009 06:21:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n576Lxs9084230; Sun, 7 Jun 2009 06:21:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n576LxPS084229; Sun, 7 Jun 2009 06:21:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070621.n576LxPS084229@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 06:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193619 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 06:22:00 -0000 Author: yongari Date: Sun Jun 7 06:21:59 2009 New Revision: 193619 URL: http://svn.freebsd.org/changeset/base/193619 Log: MFC r176267: Document the hw.skc.jumbo_disable tunable. While here, correct some things in the SYSCTLS section. Submitted by: yongari Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/sk.4 Modified: stable/7/share/man/man4/sk.4 ============================================================================== --- stable/7/share/man/man4/sk.4 Sun Jun 7 05:52:22 2009 (r193618) +++ stable/7/share/man/man4/sk.4 Sun Jun 7 06:21:59 2009 (r193619) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd February 14, 2008 .Dt SK 4 .Os .Sh NAME @@ -191,17 +191,28 @@ SK-9844 SK-NET GE-SX dual port, multimod .It SMC 9452TX single port, 1000baseT adapter .El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width xxxxxx +.It Va hw.skc.jumbo_disable +Disable jumbo frame support. +Systems with less memory can set it to a non-zero value to save memory. +The default value is 0. +.El .Sh SYSCTL VARIABLES The following variable is available as both .Xr sysctl 8 variable and .Xr loader 8 tunable: -.Bl -tag -width indent +.Bl -tag -width xxxxxx .It Va dev.skc.%d.int_mod -.Pp This variable controls interrupt moderation. -The accepted range is 10 to 10000, default value is 100 microseconds. +The accepted range is 10 to 10000. +The default value is 100 microseconds. The interface has to be brought down and up again before a change takes effect. .El .Sh DIAGNOSTICS From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 06:23:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 194421065674; Sun, 7 Jun 2009 06:23:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06CF58FC18; Sun, 7 Jun 2009 06:23:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n576NO6b084316; Sun, 7 Jun 2009 06:23:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n576NOj2084314; Sun, 7 Jun 2009 06:23:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070623.n576NOj2084314@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 06:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193620 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 06:23:25 -0000 Author: yongari Date: Sun Jun 7 06:23:24 2009 New Revision: 193620 URL: http://svn.freebsd.org/changeset/base/193620 Log: MFC r187662: Update the supported device list a little bit. PR: 84538 Submitted by: asmodai Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/nge.4 stable/7/share/man/man4/sk.4 Modified: stable/7/share/man/man4/nge.4 ============================================================================== --- stable/7/share/man/man4/nge.4 Sun Jun 7 06:21:59 2009 (r193619) +++ stable/7/share/man/man4/nge.4 Sun Jun 7 06:23:24 2009 (r193620) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2006 +.Dd January 23, 2009 .Dt NGE 4 .Os .Sh NAME @@ -170,6 +170,8 @@ Asante FriendlyNet GigaNIX 1000TA and 10 .It D-Link DGE-500T .It +Linksys EG1032, revision 1 +.It Netgear GA621 .It Netgear GA622T Modified: stable/7/share/man/man4/sk.4 ============================================================================== --- stable/7/share/man/man4/sk.4 Sun Jun 7 06:21:59 2009 (r193619) +++ stable/7/share/man/man4/sk.4 Sun Jun 7 06:23:24 2009 (r193620) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2008 +.Dd January 23, 2009 .Dt SK 4 .Os .Sh NAME @@ -82,7 +82,7 @@ second port on dual port adapters for fa on the primary port fails, the SysKonnect driver will automatically switch traffic onto the second port. .Pp -Also supported is the Marvell Semiconductor 88E1000* gigabit PHY. +Also supported is the Marvell Semiconductor 88E100* gigabit PHY. .Pp The XaQti XMAC II supports full and half duplex operation with autonegotiation. @@ -173,7 +173,7 @@ Belkin F5D5005 single port, 1000baseT ad .It D-Link DGE-530T single port, 1000baseT adapter .It -Linksys EG1032 single port, 1000baseT adapter +Linksys (revision 2) single port, 1000baseT adapter .It SK-9521 SK-NET GE-T single port, 1000baseT adapter .It From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 06:27:33 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85C6106566C; Sun, 7 Jun 2009 06:27:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB45A8FC13; Sun, 7 Jun 2009 06:27:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n576RXbE084460; Sun, 7 Jun 2009 06:27:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n576RXbH084459; Sun, 7 Jun 2009 06:27:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070627.n576RXbH084459@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 06:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193621 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 06:27:34 -0000 Author: yongari Date: Sun Jun 7 06:27:33 2009 New Revision: 193621 URL: http://svn.freebsd.org/changeset/base/193621 Log: MFC r192512-192514: r192512: Document sysctl variable dev.nge.%d.int_holdoff. r192513: DP83821 also supports jumbo frames. r192514: nge(4) supports altq(4). Xr altq Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/nge.4 Modified: stable/7/share/man/man4/nge.4 ============================================================================== --- stable/7/share/man/man4/nge.4 Sun Jun 7 06:23:24 2009 (r193620) +++ stable/7/share/man/man4/nge.4 Sun Jun 7 06:27:33 2009 (r193621) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 23, 2009 +.Dd May 21, 2009 .Dt NGE 4 .Os .Sh NAME @@ -69,8 +69,8 @@ Most cards also use the DP83861 10/100/1 chip, which supports autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The DP83820 also supports jumbo frames, which can be configured -via the interface MTU setting. +The DP83820 and DP83821 also support jumbo frames, which can be +configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit jumbo frames. @@ -182,6 +182,21 @@ Surecom Technology EP-320G-TX .It Trendware TEG-PCITX (32-bit PCI) and TEG-PCITX2 (64-bit PCI) .El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.nge.%d.int_holdoff +Maximum amount of time to delay interrupt processing in units of +100us. +The accepted range is 0 to 255, the default is 1(100us). +Value 0 completely disables the interrupt moderation. +The interface has to be brought down and up again before a change +takes effect. +.El .Sh DIAGNOSTICS .Bl -diag .It "nge%d: couldn't map memory" @@ -205,6 +220,7 @@ The device has stopped responding to the the network connection (cable). .El .Sh SEE ALSO +.Xr altq 4 , .Xr arp 4 , .Xr miibus 4 , .Xr netintro 4 , From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 06:28:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B733B106568B; Sun, 7 Jun 2009 06:28:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4A6E8FC23; Sun, 7 Jun 2009 06:28:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n576Sta4084531; Sun, 7 Jun 2009 06:28:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n576St4I084530; Sun, 7 Jun 2009 06:28:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906070628.n576St4I084530@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 7 Jun 2009 06:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193622 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 06:28:57 -0000 Author: yongari Date: Sun Jun 7 06:28:55 2009 New Revision: 193622 URL: http://svn.freebsd.org/changeset/base/193622 Log: MFC r192515: Add nge(4) to the list of drivers supporting ALTQ. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/altq.4 stable/7/share/man/man4/igb.4 (props changed) Modified: stable/7/share/man/man4/altq.4 ============================================================================== --- stable/7/share/man/man4/altq.4 Sun Jun 7 06:27:33 2009 (r193621) +++ stable/7/share/man/man4/altq.4 Sun Jun 7 06:28:55 2009 (r193622) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 12, 2009 +.Dd May 21, 2009 .Dt ALTQ 4 .Os .Sh NAME @@ -141,6 +141,7 @@ They have been applied to the following .Xr mxge 4 , .Xr my 4 , .Xr nfe 4 , +.Xr nge 4 , .Xr npe 4 , .Xr nve 4 , .Xr ral 4 , From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 08:11:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D49C106564A; Sun, 7 Jun 2009 08:11:26 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDDD58FC13; Sun, 7 Jun 2009 08:11:25 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n578BPq6086665; Sun, 7 Jun 2009 08:11:25 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n578BP0Z086661; Sun, 7 Jun 2009 08:11:25 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906070811.n578BP0Z086661@svn.freebsd.org> From: Brian Somers Date: Sun, 7 Jun 2009 08:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193626 - stable/7/bin/ps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 08:11:26 -0000 Author: brian Date: Sun Jun 7 08:11:25 2009 New Revision: 193626 URL: http://svn.freebsd.org/changeset/base/193626 Log: MFC: r192239: Add a -d switch. Modified: stable/7/bin/ps/ (props changed) stable/7/bin/ps/print.c stable/7/bin/ps/ps.1 stable/7/bin/ps/ps.c stable/7/bin/ps/ps.h Modified: stable/7/bin/ps/print.c ============================================================================== --- stable/7/bin/ps/print.c Sun Jun 7 07:45:25 2009 (r193625) +++ stable/7/bin/ps/print.c Sun Jun 7 08:11:25 2009 (r193626) @@ -129,25 +129,33 @@ command(KINFO *k, VARENT *ve) v = ve->var; if (cflag) { /* If it is the last field, then don't pad */ - if (STAILQ_NEXT(ve, next_ve) == NULL) + if (STAILQ_NEXT(ve, next_ve) == NULL) { + if (k->ki_d.prefix) + (void)printf("%s", k->ki_d.prefix); (void)printf("%s", k->ki_p->ki_comm); - else + } else (void)printf("%-*s", v->width, k->ki_p->ki_comm); return; } if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); - if (k->ki_env) { - if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) == NULL) - errx(1, "malloc failed"); - strvis(vis_env, k->ki_env, VIS_TAB | VIS_NL | VIS_NOSLASH); - } else - vis_env = NULL; if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field */ + + if (k->ki_env) { + if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) + == NULL) + errx(1, "malloc failed"); + strvis(vis_env, k->ki_env, + VIS_TAB | VIS_NL | VIS_NOSLASH); + } else + vis_env = NULL; + if (termwidth == UNLIMITED) { + if (k->ki_d.prefix) + (void)printf("%s", k->ki_d.prefix); if (vis_env) (void)printf("%s ", vis_env); (void)printf("%s", vis_args); @@ -155,6 +163,9 @@ command(KINFO *k, VARENT *ve) left = termwidth - (totwidth - v->width); if (left < 1) /* already wrapped, just use std width */ left = v->width; + if ((cp = k->ki_d.prefix) != NULL) + while (--left >= 0 && *cp) + (void)putchar(*cp++); if ((cp = vis_env) != NULL) { while (--left >= 0 && *cp) (void)putchar(*cp++); @@ -164,12 +175,12 @@ command(KINFO *k, VARENT *ve) for (cp = vis_args; --left >= 0 && *cp != '\0';) (void)putchar(*cp++); } + if (vis_env != NULL) + free(vis_env); } else - /* XXX env? */ + /* ki_d.prefix & ki_env aren't shown for interim fields */ (void)printf("%-*.*s", v->width, v->width, vis_args); free(vis_args); - if (vis_env != NULL) - free(vis_env); } void @@ -178,9 +189,11 @@ ucomm(KINFO *k, VARENT *ve) VAR *v; v = ve->var; - if (STAILQ_NEXT(ve, next_ve) == NULL) /* last field, don't pad */ + if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */ + if (k->ki_d.prefix) + (void)printf("%s", k->ki_d.prefix); (void)printf("%s", k->ki_p->ki_comm); - else + } else (void)printf("%-*s", v->width, k->ki_p->ki_comm); } Modified: stable/7/bin/ps/ps.1 ============================================================================== --- stable/7/bin/ps/ps.1 Sun Jun 7 07:45:25 2009 (r193625) +++ stable/7/bin/ps/ps.1 Sun Jun 7 08:11:25 2009 (r193626) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 21, 2006 +.Dd May 16, 2009 .Dt PS 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd process status .Sh SYNOPSIS .Nm -.Op Fl aCcefHhjlmrSTuvwXxZ +.Op Fl aCcdefHhjlmrSTuvwXxZ .Op Fl O Ar fmt | Fl o Ar fmt .Op Fl G Ar gid Ns Op , Ns Ar gid Ns Ar ... .Op Fl M Ar core @@ -122,6 +122,15 @@ CPU calculation that ignores .Dq resident time (this normally has no effect). +.It Fl d +Arrange processes into descendancy order and prefix each command with +indentation text showing sibling and parent/child relationships. +If either of the +.Fl m +and +.Fl r +options are also used, they control how sibling processes are sorted +relative to eachother. .It Fl e Display the environment as well. .It Fl f Modified: stable/7/bin/ps/ps.c ============================================================================== --- stable/7/bin/ps/ps.c Sun Jun 7 07:45:25 2009 (r193625) +++ stable/7/bin/ps/ps.c Sun Jun 7 08:11:25 2009 (r193626) @@ -137,6 +137,7 @@ static int addelem_pid(struct listinfo static int addelem_tty(struct listinfo *, const char *); static int addelem_uid(struct listinfo *, const char *); static void add_list(struct listinfo *, const char *); +static void descendant_sort(KINFO *, int); static void dynsizevars(KINFO *); static void *expand_list(struct listinfo *); static const char * @@ -162,7 +163,7 @@ static char vfmt[] = "pid,state,time,sl, "%cpu,%mem,command"; static char Zfmt[] = "label"; -#define PS_ARGS "AaCce" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" +#define PS_ARGS "AaCcde" OPT_LAZY_f "G:gHhjLlM:mN:O:o:p:rSTt:U:uvwXxZ" int main(int argc, char *argv[]) @@ -176,7 +177,7 @@ main(int argc, char *argv[]) const char *nlistf, *memf; char *cols; int all, ch, elem, flag, _fmt, i, lineno; - int nentries, nkept, nselectors; + int descendancy, nentries, nkept, nselectors; int prtheader, showthreads, wflag, what, xkeep, xkeep_implied; char errbuf[_POSIX2_LINE_MAX]; @@ -200,7 +201,7 @@ main(int argc, char *argv[]) if (argc > 1) argv[1] = kludge_oldps_options(PS_ARGS, argv[1], argv[2]); - all = _fmt = nselectors = optfatal = 0; + all = descendancy = _fmt = nselectors = optfatal = 0; prtheader = showthreads = wflag = xkeep_implied = 0; xkeep = -1; /* Neither -x nor -X. */ init_list(&gidlist, addelem_gid, sizeof(gid_t), "group"); @@ -232,6 +233,9 @@ main(int argc, char *argv[]) case 'c': cflag = 1; break; + case 'd': + descendancy = 1; + break; case 'e': /* XXX set ufmt */ needenv = 1; break; @@ -574,6 +578,8 @@ main(int argc, char *argv[]) keepit: next_KINFO = &kinfo[nkept]; next_KINFO->ki_p = kp; + next_KINFO->ki_d.level = 0; + next_KINFO->ki_d.prefix = NULL; next_KINFO->ki_pcpu = getpcpu(next_KINFO); if (sortby == SORTMEM) next_KINFO->ki_memsize = kp->ki_tsize + @@ -598,6 +604,13 @@ main(int argc, char *argv[]) * sort proc list */ qsort(kinfo, nkept, sizeof(KINFO), pscomp); + + /* + * We want things in descendant order + */ + if (descendancy) + descendant_sort(kinfo, nkept); + /* * For each process, call each variable output function. */ @@ -621,6 +634,9 @@ main(int argc, char *argv[]) free_list(&sesslist); free_list(&ttylist); free_list(&uidlist); + for (i = 0; i < nkept; i++) + free(kinfo[i].ki_d.prefix); + free(kinfo); exit(eval); } @@ -889,6 +905,116 @@ add_list(struct listinfo *inf, const cha } } +static void +descendant_sort(KINFO *ki, int items) +{ + int dst, lvl, maxlvl, n, ndst, nsrc, siblings, src; + unsigned char *path; + KINFO kn; + + /* + * First, sort the entries by descendancy, tracking the descendancy + * depth in the ki_d.level field. + */ + src = 0; + maxlvl = 0; + while (src < items) { + if (ki[src].ki_d.level) { + src++; + continue; + } + for (nsrc = 1; src + nsrc < items; nsrc++) + if (!ki[src + nsrc].ki_d.level) + break; + + for (dst = 0; dst < items; dst++) { + if (ki[dst].ki_p->ki_pid == ki[src].ki_p->ki_pid) + continue; + if (ki[dst].ki_p->ki_pid == ki[src].ki_p->ki_ppid) + break; + } + + if (dst == items) { + src += nsrc; + continue; + } + + for (ndst = 1; dst + ndst < items; ndst++) + if (ki[dst + ndst].ki_d.level <= ki[dst].ki_d.level) + break; + + for (n = src; n < src + nsrc; n++) { + ki[n].ki_d.level += ki[dst].ki_d.level + 1; + if (maxlvl < ki[n].ki_d.level) + maxlvl = ki[n].ki_d.level; + } + + while (nsrc) { + if (src < dst) { + kn = ki[src]; + memmove(ki + src, ki + src + 1, + (dst - src + ndst - 1) * sizeof *ki); + ki[dst + ndst - 1] = kn; + nsrc--; + dst--; + ndst++; + } else if (src != dst + ndst) { + kn = ki[src]; + memmove(ki + dst + ndst + 1, ki + dst + ndst, + (src - dst - ndst) * sizeof *ki); + ki[dst + ndst] = kn; + ndst++; + nsrc--; + src++; + } else { + ndst += nsrc; + src += nsrc; + nsrc = 0; + } + } + } + + /* + * Now populate ki_d.prefix (instead of ki_d.level) with the command + * prefix used to show descendancies. + */ + path = malloc((maxlvl + 7) / 8); + memset(path, '\0', (maxlvl + 7) / 8); + for (src = 0; src < items; src++) { + if ((lvl = ki[src].ki_d.level) == 0) { + ki[src].ki_d.prefix = NULL; + continue; + } + if ((ki[src].ki_d.prefix = malloc(lvl * 2 + 1)) == NULL) + errx(1, "malloc failed"); + for (n = 0; n < lvl - 2; n++) { + ki[src].ki_d.prefix[n * 2] = + path[n / 8] & 1 << (n % 8) ? '|' : ' '; + ki[src].ki_d.prefix[n * 2 + 1] = ' '; + + } + if (n == lvl - 2) { + /* Have I any more siblings? */ + for (siblings = 0, dst = src + 1; dst < items; dst++) { + if (ki[dst].ki_d.level > lvl) + continue; + if (ki[dst].ki_d.level == lvl) + siblings = 1; + break; + } + if (siblings) + path[n / 8] |= 1 << (n % 8); + else + path[n / 8] &= ~(1 << (n % 8)); + ki[src].ki_d.prefix[n * 2] = siblings ? '|' : '`'; + ki[src].ki_d.prefix[n * 2 + 1] = '-'; + n++; + } + strcpy(ki[src].ki_d.prefix + n * 2, "- "); + } + free(path); +} + static void * expand_list(struct listinfo *inf) { Modified: stable/7/bin/ps/ps.h ============================================================================== --- stable/7/bin/ps/ps.h Sun Jun 7 07:45:25 2009 (r193625) +++ stable/7/bin/ps/ps.h Sun Jun 7 08:11:25 2009 (r193626) @@ -42,6 +42,10 @@ typedef struct kinfo { int ki_valid; /* 1 => uarea stuff valid */ double ki_pcpu; /* calculated in main() */ segsz_t ki_memsize; /* calculated in main() */ + union { + int level; /* used in decendant_sort() */ + char *prefix; /* calculated in decendant_sort() */ + } ki_d; } KINFO; /* Variables. */ From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 08:21:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED81106566B; Sun, 7 Jun 2009 08:21:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 938F98FC1B; Sun, 7 Jun 2009 08:21:06 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n578L6XJ086940; Sun, 7 Jun 2009 08:21:06 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n578L66a086938; Sun, 7 Jun 2009 08:21:06 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906070821.n578L66a086938@svn.freebsd.org> From: Brian Somers Date: Sun, 7 Jun 2009 08:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193627 - stable/7/usr.bin/pkill X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 08:21:07 -0000 Author: brian Date: Sun Jun 7 08:21:06 2009 New Revision: 193627 URL: http://svn.freebsd.org/changeset/base/193627 Log: MFC: r192242: Don't kill ancestors unless -a is given. Modified: stable/7/usr.bin/pkill/ (props changed) stable/7/usr.bin/pkill/pkill.1 stable/7/usr.bin/pkill/pkill.c Modified: stable/7/usr.bin/pkill/pkill.1 ============================================================================== --- stable/7/usr.bin/pkill/pkill.1 Sun Jun 7 08:11:25 2009 (r193626) +++ stable/7/usr.bin/pkill/pkill.1 Sun Jun 7 08:21:06 2009 (r193627) @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 23, 2006 +.Dd May 16, 2009 .Dt PKILL 1 .Os .Sh NAME @@ -44,7 +44,7 @@ .Nd find or signal processes by name .Sh SYNOPSIS .Nm pgrep -.Op Fl LSfilnovx +.Op Fl LSafilnovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core @@ -60,7 +60,7 @@ .Ar pattern ... .Nm pkill .Op Fl Ar signal -.Op Fl ILfinovx +.Op Fl ILafinovx .Op Fl F Ar pidfile .Op Fl G Ar gid .Op Fl M Ar core @@ -128,6 +128,15 @@ The default is a newline. This option can only be used with the .Nm pgrep command. +.It Fl a +Include process ancestors in the match list. +By default, the current +.Nm pgrep +or +.Nm pkill +process and all of its ancestors are excluded (unless +.Fl v +is used). .It Fl f Match against full argument lists. The default is to match against process names. Modified: stable/7/usr.bin/pkill/pkill.c ============================================================================== --- stable/7/usr.bin/pkill/pkill.c Sun Jun 7 08:11:25 2009 (r193626) +++ stable/7/usr.bin/pkill/pkill.c Sun Jun 7 08:21:06 2009 (r193627) @@ -133,7 +133,7 @@ main(int argc, char **argv) { char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q, *pidfile; const char *execf, *coref; - int debug_opt; + int ancestors, debug_opt; int i, ch, bestidx, rv, criteria, pidfromfile, pidfilelock; size_t jsz; int (*action)(const struct kinfo_proc *); @@ -142,6 +142,7 @@ main(int argc, char **argv) struct timeval best_tval; regex_t reg; regmatch_t regmatch; + pid_t pid; setlocale(LC_ALL, ""); @@ -174,13 +175,14 @@ main(int argc, char **argv) } } + ancestors = 0; criteria = 0; debug_opt = 0; pidfile = NULL; pidfilelock = 0; execf = coref = _PATH_DEVNULL; - while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:d:fg:ij:lnos:t:u:vx")) != -1) + while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1) switch (ch) { case 'D': debug_opt++; @@ -220,6 +222,9 @@ main(int argc, char **argv) makelist(&ruidlist, LT_USER, optarg); criteria = 1; break; + case 'a': + ancestors++; + break; case 'd': if (!pgrep) usage(); @@ -468,6 +473,27 @@ main(int argc, char **argv) selected[i] = 1; } + if (!ancestors) { + pid = mypid; + while (pid) { + for (i = 0, kp = plist; i < nproc; i++, kp++) { + if (PSKIP(kp)) + continue; + if (kp->ki_pid == pid) { + selected[i] = 0; + pid = kp->ki_ppid; + break; + } + } + if (i == nproc) { + if (pid == mypid) + pid = getppid(); + else + break; /* Maybe we're in a jail ? */ + } + } + } + if (newest || oldest) { best_tval.tv_sec = 0; best_tval.tv_usec = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 10:00:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C951F106568D; Sun, 7 Jun 2009 10:00:35 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B184C8FC21; Sun, 7 Jun 2009 10:00:35 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n57A0Z48089383; Sun, 7 Jun 2009 10:00:35 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57A0Zem089380; Sun, 7 Jun 2009 10:00:35 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200906071000.n57A0Zem089380@svn.freebsd.org> From: Fabien Thomas Date: Sun, 7 Jun 2009 10:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193634 - in stable/7: lib/libpmc share/man/man4 sys/amd64/amd64 sys/amd64/include sys/conf sys/dev/hwpmc sys/i386/i386 sys/i386/include sys/kern sys/modules/hwpmc sys/sys usr.sbin usr.... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 10:00:36 -0000 Author: fabient Date: Sun Jun 7 10:00:35 2009 New Revision: 193634 URL: http://svn.freebsd.org/changeset/base/193634 Log: MFC hwpmc framework: - capture with callchain - Intel Core 2 support - Intel Core i7 support - source code annotate (pmcannotate) - bug fixes Reviewed by: jkoshy (mentor) Approved by: re (gnn) Added: stable/7/lib/libpmc/libpmcinternal.h (contents, props changed) stable/7/lib/libpmc/pmc.atom.3 (contents, props changed) stable/7/lib/libpmc/pmc.core.3 (contents, props changed) stable/7/lib/libpmc/pmc.core2.3 (contents, props changed) stable/7/lib/libpmc/pmc.iaf.3 (contents, props changed) stable/7/lib/libpmc/pmc.k7.3 (contents, props changed) stable/7/lib/libpmc/pmc.k8.3 (contents, props changed) stable/7/lib/libpmc/pmc.p4.3 (contents, props changed) stable/7/lib/libpmc/pmc.p5.3 (contents, props changed) stable/7/lib/libpmc/pmc.p6.3 (contents, props changed) stable/7/lib/libpmc/pmc.tsc.3 (contents, props changed) stable/7/lib/libpmc/pmc_allocate.3 (contents, props changed) stable/7/lib/libpmc/pmc_attach.3 (contents, props changed) stable/7/lib/libpmc/pmc_capabilities.3 (contents, props changed) stable/7/lib/libpmc/pmc_configure_logfile.3 (contents, props changed) stable/7/lib/libpmc/pmc_disable.3 (contents, props changed) stable/7/lib/libpmc/pmc_event_names_of_class.3 (contents, props changed) stable/7/lib/libpmc/pmc_get_driver_stats.3 (contents, props changed) stable/7/lib/libpmc/pmc_get_msr.3 (contents, props changed) stable/7/lib/libpmc/pmc_init.3 (contents, props changed) stable/7/lib/libpmc/pmc_name_of_capability.3 (contents, props changed) stable/7/lib/libpmc/pmc_read.3 (contents, props changed) stable/7/lib/libpmc/pmc_set.3 (contents, props changed) stable/7/lib/libpmc/pmc_start.3 (contents, props changed) stable/7/sys/dev/hwpmc/hwpmc_core.c (contents, props changed) stable/7/sys/dev/hwpmc/hwpmc_core.h (contents, props changed) stable/7/sys/dev/hwpmc/hwpmc_intel.c (contents, props changed) stable/7/sys/dev/hwpmc/hwpmc_tsc.c (contents, props changed) stable/7/sys/dev/hwpmc/hwpmc_tsc.h (contents, props changed) stable/7/usr.sbin/pmcannotate/ stable/7/usr.sbin/pmcannotate/Makefile (contents, props changed) stable/7/usr.sbin/pmcannotate/pmcannotate.8 (contents, props changed) stable/7/usr.sbin/pmcannotate/pmcannotate.c (contents, props changed) Modified: stable/7/lib/libpmc/Makefile stable/7/lib/libpmc/libpmc.c stable/7/lib/libpmc/pmc.3 stable/7/lib/libpmc/pmclog.c stable/7/lib/libpmc/pmclog.h stable/7/share/man/man4/hwpmc.4 stable/7/sys/amd64/amd64/exception.S stable/7/sys/amd64/amd64/genassym.c stable/7/sys/amd64/amd64/machdep.c stable/7/sys/amd64/amd64/mp_machdep.c stable/7/sys/amd64/amd64/trap.c stable/7/sys/amd64/include/intr_machdep.h stable/7/sys/amd64/include/pmc_mdep.h stable/7/sys/conf/Makefile.amd64 stable/7/sys/conf/Makefile.i386 stable/7/sys/conf/files.amd64 stable/7/sys/conf/files.i386 stable/7/sys/conf/files.pc98 stable/7/sys/dev/hwpmc/hwpmc_amd.c stable/7/sys/dev/hwpmc/hwpmc_amd.h stable/7/sys/dev/hwpmc/hwpmc_arm.c stable/7/sys/dev/hwpmc/hwpmc_ia64.c stable/7/sys/dev/hwpmc/hwpmc_logging.c stable/7/sys/dev/hwpmc/hwpmc_mod.c stable/7/sys/dev/hwpmc/hwpmc_pentium.c stable/7/sys/dev/hwpmc/hwpmc_pentium.h stable/7/sys/dev/hwpmc/hwpmc_piv.c stable/7/sys/dev/hwpmc/hwpmc_piv.h stable/7/sys/dev/hwpmc/hwpmc_powerpc.c stable/7/sys/dev/hwpmc/hwpmc_ppro.c stable/7/sys/dev/hwpmc/hwpmc_ppro.h stable/7/sys/dev/hwpmc/hwpmc_sparc64.c stable/7/sys/dev/hwpmc/hwpmc_x86.c stable/7/sys/dev/hwpmc/pmc_events.h stable/7/sys/i386/i386/exception.s stable/7/sys/i386/i386/genassym.c stable/7/sys/i386/i386/trap.c stable/7/sys/i386/include/pmc_mdep.h stable/7/sys/kern/kern_pmc.c stable/7/sys/modules/hwpmc/Makefile stable/7/sys/sys/pmc.h stable/7/sys/sys/pmckern.h stable/7/sys/sys/pmclog.h stable/7/sys/sys/proc.h stable/7/usr.sbin/Makefile stable/7/usr.sbin/pmccontrol/pmccontrol.8 stable/7/usr.sbin/pmccontrol/pmccontrol.c stable/7/usr.sbin/pmcstat/Makefile stable/7/usr.sbin/pmcstat/pmcstat.8 stable/7/usr.sbin/pmcstat/pmcstat.c stable/7/usr.sbin/pmcstat/pmcstat.h stable/7/usr.sbin/pmcstat/pmcstat_log.c Modified: stable/7/lib/libpmc/Makefile ============================================================================== --- stable/7/lib/libpmc/Makefile Sun Jun 7 09:23:50 2009 (r193633) +++ stable/7/lib/libpmc/Makefile Sun Jun 7 10:00:35 2009 (r193634) @@ -7,40 +7,54 @@ INCS= pmc.h pmclog.h WARNS?= 6 -MAN= pmc.3 pmclog.3 +MAN= pmc.3 +MAN+= pmc_allocate.3 +MAN+= pmc_attach.3 +MAN+= pmc_capabilities.3 +MAN+= pmc_configure_logfile.3 +MAN+= pmc_disable.3 +MAN+= pmc_event_names_of_class.3 +MAN+= pmc_get_driver_stats.3 +MAN+= pmc_get_msr.3 +MAN+= pmc_init.3 +MAN+= pmc_name_of_capability.3 +MAN+= pmc_read.3 +MAN+= pmc_set.3 +MAN+= pmc_start.3 +MAN+= pmclog.3 + +# PMC-dependent manual pages +MAN+= pmc.atom.3 +MAN+= pmc.core.3 +MAN+= pmc.core2.3 +MAN+= pmc.iaf.3 +MAN+= pmc.k7.3 +MAN+= pmc.k8.3 +MAN+= pmc.p4.3 +MAN+= pmc.p5.3 +MAN+= pmc.p6.3 +MAN+= pmc.tsc.3 MLINKS+= \ - pmc.3 pmc_allocate.3 \ - pmc.3 pmc_attach.3 \ - pmc.3 pmc_capabilities.3 \ - pmc.3 pmc_configure_logfile.3 \ - pmc.3 pmc_cpuinfo.3 \ - pmc.3 pmc_detach.3 \ - pmc.3 pmc_disable.3 \ - pmc.3 pmc_enable.3 \ - pmc.3 pmc_event_names_of_class.3 \ - pmc.3 pmc_flush_logfile.3 \ - pmc.3 pmc_get_driver_stats.3 \ - pmc.3 pmc_init.3 \ - pmc.3 pmc_name_of_capability.3 \ - pmc.3 pmc_name_of_class.3 \ - pmc.3 pmc_name_of_cputype.3 \ - pmc.3 pmc_name_of_event.3 \ - pmc.3 pmc_name_of_mode.3 \ - pmc.3 pmc_name_of_state.3 \ - pmc.3 pmc_ncpu.3 \ - pmc.3 pmc_npmc.3 \ - pmc.3 pmc_pmcinfo.3 \ - pmc.3 pmc_read.3 \ - pmc.3 pmc_release.3 \ - pmc.3 pmc_rw.3 \ - pmc.3 pmc_set.3 \ - pmc.3 pmc_start.3 \ - pmc.3 pmc_stop.3 \ - pmc.3 pmc_width.3 \ - pmc.3 pmc_write.3 \ - pmc.3 pmc_writelog.3 \ - pmc.3 pmc_x86_get_msr.3 + pmc_allocate.3 pmc_release.3 \ + pmc_attach.3 pmc_detach.3 \ + pmc_capabilities.3 pmc_ncpu.3 \ + pmc_capabilities.3 pmc_npmc.3 \ + pmc_capabilities.3 pmc_pmcinfo.3 \ + pmc_capabilities.3 pmc_cpuinfo.3 \ + pmc_capabilities.3 pmc_width.3 \ + pmc_configure_logfile.3 pmc_flush_logfile.3 \ + pmc_configure_logfile.3 pmc_writelog.3 \ + pmc_disable.3 pmc_enable.3 \ + pmc_name_of_capability.3 pmc_name_of_class.3 \ + pmc_name_of_capability.3 pmc_name_of_cputype.3 \ + pmc_name_of_capability.3 pmc_name_of_disposition.3 \ + pmc_name_of_capability.3 pmc_name_of_event.3 \ + pmc_name_of_capability.3 pmc_name_of_mode.3 \ + pmc_name_of_capability.3 pmc_name_of_state.3 \ + pmc_read.3 pmc_rw.3 \ + pmc_read.3 pmc_write.3 \ + pmc_start.3 pmc_stop.3 MLINKS+= \ pmclog.3 pmclog_open.3 \ Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Sun Jun 7 09:23:50 2009 (r193633) +++ stable/7/lib/libpmc/libpmc.c Sun Jun 7 10:00:35 2009 (r193634) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2006 Joseph Koshy + * Copyright (c) 2003-2008 Joseph Koshy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,12 +42,18 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libpmcinternal.h" + /* Function prototypes */ #if defined(__i386__) static int k7_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif #if defined(__amd64__) || defined(__i386__) +static int iaf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +static int iap_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, @@ -59,6 +65,10 @@ static int p5_allocate_pmc(enum pmc_even static int p6_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +#if defined(__amd64__) || defined(__i386__) +static int tsc_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif #define PMC_CALL(cmd, params) \ syscall(pmc_syscall, PMC_OP_##cmd, (params)) @@ -69,7 +79,6 @@ static int p6_allocate_pmc(enum pmc_even * mapped to the appropriate canonical event descriptions using a * lookup table. */ - struct pmc_event_alias { const char *pm_alias; const char *pm_spec; @@ -78,25 +87,145 @@ struct pmc_event_alias { static const struct pmc_event_alias *pmc_mdep_event_aliases; /* - * The pmc_event_descr table maps symbolic names known to the user + * The pmc_event_descr structure maps symbolic names known to the user * to integer codes used by the PMC KLD. */ - struct pmc_event_descr { const char *pm_ev_name; enum pmc_event pm_ev_code; - enum pmc_class pm_ev_class; }; -static const struct pmc_event_descr -pmc_event_table[] = +/* + * The pmc_class_descr structure maps class name prefixes for + * event names to event tables and other PMC class data. + */ +struct pmc_class_descr { + const char *pm_evc_name; + size_t pm_evc_name_size; + enum pmc_class pm_evc_class; + const struct pmc_event_descr *pm_evc_event_table; + size_t pm_evc_event_table_size; + int (*pm_evc_allocate_pmc)(enum pmc_event _pe, + char *_ctrspec, struct pmc_op_pmcallocate *_pa); +}; + +#define PMC_TABLE_SIZE(N) (sizeof(N)/sizeof(N[0])) +#define PMC_EVENT_TABLE_SIZE(N) PMC_TABLE_SIZE(N##_event_table) + +#undef __PMC_EV +#define __PMC_EV(C,N) { #N, PMC_EV_ ## C ## _ ## N }, + +/* + * PMC_CLASSDEP_TABLE(NAME, CLASS) + * + * Define a table mapping event names and aliases to HWPMC event IDs. + */ +#define PMC_CLASSDEP_TABLE(N, C) \ + static const struct pmc_event_descr N##_event_table[] = \ + { \ + __PMC_EV_##C() \ + } + +PMC_CLASSDEP_TABLE(iaf, IAF); +PMC_CLASSDEP_TABLE(k7, K7); +PMC_CLASSDEP_TABLE(k8, K8); +PMC_CLASSDEP_TABLE(p4, P4); +PMC_CLASSDEP_TABLE(p5, P5); +PMC_CLASSDEP_TABLE(p6, P6); + +#undef __PMC_EV_ALIAS +#define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, + +static const struct pmc_event_descr atom_event_table[] = +{ + __PMC_EV_ALIAS_ATOM() +}; + +static const struct pmc_event_descr core_event_table[] = { -#undef __PMC_EV -#define __PMC_EV(C,N,EV) { #EV, PMC_EV_ ## C ## _ ## N, PMC_CLASS_ ## C }, - __PMC_EVENTS() + __PMC_EV_ALIAS_CORE() +}; + + +static const struct pmc_event_descr core2_event_table[] = +{ + __PMC_EV_ALIAS_CORE2() +}; + +static const struct pmc_event_descr corei7_event_table[] = +{ + __PMC_EV_ALIAS_COREI7() }; /* + * PMC_MDEP_TABLE(NAME, PRIMARYCLASS, ADDITIONAL_CLASSES...) + * + * Map a CPU to the PMC classes it supports. + */ +#define PMC_MDEP_TABLE(N,C,...) \ + static const enum pmc_class N##_pmc_classes[] = { \ + PMC_CLASS_##C, __VA_ARGS__ \ + } + +PMC_MDEP_TABLE(atom, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(core, IAP, PMC_CLASS_TSC); +PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_IAF, PMC_CLASS_TSC); +PMC_MDEP_TABLE(k7, K7, PMC_CLASS_TSC); +PMC_MDEP_TABLE(k8, K8, PMC_CLASS_TSC); +PMC_MDEP_TABLE(p4, P4, PMC_CLASS_TSC); +PMC_MDEP_TABLE(p5, P5, PMC_CLASS_TSC); +PMC_MDEP_TABLE(p6, P6, PMC_CLASS_TSC); + +static const struct pmc_event_descr tsc_event_table[] = +{ + __PMC_EV_TSC() +}; + +#undef PMC_CLASS_TABLE_DESC +#define PMC_CLASS_TABLE_DESC(NAME, CLASS, EVENTS, ALLOCATOR) \ +static const struct pmc_class_descr NAME##_class_table_descr = \ + { \ + .pm_evc_name = #CLASS "-", \ + .pm_evc_name_size = sizeof(#CLASS "-") - 1, \ + .pm_evc_class = PMC_CLASS_##CLASS , \ + .pm_evc_event_table = EVENTS##_event_table , \ + .pm_evc_event_table_size = \ + PMC_EVENT_TABLE_SIZE(EVENTS), \ + .pm_evc_allocate_pmc = ALLOCATOR##_allocate_pmc \ + } + +#if defined(__i386__) || defined(__amd64__) +PMC_CLASS_TABLE_DESC(iaf, IAF, iaf, iaf); +PMC_CLASS_TABLE_DESC(atom, IAP, atom, iap); +PMC_CLASS_TABLE_DESC(core, IAP, core, iap); +PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); +PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); +#endif +#if defined(__i386__) +PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); +#endif +#if defined(__i386__) || defined(__amd64__) +PMC_CLASS_TABLE_DESC(k8, K8, k8, k8); +PMC_CLASS_TABLE_DESC(p4, P4, p4, p4); +#endif +#if defined(__i386__) +PMC_CLASS_TABLE_DESC(p5, P5, p5, p5); +PMC_CLASS_TABLE_DESC(p6, P6, p6, p6); +#endif +#if defined(__i386__) || defined(__amd64__) +PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc); +#endif + +#undef PMC_CLASS_TABLE_DESC + +static const struct pmc_class_descr **pmc_class_table; +#define PMC_CLASS_TABLE_SIZE cpu_info.pm_nclass + +static const enum pmc_class *pmc_mdep_class_list; +static size_t pmc_mdep_class_list_size; + +/* * Mapping tables, mapping enumeration values to human readable * strings. */ @@ -113,9 +242,14 @@ static const char * pmc_class_names[] = __PMC_CLASSES() }; -static const char * pmc_cputype_names[] = { +struct pmc_cputype_map { + enum pmc_class pm_cputype; + const char *pm_name; +}; + +static const struct pmc_cputype_map pmc_cputype_names[] = { #undef __PMC_CPU -#define __PMC_CPU(S, D) #S , +#define __PMC_CPU(S, V, D) { .pm_cputype = PMC_CPU_##S, .pm_name = #S } , __PMC_CPUS() }; @@ -141,11 +275,6 @@ static int pmc_syscall = -1; /* filled static struct pmc_cpuinfo cpu_info; /* filled in by pmc_init() */ - -/* Architecture dependent event parsing */ -static int (*pmc_mdep_allocate_pmc)(enum pmc_event _pe, char *_ctrspec, - struct pmc_op_pmcallocate *_pmc_config); - /* Event masks for events */ struct pmc_masks { const char *pm_name; @@ -163,20 +292,21 @@ pmc_parse_mask(const struct pmc_masks *p int c; if (pmask == NULL) /* no mask keywords */ - return -1; - q = strchr(p, '='); /* skip '=' */ + return (-1); + q = strchr(p, '='); /* skip '=' */ if (*++q == '\0') /* no more data */ - return -1; + return (-1); c = 0; /* count of mask keywords seen */ while ((r = strsep(&q, "+")) != NULL) { - for (pm = pmask; pm->pm_name && strcmp(r, pm->pm_name); pm++) + for (pm = pmask; pm->pm_name && strcasecmp(r, pm->pm_name); + pm++) ; if (pm->pm_name == NULL) /* not found */ - return -1; + return (-1); *evmask |= pm->pm_value; c++; } - return c; + return (c); } #endif @@ -194,7 +324,7 @@ static struct pmc_event_alias k7_aliases EV_ALIAS("branches", "k7-retired-branches"), EV_ALIAS("branch-mispredicts", "k7-retired-branches-mispredicted"), EV_ALIAS("cycles", "tsc"), - EV_ALIAS("dc-misses", "k7-dc-misses,mask=moesi"), + EV_ALIAS("dc-misses", "k7-dc-misses"), EV_ALIAS("ic-misses", "k7-ic-misses"), EV_ALIAS("instructions", "k7-retired-instructions"), EV_ALIAS("interrupts", "k7-hardware-interrupts"), @@ -212,19 +342,12 @@ static int k7_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { - char *e, *p, *q; - int c, has_unitmask; + char *e, *p, *q; + int c, has_unitmask; uint32_t count, unitmask; pmc_config->pm_md.pm_amd.pm_amd_config = 0; - pmc_config->pm_caps |= PMC_CAP_READ; - - if (pe == PMC_EV_TSC_TSC) { - /* TSC events must be unqualified. */ - if (ctrspec && *ctrspec != '\0') - return -1; - return 0; - } + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); if (pe == PMC_EV_K7_DC_REFILLS_FROM_L2 || pe == PMC_EV_K7_DC_REFILLS_FROM_SYSTEM || @@ -234,17 +357,15 @@ k7_allocate_pmc(enum pmc_event pe, char } else unitmask = has_unitmask = 0; - pmc_config->pm_caps |= PMC_CAP_WRITE; - while ((p = strsep(&ctrspec, ",")) != NULL) { if (KWPREFIXMATCH(p, K7_KW_COUNT "=")) { q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_THRESHOLD; pmc_config->pm_md.pm_amd.pm_amd_config |= @@ -258,11 +379,11 @@ k7_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_SYSTEM; } else if (KWPREFIXMATCH(p, K7_KW_UNITMASK "=")) { if (has_unitmask == 0) - return -1; + return (-1); unitmask = 0; q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); while ((c = tolower(*q++)) != 0) if (c == 'm') @@ -278,15 +399,15 @@ k7_allocate_pmc(enum pmc_event pe, char else if (c == '+') continue; else - return -1; + return (-1); if (unitmask == 0) - return -1; + return (-1); } else if (KWMATCH(p, K7_KW_USR)) { pmc_config->pm_caps |= PMC_CAP_USER; } else - return -1; + return (-1); } if (has_unitmask) { @@ -295,7 +416,7 @@ k7_allocate_pmc(enum pmc_event pe, char AMD_PMC_TO_UNITMASK(unitmask); } - return 0; + return (0); } @@ -304,6 +425,240 @@ k7_allocate_pmc(enum pmc_event pe, char #if defined(__amd64__) || defined(__i386__) /* + * Intel Core (Family 6, Model E) PMCs. + */ + +static struct pmc_event_alias core_aliases[] = { + EV_ALIAS("branches", "iap-br-instr-ret"), + EV_ALIAS("branch-mispredicts", "iap-br-mispred-ret"), + EV_ALIAS("cycles", "tsc-tsc"), + EV_ALIAS("ic-misses", "iap-icache-misses"), + EV_ALIAS("instructions", "iap-instr-ret"), + EV_ALIAS("interrupts", "iap-core-hw-int-rx"), + EV_ALIAS("unhalted-cycles", "iap-unhalted-core-cycles"), + EV_ALIAS(NULL, NULL) +}; + +/* + * Intel Core2 (Family 6, Model F), Core2Extreme (Family 6, Model 17H) + * and Atom (Family 6, model 1CH) PMCs. + */ + +static struct pmc_event_alias core2_aliases[] = { + EV_ALIAS("branches", "iap-br-inst-retired.any"), + EV_ALIAS("branch-mispredicts", "iap-br-inst-retired.mispred"), + EV_ALIAS("cycles", "tsc-tsc"), + EV_ALIAS("ic-misses", "iap-l1i-misses"), + EV_ALIAS("instructions", "iaf-instr-retired.any"), + EV_ALIAS("interrupts", "iap-hw-int-rcv"), + EV_ALIAS("unhalted-cycles", "iaf-cpu-clk-unhalted.core"), + EV_ALIAS(NULL, NULL) +}; +#define atom_aliases core2_aliases +#define corei7_aliases core2_aliases + +#define IAF_KW_OS "os" +#define IAF_KW_USR "usr" +#define IAF_KW_ANYTHREAD "anythread" + +/* + * Parse an event specifier for Intel fixed function counters. + */ +static int +iaf_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *p; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_iaf.pm_iaf_flags = 0; + + while ((p = strsep(&ctrspec, ",")) != NULL) { + if (KWMATCH(p, IAF_KW_OS)) + pmc_config->pm_caps |= PMC_CAP_SYSTEM; + else if (KWMATCH(p, IAF_KW_USR)) + pmc_config->pm_caps |= PMC_CAP_USER; + else if (KWMATCH(p, IAF_KW_ANYTHREAD)) + pmc_config->pm_md.pm_iaf.pm_iaf_flags |= IAF_ANY; + else + return (-1); + } + + return (0); +} + +/* + * Core/Core2 support. + */ + +#define IAP_KW_AGENT "agent" +#define IAP_KW_ANYTHREAD "anythread" +#define IAP_KW_CACHESTATE "cachestate" +#define IAP_KW_CMASK "cmask" +#define IAP_KW_CORE "core" +#define IAP_KW_EDGE "edge" +#define IAP_KW_INV "inv" +#define IAP_KW_OS "os" +#define IAP_KW_PREFETCH "prefetch" +#define IAP_KW_SNOOPRESPONSE "snoopresponse" +#define IAP_KW_SNOOPTYPE "snooptype" +#define IAP_KW_TRANSITION "trans" +#define IAP_KW_USR "usr" + +static struct pmc_masks iap_core_mask[] = { + PMCMASK(all, (0x3 << 14)), + PMCMASK(this, (0x1 << 14)), + NULLMASK +}; + +static struct pmc_masks iap_agent_mask[] = { + PMCMASK(this, 0), + PMCMASK(any, (0x1 << 13)), + NULLMASK +}; + +static struct pmc_masks iap_prefetch_mask[] = { + PMCMASK(both, (0x3 << 12)), + PMCMASK(only, (0x1 << 12)), + PMCMASK(exclude, 0), + NULLMASK +}; + +static struct pmc_masks iap_cachestate_mask[] = { + PMCMASK(i, (1 << 8)), + PMCMASK(s, (1 << 9)), + PMCMASK(e, (1 << 10)), + PMCMASK(m, (1 << 11)), + NULLMASK +}; + +static struct pmc_masks iap_snoopresponse_mask[] = { + PMCMASK(clean, (1 << 8)), + PMCMASK(hit, (1 << 9)), + PMCMASK(hitm, (1 << 11)), + NULLMASK +}; + +static struct pmc_masks iap_snooptype_mask[] = { + PMCMASK(cmp2s, (1 << 8)), + PMCMASK(cmp2i, (1 << 9)), + NULLMASK +}; + +static struct pmc_masks iap_transition_mask[] = { + PMCMASK(any, 0x00), + PMCMASK(frequency, 0x10), + NULLMASK +}; + +static int +iap_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + uint32_t cachestate, evmask; + int count, n; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE | + PMC_CAP_QUALIFIER); + pmc_config->pm_md.pm_iap.pm_iap_config = 0; + + cachestate = evmask = 0; + + /* Parse additional modifiers if present */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + + n = 0; + if (KWPREFIXMATCH(p, IAP_KW_CMASK "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_iap.pm_iap_config |= + IAP_CMASK(count); + } else if (KWMATCH(p, IAP_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, IAP_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else if (KWMATCH(p, IAP_KW_OS)) { + pmc_config->pm_caps |= PMC_CAP_SYSTEM; + } else if (KWMATCH(p, IAP_KW_USR)) { + pmc_config->pm_caps |= PMC_CAP_USER; + } else if (KWMATCH(p, IAP_KW_ANYTHREAD)) { + pmc_config->pm_md.pm_iap.pm_iap_config |= IAP_ANY; + } else if (KWMATCH(p, IAP_KW_CORE)) { + n = pmc_parse_mask(iap_core_mask, p, &evmask); + if (n != 1) + return (-1); + } else if (KWMATCH(p, IAP_KW_AGENT)) { + n = pmc_parse_mask(iap_agent_mask, p, &evmask); + if (n != 1) + return (-1); + } else if (KWMATCH(p, IAP_KW_PREFETCH)) { + n = pmc_parse_mask(iap_prefetch_mask, p, &evmask); + if (n != 1) + return (-1); + } else if (KWMATCH(p, IAP_KW_CACHESTATE)) { + n = pmc_parse_mask(iap_cachestate_mask, p, &cachestate); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_CORE && + KWMATCH(p, IAP_KW_TRANSITION)) { + n = pmc_parse_mask(iap_transition_mask, p, &evmask); + if (n != 1) + return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_ATOM || + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || + cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || + cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { + if (KWMATCH(p, IAP_KW_SNOOPRESPONSE)) { + n = pmc_parse_mask(iap_snoopresponse_mask, p, + &evmask); + } else if (KWMATCH(p, IAP_KW_SNOOPTYPE)) { + n = pmc_parse_mask(iap_snooptype_mask, p, + &evmask); + } else + return (-1); + } else + return (-1); + + if (n < 0) /* Parsing failed. */ + return (-1); + } + + pmc_config->pm_md.pm_iap.pm_iap_config |= evmask; + + /* + * If the event requires a 'cachestate' qualifier but was not + * specified by the user, use a sensible default. + */ + switch (pe) { + case PMC_EV_IAP_EVENT_28H: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_29H: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_2AH: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_2BH: /* Atom, Core2 */ + case PMC_EV_IAP_EVENT_2EH: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_30H: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_32H: /* Core */ + case PMC_EV_IAP_EVENT_40H: /* Core */ + case PMC_EV_IAP_EVENT_41H: /* Core */ + case PMC_EV_IAP_EVENT_42H: /* Core, Core2, Atom */ + case PMC_EV_IAP_EVENT_77H: /* Core */ + if (cachestate == 0) + cachestate = (0xF << 8); + default: + break; + } + + pmc_config->pm_md.pm_iap.pm_iap_config |= cachestate; + + return (0); +} + +/* * AMD K8 PMCs. * * These are very similar to AMD K7 PMCs, but support more kinds of @@ -317,7 +672,7 @@ static struct pmc_event_alias k8_aliases EV_ALIAS("cycles", "tsc"), EV_ALIAS("dc-misses", "k8-dc-miss"), EV_ALIAS("ic-misses", "k8-ic-miss"), - EV_ALIAS("instructions", "k8-fr-retired-x86-instructions"), + EV_ALIAS("instructions", "k8-fr-retired-x86-instructions"), EV_ALIAS("interrupts", "k8-fr-taken-hardware-interrupts"), EV_ALIAS("unhalted-cycles", "k8-bu-cpu-clk-unhalted"), EV_ALIAS(NULL, NULL) @@ -492,7 +847,7 @@ static const struct pmc_masks k8_mask_np /* nb hypertransport bus bandwidth */ static const struct pmc_masks k8_mask_nhbb[] = { /* HT bus bandwidth */ __K8MASK(command, 0), - __K8MASK(data, 1), + __K8MASK(data, 1), __K8MASK(buffer-release, 2), __K8MASK(nop, 3), NULLMASK @@ -511,21 +866,14 @@ static int k8_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { - char *e, *p, *q; - int n; + char *e, *p, *q; + int n; uint32_t count, evmask; const struct pmc_masks *pm, *pmask; - pmc_config->pm_caps |= PMC_CAP_READ; + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); pmc_config->pm_md.pm_amd.pm_amd_config = 0; - if (pe == PMC_EV_TSC_TSC) { - /* TSC events must be unqualified. */ - if (ctrspec && *ctrspec != '\0') - return -1; - return 0; - } - pmask = NULL; evmask = 0; @@ -599,17 +947,15 @@ k8_allocate_pmc(enum pmc_event pe, char break; /* no options defined */ } - pmc_config->pm_caps |= PMC_CAP_WRITE; - while ((p = strsep(&ctrspec, ",")) != NULL) { if (KWPREFIXMATCH(p, K8_KW_COUNT "=")) { q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_THRESHOLD; pmc_config->pm_md.pm_amd.pm_amd_config |= @@ -621,18 +967,17 @@ k8_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_INVERT; } else if (KWPREFIXMATCH(p, K8_KW_MASK "=")) { if ((n = pmc_parse_mask(pmask, p, &evmask)) < 0) - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_QUALIFIER; } else if (KWMATCH(p, K8_KW_OS)) { pmc_config->pm_caps |= PMC_CAP_SYSTEM; } else if (KWMATCH(p, K8_KW_USR)) { pmc_config->pm_caps |= PMC_CAP_USER; } else - return -1; + return (-1); } /* other post processing */ - switch (pe) { case PMC_EV_K8_FP_DISPATCHED_FPU_OPS: case PMC_EV_K8_FP_CYCLES_WITH_NO_FPU_OPS_RETIRED: @@ -648,7 +993,7 @@ k8_allocate_pmc(enum pmc_event pe, char case PMC_EV_K8_LS_LOCKED_OPERATION: /* XXX CPU Rev A,B evmask is to be zero */ if (evmask & (evmask - 1)) /* > 1 bit set */ - return -1; + return (-1); if (evmask == 0) { evmask = 0x01; /* Rev C and later: #instrs */ pmc_config->pm_caps |= PMC_CAP_QUALIFIER; @@ -666,7 +1011,7 @@ k8_allocate_pmc(enum pmc_event pe, char pmc_config->pm_md.pm_amd.pm_amd_config = AMD_PMC_TO_UNITMASK(evmask); - return 0; + return (0); } #endif @@ -1008,25 +1353,17 @@ p4_allocate_pmc(enum pmc_event pe, char uint32_t evmask, cccractivemask; const struct pmc_masks *pm, *pmask; - pmc_config->pm_caps |= PMC_CAP_READ; + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); pmc_config->pm_md.pm_p4.pm_p4_cccrconfig = pmc_config->pm_md.pm_p4.pm_p4_escrconfig = 0; - if (pe == PMC_EV_TSC_TSC) { - /* TSC must not be further qualified */ - if (ctrspec && *ctrspec != '\0') - return -1; - return 0; - } - pmask = NULL; evmask = 0; cccractivemask = 0x3; has_tag = has_busreqtype = 0; - pmc_config->pm_caps |= PMC_CAP_WRITE; #define __P4SETMASK(M) do { \ - pmask = p4_mask_##M; \ + pmask = p4_mask_##M; \ } while (0) switch (pe) { @@ -1159,7 +1496,7 @@ p4_allocate_pmc(enum pmc_event pe, char __P4SETMASK(machclr); break; default: - return -1; + return (-1); } /* process additional flags */ @@ -1167,30 +1504,30 @@ p4_allocate_pmc(enum pmc_event pe, char if (KWPREFIXMATCH(p, P4_KW_ACTIVE)) { q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); - if (strcmp(q, P4_KW_ACTIVE_NONE) == 0) + if (strcasecmp(q, P4_KW_ACTIVE_NONE) == 0) cccractivemask = 0x0; - else if (strcmp(q, P4_KW_ACTIVE_SINGLE) == 0) + else if (strcasecmp(q, P4_KW_ACTIVE_SINGLE) == 0) cccractivemask = 0x1; - else if (strcmp(q, P4_KW_ACTIVE_BOTH) == 0) + else if (strcasecmp(q, P4_KW_ACTIVE_BOTH) == 0) cccractivemask = 0x2; - else if (strcmp(q, P4_KW_ACTIVE_ANY) == 0) + else if (strcasecmp(q, P4_KW_ACTIVE_ANY) == 0) cccractivemask = 0x3; else - return -1; + return (-1); } else if (KWPREFIXMATCH(p, P4_KW_BUSREQTYPE)) { if (has_busreqtype == 0) - return -1; + return (-1); q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; + return (-1); evmask = (evmask & ~0x1F) | (count & 0x1F); } else if (KWMATCH(p, P4_KW_CASCADE)) pmc_config->pm_caps |= PMC_CAP_CASCADE; @@ -1200,7 +1537,7 @@ p4_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_INVERT; else if (KWPREFIXMATCH(p, P4_KW_MASK "=")) { if ((n = pmc_parse_mask(pmask, p, &evmask)) < 0) - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_QUALIFIER; } else if (KWMATCH(p, P4_KW_OS)) pmc_config->pm_caps |= PMC_CAP_SYSTEM; @@ -1208,15 +1545,15 @@ p4_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_PRECISE; else if (KWPREFIXMATCH(p, P4_KW_TAG "=")) { if (has_tag == 0) - return -1; + return (-1); q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_TAGGING; pmc_config->pm_md.pm_p4.pm_p4_escrconfig |= @@ -1224,11 +1561,11 @@ p4_allocate_pmc(enum pmc_event pe, char } else if (KWPREFIXMATCH(p, P4_KW_THRESHOLD "=")) { q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; + return (-1); pmc_config->pm_caps |= PMC_CAP_THRESHOLD; pmc_config->pm_md.pm_p4.pm_p4_cccrconfig &= @@ -1238,7 +1575,7 @@ p4_allocate_pmc(enum pmc_event pe, char } else if (KWMATCH(p, P4_KW_USR)) pmc_config->pm_caps |= PMC_CAP_USER; else - return -1; + return (-1); } /* other post processing */ @@ -1258,16 +1595,16 @@ p4_allocate_pmc(enum pmc_event pe, char case PMC_EV_P4_FSB_DATA_ACTIVITY: if ((evmask & 0x06) == 0x06 || (evmask & 0x18) == 0x18) - return -1; /* can't have own+other bits together */ + return (-1); /* can't have own+other bits together */ if (evmask == 0) /* default:drdy-{drv,own}+dbsy{drv,own} */ evmask = 0x1D; break; case PMC_EV_P4_MACHINE_CLEAR: /* only one bit is allowed to be set */ if ((evmask & (evmask - 1)) != 0) - return -1; + return (-1); if (evmask == 0) { - evmask = 0x1; /* 'CLEAR' */ + evmask = 0x1; /* 'CLEAR' */ pmc_config->pm_caps |= PMC_CAP_QUALIFIER; } break; @@ -1282,7 +1619,7 @@ p4_allocate_pmc(enum pmc_event pe, char pmc_config->pm_md.pm_p4.pm_p4_escrconfig = P4_ESCR_TO_EVENT_MASK(evmask); - return 0; + return (0); } #endif @@ -1294,7 +1631,14 @@ p4_allocate_pmc(enum pmc_event pe, char */ static struct pmc_event_alias p5_aliases[] = { - EV_ALIAS("cycles", "tsc"), + EV_ALIAS("branches", "p5-taken-branches"), + EV_ALIAS("cycles", "tsc"), + EV_ALIAS("dc-misses", "p5-data-read-miss-or-write-miss"), + EV_ALIAS("ic-misses", "p5-code-cache-miss"), + EV_ALIAS("instructions", "p5-instructions-executed"), + EV_ALIAS("interrupts", "p5-hardware-interrupts"), + EV_ALIAS("unhalted-cycles", + "p5-number-of-cycles-not-in-halt-state"), EV_ALIAS(NULL, NULL) }; @@ -1302,7 +1646,7 @@ static int p5_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) { - return -1 || pe || ctrspec || pmc_config; /* shut up gcc */ + return (-1 || pe || ctrspec || pmc_config); /* shut up gcc */ } /* @@ -1438,22 +1782,15 @@ p6_allocate_pmc(enum pmc_event pe, char int count, n; const struct pmc_masks *pm, *pmask; - pmc_config->pm_caps |= PMC_CAP_READ; + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); pmc_config->pm_md.pm_ppro.pm_ppro_config = 0; - if (pe == PMC_EV_TSC_TSC) { - if (ctrspec && *ctrspec != '\0') - return -1; - return 0; - } - - pmc_config->pm_caps |= PMC_CAP_WRITE; evmask = 0; #define P6MASKSET(M) pmask = p6_mask_ ## M switch(pe) { - case PMC_EV_P6_L2_IFETCH: P6MASKSET(mesi); break; + case PMC_EV_P6_L2_IFETCH: P6MASKSET(mesi); break; case PMC_EV_P6_L2_LD: P6MASKSET(mesi); break; case PMC_EV_P6_L2_ST: P6MASKSET(mesi); break; case PMC_EV_P6_L2_RQSTS: P6MASKSET(mesi); break; @@ -1513,10 +1850,10 @@ p6_allocate_pmc(enum pmc_event pe, char if (KWPREFIXMATCH(p, P6_KW_CMASK "=")) { q = strchr(p, '='); if (*++q == '\0') /* skip '=' */ - return -1; + return (-1); count = strtol(q, &e, 0); if (e == q || *e != '\0') - return -1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 18:45:04 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97832106566C; Sun, 7 Jun 2009 18:45:04 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 847F88FC12; Sun, 7 Jun 2009 18:45:04 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n57Ij4VY001599; Sun, 7 Jun 2009 18:45:04 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57Ij4Rb001597; Sun, 7 Jun 2009 18:45:04 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200906071845.n57Ij4Rb001597@svn.freebsd.org> From: Fabien Thomas Date: Sun, 7 Jun 2009 18:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193638 - in stable/7: . sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 18:45:05 -0000 Author: fabient Date: Sun Jun 7 18:45:04 2009 New Revision: 193638 URL: http://svn.freebsd.org/changeset/base/193638 Log: Bump sys/param.h for the merge of PmcTools. Add a note to rebuild world in UPDATING. Reviewed by: jkoshy (mentor) Modified: stable/7/UPDATING stable/7/sys/sys/param.h Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Sun Jun 7 18:19:04 2009 (r193637) +++ stable/7/UPDATING Sun Jun 7 18:45:04 2009 (r193638) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090606: + The components of PmcTools have been upgraded. Please + update world and the kernel. + 20090521: The k8temp(4) driver has been renamed to amdtemp(4) since support for K10 and K11 CPU families was added. Modified: stable/7/sys/sys/param.h ============================================================================== --- stable/7/sys/sys/param.h Sun Jun 7 18:19:04 2009 (r193637) +++ stable/7/sys/sys/param.h Sun Jun 7 18:45:04 2009 (r193638) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 702102 /* Master, propagated to newvers */ +#define __FreeBSD_version 702103 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 18:53:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA91C106566C; Sun, 7 Jun 2009 18:53:25 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9811C8FC0C; Sun, 7 Jun 2009 18:53:25 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n57IrPDi001922; Sun, 7 Jun 2009 18:53:25 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57IrPLG001921; Sun, 7 Jun 2009 18:53:25 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200906071853.n57IrPLG001921@svn.freebsd.org> From: Fabien Thomas Date: Sun, 7 Jun 2009 18:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193639 - stable/7/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 18:53:26 -0000 Author: fabient Date: Sun Jun 7 18:53:25 2009 New Revision: 193639 URL: http://svn.freebsd.org/changeset/base/193639 Log: Repair pc98 LINT build broken by PmcTools merge. Reviewed by: jkoshy (mentor) Modified: stable/7/sys/conf/files.pc98 Modified: stable/7/sys/conf/files.pc98 ============================================================================== --- stable/7/sys/conf/files.pc98 Sun Jun 7 18:45:04 2009 (r193638) +++ stable/7/sys/conf/files.pc98 Sun Jun 7 18:53:25 2009 (r193639) @@ -105,6 +105,7 @@ dev/fb/fb.c optional fb | gdc dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc +dev/hwpmc/hwpmc_core.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc From owner-svn-src-stable@FreeBSD.ORG Sun Jun 7 19:12:41 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D874106568B; Sun, 7 Jun 2009 19:12:41 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30BA38FC17; Sun, 7 Jun 2009 19:12:41 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n57JCfTC002484; Sun, 7 Jun 2009 19:12:41 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n57JCewB002479; Sun, 7 Jun 2009 19:12:40 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <200906071912.n57JCewB002479@svn.freebsd.org> From: Fabien Thomas Date: Sun, 7 Jun 2009 19:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193641 - in stable/7/sys: arm/include ia64/include powerpc/include sparc64/include sun4v/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2009 19:12:42 -0000 Author: fabient Date: Sun Jun 7 19:12:40 2009 New Revision: 193641 URL: http://svn.freebsd.org/changeset/base/193641 Log: Unbreak LINT. Modified: stable/7/sys/arm/include/pmc_mdep.h stable/7/sys/ia64/include/pmc_mdep.h stable/7/sys/powerpc/include/pmc_mdep.h stable/7/sys/sparc64/include/pmc_mdep.h stable/7/sys/sun4v/include/pmc_mdep.h Modified: stable/7/sys/arm/include/pmc_mdep.h ============================================================================== --- stable/7/sys/arm/include/pmc_mdep.h Sun Jun 7 19:12:08 2009 (r193640) +++ stable/7/sys/arm/include/pmc_mdep.h Sun Jun 7 19:12:40 2009 (r193641) @@ -19,6 +19,10 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { }; +#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ +#define PMC_TRAPFRAME_TO_FP(TF) (0) +#define PMC_TRAPFRAME_TO_SP(TF) (0) + #endif #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: stable/7/sys/ia64/include/pmc_mdep.h ============================================================================== --- stable/7/sys/ia64/include/pmc_mdep.h Sun Jun 7 19:12:08 2009 (r193640) +++ stable/7/sys/ia64/include/pmc_mdep.h Sun Jun 7 19:12:40 2009 (r193641) @@ -19,6 +19,10 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { }; +#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ +#define PMC_TRAPFRAME_TO_FP(TF) (0) +#define PMC_TRAPFRAME_TO_SP(TF) (0) + #endif #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: stable/7/sys/powerpc/include/pmc_mdep.h ============================================================================== --- stable/7/sys/powerpc/include/pmc_mdep.h Sun Jun 7 19:12:08 2009 (r193640) +++ stable/7/sys/powerpc/include/pmc_mdep.h Sun Jun 7 19:12:40 2009 (r193641) @@ -20,6 +20,10 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { }; +#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ +#define PMC_TRAPFRAME_TO_FP(TF) (0) +#define PMC_TRAPFRAME_TO_SP(TF) (0) + #endif #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: stable/7/sys/sparc64/include/pmc_mdep.h ============================================================================== --- stable/7/sys/sparc64/include/pmc_mdep.h Sun Jun 7 19:12:08 2009 (r193640) +++ stable/7/sys/sparc64/include/pmc_mdep.h Sun Jun 7 19:12:40 2009 (r193641) @@ -19,6 +19,10 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { }; +#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ +#define PMC_TRAPFRAME_TO_FP(TF) (0) +#define PMC_TRAPFRAME_TO_SP(TF) (0) + #endif #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: stable/7/sys/sun4v/include/pmc_mdep.h ============================================================================== --- stable/7/sys/sun4v/include/pmc_mdep.h Sun Jun 7 19:12:08 2009 (r193640) +++ stable/7/sys/sun4v/include/pmc_mdep.h Sun Jun 7 19:12:40 2009 (r193641) @@ -19,6 +19,10 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { }; +#define PMC_TRAPFRAME_TO_PC(TF) (0) /* Stubs */ +#define PMC_TRAPFRAME_TO_FP(TF) (0) +#define PMC_TRAPFRAME_TO_SP(TF) (0) + #endif #endif /* !_MACHINE_PMC_MDEP_H_ */ From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 05:11:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C19DC106570B; Mon, 8 Jun 2009 05:11:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACF428FC1F; Mon, 8 Jun 2009 05:11:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n585BZxC016772; Mon, 8 Jun 2009 05:11:35 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n585BZP5016771; Mon, 8 Jun 2009 05:11:35 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200906080511.n585BZP5016771@svn.freebsd.org> From: Hiroki Sato Date: Mon, 8 Jun 2009 05:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193687 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 05:11:37 -0000 Author: hrs Date: Mon Jun 8 05:11:35 2009 New Revision: 193687 URL: http://svn.freebsd.org/changeset/base/193687 Log: Document possible bge(4) panic on shutdown time. Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jun 8 05:00:32 2009 (r193686) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jun 8 05:11:35 2009 (r193687) @@ -192,6 +192,10 @@ 0 (globally on the system). An Errata Notice to fix this problem is planned after the release. + [20090608] An issue was found in the &man.bge.4; driver that + it can cause a system panic upon reboot with heavy network + traffic. A fix has been committed to RELENG_7 (r192127). + Late-Breaking News and Corrections From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 13:31:28 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19F8910656C8; Mon, 8 Jun 2009 13:31:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06DE78FC23; Mon, 8 Jun 2009 13:31:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58DVR8F030606; Mon, 8 Jun 2009 13:31:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58DVRDO030605; Mon, 8 Jun 2009 13:31:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906081331.n58DVRDO030605@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Jun 2009 13:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193713 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 13:31:29 -0000 Author: kib Date: Mon Jun 8 13:31:27 2009 New Revision: 193713 URL: http://svn.freebsd.org/changeset/base/193713 Log: MFC r193535: Put intrcnt, eintrcnt, intrnames and eintrnames into the .data section. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/support.S stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/support.S ============================================================================== --- stable/7/sys/amd64/amd64/support.S Mon Jun 8 12:15:39 2009 (r193712) +++ stable/7/sys/amd64/amd64/support.S Mon Jun 8 13:31:27 2009 (r193713) @@ -38,6 +38,7 @@ #include "assym.s" + .data ALIGN_DATA .globl intrcnt, eintrcnt intrcnt: From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 14:52:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDE391065674; Mon, 8 Jun 2009 14:52:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA4D78FC1C; Mon, 8 Jun 2009 14:52:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58EqHek032483; Mon, 8 Jun 2009 14:52:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58EqHrH032482; Mon, 8 Jun 2009 14:52:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906081452.n58EqHrH032482@svn.freebsd.org> From: John Baldwin Date: Mon, 8 Jun 2009 14:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193717 - in stable/7/sys: . boot/i386/libi386 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 14:52:18 -0000 Author: jhb Date: Mon Jun 8 14:52:17 2009 New Revision: 193717 URL: http://svn.freebsd.org/changeset/base/193717 Log: MFC: Add a missing parameter when displaying GPT partitions with an unknown UUID. Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/biosdisk.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- stable/7/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 14:37:47 2009 (r193716) +++ stable/7/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 14:52:17 2009 (r193717) @@ -375,6 +375,7 @@ bd_printgptpart(struct open_disk *od, st sprintf(line, "%s: FreeBSD swap%s\n", prefix, stats); else sprintf(line, "%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n", + prefix, gp->gp_type.time_low, gp->gp_type.time_mid, gp->gp_type.time_hi_and_version, gp->gp_type.clock_seq_hi_and_reserved, gp->gp_type.clock_seq_low, From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 15:17:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7FA106566C; Mon, 8 Jun 2009 15:17:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ABED8FC0A; Mon, 8 Jun 2009 15:17:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58FHaPu033308; Mon, 8 Jun 2009 15:17:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58FHaAE033307; Mon, 8 Jun 2009 15:17:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906081517.n58FHaAE033307@svn.freebsd.org> From: John Baldwin Date: Mon, 8 Jun 2009 15:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193722 - in stable/6/sys: . boot/i386/libi386 contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 15:17:38 -0000 Author: jhb Date: Mon Jun 8 15:17:36 2009 New Revision: 193722 URL: http://svn.freebsd.org/changeset/base/193722 Log: MFC: Add a missing parameter when displaying GPT partitions with an unknown UUID. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/biosdisk.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- stable/6/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:13:20 2009 (r193721) +++ stable/6/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:17:36 2009 (r193722) @@ -372,6 +372,7 @@ bd_printgptpart(struct open_disk *od, st sprintf(line, "%s: FreeBSD swap%s\n", prefix, stats); else sprintf(line, "%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n", + prefix, gp->gp_type.time_low, gp->gp_type.time_mid, gp->gp_type.time_hi_and_version, gp->gp_type.clock_seq_hi_and_reserved, gp->gp_type.clock_seq_low, From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 15:33:56 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746831065772; Mon, 8 Jun 2009 15:33:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0D68C8FC1A; Mon, 8 Jun 2009 15:33:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B62B446B45; Mon, 8 Jun 2009 11:33:55 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id A9CFD8A069; Mon, 8 Jun 2009 11:33:54 -0400 (EDT) From: John Baldwin To: Bruce Simpson Date: Mon, 8 Jun 2009 10:50:40 -0400 User-Agent: KMail/1.9.7 References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <4A109662.9060909@FreeBSD.org> <4A10A324.5040501@incunabulum.net> In-Reply-To: <4A10A324.5040501@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906081050.41020.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 08 Jun 2009 11:33:54 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 15:33:58 -0000 On Sunday 17 May 2009 7:52:04 pm Bruce Simpson wrote: > Alexander Motin wrote: > > ... > > This change is not anyhow related to your system. Looks like the real > > reason found by jhb@ on stable@. Probably something become more strict > > in system resource management last time and this driver violates now. > > > > Thanks... I reckon John is probably on the money with this but have not > looked closely. Hopefully the fix is backportable... I will try to find > time to test HEAD, I need to do some HEAD testing on this box anyway, > using a USB key is possible for this with NanoBSD now :-) Were you ever able to test http://www.FreeBSD.org/~jhb/patches/ata_ali.patch? -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:22:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64E1C1065692; Mon, 8 Jun 2009 19:22:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52CF78FC15; Mon, 8 Jun 2009 19:22:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JMCiC039639; Mon, 8 Jun 2009 19:22:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58JMCSB039638; Mon, 8 Jun 2009 19:22:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081922.n58JMCSB039638@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193738 - stable/7/usr.bin/rpcgen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:22:13 -0000 Author: des Date: Mon Jun 8 19:22:12 2009 New Revision: 193738 URL: http://svn.freebsd.org/changeset/base/193738 Log: merge r173761: generate code that respects C99's strict aliasing rules. Modified: stable/7/usr.bin/rpcgen/ (props changed) stable/7/usr.bin/rpcgen/rpc_cout.c Modified: stable/7/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- stable/7/usr.bin/rpcgen/rpc_cout.c Mon Jun 8 18:58:54 2009 (r193737) +++ stable/7/usr.bin/rpcgen/rpc_cout.c Mon Jun 8 19:22:12 2009 (r193738) @@ -200,11 +200,13 @@ print_ifsizeof(int indent, const char *p } static void -print_ifclose(int indent) +print_ifclose(int indent, int brace) { f_print(fout, "))\n"); tabify(fout, indent); f_print(fout, "\treturn (FALSE);\n"); + if (brace) + f_print(fout, "\t}\n"); } static void @@ -212,12 +214,16 @@ print_ifstat(int indent, const char *pre const char *amax, const char *objname, const char *name) { const char *alt = NULL; + int brace = 0; switch (rel) { case REL_POINTER: + brace = 1; + f_print(fout, "\t{\n"); + f_print(fout, "\t%s **pp = %s;\n", type, objname); print_ifopen(indent, "pointer"); print_ifarg("(char **)"); - f_print(fout, "%s", objname); + f_print(fout, "pp"); print_ifsizeof(0, prefix, type); break; case REL_VECTOR: @@ -274,7 +280,7 @@ print_ifstat(int indent, const char *pre print_ifarg(objname); break; } - print_ifclose(indent); + print_ifclose(indent, brace); } /* ARGSUSED */ @@ -283,7 +289,7 @@ emit_enum(definition *def __unused) { print_ifopen(1, "enum"); print_ifarg("(enum_t *)objp"); - print_ifclose(1); + print_ifclose(1, 0); } static void From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:24:37 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDCB21065690; Mon, 8 Jun 2009 19:24:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC6838FC1E; Mon, 8 Jun 2009 19:24:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JObJ0039760; Mon, 8 Jun 2009 19:24:37 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58JObsf039759; Mon, 8 Jun 2009 19:24:37 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081924.n58JObsf039759@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193739 - stable/7/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:24:39 -0000 Author: des Date: Mon Jun 8 19:24:37 2009 New Revision: 193739 URL: http://svn.freebsd.org/changeset/base/193739 Log: merge r173762: use a forward declaration to avoid an aliasing warning Modified: stable/7/include/ (props changed) stable/7/include/dirent.h Modified: stable/7/include/dirent.h ============================================================================== --- stable/7/include/dirent.h Mon Jun 8 19:22:12 2009 (r193738) +++ stable/7/include/dirent.h Mon Jun 8 19:24:37 2009 (r193739) @@ -60,6 +60,7 @@ #define DIRBLKSIZ 1024 struct _telldir; /* see telldir.h */ +struct pthread_mutex; /* structure describing an open directory. */ typedef struct _dirdesc { @@ -71,7 +72,7 @@ typedef struct _dirdesc { long dd_seek; /* magic cookie returned by getdirentries */ long dd_rewind; /* magic cookie for rewinding */ int dd_flags; /* flags for readdir */ - void *dd_lock; /* hack to avoid including */ + struct pthread_mutex *dd_lock; /* lock */ struct _telldir *dd_td; /* telldir position recording */ } DIR; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:40:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D561106566C; Mon, 8 Jun 2009 19:40:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1160A8FC13; Mon, 8 Jun 2009 19:40:49 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JemWY040561; Mon, 8 Jun 2009 19:40:48 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58JemMt040560; Mon, 8 Jun 2009 19:40:48 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081940.n58JemMt040560@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193740 - stable/7/lib/libc/string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:40:49 -0000 Author: des Date: Mon Jun 8 19:40:48 2009 New Revision: 193740 URL: http://svn.freebsd.org/changeset/base/193740 Log: Remove bogus mergeinfo Modified: stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:52:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1B2A106566C; Mon, 8 Jun 2009 19:52:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF79C8FC0A; Mon, 8 Jun 2009 19:52:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JqCNT040924; Mon, 8 Jun 2009 19:52:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58JqCLi040920; Mon, 8 Jun 2009 19:52:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081952.n58JqCLi040920@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193741 - in stable/7/lib/libc: . gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:52:13 -0000 Author: des Date: Mon Jun 8 19:52:12 2009 New Revision: 193741 URL: http://svn.freebsd.org/changeset/base/193741 Log: merge r174221: remove unnecessary casts Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gen/closedir.c stable/7/lib/libc/gen/readdir.c stable/7/lib/libc/gen/seekdir.c stable/7/lib/libc/gen/telldir.c Modified: stable/7/lib/libc/gen/closedir.c ============================================================================== --- stable/7/lib/libc/gen/closedir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/closedir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -54,7 +54,7 @@ closedir(dirp) int fd; if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */ fd = dirp->dd_fd; dirp->dd_fd = -1; @@ -62,8 +62,8 @@ closedir(dirp) free((void *)dirp->dd_buf); _reclaim_telldir(dirp); if (__isthreaded) { - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); - _pthread_mutex_destroy((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); + _pthread_mutex_destroy(&dirp->dd_lock); } free((void *)dirp); return(_close(fd)); Modified: stable/7/lib/libc/gen/readdir.c ============================================================================== --- stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -88,9 +88,9 @@ readdir(dirp) struct dirent *dp; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); dp = _readdir_unlocked(dirp, 1); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else dp = _readdir_unlocked(dirp, 1); @@ -109,10 +109,10 @@ readdir_r(dirp, entry, result) saved_errno = errno; errno = 0; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); Modified: stable/7/lib/libc/gen/seekdir.c ============================================================================== --- stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -52,8 +52,8 @@ seekdir(dirp, loc) long loc; { if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, loc); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } Modified: stable/7/lib/libc/gen/telldir.c ============================================================================== --- stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -64,13 +64,13 @@ telldir(dirp) if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL) return (-1); if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); lp->loc_index = dirp->dd_td->td_loccnt++; lp->loc_seek = dirp->dd_seek; lp->loc_loc = dirp->dd_loc; LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); return (lp->loc_index); } From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:56:50 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD311065688; Mon, 8 Jun 2009 19:56:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63EC88FC1F; Mon, 8 Jun 2009 19:56:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JuojM041156; Mon, 8 Jun 2009 19:56:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58Juo4O041155; Mon, 8 Jun 2009 19:56:50 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081956.n58Juo4O041155@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193743 - stable/7/lib/libc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:56:52 -0000 Author: des Date: Mon Jun 8 19:56:50 2009 New Revision: 193743 URL: http://svn.freebsd.org/changeset/base/193743 Log: Record a rev that was merged in the previous commit. Modified: stable/7/lib/libc/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 19:59:27 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F17D1065675; Mon, 8 Jun 2009 19:59:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B7678FC1E; Mon, 8 Jun 2009 19:59:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58JxRD9041398; Mon, 8 Jun 2009 19:59:27 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58JxRaF041391; Mon, 8 Jun 2009 19:59:27 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906081959.n58JxRaF041391@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 19:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193745 - in stable/7/lib/libc: . rpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:59:28 -0000 Author: des Date: Mon Jun 8 19:59:26 2009 New Revision: 193745 URL: http://svn.freebsd.org/changeset/base/193745 Log: merge r173763: fix aliasing bug Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/rpc/authdes_prot.c stable/7/lib/libc/rpc/authunix_prot.c stable/7/lib/libc/rpc/key_prot_xdr.c stable/7/lib/libc/rpc/rpc_callmsg.c stable/7/lib/libc/rpc/rpc_prot.c stable/7/lib/libc/rpc/rpcb_prot.c stable/7/lib/libc/rpc/rpcb_st_xdr.c Modified: stable/7/lib/libc/rpc/authdes_prot.c ============================================================================== --- stable/7/lib/libc/rpc/authdes_prot.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/authdes_prot.c Mon Jun 8 19:59:26 2009 (r193745) @@ -54,10 +54,11 @@ xdr_authdes_cred(xdrs, cred) XDR *xdrs; struct authdes_cred *cred; { + enum authdes_namekind *padc_namekind = &cred->adc_namekind; /* * Unrolled xdr */ - ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind)); + ATTEMPT(xdr_enum(xdrs, (enum_t *) padc_namekind)); switch (cred->adc_namekind) { case ADN_FULLNAME: ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name, Modified: stable/7/lib/libc/rpc/authunix_prot.c ============================================================================== --- stable/7/lib/libc/rpc/authunix_prot.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/authunix_prot.c Mon Jun 8 19:59:26 2009 (r193745) @@ -60,15 +60,18 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { + int **paup_gids; assert(xdrs != NULL); assert(p != NULL); + paup_gids = &p->aup_gids; + if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && xdr_int(xdrs, &(p->aup_uid)) && xdr_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (caddr_t *)&(p->aup_gids), + && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); } Modified: stable/7/lib/libc/rpc/key_prot_xdr.c ============================================================================== --- stable/7/lib/libc/rpc/key_prot_xdr.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/key_prot_xdr.c Mon Jun 8 19:59:26 2009 (r193745) @@ -117,12 +117,14 @@ xdr_cryptkeyres(register XDR *xdrs, cryp bool_t xdr_unixcred(register XDR *xdrs, unixcred *objp) { + u_int **pgids_val; if (!xdr_u_int(xdrs, &objp->uid)) return (FALSE); if (!xdr_u_int(xdrs, &objp->gid)) return (FALSE); - if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS, + pgids_val = &objp->gids.gids_val; + if (!xdr_array(xdrs, (char **) pgids_val, (u_int *) &objp->gids.gids_len, MAXGIDS, sizeof (u_int), (xdrproc_t) xdr_u_int)) return (FALSE); return (TRUE); Modified: stable/7/lib/libc/rpc/rpc_callmsg.c ============================================================================== --- stable/7/lib/libc/rpc/rpc_callmsg.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpc_callmsg.c Mon Jun 8 19:59:26 2009 (r193745) @@ -59,6 +59,7 @@ xdr_callmsg(xdrs, cmsg) XDR *xdrs; struct rpc_msg *cmsg; { + enum msg_type *prm_direction; int32_t *buf; struct opaque_auth *oa; @@ -190,9 +191,10 @@ xdr_callmsg(xdrs, cmsg) return (TRUE); } } + prm_direction = &cmsg->rm_direction; if ( xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) && - xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) && + xdr_enum(xdrs, (enum_t *) prm_direction) && (cmsg->rm_direction == CALL) && xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) && (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) && Modified: stable/7/lib/libc/rpc/rpc_prot.c ============================================================================== --- stable/7/lib/libc/rpc/rpc_prot.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpc_prot.c Mon Jun 8 19:59:26 2009 (r193745) @@ -108,14 +108,17 @@ xdr_accepted_reply(xdrs, ar) XDR *xdrs; struct accepted_reply *ar; { + enum accept_stat *par_stat; assert(xdrs != NULL); assert(ar != NULL); + par_stat = &ar->ar_stat; + /* personalized union, rather than calling xdr_union */ if (! xdr_opaque_auth(xdrs, &(ar->ar_verf))) return (FALSE); - if (! xdr_enum(xdrs, (enum_t *)&(ar->ar_stat))) + if (! xdr_enum(xdrs, (enum_t *) par_stat)) return (FALSE); switch (ar->ar_stat) { @@ -144,12 +147,16 @@ xdr_rejected_reply(xdrs, rr) XDR *xdrs; struct rejected_reply *rr; { + enum reject_stat *prj_stat; + enum auth_stat *prj_why; assert(xdrs != NULL); assert(rr != NULL); + prj_stat = &rr->rj_stat; + /* personalized union, rather than calling xdr_union */ - if (! xdr_enum(xdrs, (enum_t *)&(rr->rj_stat))) + if (! xdr_enum(xdrs, (enum_t *) prj_stat)) return (FALSE); switch (rr->rj_stat) { @@ -159,7 +166,8 @@ xdr_rejected_reply(xdrs, rr) return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high))); case AUTH_ERROR: - return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why))); + prj_why = &rr->rj_why; + return (xdr_enum(xdrs, (enum_t *) prj_why)); } /* NOTREACHED */ assert(0); @@ -179,14 +187,20 @@ xdr_replymsg(xdrs, rmsg) XDR *xdrs; struct rpc_msg *rmsg; { + enum msg_type *prm_direction; + enum reply_stat *prp_stat; + assert(xdrs != NULL); assert(rmsg != NULL); + prm_direction = &rmsg->rm_direction; + prp_stat = &rmsg->rm_reply.rp_stat; + if ( xdr_u_int32_t(xdrs, &(rmsg->rm_xid)) && - xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) && + xdr_enum(xdrs, (enum_t *) prm_direction) && (rmsg->rm_direction == REPLY) ) - return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat), + return (xdr_union(xdrs, (enum_t *) prp_stat, (caddr_t)(void *)&(rmsg->rm_reply.ru), reply_dscrm, NULL_xdrproc_t)); return (FALSE); @@ -203,16 +217,19 @@ xdr_callhdr(xdrs, cmsg) XDR *xdrs; struct rpc_msg *cmsg; { + enum msg_type *prm_direction; assert(xdrs != NULL); assert(cmsg != NULL); + prm_direction = &cmsg->rm_direction; + cmsg->rm_direction = CALL; cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION; if ( (xdrs->x_op == XDR_ENCODE) && xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) && - xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) && + xdr_enum(xdrs, (enum_t *) prm_direction) && xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) && xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) ) return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers))); Modified: stable/7/lib/libc/rpc/rpcb_prot.c ============================================================================== --- stable/7/lib/libc/rpc/rpcb_prot.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpcb_prot.c Mon Jun 8 19:59:26 2009 (r193745) @@ -320,11 +320,13 @@ xdr_netbuf(xdrs, objp) struct netbuf *objp; { bool_t dummy; + void **pp; if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) { return (FALSE); } - dummy = xdr_bytes(xdrs, (char **)&(objp->buf), + pp = &objp->buf; + dummy = xdr_bytes(xdrs, (char **) pp, (u_int *)&(objp->len), objp->maxlen); return (dummy); } Modified: stable/7/lib/libc/rpc/rpcb_st_xdr.c ============================================================================== --- stable/7/lib/libc/rpc/rpcb_st_xdr.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpcb_st_xdr.c Mon Jun 8 19:59:26 2009 (r193745) @@ -52,6 +52,7 @@ xdr_rpcbs_addrlist(xdrs, objp) XDR *xdrs; rpcbs_addrlist *objp; { + struct rpcbs_addrlist **pnext; if (!xdr_u_int32_t(xdrs, &objp->prog)) { return (FALSE); @@ -69,7 +70,9 @@ xdr_rpcbs_addrlist(xdrs, objp) return (FALSE); } - if (!xdr_pointer(xdrs, (char **)&objp->next, + pnext = &objp->next; + + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_addrlist), (xdrproc_t)xdr_rpcbs_addrlist)) { return (FALSE); @@ -86,6 +89,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp) rpcbs_rmtcalllist *objp; { int32_t *buf; + struct rpcbs_rmtcalllist **pnext; if (xdrs->x_op == XDR_ENCODE) { buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT); @@ -119,7 +123,8 @@ xdr_rpcbs_rmtcalllist(xdrs, objp) if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { return (FALSE); } - if (!xdr_pointer(xdrs, (char **)&objp->next, + pnext = &objp->next; + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_rmtcalllist), (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); @@ -157,7 +162,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp) if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { return (FALSE); } - if (!xdr_pointer(xdrs, (char **)&objp->next, + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_rmtcalllist), (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); @@ -185,7 +190,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp) if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) { return (FALSE); } - if (!xdr_pointer(xdrs, (char **)&objp->next, + if (!xdr_pointer(xdrs, (char **) pnext, sizeof (rpcbs_rmtcalllist), (xdrproc_t)xdr_rpcbs_rmtcalllist)) { return (FALSE); From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 20:04:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86D051065672; Mon, 8 Jun 2009 20:04:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74EDC8FC0A; Mon, 8 Jun 2009 20:04:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58K4avo041740; Mon, 8 Jun 2009 20:04:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58K4avY041738; Mon, 8 Jun 2009 20:04:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906082004.n58K4avY041738@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 20:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193747 - in stable/7/lib/libc: . include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 20:04:37 -0000 Author: des Date: Mon Jun 8 20:04:36 2009 New Revision: 193747 URL: http://svn.freebsd.org/changeset/base/193747 Log: merge r177605,177607,177855: add missing namespace wrappers for libthr Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/include/namespace.h stable/7/lib/libc/include/un-namespace.h Modified: stable/7/lib/libc/include/namespace.h ============================================================================== --- stable/7/lib/libc/include/namespace.h Mon Jun 8 20:02:15 2009 (r193746) +++ stable/7/lib/libc/include/namespace.h Mon Jun 8 20:04:36 2009 (r193747) @@ -84,6 +84,7 @@ #define pthread_atfork _pthread_atfork #define pthread_attr_destroy _pthread_attr_destroy #define pthread_attr_get_np _pthread_attr_get_np +#define pthread_attr_getaffinity_np _pthread_attr_getaffinity_np #define pthread_attr_getdetachstate _pthread_attr_getdetachstate #define pthread_attr_getguardsize _pthread_attr_getguardsize #define pthread_attr_getinheritsched _pthread_attr_getinheritsched @@ -94,6 +95,7 @@ #define pthread_attr_getstackaddr _pthread_attr_getstackaddr #define pthread_attr_getstacksize _pthread_attr_getstacksize #define pthread_attr_init _pthread_attr_init +#define pthread_attr_setaffinity_np _pthread_attr_setaffinity_np #define pthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np #define pthread_attr_setdetachstate _pthread_attr_setdetachstate #define pthread_attr_setguardsize _pthread_attr_setguardsize @@ -130,7 +132,9 @@ #define pthread_detach _pthread_detach #define pthread_equal _pthread_equal #define pthread_exit _pthread_exit +#define pthread_getaffinity_np _pthread_getaffinity_np #define pthread_getconcurrency _pthread_getconcurrency +#define pthread_getcpuclockid _pthread_getcpuclockid #define pthread_getprio _pthread_getprio #define pthread_getschedparam _pthread_getschedparam #define pthread_getspecific _pthread_getspecific @@ -178,6 +182,7 @@ #define pthread_rwlockattr_setpshared _pthread_rwlockattr_setpshared #define pthread_self _pthread_self #define pthread_set_name_np _pthread_set_name_np +#define pthread_setaffinity_np _pthread_setaffinity_np #define pthread_setcancelstate _pthread_setcancelstate #define pthread_setcanceltype _pthread_setcanceltype #define pthread_setconcurrency _pthread_setconcurrency Modified: stable/7/lib/libc/include/un-namespace.h ============================================================================== --- stable/7/lib/libc/include/un-namespace.h Mon Jun 8 20:02:15 2009 (r193746) +++ stable/7/lib/libc/include/un-namespace.h Mon Jun 8 20:04:36 2009 (r193747) @@ -65,6 +65,7 @@ #undef pthread_atfork #undef pthread_attr_destroy #undef pthread_attr_get_np +#undef pthread_attr_getaffinity_np #undef pthread_attr_getdetachstate #undef pthread_attr_getguardsize #undef pthread_attr_getinheritsched @@ -75,6 +76,7 @@ #undef pthread_attr_getstackaddr #undef pthread_attr_getstacksize #undef pthread_attr_init +#undef pthread_attr_setaffinity_np #undef pthread_attr_setcreatesuspend_np #undef pthread_attr_setdetachstate #undef pthread_attr_setguardsize @@ -111,7 +113,9 @@ #undef pthread_detach #undef pthread_equal #undef pthread_exit +#undef pthread_getaffinity_np #undef pthread_getconcurrency +#undef pthread_getcpuclockid #undef pthread_getprio #undef pthread_getschedparam #undef pthread_getspecific @@ -159,6 +163,7 @@ #undef pthread_rwlockattr_setpshared #undef pthread_self #undef pthread_set_name_np +#undef pthread_setaffinity_np #undef pthread_setcancelstate #undef pthread_setcanceltype #undef pthread_setconcurrency From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 20:07:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 626901065672; Mon, 8 Jun 2009 20:07:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 360E98FC20; Mon, 8 Jun 2009 20:07:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58K7Dxt041906; Mon, 8 Jun 2009 20:07:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58K7D3S041905; Mon, 8 Jun 2009 20:07:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906082007.n58K7D3S041905@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 20:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193749 - stable/7/lib/libthr X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 20:07:14 -0000 Author: des Date: Mon Jun 8 20:07:12 2009 New Revision: 193749 URL: http://svn.freebsd.org/changeset/base/193749 Log: record already-merged r177605 Modified: stable/7/lib/libthr/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 20:08:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 934B91065679; Mon, 8 Jun 2009 20:08:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 811778FC26; Mon, 8 Jun 2009 20:08:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58K8Ks7042013; Mon, 8 Jun 2009 20:08:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58K8KhD042012; Mon, 8 Jun 2009 20:08:20 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906082008.n58K8KhD042012@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 8 Jun 2009 20:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193751 - in stable/7/lib/libc: . gdtoa X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 20:08:21 -0000 Author: des Date: Mon Jun 8 20:08:20 2009 New Revision: 193751 URL: http://svn.freebsd.org/changeset/base/193751 Log: merge r173793: silence aliasing warning. Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gdtoa/_ldtoa.c Modified: stable/7/lib/libc/gdtoa/_ldtoa.c ============================================================================== --- stable/7/lib/libc/gdtoa/_ldtoa.c Mon Jun 8 20:07:16 2009 (r193750) +++ stable/7/lib/libc/gdtoa/_ldtoa.c Mon Jun 8 20:08:20 2009 (r193751) @@ -61,6 +61,7 @@ __ldtoa(long double *ld, int mode, int n char *ret; union IEEEl2bits u; uint32_t bits[(LDBL_MANT_DIG + 31) / 32]; + void *vbits = bits; u.e = *ld; *sign = u.bits.sign; @@ -91,7 +92,7 @@ __ldtoa(long double *ld, int mode, int n abort(); } - ret = gdtoa(&fpi, be, (ULong *)bits, &kind, mode, ndigits, decpt, rve); + ret = gdtoa(&fpi, be, vbits, &kind, mode, ndigits, decpt, rve); if (*decpt == -32768) *decpt = INT_MAX; return ret; From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 21:01:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD1131065680; Mon, 8 Jun 2009 21:01:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9762C8FC19; Mon, 8 Jun 2009 21:01:14 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58L1ErI043337; Mon, 8 Jun 2009 21:01:14 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58L1EHi043331; Mon, 8 Jun 2009 21:01:14 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200906082101.n58L1EHi043331@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 8 Jun 2009 21:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193754 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/cxgb/common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 21:01:16 -0000 Author: gnn Date: Mon Jun 8 21:01:14 2009 New Revision: 193754 URL: http://svn.freebsd.org/changeset/base/193754 Log: MFC of 190206 190330 192537 192 540 192584 192593 192933 Bring the 7.x version of the cxgb driver up to date with respect to HEAD as of 8 June 2009 192933 Rework interrupt bringup and teardown. Calculate the exact number of vectors we'll use before calling pci_alloc_msix. Don't grab nine all the time. Call cxgb_setup_interrupts once per T3, not once per port. Ditto for cxgb_teardown_interrupts. Don't leak resources when interrupt setup fails in the middle. 192593 Partial reversion of previous commit. The CXGB_SHUTDOWN flag does NOT need to be inverted when doing an ifconfig down of an interface. 192584 Fix a possible panic cxgb_controller_attach() routine that would occur only if prepping the adapter failed. Slight adjustment to comments. Fix a bug whereby downing the interface didn't preven it from processing packets. 192540 Integrate three changes from Chelsio. 1) Add a sysctl that will say what type of PHYs exist on the card. 2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever in the card. 3) Unify the PHY link detection code. 192537 Modified the attach and detach routines to handle bringing ports up and down more cleanly. This addresses a problem where if we have the link flap during boot the driver would lock up the system. 190330 Minor updates to the Chelsio driver, including removing an LOR. 190206 Fix a bug in the recent update to the Chelsio driver. The tick routine was not being restarted in the init_locked routine which could resulted in loss of carrier when updating the MTU. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/common/cxgb_common.h stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c stable/7/sys/dev/cxgb/cxgb_adapter.h stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/cxgb/cxgb_sge.c Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Mon Jun 8 21:01:14 2009 (r193754) @@ -1160,6 +1160,7 @@ static int get_module_type(struct cphy * v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); if (v < 0) return v; + v &= 0xf0; if (v == 0x10) return phy_modtype_lrm; if (v == 0x40) @@ -1249,7 +1250,9 @@ static int ael2005_reset(struct cphy *ph return err; phy->modtype = (u8)err; - if (err == phy_modtype_twinax || err == phy_modtype_twinax_long) + if (err == phy_modtype_none || err == phy_modtype_unknown) + err = 0; + else if (err == phy_modtype_twinax || err == phy_modtype_twinax_long) err = ael2005_setup_twinax_edc(phy, err); else err = ael2005_setup_sr_edc(phy); Modified: stable/7/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_common.h Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_common.h Mon Jun 8 21:01:14 2009 (r193754) @@ -709,7 +709,6 @@ int t3_slow_intr_handler(adapter_t *adap int t3_phy_intr_handler(adapter_t *adapter); void t3_link_changed(adapter_t *adapter, int port_id); -void t3_link_fault(adapter_t *adapter, int port_id); int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc); const struct adapter_info *t3_get_adapter_info(unsigned int board_id); int t3_seeprom_read(adapter_t *adapter, u32 addr, u32 *data); Modified: stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Jun 8 21:01:14 2009 (r193754) @@ -1288,6 +1288,49 @@ static void t3_open_rx_traffic(struct cm t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW, rx_hash_low); } +static int t3_detect_link_fault(adapter_t *adapter, int port_id) +{ + struct port_info *pi = adap2pinfo(adapter, port_id); + struct cmac *mac = &pi->mac; + uint32_t rx_cfg, rx_hash_high, rx_hash_low; + int link_fault; + + /* stop rx */ + t3_gate_rx_traffic(mac, &rx_cfg, &rx_hash_high, &rx_hash_low); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); + + /* clear status and make sure intr is enabled */ + (void) t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset); + t3_xgm_intr_enable(adapter, port_id); + + /* restart rx */ + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, F_RXEN); + t3_open_rx_traffic(mac, rx_cfg, rx_hash_high, rx_hash_low); + + link_fault = t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset); + return (link_fault & F_LINKFAULTCHANGE ? 1 : 0); +} + +static void t3_clear_faults(adapter_t *adapter, int port_id) +{ + struct port_info *pi = adap2pinfo(adapter, port_id); + struct cmac *mac = &pi->mac; + + t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, + F_ENDROPPKT, 0); + t3_mac_enable(mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); + t3_set_reg_field(adapter, A_XGM_STAT_CTRL + mac->offset, F_CLRSTATS, 1); + + if (adapter->params.nports <= 2) { + t3_xgm_intr_disable(adapter, pi->port_id); + t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset); + t3_write_reg(adapter, A_XGM_INT_CAUSE + mac->offset, F_XGM_INT); + t3_set_reg_field(adapter, A_XGM_INT_ENABLE + mac->offset, + F_XGM_INT, F_XGM_INT); + t3_xgm_intr_enable(adapter, pi->port_id); + } +} + /** * t3_link_changed - handle interface link changes * @adapter: the adapter @@ -1299,34 +1342,47 @@ static void t3_open_rx_traffic(struct cm */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc; + int link_ok, speed, duplex, fc, link_fault, link_change; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; struct link_config *lc = &pi->link_config; - int force_link_down = 0; + + link_ok = lc->link_ok; + speed = lc->speed; + duplex = lc->duplex; + fc = lc->fc; + link_fault = 0; phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); - if (!lc->link_ok && link_ok && adapter->params.nports <= 2) { - u32 rx_cfg, rx_hash_high, rx_hash_low; - u32 status; + /* + * Check for link faults if any of these is true: + * a) A link fault is suspected, and PHY says link ok + * b) PHY link transitioned from down -> up + */ + if (adapter->params.nports <= 2 && + ((pi->link_fault && link_ok) || (!lc->link_ok && link_ok))) { + + link_fault = t3_detect_link_fault(adapter, port_id); + if (link_fault) { + if (pi->link_fault != LF_YES) { + mac->stats.link_faults++; + pi->link_fault = LF_YES; + } - t3_xgm_intr_enable(adapter, port_id); - t3_gate_rx_traffic(mac, &rx_cfg, &rx_hash_high, &rx_hash_low); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); - t3_mac_enable(mac, MAC_DIRECTION_RX); + /* Don't report link up or any other change */ + link_ok = 0; + speed = lc->speed; + duplex = lc->duplex; + fc = lc->fc; + } else { + /* clear faults here if this was a false alarm. */ + if (pi->link_fault == LF_MAYBE && + link_ok && lc->link_ok) + t3_clear_faults(adapter, port_id); - status = t3_read_reg(adapter, A_XGM_INT_STATUS + mac->offset); - if (status & F_LINKFAULTCHANGE) { - mac->stats.link_faults++; - force_link_down = 1; - } - t3_open_rx_traffic(mac, rx_cfg, rx_hash_high, rx_hash_low); - - if (force_link_down) { - t3_os_link_fault_handler(adapter, port_id); - return; + pi->link_fault = LF_NO; } } @@ -1339,75 +1395,65 @@ void t3_link_changed(adapter_t *adapter, duplex == lc->duplex && fc == lc->fc) return; /* nothing changed */ - if (link_ok != lc->link_ok && adapter->params.rev > 0 && - uses_xaui(adapter)) { - if (link_ok) - t3b_pcs_reset(mac); - t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, - link_ok ? F_TXACTENABLE | F_RXEN : 0); - } + link_change = link_ok != lc->link_ok; lc->link_ok = (unsigned char)link_ok; lc->speed = speed < 0 ? SPEED_INVALID : speed; lc->duplex = duplex < 0 ? DUPLEX_INVALID : duplex; - if (link_ok && speed >= 0 && lc->autoneg == AUTONEG_ENABLE) { - /* Set MAC speed, duplex, and flow control to match PHY. */ - t3_mac_set_speed_duplex_fc(mac, speed, duplex, fc); - lc->fc = (unsigned char)fc; - } + if (link_ok) { - t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc); -} - -void t3_link_fault(adapter_t *adapter, int port_id) -{ - struct port_info *pi = adap2pinfo(adapter, port_id); - struct cmac *mac = &pi->mac; - struct cphy *phy = &pi->phy; - struct link_config *lc = &pi->link_config; - int link_ok, speed, duplex, fc, link_fault; - u32 rx_cfg, rx_hash_high, rx_hash_low; + /* down -> up, or up -> up with changed settings */ - if (!pi->link_fault) - return; /* nothing to do */ + if (link_change && adapter->params.rev > 0 && + uses_xaui(adapter)) { + t3b_pcs_reset(mac); + t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, + F_TXACTENABLE | F_RXEN); + } - t3_gate_rx_traffic(mac, &rx_cfg, &rx_hash_high, &rx_hash_low); + if (speed >= 0 && lc->autoneg == AUTONEG_ENABLE) { + /* Set MAC settings to match PHY. */ + t3_mac_set_speed_duplex_fc(mac, speed, duplex, fc); + lc->fc = (unsigned char)fc; + } - if (adapter->params.rev > 0 && uses_xaui(adapter)) - t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, 0); + t3_clear_faults(adapter, port_id); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); - t3_mac_enable(mac, MAC_DIRECTION_RX); + } else { - t3_open_rx_traffic(mac, rx_cfg, rx_hash_high, rx_hash_low); + /* up -> down */ - link_fault = t3_read_reg(adapter, - A_XGM_INT_STATUS + mac->offset); - link_fault &= F_LINKFAULTCHANGE; + if (adapter->params.rev > 0 && uses_xaui(adapter)) { + t3_write_reg(adapter, + A_XGM_XAUI_ACT_CTRL + mac->offset, 0); + } - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + t3_xgm_intr_disable(adapter, pi->port_id); + if (adapter->params.nports <= 2) { + t3_set_reg_field(adapter, + A_XGM_INT_ENABLE + mac->offset, + F_XGM_INT, 0); + } - if (link_fault) { - lc->link_ok = 0; - lc->speed = SPEED_INVALID; - lc->duplex = DUPLEX_INVALID; - - t3_os_link_fault(adapter, port_id, 0); - - /* Account link faults only when the phy reports a link up */ - if (link_ok) - mac->stats.link_faults++; - } else { - if (link_ok) - t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, - F_TXACTENABLE | F_RXEN); + if (!link_fault) { + if (is_10G(adapter)) + pi->phy.ops->power_down(&pi->phy, 1); + t3_mac_disable(mac, MAC_DIRECTION_RX); + t3_link_start(phy, mac, lc); + } - pi->link_fault = 0; - lc->link_ok = (unsigned char)link_ok; - lc->speed = speed < 0 ? SPEED_INVALID : speed; - lc->duplex = duplex < 0 ? DUPLEX_INVALID : duplex; - t3_os_link_fault(adapter, port_id, link_ok); + /* + * Make sure Tx FIFO continues to drain, even as rxen is left + * high to help detect and indicate remote faults. + */ + t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, 0, + F_ENDROPPKT); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); + t3_write_reg(adapter, A_XGM_TX_CTRL + mac->offset, F_TXEN); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, F_RXEN); } + + t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc); } /** @@ -1906,10 +1952,12 @@ static void mc7_intr_handler(struct mc7 static int mac_intr_handler(adapter_t *adap, unsigned int idx) { u32 cause; + struct port_info *pi; struct cmac *mac; idx = idx == 0 ? 0 : adapter_info(adap)->nports0; /* MAC idx -> port */ - mac = &adap2pinfo(adap, idx)->mac; + pi = adap2pinfo(adap, idx); + mac = &pi->mac; /* * We mask out interrupt causes for which we're not taking interrupts. @@ -1942,9 +1990,9 @@ static int mac_intr_handler(adapter_t *a t3_set_reg_field(adap, A_XGM_INT_ENABLE + mac->offset, F_XGM_INT, 0); - mac->stats.link_faults++; - t3_os_link_fault_handler(adap, idx); + /* link fault suspected */ + pi->link_fault = LF_MAYBE; } t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); Modified: stable/7/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_adapter.h Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/cxgb_adapter.h Mon Jun 8 21:01:14 2009 (r193754) @@ -107,6 +107,12 @@ extern int cxgb_debug; #define SX_DESTROY sx_destroy #endif +enum { + LF_NO = 0, + LF_MAYBE, + LF_YES +}; + struct port_info { struct adapter *adapter; struct ifnet *ifp; @@ -130,7 +136,6 @@ struct port_info { uint8_t hw_addr[ETHER_ADDR_LEN]; struct task timer_reclaim_task; - struct task link_fault_task; struct cdev *port_cdev; #define PORT_LOCK_NAME_LEN 32 @@ -394,6 +399,7 @@ struct adapter { device_t portdev[MAX_NPORTS]; struct t3cdev tdev; char fw_version[64]; + char port_types[MAX_NPORTS + 1]; uint32_t open_device_map; uint32_t registered_device_map; #ifdef USE_SX @@ -436,6 +442,7 @@ struct t3_rx_mode { #define ADAPTER_LOCK_INIT(adap, name) SX_INIT(&(adap)->lock, name) #define ADAPTER_LOCK_DEINIT(adap) SX_DESTROY(&(adap)->lock) #define ADAPTER_LOCK_ASSERT_NOTOWNED(adap) sx_assert(&(adap)->lock, SA_UNLOCKED) +#define ADAPTER_LOCK_ASSERT_OWNED(adap) sx_assert(&(adap)->lock, SA_LOCKED) #else #define PORT_LOCK(port) mtx_lock(&(port)->lock); #define PORT_UNLOCK(port) mtx_unlock(&(port)->lock); @@ -447,7 +454,8 @@ struct t3_rx_mode { #define ADAPTER_UNLOCK(adap) mtx_unlock(&(adap)->lock); #define ADAPTER_LOCK_INIT(adap, name) mtx_init(&(adap)->lock, name, 0, MTX_DEF) #define ADAPTER_LOCK_DEINIT(adap) mtx_destroy(&(adap)->lock) -#define ADAPTER_LOCK_ASSERT_NOTOWNED(adap) mtx_assert(&(adap)->lock, MO_NOTOWNED) +#define ADAPTER_LOCK_ASSERT_NOTOWNED(adap) mtx_assert(&(adap)->lock, MA_NOTOWNED) +#define ADAPTER_LOCK_ASSERT_OWNED(adap) mtx_assert(&(adap)->lock, MA_OWNED) #endif @@ -531,8 +539,6 @@ int t3_os_pci_restore_state(struct adapt void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status, int speed, int duplex, int fc); void t3_os_phymod_changed(struct adapter *adap, int port_id); -void t3_os_link_fault(adapter_t *adapter, int port_id, int state); -void t3_os_link_fault_handler(adapter_t *adapter, int port_id); void t3_sge_err_intr_handler(adapter_t *adapter); int t3_offload_tx(struct t3cdev *, struct mbuf *); void t3_os_ext_intr_handler(adapter_t *adapter); Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/cxgb_main.c Mon Jun 8 21:01:14 2009 (r193754) @@ -76,22 +76,14 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef CONFIG_DEFINED #include -#else -#include -#endif #ifdef PRIV_SUPPORTED #include #endif -#ifdef IFNET_MULTIQUEUE -#include -#endif - -static int cxgb_setup_msix(adapter_t *, int); -static void cxgb_teardown_msix(adapter_t *); +static int cxgb_setup_interrupts(adapter_t *); +static void cxgb_teardown_interrupts(adapter_t *); static void cxgb_init(void *); static void cxgb_init_locked(struct port_info *); static void cxgb_stop_locked(struct port_info *); @@ -123,7 +115,7 @@ static int offload_open(struct port_info static void touch_bars(device_t dev); static int offload_close(struct t3cdev *tdev); static void cxgb_link_start(struct port_info *p); -static void cxgb_link_fault(void *arg, int ncount); +int t3_detect_link_fault(adapter_t *adapter, int port_id); static device_method_t cxgb_controller_methods[] = { DEVMETHOD(device_probe, cxgb_controller_probe), @@ -183,8 +175,6 @@ static struct cdevsw cxgb_cdevsw = { static devclass_t cxgb_port_devclass; DRIVER_MODULE(cxgb, cxgbc, cxgb_port_driver, cxgb_port_devclass, 0, 0); -#define SGE_MSIX_COUNT (SGE_QSETS + 1) - /* * The driver uses the best interrupt scheme available on a platform in the * order MSI-X, MSI, legacy pin interrupts. This parameter determines which @@ -212,17 +202,17 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, ofld_dis /* * The driver uses an auto-queue algorithm by default. - * To disable it and force a single queue-set per port, use singleq = 1. + * To disable it and force a single queue-set per port, use multiq = 0 */ -static int singleq = 0; -TUNABLE_INT("hw.cxgb.singleq", &singleq); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, singleq, CTLFLAG_RDTUN, &singleq, 0, - "use a single queue-set per port"); - +static int multiq = 1; +TUNABLE_INT("hw.cxgb.multiq", &multiq); +SYSCTL_UINT(_hw_cxgb, OID_AUTO, multiq, CTLFLAG_RDTUN, &multiq, 0, + "use min(ncpus/ports, 8) queue-sets per port"); /* - * The driver uses an auto-queue algorithm by default. - * To disable it and force a single queue-set per port, use singleq = 1. + * By default the driver will not update the firmware unless + * it was compiled against a newer version + * */ static int force_fw_update = 0; TUNABLE_INT("hw.cxgb.force_fw_update", &force_fw_update); @@ -234,15 +224,6 @@ TUNABLE_INT("hw.cxgb.use_16k_clusters", SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN, &cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue "); -/* - * Tune the size of the output queue. - */ -int cxgb_snd_queue_len = IFQ_MAXLEN; -TUNABLE_INT("hw.cxgb.snd_queue_len", &cxgb_snd_queue_len); -SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN, - &cxgb_snd_queue_len, 0, "send queue size "); - - enum { MAX_TXQ_ENTRIES = 16384, MAX_CTRL_TXQ_ENTRIES = 1024, @@ -307,31 +288,6 @@ struct cxgb_ident { static int set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset); -void -cxgb_log_tcb(struct adapter *sc, unsigned int tid) -{ - char buf[TCB_SIZE]; - uint64_t *tcb = (uint64_t *)buf; - int i, error; - struct mc7 *mem = &sc->cm; - - error = t3_mc7_bd_read(mem, tid*TCB_SIZE/8, TCB_SIZE/8, tcb); - if (error) - printf("cxgb_tcb_log failed\n"); - - CTR1(KTR_CXGB, "TCB tid=%u", tid); - for (i = 0; i < TCB_SIZE / 32; i++) { - CTR5(KTR_CXGB, "%1d: %08x %08x %08x %08x", - i, (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), - (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); - tcb += 2; - CTR4(KTR_CXGB, " %08x %08x %08x %08x", - (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32), - (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32)); - tcb += 2; - } -} - static __inline char t3rev2char(struct adapter *adapter) { @@ -371,7 +327,7 @@ cxgb_get_adapter_info(device_t dev) { struct cxgb_ident *id; const struct adapter_info *ai; - + id = cxgb_get_ident(dev); if (id == NULL) return (NULL); @@ -400,15 +356,15 @@ cxgb_controller_probe(device_t dev) ports = "ports"; snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s", - ai->desc, is_offload(sc) ? "R" : "", - sc->params.rev, nports, ports); + ai->desc, is_offload(sc) ? "R" : "", + sc->params.rev, nports, ports); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } #define FW_FNAME "cxgb_t3fw" -#define TPEEPROM_NAME "t3%c_tp_eeprom" -#define TPSRAM_NAME "t3%c_protocol_sram" +#define TPEEPROM_NAME "cxgb_t3%c_tp_eeprom" +#define TPSRAM_NAME "cxgb_t3%c_protocol_sram" static int upgrade_fw(adapter_t *sc) @@ -434,6 +390,32 @@ upgrade_fw(adapter_t *sc) return (status); } +/* + * The cxgb_controller_attach function is responsible for the initial + * bringup of the device. Its responsibilities include: + * + * 1. Determine if the device supports MSI or MSI-X. + * 2. Allocate bus resources so that we can access the Base Address Register + * 3. Create and initialize mutexes for the controller and its control + * logic such as SGE and MDIO. + * 4. Call hardware specific setup routine for the adapter as a whole. + * 5. Allocate the BAR for doing MSI-X. + * 6. Setup the line interrupt iff MSI-X is not supported. + * 7. Create the driver's taskq. + * 8. Start one task queue service thread. + * 9. Check if the firmware and SRAM are up-to-date. They will be + * auto-updated later (before FULL_INIT_DONE), if required. + * 10. Create a child device for each MAC (port) + * 11. Initialize T3 private state. + * 12. Trigger the LED + * 13. Setup offload iff supported. + * 14. Reset/restart the tick callout. + * 15. Attach sysctls + * + * NOTE: Any modification or deviation from this list MUST be reflected in + * the above comment. Failure to do so will result in problems on various + * error conditions including link flapping. + */ static int cxgb_controller_attach(device_t dev) { @@ -533,46 +515,52 @@ cxgb_controller_attach(device_t dev) (sc->msix_regs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->msix_regs_rid, RF_ACTIVE)) != NULL) { - msi_needed = sc->msi_count = SGE_MSIX_COUNT; - - if (((error = pci_alloc_msix(dev, &sc->msi_count)) != 0) || - (sc->msi_count != msi_needed)) { - device_printf(dev, "msix allocation failed - msi_count = %d" - " msi_needed=%d will try msi err=%d\n", sc->msi_count, - msi_needed, error); + if (multiq) + port_qsets = min(SGE_QSETS/sc->params.nports, mp_ncpus); + msi_needed = sc->msi_count = sc->params.nports * port_qsets + 1; + + if (pci_msix_count(dev) == 0 || + (error = pci_alloc_msix(dev, &sc->msi_count)) != 0 || + sc->msi_count != msi_needed) { + device_printf(dev, "alloc msix failed - " + "msi_count=%d, msi_needed=%d, err=%d; " + "will try MSI\n", sc->msi_count, + msi_needed, error); sc->msi_count = 0; + port_qsets = 1; pci_release_msi(dev); bus_release_resource(dev, SYS_RES_MEMORY, sc->msix_regs_rid, sc->msix_regs_res); sc->msix_regs_res = NULL; } else { sc->flags |= USING_MSIX; - sc->cxgb_intr = t3_intr_msix; + sc->cxgb_intr = cxgb_async_intr; + device_printf(dev, + "using MSI-X interrupts (%u vectors)\n", + sc->msi_count); } } if ((msi_allowed >= 1) && (sc->msi_count == 0)) { sc->msi_count = 1; - if (pci_alloc_msi(dev, &sc->msi_count)) { - device_printf(dev, "alloc msi failed - will try INTx\n"); + if ((error = pci_alloc_msi(dev, &sc->msi_count)) != 0) { + device_printf(dev, "alloc msi failed - " + "err=%d; will try INTx\n", error); sc->msi_count = 0; + port_qsets = 1; pci_release_msi(dev); } else { sc->flags |= USING_MSI; - sc->irq_rid = 1; sc->cxgb_intr = t3_intr_msi; + device_printf(dev, "using MSI interrupts\n"); } } #endif if (sc->msi_count == 0) { device_printf(dev, "using line interrupts\n"); - sc->irq_rid = 0; sc->cxgb_intr = t3b_intr; } - if ((sc->flags & USING_MSIX) && !singleq) - port_qsets = min((SGE_QSETS/(sc)->params.nports), mp_ncpus); - /* Create a private taskqueue thread for handling driver events */ #ifdef TASKQUEUE_CURRENT sc->tq = taskqueue_create("cxgb_taskq", M_NOWAIT, @@ -667,6 +655,10 @@ cxgb_controller_attach(device_t dev) sc->params.vpd.ec, sc->params.vpd.sn); device_set_desc_copy(dev, buf); + snprintf(&sc->port_types[0], sizeof(sc->port_types), "%x%x%x%x", + sc->params.vpd.port_type[0], sc->params.vpd.port_type[1], + sc->params.vpd.port_type[2], sc->params.vpd.port_type[3]); + device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); t3_add_attach_sysctls(sc); @@ -677,6 +669,11 @@ out: return (error); } +/* + * The cxgb_controller_detach routine is called with the device is + * unloaded from the system. + */ + static int cxgb_controller_detach(device_t dev) { @@ -689,6 +686,24 @@ cxgb_controller_detach(device_t dev) return (0); } +/* + * The cxgb_free() is called by the cxgb_controller_detach() routine + * to tear down the structures that were built up in + * cxgb_controller_attach(), and should be the final piece of work + * done when fully unloading the driver. + * + * + * 1. Shutting down the threads started by the cxgb_controller_attach() + * routine. + * 2. Stopping the lower level device and all callouts (cxgb_down_locked()). + * 3. Detaching all of the port devices created during the + * cxgb_controller_attach() routine. + * 4. Removing the device children created via cxgb_controller_attach(). + * 5. Releasing PCI resources associated with the device. + * 6. Turning off the offload support, iff it was turned on. + * 7. Destroying the mutexes created in cxgb_controller_attach(). + * + */ static void cxgb_free(struct adapter *sc) { @@ -697,14 +712,30 @@ cxgb_free(struct adapter *sc) ADAPTER_LOCK(sc); sc->flags |= CXGB_SHUTDOWN; ADAPTER_UNLOCK(sc); + cxgb_pcpu_shutdown_threads(sc); - ADAPTER_LOCK(sc); -/* - * drops the lock - */ + ADAPTER_LOCK(sc); cxgb_down_locked(sc); + ADAPTER_UNLOCK(sc); + + t3_sge_deinit_sw(sc); + /* + * Wait for last callout + */ + DELAY(hz*100); + + bus_generic_detach(sc->dev); + + for (i = 0; i < (sc)->params.nports; i++) { + if (sc->portdev[i] && + device_delete_child(sc->dev, sc->portdev[i]) != 0) + device_printf(sc->dev, "failed to delete child port\n"); + } + + cxgb_teardown_interrupts(sc); + #ifdef MSI_SUPPORTED if (sc->flags & (USING_MSI | USING_MSIX)) { device_printf(sc->dev, "releasing msi message(s)\n"); @@ -712,25 +743,13 @@ cxgb_free(struct adapter *sc) } else { device_printf(sc->dev, "no msi message to release\n"); } -#endif + if (sc->msix_regs_res != NULL) { bus_release_resource(sc->dev, SYS_RES_MEMORY, sc->msix_regs_rid, sc->msix_regs_res); } +#endif - t3_sge_deinit_sw(sc); - /* - * Wait for last callout - */ - - DELAY(hz*100); - - for (i = 0; i < (sc)->params.nports; ++i) { - if (sc->portdev[i] != NULL) - device_delete_child(sc->dev, sc->portdev[i]); - } - - bus_generic_detach(sc->dev); if (sc->tq != NULL) { taskqueue_free(sc->tq); sc->tq = NULL; @@ -809,88 +828,116 @@ setup_sge_qsets(adapter_t *sc) } static void -cxgb_teardown_msix(adapter_t *sc) +cxgb_teardown_interrupts(adapter_t *sc) { - int i, nqsets; - - for (nqsets = i = 0; i < (sc)->params.nports; i++) - nqsets += sc->port[i].nqsets; + int i; - for (i = 0; i < nqsets; i++) { - if (sc->msix_intr_tag[i] != NULL) { - bus_teardown_intr(sc->dev, sc->msix_irq_res[i], - sc->msix_intr_tag[i]); - sc->msix_intr_tag[i] = NULL; - } - if (sc->msix_irq_res[i] != NULL) { - bus_release_resource(sc->dev, SYS_RES_IRQ, - sc->msix_irq_rid[i], sc->msix_irq_res[i]); - sc->msix_irq_res[i] = NULL; + for (i = 0; i < SGE_QSETS; i++) { + if (sc->msix_intr_tag[i] == NULL) { + + /* Should have been setup fully or not at all */ + KASSERT(sc->msix_irq_res[i] == NULL && + sc->msix_irq_rid[i] == 0, + ("%s: half-done interrupt (%d).", __func__, i)); + + continue; } + + bus_teardown_intr(sc->dev, sc->msix_irq_res[i], + sc->msix_intr_tag[i]); + bus_release_resource(sc->dev, SYS_RES_IRQ, sc->msix_irq_rid[i], + sc->msix_irq_res[i]); + + sc->msix_irq_res[i] = sc->msix_intr_tag[i] = NULL; + sc->msix_irq_rid[i] = 0; } -} -static int -cxgb_setup_msix(adapter_t *sc, int msix_count) -{ - int i, j, k, nqsets, rid; + if (sc->intr_tag) { + KASSERT(sc->irq_res != NULL, + ("%s: half-done interrupt.", __func__)); - /* The first message indicates link changes and error conditions */ - sc->irq_rid = 1; - if ((sc->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, - &sc->irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) { - device_printf(sc->dev, "Cannot allocate msix interrupt\n"); - return (EINVAL); + bus_teardown_intr(sc->dev, sc->irq_res, sc->intr_tag); + bus_release_resource(sc->dev, SYS_RES_IRQ, sc->irq_rid, + sc->irq_res); + + sc->irq_res = sc->intr_tag = NULL; + sc->irq_rid = 0; } +} - if (bus_setup_intr(sc->dev, sc->irq_res, INTR_MPSAFE|INTR_TYPE_NET, +static int +cxgb_setup_interrupts(adapter_t *sc) +{ + struct resource *res; + void *tag; + int i, rid, err, intr_flag = sc->flags & (USING_MSI | USING_MSIX); + + sc->irq_rid = intr_flag ? 1 : 0; + sc->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &sc->irq_rid, + RF_SHAREABLE | RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(sc->dev, "Cannot allocate interrupt (%x, %u)\n", + intr_flag, sc->irq_rid); + err = EINVAL; + sc->irq_rid = 0; + } else { + err = bus_setup_intr(sc->dev, sc->irq_res, + INTR_MPSAFE | INTR_TYPE_NET, #ifdef INTR_FILTERS - NULL, + NULL, #endif - cxgb_async_intr, sc, &sc->intr_tag)) { - device_printf(sc->dev, "Cannot set up interrupt\n"); - return (EINVAL); + sc->cxgb_intr, sc, &sc->intr_tag); + + if (err) { + device_printf(sc->dev, + "Cannot set up interrupt (%x, %u, %d)\n", + intr_flag, sc->irq_rid, err); + bus_release_resource(sc->dev, SYS_RES_IRQ, sc->irq_rid, + sc->irq_res); + sc->irq_res = sc->intr_tag = NULL; + sc->irq_rid = 0; + } } - for (i = k = 0; i < (sc)->params.nports; i++) { - nqsets = sc->port[i].nqsets; - for (j = 0; j < nqsets; j++, k++) { - struct sge_qset *qs = &sc->sge.qs[k]; - - rid = k + 2; - if (cxgb_debug) - printf("rid=%d ", rid); - if ((sc->msix_irq_res[k] = bus_alloc_resource_any( - sc->dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE)) == NULL) { - device_printf(sc->dev, "Cannot allocate " - "interrupt for message %d\n", rid); - return (EINVAL); - } - sc->msix_irq_rid[k] = rid; - if (bus_setup_intr(sc->dev, sc->msix_irq_res[k], - INTR_MPSAFE|INTR_TYPE_NET, + + /* That's all for INTx or MSI */ + if (!(intr_flag & USING_MSIX) || err) + return (err); + + for (i = 0; i < sc->msi_count - 1; i++) { + rid = i + 2; + res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + if (res == NULL) { + device_printf(sc->dev, "Cannot allocate interrupt " + "for message %d\n", rid); + err = EINVAL; + break; + } + + err = bus_setup_intr(sc->dev, res, INTR_MPSAFE | INTR_TYPE_NET, #ifdef INTR_FILTERS - NULL, + NULL, #endif - t3_intr_msix, qs, &sc->msix_intr_tag[k])) { - device_printf(sc->dev, "Cannot set up " - "interrupt for message %d\n", rid); - return (EINVAL); - } -#ifdef IFNET_MULTIQUEUE - if (singleq == 0) { - int vector = rman_get_start(sc->msix_irq_res[k]); - if (bootverbose) - device_printf(sc->dev, "binding vector=%d to cpu=%d\n", vector, k % mp_ncpus); - intr_bind(vector, k % mp_ncpus); - } -#endif + t3_intr_msix, &sc->sge.qs[i], &tag); + if (err) { + device_printf(sc->dev, "Cannot set up interrupt " + "for message %d (%d)\n", rid, err); + bus_release_resource(sc->dev, SYS_RES_IRQ, rid, res); + break; } + + sc->msix_irq_rid[i] = rid; + sc->msix_irq_res[i] = res; + sc->msix_intr_tag[i] = tag; } - return (0); + if (err) + cxgb_teardown_interrupts(sc); + + return (err); } + static int cxgb_port_probe(device_t dev) { @@ -921,6 +968,12 @@ cxgb_makedev(struct port_info *pi) return (0); } +#ifndef LRO_SUPPORTED +#ifdef IFCAP_LRO +#undef IFCAP_LRO +#endif +#define IFCAP_LRO 0x0 +#endif #ifdef TSO_SUPPORTED #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO) @@ -968,16 +1021,11 @@ cxgb_port_attach(device_t dev) ifp->if_ioctl = cxgb_ioctl; ifp->if_start = cxgb_start; -#if 0 -#ifdef IFNET_MULTIQUEUE - ifp->if_flags |= IFF_MULTIQ; - ifp->if_mq_start = cxgb_pcpu_start; -#endif -#endif + ifp->if_timer = 0; /* Disable ifnet watchdog */ ifp->if_watchdog = NULL; - ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len; + ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); @@ -995,6 +1043,10 @@ cxgb_port_attach(device_t dev) } ether_ifattach(ifp, p->hw_addr); + +#ifdef IFNET_MULTIQUEUE + ifp->if_transmit = cxgb_pcpu_transmit; +#endif /* * Only default to jumbo frames on 10GigE */ @@ -1055,40 +1107,60 @@ cxgb_port_attach(device_t dev) bcopy(IF_LLADDR(p->ifp), p->hw_addr, ETHER_ADDR_LEN); t3_sge_init_port(p); - TASK_INIT(&p->link_fault_task, 0, cxgb_link_fault, p); - #if defined(LINK_ATTACH) cxgb_link_start(p); t3_link_changed(sc, p->port_id); #endif - return (0); + + return (err); } +/* + * cxgb_port_detach() is called via the device_detach methods when + * cxgb_free() calls the bus_generic_detach. It is responsible for + * removing the device from the view of the kernel, i.e. from all + * interfaces lists etc. This routine is only called when the driver is + * being unloaded, not when the link goes down. + * + */ static int cxgb_port_detach(device_t dev) { struct port_info *p; + struct adapter *sc; p = device_get_softc(dev); + sc = p->adapter; + + if (p->port_cdev != NULL) + destroy_dev(p->port_cdev); + + ether_ifdetach(p->ifp); PORT_LOCK(p); if (p->ifp->if_drv_flags & IFF_DRV_RUNNING) cxgb_stop_locked(p); PORT_UNLOCK(p); - ether_ifdetach(p->ifp); - printf("waiting for callout to stop ..."); - DELAY(1000000); - printf("done\n"); + callout_drain(&sc->cxgb_tick_ch); + callout_drain(&sc->sge_timer_ch); + + if (sc->tq != NULL) { + printf("draining slow intr\n"); + + taskqueue_drain(sc->tq, &sc->slow_intr_task); + printf("draining ext intr\n"); + taskqueue_drain(sc->tq, &sc->ext_intr_task); + printf("draining tick task\n"); + taskqueue_drain(sc->tq, &sc->tick_task); + } + /* * the lock may be acquired in ifdetach */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 22:05:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213A4106566C; Mon, 8 Jun 2009 22:05:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4908FC1E; Mon, 8 Jun 2009 22:05:48 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58M5lgb045759; Mon, 8 Jun 2009 22:05:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58M5lTc045758; Mon, 8 Jun 2009 22:05:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200906082205.n58M5lTc045758@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 8 Jun 2009 22:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193776 - in stable/7/usr.sbin/pkg_install: . info X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 22:05:49 -0000 Author: jilles Date: Mon Jun 8 22:05:47 2009 New Revision: 193776 URL: http://svn.freebsd.org/changeset/base/193776 Log: MFC r193273: Fix segfault when giving invalid long option to pkg_info. PR: bin/133473 Submitted by: Rafal Grodzinski Approved by: ed (mentor) Modified: stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/info/main.c Modified: stable/7/usr.sbin/pkg_install/info/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/info/main.c Mon Jun 8 22:03:37 2009 (r193775) +++ stable/7/usr.sbin/pkg_install/info/main.c Mon Jun 8 22:05:47 2009 (r193776) @@ -58,6 +58,7 @@ static struct option longopts[] = { { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'P' }, { "which", required_argument, NULL, 'W' }, + { NULL, 0, NULL, 0 } }; int From owner-svn-src-stable@FreeBSD.ORG Mon Jun 8 23:47:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 844F8106566C; Mon, 8 Jun 2009 23:47:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7122D8FC1B; Mon, 8 Jun 2009 23:47:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n58NllaT048177; Mon, 8 Jun 2009 23:47:47 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n58NllZl048176; Mon, 8 Jun 2009 23:47:47 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200906082347.n58NllZl048176@svn.freebsd.org> From: Sam Leffler Date: Mon, 8 Jun 2009 23:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193782 - stable/7/usr.sbin/wpa/hostapd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 23:47:48 -0000 Author: sam Date: Mon Jun 8 23:47:47 2009 New Revision: 193782 URL: http://svn.freebsd.org/changeset/base/193782 Log: MFC r193524: do not force the mtu to 2290 Modified: stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Modified: stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c ============================================================================== --- stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Mon Jun 8 23:36:52 2009 (r193781) +++ stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Mon Jun 8 23:47:47 2009 (r193782) @@ -244,18 +244,6 @@ bsd_set_iface_flags(void *priv, int dev_ perror("ioctl[SIOCSIFFLAGS]"); return -1; } - - if (dev_up) { - memset(&ifr, 0, sizeof(ifr)); - snprintf(ifr.ifr_name, IFNAMSIZ, "%s", drv->iface); - ifr.ifr_mtu = HOSTAPD_MTU; - if (ioctl(drv->ioctl_sock, SIOCSIFMTU, &ifr) != 0) { - perror("ioctl[SIOCSIFMTU]"); - printf("Setting MTU failed - trying to survive with " - "current value\n"); - } - } - return 0; } From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 00:27:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E81D11065670; Tue, 9 Jun 2009 00:27:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49B78FC0A; Tue, 9 Jun 2009 00:27:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n590RNv5049630; Tue, 9 Jun 2009 00:27:23 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n590RNAg049628; Tue, 9 Jun 2009 00:27:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906090027.n590RNAg049628@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 00:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193788 - in stable/7/lib/libc: . include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 00:27:24 -0000 Author: des Date: Tue Jun 9 00:27:23 2009 New Revision: 193788 URL: http://svn.freebsd.org/changeset/base/193788 Log: merge r176058: more missing namespace wrappers for libthr Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/include/namespace.h stable/7/lib/libc/include/un-namespace.h Modified: stable/7/lib/libc/include/namespace.h ============================================================================== --- stable/7/lib/libc/include/namespace.h Tue Jun 9 00:15:46 2009 (r193787) +++ stable/7/lib/libc/include/namespace.h Tue Jun 9 00:27:23 2009 (r193788) @@ -147,6 +147,7 @@ #define pthread_mutex_destroy _pthread_mutex_destroy #define pthread_mutex_getprioceiling _pthread_mutex_getprioceiling #define pthread_mutex_init _pthread_mutex_init +#define pthread_mutex_isowned_np _pthread_mutex_isowned_np #define pthread_mutex_lock _pthread_mutex_lock #define pthread_mutex_setprioceiling _pthread_mutex_setprioceiling #define pthread_mutex_timedlock _pthread_mutex_timedlock Modified: stable/7/lib/libc/include/un-namespace.h ============================================================================== --- stable/7/lib/libc/include/un-namespace.h Tue Jun 9 00:15:46 2009 (r193787) +++ stable/7/lib/libc/include/un-namespace.h Tue Jun 9 00:27:23 2009 (r193788) @@ -128,6 +128,7 @@ #undef pthread_mutex_destroy #undef pthread_mutex_getprioceiling #undef pthread_mutex_init +#undef pthread_mutex_isowned_np #undef pthread_mutex_lock #undef pthread_mutex_setprioceiling #undef pthread_mutex_timedlock From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 00:47:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB511065670; Tue, 9 Jun 2009 00:47:54 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5AAC8FC22; Tue, 9 Jun 2009 00:47:54 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n590lssw050192; Tue, 9 Jun 2009 00:47:54 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n590lsYY050180; Tue, 9 Jun 2009 00:47:54 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906090047.n590lsYY050180@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 00:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/powe... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 00:47:56 -0000 Author: des Date: Tue Jun 9 00:47:54 2009 New Revision: 193789 URL: http://svn.freebsd.org/changeset/base/193789 Log: merge r180982,r181044,r181059,r181065,r181341,r183021: WARNS cleanup, add thr_pread_{int,long,ptr} and thr_pwrite_{int,long,ptr}, and change definition of psaddr_t (no impact on ABI). Discussed with marcel@, but any screwups are my own. Modified: stable/7/lib/libthr/ (props changed) stable/7/lib/libthread_db/ (props changed) stable/7/lib/libthread_db/Makefile stable/7/lib/libthread_db/arch/amd64/libpthread_md.c stable/7/lib/libthread_db/arch/arm/libpthread_md.c stable/7/lib/libthread_db/arch/i386/libpthread_md.c stable/7/lib/libthread_db/arch/ia64/libpthread_md.c stable/7/lib/libthread_db/arch/powerpc/libpthread_md.c stable/7/lib/libthread_db/arch/sparc64/libpthread_md.c stable/7/lib/libthread_db/libpthread_db.c stable/7/lib/libthread_db/libpthread_db.h stable/7/lib/libthread_db/libthr_db.c stable/7/lib/libthread_db/thread_db.c stable/7/lib/libthread_db/thread_db.h stable/7/lib/libthread_db/thread_db_int.h stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/procfs.h Modified: stable/7/lib/libthread_db/Makefile ============================================================================== --- stable/7/lib/libthread_db/Makefile Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/Makefile Tue Jun 9 00:47:54 2009 (r193789) @@ -8,7 +8,7 @@ SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c SRCS+= libthr_db.c INCS= thread_db.h -WARNS?= 1 +WARNS?= 6 CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map Modified: stable/7/lib/libthread_db/arch/amd64/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/amd64/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/amd64/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -30,8 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include "libpthread_db.h" + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { Modified: stable/7/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/arm/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/arm/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" @@ -86,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, } void -pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc) { mcontext_t *mc = &uc->uc_mcontext; @@ -95,9 +94,8 @@ pt_fpreg_to_ucontext(const struct fpreg } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r) { - const mcontext_t *mc = &uc->uc_mcontext; /* XXX */ memset(r, 0, sizeof(*r)); @@ -109,8 +107,9 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ + return (0); } Modified: stable/7/lib/libthread_db/arch/i386/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/i386/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/i386/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -27,11 +27,10 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include -#include #include +#include +#include #include "libpthread_db.h" Modified: stable/7/lib/libthread_db/arch/ia64/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/ia64/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/ia64/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -28,25 +28,28 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include "libpthread_db.h" + void -pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) +pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r) +pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused) { } void -pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused) { } @@ -56,7 +59,7 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { return (0); } Modified: stable/7/lib/libthread_db/arch/powerpc/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/powerpc/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/powerpc/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" @@ -76,8 +75,9 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ + return (0); } Modified: stable/7/lib/libthread_db/arch/sparc64/libpthread_md.c ============================================================================== --- stable/7/lib/libthread_db/arch/sparc64/libpthread_md.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/arch/sparc64/libpthread_md.c Tue Jun 9 00:47:54 2009 (r193789) @@ -28,25 +28,28 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include "libpthread_db.h" + void -pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) +pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r) +pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused) { } void -pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused) { } @@ -56,7 +59,7 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { return (0); } Modified: stable/7/lib/libthread_db/libpthread_db.c ============================================================================== --- stable/7/lib/libthread_db/libpthread_db.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/libpthread_db.c Tue Jun 9 00:47:54 2009 (r193789) @@ -70,7 +70,7 @@ ps2td(int c) } static long -pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, int type) +pt_map_thread(const td_thragent_t *const_ta, psaddr_t pt, enum pt_type type) { td_thragent_t *ta = __DECONST(td_thragent_t *, const_ta); struct pt_map *new; @@ -220,7 +220,6 @@ static td_err_e pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th) { prgregset_t gregs; - TAILQ_HEAD(, pthread) thread_list; psaddr_t pt, tcb_addr; lwpid_t lwp; int ret; @@ -229,28 +228,24 @@ pt_ta_map_id2thr(const td_thragent_t *ta if (id < 0 || id >= ta->map_len || ta->map[id].type == PT_NONE) return (TD_NOTHR); - ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list, - sizeof(thread_list)); + + ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt); if (ret != 0) - return (P2T(ret)); - pt = (psaddr_t)thread_list.tqh_first; + return (TD_ERR); if (ta->map[id].type == PT_LWP) { /* * if we are referencing a lwp, make sure it was not already * mapped to user thread. */ while (pt != 0) { - ret = ps_pread(ta->ph, - pt + ta->thread_off_tcb, - &tcb_addr, sizeof(tcb_addr)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_tcb, + &tcb_addr); if (ret != 0) - return (P2T(ret)); - ret = ps_pread(ta->ph, - tcb_addr + ta->thread_off_tmbx + - offsetof(struct kse_thr_mailbox, tm_lwp), - &lwp, sizeof(lwp)); + return (TD_ERR); + ret = thr_pread_int(ta, tcb_addr + ta->thread_off_tmbx + + offsetof(struct kse_thr_mailbox, tm_lwp), &lwp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); /* * If the lwp was already mapped to userland thread, * we shouldn't reference it directly in future. @@ -260,11 +255,9 @@ pt_ta_map_id2thr(const td_thragent_t *ta return (TD_NOTHR); } /* get next thread */ - ret = ps_pread(ta->ph, - pt + ta->thread_off_next, - &pt, sizeof(pt)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); } /* check lwp */ ret = ps_lgetregs(ta->ph, ta->map[id].lwp, gregs); @@ -275,17 +268,14 @@ pt_ta_map_id2thr(const td_thragent_t *ta } } else { while (pt != 0 && ta->map[id].thr != pt) { - ret = ps_pread(ta->ph, - pt + ta->thread_off_tcb, - &tcb_addr, sizeof(tcb_addr)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_tcb, + &tcb_addr); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); /* get next thread */ - ret = ps_pread(ta->ph, - pt + ta->thread_off_next, - &pt, sizeof(pt)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); } if (pt == 0) { @@ -303,29 +293,24 @@ pt_ta_map_id2thr(const td_thragent_t *ta static td_err_e pt_ta_map_lwp2thr(const td_thragent_t *ta, lwpid_t lwp, td_thrhandle_t *th) { - TAILQ_HEAD(, pthread) thread_list; - psaddr_t pt, ptr; - lwpid_t tmp_lwp; + psaddr_t pt, tcb_addr; + lwpid_t lwp1; int ret; - + TDBG_FUNC(); - ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list, - sizeof(thread_list)); + ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt); if (ret != 0) - return (P2T(ret)); - pt = (psaddr_t)thread_list.tqh_first; + return (TD_ERR); while (pt != 0) { - ret = ps_pread(ta->ph, pt + ta->thread_off_tcb, - &ptr, sizeof(ptr)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_tcb, &tcb_addr); if (ret != 0) - return (P2T(ret)); - ptr += ta->thread_off_tmbx + - offsetof(struct kse_thr_mailbox, tm_lwp); - ret = ps_pread(ta->ph, ptr, &tmp_lwp, sizeof(lwpid_t)); + return (TD_ERR); + ret = thr_pread_int(ta, tcb_addr + ta->thread_off_tmbx + + offsetof(struct kse_thr_mailbox, tm_lwp), &lwp1); if (ret != 0) - return (P2T(ret)); - if (tmp_lwp == lwp) { + return (TD_ERR); + if (lwp1 == lwp) { th->th_ta = ta; th->th_tid = pt_map_thread(ta, pt, PT_USER); if (th->th_tid == -1) @@ -336,28 +321,23 @@ pt_ta_map_lwp2thr(const td_thragent_t *t } /* get next thread */ - ret = ps_pread(ta->ph, - pt + ta->thread_off_next, - &pt, sizeof(pt)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); } return (TD_NOTHR); } static td_err_e -pt_ta_thr_iter(const td_thragent_t *ta, - td_thr_iter_f *callback, void *cbdata_p, - td_thr_state_e state, int ti_pri, - sigset_t *ti_sigmask_p, - unsigned int ti_user_flags) +pt_ta_thr_iter(const td_thragent_t *ta, td_thr_iter_f *callback, + void *cbdata_p, td_thr_state_e state __unused, int ti_pri __unused, + sigset_t *ti_sigmask_p __unused, unsigned int ti_user_flags __unused) { - TAILQ_HEAD(, pthread) thread_list; td_thrhandle_t th; psaddr_t pt; ps_err_e pserr; - int activated; + int activated, ret; TDBG_FUNC(); @@ -368,11 +348,9 @@ pt_ta_thr_iter(const td_thragent_t *ta, if (!activated) return (TD_OK); - pserr = ps_pread(ta->ph, ta->thread_list_addr, &thread_list, - sizeof(thread_list)); - if (pserr != 0) - return (P2T(pserr)); - pt = (psaddr_t)thread_list.tqh_first; + ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt); + if (ret != 0) + return (TD_ERR); while (pt != 0) { th.th_ta = ta; th.th_tid = pt_map_thread(ta, pt, PT_USER); @@ -383,11 +361,9 @@ pt_ta_thr_iter(const td_thragent_t *ta, if ((*callback)(&th, cbdata_p)) return (TD_DBERR); /* get next thread */ - pserr = ps_pread(ta->ph, - pt + ta->thread_off_next, &pt, - sizeof(pt)); - if (pserr != PS_OK) - return (P2T(pserr)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); + if (ret != 0) + return (TD_ERR); } return (TD_OK); } @@ -395,7 +371,7 @@ pt_ta_thr_iter(const td_thragent_t *ta, static td_err_e pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg) { - char *keytable; + void *keytable; void *destructor; int i, ret, allocated; @@ -411,10 +387,10 @@ pt_ta_tsd_iter(const td_thragent_t *ta, return (P2T(ret)); } for (i = 0; i < ta->thread_max_keys; i++) { - allocated = *(int *)(keytable + i * ta->thread_size_key + - ta->thread_off_key_allocated); - destructor = *(void **)(keytable + i * ta->thread_size_key + - ta->thread_off_key_destructor); + allocated = *(int *)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_allocated); + destructor = *(void **)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_destructor); if (allocated) { ret = (ki)(i, destructor, arg); if (ret != 0) { @@ -428,28 +404,32 @@ pt_ta_tsd_iter(const td_thragent_t *ta, } static td_err_e -pt_ta_event_addr(const td_thragent_t *ta, td_event_e event, td_notify_t *ptr) +pt_ta_event_addr(const td_thragent_t *ta __unused, td_event_e event __unused, + td_notify_t *ptr __unused) { TDBG_FUNC(); return (TD_ERR); } static td_err_e -pt_ta_set_event(const td_thragent_t *ta, td_thr_events_t *events) +pt_ta_set_event(const td_thragent_t *ta __unused, + td_thr_events_t *events __unused) { TDBG_FUNC(); return (0); } static td_err_e -pt_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *events) +pt_ta_clear_event(const td_thragent_t *ta __unused, + td_thr_events_t *events __unused) { TDBG_FUNC(); return (0); } static td_err_e -pt_ta_event_getmsg(const td_thragent_t *ta, td_event_msg_t *msg) +pt_ta_event_getmsg(const td_thragent_t *ta __unused, + td_event_msg_t *msg __unused) { TDBG_FUNC(); return (TD_NOMSG); @@ -458,7 +438,7 @@ pt_ta_event_getmsg(const td_thragent_t * static td_err_e pt_dbsuspend(const td_thrhandle_t *th, int suspend) { - td_thragent_t *ta = (td_thragent_t *)th->th_ta; + const td_thragent_t *ta = th->th_ta; psaddr_t tcb_addr, tmbx_addr, ptr; lwpid_t lwp; uint32_t dflags; @@ -952,28 +932,31 @@ pt_thr_setgregs(const td_thrhandle_t *th } static td_err_e -pt_thr_event_enable(const td_thrhandle_t *th, int en) +pt_thr_event_enable(const td_thrhandle_t *th __unused, int en __unused) { TDBG_FUNC(); return (0); } static td_err_e -pt_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *setp) +pt_thr_set_event(const td_thrhandle_t *th __unused, + td_thr_events_t *setp __unused) { TDBG_FUNC(); return (0); } static td_err_e -pt_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *setp) +pt_thr_clear_event(const td_thrhandle_t *th __unused, + td_thr_events_t *setp __unused) { TDBG_FUNC(); return (0); } static td_err_e -pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg) +pt_thr_event_getmsg(const td_thrhandle_t *th __unused, + td_event_msg_t *msg __unused) { TDBG_FUNC(); return (TD_NOMSG); @@ -1074,17 +1057,16 @@ pt_validate(const td_thrhandle_t *th) return (TD_OK); } -td_err_e -pt_thr_tls_get_addr(const td_thrhandle_t *th, void *_linkmap, size_t offset, - void **address) +static td_err_e +pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset, + psaddr_t *address) { - char *obj_entry; const td_thragent_t *ta = th->th_ta; - psaddr_t tcb_addr, *dtv_addr; + psaddr_t dtv_addr, obj_entry, tcb_addr; int tls_index, ret; /* linkmap is a member of Obj_Entry */ - obj_entry = (char *)_linkmap - ta->thread_off_linkmap; + obj_entry = _linkmap - ta->thread_off_linkmap; /* get tlsindex of the object file */ ret = ps_pread(ta->ph, @@ -1106,8 +1088,8 @@ pt_thr_tls_get_addr(const td_thrhandle_t if (ret != 0) return (P2T(ret)); /* now get the object's tls block base address */ - ret = ps_pread(ta->ph, &dtv_addr[tls_index+1], address, - sizeof(*address)); + ret = ps_pread(ta->ph, dtv_addr + sizeof(void *) * (tls_index + 1), + address, sizeof(*address)); if (ret != 0) return (P2T(ret)); Modified: stable/7/lib/libthread_db/libpthread_db.h ============================================================================== --- stable/7/lib/libthread_db/libpthread_db.h Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/libpthread_db.h Tue Jun 9 00:47:54 2009 (r193789) @@ -34,13 +34,14 @@ #include "thread_db_int.h" -struct pt_map { - enum { - PT_NONE, - PT_USER, - PT_LWP - } type; +enum pt_type { + PT_NONE, + PT_USER, + PT_LWP +}; +struct pt_map { + enum pt_type type; union { lwpid_t lwp; psaddr_t thr; Modified: stable/7/lib/libthread_db/libthr_db.c ============================================================================== --- stable/7/lib/libthread_db/libthr_db.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/libthr_db.c Tue Jun 9 00:47:54 2009 (r193789) @@ -201,36 +201,30 @@ pt_ta_delete(td_thragent_t *ta) static td_err_e pt_ta_map_id2thr(const td_thragent_t *ta, thread_t id, td_thrhandle_t *th) { - TAILQ_HEAD(, pthread) thread_list; psaddr_t pt; - long lwp; + int32_t lwp; int ret; TDBG_FUNC(); if (id == 0) return (TD_NOTHR); - ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list, - sizeof(thread_list)); + ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); /* Iterate through thread list to find pthread */ - pt = (psaddr_t)thread_list.tqh_first; - while (pt != NULL) { - ret = ps_pread(ta->ph, pt + ta->thread_off_tid, - &lwp, sizeof(lwp)); + while (pt != 0) { + ret = thr_pread_int(ta, pt + ta->thread_off_tid, &lwp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); if (lwp == id) break; /* get next thread */ - ret = ps_pread(ta->ph, - pt + ta->thread_off_next, - &pt, sizeof(pt)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); } - if (pt == NULL) + if (pt == 0) return (TD_NOTHR); th->th_ta = ta; th->th_tid = id; @@ -245,30 +239,24 @@ pt_ta_map_lwp2thr(const td_thragent_t *t } static td_err_e -pt_ta_thr_iter(const td_thragent_t *ta, - td_thr_iter_f *callback, void *cbdata_p, - td_thr_state_e state, int ti_pri, - sigset_t *ti_sigmask_p, - unsigned int ti_user_flags) +pt_ta_thr_iter(const td_thragent_t *ta, td_thr_iter_f *callback, + void *cbdata_p, td_thr_state_e state __unused, int ti_pri __unused, + sigset_t *ti_sigmask_p __unused, unsigned int ti_user_flags __unused) { - TAILQ_HEAD(, pthread) thread_list; td_thrhandle_t th; psaddr_t pt; - long lwp; + int32_t lwp; int ret; TDBG_FUNC(); - ret = ps_pread(ta->ph, ta->thread_list_addr, &thread_list, - sizeof(thread_list)); + ret = thr_pread_ptr(ta, ta->thread_list_addr, &pt); if (ret != 0) - return (P2T(ret)); - pt = (psaddr_t)thread_list.tqh_first; + return (TD_ERR); while (pt != 0) { - ret = ps_pread(ta->ph, pt + ta->thread_off_tid, &lwp, - sizeof(lwp)); + ret = thr_pread_int(ta, pt + ta->thread_off_tid, &lwp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); if (lwp != 0 && lwp != TERMINATED) { th.th_ta = ta; th.th_tid = (thread_t)lwp; @@ -277,10 +265,9 @@ pt_ta_thr_iter(const td_thragent_t *ta, return (TD_DBERR); } /* get next thread */ - ret = ps_pread(ta->ph, pt + ta->thread_off_next, &pt, - sizeof(pt)); + ret = thr_pread_ptr(ta, pt + ta->thread_off_next, &pt); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); } return (TD_OK); } @@ -288,7 +275,7 @@ pt_ta_thr_iter(const td_thragent_t *ta, static td_err_e pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg) { - char *keytable; + void *keytable; void *destructor; int i, ret, allocated; @@ -304,10 +291,10 @@ pt_ta_tsd_iter(const td_thragent_t *ta, return (P2T(ret)); } for (i = 0; i < ta->thread_max_keys; i++) { - allocated = *(int *)(keytable + i * ta->thread_size_key + - ta->thread_off_key_allocated); - destructor = *(void **)(keytable + i * ta->thread_size_key + - ta->thread_off_key_destructor); + allocated = *(int *)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_allocated); + destructor = *(void **)(void *)((uintptr_t)keytable + + i * ta->thread_size_key + ta->thread_off_key_destructor); if (allocated) { ret = (ki)(i, destructor, arg); if (ret != 0) { @@ -379,24 +366,23 @@ pt_ta_event_getmsg(const td_thragent_t * { static td_thrhandle_t handle; - psaddr_t pt, pt_temp; + psaddr_t pt; td_thr_events_e tmp; - long lwp; + int32_t lwp; int ret; TDBG_FUNC(); - ret = ps_pread(ta->ph, ta->thread_last_event_addr, &pt, sizeof(pt)); + ret = thr_pread_ptr(ta, ta->thread_last_event_addr, &pt); if (ret != 0) - return (P2T(ret)); - if (pt == NULL) + return (TD_ERR); + if (pt == 0) return (TD_NOMSG); /* * Take the event pointer, at the time, libthr only reports event * once a time, so it is not a link list. */ - pt_temp = NULL; - ps_pwrite(ta->ph, ta->thread_last_event_addr, &pt_temp, sizeof(pt_temp)); + thr_pwrite_ptr(ta, ta->thread_last_event_addr, 0); /* Read event info */ ret = ps_pread(ta->ph, pt + ta->thread_off_event_buf, msg, sizeof(*msg)); @@ -408,21 +394,21 @@ pt_ta_event_getmsg(const td_thragent_t * tmp = 0; ps_pwrite(ta->ph, pt + ta->thread_off_event_buf, &tmp, sizeof(tmp)); /* Convert event */ - pt = (psaddr_t)msg->th_p; - ret = ps_pread(ta->ph, pt + ta->thread_off_tid, &lwp, sizeof(lwp)); + pt = msg->th_p; + ret = thr_pread_int(ta, pt + ta->thread_off_tid, &lwp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); handle.th_ta = ta; handle.th_tid = lwp; handle.th_thread = pt; - msg->th_p = &handle; + msg->th_p = (uintptr_t)&handle; return (0); } static td_err_e pt_dbsuspend(const td_thrhandle_t *th, int suspend) { - td_thragent_t *ta = (td_thragent_t *)th->th_ta; + const td_thragent_t *ta = th->th_ta; int ret; TDBG_FUNC(); @@ -480,14 +466,13 @@ pt_thr_get_info(const td_thrhandle_t *th ret = pt_validate(th); if (ret) return (ret); - ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_state, - &state, sizeof(state)); + ret = thr_pread_int(ta, th->th_thread + ta->thread_off_state, &state); if (ret != 0) - return (P2T(ret)); - ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_report_events, - &info->ti_traceme, sizeof(int)); + return (TD_ERR); + ret = thr_pread_int(ta, th->th_thread + ta->thread_off_report_events, + &info->ti_traceme); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_event_mask, &info->ti_events, sizeof(td_thr_events_t)); if (ret != 0) @@ -662,17 +647,17 @@ static td_err_e pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg) { static td_thrhandle_t handle; - td_thragent_t *ta = (td_thragent_t *)th->th_ta; + const td_thragent_t *ta = th->th_ta; psaddr_t pt, pt_temp; - long lwp; + int32_t lwp; int ret; td_thr_events_e tmp; TDBG_FUNC(); pt = th->th_thread; - ret = ps_pread(ta->ph, ta->thread_last_event_addr, &pt_temp, sizeof(pt_temp)); + ret = thr_pread_ptr(ta, ta->thread_last_event_addr, &pt_temp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); /* Get event */ ret = ps_pread(ta->ph, pt + ta->thread_off_event_buf, msg, sizeof(*msg)); if (ret != 0) @@ -683,27 +668,26 @@ pt_thr_event_getmsg(const td_thrhandle_t * Take the event pointer, at the time, libthr only reports event * once a time, so it is not a link list. */ - if (pt == pt_temp) { - pt_temp = NULL; - ps_pwrite(ta->ph, ta->thread_last_event_addr, &pt_temp, sizeof(pt_temp)); - } + if (pt == pt_temp) + thr_pwrite_ptr(ta, ta->thread_last_event_addr, 0); + /* Clear event */ tmp = 0; ps_pwrite(ta->ph, pt + ta->thread_off_event_buf, &tmp, sizeof(tmp)); /* Convert event */ - pt = (psaddr_t)msg->th_p; - ret = ps_pread(ta->ph, pt + ta->thread_off_tid, &lwp, sizeof(lwp)); + pt = msg->th_p; + ret = thr_pread_int(ta, pt + ta->thread_off_tid, &lwp); if (ret != 0) - return (P2T(ret)); + return (TD_ERR); handle.th_ta = ta; handle.th_tid = lwp; handle.th_thread = pt; - msg->th_p = &handle; + msg->th_p = (uintptr_t)&handle; return (0); } static td_err_e -pt_thr_sstep(const td_thrhandle_t *th, int step) +pt_thr_sstep(const td_thrhandle_t *th, int step __unused) { TDBG_FUNC(); @@ -714,22 +698,21 @@ static int pt_validate(const td_thrhandle_t *th) { - if (th->th_tid == 0 || th->th_thread == NULL) + if (th->th_tid == 0 || th->th_thread == 0) return (TD_ERR); return (TD_OK); } static td_err_e -pt_thr_tls_get_addr(const td_thrhandle_t *th, void *_linkmap, size_t offset, - void **address) +pt_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t _linkmap, size_t offset, + psaddr_t *address) { - char *obj_entry; const td_thragent_t *ta = th->th_ta; - psaddr_t tcb_addr, *dtv_addr; + psaddr_t dtv_addr, obj_entry, tcb_addr; int tls_index, ret; /* linkmap is a member of Obj_Entry */ - obj_entry = (char *)_linkmap - ta->thread_off_linkmap; + obj_entry = _linkmap - ta->thread_off_linkmap; /* get tlsindex of the object file */ ret = ps_pread(ta->ph, @@ -750,8 +733,8 @@ pt_thr_tls_get_addr(const td_thrhandle_t if (ret != 0) return (P2T(ret)); /* now get the object's tls block base address */ - ret = ps_pread(ta->ph, &dtv_addr[tls_index+1], address, - sizeof(*address)); + ret = ps_pread(ta->ph, dtv_addr + sizeof(void *) * (tls_index+1), + address, sizeof(*address)); if (ret != 0) return (P2T(ret)); Modified: stable/7/lib/libthread_db/thread_db.c ============================================================================== --- stable/7/lib/libthread_db/thread_db.c Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/thread_db.c Tue Jun 9 00:47:54 2009 (r193789) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include "thread_db_int.h" @@ -50,7 +52,6 @@ td_init(void) { td_err_e ret, tmp; struct ta_ops *ops_p, **ops_pp; - size_t i; ret = 0; SET_FOREACH(ops_pp, __ta_ops) { @@ -104,7 +105,6 @@ td_ta_map_lwp2thr(const td_thragent_t *t td_err_e td_ta_new(struct ps_prochandle *ph, td_thragent_t **pta) { - size_t i; struct ta_ops *ops_p, **ops_pp; SET_FOREACH(ops_pp, __ta_ops) { @@ -244,8 +244,8 @@ td_thr_validate(const td_thrhandle_t *th } td_err_e -td_thr_tls_get_addr(const td_thrhandle_t *th, void *linkmap, size_t offset, - void **address) +td_thr_tls_get_addr(const td_thrhandle_t *th, psaddr_t linkmap, size_t offset, + psaddr_t *address) { const td_thragent_t *ta = th->th_ta; return (ta->ta_ops->to_thr_tls_get_addr(th, linkmap, offset, address)); @@ -259,3 +259,176 @@ td_thr_sstep(const td_thrhandle_t *th, i const td_thragent_t *ta = th->th_ta; return (ta->ta_ops->to_thr_sstep(th, step)); } + +/* + * Support functions for reading from and writing to the target + * address space. + */ + +static int +thr_pread(struct ps_prochandle *ph, psaddr_t addr, uint64_t *val, + u_int size, u_int byteorder) +{ + uint8_t buf[sizeof(*val)]; + ps_err_e err; + + if (size > sizeof(buf)) + return (EOVERFLOW); + + err = ps_pread(ph, addr, buf, size); + if (err != PS_OK) + return (EFAULT); + + switch (byteorder) { + case BIG_ENDIAN: + switch (size) { + case 1: + *val = buf[0]; + break; + case 2: + *val = be16dec(buf); + break; + case 4: + *val = be32dec(buf); + break; + case 8: + *val = be64dec(buf); + break; + default: + return (EINVAL); + } + break; + case LITTLE_ENDIAN: + switch (size) { + case 1: + *val = buf[0]; + break; + case 2: + *val = le16dec(buf); + break; + case 4: + *val = le32dec(buf); + break; + case 8: + *val = le64dec(buf); + break; + default: + return (EINVAL); + } + break; + default: + return (EINVAL); + } + + return (0); +} + +int +thr_pread_int(const struct td_thragent *ta, psaddr_t addr, uint32_t *val) +{ + uint64_t tmp; + int error; + + error = thr_pread(ta->ph, addr, &tmp, sizeof(int), BYTE_ORDER); + if (!error) + *val = tmp; + + return (error); +} + +int +thr_pread_long(const struct td_thragent *ta, psaddr_t addr, uint64_t *val) +{ + + return (thr_pread(ta->ph, addr, val, sizeof(long), BYTE_ORDER)); +} + +int +thr_pread_ptr(const struct td_thragent *ta, psaddr_t addr, psaddr_t *val) +{ + uint64_t tmp; + int error; + + error = thr_pread(ta->ph, addr, &tmp, sizeof(void *), BYTE_ORDER); + if (!error) + *val = tmp; + + return (error); +} + +static int +thr_pwrite(struct ps_prochandle *ph, psaddr_t addr, uint64_t val, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 01:12:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D437D1065670; Tue, 9 Jun 2009 01:12:39 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-bw0-f217.google.com (mail-bw0-f217.google.com [209.85.218.217]) by mx1.freebsd.org (Postfix) with ESMTP id 4D71E8FC1A; Tue, 9 Jun 2009 01:12:38 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by bwz17 with SMTP id 17so714119bwz.43 for ; Mon, 08 Jun 2009 18:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=v1Cbx99mL6l0a5WZayp3UU7zjBhIefvmwX33iYPuuNk=; b=FfbrqN2e8TylkJ3dXENd54mhCM+UIOa1c/r/oo0NbJeQupO7fAJ7HLJoFq4heWcPl6 XdkcVAshqA5OZNKplaEilIt0HGIGwhZI43D7TbG/6+OYdsFRc7eBN7F6A2VJ+VVJpFVD YM+uvZm86tFH/gEdbih946T3JBx1SqRWti25c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=DGwG1Utt8b0iJtvkuhGiinkmr9i6j5+09jIDBNTaW73sL/mYp3ZGWcgaLFatR2UB5v 2swXKc23AdDHYaHY46ZZLnb6QFzFIjKJj1YeFvIGqlMIfW9eqXCrfUaJoRVdY9RsjKgJ asx39q0m+6xJjgJsTCKJGSqEAiJvgbvrk0a3o= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.109.148 with SMTP id j20mr4879949fap.43.1244509957110; Mon, 08 Jun 2009 18:12:37 -0700 (PDT) In-Reply-To: <200906090047.n590lsYY050180@svn.freebsd.org> References: <200906090047.n590lsYY050180@svn.freebsd.org> Date: Tue, 9 Jun 2009 03:12:37 +0200 X-Google-Sender-Auth: 9bfc9f98320f4fb4 Message-ID: <3bbf2fe10906081812i4138020bhfd774cef77a01f5f@mail.gmail.com> From: Attilio Rao To: Dag-Erling Smorgrav Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/powe... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 01:12:40 -0000 2009/6/9 Dag-Erling Smorgrav : > Author: des > Date: Tue Jun 9 00:47:54 2009 > New Revision: 193789 > URL: http://svn.freebsd.org/changeset/base/193789 > > Log: > merge r180982,r181044,r181059,r181065,r181341,r183021: WARNS cleanup, > add thr_pread_{int,long,ptr} and thr_pwrite_{int,long,ptr}, and change > definition of psaddr_t (no impact on ABI). Discussed with marcel@, but > any screwups are my own. Thanks, I had this into my pipeline but you saved me some time. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 01:43:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84DBE106566C; Tue, 9 Jun 2009 01:43:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 703FB8FC08; Tue, 9 Jun 2009 01:43:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n591hxr2051829; Tue, 9 Jun 2009 01:43:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n591hw1x051817; Tue, 9 Jun 2009 01:43:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906090143.n591hw1x051817@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 01:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193795 - stable/7/lib/libutil X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 01:44:00 -0000 Author: des Date: Tue Jun 9 01:43:58 2009 New Revision: 193795 URL: http://svn.freebsd.org/changeset/base/193795 Log: merge r180815,184081-184088,184091-184094,184634,184676-184677, 185277, 93589,193591: style and warning cleanups, libutil is now WARNS=6 clean. Also merged setclasscpumask(), which would have been a b***h to isolate from the rest of the changes. AFAICT, nobody uses it anyway. Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/Makefile stable/7/lib/libutil/flopen.3 stable/7/lib/libutil/flopen.c stable/7/lib/libutil/login.conf.5 stable/7/lib/libutil/login_cap.h stable/7/lib/libutil/login_class.3 stable/7/lib/libutil/login_class.c stable/7/lib/libutil/login_times.3 stable/7/lib/libutil/login_times.c stable/7/lib/libutil/pidfile.3 stable/7/lib/libutil/pidfile.c stable/7/lib/libutil/realhostname.c Modified: stable/7/lib/libutil/Makefile ============================================================================== --- stable/7/lib/libutil/Makefile Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/Makefile Tue Jun 9 01:43:58 2009 (r193795) @@ -8,7 +8,7 @@ SHLIBDIR?= /lib LIB= util SHLIB_MAJOR= 7 -SRCS= _secure_path.c auth.c gr_util.c expand_number.c flopen.c fparseln.c \ +SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \ login.c login_auth.c login_cap.c login_class.c \ login_crypt.c login_ok.c login_times.c login_tty.c logout.c \ Modified: stable/7/lib/libutil/flopen.3 ============================================================================== --- stable/7/lib/libutil/flopen.3 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/flopen.3 Tue Jun 9 01:43:58 2009 (r193795) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2007 +.Dd June 6, 2009 .Dt FLOPEN 3 .Os .Sh NAME @@ -93,11 +93,6 @@ and .Xr errno 2 , .Xr flock 2 , .Xr open 2 -.Sh HISTORY -The -.Fn flopen -function first appeared in -.Fx 6.3 . .Sh AUTHORS .An -nosplit The Modified: stable/7/lib/libutil/flopen.c ============================================================================== --- stable/7/lib/libutil/flopen.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/flopen.c Tue Jun 9 01:43:58 2009 (r193795) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -54,13 +53,13 @@ flopen(const char *path, int flags, ...) va_list ap; va_start(ap, flags); - mode = va_arg(ap, int); /* mode_t promoted to int */ + mode = (mode_t)va_arg(ap, int); /* mode_t promoted to int */ va_end(ap); } - operation = LOCK_EX; - if (flags & O_NONBLOCK) - operation |= LOCK_NB; + operation = LOCK_EX; + if (flags & O_NONBLOCK) + operation |= LOCK_NB; trunc = (flags & O_TRUNC); flags &= ~O_TRUNC; @@ -72,32 +71,32 @@ flopen(const char *path, int flags, ...) if (flock(fd, operation) == -1) { /* unsupported or interrupted */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } if (stat(path, &sb) == -1) { /* disappeared from under our feet */ - close(fd); + (void)close(fd); continue; } if (fstat(fd, &fsb) == -1) { /* can't happen [tm] */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } if (sb.st_dev != fsb.st_dev || sb.st_ino != fsb.st_ino) { /* changed under our feet */ - close(fd); + (void)close(fd); continue; } if (trunc && ftruncate(fd, 0) != 0) { /* can't happen [tm] */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } Modified: stable/7/lib/libutil/login.conf.5 ============================================================================== --- stable/7/lib/libutil/login.conf.5 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login.conf.5 Tue Jun 9 01:43:58 2009 (r193795) @@ -203,6 +203,15 @@ The maximum and current limits may be sp .It Sy "Name Type Notes Description .It "charset string Set $MM_CHARSET environment variable to the specified value. +.It "cpumask string List of cpus to bind the user to. +The syntax is the same as for the +.Fl l +argument of +.Xr cpuset 1 or the word +.Ql default . +If set to +.Ql default +no action is taken. .It "hushlogin bool false Same as having a ~/.hushlogin file. .It "ignorenologin bool false Login not prevented by nologin. .It "ftp-chroot bool false Limit FTP access with Modified: stable/7/lib/libutil/login_cap.h ============================================================================== --- stable/7/lib/libutil/login_cap.h Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login_cap.h Tue Jun 9 01:43:58 2009 (r193795) @@ -48,7 +48,8 @@ #define LOGIN_SETUSER 0x0040 /* set user (via setuid) */ #define LOGIN_SETENV 0x0080 /* set user environment */ #define LOGIN_SETMAC 0x0100 /* set user default MAC label */ -#define LOGIN_SETALL 0x01ff /* set everything */ +#define LOGIN_SETCPUMASK 0x0200 /* set user cpumask */ +#define LOGIN_SETALL 0x03ff /* set everything */ #define BI_AUTH "authorize" /* accepted authentication */ #define BI_REJECT "reject" /* rejected authentication */ @@ -80,7 +81,7 @@ typedef struct login_time { #define LTM_NONE 0x00 #define LTM_SUN 0x01 #define LTM_MON 0x02 -#define LTM_TUE 0x04 +#define LTM_TUE 0x04 #define LTM_WED 0x08 #define LTM_THU 0x10 #define LTM_FRI 0x20 @@ -103,7 +104,8 @@ login_cap_t *login_getclass(const char * login_cap_t *login_getpwclass(const struct passwd *); login_cap_t *login_getuserclass(const struct passwd *); -const char *login_getcapstr(login_cap_t*, const char *, const char *, const char *); +const char *login_getcapstr(login_cap_t *, const char *, const char *, + const char *); const char **login_getcaplist(login_cap_t *, const char *, const char *); const char *login_getstyle(login_cap_t *, const char *, const char *); rlim_t login_getcaptime(login_cap_t *, const char *, rlim_t, rlim_t); @@ -113,45 +115,51 @@ const char *login_getpath(login_cap_t *, int login_getcapbool(login_cap_t *, const char *, int); const char *login_setcryptfmt(login_cap_t *, const char *, const char *); -int setclasscontext(const char*, unsigned int); -int setusercontext(login_cap_t*, const struct passwd*, uid_t, unsigned int); +int setclasscontext(const char *, unsigned int); +void setclasscpumask(login_cap_t *); +int setusercontext(login_cap_t *, const struct passwd *, uid_t, unsigned int); void setclassresources(login_cap_t *); void setclassenvironment(login_cap_t *, const struct passwd *, int); /* Most of these functions are deprecated */ -int auth_approve(login_cap_t*, const char*, const char*); +int auth_approve(login_cap_t *, const char *, const char *); int auth_check(const char *, const char *, const char *, const char *, int *); void auth_env(void); -char *auth_mkvalue(const char *n); -int auth_response(const char *, const char *, const char *, const char *, int *, const char *, const char *); +char *auth_mkvalue(const char *); +int auth_response(const char *, const char *, const char *, const char *, int *, + const char *, const char *); void auth_rmfiles(void); int auth_scan(int); -int auth_script(const char*, ...); +int auth_script(const char *, ...); int auth_script_data(const char *, int, const char *, ...); char *auth_valud(const char *); int auth_setopt(const char *, const char *); void auth_clropts(void); -void auth_checknologin(login_cap_t*); -int auth_cat(const char*); +void auth_checknologin(login_cap_t *); +int auth_cat(const char *); -int auth_ttyok(login_cap_t*, const char *); -int auth_hostok(login_cap_t*, const char *, char const *); -int auth_timeok(login_cap_t*, time_t); +int auth_ttyok(login_cap_t *, const char *); +int auth_hostok(login_cap_t *, const char *, char const *); +int auth_timeok(login_cap_t *, time_t); struct tm; login_time_t parse_lt(const char *); +int in_lt(const login_time_t *, time_t *); int in_ltm(const login_time_t *, struct tm *, time_t *); int in_ltms(const login_time_t *, struct tm *, time_t *); +int in_lts(const login_time_t *, time_t *); /* helper functions */ int login_strinlist(const char **, char const *, int); int login_str2inlist(const char **, const char *, const char *, int); -login_time_t * login_timelist(login_cap_t *, char const *, int *, login_time_t **); +login_time_t * login_timelist(login_cap_t *, char const *, int *, + login_time_t **); int login_ttyok(login_cap_t *, const char *, const char *, const char *); -int login_hostok(login_cap_t *, const char *, const char *, const char *, const char *); +int login_hostok(login_cap_t *, const char *, const char *, const char *, + const char *); __END_DECLS Modified: stable/7/lib/libutil/login_class.3 ============================================================================== --- stable/7/lib/libutil/login_class.3 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login_class.3 Tue Jun 9 01:43:58 2009 (r193795) @@ -19,11 +19,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 1996 +.Dd October 20, 2008 .Os .Dt LOGIN_CLASS 3 .Sh NAME .Nm setclasscontext , +.Nm setclasscpumask , .Nm setclassenvironment , .Nm setclassresources , .Nm setusercontext @@ -35,12 +36,14 @@ .In login_cap.h .Ft int .Fn setclasscontext "const char *classname" "unsigned int flags" -.Ft int -.Fn setusercontext "login_cap_t *lc" "const struct passwd *pwd" "uid_t uid" "unsigned int flags" .Ft void -.Fn setclassresources "login_cap_t *lc" +.Fn setclasscpumask "login_cap_t *lc" .Ft void .Fn setclassenvironment "login_cap_t *lc" "const struct passwd *pwd" "int paths" +.Ft void +.Fn setclassresources "login_cap_t *lc" +.Ft int +.Fn setusercontext "login_cap_t *lc" "const struct passwd *pwd" "uid_t uid" "unsigned int flags" .Sh DESCRIPTION These functions provide a higher level interface to the login class database than those documented in @@ -155,6 +158,18 @@ capability "setenv=var1 val1,var2 val2.. Set the MAC label for the current process to the label specified in system login class database. .Pp +.It LOGIN_SETCPUMASK +Create a new +.Xr cpuset 2 +and set the cpu affinity to the specified mask. +The string may contain a comma separated list of numbers and/or number +ranges as handled by the +.Xr cpuset 1 +utility or the case-insensitive string +.Ql default . +If the string is +.Ql default +no action will be taken. .It LOGIN_SETALL Enables all of the above settings. .El @@ -170,6 +185,7 @@ are substituted for the user's home dire respectively. .Pp The +.Fn setclasscpumask , .Fn setclassresources and .Fn setclassenvironment @@ -186,6 +202,8 @@ or resources, a message is reported to .Xr syslog 3 , with LOG_ERR priority and directed to the currently active facility. .Sh SEE ALSO +.Xr cpuset 1 , +.Xr cpuset 2 , .Xr setgid 2 , .Xr setlogin 2 , .Xr setuid 2 , Modified: stable/7/lib/libutil/login_class.c ============================================================================== --- stable/7/lib/libutil/login_class.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login_class.c Tue Jun 9 01:43:58 2009 (r193795) @@ -25,12 +25,16 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include +#include +#include #include +#include #include +#include +#include + +#include +#include #include #include #include @@ -89,7 +93,7 @@ setclassresources(login_cap_t *lc) if (getrlimit(lr->why, &rlim) != 0) syslog(LOG_ERR, "getting %s resource limit: %m", lr->what); else { - char name_cur[40]; + char name_cur[40]; char name_max[40]; rlim_t rcur = rlim.rlim_cur; rlim_t rmax = rlim.rlim_max; @@ -101,7 +105,7 @@ setclassresources(login_cap_t *lc) rmax = (*lr->who)(lc, lr->what, rmax, rmax); rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur); rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax); - + if (setrlimit(lr->why, &rlim) == -1) syslog(LOG_WARNING, "set class '%s' resource limit %s: %m", lc->lc_class, lr->what); } @@ -181,7 +185,7 @@ substvar(const char * var, const struct } } - return np; + return (np); } @@ -238,6 +242,108 @@ setclassenvironment(login_cap_t *lc, con } +static int +list2cpuset(const char *list, cpuset_t *mask) +{ + enum { NONE, NUM, DASH } state; + int lastnum; + int curnum; + const char *l; + + state = NONE; + curnum = lastnum = 0; + for (l = list; *l != '\0';) { + if (isdigit(*l)) { + curnum = atoi(l); + if (curnum > CPU_SETSIZE) + errx(EXIT_FAILURE, + "Only %d cpus supported", CPU_SETSIZE); + while (isdigit(*l)) + l++; + switch (state) { + case NONE: + lastnum = curnum; + state = NUM; + break; + case DASH: + for (; lastnum <= curnum; lastnum++) + CPU_SET(lastnum, mask); + state = NONE; + break; + case NUM: + default: + return (0); + } + continue; + } + switch (*l) { + case ',': + switch (state) { + case NONE: + break; + case NUM: + CPU_SET(curnum, mask); + state = NONE; + break; + case DASH: + return (0); + break; + } + break; + case '-': + if (state != NUM) + return (0); + state = DASH; + break; + default: + return (0); + } + l++; + } + switch (state) { + case NONE: + break; + case NUM: + CPU_SET(curnum, mask); + break; + case DASH: + return (0); + } + return (1); +} + + +void +setclasscpumask(login_cap_t *lc) +{ + const char *maskstr; + cpuset_t maskset; + cpusetid_t setid; + + maskstr = login_getcapstr(lc, "cpumask", NULL, NULL); + CPU_ZERO(&maskset); + if (maskstr == NULL) + return; + if (strcasecmp("default", maskstr) == 0) + return; + if (!list2cpuset(maskstr, &maskset)) { + syslog(LOG_WARNING, + "list2cpuset(%s) invalid mask specification", maskstr); + return; + } + + if (cpuset(&setid) != 0) { + syslog(LOG_ERR, "cpuset(): %s", strerror(errno)); + return; + } + + if (cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, + sizeof(maskset), &maskset) != 0) + syslog(LOG_ERR, "cpuset_setaffinity(%s): %s", maskstr, + strerror(errno)); +} + + /* * setclasscontext() * @@ -262,7 +368,7 @@ setclasscontext(const char *classname, u rc = lc ? setusercontext(lc, NULL, 0, flags) : -1; login_close(lc); - return rc; + return (rc); } @@ -288,8 +394,11 @@ setlogincontext(login_cap_t *lc, const s /* Set environment */ if (flags & LOGIN_SETENV) setclassenvironment(lc, pwd, 0); + /* Set cpu affinity */ + if (flags & LOGIN_SETCPUMASK) + setclasscpumask(lc); } - return mymask; + return (mymask); } @@ -359,13 +468,13 @@ setusercontext(login_cap_t *lc, const st if (setgid(pwd->pw_gid) != 0) { syslog(LOG_ERR, "setgid(%lu): %m", (u_long)pwd->pw_gid); login_close(llc); - return -1; + return (-1); } if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) { syslog(LOG_ERR, "initgroups(%s,%lu): %m", pwd->pw_name, (u_long)pwd->pw_gid); login_close(llc); - return -1; + return (-1); } } @@ -379,7 +488,7 @@ setusercontext(login_cap_t *lc, const st if (mac_from_text(&label, label_string) == -1) { syslog(LOG_ERR, "mac_from_text('%s') for %s: %m", pwd->pw_name, label_string); - return -1; + return (-1); } if (mac_set_proc(label) == -1) error = errno; @@ -389,7 +498,7 @@ setusercontext(login_cap_t *lc, const st if (error != 0) { syslog(LOG_ERR, "mac_set_proc('%s') for %s: %s", label_string, pwd->pw_name, strerror(error)); - return -1; + return (-1); } } } @@ -398,7 +507,7 @@ setusercontext(login_cap_t *lc, const st if ((flags & LOGIN_SETLOGIN) && setlogin(pwd->pw_name) != 0) { syslog(LOG_ERR, "setlogin(%s): %m", pwd->pw_name); login_close(llc); - return -1; + return (-1); } mymask = (flags & LOGIN_SETUMASK) ? umask(LOGIN_DEFUMASK) : 0; @@ -408,7 +517,7 @@ setusercontext(login_cap_t *lc, const st /* This needs to be done after anything that needs root privs */ if ((flags & LOGIN_SETUSER) && setuid(uid) != 0) { syslog(LOG_ERR, "setuid(%lu): %m", (u_long)uid); - return -1; /* Paranoia again */ + return (-1); /* Paranoia again */ } /* @@ -423,6 +532,5 @@ setusercontext(login_cap_t *lc, const st if (flags & LOGIN_SETUMASK) umask(mymask); - return 0; + return (0); } - Modified: stable/7/lib/libutil/login_times.3 ============================================================================== --- stable/7/lib/libutil/login_times.3 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login_times.3 Tue Jun 9 01:43:58 2009 (r193795) @@ -19,13 +19,15 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 1997 +.Dd October 20, 2008 .Os .Dt LOGIN_TIMES 3 .Sh NAME .Nm parse_lt , +.Nm in_lt , .Nm in_ltm , -.Nm in_ltms +.Nm in_ltms , +.Nm in_lts .Nd functions for parsing and checking login time periods .Sh LIBRARY .Lb libutil @@ -36,9 +38,13 @@ .Ft login_time_t .Fn parse_lt "const char *str" .Ft int +.Fn in_lt "const login_time_t *lt" "time_t *ends" +.Ft int .Fn in_ltm "const login_time_t *lt" "struct tm *t" "time_t *ends" .Ft int .Fn in_ltms "const login_time_t *lt" "struct tm *t" "time_t *ends" +.Ft int +.Fn in_lts "const login_time_t *lt" "time_t *ends" .Sh DESCRIPTION This set of functions may be used for parsing and checking login and session times against a predefined list of allowed login times as @@ -135,6 +141,18 @@ elements in length, and terminated by an .Ar lt_dow field set to .Em LTM_NONE . +.Pp +The +.Fn in_lt +and +.Fn in_lts +functions are equivalent to +.Fn in_ltm +and +.Fn in_ltms , +respectively, with the second argument set to the current time as +returned by +.Xr localtime 3 . .Sh RETURN VALUES The .Fn parse_lt Modified: stable/7/lib/libutil/login_times.c ============================================================================== --- stable/7/lib/libutil/login_times.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/login_times.c Tue Jun 9 01:43:58 2009 (r193795) @@ -34,13 +34,13 @@ __FBSDID("$FreeBSD$"); static struct { const char *dw; - u_char cn; - u_char fl; + u_char cn; + u_char fl; } dws[] = { { "su", 2, LTM_SUN }, { "mo", 2, LTM_MON }, { "tu", 2, LTM_TUE }, { "we", 2, LTM_WED }, { "th", 2, LTM_THU }, { "fr", 2, LTM_FRI }, - { "sa", 2, LTM_SAT }, { "any",3, LTM_ANY }, { "all",3, LTM_ANY }, + { "sa", 2, LTM_SAT }, { "any",3, LTM_ANY }, { "all",3, LTM_ANY }, { "wk", 2, LTM_WK }, { "wd", 2, LTM_WD }, { NULL, 0, 0 } }; @@ -54,28 +54,28 @@ parse_time(char * ptr, u_short * t) *t = (u_short)((val / 100) * 60 + (val % 100)); - return ptr; + return (ptr); } login_time_t -parse_lt(const char * str) +parse_lt(const char *str) { login_time_t t; memset(&t, 0, sizeof t); t.lt_dow = LTM_NONE; if (str && *str && strcmp(str, "Never") != 0 && strcmp(str, "None") != 0) { - int i; - login_time_t m = t; + int i; + login_time_t m = t; char *p; - char buf[64]; + char buf[64]; /* Make local copy and force lowercase to simplify parsing */ - p = strncpy(buf, str, sizeof buf); - buf[sizeof buf - 1] = '\0'; + strlcpy(buf, str, sizeof buf); for (i = 0; buf[i]; i++) buf[i] = (char)tolower(buf[i]); + p = buf; while (isalpha(*p)) { @@ -102,12 +102,12 @@ parse_lt(const char * str) t = m; } - return t; + return (t); } int -in_ltm(const login_time_t * ltm, struct tm * tt, time_t * ends) +in_ltm(const login_time_t *ltm, struct tm *tt, time_t *ends) { int rc = 0; @@ -130,32 +130,33 @@ in_ltm(const login_time_t * ltm, struct } } } - return rc; + return (rc); } int -in_lt(const login_time_t * ltm, time_t * t) +in_lt(const login_time_t *ltm, time_t *t) { - return in_ltm(ltm, localtime(t), t); + + return (in_ltm(ltm, localtime(t), t)); } int -in_ltms(const login_time_t * ltm, struct tm * tm, time_t * t) +in_ltms(const login_time_t *ltm, struct tm *tm, time_t *t) { int i = 0; while (i < LC_MAXTIMES && ltm[i].lt_dow != LTM_NONE) { if (in_ltm(ltm + i, tm, t)) - return i; + return (i); i++; } - return -1; + return (-1); } int -in_lts(const login_time_t * ltm, time_t * t) +in_lts(const login_time_t *ltm, time_t *t) { - return in_ltms(ltm, localtime(t), t); -} + return (in_ltms(ltm, localtime(t), t)); +} Modified: stable/7/lib/libutil/pidfile.3 ============================================================================== --- stable/7/lib/libutil/pidfile.3 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/pidfile.3 Tue Jun 9 01:43:58 2009 (r193795) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 22, 2005 +.Dd October 20, 2008 .Dt PIDFILE 3 .Os .Sh NAME @@ -51,16 +51,14 @@ The .Nm pidfile family of functions allows daemons to handle PID files. It uses -.Xr flock 2 +.Xr flopen 3 to lock a pidfile and detect already running daemons. .Pp The .Fn pidfile_open function opens (or creates) a file specified by the .Fa path -argument and locks it with the -.Xr flock 2 -system call. +argument and locks it. If a file can not be locked, a PID of an already running daemon is returned in the .Fa pidptr @@ -102,6 +100,7 @@ if an error occurs. If an error occurs, .Va errno will be set. +.Pp .Rv -std pidfile_write pidfile_close pidfile_remove .Sh EXAMPLES The following example shows in which order these functions should be used. @@ -233,16 +232,17 @@ function may also fail and set .Va errno for any errors specified for the .Xr close 2 , -.Xr flock 2 , .Xr fstat 2 , .Xr write 2 , and .Xr unlink 2 -calls. +system calls and the +.Xr flopen 3 +library function. .Sh SEE ALSO -.Xr flock 2 , .Xr open 2 , -.Xr daemon 3 +.Xr daemon 3 , +.Xr flopen 3 .Sh AUTHORS .An -nosplit The Modified: stable/7/lib/libutil/pidfile.c ============================================================================== --- stable/7/lib/libutil/pidfile.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/pidfile.c Tue Jun 9 01:43:58 2009 (r193795) @@ -231,10 +231,6 @@ _pidfile_remove(struct pidfh *pfh, int f if (unlink(pfh->pf_path) == -1) error = errno; - if (flock(pfh->pf_fd, LOCK_UN) == -1) { - if (error == 0) - error = errno; - } if (close(pfh->pf_fd) == -1) { if (error == 0) error = errno; Modified: stable/7/lib/libutil/realhostname.c ============================================================================== --- stable/7/lib/libutil/realhostname.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/realhostname.c Tue Jun 9 01:43:58 2009 (r193795) @@ -101,7 +101,9 @@ realhostname_sa(char *host, size_t hsize { int result, error; char buf[NI_MAXHOST]; +#ifdef INET6 struct sockaddr_in lsin; +#endif result = HOSTNAME_INVALIDADDR; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 01:46:00 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B9A1106564A; Tue, 9 Jun 2009 01:46:00 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E984D8FC0A; Tue, 9 Jun 2009 01:45:59 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E74916D41C; Tue, 9 Jun 2009 03:45:58 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id A5D09844C2; Tue, 9 Jun 2009 03:45:58 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Attilio Rao References: <200906090047.n590lsYY050180@svn.freebsd.org> <3bbf2fe10906081812i4138020bhfd774cef77a01f5f@mail.gmail.com> Date: Tue, 09 Jun 2009 03:45:58 +0200 In-Reply-To: <3bbf2fe10906081812i4138020bhfd774cef77a01f5f@mail.gmail.com> (Attilio Rao's message of "Tue, 9 Jun 2009 03:12:37 +0200") Message-ID: <86vdn66uy1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/powe... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 01:46:00 -0000 Attilio Rao writes: > Thanks, > I had this into my pipeline but you saved me some time. You're welcome. I'm trying to get 7 to build with -Werror again :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 10:40:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71787106566B; Tue, 9 Jun 2009 10:40:42 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 3C8BB8FC19; Tue, 9 Jun 2009 10:40:42 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id B700635FB59; Tue, 9 Jun 2009 06:40:41 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 09 Jun 2009 06:40:41 -0400 X-Sasl-enc: 1tagWgmmCWNWN38QaWyN/kmi8fWqrV+ebMbPLRvC7cX9 1244544041 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id A212B4C076; Tue, 9 Jun 2009 06:40:40 -0400 (EDT) Message-ID: <4A2E3C26.9040903@incunabulum.net> Date: Tue, 09 Jun 2009 11:40:38 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: John Baldwin References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <4A109662.9060909@FreeBSD.org> <4A10A324.5040501@incunabulum.net> <200906081050.41020.jhb@freebsd.org> In-Reply-To: <200906081050.41020.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 10:40:43 -0000 John, John Baldwin wrote: > Were you ever able to test http://www.FreeBSD.org/~jhb/patches/ata_ali.patch? > > Fraid not, thanks for the reminder... I have been sidetracked... Unfortunately that patch doesn't seem to be there now, and I didn't have a copy downloaded. I can try to make time now that MLDv2 is checked in it will be easier, although I would have to test HEAD from a USB key. As far as I know the regression / panic still happens in 7.2 -- I nearly did an 'installkernel' on that box w/o thinking... thanks, BMS From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 12:39:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0637F106566B; Tue, 9 Jun 2009 12:39:18 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E81C98FC14; Tue, 9 Jun 2009 12:39:17 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59CdHok071384; Tue, 9 Jun 2009 12:39:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59CdHwj071383; Tue, 9 Jun 2009 12:39:17 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906091239.n59CdHwj071383@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 12:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193827 - stable/7/lib/libthread_db X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 12:39:18 -0000 Author: des Date: Tue Jun 9 12:39:17 2009 New Revision: 193827 URL: http://svn.freebsd.org/changeset/base/193827 Log: merge r181651, r193826: avoid writing an int to a char *. Modified: stable/7/lib/libthread_db/ (props changed) stable/7/lib/libthread_db/libthr_db.c Modified: stable/7/lib/libthread_db/libthr_db.c ============================================================================== --- stable/7/lib/libthread_db/libthr_db.c Tue Jun 9 12:32:10 2009 (r193826) +++ stable/7/lib/libthread_db/libthr_db.c Tue Jun 9 12:39:17 2009 (r193827) @@ -457,6 +457,7 @@ pt_thr_get_info(const td_thrhandle_t *th { const td_thragent_t *ta = th->th_ta; struct ptrace_lwpinfo linfo; + int traceme; int state; int ret; @@ -470,7 +471,8 @@ pt_thr_get_info(const td_thrhandle_t *th if (ret != 0) return (TD_ERR); ret = thr_pread_int(ta, th->th_thread + ta->thread_off_report_events, - &info->ti_traceme); + &traceme); + info->ti_traceme = traceme; if (ret != 0) return (TD_ERR); ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_event_mask, From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 13:49:43 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14466106566C; Tue, 9 Jun 2009 13:49:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D77078FC14; Tue, 9 Jun 2009 13:49:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8EFA946B49; Tue, 9 Jun 2009 09:49:42 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 877C58A06C; Tue, 9 Jun 2009 09:49:41 -0400 (EDT) From: John Baldwin To: Bruce Simpson Date: Tue, 9 Jun 2009 09:46:45 -0400 User-Agent: KMail/1.9.7 References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <200906081050.41020.jhb@freebsd.org> <4A2E3C26.9040903@incunabulum.net> In-Reply-To: <4A2E3C26.9040903@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906090946.46103.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 09 Jun 2009 09:49:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 13:49:43 -0000 On Tuesday 09 June 2009 6:40:38 am Bruce Simpson wrote: > John, > > John Baldwin wrote: > > Were you ever able to test http://www.FreeBSD.org/~jhb/patches/ata_ali.patch? > > > > > > Fraid not, thanks for the reminder... I have been sidetracked... > > Unfortunately that patch doesn't seem to be there now, and I didn't have > a copy downloaded. > I can try to make time now that MLDv2 is checked in it will be easier, > although I would have to test HEAD from a USB key. Ok, I've uploaded the patch, I must have just sent it inline before. > As far as I know the regression / panic still happens in 7.2 -- I nearly > did an 'installkernel' on that box w/o thinking... Yes. The same patch will apply to 7-stable though it will have to be applied to ata-chipset.c instead. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 14:07:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 439C3106566B; Tue, 9 Jun 2009 14:07:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30AD98FC1B; Tue, 9 Jun 2009 14:07:30 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59E7UAe073382; Tue, 9 Jun 2009 14:07:30 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59E7UHT073381; Tue, 9 Jun 2009 14:07:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906091407.n59E7UHT073381@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 14:07:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193831 - stable/7/bin/sh X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 14:07:31 -0000 Author: des Date: Tue Jun 9 14:07:29 2009 New Revision: 193831 URL: http://svn.freebsd.org/changeset/base/193831 Log: merge r173718: reduce WARNS due to too many "variable might be clobbered by longjmp" false positives. Modified: stable/7/bin/sh/ (props changed) stable/7/bin/sh/Makefile Modified: stable/7/bin/sh/Makefile ============================================================================== --- stable/7/bin/sh/Makefile Tue Jun 9 13:50:16 2009 (r193830) +++ stable/7/bin/sh/Makefile Tue Jun 9 14:07:29 2009 (r193831) @@ -22,7 +22,7 @@ LFLAGS= -8 # 8-bit lex scanner for arith CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: # CFLAGS+= -g -DDEBUG=2 -WARNS?= 3 +WARNS?= 2 WFORMAT=0 .PATH: ${.CURDIR}/bltin \ From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 15:09:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CEEB10656E5; Tue, 9 Jun 2009 15:09:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03C308FC20; Tue, 9 Jun 2009 15:09:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59F9DlL075411; Tue, 9 Jun 2009 15:09:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59F9ASo075357; Tue, 9 Jun 2009 15:09:10 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906091509.n59F9ASo075357@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 9 Jun 2009 15:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193835 - in stable/7/lib/libkse: . arch/amd64/include arch/arm/include arch/i386/include arch/ia64/include arch/powerpc/include arch/sparc64/include sys thread X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 15:09:15 -0000 Author: des Date: Tue Jun 9 15:09:10 2009 New Revision: 193835 URL: http://svn.freebsd.org/changeset/base/193835 Log: merge r174111, r174112, r174335: style and warning fixes. The functional parts of these commits have already been merged. Modified: stable/7/lib/libkse/ (props changed) stable/7/lib/libkse/Makefile stable/7/lib/libkse/arch/amd64/include/atomic_ops.h stable/7/lib/libkse/arch/amd64/include/pthread_md.h stable/7/lib/libkse/arch/arm/include/atomic_ops.h stable/7/lib/libkse/arch/i386/include/atomic_ops.h stable/7/lib/libkse/arch/i386/include/pthread_md.h stable/7/lib/libkse/arch/ia64/include/atomic_ops.h stable/7/lib/libkse/arch/powerpc/include/atomic_ops.h stable/7/lib/libkse/arch/powerpc/include/pthread_md.h stable/7/lib/libkse/arch/sparc64/include/atomic_ops.h stable/7/lib/libkse/arch/sparc64/include/pthread_md.h stable/7/lib/libkse/sys/lock.c stable/7/lib/libkse/sys/thr_error.c stable/7/lib/libkse/thread/thr_accept.c stable/7/lib/libkse/thread/thr_aio_suspend.c stable/7/lib/libkse/thread/thr_atfork.c stable/7/lib/libkse/thread/thr_attr_destroy.c stable/7/lib/libkse/thread/thr_attr_get_np.c stable/7/lib/libkse/thread/thr_attr_getdetachstate.c stable/7/lib/libkse/thread/thr_attr_getguardsize.c stable/7/lib/libkse/thread/thr_attr_getinheritsched.c stable/7/lib/libkse/thread/thr_attr_getschedparam.c stable/7/lib/libkse/thread/thr_attr_getschedpolicy.c stable/7/lib/libkse/thread/thr_attr_getscope.c stable/7/lib/libkse/thread/thr_attr_getstack.c stable/7/lib/libkse/thread/thr_attr_getstackaddr.c stable/7/lib/libkse/thread/thr_attr_getstacksize.c stable/7/lib/libkse/thread/thr_attr_init.c stable/7/lib/libkse/thread/thr_attr_setcreatesuspend_np.c stable/7/lib/libkse/thread/thr_attr_setdetachstate.c stable/7/lib/libkse/thread/thr_attr_setguardsize.c stable/7/lib/libkse/thread/thr_attr_setinheritsched.c stable/7/lib/libkse/thread/thr_attr_setschedparam.c stable/7/lib/libkse/thread/thr_attr_setschedpolicy.c stable/7/lib/libkse/thread/thr_attr_setscope.c stable/7/lib/libkse/thread/thr_attr_setstack.c stable/7/lib/libkse/thread/thr_attr_setstackaddr.c stable/7/lib/libkse/thread/thr_attr_setstacksize.c stable/7/lib/libkse/thread/thr_barrier.c stable/7/lib/libkse/thread/thr_barrierattr.c stable/7/lib/libkse/thread/thr_cancel.c stable/7/lib/libkse/thread/thr_clean.c stable/7/lib/libkse/thread/thr_close.c stable/7/lib/libkse/thread/thr_concurrency.c stable/7/lib/libkse/thread/thr_cond.c stable/7/lib/libkse/thread/thr_condattr_destroy.c stable/7/lib/libkse/thread/thr_condattr_init.c stable/7/lib/libkse/thread/thr_condattr_pshared.c stable/7/lib/libkse/thread/thr_connect.c stable/7/lib/libkse/thread/thr_creat.c stable/7/lib/libkse/thread/thr_create.c stable/7/lib/libkse/thread/thr_detach.c stable/7/lib/libkse/thread/thr_equal.c stable/7/lib/libkse/thread/thr_execve.c stable/7/lib/libkse/thread/thr_exit.c stable/7/lib/libkse/thread/thr_fcntl.c stable/7/lib/libkse/thread/thr_find_thread.c stable/7/lib/libkse/thread/thr_fork.c stable/7/lib/libkse/thread/thr_fsync.c stable/7/lib/libkse/thread/thr_getschedparam.c stable/7/lib/libkse/thread/thr_info.c stable/7/lib/libkse/thread/thr_init.c stable/7/lib/libkse/thread/thr_join.c stable/7/lib/libkse/thread/thr_kern.c stable/7/lib/libkse/thread/thr_kill.c stable/7/lib/libkse/thread/thr_main_np.c stable/7/lib/libkse/thread/thr_mattr_init.c stable/7/lib/libkse/thread/thr_mattr_kind_np.c stable/7/lib/libkse/thread/thr_mattr_pshared.c stable/7/lib/libkse/thread/thr_msync.c stable/7/lib/libkse/thread/thr_multi_np.c stable/7/lib/libkse/thread/thr_mutex.c stable/7/lib/libkse/thread/thr_mutex_prioceiling.c stable/7/lib/libkse/thread/thr_mutex_protocol.c stable/7/lib/libkse/thread/thr_mutexattr_destroy.c stable/7/lib/libkse/thread/thr_nanosleep.c stable/7/lib/libkse/thread/thr_once.c stable/7/lib/libkse/thread/thr_open.c stable/7/lib/libkse/thread/thr_pause.c stable/7/lib/libkse/thread/thr_poll.c stable/7/lib/libkse/thread/thr_priority_queue.c stable/7/lib/libkse/thread/thr_private.h stable/7/lib/libkse/thread/thr_pselect.c stable/7/lib/libkse/thread/thr_pspinlock.c stable/7/lib/libkse/thread/thr_raise.c stable/7/lib/libkse/thread/thr_read.c stable/7/lib/libkse/thread/thr_readv.c stable/7/lib/libkse/thread/thr_resume_np.c stable/7/lib/libkse/thread/thr_rtld.c stable/7/lib/libkse/thread/thr_rwlock.c stable/7/lib/libkse/thread/thr_rwlockattr.c stable/7/lib/libkse/thread/thr_select.c stable/7/lib/libkse/thread/thr_self.c stable/7/lib/libkse/thread/thr_seterrno.c stable/7/lib/libkse/thread/thr_setprio.c stable/7/lib/libkse/thread/thr_setschedparam.c stable/7/lib/libkse/thread/thr_sig.c stable/7/lib/libkse/thread/thr_sigaction.c stable/7/lib/libkse/thread/thr_sigaltstack.c stable/7/lib/libkse/thread/thr_sigmask.c stable/7/lib/libkse/thread/thr_sigpending.c stable/7/lib/libkse/thread/thr_sigprocmask.c stable/7/lib/libkse/thread/thr_sigsuspend.c stable/7/lib/libkse/thread/thr_sigwait.c stable/7/lib/libkse/thread/thr_single_np.c stable/7/lib/libkse/thread/thr_sleep.c stable/7/lib/libkse/thread/thr_spec.c stable/7/lib/libkse/thread/thr_spinlock.c stable/7/lib/libkse/thread/thr_stack.c stable/7/lib/libkse/thread/thr_suspend_np.c stable/7/lib/libkse/thread/thr_switch_np.c stable/7/lib/libkse/thread/thr_symbols.c stable/7/lib/libkse/thread/thr_system.c stable/7/lib/libkse/thread/thr_tcdrain.c stable/7/lib/libkse/thread/thr_vfork.c stable/7/lib/libkse/thread/thr_wait.c stable/7/lib/libkse/thread/thr_wait4.c stable/7/lib/libkse/thread/thr_waitpid.c stable/7/lib/libkse/thread/thr_write.c stable/7/lib/libkse/thread/thr_writev.c stable/7/lib/libkse/thread/thr_yield.c Modified: stable/7/lib/libkse/Makefile ============================================================================== --- stable/7/lib/libkse/Makefile Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/Makefile Tue Jun 9 15:09:10 2009 (r193835) @@ -32,7 +32,7 @@ CFLAGS+=-fno-builtin # Uncomment this if you want libkse to contain debug information for # thread locking. CFLAGS+=-D_LOCK_DEBUG -WARNS?=2 +WARNS?=3 # Uncomment this if you want to build a 1:1 threading mode library # however it is no longer strictly conformed to POSIX Modified: stable/7/lib/libkse/arch/amd64/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/amd64/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/amd64/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -36,7 +36,7 @@ * void atomic_swap64(intptr_t *dst, intptr_t val, intptr_t *res); */ static inline void -atomic_swap64(intptr_t *dst, intptr_t val, intptr_t *res) +atomic_swap64(volatile intptr_t *dst, intptr_t val, intptr_t *res) { __asm __volatile( "xchgq %2, %1; movq %2, %0" @@ -44,7 +44,7 @@ atomic_swap64(intptr_t *dst, intptr_t va } static inline void -atomic_swap_int(int *dst, int val, int *res) +atomic_swap_int(volatile int *dst, int val, int *res) { __asm __volatile( "xchgl %2, %1; movl %2, %0" @@ -52,6 +52,6 @@ atomic_swap_int(int *dst, int val, int * } #define atomic_swap_ptr(d, v, r) \ - atomic_swap64((intptr_t *)(d), (intptr_t)(v), (intptr_t *)(r)) + atomic_swap64((volatile intptr_t *)(d), (intptr_t)(v), (intptr_t *)(r)) #endif Modified: stable/7/lib/libkse/arch/amd64/include/pthread_md.h ============================================================================== --- stable/7/lib/libkse/arch/amd64/include/pthread_md.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/amd64/include/pthread_md.h Tue Jun 9 15:09:10 2009 (r193835) @@ -250,7 +250,7 @@ _thread_switch(struct kcb *kcb, struct t _amd64_restore_context( &tcb->tcb_tmbx.tm_context.uc_mcontext, (intptr_t)&tcb->tcb_tmbx, - (intptr_t *)&kcb->kcb_kmbx.km_curthread); + (intptr_t *)(void *)&kcb->kcb_kmbx.km_curthread); else _amd64_restore_context( &tcb->tcb_tmbx.tm_context.uc_mcontext, Modified: stable/7/lib/libkse/arch/arm/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/arm/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/arm/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -39,15 +39,15 @@ * void atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res); */ static inline void -atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res) +atomic_swap32(volatile intptr_t *dst, intptr_t val, intptr_t *res) { *res = __swp(val, dst); } #define atomic_swap_ptr(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #define atomic_swap_int(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #endif Modified: stable/7/lib/libkse/arch/i386/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/i386/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/i386/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -36,7 +36,7 @@ * void atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res); */ static inline void -atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res) +atomic_swap32(volatile intptr_t *dst, intptr_t val, intptr_t *res) { __asm __volatile( "xchgl %2, %1; movl %2, %0" @@ -44,8 +44,8 @@ atomic_swap32(intptr_t *dst, intptr_t va } #define atomic_swap_ptr(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #define atomic_swap_int(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #endif Modified: stable/7/lib/libkse/arch/i386/include/pthread_md.h ============================================================================== --- stable/7/lib/libkse/arch/i386/include/pthread_md.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/i386/include/pthread_md.h Tue Jun 9 15:09:10 2009 (r193835) @@ -246,7 +246,7 @@ _thread_switch(struct kcb *kcb, struct t if (setmbox != 0) _thr_setcontext(&tcb->tcb_tmbx.tm_context.uc_mcontext, (intptr_t)&tcb->tcb_tmbx, - (intptr_t *)&kcb->kcb_kmbx.km_curthread); + (intptr_t *)(void *)&kcb->kcb_kmbx.km_curthread); else _thr_setcontext(&tcb->tcb_tmbx.tm_context.uc_mcontext, 0, NULL); Modified: stable/7/lib/libkse/arch/ia64/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/ia64/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/ia64/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -30,18 +30,18 @@ #define _ATOMIC_OPS_H_ static inline void -atomic_swap_int(int *dst, int val, int *res) +atomic_swap_int(volatile int *dst, int val, int *res) { __asm("xchg4 %0=[%2],%1" : "=r"(*res) : "r"(val), "r"(dst)); } static inline void -atomic_swap_long(long *dst, long val, long *res) +atomic_swap_long(volatile long *dst, long val, long *res) { __asm("xchg8 %0=[%2],%1" : "=r"(*res) : "r"(val), "r"(dst)); } #define atomic_swap_ptr(d,v,r) \ - atomic_swap_long((long*)d, (long)v, (long*)r) + atomic_swap_long((volatile long *)d, (long)v, (long *)r) #endif /* _ATOMIC_OPS_H_ */ Modified: stable/7/lib/libkse/arch/powerpc/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/powerpc/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/powerpc/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -37,7 +37,7 @@ * void atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res); */ static inline void -atomic_swap32(intptr_t *dst, intptr_t val, intptr_t *res) +atomic_swap32(volatile intptr_t *dst, intptr_t val, intptr_t *res) { int tmp; @@ -55,8 +55,8 @@ atomic_swap32(intptr_t *dst, intptr_t va } #define atomic_swap_ptr(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #define atomic_swap_int(d, v, r) \ - atomic_swap32((intptr_t *)d, (intptr_t)v, (intptr_t *)r) + atomic_swap32((volatile intptr_t *)d, (intptr_t)v, (intptr_t *)r) #endif Modified: stable/7/lib/libkse/arch/powerpc/include/pthread_md.h ============================================================================== --- stable/7/lib/libkse/arch/powerpc/include/pthread_md.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/powerpc/include/pthread_md.h Tue Jun 9 15:09:10 2009 (r193835) @@ -280,7 +280,7 @@ _thread_switch(struct kcb *kcb, struct t tcb->tcb_tmbx.tm_lwp = kcb->kcb_kmbx.km_lwp; if (setmbox) _ppc32_setcontext(mc, (intptr_t)&tcb->tcb_tmbx, - (intptr_t *)&kcb->kcb_kmbx.km_curthread); + (intptr_t *)(void *)&kcb->kcb_kmbx.km_curthread); else _ppc32_setcontext(mc, 0, NULL); } Modified: stable/7/lib/libkse/arch/sparc64/include/atomic_ops.h ============================================================================== --- stable/7/lib/libkse/arch/sparc64/include/atomic_ops.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/sparc64/include/atomic_ops.h Tue Jun 9 15:09:10 2009 (r193835) @@ -38,7 +38,7 @@ * void atomic_swap_long(long *dst, long val, long *res); */ static __inline void -atomic_swap_long(long *dst, long val, long *res) +atomic_swap_long(volatile long *dst, long val, long *res) { long tmp; long r; @@ -54,7 +54,7 @@ atomic_swap_long(long *dst, long val, lo } static __inline void -atomic_swap_int(int *dst, int val, int *res) +atomic_swap_int(volatile int *dst, int val, int *res) { int tmp; int r; @@ -70,6 +70,6 @@ atomic_swap_int(int *dst, int val, int * } #define atomic_swap_ptr(dst, val, res) \ - atomic_swap_long((long *)dst, (long)val, (long *)res) + atomic_swap_long((volatile long *)dst, (long)val, (long *)res) #endif Modified: stable/7/lib/libkse/arch/sparc64/include/pthread_md.h ============================================================================== --- stable/7/lib/libkse/arch/sparc64/include/pthread_md.h Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/arch/sparc64/include/pthread_md.h Tue Jun 9 15:09:10 2009 (r193835) @@ -237,7 +237,7 @@ _thread_switch(struct kcb *kcb, struct t tcb->tcb_tmbx.tm_lwp = kcb->kcb_kmbx.km_lwp; if (setmbox) _thr_setcontext(mc, (intptr_t)&tcb->tcb_tmbx, - (intptr_t *)&kcb->kcb_kmbx.km_curthread); + (intptr_t *)(void *)&kcb->kcb_kmbx.km_curthread); else _thr_setcontext(mc, 0, NULL); } else { Modified: stable/7/lib/libkse/sys/lock.c ============================================================================== --- stable/7/lib/libkse/sys/lock.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/sys/lock.c Tue Jun 9 15:09:10 2009 (r193835) @@ -187,11 +187,12 @@ _lock_acquire(struct lock *lck, struct l * Atomically swap the head of the lock request with * this request. */ - atomic_swap_ptr(&lck->l_head, lu->lu_myreq, &lu->lu_watchreq); + atomic_swap_ptr((void *)&lck->l_head, lu->lu_myreq, + (void *)&lu->lu_watchreq); if (lu->lu_watchreq->lr_locked != 0) { atomic_store_rel_ptr - ((volatile uintptr_t *)&lu->lu_watchreq->lr_watcher, + ((volatile uintptr_t *)(void *)&lu->lu_watchreq->lr_watcher, (uintptr_t)lu); if ((lck->l_wait == NULL) || ((lck->l_type & LCK_ADAPTIVE) == 0)) { @@ -223,7 +224,7 @@ _lock_acquire(struct lock *lck, struct l if (lu->lu_watchreq->lr_active == 0) break; } - atomic_swap_int((int *)&lu->lu_watchreq->lr_locked, + atomic_swap_int(&lu->lu_watchreq->lr_locked, 2, &lval); if (lval == 0) lu->lu_watchreq->lr_locked = 0; @@ -262,18 +263,19 @@ _lock_release(struct lock *lck, struct l /* Update tail if our request is last. */ if (lu->lu_watchreq->lr_owner == NULL) { - atomic_store_rel_ptr((volatile uintptr_t *)&lck->l_tail, + atomic_store_rel_ptr((volatile uintptr_t *) + (void *)&lck->l_tail, (uintptr_t)lu->lu_myreq); - atomic_store_rel_ptr - ((volatile uintptr_t *)&lu->lu_myreq->lr_owner, + atomic_store_rel_ptr((volatile uintptr_t *) + (void *)&lu->lu_myreq->lr_owner, (uintptr_t)NULL); } else { /* Remove ourselves from the list. */ atomic_store_rel_ptr((volatile uintptr_t *) - &lu->lu_myreq->lr_owner, + (void *)&lu->lu_myreq->lr_owner, (uintptr_t)lu->lu_watchreq->lr_owner); atomic_store_rel_ptr((volatile uintptr_t *) - &lu->lu_watchreq->lr_owner->lu_myreq, + (void *)&lu->lu_watchreq->lr_owner->lu_myreq, (uintptr_t)lu->lu_myreq); } /* @@ -302,7 +304,7 @@ _lock_release(struct lock *lck, struct l /* Give the lock to the highest priority user. */ if (lck->l_wakeup != NULL) { atomic_swap_int( - (int *)&lu_h->lu_watchreq->lr_locked, + &lu_h->lu_watchreq->lr_locked, 0, &lval); if (lval == 2) /* Notify the sleeper */ @@ -314,7 +316,7 @@ _lock_release(struct lock *lck, struct l &lu_h->lu_watchreq->lr_locked, 0); } else { if (lck->l_wakeup != NULL) { - atomic_swap_int((int *)&myreq->lr_locked, + atomic_swap_int(&myreq->lr_locked, 0, &lval); if (lval == 2) /* Notify the sleeper */ @@ -335,7 +337,7 @@ _lock_release(struct lock *lck, struct l lu->lu_watchreq = NULL; lu->lu_myreq->lr_locked = 1; if (lck->l_wakeup) { - atomic_swap_int((int *)&myreq->lr_locked, 0, &lval); + atomic_swap_int(&myreq->lr_locked, 0, &lval); if (lval == 2) /* Notify the sleeper */ lck->l_wakeup(lck, myreq->lr_watcher); @@ -348,7 +350,7 @@ _lock_release(struct lock *lck, struct l } void -_lock_grant(struct lock *lck /* unused */, struct lockuser *lu) +_lock_grant(struct lock *lck __unused /* unused */, struct lockuser *lu) { atomic_store_rel_int(&lu->lu_watchreq->lr_locked, 3); } Modified: stable/7/lib/libkse/sys/thr_error.c ============================================================================== --- stable/7/lib/libkse/sys/thr_error.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/sys/thr_error.c Tue Jun 9 15:09:10 2009 (r193835) @@ -33,6 +33,7 @@ * * $FreeBSD$ */ +#include #include #include "libc_private.h" #include "thr_private.h" Modified: stable/7/lib/libkse/thread/thr_accept.c ============================================================================== --- stable/7/lib/libkse/thread/thr_accept.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_accept.c Tue Jun 9 15:09:10 2009 (r193835) @@ -35,6 +35,9 @@ __FBSDID("$FreeBSD$"); LT10_COMPAT_PRIVATE(__accept); LT10_COMPAT_DEFAULT(accept); +int __accept(int s, struct sockaddr *addr, socklen_t *addrlen); + + __weak_reference(__accept, accept); int Modified: stable/7/lib/libkse/thread/thr_aio_suspend.c ============================================================================== --- stable/7/lib/libkse/thread/thr_aio_suspend.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_aio_suspend.c Tue Jun 9 15:09:10 2009 (r193835) @@ -36,6 +36,11 @@ LT10_COMPAT_PRIVATE(_aio_suspend); LT10_COMPAT_DEFAULT(aio_suspend); + +int +_aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct + timespec *timeout); + __weak_reference(_aio_suspend, aio_suspend); int Modified: stable/7/lib/libkse/thread/thr_atfork.c ============================================================================== --- stable/7/lib/libkse/thread/thr_atfork.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_atfork.c Tue Jun 9 15:09:10 2009 (r193835) @@ -25,10 +25,12 @@ * * $FreeBSD$ */ +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_atfork); Modified: stable/7/lib/libkse/thread/thr_attr_destroy.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_destroy.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_destroy.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,9 +28,11 @@ * * $FreeBSD$ */ +#include "namespace.h" #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_destroy); Modified: stable/7/lib/libkse/thread/thr_attr_get_np.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_get_np.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_get_np.c Tue Jun 9 15:09:10 2009 (r193835) @@ -25,10 +25,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_get_np); Modified: stable/7/lib/libkse/thread/thr_attr_getdetachstate.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getdetachstate.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getdetachstate.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,10 @@ * * $FreeBSD$ */ +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getdetachstate); Modified: stable/7/lib/libkse/thread/thr_attr_getguardsize.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getguardsize.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getguardsize.c Tue Jun 9 15:09:10 2009 (r193835) @@ -29,8 +29,10 @@ * $FreeBSD$ */ +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getguardsize); Modified: stable/7/lib/libkse/thread/thr_attr_getinheritsched.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getinheritsched.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getinheritsched.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getinheritsched); Modified: stable/7/lib/libkse/thread/thr_attr_getschedparam.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getschedparam.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getschedparam.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getschedparam); Modified: stable/7/lib/libkse/thread/thr_attr_getschedpolicy.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getschedpolicy.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getschedpolicy.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getschedpolicy); Modified: stable/7/lib/libkse/thread/thr_attr_getscope.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getscope.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getscope.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getscope); Modified: stable/7/lib/libkse/thread/thr_attr_getstack.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getstack.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getstack.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getstack); Modified: stable/7/lib/libkse/thread/thr_attr_getstackaddr.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getstackaddr.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getstackaddr.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getstackaddr); Modified: stable/7/lib/libkse/thread/thr_attr_getstacksize.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_getstacksize.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_getstacksize.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_getstacksize); Modified: stable/7/lib/libkse/thread/thr_attr_init.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_init.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_init.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,10 +28,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_init); Modified: stable/7/lib/libkse/thread/thr_attr_setcreatesuspend_np.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setcreatesuspend_np.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setcreatesuspend_np.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,13 +28,18 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setcreatesuspend_np); LT10_COMPAT_DEFAULT(pthread_attr_setcreatesuspend_np); +int _pthread_attr_setcreatesuspend_np(pthread_attr_t *attr); + __weak_reference(_pthread_attr_setcreatesuspend_np, pthread_attr_setcreatesuspend_np); int Modified: stable/7/lib/libkse/thread/thr_attr_setdetachstate.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setdetachstate.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setdetachstate.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setdetachstate); Modified: stable/7/lib/libkse/thread/thr_attr_setguardsize.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setguardsize.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setguardsize.c Tue Jun 9 15:09:10 2009 (r193835) @@ -29,9 +29,11 @@ * $FreeBSD$ */ +#include "namespace.h" #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setguardsize); Modified: stable/7/lib/libkse/thread/thr_attr_setinheritsched.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setinheritsched.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setinheritsched.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setinheritsched); Modified: stable/7/lib/libkse/thread/thr_attr_setschedparam.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setschedparam.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setschedparam.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setschedparam); Modified: stable/7/lib/libkse/thread/thr_attr_setschedpolicy.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setschedpolicy.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setschedpolicy.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setschedpolicy); Modified: stable/7/lib/libkse/thread/thr_attr_setscope.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setscope.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setscope.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setscope); Modified: stable/7/lib/libkse/thread/thr_attr_setstack.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setstack.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setstack.c Tue Jun 9 15:09:10 2009 (r193835) @@ -31,8 +31,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setstack); Modified: stable/7/lib/libkse/thread/thr_attr_setstackaddr.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setstackaddr.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setstackaddr.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setstackaddr); Modified: stable/7/lib/libkse/thread/thr_attr_setstacksize.c ============================================================================== --- stable/7/lib/libkse/thread/thr_attr_setstacksize.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_attr_setstacksize.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,8 +28,11 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_attr_setstacksize); Modified: stable/7/lib/libkse/thread/thr_barrier.c ============================================================================== --- stable/7/lib/libkse/thread/thr_barrier.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_barrier.c Tue Jun 9 15:09:10 2009 (r193835) @@ -26,9 +26,9 @@ * $FreeBSD$ */ +#include "namespace.h" #include #include -#include "namespace.h" #include #include "un-namespace.h" #include "thr_private.h" @@ -65,7 +65,7 @@ _pthread_barrier_destroy(pthread_barrier int _pthread_barrier_init(pthread_barrier_t *barrier, - const pthread_barrierattr_t *attr, unsigned count) + const pthread_barrierattr_t *attr __unused, unsigned count) { pthread_barrier_t bar; int ret; Modified: stable/7/lib/libkse/thread/thr_barrierattr.c ============================================================================== --- stable/7/lib/libkse/thread/thr_barrierattr.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_barrierattr.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,9 +28,11 @@ * $FreeBSD$ */ +#include "namespace.h" #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_barrierattr_destroy); Modified: stable/7/lib/libkse/thread/thr_cancel.c ============================================================================== --- stable/7/lib/libkse/thread/thr_cancel.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_cancel.c Tue Jun 9 15:09:10 2009 (r193835) @@ -2,8 +2,10 @@ * David Leonard , 1999. Public domain. * $FreeBSD$ */ +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_cancel); @@ -53,7 +55,7 @@ testcancel(struct pthread *curthread) THR_THREAD_UNLOCK(curthread, curthread); _thr_exit_cleanup(); - pthread_exit(PTHREAD_CANCELED); + _pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } } @@ -214,7 +216,7 @@ _pthread_setcancelstate(int state, int * THR_THREAD_UNLOCK(curthread, curthread); if (need_exit != 0) { _thr_exit_cleanup(); - pthread_exit(PTHREAD_CANCELED); + _pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } if (ret == 0 && oldstate != NULL) @@ -252,7 +254,7 @@ _pthread_setcanceltype(int type, int *ol THR_THREAD_UNLOCK(curthread, curthread); if (need_exit != 0) { _thr_exit_cleanup(); - pthread_exit(PTHREAD_CANCELED); + _pthread_exit(PTHREAD_CANCELED); PANIC("cancel"); } if (ret == 0 && oldtype != NULL) @@ -293,7 +295,7 @@ _thr_cancel_leave(struct pthread *thread } void -_thr_finish_cancellation(void *arg) +_thr_finish_cancellation(void *arg __unused) { struct pthread *curthread = _get_curthread(); @@ -305,7 +307,7 @@ _thr_finish_cancellation(void *arg) curthread->cancelflags &= ~THR_CANCEL_NEEDED; THR_THREAD_UNLOCK(curthread, curthread); _thr_exit_cleanup(); - pthread_exit(PTHREAD_CANCELED); + _pthread_exit(PTHREAD_CANCELED); } THR_THREAD_UNLOCK(curthread, curthread); } Modified: stable/7/lib/libkse/thread/thr_clean.c ============================================================================== --- stable/7/lib/libkse/thread/thr_clean.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_clean.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,10 +28,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_cleanup_push); Modified: stable/7/lib/libkse/thread/thr_close.c ============================================================================== --- stable/7/lib/libkse/thread/thr_close.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_close.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,17 +28,22 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(__close); LT10_COMPAT_DEFAULT(close); +int __close(int fd); + __weak_reference(__close, close); int Modified: stable/7/lib/libkse/thread/thr_concurrency.c ============================================================================== --- stable/7/lib/libkse/thread/thr_concurrency.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_concurrency.c Tue Jun 9 15:09:10 2009 (r193835) @@ -26,10 +26,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" Modified: stable/7/lib/libkse/thread/thr_cond.c ============================================================================== --- stable/7/lib/libkse/thread/thr_cond.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_cond.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,10 +28,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(__pthread_cond_wait); @@ -63,6 +66,10 @@ static void cond_wait_backout(void *); static inline void check_continuation(struct pthread *, struct pthread_cond *, pthread_mutex_t *); +int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); +int __pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime); + /* * Double underscore versions are cancellation points. Single underscore * versions are not and are provided for libc internal usage (which @@ -197,7 +204,7 @@ _pthread_cond_wait(pthread_cond_t *cond, * perform the dynamic initialization: */ if (*cond == NULL && - (rval = pthread_cond_init(cond, NULL)) != 0) + (rval = _pthread_cond_init(cond, NULL)) != 0) return (rval); if (!_kse_isthreaded()) @@ -395,7 +402,7 @@ _pthread_cond_timedwait(pthread_cond_t * * If the condition variable is statically initialized, perform dynamic * initialization. */ - if (*cond == NULL && (rval = pthread_cond_init(cond, NULL)) != 0) + if (*cond == NULL && (rval = _pthread_cond_init(cond, NULL)) != 0) return (rval); if (!_kse_isthreaded()) @@ -596,7 +603,7 @@ _pthread_cond_signal(pthread_cond_t * co * If the condition variable is statically initialized, perform dynamic * initialization. */ - else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL)) == 0) { + else if (*cond != NULL || (rval = _pthread_cond_init(cond, NULL)) == 0) { /* Lock the condition variable structure: */ THR_LOCK_ACQUIRE(curthread, &(*cond)->c_lock); @@ -665,7 +672,7 @@ _pthread_cond_broadcast(pthread_cond_t * * If the condition variable is statically initialized, perform dynamic * initialization. */ - else if (*cond != NULL || (rval = pthread_cond_init(cond, NULL)) == 0) { + else if (*cond != NULL || (rval = _pthread_cond_init(cond, NULL)) == 0) { /* Lock the condition variable structure: */ THR_LOCK_ACQUIRE(curthread, &(*cond)->c_lock); Modified: stable/7/lib/libkse/thread/thr_condattr_destroy.c ============================================================================== --- stable/7/lib/libkse/thread/thr_condattr_destroy.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_condattr_destroy.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,9 +28,12 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_condattr_destroy); Modified: stable/7/lib/libkse/thread/thr_condattr_init.c ============================================================================== --- stable/7/lib/libkse/thread/thr_condattr_init.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_condattr_init.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,10 +28,13 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_condattr_init); Modified: stable/7/lib/libkse/thread/thr_condattr_pshared.c ============================================================================== --- stable/7/lib/libkse/thread/thr_condattr_pshared.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_condattr_pshared.c Tue Jun 9 15:09:10 2009 (r193835) @@ -30,6 +30,9 @@ #include #include "thr_private.h" +int _pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared); +int _pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared); + __weak_reference(_pthread_condattr_getpshared, pthread_condattr_getpshared); __weak_reference(_pthread_condattr_setpshared, pthread_condattr_setpshared); Modified: stable/7/lib/libkse/thread/thr_connect.c ============================================================================== --- stable/7/lib/libkse/thread/thr_connect.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_connect.c Tue Jun 9 15:09:10 2009 (r193835) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); LT10_COMPAT_PRIVATE(__connect); LT10_COMPAT_DEFAULT(connect); +int __connect(int fd, const struct sockaddr *name, socklen_t namelen); + __weak_reference(__connect, connect); int Modified: stable/7/lib/libkse/thread/thr_creat.c ============================================================================== --- stable/7/lib/libkse/thread/thr_creat.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_creat.c Tue Jun 9 15:09:10 2009 (r193835) @@ -29,8 +29,10 @@ * $FreeBSD$ */ +#include "namespace.h" #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(___creat); @@ -38,6 +40,8 @@ LT10_COMPAT_DEFAULT(creat); extern int __creat(const char *, mode_t); +int ___creat(const char *path, mode_t mode); + __weak_reference(___creat, creat); int Modified: stable/7/lib/libkse/thread/thr_create.c ============================================================================== --- stable/7/lib/libkse/thread/thr_create.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_create.c Tue Jun 9 15:09:10 2009 (r193835) @@ -29,6 +29,8 @@ * * $FreeBSD$ */ + +#include "namespace.h" #include #include #include @@ -38,6 +40,7 @@ #include #include #include +#include "un-namespace.h" #include "thr_private.h" #include "libc_private.h" @@ -334,11 +337,11 @@ free_stack(struct pthread_attr *pattr) } static void -thread_start(struct pthread *curthread, void *(*start_routine) (void *), +thread_start(struct pthread *curthread __unused, void *(*start_routine) (void *), void *arg) { /* Run the current thread's start routine with argument: */ - pthread_exit(start_routine(arg)); + _pthread_exit(start_routine(arg)); /* This point should never be reached. */ PANIC("Thread has resumed after exit"); Modified: stable/7/lib/libkse/thread/thr_detach.c ============================================================================== --- stable/7/lib/libkse/thread/thr_detach.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_detach.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,10 +28,12 @@ * * $FreeBSD$ */ +#include "namespace.h" #include #include #include #include +#include "un-namespace.h" #include "thr_private.h" LT10_COMPAT_PRIVATE(_pthread_detach); Modified: stable/7/lib/libkse/thread/thr_equal.c ============================================================================== --- stable/7/lib/libkse/thread/thr_equal.c Tue Jun 9 15:03:22 2009 (r193834) +++ stable/7/lib/libkse/thread/thr_equal.c Tue Jun 9 15:09:10 2009 (r193835) @@ -28,7 +28,10 @@ * * $FreeBSD$ */ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 15:10:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D3F91065677; Tue, 9 Jun 2009 15:10:01 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06DE18FC24; Tue, 9 Jun 2009 15:10:01 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59FA01s075461; Tue, 9 Jun 2009 15:10:00 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59FA0Ei075460; Tue, 9 Jun 2009 15:10:00 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200906091510.n59FA0Ei075460@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 9 Jun 2009 15:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193836 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 15:10:02 -0000 Author: gnn Date: Tue Jun 9 15:10:00 2009 New Revision: 193836 URL: http://svn.freebsd.org/changeset/base/193836 Log: Re-add accidentally removed code from the previous MFCs. Modified: stable/7/sys/dev/cxgb/cxgb_main.c Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Tue Jun 9 15:09:10 2009 (r193835) +++ stable/7/sys/dev/cxgb/cxgb_main.c Tue Jun 9 15:10:00 2009 (r193836) @@ -76,7 +76,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef CONFIG_DEFINED #include +#else +#include +#endif #ifdef PRIV_SUPPORTED #include From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 15:20:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CDD106564A; Tue, 9 Jun 2009 15:20:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 760598FC12; Tue, 9 Jun 2009 15:20:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59FKagI075791; Tue, 9 Jun 2009 15:20:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59FKa8I075789; Tue, 9 Jun 2009 15:20:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200906091520.n59FKa8I075789@svn.freebsd.org> From: Attilio Rao Date: Tue, 9 Jun 2009 15:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193838 - stable/6/lib/libthread_db X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 15:20:37 -0000 Author: attilio Date: Tue Jun 9 15:20:36 2009 New Revision: 193838 URL: http://svn.freebsd.org/changeset/base/193838 Log: MFC r193826: avoid to write a int into a char * avoiding breakages on BE architectures. Modified: stable/6/lib/libthread_db/libthr_db.c stable/6/lib/libthread_db/thread_db.h Modified: stable/6/lib/libthread_db/libthr_db.c ============================================================================== --- stable/6/lib/libthread_db/libthr_db.c Tue Jun 9 15:18:01 2009 (r193837) +++ stable/6/lib/libthread_db/libthr_db.c Tue Jun 9 15:20:36 2009 (r193838) @@ -458,6 +458,7 @@ pt_thr_get_info(const td_thrhandle_t *th const td_thragent_t *ta = th->th_ta; struct ptrace_lwpinfo linfo; int state; + int traceme; int ret; TDBG_FUNC(); @@ -470,7 +471,8 @@ pt_thr_get_info(const td_thrhandle_t *th if (ret != 0) return (TD_ERR); ret = thr_pread_int(ta, th->th_thread + ta->thread_off_report_events, - &info->ti_traceme); + &traceme); + info->ti_traceme = traceme; if (ret != 0) return (TD_ERR); ret = ps_pread(ta->ph, th->th_thread + ta->thread_off_event_mask, Modified: stable/6/lib/libthread_db/thread_db.h ============================================================================== --- stable/6/lib/libthread_db/thread_db.h Tue Jun 9 15:18:01 2009 (r193837) +++ stable/6/lib/libthread_db/thread_db.h Tue Jun 9 15:20:36 2009 (r193838) @@ -184,7 +184,7 @@ typedef struct { int ti_pri; lwpid_t ti_lid; char ti_db_suspended; - int ti_traceme; + char ti_traceme; sigset_t ti_sigmask; sigset_t ti_pending; psaddr_t ti_tls; From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 15:50:33 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E9511065674; Tue, 9 Jun 2009 15:50:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B3518FC14; Tue, 9 Jun 2009 15:50:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59FoXUU076384; Tue, 9 Jun 2009 15:50:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59FoXAv076383; Tue, 9 Jun 2009 15:50:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200906091550.n59FoXAv076383@svn.freebsd.org> From: Attilio Rao Date: Tue, 9 Jun 2009 15:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193839 - stable/6/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 15:50:34 -0000 Author: attilio Date: Tue Jun 9 15:50:33 2009 New Revision: 193839 URL: http://svn.freebsd.org/changeset/base/193839 Log: MFC r156484: Add slop to "backwards" cpu accounting messages, 3 usec or 1% whichever triggers. That will improve the diagnostic with 'time went backwards' messages. Sponsored by: Sandvine Incorporated Modified: stable/6/sys/kern/kern_resource.c Modified: stable/6/sys/kern/kern_resource.c ============================================================================== --- stable/6/sys/kern/kern_resource.c Tue Jun 9 15:20:36 2009 (r193838) +++ stable/6/sys/kern/kern_resource.c Tue Jun 9 15:50:33 2009 (r193839) @@ -773,7 +773,11 @@ calcru1(p, ruxp, up, sp) bintime2timeval(&ruxp->rux_runtime, &tv); tu = (u_int64_t)tv.tv_sec * 1000000 + tv.tv_usec; ptu = ruxp->rux_uu + ruxp->rux_su + ruxp->rux_iu; - if (tu < ptu) { + if (tu + 3 > ptu) { + /* Numeric slop for low counts */ + } else if (101 * tu > 100 * ptu) { + /* 1% slop for large counts */ + } else { printf( "calcru: runtime went backwards from %ju usec to %ju usec for pid %d (%s)\n", (uintmax_t)ptu, (uintmax_t)tu, p->p_pid, p->p_comm); From owner-svn-src-stable@FreeBSD.ORG Tue Jun 9 21:17:57 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C78FC10656A7; Tue, 9 Jun 2009 21:17:57 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC0A8FC18; Tue, 9 Jun 2009 21:17:57 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n59LHvAj084062; Tue, 9 Jun 2009 21:17:57 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n59LHvPm084057; Tue, 9 Jun 2009 21:17:57 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906092117.n59LHvPm084057@svn.freebsd.org> From: Kip Macy Date: Tue, 9 Jun 2009 21:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193858 - in stable/7/usr.bin/fstat: . zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 21:17:59 -0000 Author: kmacy Date: Tue Jun 9 21:17:57 2009 New Revision: 193858 URL: http://svn.freebsd.org/changeset/base/193858 Log: MFC fstat support bits for ZFS Submitted by: Alexander Nedotsukov Added: stable/7/usr.bin/fstat/zfs/ stable/7/usr.bin/fstat/zfs.c (contents, props changed) stable/7/usr.bin/fstat/zfs/Makefile (contents, props changed) Modified: stable/7/usr.bin/fstat/Makefile stable/7/usr.bin/fstat/fstat.c stable/7/usr.bin/fstat/fstat.h Modified: stable/7/usr.bin/fstat/Makefile ============================================================================== --- stable/7/usr.bin/fstat/Makefile Tue Jun 9 20:29:47 2009 (r193857) +++ stable/7/usr.bin/fstat/Makefile Tue Jun 9 21:17:57 2009 (r193858) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= fstat SRCS= cd9660.c fstat.c msdosfs.c DPADD= ${LIBKVM} @@ -11,4 +13,13 @@ WARNS?= 6 CFLAGS+=-D_KVM_VNODE +# XXX This is a hack. +.if ${MK_CDDL} != "no" +CFLAGS+= -DZFS +OBJS+= zfs/zfs.o +SUBDIR= zfs +zfs/zfs.o: .PHONY + @cd ${.CURDIR}/zfs && ${MAKE} zfs.o +.endif + .include Modified: stable/7/usr.bin/fstat/fstat.c ============================================================================== --- stable/7/usr.bin/fstat/fstat.c Tue Jun 9 20:29:47 2009 (r193857) +++ stable/7/usr.bin/fstat/fstat.c Tue Jun 9 21:17:57 2009 (r193858) @@ -525,6 +525,11 @@ vtrans(struct vnode *vp, int i, int flag } else if (!strcmp("isofs", tagstr)) { if (!isofs_filestat(&vn, &fst)) badtype = "error"; +#ifdef ZFS + } else if (!strcmp("zfs", tagstr)) { + if (!zfs_filestat(&vn, &fst)) + badtype = "error"; +#endif } else { static char unknown[32]; snprintf(unknown, sizeof unknown, "?(%s)", tagstr); @@ -939,6 +944,20 @@ getfname(const char *filename) return(1); } +#ifdef ZFS +void * +getvnodedata(struct vnode *vp) +{ + return (vp->v_data); +} + +struct mount * +getvnodemount(struct vnode *vp) +{ + return (vp->v_mount); +} +#endif + void usage(void) { Modified: stable/7/usr.bin/fstat/fstat.h ============================================================================== --- stable/7/usr.bin/fstat/fstat.h Tue Jun 9 20:29:47 2009 (r193857) +++ stable/7/usr.bin/fstat/fstat.h Tue Jun 9 21:17:57 2009 (r193858) @@ -71,4 +71,10 @@ dev_t dev2udev(struct cdev *dev); int isofs_filestat(struct vnode *vp, struct filestat *fsp); int msdosfs_filestat(struct vnode *vp, struct filestat *fsp); +#ifdef ZFS +int zfs_filestat(struct vnode *vp, struct filestat *fsp); +void *getvnodedata(struct vnode *vp); +struct mount *getvnodemount(struct vnode *vp); +#endif + #endif /* __FSTAT_H__ */ Added: stable/7/usr.bin/fstat/zfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/usr.bin/fstat/zfs.c Tue Jun 9 21:17:57 2009 (r193858) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2007 Ulf Lilleengen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#define _KERNEL +#include +#include +#undef _KERNEL +#include + +#undef lbolt +#undef lbolt64 +#undef gethrestime_sec +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define ZFS +#undef dprintf +#include + +/* + * Offset calculations that are used to get data from znode without having the + * definition. + */ +#define LOCATION_ZID (2 * sizeof(void *)) +#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *)) - sizeof(struct task)) + +int +zfs_filestat(struct vnode *vp, struct filestat *fsp) +{ + + znode_phys_t zphys; + struct mount mount, *mountptr; + uint64_t *zid; + void *znodeptr, *vnodeptr; + char *dataptr; + void *zphys_addr; + size_t len; + int size; + + len = sizeof(size); + if (sysctlbyname("debug.sizeof.znode", &size, &len, NULL, 0) == -1) { + dprintf(stderr, "error getting sysctl\n"); + return (0); + } + znodeptr = malloc(size); + if (znodeptr == NULL) { + dprintf(stderr, "error allocating memory for znode storage\n"); + return (0); + } + + /* Since we have problems including vnode.h, we'll use the wrappers. */ + vnodeptr = getvnodedata(vp); + if (!KVM_READ(vnodeptr, znodeptr, (size_t)size)) { + dprintf(stderr, "can't read znode at %p for pid %d\n", + (void *)vnodeptr, Pid); + goto bad; + } + + /* + * z_id field is stored in the third pointer. We therefore skip the two + * first bytes. + * + * Pointer to the z_phys structure is the next last pointer. Therefore + * go back two bytes from the end. + */ + dataptr = znodeptr; + zid = (uint64_t *)(dataptr + LOCATION_ZID); + zphys_addr = *(void **)(dataptr + LOCATION_ZPHYS(size)); + + if (!KVM_READ(zphys_addr, &zphys, sizeof(zphys))) { + dprintf(stderr, "can't read znode_phys at %p for pid %d\n", + zphys_addr, Pid); + goto bad; + } + + /* Get the mount pointer, and read from the address. */ + mountptr = getvnodemount(vp); + if (!KVM_READ(mountptr, &mount, sizeof(mount))) { + dprintf(stderr, "can't read mount at %p for pid %d\n", + (void *)mountptr, Pid); + goto bad; + } + + fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0]; + fsp->fileid = *zid; + /* + * XXX: Shows up wrong in output, but UFS has this error too. Could + * be that we're casting mode-variables from 64-bit to 8-bit or simply + * error in the mode-to-string function. + */ + fsp->mode = (mode_t)zphys.zp_mode; + fsp->size = (u_long)zphys.zp_size; + fsp->rdev = (dev_t)zphys.zp_rdev; + free(znodeptr); + return (1); +bad: + free(znodeptr); + return (0); +} Added: stable/7/usr.bin/fstat/zfs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/usr.bin/fstat/zfs/Makefile Tue Jun 9 21:17:57 2009 (r193858) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/.. + +SRCS= zfs.c +OBJS= zfs.o +WARNS?= 1 + +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include +CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common +CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys +CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head +CFLAGS+= -I${.CURDIR}/.. +CFLAGS+= -DNEED_SOLARIS_BOOLEAN + +all: ${OBJS} +CLEANFILES= ${OBJS} + +.include From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 01:18:08 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83D70106564A; Wed, 10 Jun 2009 01:18:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 717DF8FC16; Wed, 10 Jun 2009 01:18:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5A1I8T2089583; Wed, 10 Jun 2009 01:18:08 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5A1I8A5089581; Wed, 10 Jun 2009 01:18:08 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906100118.n5A1I8A5089581@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Jun 2009 01:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193876 - in stable/7/sys/boot/i386: . loader X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 01:18:09 -0000 Author: kmacy Date: Wed Jun 10 01:18:07 2009 New Revision: 193876 URL: http://svn.freebsd.org/changeset/base/193876 Log: - enable building of loader by default - fix MK_ZFS == "no" and MK_CDDL == "no" handling Modified: stable/7/sys/boot/i386/Makefile stable/7/sys/boot/i386/loader/Makefile Modified: stable/7/sys/boot/i386/Makefile ============================================================================== --- stable/7/sys/boot/i386/Makefile Wed Jun 10 01:15:30 2009 (r193875) +++ stable/7/sys/boot/i386/Makefile Wed Jun 10 01:18:07 2009 (r193876) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ kgzldr libi386 libfirewire loader -.if defined(LOADER_ZFS_SUPPORT) +.if ${MK_ZFS} SUBDIR+= zfsboot gptzfsboot .endif Modified: stable/7/sys/boot/i386/loader/Makefile ============================================================================== --- stable/7/sys/boot/i386/loader/Makefile Wed Jun 10 01:15:30 2009 (r193875) +++ stable/7/sys/boot/i386/loader/Makefile Wed Jun 10 01:18:07 2009 (r193876) @@ -16,9 +16,11 @@ LIBFIREWIRE= ${.OBJDIR}/../libfirewire/l .endif # Put LOADER_ZFS_SUPPORT=yes in /etc/make.conf for ZFS support -.if defined(LOADER_ZFS_SUPPORT) +.if ${MK_ZFS} != "no" CFLAGS+= -DLOADER_ZFS_SUPPORT LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a +.else +LIBZFS= .endif # Enable PXE TFTP or NFS support, not both. From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 01:20:46 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D517E106564A; Wed, 10 Jun 2009 01:20:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C34E78FC15; Wed, 10 Jun 2009 01:20:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5A1Kkjb089669; Wed, 10 Jun 2009 01:20:46 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5A1KkES089668; Wed, 10 Jun 2009 01:20:46 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906100120.n5A1KkES089668@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Jun 2009 01:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193877 - stable/7/sys/boot/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 01:20:47 -0000 Author: kmacy Date: Wed Jun 10 01:20:46 2009 New Revision: 193877 URL: http://svn.freebsd.org/changeset/base/193877 Log: Should be ${MK_ZFS} != "no" Modified: stable/7/sys/boot/i386/Makefile Modified: stable/7/sys/boot/i386/Makefile ============================================================================== --- stable/7/sys/boot/i386/Makefile Wed Jun 10 01:18:07 2009 (r193876) +++ stable/7/sys/boot/i386/Makefile Wed Jun 10 01:20:46 2009 (r193877) @@ -4,7 +4,7 @@ SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ kgzldr libi386 libfirewire loader -.if ${MK_ZFS} +.if ${MK_ZFS} != "no" SUBDIR+= zfsboot gptzfsboot .endif From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 05:26:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9C2B106566C; Wed, 10 Jun 2009 05:26:21 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B74388FC17; Wed, 10 Jun 2009 05:26:21 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5A5QL4R095036; Wed, 10 Jun 2009 05:26:21 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5A5QLsC095035; Wed, 10 Jun 2009 05:26:21 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906100526.n5A5QLsC095035@svn.freebsd.org> From: Brian Somers Date: Wed, 10 Jun 2009 05:26:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193888 - stable/7/usr.sbin/pwd_mkdb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 05:26:22 -0000 Author: brian Date: Wed Jun 10 05:26:21 2009 New Revision: 193888 URL: http://svn.freebsd.org/changeset/base/193888 Log: MFC: r192432: Fail pwd_mkdb -C if the user name is MAXLOGNAME or longer. Modified: stable/7/usr.sbin/pwd_mkdb/ (props changed) stable/7/usr.sbin/pwd_mkdb/pwd_mkdb.c Modified: stable/7/usr.sbin/pwd_mkdb/pwd_mkdb.c ============================================================================== --- stable/7/usr.sbin/pwd_mkdb/pwd_mkdb.c Wed Jun 10 04:18:11 2009 (r193887) +++ stable/7/usr.sbin/pwd_mkdb/pwd_mkdb.c Wed Jun 10 05:26:21 2009 (r193888) @@ -204,7 +204,11 @@ main(int argc, char *argv[]) /* check only if password database is valid */ if (Cflag) { - for (cnt = 1; scan(fp, &pwd); ++cnt); + while (scan(fp, &pwd)) + if (!is_comment && strlen(pwd.pw_name) >= MAXLOGNAME) { + warnx("%s: username too long", pwd.pw_name); + exit(1); + } exit(0); } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 08:39:57 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7C721065670; Wed, 10 Jun 2009 08:39:57 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 71ED58FC16; Wed, 10 Jun 2009 08:39:57 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 713AC35E7F4; Wed, 10 Jun 2009 04:39:56 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 10 Jun 2009 04:39:56 -0400 X-Sasl-enc: pGm/YTE9BnsynK1pH8uQA796LGmSVolReI4w/usM9Jhm 1244623196 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2EF50C76E; Wed, 10 Jun 2009 04:39:55 -0400 (EDT) Message-ID: <4A2F7159.3090800@incunabulum.net> Date: Wed, 10 Jun 2009 09:39:53 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (X11/20090412) MIME-Version: 1.0 To: John Baldwin References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <200906081050.41020.jhb@freebsd.org> <4A2E3C26.9040903@incunabulum.net> <200906090946.46103.jhb@freebsd.org> In-Reply-To: <200906090946.46103.jhb@freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 08:39:58 -0000 John Baldwin wrote: > http://www.FreeBSD.org/~jhb/patches/ata_ali.patch > Ok, I've uploaded the patch, I must have just sent it inline before. > Thanks! I did a p4 integ on my p4 work branch, built a NanoBSD USB stick image with this patch incorporated into the kernel, booted from it successfully on the affected machine, and got this panic just after the WITNESS warning. Had to transcribe by hand, no debugging symbols at the moment. Fatal trap 12: page fault while in kernel mode cpuid = 0 apic id = 00 fault virtual address = 0x0 fault code = supervisor read, page not present instruction pointer = 0x20:0x0 stack pointer = 0x28:0xc4adbb68 frame pointer = 0x28:0xc4adbb9c code segment = base 0x0, limit 0xfffff, type 0x1b processor eflags = interrupt enabled, resume, IOPL = 0 current process = 4 (g_down) [thread pid 4 tid 100008] Stopped at 0: error reading from address 0 ata_begin_transaction+0x18a ata_start+0x1db ata_queue_request+0x4a0 ad_strategy+0x28f g_disk_start+0x16a g_io_schedule_down+0x281 g_down_procbody+0x8d fork_exit+0xb8 fork_trampoline+0x8 Looks like some sort of switch table, call %*edx, just after ata_pio_write() in that function. I'll try to grab line number info on next boot from NanoBSD build tree. Don't have any other HEAD stuff compiled but that does sound fairly far down in the body of ata_begin_transaction() and it looks like it's inside one of the switch cases. > > The same patch will apply to 7-stable though it will have to be applied > to ata-chipset.c instead. > I'll try applying this there next, just in case this is an 8.x specific problem. thanks! BMS From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 09:06:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75DAE1065674; Wed, 10 Jun 2009 09:06:42 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 639D28FC08; Wed, 10 Jun 2009 09:06:42 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5A96gBk099418; Wed, 10 Jun 2009 09:06:42 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5A96grD099416; Wed, 10 Jun 2009 09:06:42 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906100906.n5A96grD099416@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Jun 2009 09:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193890 - in stable/7/sys/boot: . i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 09:06:43 -0000 Author: kmacy Date: Wed Jun 10 09:06:42 2009 New Revision: 193890 URL: http://svn.freebsd.org/changeset/base/193890 Log: fix loader for default settings case Modified: stable/7/sys/boot/Makefile stable/7/sys/boot/i386/Makefile Modified: stable/7/sys/boot/Makefile ============================================================================== --- stable/7/sys/boot/Makefile Wed Jun 10 06:49:45 2009 (r193889) +++ stable/7/sys/boot/Makefile Wed Jun 10 09:06:42 2009 (r193890) @@ -17,7 +17,7 @@ SUBDIR+= efi SUBDIR+= ofw .endif -.if defined(LOADER_ZFS_SUPPORT) +.if ${MK_ZFS} != "no" SUBDIR+= zfs .endif Modified: stable/7/sys/boot/i386/Makefile ============================================================================== --- stable/7/sys/boot/i386/Makefile Wed Jun 10 06:49:45 2009 (r193889) +++ stable/7/sys/boot/i386/Makefile Wed Jun 10 09:06:42 2009 (r193890) @@ -2,11 +2,7 @@ .include SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot \ - kgzldr libi386 libfirewire loader - -.if ${MK_ZFS} != "no" -SUBDIR+= zfsboot gptzfsboot -.endif + zfsboot gptzfsboot kgzldr libi386 libfirewire loader # special boot programs, 'self-extracting boot2+loader' SUBDIR+= pxeldr From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 09:08:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9D37106564A; Wed, 10 Jun 2009 09:08:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 906188FC0A; Wed, 10 Jun 2009 09:08:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 239AA35B75A; Wed, 10 Jun 2009 05:08:49 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 10 Jun 2009 05:08:49 -0400 X-Sasl-enc: dx0+9NZVujWth7A+jujuVYY3neOdYRR5RiWQq4JFArAe 1244624928 Received: from anglepoise.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 00258C76E; Wed, 10 Jun 2009 05:08:47 -0400 (EDT) Message-ID: <4A2F781E.8010803@incunabulum.net> Date: Wed, 10 Jun 2009 10:08:46 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: John Baldwin References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <200906081050.41020.jhb@freebsd.org> <4A2E3C26.9040903@incunabulum.net> <200906090946.46103.jhb@freebsd.org> In-Reply-To: <200906090946.46103.jhb@freebsd.org> Content-Type: multipart/mixed; boundary="------------080009090909010804080902" Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 09:08:50 -0000 This is a multi-part message in MIME format. --------------080009090909010804080902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit John Baldwin wrote: >> As far as I know the regression / panic still happens in 7.2 -- I nearly >> did an 'installkernel' on that box w/o thinking... >> > Yes. The same patch will apply to 7-stable though it will have to be applied > to ata-chipset.c instead. > Here is that patch reworked, which I'm about to test shortly. I see the fuzz confused patch(1). ... After manual fixup, I am now up and running with this modified patch. Thanks John! Not sure why it didn't work in 8.x, though. cheers BMS --------------080009090909010804080902 Content-Type: text/plain; name="ata_ali_releng7.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata_ali_releng7.patch" --- ata-chipset.c.orig 2009-06-01 23:05:07.000000000 +0100 +++ ata-chipset.c 2009-06-10 09:54:02.000000000 +0100 @@ -198,6 +198,9 @@ static int ata_check_80pin(device_t dev, int mode); static int ata_mode2idx(int mode); +struct ali_sata_resources { + struct resource *bars[4]; +}; /* * generic ATA support functions @@ -1094,6 +1097,8 @@ ata_ali_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + struct ali_sata_resources *res; + int i, rid; if (ata_setup_interrupt(dev)) return ENXIO; @@ -1108,6 +1113,22 @@ if ((ctlr->chip->chipid == ATA_ALI_5288) && (ata_ahci_chipinit(dev) != ENXIO)) return 0; + + /* Allocate resources for later use by channel attach routines. */ + res = malloc(sizeof(struct ali_sata_resources), M_TEMP, M_WAITOK); + for (i = 0; i < 4; i++) { + rid = PCIR_BAR(i); + res->bars[i] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE); + if (res->bars[i] == NULL) { + device_printf(dev, "Failed to allocate BAR %d\n", i); + for (i--; i >=0; i--) + bus_release_resource(dev, SYS_RES_IOPORT, + PCIR_BAR(i), res->bars[i]); + free(res, M_TEMP); + } + } + ctlr->chipset_data = res; break; case ALINEW: @@ -1162,20 +1183,18 @@ device_t parent = device_get_parent(dev); struct ata_pci_controller *ctlr = device_get_softc(parent); struct ata_channel *ch = device_get_softc(dev); + struct ali_sata_resources *res; struct resource *io = NULL, *ctlio = NULL; int unit01 = (ch->unit & 1), unit10 = (ch->unit & 2); - int i, rid; - - rid = PCIR_BAR(0) + (unit01 ? 8 : 0); - io = bus_alloc_resource_any(parent, SYS_RES_IOPORT, &rid, RF_ACTIVE); - if (!io) - return ENXIO; + int i; - rid = PCIR_BAR(1) + (unit01 ? 8 : 0); - ctlio = bus_alloc_resource_any(parent, SYS_RES_IOPORT, &rid, RF_ACTIVE); - if (!ctlio) { - bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); - return ENXIO; + res = ctlr->chipset_data; + if (unit01) { + io = res->bars[2]; + ctlio = res->bars[3]; + } else { + io = res->bars[0]; + ctlio = res->bars[1]; } for (i = ATA_DATA; i <= ATA_COMMAND; i ++) { --------------080009090909010804080902-- From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 10:31:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C232106566B; Wed, 10 Jun 2009 10:31:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353268FC18; Wed, 10 Jun 2009 10:31:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AAVCfx010117; Wed, 10 Jun 2009 10:31:12 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AAVBWv010114; Wed, 10 Jun 2009 10:31:11 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200906101031.n5AAVBWv010114@svn.freebsd.org> From: Colin Percival Date: Wed, 10 Jun 2009 10:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193893 - head/contrib/ntp/ntpd head/sys/kern head/sys/netinet6 releng/6.3 releng/6.3/contrib/ntp/ntpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.3/sys/netinet6 releng/6.4 releng/... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 10:31:13 -0000 Author: cperciva Date: Wed Jun 10 10:31:11 2009 New Revision: 193893 URL: http://svn.freebsd.org/changeset/base/193893 Log: Prevent integer overflow in direct pipe write code from circumventing virtual-to-physical page lookups. [09:09] Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10] Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11] Approved by: so (cperciva) Approved by: re (not really, but SVN wants this...) Security: FreeBSD-SA-09:09.pipe Security: FreeBSD-SA-09:10.ipv6 Security: FreeBSD-SA-09:11.ntpd Modified: stable/7/contrib/ntp/ntpd/ntp_crypto.c stable/7/sys/kern/sys_pipe.c stable/7/sys/netinet6/in6.c Changes in other areas also in this revision: Modified: head/contrib/ntp/ntpd/ntp_crypto.c head/sys/kern/sys_pipe.c head/sys/netinet6/in6.c releng/6.3/UPDATING releng/6.3/contrib/ntp/ntpd/ntp_crypto.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/sys_pipe.c releng/6.3/sys/netinet6/in6.c releng/6.4/UPDATING releng/6.4/contrib/ntp/ntpd/ntp_crypto.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/sys_pipe.c releng/6.4/sys/netinet6/in6.c releng/7.1/UPDATING releng/7.1/contrib/ntp/ntpd/ntp_crypto.c releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/sys_pipe.c releng/7.1/sys/netinet6/in6.c releng/7.2/UPDATING releng/7.2/contrib/ntp/ntpd/ntp_crypto.c releng/7.2/sys/conf/newvers.sh releng/7.2/sys/kern/sys_pipe.c releng/7.2/sys/netinet6/in6.c stable/6/contrib/ntp/ntpd/ntp_crypto.c stable/6/sys/kern/sys_pipe.c stable/6/sys/netinet6/in6.c Modified: stable/7/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/7/contrib/ntp/ntpd/ntp_crypto.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/7/contrib/ntp/ntpd/ntp_crypto.c Wed Jun 10 10:31:11 2009 (r193893) @@ -570,7 +570,7 @@ crypto_recv( peer->issuer = emalloc(vallen + 1); strcpy(peer->issuer, peer->subject); temp32 = (fstamp >> 16) & 0xffff; - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "flags 0x%x host %s signature %s", fstamp, peer->subject, OBJ_nid2ln(temp32)); record_crypto_stats(&peer->srcadr, statstr); @@ -636,7 +636,8 @@ crypto_recv( } peer->flash &= ~TEST8; temp32 = cinfo->nid; - sprintf(statstr, "cert %s 0x%x %s (%u) fs %u", + snprintf(statstr, NTP_MAXSTRLEN, + "cert %s 0x%x %s (%u) fs %u", cinfo->subject, cinfo->flags, OBJ_nid2ln(temp32), temp32, ntohl(ep->fstamp)); @@ -685,7 +686,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "iff fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "iff fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -733,7 +734,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "gq fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "gq fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -774,7 +775,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "mv fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "mv fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -828,7 +829,7 @@ crypto_recv( peer->crypto &= ~CRYPTO_FLAG_AUTO; peer->crypto |= CRYPTO_FLAG_AGREE; peer->flash &= ~TEST8; - sprintf(statstr, "cook %x ts %u fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u", peer->pcookie, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); @@ -893,7 +894,7 @@ crypto_recv( peer->crypto &= ~CRYPTO_FLAG_AUTO; peer->crypto |= CRYPTO_FLAG_AGREE; peer->flash &= ~TEST8; - sprintf(statstr, "cook %x ts %u fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u", peer->pcookie, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); @@ -944,7 +945,7 @@ crypto_recv( peer->pkeyid = bp->key; peer->crypto |= CRYPTO_FLAG_AUTO; peer->flash &= ~TEST8; - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "auto seq %d key %x ts %u fs %u", bp->seq, bp->key, ntohl(ep->tstamp), ntohl(ep->fstamp)); @@ -987,7 +988,8 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_SIGN; peer->flash &= ~TEST8; temp32 = cinfo->nid; - sprintf(statstr, "sign %s 0x%x %s (%u) fs %u", + snprintf(statstr, NTP_MAXSTRLEN, + "sign %s 0x%x %s (%u) fs %u", cinfo->issuer, cinfo->flags, OBJ_nid2ln(temp32), temp32, ntohl(ep->fstamp)); @@ -1071,7 +1073,8 @@ crypto_recv( crypto_flags |= CRYPTO_FLAG_TAI; peer->crypto |= CRYPTO_FLAG_LEAP; peer->flash &= ~TEST8; - sprintf(statstr, "leap %u ts %u fs %u", vallen, + snprintf(statstr, NTP_MAXSTRLEN, + "leap %u ts %u fs %u", vallen, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -1127,7 +1130,7 @@ crypto_recv( * cheerfully ignored, as the message is not sent. */ if (rval > XEVNT_TSP) { - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "error %x opcode %x ts %u fs %u", rval, code, tstamp, fstamp); record_crypto_stats(&peer->srcadr, statstr); @@ -1453,7 +1456,8 @@ crypto_xmit( */ if (rval != XEVNT_OK) { opcode |= CRYPTO_ERROR; - sprintf(statstr, "error %x opcode %x", rval, opcode); + snprintf(statstr, NTP_MAXSTRLEN, + "error %x opcode %x", rval, opcode); record_crypto_stats(srcadr_sin, statstr); report_event(rval, NULL); #ifdef DEBUG @@ -1952,7 +1956,8 @@ crypto_update(void) if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey)) tai_leap.siglen = htonl(len); } - sprintf(statstr, "update ts %u", ntohl(hostval.tstamp)); + snprintf(statstr, NTP_MAXSTRLEN, + "update ts %u", ntohl(hostval.tstamp)); record_crypto_stats(NULL, statstr); #ifdef DEBUG if (debug) @@ -3606,7 +3611,7 @@ crypto_key( */ if ((ptr = strrchr(linkname, '\n')) != NULL) *ptr = '\0'; - sprintf(statstr, "%s mod %d", &linkname[2], + snprintf(statstr, NTP_MAXSTRLEN, "%s mod %d", &linkname[2], EVP_PKEY_size(pkey) * 8); record_crypto_stats(NULL, statstr); #ifdef DEBUG @@ -3715,8 +3720,8 @@ crypto_cert( if ((ptr = strrchr(linkname, '\n')) != NULL) *ptr = '\0'; - sprintf(statstr, "%s 0x%x len %lu", &linkname[2], ret->flags, - len); + snprintf(statstr, NTP_MAXSTRLEN, + "%s 0x%x len %lu", &linkname[2], ret->flags, len); record_crypto_stats(NULL, statstr); #ifdef DEBUG if (debug) @@ -3832,7 +3837,7 @@ crypto_tai( for (j = 0; j < i; j++) *ptr++ = htonl(leapsec[j]); crypto_flags |= CRYPTO_FLAG_TAI; - sprintf(statstr, "%s fs %u leap %u len %u", cp, fstamp, + snprintf(statstr, NTP_MAXSTRLEN, "%s fs %u leap %u len %u", cp, fstamp, leapsec[--j], len); record_crypto_stats(NULL, statstr); #ifdef DEBUG Modified: stable/7/sys/kern/sys_pipe.c ============================================================================== --- stable/7/sys/kern/sys_pipe.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/7/sys/kern/sys_pipe.c Wed Jun 10 10:31:11 2009 (r193893) @@ -755,6 +755,8 @@ pipe_build_write_buffer(wpipe, uio) pmap = vmspace_pmap(curproc->p_vmspace); endaddr = round_page((vm_offset_t)uio->uio_iov->iov_base + size); addr = trunc_page((vm_offset_t)uio->uio_iov->iov_base); + if (endaddr < addr) + return (EFAULT); for (i = 0; addr < endaddr; addr += PAGE_SIZE, i++) { /* * vm_fault_quick() can sleep. Consequently, Modified: stable/7/sys/netinet6/in6.c ============================================================================== --- stable/7/sys/netinet6/in6.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/7/sys/netinet6/in6.c Wed Jun 10 10:31:11 2009 (r193893) @@ -354,6 +354,7 @@ in6_control(struct socket *so, u_long cm case SIOCSRTRFLUSH_IN6: case SIOCSDEFIFACE_IN6: case SIOCSIFINFO_FLAGS: + case SIOCSIFINFO_IN6: if (td != NULL) { error = priv_check(td, PRIV_NETINET_ND6); if (error) @@ -362,7 +363,6 @@ in6_control(struct socket *so, u_long cm /* FALLTHROUGH */ case OSIOCGIFINFO_IN6: case SIOCGIFINFO_IN6: - case SIOCSIFINFO_IN6: case SIOCGDRLST_IN6: case SIOCGPRLST_IN6: case SIOCGNBRINFO_IN6: From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 10:31:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C76FB106564A; Wed, 10 Jun 2009 10:31:13 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AECE88FC20; Wed, 10 Jun 2009 10:31:13 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AAVDNO010158; Wed, 10 Jun 2009 10:31:13 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AAVDU5010155; Wed, 10 Jun 2009 10:31:13 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200906101031.n5AAVDU5010155@svn.freebsd.org> From: Colin Percival Date: Wed, 10 Jun 2009 10:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193893 - head/contrib/ntp/ntpd head/sys/kern head/sys/netinet6 releng/6.3 releng/6.3/contrib/ntp/ntpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.3/sys/netinet6 releng/6.4 releng/... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 10:31:15 -0000 Author: cperciva Date: Wed Jun 10 10:31:11 2009 New Revision: 193893 URL: http://svn.freebsd.org/changeset/base/193893 Log: Prevent integer overflow in direct pipe write code from circumventing virtual-to-physical page lookups. [09:09] Add missing permissions check for SIOCSIFINFO_IN6 ioctl. [09:10] Fix buffer overflow in "autokey" negotiation in ntpd(8). [09:11] Approved by: so (cperciva) Approved by: re (not really, but SVN wants this...) Security: FreeBSD-SA-09:09.pipe Security: FreeBSD-SA-09:10.ipv6 Security: FreeBSD-SA-09:11.ntpd Modified: stable/6/contrib/ntp/ntpd/ntp_crypto.c stable/6/sys/kern/sys_pipe.c stable/6/sys/netinet6/in6.c Changes in other areas also in this revision: Modified: head/contrib/ntp/ntpd/ntp_crypto.c head/sys/kern/sys_pipe.c head/sys/netinet6/in6.c releng/6.3/UPDATING releng/6.3/contrib/ntp/ntpd/ntp_crypto.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/sys_pipe.c releng/6.3/sys/netinet6/in6.c releng/6.4/UPDATING releng/6.4/contrib/ntp/ntpd/ntp_crypto.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/sys_pipe.c releng/6.4/sys/netinet6/in6.c releng/7.1/UPDATING releng/7.1/contrib/ntp/ntpd/ntp_crypto.c releng/7.1/sys/conf/newvers.sh releng/7.1/sys/kern/sys_pipe.c releng/7.1/sys/netinet6/in6.c releng/7.2/UPDATING releng/7.2/contrib/ntp/ntpd/ntp_crypto.c releng/7.2/sys/conf/newvers.sh releng/7.2/sys/kern/sys_pipe.c releng/7.2/sys/netinet6/in6.c stable/7/contrib/ntp/ntpd/ntp_crypto.c stable/7/sys/kern/sys_pipe.c stable/7/sys/netinet6/in6.c Modified: stable/6/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/6/contrib/ntp/ntpd/ntp_crypto.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/6/contrib/ntp/ntpd/ntp_crypto.c Wed Jun 10 10:31:11 2009 (r193893) @@ -570,7 +570,7 @@ crypto_recv( peer->issuer = emalloc(vallen + 1); strcpy(peer->issuer, peer->subject); temp32 = (fstamp >> 16) & 0xffff; - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "flags 0x%x host %s signature %s", fstamp, peer->subject, OBJ_nid2ln(temp32)); record_crypto_stats(&peer->srcadr, statstr); @@ -636,7 +636,8 @@ crypto_recv( } peer->flash &= ~TEST8; temp32 = cinfo->nid; - sprintf(statstr, "cert %s 0x%x %s (%u) fs %u", + snprintf(statstr, NTP_MAXSTRLEN, + "cert %s 0x%x %s (%u) fs %u", cinfo->subject, cinfo->flags, OBJ_nid2ln(temp32), temp32, ntohl(ep->fstamp)); @@ -685,7 +686,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "iff fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "iff fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -733,7 +734,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "gq fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "gq fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -774,7 +775,7 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_VRFY | CRYPTO_FLAG_PROV; peer->flash &= ~TEST8; - sprintf(statstr, "mv fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "mv fs %u", ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -828,7 +829,7 @@ crypto_recv( peer->crypto &= ~CRYPTO_FLAG_AUTO; peer->crypto |= CRYPTO_FLAG_AGREE; peer->flash &= ~TEST8; - sprintf(statstr, "cook %x ts %u fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u", peer->pcookie, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); @@ -893,7 +894,7 @@ crypto_recv( peer->crypto &= ~CRYPTO_FLAG_AUTO; peer->crypto |= CRYPTO_FLAG_AGREE; peer->flash &= ~TEST8; - sprintf(statstr, "cook %x ts %u fs %u", + snprintf(statstr, NTP_MAXSTRLEN, "cook %x ts %u fs %u", peer->pcookie, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); @@ -944,7 +945,7 @@ crypto_recv( peer->pkeyid = bp->key; peer->crypto |= CRYPTO_FLAG_AUTO; peer->flash &= ~TEST8; - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "auto seq %d key %x ts %u fs %u", bp->seq, bp->key, ntohl(ep->tstamp), ntohl(ep->fstamp)); @@ -987,7 +988,8 @@ crypto_recv( peer->crypto |= CRYPTO_FLAG_SIGN; peer->flash &= ~TEST8; temp32 = cinfo->nid; - sprintf(statstr, "sign %s 0x%x %s (%u) fs %u", + snprintf(statstr, NTP_MAXSTRLEN, + "sign %s 0x%x %s (%u) fs %u", cinfo->issuer, cinfo->flags, OBJ_nid2ln(temp32), temp32, ntohl(ep->fstamp)); @@ -1071,7 +1073,8 @@ crypto_recv( crypto_flags |= CRYPTO_FLAG_TAI; peer->crypto |= CRYPTO_FLAG_LEAP; peer->flash &= ~TEST8; - sprintf(statstr, "leap %u ts %u fs %u", vallen, + snprintf(statstr, NTP_MAXSTRLEN, + "leap %u ts %u fs %u", vallen, ntohl(ep->tstamp), ntohl(ep->fstamp)); record_crypto_stats(&peer->srcadr, statstr); #ifdef DEBUG @@ -1127,7 +1130,7 @@ crypto_recv( * cheerfully ignored, as the message is not sent. */ if (rval > XEVNT_TSP) { - sprintf(statstr, + snprintf(statstr, NTP_MAXSTRLEN, "error %x opcode %x ts %u fs %u", rval, code, tstamp, fstamp); record_crypto_stats(&peer->srcadr, statstr); @@ -1453,7 +1456,8 @@ crypto_xmit( */ if (rval != XEVNT_OK) { opcode |= CRYPTO_ERROR; - sprintf(statstr, "error %x opcode %x", rval, opcode); + snprintf(statstr, NTP_MAXSTRLEN, + "error %x opcode %x", rval, opcode); record_crypto_stats(srcadr_sin, statstr); report_event(rval, NULL); #ifdef DEBUG @@ -1952,7 +1956,8 @@ crypto_update(void) if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey)) tai_leap.siglen = htonl(len); } - sprintf(statstr, "update ts %u", ntohl(hostval.tstamp)); + snprintf(statstr, NTP_MAXSTRLEN, + "update ts %u", ntohl(hostval.tstamp)); record_crypto_stats(NULL, statstr); #ifdef DEBUG if (debug) @@ -3606,7 +3611,7 @@ crypto_key( */ if ((ptr = strrchr(linkname, '\n')) != NULL) *ptr = '\0'; - sprintf(statstr, "%s mod %d", &linkname[2], + snprintf(statstr, NTP_MAXSTRLEN, "%s mod %d", &linkname[2], EVP_PKEY_size(pkey) * 8); record_crypto_stats(NULL, statstr); #ifdef DEBUG @@ -3715,8 +3720,8 @@ crypto_cert( if ((ptr = strrchr(linkname, '\n')) != NULL) *ptr = '\0'; - sprintf(statstr, "%s 0x%x len %lu", &linkname[2], ret->flags, - len); + snprintf(statstr, NTP_MAXSTRLEN, + "%s 0x%x len %lu", &linkname[2], ret->flags, len); record_crypto_stats(NULL, statstr); #ifdef DEBUG if (debug) @@ -3832,7 +3837,7 @@ crypto_tai( for (j = 0; j < i; j++) *ptr++ = htonl(leapsec[j]); crypto_flags |= CRYPTO_FLAG_TAI; - sprintf(statstr, "%s fs %u leap %u len %u", cp, fstamp, + snprintf(statstr, NTP_MAXSTRLEN, "%s fs %u leap %u len %u", cp, fstamp, leapsec[--j], len); record_crypto_stats(NULL, statstr); #ifdef DEBUG Modified: stable/6/sys/kern/sys_pipe.c ============================================================================== --- stable/6/sys/kern/sys_pipe.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/6/sys/kern/sys_pipe.c Wed Jun 10 10:31:11 2009 (r193893) @@ -774,6 +774,8 @@ pipe_build_write_buffer(wpipe, uio) pmap = vmspace_pmap(curproc->p_vmspace); endaddr = round_page((vm_offset_t)uio->uio_iov->iov_base + size); addr = trunc_page((vm_offset_t)uio->uio_iov->iov_base); + if (endaddr < addr) + return (EFAULT); for (i = 0; addr < endaddr; addr += PAGE_SIZE, i++) { /* * vm_fault_quick() can sleep. Consequently, Modified: stable/6/sys/netinet6/in6.c ============================================================================== --- stable/6/sys/netinet6/in6.c Wed Jun 10 09:28:50 2009 (r193892) +++ stable/6/sys/netinet6/in6.c Wed Jun 10 10:31:11 2009 (r193893) @@ -359,12 +359,12 @@ in6_control(so, cmd, data, ifp, td) case SIOCSRTRFLUSH_IN6: case SIOCSDEFIFACE_IN6: case SIOCSIFINFO_FLAGS: + case SIOCSIFINFO_IN6: if (!privileged) return (EPERM); /* FALLTHROUGH */ case OSIOCGIFINFO_IN6: case SIOCGIFINFO_IN6: - case SIOCSIFINFO_IN6: case SIOCGDRLST_IN6: case SIOCGPRLST_IN6: case SIOCGNBRINFO_IN6: From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 12:07:53 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03EE106571E; Wed, 10 Jun 2009 12:07:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0B7E8FC18; Wed, 10 Jun 2009 12:07:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AC7qcq012558; Wed, 10 Jun 2009 12:07:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AC7q9M012551; Wed, 10 Jun 2009 12:07:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906101207.n5AC7q9M012551@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Jun 2009 12:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193906 - in stable/7/sys: . amd64/linux32 contrib/pf dev/ath/ath_hal dev/cxgb i386/linux kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 12:07:56 -0000 Author: kib Date: Wed Jun 10 12:07:52 2009 New Revision: 193906 URL: http://svn.freebsd.org/changeset/base/193906 Log: MFC r185647; Several threads in a process may do vfork() simultaneously. Then, all parent threads sleep on the parent' struct proc until corresponding child releases the vmspace. Each sleep is interlocked with proc mutex of the child, that triggers assertion in the sleepq_add(). The assertion requires that at any time, all simultaneous sleepers for the channel use the same interlock. Silent the assertion by using conditional variable allocated in the child. Broadcast the variable event on exec() and exit(). MFC r188750: Adapt linux emulation to use cv for vfork wait. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux32_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/linux/linux_machdep.c stable/7/sys/kern/kern_exec.c stable/7/sys/kern/kern_exit.c stable/7/sys/kern/kern_fork.c stable/7/sys/kern/kern_proc.c stable/7/sys/sys/proc.h Modified: stable/7/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_machdep.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/amd64/linux32/linux32_machdep.c Wed Jun 10 12:07:52 2009 (r193906) @@ -537,7 +537,7 @@ linux_vfork(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -726,7 +726,7 @@ linux_clone(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } Modified: stable/7/sys/i386/linux/linux_machdep.c ============================================================================== --- stable/7/sys/i386/linux/linux_machdep.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/i386/linux/linux_machdep.c Wed Jun 10 12:07:52 2009 (r193906) @@ -376,7 +376,7 @@ linux_vfork(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -581,7 +581,7 @@ linux_clone(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/kern/kern_exec.c Wed Jun 10 12:07:52 2009 (r193906) @@ -559,7 +559,7 @@ interpret: p->p_flag |= P_EXEC; if (p->p_pptr && (p->p_flag & P_PPWAIT)) { p->p_flag &= ~P_PPWAIT; - wakeup(p->p_pptr); + cv_broadcast(&p->p_pwait); } /* Modified: stable/7/sys/kern/kern_exit.c ============================================================================== --- stable/7/sys/kern/kern_exit.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/kern/kern_exit.c Wed Jun 10 12:07:52 2009 (r193906) @@ -550,6 +550,7 @@ retry: * proc lock. */ wakeup(p->p_pptr); + cv_broadcast(&p->p_pwait); PROC_SLOCK(p->p_pptr); sched_exit(p->p_pptr, td); PROC_SUNLOCK(p->p_pptr); @@ -783,6 +784,7 @@ loop: PROC_UNLOCK(p); tdsignal(t, NULL, SIGCHLD, p->p_ksi); wakeup(t); + cv_broadcast(&p->p_pwait); PROC_UNLOCK(t); sx_xunlock(&proctree_lock); return (0); Modified: stable/7/sys/kern/kern_fork.c ============================================================================== --- stable/7/sys/kern/kern_fork.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/kern/kern_fork.c Wed Jun 10 12:07:52 2009 (r193906) @@ -744,7 +744,7 @@ again: */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(p1, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); /* Modified: stable/7/sys/kern/kern_proc.c ============================================================================== --- stable/7/sys/kern/kern_proc.c Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/kern/kern_proc.c Wed Jun 10 12:07:52 2009 (r193906) @@ -231,6 +231,7 @@ proc_init(void *mem, int size, int flags bzero(&p->p_mtx, sizeof(struct mtx)); mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_RECURSE); + cv_init(&p->p_pwait, "ppwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ EVENTHANDLER_INVOKE(process_init, p); p->p_stats = pstats_alloc(); Modified: stable/7/sys/sys/proc.h ============================================================================== --- stable/7/sys/sys/proc.h Wed Jun 10 12:03:55 2009 (r193905) +++ stable/7/sys/sys/proc.h Wed Jun 10 12:07:52 2009 (r193906) @@ -40,6 +40,7 @@ #include /* For struct callout. */ #include /* For struct klist. */ +#include #ifndef _KERNEL #include #endif @@ -598,6 +599,7 @@ struct proc { STAILQ_HEAD(, ktr_request) p_ktr; /* (o) KTR event queue. */ LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */ + struct cv p_pwait; /* (*) wait cv for exit/exec */ }; #define p_session p_pgrp->pg_session From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 12:51:58 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAD8A106566C; Wed, 10 Jun 2009 12:51:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8FFE8FC22; Wed, 10 Jun 2009 12:51:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ACpwJY013613; Wed, 10 Jun 2009 12:51:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ACpw9d013611; Wed, 10 Jun 2009 12:51:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101251.n5ACpw9d013611@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 12:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193910 - stable/7/lib/libkse X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 12:51:59 -0000 Author: des Date: Wed Jun 10 12:51:58 2009 New Revision: 193910 URL: http://svn.freebsd.org/changeset/base/193910 Log: merge r176055, r176056: use libc's version definition file. Modified: stable/7/lib/libkse/ (props changed) stable/7/lib/libkse/Makefile stable/7/lib/libkse/kse.map Modified: stable/7/lib/libkse/Makefile ============================================================================== --- stable/7/lib/libkse/Makefile Wed Jun 10 12:47:54 2009 (r193909) +++ stable/7/lib/libkse/Makefile Wed Jun 10 12:51:58 2009 (r193910) @@ -41,7 +41,8 @@ WARNS?=3 # Enable extra internal consistancy checks. CFLAGS+=-D_PTHREADS_INVARIANTS -Wall -VERSION_MAP=${.CURDIR}/kse.map +VERSION_DEF=${.CURDIR}/../libc/Versions.def +SYMBOL_MAPS=${.CURDIR}/kse.map PRECIOUSLIB= Modified: stable/7/lib/libkse/kse.map ============================================================================== --- stable/7/lib/libkse/kse.map Wed Jun 10 12:47:54 2009 (r193909) +++ stable/7/lib/libkse/kse.map Wed Jun 10 12:51:58 2009 (r193910) @@ -4,7 +4,6 @@ * Use the same naming scheme as libc. */ FBSD_1.0 { -global: __error; accept; aio_suspend; @@ -158,8 +157,6 @@ global: waitpid; write; writev; -local: - *; }; /* @@ -167,7 +164,6 @@ local: * These are not part of our application ABI. */ FBSDprivate_1.0 { -global: ___creat; __accept; __close; @@ -363,7 +359,4 @@ global: _thread_size_key; _thread_state_running; _thread_state_zoombie; - -local: - *; }; From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 12:54:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7CAD106568B; Wed, 10 Jun 2009 12:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB6498FC12; Wed, 10 Jun 2009 12:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ACsaIJ013730; Wed, 10 Jun 2009 12:54:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ACsaZT013728; Wed, 10 Jun 2009 12:54:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101254.n5ACsaZT013728@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 12:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193911 - in stable/7/lib/libkse: . thread X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 12:54:37 -0000 Author: des Date: Wed Jun 10 12:54:36 2009 New Revision: 193911 URL: http://svn.freebsd.org/changeset/base/193911 Log: merge r176060, r176071: add pthread_mutex_isowned_np() (already in libthr) Modified: stable/7/lib/libkse/ (props changed) stable/7/lib/libkse/kse.map stable/7/lib/libkse/thread/thr_mutex.c Modified: stable/7/lib/libkse/kse.map ============================================================================== --- stable/7/lib/libkse/kse.map Wed Jun 10 12:51:58 2009 (r193910) +++ stable/7/lib/libkse/kse.map Wed Jun 10 12:54:36 2009 (r193911) @@ -256,6 +256,7 @@ FBSDprivate_1.0 { _pthread_mutex_getprioceiling; _pthread_mutex_init; _pthread_mutex_init_calloc_cb; + _pthread_mutex_isowned_np; _pthread_mutex_lock; _pthread_mutex_setprioceiling; _pthread_mutex_timedlock; @@ -360,3 +361,7 @@ FBSDprivate_1.0 { _thread_state_running; _thread_state_zoombie; }; + +FBSD_1.1 { + pthread_mutex_isowned_np; +}; Modified: stable/7/lib/libkse/thread/thr_mutex.c ============================================================================== --- stable/7/lib/libkse/thread/thr_mutex.c Wed Jun 10 12:51:58 2009 (r193910) +++ stable/7/lib/libkse/thread/thr_mutex.c Wed Jun 10 12:54:36 2009 (r193911) @@ -36,6 +36,7 @@ #include #include #include +#include #include "un-namespace.h" #include "thr_private.h" @@ -127,6 +128,7 @@ __weak_reference(__pthread_mutex_trylock /* No difference between libc and application usage of these: */ __weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy); __weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock); +__weak_reference(_pthread_mutex_isowned_np, pthread_mutex_isowned_np); static int thr_mutex_init(pthread_mutex_t *mutex, @@ -1866,3 +1868,12 @@ mutex_queue_enq(pthread_mutex_t mutex, p } pthread->sflags |= THR_FLAGS_IN_SYNCQ; } + +int +_pthread_mutex_isowned_np(pthread_mutex_t *mutex) +{ + struct pthread *curthread = _get_curthread(); + + return ((*mutex)->m_owner == curthread); +} + From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 13:04:08 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C698106566B; Wed, 10 Jun 2009 13:04:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A6C28FC0C; Wed, 10 Jun 2009 13:04:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AD479H013988; Wed, 10 Jun 2009 13:04:07 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AD47T1013987; Wed, 10 Jun 2009 13:04:07 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101304.n5AD47T1013987@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 13:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193912 - stable/7/sbin/clri X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 13:04:08 -0000 Author: des Date: Wed Jun 10 13:04:07 2009 New Revision: 193912 URL: http://svn.freebsd.org/changeset/base/193912 Log: merge r173764: fix aliasing violations. Modified: stable/7/sbin/clri/ (props changed) stable/7/sbin/clri/clri.c Modified: stable/7/sbin/clri/clri.c ============================================================================== --- stable/7/sbin/clri/clri.c Wed Jun 10 12:54:36 2009 (r193911) +++ stable/7/sbin/clri/clri.c Wed Jun 10 13:04:07 2009 (r193912) @@ -81,6 +81,7 @@ main(int argc, char *argv[]) off_t offset; int i, fd, inonum; char *fs, sblock[SBLOCKSIZE]; + void *v = ibuf; if (argc < 3) usage(); @@ -128,7 +129,7 @@ main(int argc, char *argv[]) if (sbp->fs_magic == FS_UFS2_MAGIC) { /* get the inode within the block. */ - dp2 = &(((struct ufs2_dinode *)ibuf) + dp2 = &(((struct ufs2_dinode *)v) [ino_to_fsbo(sbp, inonum)]); /* clear the inode, and bump the generation count. */ @@ -137,7 +138,7 @@ main(int argc, char *argv[]) dp2->di_gen = generation; } else { /* get the inode within the block. */ - dp1 = &(((struct ufs1_dinode *)ibuf) + dp1 = &(((struct ufs1_dinode *)v) [ino_to_fsbo(sbp, inonum)]); /* clear the inode, and bump the generation count. */ From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 13:41:41 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B295106567C; Wed, 10 Jun 2009 13:41:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08C588FC2E; Wed, 10 Jun 2009 13:41:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ADfeRO014889; Wed, 10 Jun 2009 13:41:40 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ADfeFG014888; Wed, 10 Jun 2009 13:41:40 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101341.n5ADfeFG014888@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 13:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193914 - in stable/7/sbin/ipf: . ipftest X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 13:41:41 -0000 Author: des Date: Wed Jun 10 13:41:40 2009 New Revision: 193914 URL: http://svn.freebsd.org/changeset/base/193914 Log: merge r173722: lower WARNS; we can't easily fix the (contrib) code. Modified: stable/7/sbin/ipf/ (props changed) stable/7/sbin/ipf/ipftest/Makefile Modified: stable/7/sbin/ipf/ipftest/Makefile ============================================================================== --- stable/7/sbin/ipf/ipftest/Makefile Wed Jun 10 13:39:51 2009 (r193913) +++ stable/7/sbin/ipf/ipftest/Makefile Wed Jun 10 13:41:40 2009 (r193914) @@ -1,5 +1,7 @@ # $FreeBSD$ +WARNS=0 + PROG= ipftest SRCS= ${GENHDRS} ipftest.c fil.c ip_frag.c ip_state.c ip_nat.c \ ip_proxy.c ip_auth.c ip_htable.c ip_lookup.c \ From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 13:44:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6A4F1065673; Wed, 10 Jun 2009 13:44:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99F4A8FC2C; Wed, 10 Jun 2009 13:44:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ADinDi014997; Wed, 10 Jun 2009 13:44:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ADinwf014996; Wed, 10 Jun 2009 13:44:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906101344.n5ADinwf014996@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Jun 2009 13:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193915 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 13:44:51 -0000 Author: jhb Date: Wed Jun 10 13:44:49 2009 New Revision: 193915 URL: http://svn.freebsd.org/changeset/base/193915 Log: Remove the mergeinfo from sys/dev/cxgb. The relevant merge history should be adequately reflected in the mergeinfo in sys/ at this point. Modified: stable/7/sys/dev/cxgb/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 13:57:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D008106564A; Wed, 10 Jun 2009 13:57:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E9FE28FC08; Wed, 10 Jun 2009 13:57:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 99E8A46B45; Wed, 10 Jun 2009 09:57:02 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7AFFA8A06E; Wed, 10 Jun 2009 09:57:01 -0400 (EDT) From: John Baldwin To: Bruce Simpson Date: Wed, 10 Jun 2009 09:54:19 -0400 User-Agent: KMail/1.9.7 References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <200906090946.46103.jhb@freebsd.org> <4A2F7159.3090800@incunabulum.net> In-Reply-To: <4A2F7159.3090800@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906100954.20026.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 10 Jun 2009 09:57:01 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 13:57:04 -0000 On Wednesday 10 June 2009 4:39:53 am Bruce Simpson wrote: > John Baldwin wrote: > > http://www.FreeBSD.org/~jhb/patches/ata_ali.patch > > Ok, I've uploaded the patch, I must have just sent it inline before. > > > > Thanks! > > I did a p4 integ on my p4 work branch, built a NanoBSD USB stick image > with this patch incorporated into the kernel, booted from it > successfully on the affected machine, and got this panic just after the > WITNESS warning. > > Had to transcribe by hand, no debugging symbols at the moment. > > Fatal trap 12: page fault while in kernel mode > cpuid = 0 apic id = 00 > fault virtual address = 0x0 > fault code = supervisor read, page not present > instruction pointer = 0x20:0x0 > stack pointer = 0x28:0xc4adbb68 > frame pointer = 0x28:0xc4adbb9c > code segment = base 0x0, limit 0xfffff, type 0x1b > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 4 (g_down) > [thread pid 4 tid 100008] > Stopped at 0: error reading from address 0 > > ata_begin_transaction+0x18a > ata_start+0x1db > ata_queue_request+0x4a0 > ad_strategy+0x28f > g_disk_start+0x16a > g_io_schedule_down+0x281 > g_down_procbody+0x8d > fork_exit+0xb8 > fork_trampoline+0x8 > > Looks like some sort of switch table, call %*edx, just after > ata_pio_write() in that function. I'll try to grab line number info on > next boot from NanoBSD build tree. On an i386 8.0 kernel built here it is this line: 139 if ((error = ch->dma.load(request, NULL, &dummy))) { which would seem to indicate dma.load is NULL somehow. My patch doesn't affect that part of the code at all. Are you using any modules or is ata compiled into your kernel? Given that the resource stuff worked and that it worked on 7, I think I will commit it for now (and start the MFC timer) and assume this is a separate bug. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 13:59:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5426210656BD; Wed, 10 Jun 2009 13:59:06 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41EAE8FC21; Wed, 10 Jun 2009 13:59:06 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ADx6cK015533; Wed, 10 Jun 2009 13:59:06 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ADx6vp015531; Wed, 10 Jun 2009 13:59:06 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200906101359.n5ADx6vp015531@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 10 Jun 2009 13:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193920 - stable/7/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 13:59:07 -0000 Author: lulf Date: Wed Jun 10 13:59:05 2009 New Revision: 193920 URL: http://svn.freebsd.org/changeset/base/193920 Log: MFC r193059: - Use sig_atomic_t for signal handler variables. MFC r193325: - Use volatile for signal variables. MFC r193372: Correct comment. Modified: stable/7/sbin/fsck_ffs/ (props changed) stable/7/sbin/fsck_ffs/fsck.h stable/7/sbin/fsck_ffs/gjournal.c Modified: stable/7/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/7/sbin/fsck_ffs/fsck.h Wed Jun 10 13:57:36 2009 (r193919) +++ stable/7/sbin/fsck_ffs/fsck.h Wed Jun 10 13:59:05 2009 (r193920) @@ -297,8 +297,8 @@ int lfmode; /* lost & found directory ufs2_daddr_t n_blks; /* number of blocks in use */ ino_t n_files; /* number of files in use */ -int got_siginfo; /* received a SIGINFO */ -int got_sigalarm; /* received a SIGALRM */ +volatile sig_atomic_t got_siginfo; /* received a SIGINFO */ +volatile sig_atomic_t got_sigalarm; /* received a SIGALRM */ #define clearinode(dp) \ if (sblock.fs_magic == FS_UFS1_MAGIC) { \ Modified: stable/7/sbin/fsck_ffs/gjournal.c ============================================================================== --- stable/7/sbin/fsck_ffs/gjournal.c Wed Jun 10 13:57:36 2009 (r193919) +++ stable/7/sbin/fsck_ffs/gjournal.c Wed Jun 10 13:59:05 2009 (r193920) @@ -672,7 +672,7 @@ gjournal_check(const char *filesys) devnam = filesys; getdisk(); - /* Are there any unreferenced inodes in this cylinder group? */ + /* Are there any unreferenced inodes in this file system? */ if (fs->fs_unrefs == 0) { //printf("No unreferenced inodes.\n"); closedisk(); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 14:01:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DA6C1065675; Wed, 10 Jun 2009 14:01:23 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBBE8FC1A; Wed, 10 Jun 2009 14:01:23 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AE1NnN015685; Wed, 10 Jun 2009 14:01:23 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AE1N6v015684; Wed, 10 Jun 2009 14:01:23 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200906101401.n5AE1N6v015684@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 10 Jun 2009 14:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193921 - stable/7/contrib/csup X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 14:01:24 -0000 Author: lulf Date: Wed Jun 10 14:01:23 2009 New Revision: 193921 URL: http://svn.freebsd.org/changeset/base/193921 Log: MFC r193213: - Add missing data argument to printf. Modified: stable/7/contrib/csup/ (props changed) stable/7/contrib/csup/updater.c Modified: stable/7/contrib/csup/updater.c ============================================================================== --- stable/7/contrib/csup/updater.c Wed Jun 10 13:59:05 2009 (r193920) +++ stable/7/contrib/csup/updater.c Wed Jun 10 14:01:23 2009 (r193921) @@ -1858,7 +1858,7 @@ updater_append_file(struct updater *up, goto bad; } if (nread == -1) { - xasprintf(&up->errmsg, "%s: Error reading: %s", + xasprintf(&up->errmsg, "%s: Error reading: %s", fup->destpath, strerror(errno)); return (UPDATER_ERR_MSG); } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 14:38:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0AAE106566B; Wed, 10 Jun 2009 14:38:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE0BA8FC22; Wed, 10 Jun 2009 14:38:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AEcdHv016687; Wed, 10 Jun 2009 14:38:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AEcdK8016686; Wed, 10 Jun 2009 14:38:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101438.n5AEcdK8016686@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 14:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193927 - in stable/7/usr.bin/tip: . tip X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 14:38:41 -0000 Author: des Date: Wed Jun 10 14:38:39 2009 New Revision: 193927 URL: http://svn.freebsd.org/changeset/base/193927 Log: merge r173716: lower WARNS to avoid spurious "variable might be clobbered by longjmp" warnings. Modified: stable/7/usr.bin/tip/ (props changed) stable/7/usr.bin/tip/tip/Makefile Modified: stable/7/usr.bin/tip/tip/Makefile ============================================================================== --- stable/7/usr.bin/tip/tip/Makefile Wed Jun 10 14:36:59 2009 (r193926) +++ stable/7/usr.bin/tip/tip/Makefile Wed Jun 10 14:38:39 2009 (r193927) @@ -36,7 +36,7 @@ LINKS= ${BINDIR}/tip ${BINDIR}/cu MAN= tip.1 cu.1 CFLAGS+=-I${.CURDIR} -DDEFBR=9600 -DDEFFS=BUFSIZ -DACULOG -DPRISTINE \ -DCONNECT -DV831 -DVENTEL -DHAYES -DCOURIER -DT3000 -WARNS?= 3 +WARNS?= 2 .PATH: ${.CURDIR}/../libacu SRCS= acu.c acutab.c cmds.c cmdtab.c cu.c hunt.c log.c partab.c \ remote.c tip.c tipout.c uucplock.c value.c vars.c \ From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 14:52:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7491F1065670; Wed, 10 Jun 2009 14:52:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47C028FC14; Wed, 10 Jun 2009 14:52:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AEqZSj017008; Wed, 10 Jun 2009 14:52:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AEqZwV017005; Wed, 10 Jun 2009 14:52:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101452.n5AEqZwV017005@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 14:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193928 - stable/7/lib/libutil X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 14:52:36 -0000 Author: des Date: Wed Jun 10 14:52:34 2009 New Revision: 193928 URL: http://svn.freebsd.org/changeset/base/193928 Log: merge r173719: constify expand_number(3). Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/expand_number.3 stable/7/lib/libutil/expand_number.c stable/7/lib/libutil/libutil.h Modified: stable/7/lib/libutil/expand_number.3 ============================================================================== --- stable/7/lib/libutil/expand_number.3 Wed Jun 10 14:38:39 2009 (r193927) +++ stable/7/lib/libutil/expand_number.3 Wed Jun 10 14:52:34 2009 (r193928) @@ -37,7 +37,7 @@ .In libutil.h .Ft int .Fo expand_number -.Fa "char *buf" "int64_t *num" +.Fa "const char *buf" "int64_t *num" .Fc .Sh DESCRIPTION The Modified: stable/7/lib/libutil/expand_number.c ============================================================================== --- stable/7/lib/libutil/expand_number.c Wed Jun 10 14:38:39 2009 (r193927) +++ stable/7/lib/libutil/expand_number.c Wed Jun 10 14:52:34 2009 (r193928) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60). */ int -expand_number(char *buf, int64_t *num) +expand_number(const char *buf, int64_t *num) { static const char unit[] = "bkmgtpe"; char *endptr, s; Modified: stable/7/lib/libutil/libutil.h ============================================================================== --- stable/7/lib/libutil/libutil.h Wed Jun 10 14:38:39 2009 (r193927) +++ stable/7/lib/libutil/libutil.h Wed Jun 10 14:52:34 2009 (r193928) @@ -84,7 +84,7 @@ int forkpty(int *_amaster, char *_name, struct termios *_termp, struct winsize *_winp); int humanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); -int expand_number(char *_buf, int64_t *_num); +int expand_number(const char *_buf, int64_t *_num); const char *uu_lockerr(int _uu_lockresult); int uu_lock(const char *_ttyname); int uu_unlock(const char *_ttyname); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 17:29:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 290E3106564A; Wed, 10 Jun 2009 17:29:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1611D8FC17; Wed, 10 Jun 2009 17:29:14 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AHTDIb020531; Wed, 10 Jun 2009 17:29:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AHTDx8020530; Wed, 10 Jun 2009 17:29:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101729.n5AHTDx8020530@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 17:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193932 - stable/7/usr.sbin/acpi/acpidb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 17:29:14 -0000 Author: des Date: Wed Jun 10 17:29:13 2009 New Revision: 193932 URL: http://svn.freebsd.org/changeset/base/193932 Log: Lower WARNS due to aliasing violations in contrib code. Modified: stable/7/usr.sbin/acpi/acpidb/Makefile Modified: stable/7/usr.sbin/acpi/acpidb/Makefile ============================================================================== --- stable/7/usr.sbin/acpi/acpidb/Makefile Wed Jun 10 16:17:38 2009 (r193931) +++ stable/7/usr.sbin/acpi/acpidb/Makefile Wed Jun 10 17:29:13 2009 (r193932) @@ -56,7 +56,7 @@ SRCS+= utalloc.c utcache.c utcopy.c utde utxface.c MAN= acpidb.8 -WARNS?= 2 +WARNS?= 1 CFLAGS+= -DACPI_EXEC_APP From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 17:30:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471971065674; Wed, 10 Jun 2009 17:30:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 342CD8FC14; Wed, 10 Jun 2009 17:30:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AHUDw0020610; Wed, 10 Jun 2009 17:30:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AHUDhO020609; Wed, 10 Jun 2009 17:30:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906101730.n5AHUDhO020609@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 10 Jun 2009 17:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193933 - in stable/7/usr.sbin/acpi: . acpidump X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 17:30:14 -0000 Author: des Date: Wed Jun 10 17:30:12 2009 New Revision: 193933 URL: http://svn.freebsd.org/changeset/base/193933 Log: merge r173723, r173726: fix an execl() call. Modified: stable/7/usr.sbin/acpi/ (props changed) stable/7/usr.sbin/acpi/acpidump/acpi.c Modified: stable/7/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- stable/7/usr.sbin/acpi/acpidump/acpi.c Wed Jun 10 17:29:13 2009 (r193932) +++ stable/7/usr.sbin/acpi/acpidump/acpi.c Wed Jun 10 17:30:12 2009 (r193933) @@ -821,7 +821,7 @@ aml_disassemble(struct ACPIsdt *rsdt, st close(STDOUT_FILENO); if (vflag == 0) close(STDERR_FILENO); - execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, 0); + execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, (char *) 0); err(1, "exec"); } From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 19:21:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C2CA106564A; Wed, 10 Jun 2009 19:21:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7879A8FC13; Wed, 10 Jun 2009 19:21:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AJLN2v023481; Wed, 10 Jun 2009 19:21:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AJLNDe023477; Wed, 10 Jun 2009 19:21:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200906101921.n5AJLNDe023477@svn.freebsd.org> From: Warner Losh Date: Wed, 10 Jun 2009 19:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193945 - stable/7/sys/dev/cardbus X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 19:21:24 -0000 Author: imp Date: Wed Jun 10 19:21:23 2009 New Revision: 193945 URL: http://svn.freebsd.org/changeset/base/193945 Log: MFC: r188216 | wkoszek | 2009-02-05 17:55:19 -0700 (Thu, 05 Feb 2009) | 5 lines r185545 | imp | 2008-12-01 21:54:31 -0700 (Mon, 01 Dec 2008) | 2 lines r185140 | imp | 2008-11-20 20:03:57 -0700 (Thu, 20 Nov 2008) | 4 lines r185015 | imp | 2008-11-16 18:32:29 -0700 (Sun, 16 Nov 2008) | 8 lines r184981 | imp | 2008-11-14 22:22:06 -0700 (Fri, 14 Nov 2008) | 5 lines These commits move all the parsing of the CIS to where the card is detected, rather than when the open call for the device happens. This means that we can now reliably get this info from cards. Atheros network cards in conjunction with the HAL were a primary motivator for this fix, although other applications benefit. Modified: stable/7/sys/dev/cardbus/cardbus.c stable/7/sys/dev/cardbus/cardbus_cis.c stable/7/sys/dev/cardbus/cardbus_device.c stable/7/sys/dev/cardbus/cardbusvar.h Modified: stable/7/sys/dev/cardbus/cardbus.c ============================================================================== --- stable/7/sys/dev/cardbus/cardbus.c Wed Jun 10 19:03:23 2009 (r193944) +++ stable/7/sys/dev/cardbus/cardbus.c Wed Jun 10 19:21:23 2009 (r193945) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 M. Warner Losh. All Rights Reserved. + * Copyright (c) 2003-2008 M. Warner Losh. All Rights Reserved. * Copyright (c) 2000,2001 Jonathan Chen. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,20 +99,18 @@ cardbus_probe(device_t cbdev) static int cardbus_attach(device_t cbdev) { - struct cardbus_softc *sc = device_get_softc(cbdev); + struct cardbus_softc *sc; + sc = device_get_softc(cbdev); sc->sc_dev = cbdev; - cardbus_device_create(sc); return (0); } static int cardbus_detach(device_t cbdev) { - struct cardbus_softc *sc = device_get_softc(cbdev); cardbus_detach_card(cbdev); - cardbus_device_destroy(sc); return (0); } @@ -165,7 +163,9 @@ cardbus_attach_card(device_t cbdev) int bus, domain, slot, func; int cardattached = 0; int cardbusfunchigh = 0; + struct cardbus_softc *sc; + sc = device_get_softc(cbdev); cardbus_detach_card(cbdev); /* detach existing cards */ POWER_ENABLE_SOCKET(brdev, cbdev); domain = pcib_get_domain(cbdev); @@ -192,6 +192,7 @@ cardbus_attach_card(device_t cbdev) dinfo->pci.cfg.dev = child; resource_list_init(&dinfo->pci.resources); device_set_ivars(child, dinfo); + cardbus_device_create(sc, dinfo, cbdev, child); if (cardbus_do_cis(cbdev, child) != 0) DEVPRINTF((cbdev, "Warning: Bogus CIS ignored\n")); pci_cfg_save(dinfo->pci.cfg.dev, &dinfo->pci, 0); @@ -235,6 +236,7 @@ cardbus_detach_card(device_t cbdev) if (status == DS_ATTACHED || status == DS_BUSY) device_detach(devlist[tmp]); cardbus_release_all_resources(cbdev, dinfo); + cardbus_device_destroy(dinfo); device_delete_child(cbdev, devlist[tmp]); pci_freecfg((struct pci_devinfo *)dinfo); } Modified: stable/7/sys/dev/cardbus/cardbus_cis.c ============================================================================== --- stable/7/sys/dev/cardbus/cardbus_cis.c Wed Jun 10 19:03:23 2009 (r193944) +++ stable/7/sys/dev/cardbus/cardbus_cis.c Wed Jun 10 19:21:23 2009 (r193945) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2005-2008, M. Warner Losh * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * @@ -318,29 +319,27 @@ decode_tuple_bar(device_t cbdev, device_ if (type == SYS_RES_MEMORY) { if (reg & TPL_BAR_REG_PREFETCHABLE) dinfo->mprefetchable |= (1 << PCI_RID2BAR(bar)); -#if 0 /* - * XXX: It appears from a careful reading of the spec - * that we're not supposed to honor this when the bridge - * is not on the main system bus. PCI spec doesn't appear - * to allow for memory ranges not listed in the bridge's - * decode range to be decoded. The PC Card spec seems to - * indicate that this should only be done on x86 based - * machines, which seems to imply that on non-x86 machines - * the adddresses can be anywhere. This further implies that - * since the hardware can do it on non-x86 machines, it should - * be able to do it on x86 machines. Therefore, we can and - * should ignore this hint. Furthermore, the PC Card spec - * recommends always allocating memory above 1MB, contradicting - * the other part of the PC Card spec. + * The PC Card spec says we're only supposed to honor this + * hint when the cardbus bridge is a child of pci0 (the main + * bus). The PC Card spec seems to indicate that this should + * only be done on x86 based machines, which suggests that on + * non-x86 machines the adddresses can be anywhere. Since the + * hardware can do it on non-x86 machines, it should be able + * to do it on x86 machines too. Therefore, we can and should + * ignore this hint. Furthermore, the PC Card spec recommends + * always allocating memory above 1MB, contradicting the other + * part of the PC Card spec, it seems. We make note of it, + * but otherwise don't use this information. * - * NetBSD ignores this bit, but it also ignores the - * prefetchable bit too, so that's not an indication of - * correctness. + * Some Realtek cards have this set in their CIS, but fail + * to actually work when mapped this way, and experience + * has shown ignoring this big to be a wise choice. + * + * XXX We should cite chapter and verse for standard refs. */ if (reg & TPL_BAR_REG_BELOW1MB) dinfo->mbelow1mb |= (1 << PCI_RID2BAR(bar)); -#endif } return (0); Modified: stable/7/sys/dev/cardbus/cardbus_device.c ============================================================================== --- stable/7/sys/dev/cardbus/cardbus_device.c Wed Jun 10 19:03:23 2009 (r193944) +++ stable/7/sys/dev/cardbus/cardbus_device.c Wed Jun 10 19:21:23 2009 (r193945) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005, M. Warner Losh + * Copyright (c) 2005-2008, M. Warner Losh * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,26 +63,6 @@ static struct cdevsw cardbus_cdevsw = { .d_name = "cardbus" }; -int -cardbus_device_create(struct cardbus_softc *sc) -{ - uint32_t minor; - - minor = device_get_unit(sc->sc_dev) << 16; - sc->sc_cisdev = make_dev(&cardbus_cdevsw, minor, 0, 0, 0666, - "cardbus%u.cis", device_get_unit(sc->sc_dev)); - sc->sc_cisdev->si_drv1 = sc; - return (0); -} - -int -cardbus_device_destroy(struct cardbus_softc *sc) -{ - if (sc->sc_cisdev) - destroy_dev(sc->sc_cisdev); - return (0); -} - static int cardbus_build_cis(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, @@ -96,13 +76,17 @@ cardbus_build_cis(device_t cbdev, device * CISTPL_END is a special case, it has no length field. */ if (id == CISTPL_END) { - if (cis->len + 1 > sizeof(cis->buffer)) + if (cis->len + 1 > sizeof(cis->buffer)) { + cis->len = 0; return (ENOSPC); + } cis->buffer[cis->len++] = id; return (0); } - if (cis->len + 2 + len > sizeof(cis->buffer)) + if (cis->len + 2 + len > sizeof(cis->buffer)) { + cis->len = 0; return (ENOSPC); + } cis->buffer[cis->len++] = id; cis->buffer[cis->len++] = len; for (i = 0; i < len; i++) @@ -110,52 +94,54 @@ cardbus_build_cis(device_t cbdev, device return (0); } -static int -cardbus_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +static int +cardbus_device_buffer_cis(device_t parent, device_t child, + struct cis_buffer *cbp) { - device_t parent, child; - device_t *kids; - int cnt, err; - struct cardbus_softc *sc; struct tuple_callbacks cb[] = { {CISTPL_GENERIC, "GENERIC", cardbus_build_cis} }; - sc = dev->si_drv1; - if (sc->sc_cis_open) - return (EBUSY); - parent = sc->sc_dev; - err = device_get_children(parent, &kids, &cnt); - if (err) - return err; - if (cnt == 0) { - free(kids, M_TEMP); - sc->sc_cis_open++; - sc->sc_cis = NULL; - return (0); - } - child = kids[0]; - free(kids, M_TEMP); - sc->sc_cis = malloc(sizeof(*sc->sc_cis), M_TEMP, M_ZERO | M_WAITOK); - err = cardbus_parse_cis(parent, child, cb, sc->sc_cis); - if (err) { - free(sc->sc_cis, M_TEMP); - sc->sc_cis = NULL; - return (err); - } - sc->sc_cis_open++; + return (cardbus_parse_cis(parent, child, cb, cbp)); +} + +int +cardbus_device_create(struct cardbus_softc *sc, struct cardbus_devinfo *devi, + device_t parent, device_t child) +{ + uint32_t minor; + int unit; + + cardbus_device_buffer_cis(parent, child, &devi->sc_cis); + minor = (device_get_unit(sc->sc_dev) << 8) + devi->pci.cfg.func; + unit = device_get_unit(sc->sc_dev); + devi->sc_cisdev = make_dev(&cardbus_cdevsw, minor, 0, 0, 0666, + "cardbus%d.%d.cis", unit, devi->pci.cfg.func); + if (devi->pci.cfg.func == 0) + make_dev_alias(devi->sc_cisdev, "cardbus%d.cis", unit); + devi->sc_cisdev->si_drv1 = devi; + return (0); +} + +int +cardbus_device_destroy(struct cardbus_devinfo *devi) +{ + if (devi->sc_cisdev) + destroy_dev(devi->sc_cisdev); + return (0); +} + +static int +cardbus_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + return (0); } static int cardbus_close(struct cdev *dev, int fflags, int devtype, struct thread *td) { - struct cardbus_softc *sc; - sc = dev->si_drv1; - free(sc->sc_cis, M_TEMP); - sc->sc_cis = NULL; - sc->sc_cis_open = 0; return (0); } @@ -169,12 +155,12 @@ cardbus_ioctl(struct cdev *dev, u_long c static int cardbus_read(struct cdev *dev, struct uio *uio, int ioflag) { - struct cardbus_softc *sc; + struct cardbus_devinfo *devi; - sc = dev->si_drv1; + devi = dev->si_drv1; /* EOF */ - if (sc->sc_cis == NULL || uio->uio_offset > sc->sc_cis->len) + if (uio->uio_offset >= devi->sc_cis.len) return (0); - return (uiomove(sc->sc_cis->buffer + uio->uio_offset, - MIN(uio->uio_resid, sc->sc_cis->len - uio->uio_offset), uio)); + return (uiomove(devi->sc_cis.buffer + uio->uio_offset, + MIN(uio->uio_resid, devi->sc_cis.len - uio->uio_offset), uio)); } Modified: stable/7/sys/dev/cardbus/cardbusvar.h ============================================================================== --- stable/7/sys/dev/cardbus/cardbusvar.h Wed Jun 10 19:03:23 2009 (r193944) +++ stable/7/sys/dev/cardbus/cardbusvar.h Wed Jun 10 19:21:23 2009 (r193945) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2008, M. Warner Losh * Copyright (c) 2000,2001 Jonathan Chen. * All rights reserved. * @@ -29,12 +30,26 @@ /* * Structure definitions for the Cardbus Bus driver */ + +/* + * Static copy of the CIS buffer. Technically, you aren't supposed + * to do this. In practice, however, it works well. + */ +struct cis_buffer +{ + size_t len; /* Actual length of the CIS */ + uint8_t buffer[2040]; /* small enough to be 2k */ +}; + +/* + * Per child information for the PCI device. Cardbus layers on some + * additional data. + */ struct cardbus_devinfo { struct pci_devinfo pci; uint8_t mprefetchable; /* bit mask of prefetchable BARs */ uint8_t mbelow1mb; /* bit mask of BARs which require below 1Mb */ - uint8_t ibelow1mb; /* bit mask of BARs which require below 1Mb */ uint16_t mfrid; /* manufacturer id */ uint16_t prodid; /* product id */ u_int funcid; /* function id */ @@ -44,36 +59,33 @@ struct cardbus_devinfo } lan; } funce; uint32_t fepresent; /* bit mask of funce values present */ + struct cdev *sc_cisdev; + struct cis_buffer sc_cis; }; -struct cis_buffer -{ - size_t len; /* Actual length of the CIS */ - uint8_t buffer[2040]; /* small enough to be 2k */ -}; - +/* + * Per cardbus soft info. Not sure why we even keep this around... + */ struct cardbus_softc { - /* XXX need mutex XXX */ device_t sc_dev; - struct cdev *sc_cisdev; - struct cis_buffer *sc_cis; - int sc_cis_open; }; +/* + * Per node callback structures. + */ struct tuple_callbacks; - typedef int (tuple_cb) (device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info, void *); - struct tuple_callbacks { int id; char *name; tuple_cb *func; }; -int cardbus_device_create(struct cardbus_softc *); -int cardbus_device_destroy(struct cardbus_softc *); +int cardbus_device_create(struct cardbus_softc *sc, + struct cardbus_devinfo *devi, device_t parent, device_t child); +int cardbus_device_destroy(struct cardbus_devinfo *devi); int cardbus_parse_cis(device_t cbdev, device_t child, struct tuple_callbacks *callbacks, void *); From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 19:25:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C55A1065670; Wed, 10 Jun 2009 19:25:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5036F8FC0A; Wed, 10 Jun 2009 19:25:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AJPL17023613; Wed, 10 Jun 2009 19:25:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AJPLSV023612; Wed, 10 Jun 2009 19:25:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200906101925.n5AJPLSV023612@svn.freebsd.org> From: Warner Losh Date: Wed, 10 Jun 2009 19:25:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193946 - in stable/7/sys: . contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 19:25:22 -0000 Author: imp Date: Wed Jun 10 19:25:21 2009 New Revision: 193946 URL: http://svn.freebsd.org/changeset/base/193946 Log: Commit merge info from my last commit. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 19:57:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90536106566C; Wed, 10 Jun 2009 19:57:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5968FC13; Wed, 10 Jun 2009 19:57:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5AJvsDq024290; Wed, 10 Jun 2009 19:57:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5AJvsGk024285; Wed, 10 Jun 2009 19:57:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906101957.n5AJvsGk024285@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Jun 2009 19:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193948 - in stable/7: include lib/libc lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 19:57:55 -0000 Author: jhb Date: Wed Jun 10 19:57:54 2009 New Revision: 193948 URL: http://svn.freebsd.org/changeset/base/193948 Log: MFC: Add a feature_present(3) function which checks to see if a named kernel feature is present by checking the kern.features sysctl MIB. Added: stable/7/lib/libc/gen/feature_present.3 - copied unchanged from r175220, head/lib/libc/gen/feature_present.3 stable/7/lib/libc/gen/feature_present.c - copied unchanged from r175220, head/lib/libc/gen/feature_present.c Modified: stable/7/include/ (props changed) stable/7/include/unistd.h stable/7/lib/libc/ (props changed) stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map Modified: stable/7/include/unistd.h ============================================================================== --- stable/7/include/unistd.h Wed Jun 10 19:25:46 2009 (r193947) +++ stable/7/include/unistd.h Wed Jun 10 19:57:54 2009 (r193948) @@ -480,6 +480,7 @@ int des_setkey(const char *key); void endusershell(void); int exect(const char *, char * const *, char * const *); int execvP(const char *, const char *, char * const *); +int feature_present(const char *); char *fflagstostr(u_long); int getdomainname(char *, int); int getgrouplist(const char *, gid_t, gid_t *, int *); Modified: stable/7/lib/libc/gen/Makefile.inc ============================================================================== --- stable/7/lib/libc/gen/Makefile.inc Wed Jun 10 19:25:46 2009 (r193947) +++ stable/7/lib/libc/gen/Makefile.inc Wed Jun 10 19:57:54 2009 (r193948) @@ -10,7 +10,7 @@ SRCS+= __getosreldate.c __xuname.c \ clock.c closedir.c confstr.c \ crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \ dlfcn.c dlfunc.c drand48.c erand48.c err.c errlst.c errno.c \ - exec.c fmtcheck.c fmtmsg.c fnmatch.c \ + exec.c feature_present.c fmtcheck.c fmtmsg.c fnmatch.c \ fpclassify.c frexp.c fstab.c ftok.c fts.c ftw.c \ getbootfile.c getbsize.c \ getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \ @@ -45,7 +45,8 @@ MAN+= alarm.3 arc4random.3 \ basename.3 check_utility_compat.3 clock.3 \ confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \ dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \ - err.3 exec.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \ + err.3 exec.3 \ + feature_present.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \ ftok.3 fts.3 ftw.3 \ getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \ getdiskbyname.3 getdomainname.3 getfsent.3 \ Modified: stable/7/lib/libc/gen/Symbol.map ============================================================================== --- stable/7/lib/libc/gen/Symbol.map Wed Jun 10 19:25:46 2009 (r193947) +++ stable/7/lib/libc/gen/Symbol.map Wed Jun 10 19:57:54 2009 (r193948) @@ -338,6 +338,7 @@ FBSD_1.0 { FBSD_1.1 { fdopendir; + feature_present; }; FBSDprivate_1.0 { Copied: stable/7/lib/libc/gen/feature_present.3 (from r175220, head/lib/libc/gen/feature_present.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libc/gen/feature_present.3 Wed Jun 10 19:57:54 2009 (r193948, copy of r175220, head/lib/libc/gen/feature_present.3) @@ -0,0 +1,72 @@ +.\" Copyright (c) 2008 Yahoo!, Inc. +.\" All rights reserved. +.\" Written by: John Baldwin +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the author nor the names of any co-contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 8, 2008 +.Dt feature_present 3 +.Os +.Sh NAME +.Nm feature_present +.Nd query presence of a kernel feature +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In unistd.h +.Ft int +.Fn feature_present "const char *feature" +.Sh DESCRIPTION +The +.Fn feature_present +function provides a method for an application to determine if a specific +kernel feature is present in the currently running kernel. +The +.Fa feature +argument specifies the name of the feature to check. +The +.Fn feature_present +function will return 1 if the specified feature is present, +otherwise it will return 0. +If the +.Fn feature_present +function is not able to determine the presence of +.Fa feature +due to an internal error it will return 0. +.Sh RETURN VALUES +If +.Fa feature +is present then 1 is returned; +otherwise 0 is returned. +.Sh SEE ALSO +.Xr sysconf 3 , +.Xr sysctl 3 +.Sh HISTORY +The +.Fn feature_present +function first appeared in +.Fx 8.0 . Copied: stable/7/lib/libc/gen/feature_present.c (from r175220, head/lib/libc/gen/feature_present.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libc/gen/feature_present.c Wed Jun 10 19:57:54 2009 (r193948, copy of r175220, head/lib/libc/gen/feature_present.c) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2008 Yahoo!, Inc. + * All rights reserved. + * Written by: John Baldwin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +/* + * Returns true if the named feature is present in the currently + * running kernel. A feature's presence is indicated by an integer + * sysctl node called kern.feature. that is non-zero. + */ +int +feature_present(const char *feature) +{ + char *mib; + size_t len; + int i; + + if (asprintf(&mib, "kern.features.%s", feature) < 0) + return (0); + len = sizeof(i); + if (sysctlbyname(mib, &i, &len, NULL, 0) < 0) { + free(mib); + return (0); + } + free(mib); + if (len != sizeof(i)) + return (0); + return (i != 0); +} From owner-svn-src-stable@FreeBSD.ORG Wed Jun 10 20:09:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00BBC1065676; Wed, 10 Jun 2009 20:09:11 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id BE04D8FC13; Wed, 10 Jun 2009 20:09:10 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 05B6F35F45A; Wed, 10 Jun 2009 16:09:10 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 10 Jun 2009 16:09:10 -0400 X-Sasl-enc: 8vSFQBYE95JjHYaP0pxRstcp/+gquFXzowzzxYBZfGdg 1244664549 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id CE4ABDD72; Wed, 10 Jun 2009 16:09:08 -0400 (EDT) Message-ID: <4A3012E3.7020305@incunabulum.net> Date: Wed, 10 Jun 2009 21:09:07 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (X11/20090412) MIME-Version: 1.0 To: John Baldwin References: <200905130255.n4D2tMQZ040010@svn.freebsd.org> <200906090946.46103.jhb@freebsd.org> <4A2F7159.3090800@incunabulum.net> <200906100954.20026.jhb@freebsd.org> In-Reply-To: <200906100954.20026.jhb@freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, Alexander Motin , src-committers@freebsd.org, Bruce Simpson , svn-src-all@freebsd.org Subject: Re: svn commit: r192033 - stable/7/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 20:09:14 -0000 John Baldwin wrote: > On an i386 8.0 kernel built here it is this line: > > 139 if ((error = ch->dma.load(request, NULL, &dummy))) { > > which would seem to indicate dma.load is NULL somehow. My patch doesn't > affect that part of the code at all. Are you using any modules or is ata > compiled into your kernel? Given that the resource stuff worked and that it > worked on 7, I think I will commit it for now (and start the MFC timer) and > assume this is a separate bug. > ATA was in kernel, no modules apart from acpi.ko were loaded. thanks, BMS From owner-svn-src-stable@FreeBSD.ORG Thu Jun 11 00:42:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 896A9106564A; Thu, 11 Jun 2009 00:42:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C33B8FC13; Thu, 11 Jun 2009 00:42:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5B0gsvh030631; Thu, 11 Jun 2009 00:42:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5B0grQb030623; Thu, 11 Jun 2009 00:42:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200906110042.n5B0grQb030623@svn.freebsd.org> From: Xin LI Date: Thu, 11 Jun 2009 00:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193965 - stable/7/usr.bin/truss X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 00:42:55 -0000 Author: delphij Date: Thu Jun 11 00:42:53 2009 New Revision: 193965 URL: http://svn.freebsd.org/changeset/base/193965 Log: MFC r192943: Correct off-by-one issue in truss(1) which happens when system call number is nsyscalls. (mips bits intentionally left off since it's not in 7-stable yet) Modified: stable/7/usr.bin/truss/ (props changed) stable/7/usr.bin/truss/amd64-fbsd.c stable/7/usr.bin/truss/amd64-fbsd32.c stable/7/usr.bin/truss/amd64-linux32.c stable/7/usr.bin/truss/i386-fbsd.c stable/7/usr.bin/truss/i386-linux.c stable/7/usr.bin/truss/ia64-fbsd.c stable/7/usr.bin/truss/powerpc-fbsd.c stable/7/usr.bin/truss/sparc64-fbsd.c Modified: stable/7/usr.bin/truss/amd64-fbsd.c ============================================================================== --- stable/7/usr.bin/truss/amd64-fbsd.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/amd64-fbsd.c Thu Jun 11 00:42:53 2009 (r193965) @@ -142,7 +142,7 @@ amd64_syscall_entry(struct trussinfo *tr fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } Modified: stable/7/usr.bin/truss/amd64-fbsd32.c ============================================================================== --- stable/7/usr.bin/truss/amd64-fbsd32.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/amd64-fbsd32.c Thu Jun 11 00:42:53 2009 (r193965) @@ -152,7 +152,7 @@ amd64_fbsd32_syscall_entry(struct trussi fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : freebsd32_syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); Modified: stable/7/usr.bin/truss/amd64-linux32.c ============================================================================== --- stable/7/usr.bin/truss/amd64-linux32.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/amd64-linux32.c Thu Jun 11 00:42:53 2009 (r193965) @@ -124,7 +124,7 @@ amd64_linux32_syscall_entry(struct truss fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : linux32_syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : linux32_syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } Modified: stable/7/usr.bin/truss/i386-fbsd.c ============================================================================== --- stable/7/usr.bin/truss/i386-fbsd.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/i386-fbsd.c Thu Jun 11 00:42:53 2009 (r193965) @@ -147,7 +147,7 @@ i386_syscall_entry(struct trussinfo *tru fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } Modified: stable/7/usr.bin/truss/i386-linux.c ============================================================================== --- stable/7/usr.bin/truss/i386-linux.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/i386-linux.c Thu Jun 11 00:42:53 2009 (r193965) @@ -124,7 +124,7 @@ i386_linux_syscall_entry(struct trussinf fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : linux_syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : linux_syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } Modified: stable/7/usr.bin/truss/ia64-fbsd.c ============================================================================== --- stable/7/usr.bin/truss/ia64-fbsd.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/ia64-fbsd.c Thu Jun 11 00:42:53 2009 (r193965) @@ -135,7 +135,7 @@ ia64_syscall_entry(struct trussinfo *tru syscall_num = (int)*parm_offset++; fsc.number = syscall_num; - fsc.name = (syscall_num < 0 || syscall_num > nsyscalls) + fsc.name = (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); Modified: stable/7/usr.bin/truss/powerpc-fbsd.c ============================================================================== --- stable/7/usr.bin/truss/powerpc-fbsd.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/powerpc-fbsd.c Thu Jun 11 00:42:53 2009 (r193965) @@ -149,7 +149,7 @@ powerpc_syscall_entry(struct trussinfo * fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } Modified: stable/7/usr.bin/truss/sparc64-fbsd.c ============================================================================== --- stable/7/usr.bin/truss/sparc64-fbsd.c Wed Jun 10 22:58:27 2009 (r193964) +++ stable/7/usr.bin/truss/sparc64-fbsd.c Thu Jun 11 00:42:53 2009 (r193965) @@ -145,7 +145,7 @@ sparc64_syscall_entry(struct trussinfo * fsc.number = syscall_num; fsc.name = - (syscall_num < 0 || syscall_num > nsyscalls) ? NULL : syscallnames[syscall_num]; + (syscall_num < 0 || syscall_num >= nsyscalls) ? NULL : syscallnames[syscall_num]; if (!fsc.name) { fprintf(trussinfo->outfile, "-- UNKNOWN SYSCALL %d --\n", syscall_num); } From owner-svn-src-stable@FreeBSD.ORG Thu Jun 11 07:40:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2988E1065670; Thu, 11 Jun 2009 07:40:22 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D79DF8FC18; Thu, 11 Jun 2009 07:40:21 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5B7eL8H039290; Thu, 11 Jun 2009 07:40:21 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5B7eLj5039289; Thu, 11 Jun 2009 07:40:21 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906110740.n5B7eLj5039289@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 11 Jun 2009 07:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193974 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 07:40:22 -0000 Author: edwin Date: Thu Jun 11 07:40:21 2009 New Revision: 193974 URL: http://svn.freebsd.org/changeset/base/193974 Log: MFC of tzdata2009i: Bangladesh will go into DST on 20 June. Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/asia Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Thu Jun 11 05:48:49 2009 (r193973) +++ stable/7/share/zoneinfo/asia Thu Jun 11 07:40:21 2009 (r193974) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.32
+# @(#)asia	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -127,6 +127,48 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 			3:00	-	AST
 
 # Bangladesh
+# From Alexander Krivenyshev (2009-05-13):
+# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce
+# Daylight Saving Time from June 16 to Sept 30
+#
+# Bangladesh to introduce daylight saving time likely from June 16
+# 
+# http://www.asiantribune.com/?q=node/17288
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html
+# 
+#
+# "... Bangladesh government has decided to switch daylight saving time from
+# June
+# 16 till September 30 in a bid to ensure maximum use of daylight to cope with
+# crippling power crisis. "
+#
+# The switch will remain in effect from June 16 to Sept 30 (2009) but if
+# implemented the next year, it will come in force from April 1, 2010
+
+# From Steffen Thorsen (2009-06-02):
+# They have finally decided now, but changed the start date to midnight between
+# the 19th and 20th, and they have not set the end date yet.
+#
+# Some sources:
+# 
+# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
+# 
+# 
+# http://bdnews24.com/details.php?id=85889&cid=2
+# 
+#
+# Our wrap-up:
+# 
+# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
+# 
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Bang	2009	only	-	Jan	1	0:00	0	-
+Rule	Bang	2009	only	-	Jun	20	0:00	1:00	S
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -134,7 +176,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	# Bangladesh Time
+			6:00	-	BDT	2009 # Bangladesh Time
+			6:00	Bang	BD%sT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 07:40:36 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DE7E1065670;
	Thu, 11 Jun 2009 07:40:36 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5B0478FC14;
	Thu, 11 Jun 2009 07:40:36 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5B7eaXA039328;
	Thu, 11 Jun 2009 07:40:36 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5B7eao3039327;
	Thu, 11 Jun 2009 07:40:36 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200906110740.n5B7eao3039327@svn.freebsd.org>
From: Edwin Groothuis 
Date: Thu, 11 Jun 2009 07:40:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r193975 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 07:40:37 -0000

Author: edwin
Date: Thu Jun 11 07:40:36 2009
New Revision: 193975
URL: http://svn.freebsd.org/changeset/base/193975

Log:
  MFC of tzdata2009i:
  
  Bangladesh will go into DST on 20 June.

Modified:
  stable/6/share/zoneinfo/   (props changed)
  stable/6/share/zoneinfo/asia

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Thu Jun 11 07:40:21 2009	(r193974)
+++ stable/6/share/zoneinfo/asia	Thu Jun 11 07:40:36 2009	(r193975)
@@ -1,5 +1,5 @@
 # 
-# @(#)asia	8.32
+# @(#)asia	8.34
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -127,6 +127,48 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 			3:00	-	AST
 
 # Bangladesh
+# From Alexander Krivenyshev (2009-05-13):
+# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce
+# Daylight Saving Time from June 16 to Sept 30
+#
+# Bangladesh to introduce daylight saving time likely from June 16
+# 
+# http://www.asiantribune.com/?q=node/17288
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html
+# 
+#
+# "... Bangladesh government has decided to switch daylight saving time from
+# June
+# 16 till September 30 in a bid to ensure maximum use of daylight to cope with
+# crippling power crisis. "
+#
+# The switch will remain in effect from June 16 to Sept 30 (2009) but if
+# implemented the next year, it will come in force from April 1, 2010
+
+# From Steffen Thorsen (2009-06-02):
+# They have finally decided now, but changed the start date to midnight between
+# the 19th and 20th, and they have not set the end date yet.
+#
+# Some sources:
+# 
+# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601
+# 
+# 
+# http://bdnews24.com/details.php?id=85889&cid=2
+# 
+#
+# Our wrap-up:
+# 
+# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
+# 
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Bang	2009	only	-	Jan	1	0:00	0	-
+Rule	Bang	2009	only	-	Jun	20	0:00	1:00	S
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -134,7 +176,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	# Bangladesh Time
+			6:00	-	BDT	2009 # Bangladesh Time
+			6:00	Bang	BD%sT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 07:52:35 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B9A52106566C;
	Thu, 11 Jun 2009 07:52:35 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 717AE8FC0C;
	Thu, 11 Jun 2009 07:52:35 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5B7qZ81039681;
	Thu, 11 Jun 2009 07:52:35 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5B7qZdH039679;
	Thu, 11 Jun 2009 07:52:35 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <200906110752.n5B7qZdH039679@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Thu, 11 Jun 2009 07:52:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r193977 - stable/7/usr.sbin/arp
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 07:52:36 -0000

Author: des
Date: Thu Jun 11 07:52:35 2009
New Revision: 193977
URL: http://svn.freebsd.org/changeset/base/193977

Log:
  merge r173716, r175206, r193976: silence warning, WARNS=6, prettify macro.

Modified:
  stable/7/usr.sbin/arp/   (props changed)
  stable/7/usr.sbin/arp/Makefile
  stable/7/usr.sbin/arp/arp.c

Modified: stable/7/usr.sbin/arp/Makefile
==============================================================================
--- stable/7/usr.sbin/arp/Makefile	Thu Jun 11 07:50:36 2009	(r193976)
+++ stable/7/usr.sbin/arp/Makefile	Thu Jun 11 07:52:35 2009	(r193977)
@@ -4,6 +4,6 @@
 PROG=	arp
 MAN=	arp.4 arp.8
 
-WARNS?=	3
+WARNS?=	6
 
 .include 

Modified: stable/7/usr.sbin/arp/arp.c
==============================================================================
--- stable/7/usr.sbin/arp/arp.c	Thu Jun 11 07:50:36 2009	(r193976)
+++ stable/7/usr.sbin/arp/arp.c	Thu Jun 11 07:52:35 2009	(r193977)
@@ -648,7 +648,7 @@ rtmsg(int cmd, struct sockaddr_inarp *ds
 	static int seq;
 	int rlen;
 	int l;
-	struct sockaddr_in so_mask;
+	struct sockaddr_in so_mask, *som = &so_mask;
 	static int s = -1;
 	static pid_t pid;
 
@@ -702,13 +702,17 @@ rtmsg(int cmd, struct sockaddr_inarp *ds
 	case RTM_GET:
 		rtm->rtm_addrs |= RTA_DST;
 	}
-#define NEXTADDR(w, s) \
-	if ((s) != NULL && rtm->rtm_addrs & (w)) { \
-		bcopy((s), cp, sizeof(*(s))); cp += SA_SIZE(s);}
+#define NEXTADDR(w, s)					   \
+	do {						   \
+		if ((s) != NULL && rtm->rtm_addrs & (w)) { \
+			bcopy((s), cp, sizeof(*(s)));	   \
+			cp += SA_SIZE(s);		   \
+		}					   \
+	} while (0)
 
 	NEXTADDR(RTA_DST, dst);
 	NEXTADDR(RTA_GATEWAY, sdl);
-	NEXTADDR(RTA_NETMASK, &so_mask);
+	NEXTADDR(RTA_NETMASK, som);
 
 	rtm->rtm_msglen = cp - (char *)&m_rtmsg;
 doit:

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 10:32:13 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 97DBE1065675;
	Thu, 11 Jun 2009 10:32:13 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 84F068FC19;
	Thu, 11 Jun 2009 10:32:13 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BAWDjD044518;
	Thu, 11 Jun 2009 10:32:13 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BAWDQ2044517;
	Thu, 11 Jun 2009 10:32:13 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <200906111032.n5BAWDQ2044517@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Thu, 11 Jun 2009 10:32:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r193985 - stable/7/usr.sbin/arp
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 10:32:14 -0000

Author: des
Date: Thu Jun 11 10:32:13 2009
New Revision: 193985
URL: http://svn.freebsd.org/changeset/base/193985

Log:
  merge r193984: lower WARNS due to alignment issues on sparc64.

Modified:
  stable/7/usr.sbin/arp/   (props changed)
  stable/7/usr.sbin/arp/Makefile

Modified: stable/7/usr.sbin/arp/Makefile
==============================================================================
--- stable/7/usr.sbin/arp/Makefile	Thu Jun 11 10:30:30 2009	(r193984)
+++ stable/7/usr.sbin/arp/Makefile	Thu Jun 11 10:32:13 2009	(r193985)
@@ -4,6 +4,6 @@
 PROG=	arp
 MAN=	arp.4 arp.8
 
-WARNS?=	6
+WARNS?=	3
 
 .include 

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 12:40:04 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A32BD1065687;
	Thu, 11 Jun 2009 12:40:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D6CF8FC20;
	Thu, 11 Jun 2009 12:40:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BCe40I047457;
	Thu, 11 Jun 2009 12:40:04 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BCe4cc047452;
	Thu, 11 Jun 2009 12:40:04 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906111240.n5BCe4cc047452@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 12:40:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r193995 - in stable/6: include lib/libc lib/libc/gen
	lib/libc/inet lib/libc/sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 12:40:05 -0000

Author: jhb
Date: Thu Jun 11 12:40:04 2009
New Revision: 193995
URL: http://svn.freebsd.org/changeset/base/193995

Log:
  MFC: Add a feature_present(3) function which checks to see if a named kernel
  feature is present by checking the kern.features sysctl MIB.

Added:
  stable/6/lib/libc/gen/feature_present.3
     - copied unchanged from r175220, head/lib/libc/gen/feature_present.3
  stable/6/lib/libc/gen/feature_present.c
     - copied unchanged from r175220, head/lib/libc/gen/feature_present.c
Modified:
  stable/6/include/   (props changed)
  stable/6/include/unistd.h
  stable/6/lib/libc/   (props changed)
  stable/6/lib/libc/gen/Makefile.inc
  stable/6/lib/libc/inet/inet_net_pton.c   (props changed)
  stable/6/lib/libc/sys/   (props changed)

Modified: stable/6/include/unistd.h
==============================================================================
--- stable/6/include/unistd.h	Thu Jun 11 12:21:41 2009	(r193994)
+++ stable/6/include/unistd.h	Thu Jun 11 12:40:04 2009	(r193995)
@@ -477,6 +477,7 @@ int	 des_setkey(const char *key);
 void	 endusershell(void);
 int	 exect(const char *, char * const *, char * const *);
 int	 execvP(const char *, const char *, char * const *);
+int	 feature_present(const char *);
 char	*fflagstostr(u_long);
 int	 getdomainname(char *, int);
 int	 getgrouplist(const char *, gid_t, gid_t *, int *);

Modified: stable/6/lib/libc/gen/Makefile.inc
==============================================================================
--- stable/6/lib/libc/gen/Makefile.inc	Thu Jun 11 12:21:41 2009	(r193994)
+++ stable/6/lib/libc/gen/Makefile.inc	Thu Jun 11 12:40:04 2009	(r193995)
@@ -10,7 +10,7 @@ SRCS+=  __getosreldate.c __xuname.c \
 	clock.c closedir.c confstr.c \
 	crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \
 	dlfcn.c dlfunc.c drand48.c erand48.c err.c errlst.c errno.c \
-	exec.c fmtcheck.c fmtmsg.c fnmatch.c \
+	exec.c feature_present.c fmtcheck.c fmtmsg.c fnmatch.c \
 	fpclassify.c frexp.c fstab.c ftok.c fts.c ftw.c \
 	getbootfile.c getbsize.c \
 	getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \
@@ -43,7 +43,8 @@ MAN+=	alarm.3 arc4random.3 \
 	basename.3 check_utility_compat.3 clock.3 \
 	confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \
 	dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \
-	err.3 exec.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \
+	err.3 exec.3 \
+	feature_present.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \
 	ftok.3 fts.3 ftw.3 \
 	getbootfile.3 getbsize.3 getcap.3 getcontext.3 getcwd.3 \
 	getdiskbyname.3 getdomainname.3 getfsent.3 \

Copied: stable/6/lib/libc/gen/feature_present.3 (from r175220, head/lib/libc/gen/feature_present.3)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/6/lib/libc/gen/feature_present.3	Thu Jun 11 12:40:04 2009	(r193995, copy of r175220, head/lib/libc/gen/feature_present.3)
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2008 Yahoo!, Inc.
+.\" All rights reserved.
+.\" Written by: John Baldwin 
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the author nor the names of any co-contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 2008
+.Dt feature_present 3
+.Os
+.Sh NAME
+.Nm feature_present
+.Nd query presence of a kernel feature
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In unistd.h
+.Ft int
+.Fn feature_present "const char *feature"
+.Sh DESCRIPTION
+The
+.Fn feature_present
+function provides a method for an application to determine if a specific
+kernel feature is present in the currently running kernel.
+The
+.Fa feature
+argument specifies the name of the feature to check.
+The
+.Fn feature_present
+function will return 1 if the specified feature is present,
+otherwise it will return 0.
+If the
+.Fn feature_present
+function is not able to determine the presence of
+.Fa feature
+due to an internal error it will return 0.
+.Sh RETURN VALUES
+If
+.Fa feature
+is present then 1 is returned;
+otherwise 0 is returned.
+.Sh SEE ALSO
+.Xr sysconf 3 ,
+.Xr sysctl 3
+.Sh HISTORY
+The
+.Fn feature_present
+function first appeared in
+.Fx 8.0 .

Copied: stable/6/lib/libc/gen/feature_present.c (from r175220, head/lib/libc/gen/feature_present.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/6/lib/libc/gen/feature_present.c	Thu Jun 11 12:40:04 2009	(r193995, copy of r175220, head/lib/libc/gen/feature_present.c)
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2008 Yahoo!, Inc.
+ * All rights reserved.
+ * Written by: John Baldwin 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of any co-contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * Returns true if the named feature is present in the currently
+ * running kernel.  A feature's presence is indicated by an integer
+ * sysctl node called kern.feature. that is non-zero.
+ */
+int
+feature_present(const char *feature)
+{
+	char *mib;
+	size_t len;
+	int i;
+
+	if (asprintf(&mib, "kern.features.%s", feature) < 0)
+		return (0);
+	len = sizeof(i);
+	if (sysctlbyname(mib, &i, &len, NULL, 0) < 0) {
+		free(mib);
+		return (0);
+	}
+	free(mib);
+	if (len != sizeof(i))
+		return (0);
+	return (i != 0);
+}

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 13:07:43 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6E261065675;
	Thu, 11 Jun 2009 13:07:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E5358FC1D;
	Thu, 11 Jun 2009 13:07:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BD7h5E048299;
	Thu, 11 Jun 2009 13:07:43 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BD7hr0048295;
	Thu, 11 Jun 2009 13:07:43 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906111307.n5BD7hr0048295@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 13:07:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org
X-SVN-Group: stable-other
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r193999 - in stable/4: include lib/libc lib/libc/gen
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 13:07:45 -0000

Author: jhb
Date: Thu Jun 11 13:07:42 2009
New Revision: 193999
URL: http://svn.freebsd.org/changeset/base/193999

Log:
  MFC: Add a feature_present(3) function which checks to see if a named kernel
  feature is present by checking the kern.features sysctl MIB.

Added:
  stable/4/lib/libc/gen/feature_present.3
     - copied unchanged from r175220, head/lib/libc/gen/feature_present.3
  stable/4/lib/libc/gen/feature_present.c
     - copied unchanged from r175220, head/lib/libc/gen/feature_present.c
Modified:
  stable/4/include/   (props changed)
  stable/4/include/unistd.h
  stable/4/lib/libc/   (props changed)
  stable/4/lib/libc/gen/Makefile.inc

Modified: stable/4/include/unistd.h
==============================================================================
--- stable/4/include/unistd.h	Thu Jun 11 13:02:13 2009	(r193998)
+++ stable/4/include/unistd.h	Thu Jun 11 13:07:42 2009	(r193999)
@@ -131,6 +131,7 @@ void	 endusershell __P((void));
 int	 exect __P((const char *, char * const *, char * const *));
 int	 fchdir __P((int));
 int	 fchown __P((int, uid_t, gid_t));
+int	 feature_present __P((const char *));
 char	*fflagstostr __P((u_long));
 int	 fsync __P((int));
 #ifndef _FTRUNCATE_DECLARED

Modified: stable/4/lib/libc/gen/Makefile.inc
==============================================================================
--- stable/4/lib/libc/gen/Makefile.inc	Thu Jun 11 13:02:13 2009	(r193998)
+++ stable/4/lib/libc/gen/Makefile.inc	Thu Jun 11 13:07:42 2009	(r193999)
@@ -9,7 +9,8 @@ SRCS+=  _rand48.c _spinlock_stub.c alarm
 	clock.c closedir.c confstr.c \
 	crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \
 	dlfcn.c drand48.c erand48.c err.c errlst.c \
-	exec.c fmtcheck.c fnmatch.c fstab.c ftok.c fts.c getbootfile.c getbsize.c \
+	exec.c feature_present.c fmtcheck.c fnmatch.c fstab.c ftok.c fts.c \
+	getbootfile.c getbsize.c \
 	getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \
 	gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \
 	getobjformat.c getosreldate.c getpagesize.c \
@@ -40,7 +41,8 @@ MAN+=	alarm.3 arc4random.3 clock.3 \
 	confstr.3 ctermid.3 daemon.3 \
 	devname.3 directory.3 dirname.3 \
 	dladdr.3 dllockinit.3 dlinfo.3 dlopen.3 \
-	err.3 exec.3 fmtcheck.3 fnmatch.3 frexp.3 ftok.3 fts.3 \
+	err.3 exec.3 \
+	feature_present.3 fmtcheck.3 fnmatch.3 frexp.3 ftok.3 fts.3 \
 	getbootfile.3 getbsize.3 getcap.3 getcwd.3 \
 	getdiskbyname.3 getdomainname.3 getfsent.3 \
 	getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \

Copied: stable/4/lib/libc/gen/feature_present.3 (from r175220, head/lib/libc/gen/feature_present.3)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/4/lib/libc/gen/feature_present.3	Thu Jun 11 13:07:42 2009	(r193999, copy of r175220, head/lib/libc/gen/feature_present.3)
@@ -0,0 +1,72 @@
+.\" Copyright (c) 2008 Yahoo!, Inc.
+.\" All rights reserved.
+.\" Written by: John Baldwin 
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the author nor the names of any co-contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 8, 2008
+.Dt feature_present 3
+.Os
+.Sh NAME
+.Nm feature_present
+.Nd query presence of a kernel feature
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In unistd.h
+.Ft int
+.Fn feature_present "const char *feature"
+.Sh DESCRIPTION
+The
+.Fn feature_present
+function provides a method for an application to determine if a specific
+kernel feature is present in the currently running kernel.
+The
+.Fa feature
+argument specifies the name of the feature to check.
+The
+.Fn feature_present
+function will return 1 if the specified feature is present,
+otherwise it will return 0.
+If the
+.Fn feature_present
+function is not able to determine the presence of
+.Fa feature
+due to an internal error it will return 0.
+.Sh RETURN VALUES
+If
+.Fa feature
+is present then 1 is returned;
+otherwise 0 is returned.
+.Sh SEE ALSO
+.Xr sysconf 3 ,
+.Xr sysctl 3
+.Sh HISTORY
+The
+.Fn feature_present
+function first appeared in
+.Fx 8.0 .

Copied: stable/4/lib/libc/gen/feature_present.c (from r175220, head/lib/libc/gen/feature_present.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/4/lib/libc/gen/feature_present.c	Thu Jun 11 13:07:42 2009	(r193999, copy of r175220, head/lib/libc/gen/feature_present.c)
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2008 Yahoo!, Inc.
+ * All rights reserved.
+ * Written by: John Baldwin 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the author nor the names of any co-contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * Returns true if the named feature is present in the currently
+ * running kernel.  A feature's presence is indicated by an integer
+ * sysctl node called kern.feature. that is non-zero.
+ */
+int
+feature_present(const char *feature)
+{
+	char *mib;
+	size_t len;
+	int i;
+
+	if (asprintf(&mib, "kern.features.%s", feature) < 0)
+		return (0);
+	len = sizeof(i);
+	if (sysctlbyname(mib, &i, &len, NULL, 0) < 0) {
+		free(mib);
+		return (0);
+	}
+	free(mib);
+	if (len != sizeof(i))
+		return (0);
+	return (i != 0);
+}

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 14:18:33 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CEEE11065670;
	Thu, 11 Jun 2009 14:18:33 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BBA838FC08;
	Thu, 11 Jun 2009 14:18:33 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BEIXZP049844;
	Thu, 11 Jun 2009 14:18:33 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BEIXf6049843;
	Thu, 11 Jun 2009 14:18:33 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <200906111418.n5BEIXf6049843@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 11 Jun 2009 14:18:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194001 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 14:18:34 -0000

Author: gnn
Date: Thu Jun 11 14:18:33 2009
New Revision: 194001
URL: http://svn.freebsd.org/changeset/base/194001

Log:
  MFC of 193925
  
  Add a missing error statistic, the number of FCS errors on receive.
  
  Reviewed by:	jhb

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/cxgb_sge.c

Modified: stable/7/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_sge.c	Thu Jun 11 13:59:51 2009	(r194000)
+++ stable/7/sys/dev/cxgb/cxgb_sge.c	Thu Jun 11 14:18:33 2009	(r194001)
@@ -3636,6 +3636,7 @@ t3_add_configured_sysctls(adapter_t *sc)
 		CXGB_SYSCTL_ADD_QUAD(rx_mcast_frames);
 		CXGB_SYSCTL_ADD_QUAD(rx_bcast_frames);
 		CXGB_SYSCTL_ADD_QUAD(rx_pause);
+		CXGB_SYSCTL_ADD_QUAD(rx_fcs_errs);
 		CXGB_SYSCTL_ADD_QUAD(rx_align_errs);
 		CXGB_SYSCTL_ADD_QUAD(rx_symbol_errs);
 		CXGB_SYSCTL_ADD_QUAD(rx_data_errs);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 15:15:41 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5937D1065679;
	Thu, 11 Jun 2009 15:15:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A5F48FC20;
	Thu, 11 Jun 2009 15:15:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BFFerT051179;
	Thu, 11 Jun 2009 15:15:40 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BFFeEB051178;
	Thu, 11 Jun 2009 15:15:40 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906111515.n5BFFeEB051178@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 15:15:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194006 - in stable/7/sys: . boot/i386/libi386
	contrib/pf dev/ath/ath_hal
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 15:15:44 -0000

Author: jhb
Date: Thu Jun 11 15:15:40 2009
New Revision: 194006
URL: http://svn.freebsd.org/changeset/base/194006

Log:
  MFC: Don't attempt to free the GPT partition list for a disk with an empty
  GPT.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/boot/i386/libi386/biosdisk.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)

Modified: stable/7/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- stable/7/sys/boot/i386/libi386/biosdisk.c	Thu Jun 11 15:07:02 2009	(r194005)
+++ stable/7/sys/boot/i386/libi386/biosdisk.c	Thu Jun 11 15:15:40 2009	(r194006)
@@ -998,7 +998,8 @@ bd_open_gpt(struct open_disk *od, struct
 
 out:
     if (error) {
-	free(od->od_partitions);
+	if (od->od_nparts > 0)
+	    free(od->od_partitions);
 	od->od_flags &= ~BD_GPTOK;
     }
     return (error);
@@ -1052,7 +1053,7 @@ bd_closedisk(struct open_disk *od)
 	delay(3000000);
 #endif
 #ifdef LOADER_GPT_SUPPORT
-    if (od->od_flags & BD_GPTOK)
+    if (od->od_flags & BD_GPTOK && od->od_nparts > 0)
 	free(od->od_partitions);
 #endif
     free(od);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 15:16:07 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B9547106566C;
	Thu, 11 Jun 2009 15:16:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A6B958FC0C;
	Thu, 11 Jun 2009 15:16:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BFG7NS051232;
	Thu, 11 Jun 2009 15:16:07 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BFG7CT051231;
	Thu, 11 Jun 2009 15:16:07 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906111516.n5BFG7CT051231@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 15:16:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194007 - in stable/6/sys: . boot/i386/libi386
	contrib/pf dev/cxgb
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 15:16:08 -0000

Author: jhb
Date: Thu Jun 11 15:16:07 2009
New Revision: 194007
URL: http://svn.freebsd.org/changeset/base/194007

Log:
  MFC: Don't attempt to free the GPT partition list for a disk with an empty
  GPT.

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/boot/i386/libi386/biosdisk.c
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- stable/6/sys/boot/i386/libi386/biosdisk.c	Thu Jun 11 15:15:40 2009	(r194006)
+++ stable/6/sys/boot/i386/libi386/biosdisk.c	Thu Jun 11 15:16:07 2009	(r194007)
@@ -995,7 +995,8 @@ bd_open_gpt(struct open_disk *od, struct
 
 out:
     if (error)
-	free(od->od_partitions);
+	if (od->od_nparts > 0)
+	    free(od->od_partitions);
     return (error);
 }
 
@@ -1046,7 +1047,7 @@ bd_closedisk(struct open_disk *od)
 	delay(3000000);
 #endif
 #ifdef LOADER_GPT_SUPPORT
-    if (od->od_flags & BD_GPTOK)
+    if (od->od_flags & BD_GPTOK && od->od_nparts > 0)
 	free(od->od_partitions);
 #endif
     free(od);

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 15:49:46 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 444F6106566C;
	Thu, 11 Jun 2009 15:49:46 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 177608FC12;
	Thu, 11 Jun 2009 15:49:46 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BFnjNq052017;
	Thu, 11 Jun 2009 15:49:45 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BFnjbM052016;
	Thu, 11 Jun 2009 15:49:45 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200906111549.n5BFnjbM052016@svn.freebsd.org>
From: Marius Strobl 
Date: Thu, 11 Jun 2009 15:49:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194008 - stable/7/share/man/man9
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 15:49:47 -0000

Author: marius
Date: Thu Jun 11 15:49:45 2009
New Revision: 194008
URL: http://svn.freebsd.org/changeset/base/194008

Log:
  MFC: r190283, r192026
  
  Correct the documentation of BUS_DMA_NOCACHE for amd64 and i386,
  it's a flag to bus_dmamem_alloc(9) rather than bus_dmamap_load(9)
  there.

Modified:
  stable/7/share/man/man9/bus_dma.9

Modified: stable/7/share/man/man9/bus_dma.9
==============================================================================
--- stable/7/share/man/man9/bus_dma.9	Thu Jun 11 15:16:07 2009	(r194007)
+++ stable/7/share/man/man9/bus_dma.9	Thu Jun 11 15:49:45 2009	(r194008)
@@ -60,7 +60,7 @@
 .\" $FreeBSD$
 .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $
 .\"
-.Dd November 16, 2008
+.Dd May 12, 2009
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -562,14 +562,12 @@ Are as follows:
 The load should not be deferred in case of insufficient mapping resources,
 and instead should return immediately with an appropriate error.
 .It Dv BUS_DMA_NOCACHE
-The allocated memory will not be cached in the processor caches.
-All memory accesses appear on the bus and are executed
-without reordering.
-On the amd64 and i386 architectures this flag results in the
-Strong Uncacheable PAT to be set for the allocated virtual address range.
-The
+The generated transactions to and from the virtual page are non-cacheable.
+For
+.Fn bus_dmamap_load ,
+the
 .Dv BUS_DMA_NOCACHE
-flag is currently implemented on amd64, i386 and sparc64.
+flag is currently implemented on sparc64.
 .El
 .El
 .Pp
@@ -785,6 +783,16 @@ the
 flag is currently implemented on arm and sparc64.
 .It Dv BUS_DMA_ZERO
 Causes the allocated memory to be set to all zeros.
+.It Dv BUS_DMA_NOCACHE
+The allocated memory will not be cached in the processor caches.
+All memory accesses appear on the bus and are executed
+without reordering.
+For
+.Fn bus_dmamem_alloc ,
+the
+.Dv BUS_DMA_NOCACHE
+flag is currently implemented on amd64 and i386 where it results in the
+Strong Uncacheable PAT to be set for the allocated virtual address range.
 .El
 .It Fa mapp
 Pointer to a

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 15:50:25 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73D1F106567C;
	Thu, 11 Jun 2009 15:50:25 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 470F18FC2B;
	Thu, 11 Jun 2009 15:50:25 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BFoPZK052081;
	Thu, 11 Jun 2009 15:50:25 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BFoPCG052080;
	Thu, 11 Jun 2009 15:50:25 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200906111550.n5BFoPCG052080@svn.freebsd.org>
From: Marius Strobl 
Date: Thu, 11 Jun 2009 15:50:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194009 - stable/6/share/man/man9
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 15:50:26 -0000

Author: marius
Date: Thu Jun 11 15:50:25 2009
New Revision: 194009
URL: http://svn.freebsd.org/changeset/base/194009

Log:
  MFC: r190283, r192026
  
  Correct the documentation of BUS_DMA_NOCACHE for amd64 and i386,
  it's a flag to bus_dmamem_alloc(9) rather than bus_dmamap_load(9)
  there.

Modified:
  stable/6/share/man/man9/   (props changed)
  stable/6/share/man/man9/bus_dma.9

Modified: stable/6/share/man/man9/bus_dma.9
==============================================================================
--- stable/6/share/man/man9/bus_dma.9	Thu Jun 11 15:49:45 2009	(r194008)
+++ stable/6/share/man/man9/bus_dma.9	Thu Jun 11 15:50:25 2009	(r194009)
@@ -60,7 +60,7 @@
 .\" $FreeBSD$
 .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $
 .\"
-.Dd November 16, 2008
+.Dd May 12, 2009
 .Dt BUS_DMA 9
 .Os
 .Sh NAME
@@ -561,14 +561,12 @@ Are as follows:
 The load should not be deferred in case of insufficient mapping resources,
 and instead should return immediately with an appropriate error.
 .It Dv BUS_DMA_NOCACHE
-The allocated memory will not be cached in the processor caches.
-All memory accesses appear on the bus and are executed
-without reordering.
-On the amd64 and i386 architectures this flag results in the
-Strong Uncacheable PAT to be set for the allocated virtual address range.
-The
+The generated transactions to and from the virtual page are non-cacheable.
+For
+.Fn bus_dmamap_load ,
+the
 .Dv BUS_DMA_NOCACHE
-flag is currently implemented on amd64, i386 and sparc64.
+flag is currently implemented on sparc64.
 .El
 .El
 .Pp
@@ -784,6 +782,16 @@ the
 flag is currently implemented on arm and sparc64.
 .It Dv BUS_DMA_ZERO
 Causes the allocated memory to be set to all zeros.
+.It Dv BUS_DMA_NOCACHE
+The allocated memory will not be cached in the processor caches.
+All memory accesses appear on the bus and are executed
+without reordering.
+For
+.Fn bus_dmamem_alloc ,
+the
+.Dv BUS_DMA_NOCACHE
+flag is currently implemented on amd64 and i386 where it results in the
+Strong Uncacheable PAT to be set for the allocated virtual address range.
 .El
 .It Fa mapp
 Pointer to a

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 15:51:14 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B70D1106564A;
	Thu, 11 Jun 2009 15:51:14 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 87F0D8FC19;
	Thu, 11 Jun 2009 15:51:14 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BFpENf052139;
	Thu, 11 Jun 2009 15:51:14 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BFpEnd052138;
	Thu, 11 Jun 2009 15:51:14 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200906111551.n5BFpEnd052138@svn.freebsd.org>
From: Marius Strobl 
Date: Thu, 11 Jun 2009 15:51:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194010 - stable/7/share/man/man9
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 15:51:15 -0000

Author: marius
Date: Thu Jun 11 15:51:14 2009
New Revision: 194010
URL: http://svn.freebsd.org/changeset/base/194010

Log:
  MFC: r190283, r192026
  
  Correct the documentation of BUS_DMA_NOCACHE for amd64 and i386,
  it's a flag to bus_dmamem_alloc(9) rather than bus_dmamap_load(9)
  there.

Modified:
  stable/7/share/man/man9/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:10:17 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DF3A71065680;
	Thu, 11 Jun 2009 18:10:17 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCCCA8FC16;
	Thu, 11 Jun 2009 18:10:17 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BIAHu3056174;
	Thu, 11 Jun 2009 18:10:17 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BIAHhZ056173;
	Thu, 11 Jun 2009 18:10:17 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111810.n5BIAHhZ056173@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:10:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194031 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/ichwd
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:10:18 -0000

Author: avg
Date: Thu Jun 11 18:10:17 2009
New Revision: 194031
URL: http://svn.freebsd.org/changeset/base/194031

Log:
  MFC r189305: ichwd: correct range check for timeout value
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/ichwd/ichwd.c

Modified: stable/7/sys/dev/ichwd/ichwd.c
==============================================================================
--- stable/7/sys/dev/ichwd/ichwd.c	Thu Jun 11 18:04:57 2009	(r194030)
+++ stable/7/sys/dev/ichwd/ichwd.c	Thu Jun 11 18:10:17 2009	(r194031)
@@ -261,8 +261,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, un
 		uint16_t tmr_val16 = ichwd_read_tco_2(sc, TCO_TMR2);
 
 		tmr_val16 &= 0xfc00;
-		if (timeout > 0x0bff)
-			timeout = 0x0bff;
+		if (timeout > 0x03ff)
+			timeout = 0x03ff;
 		tmr_val16 |= timeout;
 		ichwd_write_tco_2(sc, TCO_TMR2, tmr_val16);
 	}

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:15:04 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C0E510656C2;
	Thu, 11 Jun 2009 18:15:04 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 398C98FC0C;
	Thu, 11 Jun 2009 18:15:04 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BIF4AE056348;
	Thu, 11 Jun 2009 18:15:04 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BIF4Ti056347;
	Thu, 11 Jun 2009 18:15:04 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111815.n5BIF4Ti056347@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:15:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194032 - stable/7/sbin/newfs_msdos
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:15:05 -0000

Author: avg
Date: Thu Jun 11 18:15:03 2009
New Revision: 194032
URL: http://svn.freebsd.org/changeset/base/194032

Log:
  MFC r189112: newfs_msdos: work with media that doesn't have any CHS params
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/sbin/newfs_msdos/   (props changed)
  stable/7/sbin/newfs_msdos/newfs_msdos.c

Modified: stable/7/sbin/newfs_msdos/newfs_msdos.c
==============================================================================
--- stable/7/sbin/newfs_msdos/newfs_msdos.c	Thu Jun 11 18:10:17 2009	(r194031)
+++ stable/7/sbin/newfs_msdos/newfs_msdos.c	Thu Jun 11 18:15:03 2009	(r194032)
@@ -739,13 +739,25 @@ getdiskinfo(int fd, const char *fname, c
     /* Maybe it's a fixed drive */
     if (lp == NULL) {
 	if (ioctl(fd, DIOCGDINFO, &dlp) == -1) {
-	    if (ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1)
+	    if (bpb->bps == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1)
 		errx(1, "Cannot get sector size, %s", strerror(errno));
-	    if (ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1)
-		errx(1, "Cannot get number of sectors, %s", strerror(errno));
-	    if (ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks)== -1)
-		errx(1, "Cannot get number of heads, %s", strerror(errno));
+
+	    /* XXX Should we use bpb->bps if it's set? */
 	    dlp.d_secperunit = ms / dlp.d_secsize;
+
+	    if (bpb->spt == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) {
+		warnx("Cannot get number of sectors per track, %s", strerror(errno));
+		dlp.d_nsectors = 63;
+	    }
+	    if (bpb->hds == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) {
+		warnx("Cannot get number of heads, %s", strerror(errno));
+		if (dlp.d_secperunit <= 63*1*1024)
+		    dlp.d_ntracks = 1;
+		else if (dlp.d_secperunit <= 63*16*1024)
+		    dlp.d_ntracks = 16;
+		else
+		    dlp.d_ntracks = 255;
+	    }
 	}
 
 	hs = (ms / dlp.d_secsize) - dlp.d_secperunit;

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:19:49 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F15C31065687;
	Thu, 11 Jun 2009 18:19:48 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C46568FC17;
	Thu, 11 Jun 2009 18:19:48 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BIJmXS056488;
	Thu, 11 Jun 2009 18:19:48 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BIJmfT056487;
	Thu, 11 Jun 2009 18:19:48 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111819.n5BIJmfT056487@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:19:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194033 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	pci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:19:49 -0000

Author: avg
Date: Thu Jun 11 18:19:48 2009
New Revision: 194033
URL: http://svn.freebsd.org/changeset/base/194033

Log:
  MFC r189882: intpm: minor enhancements
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/pci/intpm.c

Modified: stable/7/sys/pci/intpm.c
==============================================================================
--- stable/7/sys/pci/intpm.c	Thu Jun 11 18:15:03 2009	(r194032)
+++ stable/7/sys/pci/intpm.c	Thu Jun 11 18:19:48 2009	(r194033)
@@ -167,10 +167,6 @@ intsmb_attach(device_t dev)
 		goto fail;
 	}
 
-	value = pci_read_config(dev, PCI_BASE_ADDR_PM, 4);
-	device_printf(dev, "PM %s %x\n", (value & 1) ? "I/O mapped" : "Memory",
-	    value & 0xfffe);
-
 	sc->isbusy = 0;
 	sc->smbus = device_add_child(dev, "smbus", -1);
 	if (sc->smbus == NULL) {
@@ -365,13 +361,13 @@ intsmb_start(struct intsmb_softc *sc, un
 	tmp |= PIIX4_SMBHSTCNT_START;
 
 	/* While not in autoconfiguration enable interrupts. */
-	if (!cold || !nointr)
+	if (!cold && !nointr)
 		tmp |= PIIX4_SMBHSTCNT_INTREN;
 	bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp);
 }
 
 static int
-intsmb_error(int status)
+intsmb_error(device_t dev, int status)
 {
 	int error = 0;
 
@@ -381,6 +377,10 @@ intsmb_error(int status)
 		error |= SMB_ECOLLI;
 	if (status & PIIX4_SMBHSTSTAT_FAIL)
 		error |= SMB_ENOACK;
+
+	if (error != 0 && bootverbose)
+		device_printf(dev, "error = %d, status = %#x\n", error, status);
+
 	return (error);
 }
 
@@ -410,7 +410,7 @@ intsmb_stop_poll(struct intsmb_softc *sc
 		status = bus_read_1(sc->io_res, PIIX4_SMBHSTSTS);
 		if (!(status & PIIX4_SMBHSTSTAT_BUSY)) {
 			sc->isbusy = 0;
-			error = intsmb_error(status);
+			error = intsmb_error(sc->dev, status);
 			if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR))
 				device_printf(sc->dev, "unknown cause why?\n");
 			return (error);
@@ -442,7 +442,7 @@ intsmb_stop(struct intsmb_softc *sc)
 	if (error == 0) {
 		status = bus_read_1(sc->io_res, PIIX4_SMBHSTSTS);
 		if (!(status & PIIX4_SMBHSTSTAT_BUSY)) {
-			error = intsmb_error(status);
+			error = intsmb_error(sc->dev, status);
 			if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR))
 				device_printf(sc->dev, "unknown cause why?\n");
 #ifdef ENABLE_ALART

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:29:12 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 356BC106566C;
	Thu, 11 Jun 2009 18:29:12 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A1BB8FC13;
	Thu, 11 Jun 2009 18:29:12 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BITBTn056768;
	Thu, 11 Jun 2009 18:29:11 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BITBfd056767;
	Thu, 11 Jun 2009 18:29:11 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111829.n5BITBfd056767@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:29:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194034 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:29:12 -0000

Author: avg
Date: Thu Jun 11 18:29:11 2009
New Revision: 194034
URL: http://svn.freebsd.org/changeset/base/194034

Log:
  MFC r192379: sysctl_rman: report shared resources to devinfo
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/kern/subr_rman.c

Modified: stable/7/sys/kern/subr_rman.c
==============================================================================
--- stable/7/sys/kern/subr_rman.c	Thu Jun 11 18:19:48 2009	(r194033)
+++ stable/7/sys/kern/subr_rman.c	Thu Jun 11 18:29:11 2009	(r194034)
@@ -835,6 +835,7 @@ sysctl_rman(SYSCTL_HANDLER_ARGS)
 	int			rman_idx, res_idx;
 	struct rman		*rm;
 	struct resource_i	*res;
+	struct resource_i	*sres;
 	struct u_rman		urm;
 	struct u_resource	ures;
 	int			error;
@@ -880,35 +881,44 @@ sysctl_rman(SYSCTL_HANDLER_ARGS)
 	 */
 	mtx_lock(rm->rm_mtx);
 	TAILQ_FOREACH(res, &rm->rm_list, r_link) {
-		if (res_idx-- == 0) {
-			bzero(&ures, sizeof(ures));
-			ures.r_handle = (uintptr_t)res;
-			ures.r_parent = (uintptr_t)res->r_rm;
-			ures.r_device = (uintptr_t)res->r_dev;
-			if (res->r_dev != NULL) {
-				if (device_get_name(res->r_dev) != NULL) {
-					snprintf(ures.r_devname, RM_TEXTLEN,
-					    "%s%d",
-					    device_get_name(res->r_dev),
-					    device_get_unit(res->r_dev));
-				} else {
-					strlcpy(ures.r_devname, "nomatch",
-					    RM_TEXTLEN);
+		if (res->r_sharehead != NULL) {
+			LIST_FOREACH(sres, res->r_sharehead, r_sharelink)
+				if (res_idx-- == 0) {
+					res = sres;
+					goto found;
 				}
-			} else {
-				ures.r_devname[0] = '\0';
-			}
-			ures.r_start = res->r_start;
-			ures.r_size = res->r_end - res->r_start + 1;
-			ures.r_flags = res->r_flags;
-
-			mtx_unlock(rm->rm_mtx);
-			error = SYSCTL_OUT(req, &ures, sizeof(ures));
-			return (error);
 		}
+		else if (res_idx-- == 0)
+				goto found;
 	}
 	mtx_unlock(rm->rm_mtx);
 	return (ENOENT);
+
+found:
+	bzero(&ures, sizeof(ures));
+	ures.r_handle = (uintptr_t)res;
+	ures.r_parent = (uintptr_t)res->r_rm;
+	ures.r_device = (uintptr_t)res->r_dev;
+	if (res->r_dev != NULL) {
+		if (device_get_name(res->r_dev) != NULL) {
+			snprintf(ures.r_devname, RM_TEXTLEN,
+			    "%s%d",
+			    device_get_name(res->r_dev),
+			    device_get_unit(res->r_dev));
+		} else {
+			strlcpy(ures.r_devname, "nomatch",
+			    RM_TEXTLEN);
+		}
+	} else {
+		ures.r_devname[0] = '\0';
+	}
+	ures.r_start = res->r_start;
+	ures.r_size = res->r_end - res->r_start + 1;
+	ures.r_flags = res->r_flags;
+
+	mtx_unlock(rm->rm_mtx);
+	error = SYSCTL_OUT(req, &ures, sizeof(ures));
+	return (error);
 }
 
 SYSCTL_NODE(_hw_bus, OID_AUTO, rman, CTLFLAG_RD, sysctl_rman,

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:32:54 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35DCA106564A;
	Thu, 11 Jun 2009 18:32:54 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 23BEC8FC15;
	Thu, 11 Jun 2009 18:32:54 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BIWrPf056898;
	Thu, 11 Jun 2009 18:32:53 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BIWr5N056897;
	Thu, 11 Jun 2009 18:32:53 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111832.n5BIWr5N056897@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:32:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194035 - stable/7/usr.bin/find
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:32:54 -0000

Author: avg
Date: Thu Jun 11 18:32:53 2009
New Revision: 194035
URL: http://svn.freebsd.org/changeset/base/194035

Log:
  MFC r192381: find: do not silently disable -L when -delete is used
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/usr.bin/find/   (props changed)
  stable/7/usr.bin/find/function.c

Modified: stable/7/usr.bin/find/function.c
==============================================================================
--- stable/7/usr.bin/find/function.c	Thu Jun 11 18:29:11 2009	(r194034)
+++ stable/7/usr.bin/find/function.c	Thu Jun 11 18:32:53 2009	(r194035)
@@ -427,11 +427,13 @@ f_delete(PLAN *plan __unused, FTSENT *en
 
 	/* sanity check */
 	if (isdepth == 0 ||			/* depth off */
-	    (ftsoptions & FTS_NOSTAT) ||	/* not stat()ing */
-	    !(ftsoptions & FTS_PHYSICAL) ||	/* physical off */
-	    (ftsoptions & FTS_LOGICAL))		/* or finally, logical on */
+	    (ftsoptions & FTS_NOSTAT))		/* not stat()ing */
 		errx(1, "-delete: insecure options got turned on");
 
+	if (!(ftsoptions & FTS_PHYSICAL) ||	/* physical off */
+	    (ftsoptions & FTS_LOGICAL))		/* or finally, logical on */
+		errx(1, "-delete: forbidden when symlinks are followed");
+
 	/* Potentially unsafe - do not accept relative paths whatsoever */
 	if (strchr(entry->fts_accpath, '/') != NULL)
 		errx(1, "-delete: %s: relative path potentially not safe",
@@ -462,8 +464,6 @@ c_delete(OPTION *option, char ***argvp _
 {
 
 	ftsoptions &= ~FTS_NOSTAT;	/* no optimise */
-	ftsoptions |= FTS_PHYSICAL;	/* disable -follow */
-	ftsoptions &= ~FTS_LOGICAL;	/* disable -follow */
 	isoutput = 1;			/* possible output */
 	isdepth = 1;			/* -depth implied */
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 18:39:32 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A6DD1065679;
	Thu, 11 Jun 2009 18:39:32 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4346C8FC20;
	Thu, 11 Jun 2009 18:39:32 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BIdWTm057079;
	Thu, 11 Jun 2009 18:39:32 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BIdWat057078;
	Thu, 11 Jun 2009 18:39:32 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <200906111839.n5BIdWat057078@svn.freebsd.org>
From: Andriy Gapon 
Date: Thu, 11 Jun 2009 18:39:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194036 - in stable/7/sys: . compat/linux contrib/pf
	dev/ath/ath_hal
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 18:39:33 -0000

Author: avg
Date: Thu Jun 11 18:39:31 2009
New Revision: 194036
URL: http://svn.freebsd.org/changeset/base/194036

Log:
  MFC r192899: linux_ioctl_cdrom: reduce stack usage
  
  Approved by:	jhb (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/compat/linux/linux_ioctl.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)

Modified: stable/7/sys/compat/linux/linux_ioctl.c
==============================================================================
--- stable/7/sys/compat/linux/linux_ioctl.c	Thu Jun 11 18:32:53 2009	(r194035)
+++ stable/7/sys/compat/linux/linux_ioctl.c	Thu Jun 11 18:39:31 2009	(r194036)
@@ -1539,23 +1539,28 @@ linux_ioctl_cdrom(struct thread *td, str
 	/* LINUX_CDROMAUDIOBUFSIZ */
 
 	case LINUX_DVD_READ_STRUCT: {
-		l_dvd_struct lds;
-		struct dvd_struct bds;
+		l_dvd_struct *lds;
+		struct dvd_struct *bds;
 
-		error = copyin((void *)args->arg, &lds, sizeof(lds));
+		lds = malloc(sizeof(*lds), M_LINUX, M_WAITOK);
+		bds = malloc(sizeof(*bds), M_LINUX, M_WAITOK);
+		error = copyin((void *)args->arg, lds, sizeof(*lds));
 		if (error)
-			break;
-		error = linux_to_bsd_dvd_struct(&lds, &bds);
+			goto out;
+		error = linux_to_bsd_dvd_struct(lds, bds);
 		if (error)
-			break;
-		error = fo_ioctl(fp, DVDIOCREADSTRUCTURE, (caddr_t)&bds,
+			goto out;
+		error = fo_ioctl(fp, DVDIOCREADSTRUCTURE, (caddr_t)bds,
 		    td->td_ucred, td);
 		if (error)
-			break;
-		error = bsd_to_linux_dvd_struct(&bds, &lds);
+			goto out;
+		error = bsd_to_linux_dvd_struct(bds, lds);
 		if (error)
-			break;
-		error = copyout(&lds, (void *)args->arg, sizeof(lds));
+			goto out;
+		error = copyout(lds, (void *)args->arg, sizeof(*lds));
+	out:
+		free(bds, M_LINUX);
+		free(lds, M_LINUX);
 		break;
 	}
 

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 19:07:15 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D177D106564A;
	Thu, 11 Jun 2009 19:07:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BACAB8FC12;
	Thu, 11 Jun 2009 19:07:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BJ7Fn9057723;
	Thu, 11 Jun 2009 19:07:15 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BJ7FOd057716;
	Thu, 11 Jun 2009 19:07:15 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906111907.n5BJ7FOd057716@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 19:07:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194038 - in stable/7/sys/cddl: compat/opensolaris/sys
	contrib/opensolaris/common/zfs
	contrib/opensolaris/uts/common/fs/zfs/sys
	contrib/opensolaris/uts/common/sys contrib/opensolaris/ut...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 19:07:16 -0000

Author: jhb
Date: Thu Jun 11 19:07:15 2009
New Revision: 194038
URL: http://svn.freebsd.org/changeset/base/194038

Log:
  Trim duplicate copies of headers.

Modified:
  stable/7/sys/cddl/compat/opensolaris/sys/refstr.h
  stable/7/sys/cddl/compat/opensolaris/sys/sid.h
  stable/7/sys/cddl/compat/opensolaris/sys/sig.h
  stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h
  stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_boot.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_fuid.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/acl_impl.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/extdirent.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/idmap.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/u8_textprep.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/u8_textprep_data.h
  stable/7/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h

Modified: stable/7/sys/cddl/compat/opensolaris/sys/refstr.h
==============================================================================
--- stable/7/sys/cddl/compat/opensolaris/sys/refstr.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/compat/opensolaris/sys/refstr.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -32,105 +32,3 @@
 #define	refstr_value(str)	(str)
 
 #endif	/* _OPENSOLARIS_SYS_REFSTR_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- $ $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_REFSTR_H_
-#define	_OPENSOLARIS_SYS_REFSTR_H_
-
-#define	refstr_value(str)	(str)
-
-#endif	/* _OPENSOLARIS_SYS_REFSTR_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- $ $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_REFSTR_H_
-#define	_OPENSOLARIS_SYS_REFSTR_H_
-
-#define	refstr_value(str)	(str)
-
-#endif	/* _OPENSOLARIS_SYS_REFSTR_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- $ $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_REFSTR_H_
-#define	_OPENSOLARIS_SYS_REFSTR_H_
-
-#define	refstr_value(str)	(str)
-
-#endif	/* _OPENSOLARIS_SYS_REFSTR_H_ */

Modified: stable/7/sys/cddl/compat/opensolaris/sys/sid.h
==============================================================================
--- stable/7/sys/cddl/compat/opensolaris/sys/sid.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/compat/opensolaris/sys/sid.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -52,165 +52,3 @@ ksiddomain_rele(ksiddomain_t *kd)
 }
 
 #endif	/* _OPENSOLARIS_SYS_SID_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SID_H_
-#define	_OPENSOLARIS_SYS_SID_H_
-
-typedef struct ksiddomain {
-	char	kd_name[16];	/* Domain part of SID */
-} ksiddomain_t;
-typedef void	ksid_t;
-
-static __inline ksiddomain_t *
-ksid_lookupdomain(const char *domain)
-{
-	ksiddomain_t *kd;
-
-	kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
-	strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name));
-	return (kd);
-}
-
-static __inline void
-ksiddomain_rele(ksiddomain_t *kd)
-{
-
-	kmem_free(kd, sizeof(*kd));
-}
-
-#endif	/* _OPENSOLARIS_SYS_SID_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SID_H_
-#define	_OPENSOLARIS_SYS_SID_H_
-
-typedef struct ksiddomain {
-	char	kd_name[16];	/* Domain part of SID */
-} ksiddomain_t;
-typedef void	ksid_t;
-
-static __inline ksiddomain_t *
-ksid_lookupdomain(const char *domain)
-{
-	ksiddomain_t *kd;
-
-	kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
-	strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name));
-	return (kd);
-}
-
-static __inline void
-ksiddomain_rele(ksiddomain_t *kd)
-{
-
-	kmem_free(kd, sizeof(*kd));
-}
-
-#endif	/* _OPENSOLARIS_SYS_SID_H_ */
-/*-
- * Copyright (c) 2007 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SID_H_
-#define	_OPENSOLARIS_SYS_SID_H_
-
-typedef struct ksiddomain {
-	char	kd_name[16];	/* Domain part of SID */
-} ksiddomain_t;
-typedef void	ksid_t;
-
-static __inline ksiddomain_t *
-ksid_lookupdomain(const char *domain)
-{
-	ksiddomain_t *kd;
-
-	kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
-	strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name));
-	return (kd);
-}
-
-static __inline void
-ksiddomain_rele(ksiddomain_t *kd)
-{
-
-	kmem_free(kd, sizeof(*kd));
-}
-
-#endif	/* _OPENSOLARIS_SYS_SID_H_ */

Modified: stable/7/sys/cddl/compat/opensolaris/sys/sig.h
==============================================================================
--- stable/7/sys/cddl/compat/opensolaris/sys/sig.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/compat/opensolaris/sys/sig.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -67,210 +67,3 @@ issig(int why)
 #endif	/* _KERNEL */
 
 #endif	/* _OPENSOLARIS_SYS_SIG_H_ */
-/*-
- * Copyright (c) 2008 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SIG_H_
-#define	_OPENSOLARIS_SYS_SIG_H_
-
-#ifdef _KERNEL
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define	FORREAL		0
-#define	JUSTLOOKING	1
-
-static __inline int
-issig(int why)
-{
-	struct thread *td = curthread;
-	struct proc *p;
-	int sig;
-
-	ASSERT(why == FORREAL || why == JUSTLOOKING);
-	if (SIGPENDING(td)) {
-		if (why == JUSTLOOKING)
-			return (1);
-		p = td->td_proc;
-		PROC_LOCK(p);
-		mtx_lock(&p->p_sigacts->ps_mtx);
-		sig = cursig(td);
-		mtx_unlock(&p->p_sigacts->ps_mtx);
-		PROC_UNLOCK(p);
-		if (sig != 0)
-			return (1);
-	}
-	return (0);
-}
-
-#endif	/* _KERNEL */
-
-#endif	/* _OPENSOLARIS_SYS_SIG_H_ */
-/*-
- * Copyright (c) 2008 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SIG_H_
-#define	_OPENSOLARIS_SYS_SIG_H_
-
-#ifdef _KERNEL
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define	FORREAL		0
-#define	JUSTLOOKING	1
-
-static __inline int
-issig(int why)
-{
-	struct thread *td = curthread;
-	struct proc *p;
-	int sig;
-
-	ASSERT(why == FORREAL || why == JUSTLOOKING);
-	if (SIGPENDING(td)) {
-		if (why == JUSTLOOKING)
-			return (1);
-		p = td->td_proc;
-		PROC_LOCK(p);
-		mtx_lock(&p->p_sigacts->ps_mtx);
-		sig = cursig(td);
-		mtx_unlock(&p->p_sigacts->ps_mtx);
-		PROC_UNLOCK(p);
-		if (sig != 0)
-			return (1);
-	}
-	return (0);
-}
-
-#endif	/* _KERNEL */
-
-#endif	/* _OPENSOLARIS_SYS_SIG_H_ */
-/*-
- * Copyright (c) 2008 Pawel Jakub Dawidek 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _OPENSOLARIS_SYS_SIG_H_
-#define	_OPENSOLARIS_SYS_SIG_H_
-
-#ifdef _KERNEL
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define	FORREAL		0
-#define	JUSTLOOKING	1
-
-static __inline int
-issig(int why)
-{
-	struct thread *td = curthread;
-	struct proc *p;
-	int sig;
-
-	ASSERT(why == FORREAL || why == JUSTLOOKING);
-	if (SIGPENDING(td)) {
-		if (why == JUSTLOOKING)
-			return (1);
-		p = td->td_proc;
-		PROC_LOCK(p);
-		mtx_lock(&p->p_sigacts->ps_mtx);
-		sig = cursig(td);
-		mtx_unlock(&p->p_sigacts->ps_mtx);
-		PROC_UNLOCK(p);
-		if (sig != 0)
-			return (1);
-	}
-	return (0);
-}
-
-#endif	/* _KERNEL */
-
-#endif	/* _OPENSOLARIS_SYS_SIG_H_ */

Modified: stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h
==============================================================================
--- stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_comutil.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -42,135 +42,3 @@ extern boolean_t zfs_allocatable_devs(nv
 #endif
 
 #endif	/* _ZFS_COMUTIL_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_COMUTIL_H
-#define	_ZFS_COMUTIL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern boolean_t zfs_allocatable_devs(nvlist_t *nv);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_COMUTIL_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_COMUTIL_H
-#define	_ZFS_COMUTIL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern boolean_t zfs_allocatable_devs(nvlist_t *nv);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_COMUTIL_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_COMUTIL_H
-#define	_ZFS_COMUTIL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern boolean_t zfs_allocatable_devs(nvlist_t *nv);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_COMUTIL_H */

Modified: stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h
==============================================================================
--- stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -79,246 +79,3 @@ const char *zfs_deleg_canonicalize_perm(
 #endif
 
 #endif	/* _ZFS_DELEG_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_DELEG_H
-#define	_ZFS_DELEG_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	ZFS_DELEG_SET_NAME_CHR		'@'		/* set name lead char */
-#define	ZFS_DELEG_FIELD_SEP_CHR		'$'		/* field separator */
-
-/*
- * Max name length for a delegation attribute
- */
-#define	ZFS_MAX_DELEG_NAME	128
-
-#define	ZFS_DELEG_LOCAL		'l'
-#define	ZFS_DELEG_DESCENDENT	'd'
-#define	ZFS_DELEG_NA		'-'
-
-typedef enum {
-	ZFS_DELEG_NOTE_CREATE,
-	ZFS_DELEG_NOTE_DESTROY,
-	ZFS_DELEG_NOTE_SNAPSHOT,
-	ZFS_DELEG_NOTE_ROLLBACK,
-	ZFS_DELEG_NOTE_CLONE,
-	ZFS_DELEG_NOTE_PROMOTE,
-	ZFS_DELEG_NOTE_RENAME,
-	ZFS_DELEG_NOTE_RECEIVE,
-	ZFS_DELEG_NOTE_ALLOW,
-	ZFS_DELEG_NOTE_USERPROP,
-	ZFS_DELEG_NOTE_MOUNT,
-	ZFS_DELEG_NOTE_SHARE,
-	ZFS_DELEG_NOTE_NONE
-} zfs_deleg_note_t;
-
-typedef struct zfs_deleg_perm_tab {
-	char *z_perm;
-	zfs_deleg_note_t z_note;
-} zfs_deleg_perm_tab_t;
-
-extern zfs_deleg_perm_tab_t zfs_deleg_perm_tab[];
-
-int zfs_deleg_verify_nvlist(nvlist_t *nvlist);
-void zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
-    char checkflag, void *data);
-const char *zfs_deleg_canonicalize_perm(const char *perm);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_DELEG_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_DELEG_H
-#define	_ZFS_DELEG_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	ZFS_DELEG_SET_NAME_CHR		'@'		/* set name lead char */
-#define	ZFS_DELEG_FIELD_SEP_CHR		'$'		/* field separator */
-
-/*
- * Max name length for a delegation attribute
- */
-#define	ZFS_MAX_DELEG_NAME	128
-
-#define	ZFS_DELEG_LOCAL		'l'
-#define	ZFS_DELEG_DESCENDENT	'd'
-#define	ZFS_DELEG_NA		'-'
-
-typedef enum {
-	ZFS_DELEG_NOTE_CREATE,
-	ZFS_DELEG_NOTE_DESTROY,
-	ZFS_DELEG_NOTE_SNAPSHOT,
-	ZFS_DELEG_NOTE_ROLLBACK,
-	ZFS_DELEG_NOTE_CLONE,
-	ZFS_DELEG_NOTE_PROMOTE,
-	ZFS_DELEG_NOTE_RENAME,
-	ZFS_DELEG_NOTE_RECEIVE,
-	ZFS_DELEG_NOTE_ALLOW,
-	ZFS_DELEG_NOTE_USERPROP,
-	ZFS_DELEG_NOTE_MOUNT,
-	ZFS_DELEG_NOTE_SHARE,
-	ZFS_DELEG_NOTE_NONE
-} zfs_deleg_note_t;
-
-typedef struct zfs_deleg_perm_tab {
-	char *z_perm;
-	zfs_deleg_note_t z_note;
-} zfs_deleg_perm_tab_t;
-
-extern zfs_deleg_perm_tab_t zfs_deleg_perm_tab[];
-
-int zfs_deleg_verify_nvlist(nvlist_t *nvlist);
-void zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
-    char checkflag, void *data);
-const char *zfs_deleg_canonicalize_perm(const char *perm);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_DELEG_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_ZFS_DELEG_H
-#define	_ZFS_DELEG_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	ZFS_DELEG_SET_NAME_CHR		'@'		/* set name lead char */
-#define	ZFS_DELEG_FIELD_SEP_CHR		'$'		/* field separator */
-
-/*
- * Max name length for a delegation attribute
- */
-#define	ZFS_MAX_DELEG_NAME	128
-
-#define	ZFS_DELEG_LOCAL		'l'
-#define	ZFS_DELEG_DESCENDENT	'd'
-#define	ZFS_DELEG_NA		'-'
-
-typedef enum {
-	ZFS_DELEG_NOTE_CREATE,
-	ZFS_DELEG_NOTE_DESTROY,
-	ZFS_DELEG_NOTE_SNAPSHOT,
-	ZFS_DELEG_NOTE_ROLLBACK,
-	ZFS_DELEG_NOTE_CLONE,
-	ZFS_DELEG_NOTE_PROMOTE,
-	ZFS_DELEG_NOTE_RENAME,
-	ZFS_DELEG_NOTE_RECEIVE,
-	ZFS_DELEG_NOTE_ALLOW,
-	ZFS_DELEG_NOTE_USERPROP,
-	ZFS_DELEG_NOTE_MOUNT,
-	ZFS_DELEG_NOTE_SHARE,
-	ZFS_DELEG_NOTE_NONE
-} zfs_deleg_note_t;
-
-typedef struct zfs_deleg_perm_tab {
-	char *z_perm;
-	zfs_deleg_note_t z_note;
-} zfs_deleg_perm_tab_t;
-
-extern zfs_deleg_perm_tab_t zfs_deleg_perm_tab[];
-
-int zfs_deleg_verify_nvlist(nvlist_t *nvlist);
-void zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
-    char checkflag, void *data);
-const char *zfs_deleg_canonicalize_perm(const char *perm);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _ZFS_DELEG_H */

Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h
==============================================================================
--- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h	Thu Jun 11 18:42:31 2009	(r194037)
+++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h	Thu Jun 11 19:07:15 2009	(r194038)
@@ -71,222 +71,3 @@ boolean_t dsl_delegation_on(objset_t *os
 #endif
 
 #endif	/* _SYS_DSL_DELEG_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SYS_DSL_DELEG_H
-#define	_SYS_DSL_DELEG_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-#include 
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	ZFS_DELEG_PERM_NONE		""
-#define	ZFS_DELEG_PERM_CREATE		"create"
-#define	ZFS_DELEG_PERM_DESTROY		"destroy"
-#define	ZFS_DELEG_PERM_SNAPSHOT		"snapshot"
-#define	ZFS_DELEG_PERM_ROLLBACK		"rollback"
-#define	ZFS_DELEG_PERM_CLONE		"clone"
-#define	ZFS_DELEG_PERM_PROMOTE		"promote"
-#define	ZFS_DELEG_PERM_RENAME		"rename"
-#define	ZFS_DELEG_PERM_MOUNT		"mount"
-#define	ZFS_DELEG_PERM_SHARE		"share"
-#define	ZFS_DELEG_PERM_SEND		"send"
-#define	ZFS_DELEG_PERM_RECEIVE		"receive"
-#define	ZFS_DELEG_PERM_ALLOW		"allow"
-#define	ZFS_DELEG_PERM_USERPROP		"userprop"
-#define	ZFS_DELEG_PERM_VSCAN		"vscan"
-
-/*
- * Note: the names of properties that are marked delegatable are also
- * valid delegated permissions
- */
-
-int dsl_deleg_get(const char *ddname, nvlist_t **nvp);
-int dsl_deleg_set(const char *ddname, nvlist_t *nvp, boolean_t unset);
-int dsl_deleg_access(const char *ddname, const char *perm, cred_t *cr);
-void dsl_deleg_set_create_perms(dsl_dir_t *dd, dmu_tx_t *tx, cred_t *cr);
-int dsl_deleg_can_allow(char *ddname, nvlist_t *nvp, cred_t *cr);
-int dsl_deleg_can_unallow(char *ddname, nvlist_t *nvp, cred_t *cr);
-int dsl_deleg_destroy(objset_t *os, uint64_t zapobj, dmu_tx_t *tx);
-boolean_t dsl_delegation_on(objset_t *os);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _SYS_DSL_DELEG_H */
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SYS_DSL_DELEG_H
-#define	_SYS_DSL_DELEG_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include 
-#include 
-#include 
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	ZFS_DELEG_PERM_NONE		""
-#define	ZFS_DELEG_PERM_CREATE		"create"
-#define	ZFS_DELEG_PERM_DESTROY		"destroy"
-#define	ZFS_DELEG_PERM_SNAPSHOT		"snapshot"
-#define	ZFS_DELEG_PERM_ROLLBACK		"rollback"
-#define	ZFS_DELEG_PERM_CLONE		"clone"
-#define	ZFS_DELEG_PERM_PROMOTE		"promote"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 21:37:24 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C1231065674;
	Thu, 11 Jun 2009 21:37:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 41B7C8FC12;
	Thu, 11 Jun 2009 21:37:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BLbOiU060768;
	Thu, 11 Jun 2009 21:37:24 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BLbO2S060767;
	Thu, 11 Jun 2009 21:37:24 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906112137.n5BLbO2S060767@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 11 Jun 2009 21:37:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194040 - stable/7/lib/libc/gen
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 21:37:25 -0000

Author: jhb
Date: Thu Jun 11 21:37:23 2009
New Revision: 194040
URL: http://svn.freebsd.org/changeset/base/194040

Log:
  If the running kernel has support for shm_open() and shm_unlink() as
  system calls (i.e. 8.0+), then invoke the system calls instead of using
  open/fcntl/unlink.  This is a direct commit instead of an MFC since libc
  in 8.0 always uses the system calls directly.
  
  MFC after:	1 week

Modified:
  stable/7/lib/libc/gen/posixshm.c

Modified: stable/7/lib/libc/gen/posixshm.c
==============================================================================
--- stable/7/lib/libc/gen/posixshm.c	Thu Jun 11 21:32:26 2009	(r194039)
+++ stable/7/lib/libc/gen/posixshm.c	Thu Jun 11 21:37:23 2009	(r194040)
@@ -40,12 +40,34 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "un-namespace.h"
 
+static int _shm_in_kernel = -1;
+
+/* Wrappers for POSIX SHM system calls in newer kernels. */
+static __inline int
+_shm_open(const char *path, int flags, mode_t mode)
+{
+
+    return (syscall(482, path, flags, mode));
+}
+
+static __inline int
+_shm_unlink(const char *path)
+{
+
+    return (syscall(483, path));
+}
+
 int
 shm_open(const char *path, int flags, mode_t mode)
 {
 	int fd;
 	struct stat stab;
 
+	if (_shm_in_kernel == -1)
+		_shm_in_kernel = feature_present("posix_shm");
+	if (_shm_in_kernel == 1)
+		return (_shm_open(path, flags, mode));
+
 	if ((flags & O_ACCMODE) == O_WRONLY)
 		return (EINVAL);
 
@@ -68,5 +90,11 @@ shm_open(const char *path, int flags, mo
 int
 shm_unlink(const char *path)
 {
+
+	if (_shm_in_kernel == -1)
+		_shm_in_kernel = feature_present("posix_shm");
+	if (_shm_in_kernel == 1)
+		return (_shm_unlink(path));
+
 	return (unlink(path));
 }

From owner-svn-src-stable@FreeBSD.ORG  Thu Jun 11 22:00:54 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81D13106566C;
	Thu, 11 Jun 2009 22:00:54 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EC298FC30;
	Thu, 11 Jun 2009 22:00:54 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BM0s0a061355;
	Thu, 11 Jun 2009 22:00:54 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BM0seQ061353;
	Thu, 11 Jun 2009 22:00:54 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <200906112200.n5BM0seQ061353@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 11 Jun 2009 22:00:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194042 - stable/7/sys/dev/cxgb
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 11 Jun 2009 22:00:55 -0000

Author: gnn
Date: Thu Jun 11 22:00:54 2009
New Revision: 194042
URL: http://svn.freebsd.org/changeset/base/194042

Log:
  MFC of 194039 and part of 190330
  
  Re-add the send queue tunable for people who do not use buffering.

Modified:
  stable/7/sys/dev/cxgb/cxgb_main.c
  stable/7/sys/dev/cxgb/cxgb_offload.c

Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c	Thu Jun 11 21:41:51 2009	(r194041)
+++ stable/7/sys/dev/cxgb/cxgb_main.c	Thu Jun 11 22:00:54 2009	(r194042)
@@ -228,6 +228,15 @@ TUNABLE_INT("hw.cxgb.use_16k_clusters", 
 SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN,
     &cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue ");
 
+/*
+ * Tune the size of the output queue.
+ */
+int cxgb_snd_queue_len = IFQ_MAXLEN;
+TUNABLE_INT("hw.cxgb.snd_queue_len", &cxgb_snd_queue_len);
+SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN,
+    &cxgb_snd_queue_len, 0, "send queue size ");
+
+
 enum {
 	MAX_TXQ_ENTRIES      = 16384,
 	MAX_CTRL_TXQ_ENTRIES = 1024,
@@ -1029,7 +1038,7 @@ cxgb_port_attach(device_t dev)
 	ifp->if_timer = 0;	/* Disable ifnet watchdog */
 	ifp->if_watchdog = NULL;
 
-	ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
+	ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len;
 	IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
 	IFQ_SET_READY(&ifp->if_snd);
 

Modified: stable/7/sys/dev/cxgb/cxgb_offload.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_offload.c	Thu Jun 11 21:41:51 2009	(r194041)
+++ stable/7/sys/dev/cxgb/cxgb_offload.c	Thu Jun 11 22:00:54 2009	(r194042)
@@ -98,6 +98,9 @@ register_tdev(struct t3cdev *tdev)
 static inline void
 unregister_tdev(struct t3cdev *tdev)
 {
+	if (!inited)
+		return;
+
 	mtx_lock(&cxgb_db_lock);
 	TAILQ_REMOVE(&ofld_dev_list, tdev, entry);
 	mtx_unlock(&cxgb_db_lock);	

From owner-svn-src-stable@FreeBSD.ORG  Fri Jun 12 07:34:34 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 996D51065673;
	Fri, 12 Jun 2009 07:34:34 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6AD1A8FC19;
	Fri, 12 Jun 2009 07:34:34 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5C7YYHC073897;
	Fri, 12 Jun 2009 07:34:34 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5C7YY3t073895;
	Fri, 12 Jun 2009 07:34:34 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200906120734.n5C7YY3t073895@svn.freebsd.org>
From: Edwin Groothuis 
Date: Fri, 12 Jun 2009 07:34:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194046 - stable/7/share/timedef
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Jun 2009 07:34:35 -0000

Author: edwin
Date: Fri Jun 12 07:34:34 2009
New Revision: 194046
URL: http://svn.freebsd.org/changeset/base/194046

Log:
  MFC of r193498
  
  [patch] Portuguese timedef
  
  In Portuguese, the names of the days of the week are not capitalized.
  Also there is always a dash before "feira" in the names of the days.
  For example: "segunda-feira" and not "segunda feira" (which has a
  completely different meaning).
  
  x_fmt is not correct either. The date separator should not be a dot
  but a slash. Example: 31/12/2005 if far more used in Portugal than
  31.12.2005.
  
  References:
  - a Portuguese online dictionary http://priberam.pt/dlpo/dlpo.aspx
  - http://answers.com/days_of_the_week (there are translations to
  	various languages, including Portuguese, at the bottom of the
  	page)
  - http://en.wikipedia.org/wiki/Week-day_names (there are translations
  	to various languages, including Portuguese, at the bottom of the
  	page)
  - a Portuguese style guide
  	http://www.publico.clix.pt/nos/livro_estilo/16d-palavras.html
  	("datas" section)
  
  PR:           conf/58595
  Submitted by: Chris Stenton 

Modified:
  stable/7/share/timedef/   (props changed)
  stable/7/share/timedef/pt_PT.ISO8859-1.src
  stable/7/share/timedef/pt_PT.UTF-8.src

Modified: stable/7/share/timedef/pt_PT.ISO8859-1.src
==============================================================================
--- stable/7/share/timedef/pt_PT.ISO8859-1.src	Fri Jun 12 06:13:53 2009	(r194045)
+++ stable/7/share/timedef/pt_PT.ISO8859-1.src	Fri Jun 12 07:34:34 2009	(r194046)
@@ -36,23 +36,23 @@ Dezembro
 #
 # Short weekdays names
 #
-Dom
-Seg
-Ter
-Qua
-Qui
-Sex
-Sáb
+dom
+seg
+ter
+qua
+qui
+sex
+sáb
 #
 # Long weekdays names
 #
-Domingo
-Segunda Feira
-Terça Feira
-Quarta Feira
-Quinta Feira
-Sexta Feira
-Sábado
+domingo
+segunda-feira
+terça-feira
+quarta-feira
+quinta-feira
+sexta-feira
+sábado
 #
 # X_fmt
 #
@@ -60,7 +60,7 @@ Sábado
 #
 # x_fmt
 #
-%d.%m.%Y
+%d/%m/%Y
 #
 # c_fmt
 #

Modified: stable/7/share/timedef/pt_PT.UTF-8.src
==============================================================================
--- stable/7/share/timedef/pt_PT.UTF-8.src	Fri Jun 12 06:13:53 2009	(r194045)
+++ stable/7/share/timedef/pt_PT.UTF-8.src	Fri Jun 12 07:34:34 2009	(r194046)
@@ -36,23 +36,23 @@ Dezembro
 #
 # Short weekdays names
 #
-Dom
-Seg
-Ter
-Qua
-Qui
-Sex
-Sáb
+dom
+seg
+ter
+qua
+qui
+sex
+sáb
 #
 # Long weekdays names
 #
-Domingo
-Segunda Feira
-Terça Feira
-Quarta Feira
-Quinta Feira
-Sexta Feira
-Sábado
+domingo
+segunda-feira
+terça-feira
+quarta-feira
+quinta-feira
+sexta-feira
+sábado
 #
 # X_fmt
 #
@@ -60,7 +60,7 @@ Sábado
 #
 # x_fmt
 #
-%d.%m.%Y
+%d/%m/%Y
 #
 # c_fmt
 #

From owner-svn-src-stable@FreeBSD.ORG  Fri Jun 12 07:48:36 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F0B01065672;
	Fri, 12 Jun 2009 07:48:36 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AF8E8FC16;
	Fri, 12 Jun 2009 07:48:36 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5C7mZRs074253;
	Fri, 12 Jun 2009 07:48:35 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5C7mZ6L074250;
	Fri, 12 Jun 2009 07:48:35 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200906120748.n5C7mZ6L074250@svn.freebsd.org>
From: Edwin Groothuis 
Date: Fri, 12 Jun 2009 07:48:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194048 - stable/7/share/colldef
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 12 Jun 2009 07:48:36 -0000

Author: edwin
Date: Fri Jun 12 07:48:35 2009
New Revision: 194048
URL: http://svn.freebsd.org/changeset/base/194048

Log:
  MFC of r174887
  
  Add Turkish collate
  
  PR:		conf/118976
  Submitted by:	Ismail YENIGUL 

Added:
  stable/7/share/colldef/map.ISO8859-9
     - copied unchanged from r174887, head/share/colldef/map.ISO8859-9
  stable/7/share/colldef/tr_TR.ISO8859-9.src
     - copied unchanged from r174887, head/share/colldef/tr_TR.ISO8859-9.src
Modified:
  stable/7/share/colldef/   (props changed)
  stable/7/share/colldef/Makefile

Modified: stable/7/share/colldef/Makefile
==============================================================================
--- stable/7/share/colldef/Makefile	Fri Jun 12 07:39:10 2009	(r194047)
+++ stable/7/share/colldef/Makefile	Fri Jun 12 07:48:35 2009	(r194048)
@@ -36,6 +36,7 @@ LOCALES=	bg_BG.CP1251 \
 		sr_YU.ISO8859-5 \
 		sv_SE.ISO8859-1 \
 		sv_SE.ISO8859-15 \
+		tr_TR.ISO8859-9 \
 		uk_UA.CP1251 \
 		uk_UA.ISO8859-5 \
 		uk_UA.KOI8-U
@@ -60,7 +61,7 @@ ${locale}.out: map.${locale:E}
 CLEANFILES=	${FILES}
 
 ENCODINGS=	Big5 Big5HKSCS CP949 eucCN eucJP eucKR GB18030 GB2312 GBK \
-		ISO8859-1 ISO8859-2 ISO8859-9 ISO8859-15 SJIS US-ASCII UTF-8
+		ISO8859-1 ISO8859-2 ISO8859-15 SJIS US-ASCII UTF-8
 
 ISO8859-1_Big5=	is_IS:zh_TW
 ISO8859-1_ISO8859-1= ${ISO8859-15_ISO8859-15} pt_PT:pt_BR
@@ -83,7 +84,6 @@ US-ASCII_eucKR=	la_LN:ko_KR
 US-ASCII_GB18030= la_LN:zh_CN
 US-ASCII_GB2312= la_LN:zh_CN
 US-ASCII_GBK=	la_LN:zh_CN
-US-ASCII_ISO8859-9= la_LN:tr_TR
 US-ASCII_SJIS=	la_LN:ja_JP
 
 ASCIILINKS=	en_AU en_CA en_GB en_NZ en_US

Copied: stable/7/share/colldef/map.ISO8859-9 (from r174887, head/share/colldef/map.ISO8859-9)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/share/colldef/map.ISO8859-9	Fri Jun 12 07:48:35 2009	(r194048, copy of r174887, head/share/colldef/map.ISO8859-9)
@@ -0,0 +1,175 @@
+# $FreeBSD$
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+!I \xa1
+Ct \xa2
+Pd \xa3
+Cu \xa4
+Ye \xa5
+BB \xa6
+SE \xa7
+': \xa8
+Co \xa9
+-a \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+'m \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+'' \xb4
+My \xb5
+PI \xb6
+.M \xb7
+', \xb8
+1S \xb9
+-o \xba
+>> \xbb
+14 \xbc
+12 \xbd
+34 \xbe
+?I \xbf
+A! \xc0
+A' \xc1
+A> \xc2
+A? \xc3
+A: \xc4
+AA \xc5
+AE \xc6
+C, \xc7
+E! \xc8
+E' \xc9
+E> \xca
+E: \xcb
+I! \xcc
+I' \xcd
+I> \xce
+I: \xcf
+G( \xd0
+N? \xd1
+O! \xd2
+O' \xd3
+O> \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+O/ \xd8
+U! \xd9
+U' \xda
+U> \xdb
+U: \xdc
+I. \xdd
+S, \xde
+ss \xdf
+a! \xe0
+a' \xe1
+a> \xe2
+a? \xe3
+a: \xe4
+aa \xe5
+ae \xe6
+c, \xe7
+e! \xe8
+e' \xe9
+e; \xea
+e: \xeb
+e. \xec
+i' \xed
+i> \xee
+i- \xef
+g( \xf0
+n? \xf1
+o! \xf2
+o' \xf3
+o> \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+o/ \xf8
+u! \xf9
+u' \xfa
+u> \xfb
+u: \xfc
+i. \xfd
+s, \xfe
+y: \xff

Copied: stable/7/share/colldef/tr_TR.ISO8859-9.src (from r174887, head/share/colldef/tr_TR.ISO8859-9.src)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/share/colldef/tr_TR.ISO8859-9.src	Fri Jun 12 07:48:35 2009	(r194048, copy of r174887, head/share/colldef/tr_TR.ISO8859-9.src)
@@ -0,0 +1,36 @@
+# latin5 (backward compatible with ASCII)
+#
+# $FreeBSD$
+#
+charmap map.ISO8859-9
+order \
+# controls
+	;...;;;...;;\
+#
+	;;!;;\";<<<>;/>>;;\
+	;;;;;\
+	%;&;<',>;';\(;\);*;+;<+->;<-:>;<*X>;\,;<-->;-;.;/;\
+# digits
+	(0,<14>,<12>,<34>);(1,<1S>);(2,<2S>);(3,<3S>);4;...;9;\
+#
+	:;\;;\<;=;>;?;;;;;;;\
+# capital
+	(A,,,>,,,,);\
+	B;(C,);D;(E,,,>,);\
+	F;G;;H;(I,,,>,);;\
+	J;...;M;(N,);(O,,,>,,,);\
+	P;...;S;;T;(U,,,>,);\
+	V;W;X;Y;Z;\
+#
+	[;\\;];^;<':>;_;<'m>;<''>;`;\
+# small
+	(a,,,>,,,,);\
+	b;(c,);d;(e,,,,);\
+	f;g;;h;;(i,,,>,);\
+	j;...;m;(n,);(o,,,>,,,);\
+	p;...;s;;;t;(u,,,>,);\
+	v;w;x;(y,);z;\
+#
+	\{;;|;;\};~;<.M>;;;
;\ +# remains + <-a>;<-o> From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 10:26:56 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162D01065670; Fri, 12 Jun 2009 10:26:56 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8BD7F8FC12; Fri, 12 Jun 2009 10:26:55 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5CAD86c036138; Fri, 12 Jun 2009 14:13:08 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Fri, 12 Jun 2009 14:13:08 +0400 (MSD) From: Dmitry Morozovsky To: John Baldwin In-Reply-To: <200906112137.n5BLbO2S060767@svn.freebsd.org> Message-ID: References: <200906112137.n5BLbO2S060767@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Fri, 12 Jun 2009 14:13:08 +0400 (MSD) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r194040 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 10:26:56 -0000 On Thu, 11 Jun 2009, John Baldwin wrote: JB> Author: jhb JB> Date: Thu Jun 11 21:37:23 2009 JB> New Revision: 194040 JB> URL: http://svn.freebsd.org/changeset/base/194040 JB> JB> Log: JB> If the running kernel has support for shm_open() and shm_unlink() as JB> system calls (i.e. 8.0+), then invoke the system calls instead of using JB> open/fcntl/unlink. This is a direct commit instead of an MFC since libc JB> in 8.0 always uses the system calls directly. So it could help running RELENG_7 jails under 8 host? Great, thanks! -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 12:59:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B38F106566B; Fri, 12 Jun 2009 12:59:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0068FC13; Fri, 12 Jun 2009 12:59:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1CC5646B35; Fri, 12 Jun 2009 08:59:25 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1DC3F8A06F; Fri, 12 Jun 2009 08:59:24 -0400 (EDT) From: John Baldwin To: Dmitry Morozovsky Date: Fri, 12 Jun 2009 08:51:32 -0400 User-Agent: KMail/1.9.7 References: <200906112137.n5BLbO2S060767@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906120851.32846.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 12 Jun 2009 08:59:24 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r194040 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 12:59:26 -0000 On Friday 12 June 2009 6:13:08 am Dmitry Morozovsky wrote: > On Thu, 11 Jun 2009, John Baldwin wrote: > > JB> Author: jhb > JB> Date: Thu Jun 11 21:37:23 2009 > JB> New Revision: 194040 > JB> URL: http://svn.freebsd.org/changeset/base/194040 > JB> > JB> Log: > JB> If the running kernel has support for shm_open() and shm_unlink() as > JB> system calls (i.e. 8.0+), then invoke the system calls instead of using > JB> open/fcntl/unlink. This is a direct commit instead of an MFC since libc > JB> in 8.0 always uses the system calls directly. > > So it could help running RELENG_7 jails under 8 host? In that case it probably doesn't matter either way. The goal is that if you have an 8.x binary and a 7.x binary that are both using shm_open() with a path to open a SHM region for IPC, they will both access the same object. If you have all 8.x binaries or all < 8.x binaries in the group that shares access to a named SHM region then that case would work regardless. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 13:34:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325BE1065672; Fri, 12 Jun 2009 13:34:47 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id DD7F18FC20; Fri, 12 Jun 2009 13:34:46 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id 3BC56359950; Fri, 12 Jun 2009 15:34:46 +0200 (CEST) X-Spam-DCC: EATSERVER: scanner01.stack.nl 1166; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on scanner01.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Relay-Country: _RELAYCOUNTRY_ Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 2AAAF359935; Fri, 12 Jun 2009 15:34:44 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id CA053228CB; Fri, 12 Jun 2009 15:34:18 +0200 (CEST) Date: Fri, 12 Jun 2009 15:34:18 +0200 From: Jilles Tjoelker To: John Baldwin Message-ID: <20090612133418.GA8206@stack.nl> References: <200906112137.n5BLbO2S060767@svn.freebsd.org> <200906120851.32846.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906120851.32846.jhb@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Dmitry Morozovsky Subject: Re: svn commit: r194040 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 13:34:47 -0000 On Fri, Jun 12, 2009 at 08:51:32AM -0400, John Baldwin wrote: > On Friday 12 June 2009 6:13:08 am Dmitry Morozovsky wrote: > > On Thu, 11 Jun 2009, John Baldwin wrote: > > > > JB> Author: jhb > > JB> Date: Thu Jun 11 21:37:23 2009 > > JB> New Revision: 194040 > > JB> URL: http://svn.freebsd.org/changeset/base/194040 > > JB> > > JB> Log: > > JB> If the running kernel has support for shm_open() and shm_unlink() as > > JB> system calls (i.e. 8.0+), then invoke the system calls instead of using > > JB> open/fcntl/unlink. This is a direct commit instead of an MFC since libc > > JB> in 8.0 always uses the system calls directly. > > > > So it could help running RELENG_7 jails under 8 host? > In that case it probably doesn't matter either way. The goal is that if you > have an 8.x binary and a 7.x binary that are both using shm_open() with a > path to open a SHM region for IPC, they will both access the same object. > If you have all 8.x binaries or all < 8.x binaries in the group that shares > access to a named SHM region then that case would work regardless. where "< 8.x binaries" refers to those using 7.x's libc.so.7. Normally, a 7.x binary running on 8.x will link to 8.x's libc.so.7 and therefore use the new SHM objects even without this change. The change will likely help people that link statically to libc (boo!) or do weird things with the 7.x libc.so.7 file. -- Jilles Tjoelker From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 15:53:57 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09B461065670; Fri, 12 Jun 2009 15:53:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB1448FC22; Fri, 12 Jun 2009 15:53:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5CFruM3086114; Fri, 12 Jun 2009 15:53:56 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5CFrufc086111; Fri, 12 Jun 2009 15:53:56 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906121553.n5CFrufc086111@svn.freebsd.org> From: John Baldwin Date: Fri, 12 Jun 2009 15:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194063 - stable/7/lib/libutil X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 15:53:57 -0000 Author: jhb Date: Fri Jun 12 15:53:56 2009 New Revision: 194063 URL: http://svn.freebsd.org/changeset/base/194063 Log: MFC: Add manpages for kinfo_getfile() and kinfo_getvmmap(). Added: stable/7/lib/libutil/kinfo_getfile.3 - copied unchanged from r185729, head/lib/libutil/kinfo_getfile.3 stable/7/lib/libutil/kinfo_getvmmap.3 - copied unchanged from r185729, head/lib/libutil/kinfo_getvmmap.3 Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/Makefile Modified: stable/7/lib/libutil/Makefile ============================================================================== --- stable/7/lib/libutil/Makefile Fri Jun 12 15:44:35 2009 (r194062) +++ stable/7/lib/libutil/Makefile Fri Jun 12 15:53:56 2009 (r194063) @@ -30,7 +30,8 @@ MAN+= kld.3 login.3 login_auth.3 login_t login_cap.3 login_class.3 login_times.3 login_ok.3 \ _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \ - pidfile.3 flopen.3 expand_number.3 + pidfile.3 flopen.3 expand_number.3 \ + kinfo_getfile.3 kinfo_getvmmap.3 MAN+= login.conf.5 auth.conf.5 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+= property.3 properties_read.3 property.3 properties_free.3 Copied: stable/7/lib/libutil/kinfo_getfile.3 (from r185729, head/lib/libutil/kinfo_getfile.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libutil/kinfo_getfile.3 Fri Jun 12 15:53:56 2009 (r194063, copy of r185729, head/lib/libutil/kinfo_getfile.3) @@ -0,0 +1,74 @@ +.\" +.\" Copyright (c) 2008 Peter Wemm +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 6, 2008 +.Os +.Dt KINFO_GETFILE 3 +.Sh NAME +.Nm kinfo_getfile +.Nd function for getting per-process file descriptor information +.Sh LIBRARY +.Lb libutil +.Sh SYNOPSIS +.In sys/types.h +.In libutil.h +.Ft struct kinfo_file * +.Fn kinfo_getfile "pid_t pid" "int *cntp" +.Sh DESCRIPTION +This function is used for obtaining the file descriptor information +of a particular process. +.Pp +The +.Ar pid +field contains the process identifier. +This should be the a process that you have privilige to access. +The +.Ar cntp +field is allows the caller to know how many records are returned. +.Pp +This function is a wrapper around +.Xr sysctl 3 +with the +.Dv KERN_PROC_FILEDESC +mib. +While the kernel returns a packed structure, this function expands the +data into a fixed record format. +.Sh RETURN VALUES +The +.Fn kinfo_getfile +function returns a pointer to an array of +.Vt struct kinfo_file +structures. +The array was obtained by an internal call to +.Xr malloc 3 +and must be freed by the caller with a call to +.Xr free 3 . +.Sh SEE ALSO +.Xr free 3 , +.Xr kinfo_getvmmap 3 , +.Xr malloc 3 , +.Xr sysctl 3 Copied: stable/7/lib/libutil/kinfo_getvmmap.3 (from r185729, head/lib/libutil/kinfo_getvmmap.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libutil/kinfo_getvmmap.3 Fri Jun 12 15:53:56 2009 (r194063, copy of r185729, head/lib/libutil/kinfo_getvmmap.3) @@ -0,0 +1,73 @@ +.\" +.\" Copyright (c) 2008 Peter Wemm +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 6, 2008 +.Os +.Dt KINFO_GETVMMAP 3 +.Sh NAME +.Nm kinfo_getvmmap +.Nd function for getting per-process memory map information +.Sh LIBRARY +.Lb libutil +.Sh SYNOPSIS +.In sys/types.h +.In libutil.h +.Ft struct kinfo_vmentry * +.Fn kinfo_getfile "pid_t pid" "int *cntp" +.Sh DESCRIPTION +This function is used for obtaining the file descriptor information +of a particular process. +.Pp +The +.Ar pid +field contains the process identifier. +This should be the a process that you have privilige to access. +The +.Ar cntp +field is allows the caller to know how many records are returned. +.Pp +This function is a wrapper around +.Xr sysctl 3 +with the +.Dv KERN_PROC_VMMAP +mib. +While the kernel returns a packed structure, this function expands the +data into a fixed record format. +.Sh RETURN VALUES +The +.Fn kinfo_getvmmap +function returns a pointer to an array of +.Vt struct kinfo_vmentry +structures. +The array was obtained by an internal call to +.Xr malloc 3 +and must be freed by the caller with a call to +.Xr free 3 . +.Sh SEE ALSO +.Xr free 3 , +.Xr kinfo_getfile 3 , +.Xr malloc 3 From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 18:46:02 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 970E9106564A; Fri, 12 Jun 2009 18:46:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 66FAA8FC1D; Fri, 12 Jun 2009 18:46:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 05F3E46B29; Fri, 12 Jun 2009 14:46:02 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DD30D8A06C; Fri, 12 Jun 2009 14:46:00 -0400 (EDT) From: John Baldwin To: Jilles Tjoelker Date: Fri, 12 Jun 2009 14:44:24 -0400 User-Agent: KMail/1.9.7 References: <200906112137.n5BLbO2S060767@svn.freebsd.org> <200906120851.32846.jhb@freebsd.org> <20090612133418.GA8206@stack.nl> In-Reply-To: <20090612133418.GA8206@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906121444.25292.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 12 Jun 2009 14:46:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Dmitry Morozovsky Subject: Re: svn commit: r194040 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 18:46:03 -0000 On Friday 12 June 2009 9:34:18 am Jilles Tjoelker wrote: > On Fri, Jun 12, 2009 at 08:51:32AM -0400, John Baldwin wrote: > > On Friday 12 June 2009 6:13:08 am Dmitry Morozovsky wrote: > > > On Thu, 11 Jun 2009, John Baldwin wrote: > > > > > > JB> Author: jhb > > > JB> Date: Thu Jun 11 21:37:23 2009 > > > JB> New Revision: 194040 > > > JB> URL: http://svn.freebsd.org/changeset/base/194040 > > > JB> > > > JB> Log: > > > JB> If the running kernel has support for shm_open() and shm_unlink() as > > > JB> system calls (i.e. 8.0+), then invoke the system calls instead of using > > > JB> open/fcntl/unlink. This is a direct commit instead of an MFC since libc > > > JB> in 8.0 always uses the system calls directly. > > > > > > So it could help running RELENG_7 jails under 8 host? > > > In that case it probably doesn't matter either way. The goal is that if you > > have an 8.x binary and a 7.x binary that are both using shm_open() with a > > path to open a SHM region for IPC, they will both access the same object. > > > If you have all 8.x binaries or all < 8.x binaries in the group that shares > > access to a named SHM region then that case would work regardless. > > where "< 8.x binaries" refers to those using 7.x's libc.so.7. > Normally, a 7.x binary running on 8.x will link to 8.x's libc.so.7 and > therefore use the new SHM objects even without this change. True. It is more relevant to libc.so.[46] which I plan to update next week when the MFC after timer expires, and that is the true target audience I have in mind (many people still use 4.x and 6.x binaries on newer kernels). -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Fri Jun 12 20:41:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80B2C1065672; Fri, 12 Jun 2009 20:41:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAE28FC0C; Fri, 12 Jun 2009 20:41:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5CKfihc092292; Fri, 12 Jun 2009 20:41:44 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5CKfij7092288; Fri, 12 Jun 2009 20:41:44 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200906122041.n5CKfij7092288@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 12 Jun 2009 20:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194075 - in stable/7/sys: . amd64/amd64 amd64/include contrib/pf dev/ath/ath_hal i386/i386 i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 20:41:45 -0000 Author: jkim Date: Fri Jun 12 20:41:44 2009 New Revision: 194075 URL: http://svn.freebsd.org/changeset/base/194075 Log: MFC: r175904, r175905, r186009 Sync amd64 and i386 CPUID feature flags with -CURRENT. - amd64 only: DTES64, SSE4.1, SSE4.2, x2APIC, POPCNT - both: ABM, SSE4A, MAS, OSVW, IBS, SSE5, SKINIT, WDT PR: kern/135202 Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/identcpu.c stable/7/sys/amd64/include/specialreg.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/i386/i386/identcpu.c stable/7/sys/i386/include/specialreg.h Modified: stable/7/sys/amd64/amd64/identcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/identcpu.c Fri Jun 12 20:29:55 2009 (r194074) +++ stable/7/sys/amd64/amd64/identcpu.c Fri Jun 12 20:41:44 2009 (r194075) @@ -223,7 +223,7 @@ printcpuinfo(void) "\020" "\001SSE3" /* SSE3 */ "\002" - "\003RSVD2" /* "Reserved" bit 2 */ + "\003DTES64" /* 64-bit Debug Trace */ "\004MON" /* MONITOR/MWAIT Instructions */ "\005DS_CPL" /* CPL Qualified Debug Store */ "\006VMX" /* Virtual Machine Extensions */ @@ -240,11 +240,11 @@ printcpuinfo(void) "\021" "\022" "\023DCA" /* Direct Cache Access */ - "\024" - "\025" - "\026" + "\024SSE4.1" + "\025SSE4.2" + "\026x2APIC" /* xAPIC Extensions */ "\027" - "\030" + "\030POPCNT" "\031" "\032" "\033XSAVE" @@ -311,15 +311,15 @@ printcpuinfo(void) "\003SVM" /* Secure Virtual Mode */ "\004ExtAPIC" /* Extended APIC register */ "\005CR8" /* CR8 in legacy mode */ - "\006" - "\007" - "\010" + "\006ABM" /* LZCNT instruction */ + "\007SSE4A" /* SSE4A */ + "\010MAS" /* Misaligned SSE mode */ "\011Prefetch" /* 3DNow! Prefetch/PrefetchW */ - "\012" - "\013" - "\014" - "\015" - "\016" + "\012OSVW" /* OS visible workaround */ + "\013IBS" /* Instruction based sampling */ + "\014SSE5" /* SSE5 */ + "\015SKINIT" /* SKINIT/STGI */ + "\016WDT" /* Watchdog timer */ "\017" "\020" "\021" Modified: stable/7/sys/amd64/include/specialreg.h ============================================================================== --- stable/7/sys/amd64/include/specialreg.h Fri Jun 12 20:29:55 2009 (r194074) +++ stable/7/sys/amd64/include/specialreg.h Fri Jun 12 20:41:44 2009 (r194075) @@ -113,6 +113,7 @@ #define CPUID_PBE 0x80000000 #define CPUID2_SSE3 0x00000001 +#define CPUID2_DTES64 0x00000004 #define CPUID2_MON 0x00000008 #define CPUID2_DS_CPL 0x00000010 #define CPUID2_VMX 0x00000020 @@ -125,6 +126,10 @@ #define CPUID2_XTPR 0x00004000 #define CPUID2_PDCM 0x00008000 #define CPUID2_DCA 0x00040000 +#define CPUID2_SSE41 0x00080000 +#define CPUID2_SSE42 0x00100000 +#define CPUID2_X2APIC 0x00200000 +#define CPUID2_POPCNT 0x00800000 /* * Important bits in the AMD extended cpuid flags @@ -145,7 +150,15 @@ #define AMDID2_SVM 0x00000004 #define AMDID2_EXT_APIC 0x00000008 #define AMDID2_CR8 0x00000010 +#define AMDID2_ABM 0x00000020 +#define AMDID2_SSE4A 0x00000040 +#define AMDID2_MAS 0x00000080 #define AMDID2_PREFETCH 0x00000100 +#define AMDID2_OSVW 0x00000200 +#define AMDID2_IBS 0x00000400 +#define AMDID2_SSE5 0x00000800 +#define AMDID2_SKINIT 0x00001000 +#define AMDID2_WDT 0x00002000 /* * CPUID instruction 1 eax info Modified: stable/7/sys/i386/i386/identcpu.c ============================================================================== --- stable/7/sys/i386/i386/identcpu.c Fri Jun 12 20:29:55 2009 (r194074) +++ stable/7/sys/i386/i386/identcpu.c Fri Jun 12 20:41:44 2009 (r194075) @@ -808,15 +808,15 @@ printcpuinfo(void) "\003SVM" /* Secure Virtual Mode */ "\004ExtAPIC" /* Extended APIC register */ "\005CR8" /* CR8 in legacy mode */ - "\006" - "\007" - "\010" + "\006ABM" /* LZCNT instruction */ + "\007SSE4A" /* SSE4A */ + "\010MAS" /* Misaligned SSE mode */ "\011Prefetch" /* 3DNow! Prefetch/PrefetchW */ - "\012" - "\013" - "\014" - "\015" - "\016" + "\012OSVW" /* OS visible workaround */ + "\013IBS" /* Instruction based sampling */ + "\014SSE5" /* SSE5 */ + "\015SKINIT" /* SKINIT/STGI */ + "\016WDT" /* Watchdog timer */ "\017" "\020" "\021" Modified: stable/7/sys/i386/include/specialreg.h ============================================================================== --- stable/7/sys/i386/include/specialreg.h Fri Jun 12 20:29:55 2009 (r194074) +++ stable/7/sys/i386/include/specialreg.h Fri Jun 12 20:41:44 2009 (r194075) @@ -147,7 +147,15 @@ #define AMDID2_SVM 0x00000004 #define AMDID2_EXT_APIC 0x00000008 #define AMDID2_CR8 0x00000010 +#define AMDID2_ABM 0x00000020 +#define AMDID2_SSE4A 0x00000040 +#define AMDID2_MAS 0x00000080 #define AMDID2_PREFETCH 0x00000100 +#define AMDID2_OSVW 0x00000200 +#define AMDID2_IBS 0x00000400 +#define AMDID2_SSE5 0x00000800 +#define AMDID2_SKINIT 0x00001000 +#define AMDID2_WDT 0x00002000 /* * CPUID instruction 1 eax info From owner-svn-src-stable@FreeBSD.ORG Sat Jun 13 13:09:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF78F1065674; Sat, 13 Jun 2009 13:09:19 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBECE8FC16; Sat, 13 Jun 2009 13:09:19 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5DD9JeM014513; Sat, 13 Jun 2009 13:09:19 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5DD9J6a014512; Sat, 13 Jun 2009 13:09:19 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906131309.n5DD9J6a014512@svn.freebsd.org> From: Edwin Groothuis Date: Sat, 13 Jun 2009 13:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194105 - stable/7/share/misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 13:09:20 -0000 Author: edwin Date: Sat Jun 13 13:09:19 2009 New Revision: 194105 URL: http://svn.freebsd.org/changeset/base/194105 Log: MFC of r175407 r187024 r193586 r193609 r175407 Correct that LSI 0060 is a mfi device and not mpt. r187024 Correct description for the Marvell 88SE6101. r193586 Regen: * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y). * Boemler: vendors.txt (2008-06-06) r193609 Remove cruft at 0E11-0002. Informed upstream. Modified: stable/7/share/misc/pci_vendors (contents, props changed) Modified: stable/7/share/misc/pci_vendors ============================================================================== --- stable/7/share/misc/pci_vendors Sat Jun 13 13:07:56 2009 (r194104) +++ stable/7/share/misc/pci_vendors Sat Jun 13 13:09:19 2009 (r194105) @@ -3,14 +3,14 @@ ; Automatically generated by src/tools/tools/pciid/mk_pci_vendors.pl ; (with the -l option), using the following source lists: ; -; http://www.pcidatabase.com/reports.php?type=tab-delimeted +; http://www.pcidatabase.com/reports.php?type=csv ; http://members.datafast.net.au/dft0802/downloads/pcidevs.txt ; ; Manual edits on this file will be lost! ; 0000 Gammagraphx Inc 001A Ascend Communications Inc -0033 Paradyne Corp. +0033 Paradyne Corp 003D Real 3D (Was: Lockheed Martin-Marietta Corp) 00D1 i740 PCI Graphics Accelerator 0070 Hauppauge Computer Works Inc. @@ -18,11 +18,12 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE + 6800 Hauppage Nova -TD-500 DVB-T Tuner Device 0071 Nebula Electronics Ltd -0100 Ncipher Corp. Ltd +0100 Ncipher Corp Ltd 0123 General Dynamics 0246 Addtron(??) -0315 SK - Electronics Co., Ltd. +0315 SK - Electronics Co Ltd 0357 TTTech AG 000A TTP-Monitoring Card V2.0 0403 Future Technology Devices International Ltd @@ -68,7 +69,64 @@ FFA8 Scitel Quadro 09C1 Arris 0704 CM 200E Cable Modem -0A89 BREA Technologies Inc. +0A5C Broadcom Corporation + 0201 Broadcom USB iLine10(tm) Network Adapter + 2000 Broadcom Bluetooth Firmware Upgrade Device + 2009 Broadcom Bluetooth Controller + 200A Broadcom Bluetooth Controller + 200F Broadcom Bluetooth Controller + 201D BROADCOM Bluetooth Device + 201E IBM Integrated Bluetooth IV + 2020 Broadcom Bluetooth Dongle + 2021 BCM2035B3 ROM Adapter Generic + 2033 Broadcom Blutonium Device Firmware Downloader + 2035 BCM2035 Bluetooth + 2038 Broadcom Blutonium Device Firmware Downloader (BCM2038) + 2039 BROADCOM Bluetooth Device + 2045 Broadcom Bluetooth Controller + 2046 Broadcom USB Bluetooth Device + 2047 Broadcom USB Bluetooth Device + 205E Broadcom Bluetooth Firmware Upgrade Device + 2100 Broadcom Bluetooth 2.0+eDR USB dongle + 2101 Broadcom Bluetooth 2.0+EDR USB dongle + 2102 ANYCOM Blue USB-200/250 + 2110 Broadcom Bluetooth Controller + 2111 ANYCOM Blue USB-UHE 200/250 + 2120 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045) + 2121 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter + 2122 Broadcom Bluetooth 2.0+EDR USB dongle + 2124 2045B3ROM Bluetooth Dongle + 2130 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter + 2131 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter + 2140 2046 Flash UHE Class 2 + 2141 2046 Flash non UHE Class 2 + 2142 2046 Flash non UHE Class 1 + 2143 2046 Flash non UHE Class 1 + 2144 2046 Flash non UHE module Class 2 + 2145 Broadcom BCM9204MD LENO Module + 2146 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2147 Broadcom 2046 Bluetooth 2.1 USB Dongle + 2148 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2149 Broadcom 2046 Bluetooth 2.1 USB Dongle + 214A Broadcom 2046 Bluetooth 2.1 USB Module + 214B Broadcom 2046 Bluetooth 2.1 USB Module + 214C Broadcom 2046 Bluetooth 2.1 USB Module + 214D Broadcom Bluetooth 2.1 UHE Module + 214E Thinkpad Bluetooth with Enhanced Data Rate II + 214F Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2150 Broadcom 2046 Bluetooth 2.1 USB Dongle + 2151 Broadcom 2046 Bluetooth 2.1 USB Dongle + 2152 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2153 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2154 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2155 Broadcom Bluetooth USB Dongle + 2157 BCM2046 B1 USB 500 + 2158 Broadcom 2046 Bluetooth 2.1 Device + 4502 USB Human Interface Device + 4503 USB Human Interface Device + 5800 Unified Security Hub + 6300 Pirelli ISB Remote NDIS Device +0A89 BREA Technologies Inc 0B0B Rhino Equiment Corp. 0105 Rhino R1T1 0205 Rhino R4FXO @@ -89,11 +147,11 @@ 0E11 Compaq Computer Corp (Now owned by Hewlett-Packard) 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge - 000F CPQB1A9 StorageWorks Library Adapter (HVD) - 0012 686P7 686P7 - 0046 Smart Array 64xx Controller - 0049 NC7132 Gigabit Upgrade Module - 004A NC6136 Gigabit Server Adapter + 000F StorageWorks Library Adapter (HVD) (CPQB1A9) + 0012 686P7 (686P7) + 0046 Smart Array 64xx/6i Controller + 0049 Gigabit Upgrade Module (NC7132) + 004A Gigabit Server Adapter (NC6136) 007C NC7770 1000BaseTX 007D NC6770 1000BaseTX 0085 NC7780 1000BaseTX @@ -105,13 +163,13 @@ 00D0 NC7782 00D1 NC7783 00E3 NC7761 - 0508 Netelligent 4/16 TR PCI UTP/STP Controller - 1000 Triflex/Pentium Bridge, Model 1000 - 2000 Triflex/Pentium Bridge, Model 2000 - 3032 QVision 1280/p v0 GUI Accelerator - 3033 QVision 1280/p v1 GUI Accelerator - 3034 QVision 1280/p v2 GUI Accelerator - 4000 Triflex Model 4000 Pentium Bridge + 0508 PCI UTP/STP Controller (Neteligent 4/16 TR) + 1000 Pentium Bridge (Triflex Model 1000) + 2000 Pentium Bridge (Triflex Model 2000) + 3032 GUI Accelerator (QVision 1280/p v0) + 3033 GUI Accelerator (QVision 1280/p v1) + 3034 GUI Accelerator (QVision 1280/p v2) + 4000 Pentium Bridge (Triflex Model 4000) 4030 SMART-2/P 4031 SMART-2SL 4032 Smart Array 3200 @@ -131,57 +189,57 @@ 409B Smart Array 642 409C Smart Array 6400 409D Smart Array 6400 EM - 6010 Model 6010 HotPlug PCI Bridge + 6010 HotPlug PCI Bridge (Model 6010) 7020 USB Controller A0EC Original Compaq fibre Channel HBA A0F0 Advanced System Management Controller A0F3 Triflex PCI to ISA PnP Bridge A0F7 PCI Hot Plug Controller - A0F8 ZFMicro USB Open Host Controller + A0F8 USB Open Host Controller (ZFMicro) A0FC HPFC-5166A Tachyon TL 64-bit/66MHz Fibre Channel Adapter AE10 Smart-2 Array Controller - AE29 MIS-L PCI to ISA Bridge - AE2A MPC CPU to PCI Bridge - AE2B MIS-E PCI to ISA PnP Bridge - AE31 System Management Controller + AE29 PCI to ISA Bridge (MIS-L) + AE2A CPU to PCI Bridge (MPC) + AE2B PCI to ISA PnP Bridge (MIS-E) + AE31 System Management Controller (1002&DEV-4385&SUBSY) AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 - AE33 Triflex Dual EIDE Controller + AE33 Dual EIDE Controller (Triflex) AE34 Netelligent 10 T PCI UTP TLAN 2.3 - AE35 Integrated NetFlex 3/P TLAN 2.3 + AE35 Integrated NetFlex-3/P TLAN 2.3 AE40 Dual-port Netelligent 10/100 TX PCI TLAN 3.03 AE43 Integrated Netelligent 10/100 TX PCI TLAN 2.3 - AE69 CETUS-L PCI to ISA Bridge - AE6C DRACO PCI Bridge - AE6D NorthStar CPU to PCI Bridge - B011 Dual Port Netelligent 10/100 TX - B012 Netelligent 10 T/2 UTP/Coax PCI - B01E NC3120 Fast Ethernet NIC - B01F NC3122 Fast Ethernet NIC - B02F NC1120 Ethernet NIC - B030 Netelligent WS 1500 10/100TX Embedded UTP/Coax Controller - B04A 699209-003 10/100TX WOL UTP Controller + AE69 PCI to ISA Bridge (CETUS-L) + AE6C PCI Bridge (DRACO) + AE6D CPU to PCI Bridge (NorthStar) + B011 Dual-port Netelligent 10/100 TX + B012 UTP/Coax PCI (Netelligent 10 T/2) + B01E Fast Ethernet NIC (NC3120) + B01F Fast Ethernet NIC (NC3122) + B02F Ethernet NIC (NC1120) + B030 10/100TX Embedded UTP/Coax Controller (Netelligent WS 1500) + B04A 10/100TX WOL UTP Controller (699209-003) B060 CISS SMART2 Array Controller B0C6 NC3161 Fast Ethernet Embedded Controller with WOL - B0C7 NC3160 Fast Ethernet NIC - B0D7 NC3121 Fast Ethernet NIC (Rev A & B) - B0DD NC3131 Fast Ethernet NIC + B0C7 Fast Ethernet NIC (NC3160) + B0D7 Fast Ethernet NIC (NC3121 rev. A & B) + B0DD Fast Ethernet NIC (NC3131) B0DE NC3132 Fast Ethernet Module - B0DF NC6132 Gigabit Module - B0E0 NC6133 Gigabit Module - B0E1 NC3133 Fast Ethernet Module - B123 NC6134 Gigabit NIC - B134 NC3163 Fast Ethernet NIC - B13C NC3162 Fast Ethernet NIC - B144 NC3123 Fast Ethernet NIC - B163 NC3134 Fast Ethernet NIC - B164 NC3135 Fast Ethernet Upgrade Module - B178 CISSB SMART2 Array Controller - B196 0230 Conexant SoftK56 Modem - B1A4 NC7131 Gigabit Server Adapter + B0DF Gigabit Module (NC6132) + B0E0 Gigabit Module (NC6133) + B0E1 Fast Ethernet Module (NC3133) + B123 Gigabit NIC (NC6134) + B134 Fast Ethernet NIC (NC3163) + B13C Fast Ethernet NIC (NC3162) + B144 Fast Ethernet NIC (NC3123) + B163 Fast Ethernet NIC (NC3134) + B164 Fast Ethernet Upgrade Module (NC3135) + B178 SMART2 Array Controller (CISSB) + B196 Conexant SoftK56 Modem (0230) + B1A4 Gigabit Server Adapter (NC7131) B200 Memory Hot-Plug Controller - B203 iLo Integrated Lights Out Processor - B204 iLo Integrated Lights Out Processor - F095 FCA2101 HP StorageWorks 2 Gb, 64-Bit/66-MHz PCI-to-Fibre Channel Host Bus Adapter for Windows 2000, Windows + B203 Integrated Lights Out Processor (iLo) + B204 Integrated Lights Out Processor (iLo) + F095 HP StorageWorks 2 Gb, 64-Bit/66-MHz PCI-to-Fibre Channel Host Bus Adapter for Windows 2000, Windows (FCA2101) F130 ThunderLAN 1.0 NetFlex-3/P F150 ThunderLAN 2.3 NetFlex-3/P with BNC F700 LP7000 Compaq/Emulex Fibre Channel HBA @@ -191,89 +249,93 @@ 0001 LSI53C810/A/AE PCI-SCSI I/O Processor 0002 53C820 820 Fast-Wide-SCSI Adapter 0003 LSI53C825/A/AE PCI to SCSI I/O Processor (Fast Wide) - 0004 53C815 815X Fast-SCSI Adapter + 0004 SCSI raid controllers (53C815) 0005 53C810AP,810ASP, 2081X Fast/Ultra/Wide SCSI Adapter - 0006 LSI53C860/860E PCI to Ultra SCSI I/O Processor + 0006 PCI to Ultra SCSI I/O Processor (LSI53C860/860E) 000A LSI53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Nonintelligent mode) 000B LSI53C896/7 PCI to Dual Channel Ultra2 SCSI Multifunction Controller 000C LSI53C895 PCI to Ultra2 SCSI I/O Processor with LVD Link - 000D 53C885 Ultra Wide SCSI, Ethernet + 000D Ultra Wide SCSI, Ethernet (53C885) 000F LSI53C875/E,LSI53C876/E PCI to Ultra SCSI I/O Processor 0010 LSI53C1510 I2O-Ready PCI RAID Ultra2 SCSI Controller (Intelligent mode) - 0012 LSI53C895A PCI to Ultra2 SCSI Controller - 0013 LSI53C875A PCI to Ultra SCSI Controller + 0012 PCI to Ultra2 SCSI Controller (LSI53C895A) + 0013 PCI to Ultra SCSI Controller (LSI53C875A) 0020 LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI Multifunction Controller - 0021 LSI53C1000/1000R/1010R/1010-66 PCI to Ultra160 SCSI Controller - 0030 LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller - 0031 LSI53C1030ZC PCI-X SCSI Controller - 0032 LSI53C1035 PCI-X to Ultra320 SCSI Controller + 0021 PCI to Ultra160 SCSI Controller (LSI53C1000/1000R/1010R/1010-66) + 0030 PCI-X to Ultra320 SCSI Controller (LSI53C1020/1030) + 0031 PCI-X SCSI Controller (LSI53C1030ZC) + 0032 PCI-X to Ultra320 SCSI Controller (LSI53C1035) 0033 1030ZC_53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI - 0035 LSI53C1035 PCI-X SCSI Controller + 0035 PCI-X SCSI Controller (LSI53C1035) 0040 LSI53C1035 LSI53C1035 PCI-X to Ultra320 SCSI Controller (RAID mode) 0041 53C1035ZC PCI-X Fusion-MPT Dual Ultra320 SCSI 0050 SAS 3000 series, 4-port with 1064 -StorPort 0054 SAS 3000 series, 8-port with 1068 -StorPort + 0055 SAS1068 PCI-X Fusion-MPT SAS 0056 SAS 3000 series, 4-port with 1064E -StorPort + 0057 M1064E MegaRAID SAS 0058 SAS 3000 series, 8-port with 1068E -StorPort 005A SAS 3000 series, 6-port with 1066E -StorPort 005C SAS1064A PCI-X Fusion-MPT SAS 005E SAS 3000 series, 6-port with 1066 -StorPort 0060 SAS1078 PCI-X Fusion-MPT SAS - 0062 LSISAS1078 PCI-Express Fusion-MPT SAS - 008F 53C810 LSI 53C8xx SCSI host adapter chip + 0062 PCI-Express Fusion-MPT SAS (LSISAS1078) + 008F LSI 53C8xx SCSI host adapter chip (53C810) 0407 MegaRAID 0408 MegaRAID 0409 MegaRAID Family RAID Controller 0411 MegaRAID Family RAID Controller - 0621 LSIFC909 Fibre Channel I/O Processor - 0622 LSIFC929 Dial Channel Fibre Channel I/O Processor - 0623 LSIFC929 Dual Channel Fibre Channel I/O Processor + 0413 MegaRAID SAS Verde ZCR + 0621 Fibre Channel I/O Processor (LSIFC909) + 0622 Dial Channel Fibre Channel I/O Processor (LSIFC929) + 0623 Dual Channel Fibre Channel I/O Processor (LSIFC929) 0624 LSIFC919 Single Channel Fibre Channel I/O Processor 0625 LSIFC919 Single Channel Fibre Channel I/O Processor 0626 LSIFC929X Dual Channel Fibre Channel I/O Processor 0627 LSIFC929X Dual Channel Fibre Channel I/O Processor 0628 LSIFC919X Single Channel Fibre Channel I/O Processor 0629 LSIFC919X Single Channel Fibre Channel I/O Processor - 0630 LSIFC920 Fibre Channel I/O Processor - 0640 LSIFC949X Fibre Channel Adapter - 0642 LSIFC939X Fibre Channel Adapter - 0646 LSIFC949ES Fibre Channel Adapter + 0630 Fibre Channel I/O Processor (LSIFC920) + 0640 Fibre Channel Adapter (LSIFC949X) + 0642 Fibre Channel Adapter (LSIFC939X) + 0646 Fibre Channel Adapter (LSIFC949ES) 0701 53C885 NT50 DigitalScape Fast Ethernet Adapter - 0702 Yellowfin G-NIC Gigabit Ethernet Controller + 0702 Gigabit Ethernet Controller (Yellowfin G-NIC) 0804 SA2010 0805 SA2010ZC 0806 SA2020 0807 SA2020ZC - 0901 61C102 USB Controller - 1000 63C815 Fast SCSI Controller - 1001 53C895 Symbios Ultra2 SCSI controller - 1010 LSI 53C102000 Single channel SCSI controller + 0901 USB Controller (61C102) + 1000 Fast SCSI Controller (63C815) + 1001 Symbios Ultra2 SCSI controller (53C895) + 1010 Single channel SCSI controller (LSI 53C102000) 1960 MegaRAID 1001 Kolter Electronic - Germany 0010 PCI1616 Measurement Card with 32 digital I/O lines - 0011 ispLSI1032E OPTO-PCI, 16 IN / 16 OUT 24 VDC - 0012 ispLSI1032E PCI-AD, PCI-ADDA analog I/O-card - 0013 ispLSI1032E PCI-OptoRel, PCI-Relais 16 Relais & Opto - 0014 ispLSI1032E Timer, Pulse & Counter-card 16..32 bit - 0015 ispLSI1032E PCI-DAC416, 4 channel D/A16bit precision - 0016 ispLSI1032E PCI-MFB high-speed analog I/O - 0017 ispLSI1032E PROTO-3 PCI, digital I/O with chipselect - 0020 ispLSI1032E Universal digital I/O PCI-Interface -1002 ATI Technologies Inc - 0B12 ati 1900 ati 1900 - 3150 M24 1P Radeon Mobility X600 + 0011 OPTO-PCI, 16 IN / 16 OUT 24 VDC (ispLSI1032E) + 0012 PCI-AD, PCI-ADDA analog I/O-card (ispLSI1032E) + 0013 PCI-OptoRel, PCI-Relais 16 Relais & Opto (ispLSI1032E) + 0014 Timer, Pulse & Counter-card 16..32 bit (ispLSI1032E) + 0015 PCI-DAC416, 4 channel D/A16bit precision (ispLSI1032E) + 0016 PCI-MFB high-speed analog I/O (ispLSI1032E) + 0017 PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E) + 0020 Universal digital I/O PCI-Interface (ispLSI1032E) +1002 ATI Technologies Inc. / Advanced Micro Devices, Inc. + 0B12 ati 1900 (ati 1900) + 1002 0F2A1787 (0F2A1787) + 3150 Radeon Mobility X600 (M24 1P) 3151 FIREMV 2400 3152 Mobility Radeon X300 - 3154 M24 1T FireGL - 3171 FIREMV 2400 Secondary - 3E50 Radeon X600 Series - 3E54 RV380 FireGL V3200 + 3154 Mobility FireGL V3200 + 3171 FireMV 2400 Secondary + 3E50 Radeon X600/X650 Series + 3E54 FireGL V3200 (RV380) 3E70 Radeon X600 Series Secondary 3E74 FIREGL V3200 Secondary - 4136 A3 Radeon IGP 320 - 4137 RS200 Radeon IGP 340 + 4136 Radeon IGP 320 (A3) + 4137 Radeon IGP 340 (RS200) 4144 Radeon 9500 Series (R300) - 4145 R300 Radeon 9200 (M+X) + 4145 Radeon 9200 (M+X) (R300) 4146 Radeon 9700 (R300) 4147 Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P) 4148 Radeon 9800 SE (R350) @@ -282,105 +344,117 @@ 414B Fire GL X2 4150 Radeon 9600 Series (V350) 4151 Radeon 9600 (RV350) - 4152 Radeon 9600 XT (V350) - 4153 RV350 Radeon 9550 + 4152 Radeon 9600 XT (RV360) + 4153 Radeon 9550 (RV350) 4154 Fire GL T2 4155 Fire GL T2 4156 Fire GL T2 4157 Fire GL T2 - 4158 200E17af Mach 32 - 4164 Radeon 9500 Series, secondary R300 (128bit mem bus) + 4158 vga video (4c59h) + 4164 R300 (128bit mem bus) (Radeon 9500 Series, secondary) 4165 Radeon 9700 Pro (R300 AE) - Secondary 4166 Radeon 9600TX - Secondary 4167 Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P) 4168 Radeon 9800 SE - Secondary (R350) 4169 Radeon 9500 Family - Secondary - 4170 Radeon 9600 Series - Secondary + 4170 Radeon 9600 - Secondary (RV350) 4171 Radeon 9600 (RV350) - Secondary - 4172 RV360 Radeon 9600 XT - Secondary - 4173 RV350 Radeon 9550 - Secondary + 4172 Radeon 9600 XT - Secondary (RV360) + 4173 Radeon 9550 - Secondary (RV350) 4174 FireGL T2 - Seocndary 4175 Radeon 9600 Series Secondary 4237 Radeon 7000 IGP - 4242 R200AIW All-In-Wonder 8500DV + 4242 All-In-Wonder 8500DV (R200AIW) 4243 Radeon 8500 DV OHCI FireWire Controller - 4336 rs200 Radeon IGP 320M - 4337 RS200M Mobility M6 (U2) - 4341 AD1981 AC'97 Audio Controller - 4342 IXP 150 HUB Bridge - 4345 IXP 150 EHCI USB Controller - 4347 IXP 150 OHCI USB Controller #1 - 4348 IXP 150 OHCI USB Controller #2 - 4349 IXP SB200 ATA Controller - 434C IXP 150 LPC Controller - 434D a75-s226 Agere Systems AC'97 Modem device + 4336 Radeon IGP 320M (rs200) + 4337 Mobility M6 (U2) (RS200M) + 4341 AC'97 Audio Controller (AD1981) + 4342 HUB Bridge (IXP 150) + 4345 EHCI USB Controller (IXP 150) + 4347 OHCI USB Controller *1 (IXP 150) + 4348 OHCI USB Controller *2 (IXP 150) + 4349 PATA 100 Controller (IXP 1xx/2xx) + 434C LPC Controller (IXP 150) + 434D Agere Systems AC'97 Modem device (a75-s226) 4353 IXP SB200 SMBUS Controller - 4354 Mach64 CT (215CT222) - 4358 216l0sas25 Mach64 CX + 4354 mach64 ct pci (215r2qzua21) + 4358 Mach64 CX (216l0sas25) 4361 AC'97 Audio Controller 4363 IXP SB300 SMBUS Controller - 4369 IXP SB300 ATA Controller + 4369 PATA 133 Controller (IXP 3xx) 436D IXP SB300 AC'97 Modem Controller 436E IXP SB300 Serial ATA Controller - 4370 IXP_AUDIO_400 IXP AC'97 Audio Controller + 4370 IXP AC'97 Audio Controller (IXP_AUDIO_400) 4371 IXP SB400 PCI-PCI Bridge - 4372 IXP SB400 SMBus + 4372 ATI SMBus (x200) 4373 IXP SB400 EHCI USB 2.0 Controller 4374 IXP SB400 OHCI USB Controller 4375 IXP SB400 OHCI USB Controller - 4376 ? Radeo SB400 = RS480 Southbridge/IDE Controller + 4376 PATA 133 Controller (SB4xx) 4377 IXP SB400 PCI-ISA Bridge 4378 IXP SB400 AC'97 Modem Controller 4379 IXP SB400 Serial ATA Controller 437A IXP SB400 Serial ATA Controller - 437B OEM Intel Corporation& Microsoft UAA Bus Driver for High Definition Audio + 437B IXP SB450 High Definition Audio Controller (Intel Corporation) 4380 IXP SB600 Serial ATA Controller 4381 IXP SB600 Serial ATA RAID Controller 4382 IXP SB600 AC'97 Audio Controller 4383 IXP SB600 High Definition Audio Controller 4384 IXP SB600 PCI to PCI Bridge - 4385 IXP SB600 SMBUS Controller + 4385 ATI SMBus (ATI RD600/RS600) 4386 IXP SB600 USB Controller (EHCI) 4387 IXP SB600 USB Controller (OHCI0) 4388 IXP SB600 USB Controller (OHCI1) 4389 IXP SB600 USB Controller (OHCI2) 438A IXP SB600 USB Controller (OHCI3) 438B IXP SB600 USB Controller (OHCI4) - 438C IXP SB600 ATA Controller - 438D IXP SB600 PCI to LPC Bridge + 438C ATI RD600/RS600 IDE Controller (RD600/RS600) + 438D ATK0110 ACPI Utility (1043.4.0.0) 438E IXP SB600 AC'97 Modem Controller + 4390 SB700 SATA Controller [IDE mode] + 4391 SB700 SATA Controller [AHCI mode] + 4392 SB700 SATA Controller [Non-RAID5 mode] + 4393 SB700 SATA Controller [RAID5 mode] + 4394 SB700 SATA Controller [SATA and FC Enabled] + 4395 SB SATA Controller [AHCI mode with HyperFlash-PCIE] + 4396 SB700 USB EHCI Controller + 4397 SB700 USB OHCI0 Controller + 4398 SB700 USB OHCI1 Controller + 4399 SB700 USB OHCI2 Controller + 439C PATA 133 Controller (SB7xx) + 439D SB700 LPC host controller 4437 Radeon Mobility 7000 IGP 4554 Mach64 ET - 4654 Mach64 VT 113--34004-104 - 4742 (GT-C2U2) ATI Rage Pro AGP 2X 8mb - 4744 Rage 3D Pro AGP 2x Rage 3D Pro AGP 2x - 4747 Rage 3D Pro GT-C2U2 - 4749 ATI 3D RAGE PRO AGP 2X (GT-C2U2) ATI ALL IN WONDER PRO (8MB) - 474C Rage XC PCI-66 k7 som+ - 474D Rage XL AGP 2x SLAT + 4654 113--34004-104 (Mach64 VT) + 4742 ATI 3D Rage Pro AGP 2X 8mb (gt-c2u2) ((GT-C2U2)) + 4744 Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x) + 4747 GT-C2U2 (Rage 3D Pro) + 4749 ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X) + 474C k7 som+ (Rage XC PCI-66) + 474D SLAT (Rage XL AGP 2x) 474E Rage XC AGP 2x - 474F Rage XL PCI-66 I Need Driver for the Chip - 4750 ATI 3D Rage Pro 215GP ATI 3D Rage Pro 215GP + 474F I Need Driver for the Chip (Rage XL PCI-66) + 4750 ATI 3D Rage Pro 215GP (ATI 3D Rage Pro 215GP) 4751 Rage 3D Pro PCI (PQFP Package, Limited 3D) - 4752 Rage XL PCI + 4752 ATI On-Board VGA for HP Proliant 350 G3 (Rage XL PCI) 4753 Rage XC PCI - 4754 Mach 64 VT Rage 3D II Graphics Accelerator - 4755 Rage 3D II+pci 3d rage 2 + dvd + 4754 Rage 3D II Graphics Accelerator (Mach 64 VT) + 4755 3d rage 2 + dvd (Rage 3D II+pci) 4756 Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package) 4757 Rage 3D IIC AGP (BGA Package) - 4758 Mach64 GX (210888GX) - 4759 215r2qzua21 m3d agp card on agp slot + 4758 Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX]) + 4759 m3d agp card on agp slot (215r2qzua21) 475A Rage 3D IIC AGP (PQFP Package) 4964 Radeon 9000 Series (RV250 Id) 4965 Radeon 9000 Series (RV250 Ie) - 4966 RV250 Radeon 9000/9000 Pro + 4966 Radeon 9000/9000 Pro (RV250) 4967 Radeon 9000 (RV250) - 496E RV250 Radeon 9000/9000 Pro - Secondary + 496E Radeon 9000/9000 Pro - Secondary (RV250) 496F Radeon 9000 (RV250) - Secondary 4A48 Radeon X800 Series (R420 JH) - 4A49 R423 Radeon X800 gt + 4A49 Radeon X800 gt (R423) 4A4A Radeon X800 Series - 4A4B Radeon X800 Series + 4A4B RADEON X800 XT (R420) 4A4C Radeon X800 Series (R420 JL) 4A4D FireGL X3 (R420 JM) 4A4E Radeon Mobility 9800 (M18 JN) @@ -390,7 +464,7 @@ 4A68 Radeon X800 Series Secondary 4A69 Radeon X800 Series - Secondary 4A6A Radeon X800 Series - Secondary - 4A6B Radeon X800 - Secondary + 4A6B RADEON X800 XT Secondary (R420) 4A6C Radeon X800 Series Secondary 4A6D FIREGL X3-256 Secondary 4A6F Radeon X800 SE Secondary @@ -405,32 +479,32 @@ 4B6B Radeon X850 PRO secondary 4B6C Radeon X850XT-PE Secondary 4C42 Rage 3D LT Pro AGP 133MHz (BGA-312 Package) - 4C44 Rage 3D LT Pro AGP Rage 3D LT Pro AGP 133 MHz + 4C44 Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP) 4C45 Rage Mobility M3 AGP - 4C46 Rage Mobility M3 AGP 2x - 4C47 ati rage pro Rage 3D LT-G + 4C46 0x4c46 (Mobility M3 AGP) + 4C47 Rage 3D LT-G (ati rage pro) 4C49 Rage 3D LT Pro PCI (BGA-312 Package) - 4C4D 01541014 Rage P/M Mobility AGP 2x - 4C4E 216lo sasa25 Rage Mobility l - 4C50 VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC Rage 3D LT Pro PCI + 4C4D Rage P/M Mobility AGP 2x (01541014) + 4C4E Rage Mobility l (216lo sasa25) + 4C50 Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC) 4C51 Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D) - 4C52 1241243 Rage P/M Mobility agp - 4C53 216L0SASA25 Rage L Mobility PCI + 4C52 Rage P/M Mobility PCI + 4C53 Rage L Mobility PCI (216L0SASA25) 4C54 Mach64 LT (264LT) - 4C57 fdds Radeon Mobility M7 LW + 4C57 Mobility Radeon 7500 (fdds) 4C58 FireGL Mobility - 4C59 Mobility 6 Radeon Mobility M6 LY + 4C59 Radeon Mobility M6 Series (Mobility 6) 4C5A Radeon Mobility M6 LZ 4C64 Radeon Mobility M9-GL 4C65 Radeon Mobility 9000 (R250 Le) - 4C66 ATI MOBILITY RADEON 9000 (Microsoft Corporation - Radeon Mobility M9 + 4C66 Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -) 4C67 Radeon Mobility 9000 (R250 Lg) 4C6E Radeon Mobility 9000 - Secondary (R250 Ln) - 4D46 Rage Mobility 128 AGP 4x - 4D4C Rage Mobility 128 AGP + 4D46 Rage Mobility 128 AGP 4x (ATI mobility128) + 4D4C Rage Mobility 128 AGP (216l0sasa25) 4D50 Unified AVStream Driver 4D51 Unified AVStream Driver - 4D52 ATI Theater 550 Pro ATI Theater 550 Pro + 4D52 ATI Theater 550 Pro (ATI Theater 550 Pro) 4D53 Unified AVStream Driver 4E44 Radeon 9700/Pro, 9500 Series (R300) 4E45 Radeon 9700/9500 Series (R300) @@ -439,7 +513,7 @@ 4E48 Radeon 9800 Pro (R350) 4E49 Radeon 9800 (R350) (??) 4E4A Radeon 9800 XT (R350) - 4E4B FGL9800XT ATI FIREGL X2-256T + 4E4B ATI FIREGL X2-256T (FGL9800XT) 4E50 Mobility Radeon 9700 (M10 NP) (RV350) 4E51 Mobility Radeon 9600 (M10 NQ) 4E52 Mobility Radeon 9500/9600 (M10) (RV350) @@ -453,94 +527,94 @@ 4E68 Radeon 9800 Pro (R350) - Secondary 4E69 Radeon 9800 (R350) - Secondary 4E6A Radeon 9800 XT (R350) - Secondary - 4E6B FGL9800XT ATI FIREGL X2-256T Secondary + 4E6B ATI FIREGL X2-256T Secondary (FGL9800XT) 4E71 Radeon Mobility 9600 (M10 NQ) (secondary) 4F72 Radeon 9000 Series (RV250) 4F73 Radeon 9000 Series (RV250) (Secondary) - 5041 gt Rage 128 Pro PA PCI - 5042 Rage 128 Pro PB AGP 2x - 5043 1231324445 Rage 128 Pro PC AGP 4x - 5044 Rage 128 PD/Pro PCI (TMDS) + 5041 Rage 128 Pro PA PCI (gt) + 5042 Rage 128 Pro PB AGP 2x (rage 128 pf pro agp ) + 5043 Rage 128 PC/Pro AGP 4x + 5044 Rage 128 Pro PD PCI (rv100) 5045 Rage 128 PE/Pro AGP 2x (TMDS) 5046 Rage 128 PF/Pro AGP 4x (TMDS) - 5047 215R3BUA22 3d Rage pro agp 2x - 5048 Rage 128 Pro PH AGP Rage 128 Pro PH AGP 2x - 5049 bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t Rage 128 Pro PI AGP 4x - 504A Rage 128 Pro PJ PCI Rage 128 Pro PJ PCI (TMDS) - 504B Rage 128 Pro PK AGP Rage 128 Pro PK AGP 2x (TMDS) - 504C Rage 128 Pro PL AGP 4x (TMDS) - 504D Rage 128 Pro PM PCI Rage 128 Pro PM PCI - 504E Rage 128 Pro PN AGP Rage 128 Pro PN AGP 2x - 504F Rage 128 Pro PO AGP Rage 128 Pro PO AGP 4x - 5050 Rage 128 Pro PP PCI Rage 128 Pro PP PCI (TMDS) - 5051 Rage 128 Pro PQ AGP Rage 128 Pro PQ AGP 2x (TMDS) - 5052 Rage 128 Pro PR AGP Rage 128 Pro PR AGP 4x (TMDS) - 5053 Rage 128 Pro PS PCI Rage 128 Pro PS PCI - 5054 Rage 128 Pro PT AGP Rage 128 Pro PT AGP 2x - 5055 rage 128 pro agp 4x tmds rage 128 pro agp 4x tmds - 5056 Rage 128 Pro PV PCI Rage 128 Pro PV PCI (TMDS) - 5057 Rage 128 Pro PW AGP Rage 128 Pro PW AGP 2x (TMDS) - 5058 Rage 128 Pro PX AGP 4x (TMDS) - 5144 Radeon 7200 QD SDR/DDR Radeon 7200 QD SDR/DDR + 5047 3d Rage pro agp 2x (215R3BUA22) + 5048 Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP) + 5049 Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t) + 504A Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI) + 504B Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP) + 504C 4x (TMDS) (Rage 128 Pro PL AGP) + 504D Rage 128 Pro PM PCI (Rage 128 Pro PM PCI) + 504E Rage 128 Pro PN AGP 2x (Rage 128 Pro PN AGP) + 504F Rage 128 Pro PO AGP 4x (Rage 128 Pro PO AGP) + 5050 Rage 128 Pro PP PCI (TMDS) (Scheda Grafica Standard PCI(VGA)) + 5051 Rage 128 Pro PQ AGP 2x (TMDS) (Rage 128 Pro PQ AGP) + 5052 Rage 128 Pro PR AGP 4x (TMDS) (Rage 128 Pro PR AGP) + 5053 Rage 128 Pro PS PCI (Rage 128 Pro PS PCI) + 5054 Rage 128 Pro PT AGP 2x (Rage 128 Pro PT AGP) + 5055 rage 128 pro agp 4x tmds (rage 128 pro agp 4x tmds) + 5056 Rage 128 Pro PV PCI (TMDS) (Rage 128 Pro PV PCI) + 5057 Rage 128 Pro PW AGP 2x (TMDS) (Rage 128 Pro PW AGP) + 5058 PX AGP 4x (TMDS) (Rage 128 Pro) + 5144 Radeon 7200 QD SDR/DDR (Radeon 7200 QD SDR/DDR) 5145 Radeon QE 5146 Radeon QF 5147 Radeon QG - 5148 R200 Radeon R200 QH + 5148 Radeon R200 QH (R200) 5149 Radeon R200 QI 514A Radeon R200 QJ 514B Radeon R200 QK - 514C R200 Radeon 8500 / 8500LE + 514C Radeon 8500 / 8500LE (R200) 514D Radeon 9100 Series (R200) 514E Radeon R200 QM 514F Radeon R200 QN 5154 Radeon 8500 R200 QT 5155 Radeon 9100 R200 QU 5157 Radeon 7500 Series (RV200) - 5158 radeon 9700 or 9200 Radeon 7500 QX - 5159 RV100 Radeon 7000 / Radeon VE + 5158 Radeon 7500 QX (radeon 9700 or 9200) + 5159 Radeon 7000 / Radeon VE (RV100) 515A Radeon VE QZ - 515E Radeon ES1000 Radeon ES1000 + 515E Radeon ES1000 (Radeon ES1000) 515F ES1000 - 5168 Radeon R200 Qh + 5168 Radeon R200 Qh (ati) 5169 Radeon R200 Qi 516A Radeon R200 Qj 516B Radeon R200 Qk - 516C Radeon 8500 / 8500LE + 516C Radeon 8500 / 8500LE (E7505) 516D Radeon 9100 Series (R200) - Secondary - 5245 215R46ASA22 Rage 128 GL PCI - 5246 Rage 128 PRO Rage 32MB + 5245 Rage 128 GL PCI (215R46ASA22) + 5246 Rage 32MB (Rage 128 PRO) 5247 Rage 128 RG - 524B g01080-108 Rage 128 VR RK PCI - 524C Rage 128 VR RL AGP 2x - 5345 Rage 128 4x SE PCI - 5346 Rage 128 SF 4x AGP 2x Rage 128 SF 4x AGP 2x - 5347 Rage 128 SG 4x AGP 4x + 524B Rage 128 VR RK PCI (g01080-108) + 524C Rage 128 RL/VR AGP 2x + 5345 Rage 128 SE/4x PCI + 5346 Rage 128 SF 4x AGP 2x (Rage 128 SF 4x AGP 2x) + 5347 Rage 128 SG/4x AGP 4x 5348 Rage 128 4x SH - 534B Rage 128 SK PCI Rage 128 4x SK PCI - 534C Rage 128 SL AGP 2x Rage 128 4x SL AGP 2x - 534D Rage 128 SM AGP 4x Rage 128 4x SM AGP 4x + 534B Rage 128 4x SK PCI (Rage 128 SK PCI) + 534C Rage 128 4x SL AGP 2x (Rage 128 SL AGP 2x) + 534D Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x) 534E Rage 128 4x 5354 Mach 64 ST - 5446 Rage 128 PRO ULTRA Video Controller (VGA Compatible) + 5446 Video Controller (VGA Compatible) (ewmewm) 544C Rage 128 Pro TL 5452 Rage 128 Pro TR 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT - 5455 Rage 128 Pro Ultra TU - 5460 RV370 Radeon X300 Mobility (M22) + 5455 Rade 128 Pro Ultra TU + 5460 Radeon X300 Mobility (M22) (RV370) 5461 Mobility Radeon X300 5462 Mobility Radeon X600 SE 5464 FireGL GL (M22) 5548 Radeon X800 (R423 UH) 5549 Radeon X800 Pro 554A Radeon X800 XT Platinum - 554B Radeon X800 SE + 554B Primary (X800GT) 554C R430 XTP - 554D R430 Radeon X800 XL + 554D Radeon X800 XL (R430) 554E Radeon X800 Series 554F Radeon X800 Series 5550 FireGL V7100 (R423) - 5551 R423GL-SE ATI FIREGL V5100 PCI-EX Primary + 5551 ATI FIREGL V5100 PCI-EX Primary (R423GL-SE) 5552 FireGL V5100 (R423 UR) 5554 FireGL V7100 (R423 UT) 5568 Radeon X800 Series Secondary @@ -548,51 +622,52 @@ 556A Radeon X800 XT Platinum - Secondary 556B Radeon X800 SE - Secondary 556C R430 XTP Secondary - 556D R430 Radeon X800 XL - Secondary + 556D Radeon X800 XL - Secondary (R430) 556E Radeon X800 Series - Secondary 556F Radeon X800 Series - Secondary 5570 FIREGL V7100 Secondary - 5571 R423GL-SE ATI FIREGL V5100 PCI-EX Secondary + 5571 ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE) 564A Mobility FIREGL V5000 (M26) 564B Mobility FIREGL V5000 564F Mobility Radeon X700 XL PCIe (M26) 5652 Mobility Radeon X700 5653 Mobility Radeon X700 - 5654 215VT2CA42 Mach 64 VT VIDEO XPRESSION + 5654 Mach 64 VT VIDEO XPRESSION (215VT2CA42) 5655 Mach 64 VT3 - 5656 Mach 64 VT4 PCI Mach 64 VT4 PCI + 5656 Mach 64 VT4 PCI (Mach 64 VT4 PCI) 5657 Radeon X550/X700 Series + 566F RADEON X700 SERIES SECONDARY 5673 Mobility Radeon X700 Secondary 5677 Radeon X550/X700 Series Secondary 5830 RS300/100 Host Bridge 5831 RS300/133 Host Bridge 5832 RS300/166 Host Bridge 5833 Radeon IGP9100 RS300/200 Host Bridge - 5834 RS300 Radeon 9100 IGP + 5834 Radeon 9100 IGP (RS300) 5835 Mobility Radeon 9100 IGP (RS300M AGP) - 5838 Radeon 9100 IGP AGP Bridge + 5838 AGP Bridge (Radeon 9100 IGP) 5854 Radeon XPRESS 200 Series Secondary 5874 Radeon XPRESS 200 Series Secondary - 5940 RV280 Radeon 9200 Pro - Secondary - 5941 RV280 ATI Radeon 9200 - Secondary + 5940 www.ati.comRadeon 9200 Pro - Secondary (RV280) + 5941 ATI Radeon 9200 - Secondary (RV280) 5942 Radeon 9000U Family - Secondary 5944 Radeon 9200SE PCI (RV280) 5950 RS480 Host Bridge 5951 Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge 5952 CrossFire Xpress 3200 (RD580) Chipset Host Bridge - 5954 na ATI Radeon Xpress 200 Series - RS480 - 5955 ??? Mobility Radeon XPRESS 200 + 5954 ATI Radeon Xpress 200 Series - RS480 (na) + 5955 Mobility Radeon XPRESS 200 5956 RD790 GFX Dual Slot 5957 RX790 GFX Single Slot 5958 RD780 GFX Dual Slot - 5960 RV280 Radeon 9200 Pro - 5961 RV280 ATI RADEON 9200 se agp + 5960 Radeon 9200 Pro (RV280) + 5961 ATI RADEON 9200 se agp (RV280) 5962 Radeon 9000U Family - 5964 Radeon 9200 Radeon 9200 SE Series - 5965 Nvidia FireMV 2200 + 5964 Radeon 9200 SE Series (Radeon 9200) + 5965 FireMV 2200 (Nvidia) 5969 ES1000 5974 Radeon XPRESS 200 Series - 5975 Radeon XPRESS 200M SERIES + 5975 ATI Radeon X1100 (Radeon Xpress 1100) 5978 RD790 PCI to PCI bridge (external gfx0 port A) 5979 RD790 PCI to PCI bridge (external gfx0 port B) 597A RD790 PCI to PCI bridge (PCIe gpp port A) @@ -623,7 +698,7 @@ 5A30 RS400/100 Host Bridge 5A31 RS400/133 Host Bridge 5A32 RS400/166 Host Bridge - 5A33 RC410 Northbridge: Radeon Xpress 200 + 5A33 Northbridge: Radeon Xpress 200 (RC410) 5A34 RS480 PCI-X Root Port 5A36 RS480 PCI Bridge 5A37 RS480 PCI Bridge @@ -631,43 +706,43 @@ 5A39 RS480 PCI Bridge 5A3F RS480 PCI Bridge 5A41 Radeon XPRESS 200 - 5A42 X200M SUBSYS_11821043&REV_00\4&1CF2FBB4&0&2808 + 5A42 SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M) 5A43 Radeon XPRESS 200 Series Secondary - 5A61 Radeon XPress 200 (RC410) Radeon Xpress 200 (RC410) VGA card - 5A62 Radeon Xpress 200M (RS410) + 5A61 Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410)) + 5A62 ATI RADEON XPRESS 1100 (RC410M) 5A63 Radeon XPRESS 200 Series Secondary - 5B60 Radeon X300 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] + 5B60 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300) 5B61 RV371 - 5B62 RV380 RADEON X600 Series 265MB - 5B63 Radeon X550 Series + 5B62 RADEON X600 Series 265MB (RV380) + 5B63 ATI Radoen X1050 (Unknown) 5B64 FireGL V3100 (RV370 5B64) 5B65 FireGL D1100 (RV370 5B65) 5B66 RV370X - 5B70 Radeon X300 Series - Secondary + 5B70 Radeon X300/X550/X1050 Series - Secondary 5B71 RV371 Secondary 5B72 Radeon X600 Series - Secondary 5B73 Radeon X550 Series - Secondary - 5B74 FireGL V3100 (RV370)- Secondary + 5B74 ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100) 5B75 FIREMV 2200 Secondary 5B76 RV370X Secondary - 5C61 bk-ati ver008.016m.085.006 Mobility Radeon 9200 - 5C63 RV280 (M9+) Mobility Radeon 9200 + 5C61 Mobility Radeon 9200 (bk-ati ver008.016m.085.006) + 5C63 Mobility Radeon 9200 (RV280 (M9+)) 5D44 Radeon 9200 SE Series - Secondary (RV280) - 5D45 RV280 ATI FireMV 2200 PCI Secondary + 5D45 ATI FireMV 2200 PCI Secondary (RV280) 5D48 Mobility Radeon X800 XT 5D49 Mobility FireGL V5100 - 5D4A Mobility Radeon X800 PCI-E Graphics adapter from Clevo D900T notebook + 5D4A PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800) 5D4C R480 CONSUMER 4P - 5D4D Radeon XT850 Radeon XT850 + 5D4D Radeon XT850 (Radeon XT850) 5D4E Radeon X800 GT - 5D4F r480 x800gto 256 pci-e + 5D4F x800gto 256 pci-e (r480) 5D50 FIREGL V7200 - 5D52 Radeon X850 Series + 5D52 Radeon X850XT (PCIE) Primary (R480) 5D57 Radeon X800 XT 5D6C R480 CONSUMER 4P Secondary 5D6D Radeon X850 Series - Secondary 5D6E Radeon X800 GT Secondary - 5D6F Radeon X850 Series - Secondary + 5D6F Radeon X850 Pro 256M (01131002) 5D70 FIREGL V7200 Secondary 5D72 Radeon X850 Series - Secondary 5D77 Radeon X800 XT - Secondary @@ -685,13 +760,13 @@ 5E6D Radeon X700 Series - Secondary 5E6F Radeon X700 SE - Secondary 5F57 Radeon X800XT PCIe (R423) - 700F A3/U1 PCI to AGP Bridge - 7010 RS200 PCI to AGP Bridge + 700F PCI to AGP Bridge (A3/U1) + 7010 PCI to AGP Bridge (RS200) 7100 Radeon X1800 Series 7101 Mobility Radeon X1800 XT 7102 Radeon Mobility X1800 7103 Mobility FireGL V7200 - 7104 FireGL V7200 (R520 GL) + 7104 ATI FireGL 7200 or 3200 7105 R520 [FireGL] 7106 Mobility FireGL V7100 7108 Radeon Mobility X1800 @@ -700,7 +775,7 @@ 710B Radeon X1800 710C Radeon X1800 710E FIREGL V7300 - 710F FIREGL V7350 + 710F ATI FireGL (V7350) 7120 Radeon X1800 Series Secondary 7124 FireGL V7200 (R520 GL) - Secondary 7125 Radeon X1800 Series Secondary @@ -710,15 +785,15 @@ 712B Radeon X1800 Series Secondary 712C Radeon X1800 Series Secondary 712E FIREGL V7300 Secondary - 712F FIREGL V7350 Secondary + 712F ATI FireGL (V 7350 Secondary) 7140 Radeon X1300 Series 7141 RV505 - 7142 N/A Radeon X1300 Pro or X1550 + 7142 Radeon X1300 Pro or X1550 (rv515) 7143 Radeon X1550 Series (RV505) - 7145 x1400 PCI\VEN_1002&DEV_7145&SUBSYS_20031028&REV_00\4&1C9EC085&0&0008 - 7146 N/A Radeon X1300 XGE + 7145 PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400) + 7146 Radeon X1300 XGE (N/A) 7147 Radeon X1550 64-bit (RV505) - 7149 216CZJAKA12FAG ATI Mobility Radeon X1300, M52-64 + 7149 ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG) 714A Mobility Radeon X1300 714B Mobility Radeon X1300 714C Mobility Radeon X1300 @@ -726,7 +801,7 @@ 714E Radeon X1300 (RV515) 714F RV505 7151 RV505 - 7152 FireGL V3300 (RV515GL) + 7152 HP Fire GL v3300 (Fire GL v3300) 7153 FireGL V3350 (RV515GL) 715E Radeon X1300 Series 715F Radeon X1300 Series @@ -742,50 +817,61 @@ 716F RV505 Secondary 7171 RV505 Secondary 7172 FireGL V3300 (RV515GL) Secondary + 7173 FireGL V3350 (RV515GL) Secondary 717E Radeon X1300 Series Secondary 717F Radeon X1300 Series Secondary 7180 Radeon X1300 Series 7181 Radeon X1600 Series (RV516XT) - 7183 RV505 Radeon X1300/X1550 Series - 7186 Mobility Radeon X1450 PCI\VEN_1002&DEV_7186&SUBSYS_12311043&REV_00\4&2D404BB6&0&0008 - 7187 Radeon 1300 Radeon 1300 + 7183 Radeon X1300/X1550 Series (RV505) + 7186 PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450) + 7187 Radeon 1300 (Radeon 1300) + 7188 ATI Mobility Radeon X2300 (Mobility X2300) + 718A Mobility Radeon X2300 Series 718B Mobility Radeon X1350 718C Mobility Radeon X1350 718D Mobility Radeon X1450 718F Radeon X1300 Series 7193 Radeon X1550 Series 7196 Mobility Radeon X1350 + 719B FireMV 2250 719F Radeon X1550 Series 71A0 Radeon X1300 Series Secondary 71A1 Radeon X1600 Series (RV516XT) Secondary 71A3 Radeon X1300 Series Secondary - 71A7 Radeon 1300 Radeon 1300 Secondary + 71A7 Radeon 1300 Secondary (Radeon 1300) 71B3 Radeon X1550 Series Secondary + 71BB FireMV 2250 Secondary 71C0 Radeon X1600 Series - 71C1 Radeon X1650 Series - 71C2 ATI X1600 Pro PCI-E ATI X1600 Pro PCI-E + 71C1 Radeon X1650 Pro (RV535) + 71C2 ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E) 71C3 Radeon X1600 Series 71C4 Mobility FIREGL V5200 - 71C5 RV530? Radeon X1600 Mobility + 71C5 Radeon X1600 Mobility (RV530?) 71C6 Radeon X1650 Series (RV530 LE) + 71C7 RADEON X1650 SERIES 71CD Radeon X1600 Series 71CE Radeon X1600 PRO / X1300XT (RV530 VE) - 71D2 FIREGL V3400 + 71D2 FireGL V3400 (RV530GL) + 71D4 Mobility FireGL V5250 (M56GL) 71D5 Mobility Radeon X1700 (M66-P) 71D6 Mobility Radeon X1700 (M66-XT) 71DA FIREGL V5200 - 71DE RV530 SE + 71DE Ati Radeon X2500 (Uknown) 71E0 Radeon X1600 Series Secondary 71E1 Radeon X1650 Series Secondary 71E2 Radeon X1600 Series Secondary 71E3 Radeon X1600 Series Secondary 71E5 M56 Secondary 71E6 Radeon X1650 Series Secondary (RV530 LE) + 71E7 RADEON X1650 SERIES SECONDARY 71ED Radeon X1600 Series Secondary 71EE Radeon X1600 PRO / X1300XT Secondary (RV530 VE) - 71F2 FIREGL V3400 Secondary + 71F2 ATI FireGL V3400 Secondary (RV530GL) 71FA FIREGL V5200 Secondary 71FE RV530 SE Secondary + 7205 S3G Unichrome IGP KM400/KN400 (1106) + 7210 Mobility Radeon X2100 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jun 13 22:02:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DDBA106566B; Sat, 13 Jun 2009 22:02:55 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B7448FC16; Sat, 13 Jun 2009 22:02:55 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5DM2thI025448; Sat, 13 Jun 2009 22:02:55 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5DM2tQi025447; Sat, 13 Jun 2009 22:02:55 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906132202.n5DM2tQi025447@svn.freebsd.org> From: Kip Macy Date: Sat, 13 Jun 2009 22:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194131 - stable/7/sys/boot/i386/loader X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 22:02:56 -0000 Author: kmacy Date: Sat Jun 13 22:02:55 2009 New Revision: 194131 URL: http://svn.freebsd.org/changeset/base/194131 Log: comment out zfs support until I have time for a proper fix Modified: stable/7/sys/boot/i386/loader/Makefile Modified: stable/7/sys/boot/i386/loader/Makefile ============================================================================== --- stable/7/sys/boot/i386/loader/Makefile Sat Jun 13 21:55:08 2009 (r194130) +++ stable/7/sys/boot/i386/loader/Makefile Sat Jun 13 22:02:55 2009 (r194131) @@ -16,12 +16,12 @@ LIBFIREWIRE= ${.OBJDIR}/../libfirewire/l .endif # Put LOADER_ZFS_SUPPORT=yes in /etc/make.conf for ZFS support -.if ${MK_ZFS} != "no" -CFLAGS+= -DLOADER_ZFS_SUPPORT -LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a -.else +#.if ${MK_ZFS} != "no" +#CFLAGS+= -DLOADER_ZFS_SUPPORT +#LIBZFS= ${.OBJDIR}/../../zfs/libzfsboot.a +#.else LIBZFS= -.endif +#.endif # Enable PXE TFTP or NFS support, not both. .if defined(LOADER_TFTP_SUPPORT)