From owner-p4-projects@FreeBSD.ORG Sun Feb 17 00:01:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9D21516A469; Sun, 17 Feb 2008 00:01:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60EB616A417; Sun, 17 Feb 2008 00:01:32 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id A30F913C455; Sun, 17 Feb 2008 00:01:31 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 4C4CB1434F; Sun, 17 Feb 2008 01:09:43 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04120-08; Sun, 17 Feb 2008 01:09:16 +0100 (CET) Message-ID: <47B7793E.2020803@semihalf.com> Date: Sun, 17 Feb 2008 01:01:02 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B76A8E.5060607@semihalf.com> <47B76FDA.7070008@semihalf.com> <19353798-6A4C-4360-B08B-51D0D2719B28@mac.com> In-Reply-To: <19353798-6A4C-4360-B08B-51D0D2719B28@mac.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 00:01:33 -0000 Marcel Moolenaar wrote: >>>>>>> >>>>>>> Save U-Boot's registers at startup and restore them when >>>>>>> performing a syscall. This way we don't have to compile >>>>>>> code specially to avoid using those registers. Otherwise >>>>>>> we have to encode knowledge of those registers in at least >>>>>>> 4 makefiles and introduce a build knob to enable it all. >>>>>>> This does not allow us to build everything with a single >>>>>>> build world. >>>>>>> >>>>>> >>>>>> Hi Marcel, >>>>>> >>>>>> I'm not quite sure this is sufficient... I already had a similar >>>>>> save/restore >>>>>> in place, but there is some general problem with U-Boot that leads to >>>>>> hangs >>>>>> (experienced): >>>>> >>>>> Interesting, I didn't see any such problems with 1.3.2-rc1. >>>>> >>>> >>>> Chances are it might not surface, depending on the regs usage pattern, >>>> compiler etc., for example a -O0 build would usually hide this issue, >>>> but in >>>> principle those regs are not exception/interrupt safe. >>> >>> Agreed. I didn't see it at -O2, BTW. >>> >> >> When I was looking at this it also did not always pop up (with -O2 too), >> although typically when loader(8) was executed and left idle for some >> time it >> would hang sooner or later. >> >>> We can disable interrupts when not running in U-Boot, right? >>> The impact should be marginal... >>> >> >> Yes, this could be worked around like this, but with degraded >> functionality: >> all timer-related calls from the API would not make sense, and things >> like >> autoboot count down will not work. Even worse, the [polled] networking >> might >> not work at all if decrementer was shut, as we'd not be able to time >> out while >> waiting on the packet, status registers' change and so on. I think >> this issue >> needs some further investigation and proper resolution. > > We always call into U-Boot when we're waiting, so interrupts should be > enabled when it's important. This is the case when we wait for time to > pass, a key press or a network packet. In all those cases we shouldn't > be running for extensive amounts of time with interrupts disabled, so > we shouldn't lose too much precision, keys or packets. > Well, the point is we would need to run with interrupts disabled during all loader's code paths, so that interrups could be allowed only for the duration of the syscall; not sure how this would serve. Anyway, let me know your findings. > I'll play with this and see if that statement is true... > >From the other end: I'll take a look at U-Boot exceptions handlers macros for the prologue/epilogue and try to fix this down there. It shouldn't be difficult, but propagating the changes to their main line code will take time... Rafal From owner-p4-projects@FreeBSD.ORG Sun Feb 17 00:06:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60AA816A419; Sun, 17 Feb 2008 00:06:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2641916A421 for ; Sun, 17 Feb 2008 00:06:58 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.77]) by mx1.freebsd.org (Postfix) with ESMTP id F286113C4DB for ; Sun, 17 Feb 2008 00:06:57 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp008-s [10.150.69.71]) by smtpoutm.mac.com (Xserve/smtpout014/MantshX 4.0) with ESMTP id m1H06vqH011089; Sat, 16 Feb 2008 16:06:57 -0800 (PST) Received: from mini-g4.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp008/MantshX 4.0) with ESMTP id m1H06ucO018503 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 16 Feb 2008 16:06:56 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Rafal Jaworowski In-Reply-To: <47B7793E.2020803@semihalf.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 16 Feb 2008 16:06:56 -0800 References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B76A8E.5060607@semihalf.com> <47B76FDA.7070008@semihalf.com> <19353798-6A4C-4360-B08B-51D0D2719B28@mac.com> <47B7793E.2020803@semihalf.com> X-Mailer: Apple Mail (2.919.2) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 00:06:58 -0000 On Feb 16, 2008, at 4:01 PM, Rafal Jaworowski wrote: >> We always call into U-Boot when we're waiting, so interrupts should >> be >> enabled when it's important. This is the case when we wait for time >> to >> pass, a key press or a network packet. In all those cases we >> shouldn't >> be running for extensive amounts of time with interrupts disabled, so >> we shouldn't lose too much precision, keys or packets. >> > > Well, the point is we would need to run with interrupts disabled > during all > loader's code paths, so that interrups could be allowed only for the > duration > of the syscall; not sure how this would serve. Anyway, let me know > your findings. > >> I'll play with this and see if that statement is true... >> > > From the other end: I'll take a look at U-Boot exceptions handlers > macros for > the prologue/epilogue and try to fix this down there. It shouldn't be > difficult, but propagating the changes to their main line code will > take time... Perfect: 2 people, 2 viewpoints, 2 angles, 1 short-term workaround and 1 long-term solution. Can't have it any better than this ;-) -- Marcel Moolenaar xcllnt@mac.com From owner-p4-projects@FreeBSD.ORG Sun Feb 17 01:49:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5606216A468; Sun, 17 Feb 2008 01:49:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0266516A41B for ; Sun, 17 Feb 2008 01:49:09 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D51F113C45B for ; Sun, 17 Feb 2008 01:49:08 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H1n8EJ093650 for ; Sun, 17 Feb 2008 01:49:08 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H1n8fm093647 for perforce@freebsd.org; Sun, 17 Feb 2008 01:49:08 GMT (envelope-from jb@freebsd.org) Date: Sun, 17 Feb 2008 01:49:08 GMT Message-Id: <200802170149.m1H1n8fm093647@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135541 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 01:49:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=135541 Change 135541 by jb@jb_freebsd1 on 2008/02/17 01:48:46 Add a linker method to get the CTF data and a function to load it into the elf_file structure. I chose to just include kern_ctf.c in both link_elf.c and link_elf_obj.c so that it doesn't have to exist twice. There is a lot of (annoyingly) similar code in link_elf.c and link_elf_obj.c. To use the CTF data in DDB, we need a clean-room coder to write the code based on what I say the format is. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_ctf.c#1 add .. //depot/projects/dtrace/src/sys/kern/kern_linker.c#28 edit .. //depot/projects/dtrace/src/sys/kern/link_elf.c#15 edit .. //depot/projects/dtrace/src/sys/kern/link_elf_obj.c#12 edit .. //depot/projects/dtrace/src/sys/kern/linker_if.m#7 edit .. //depot/projects/dtrace/src/sys/sys/linker.h#19 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_linker.c#28 (text+ko) ==== @@ -647,6 +647,14 @@ return (0); } +int +linker_ctf_get(linker_file_t file, const uint8_t **data, int *len) +{ + KLD_LOCK_ASSERT(); + + return (LINKER_CTF_GET(file, data, len)); +} + static int linker_file_add_dependency(linker_file_t file, linker_file_t dep) { ==== //depot/projects/dtrace/src/sys/kern/link_elf.c#15 (text+ko) ==== @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD: src/sys/kern/link_elf.c,v 1.95 2008/01/13 14:44:09 attilio Exp $"); +#include "opt_ddb.h" #include "opt_gdb.h" #include "opt_mac.h" @@ -98,11 +99,15 @@ long ddbstrcnt; /* number of bytes in string table */ caddr_t symbase; /* malloc'ed symbold base */ caddr_t strbase; /* malloc'ed string base */ + caddr_t ctftab; /* CTF table */ + long ctfcnt; /* number of bytes in CTF table */ #ifdef GDB struct link_map gdb; /* hooks for gdb */ #endif } *elf_file_t; +#include + static int link_elf_link_common_finish(linker_file_t); static int link_elf_link_preload(linker_class_t cls, const char*, linker_file_t*); @@ -138,6 +143,7 @@ KOBJMETHOD(linker_lookup_set, link_elf_lookup_set), KOBJMETHOD(linker_each_function_name, link_elf_each_function_name), KOBJMETHOD(linker_each_function_nameval, link_elf_each_function_nameval), + KOBJMETHOD(linker_ctf_get, link_elf_ctf_get), { 0, 0 } }; @@ -909,6 +915,8 @@ free(ef->symbase, M_LINKER); if (ef->strbase) free(ef->strbase, M_LINKER); + if (ef->ctftab) + free(ef->ctftab, M_LINKER); } static void ==== //depot/projects/dtrace/src/sys/kern/link_elf_obj.c#12 (text+ko) ==== @@ -106,8 +106,13 @@ caddr_t shstrtab; /* Section name string table */ long shstrcnt; /* number of bytes in string table */ + caddr_t ctftab; /* CTF table */ + long ctfcnt; /* number of bytes in CTF table */ + } *elf_file_t; +#include + static int link_elf_link_preload(linker_class_t cls, const char *, linker_file_t *); static int link_elf_link_preload_finish(linker_file_t); @@ -142,6 +147,7 @@ KOBJMETHOD(linker_lookup_set, link_elf_lookup_set), KOBJMETHOD(linker_each_function_name, link_elf_each_function_name), KOBJMETHOD(linker_each_function_nameval, link_elf_each_function_nameval), + KOBJMETHOD(linker_ctf_get, link_elf_ctf_get), { 0, 0 } }; @@ -815,6 +821,8 @@ free(ef->relatab, M_LINKER); if (ef->progtab) free(ef->progtab, M_LINKER); + if (ef->ctftab) + free(ef->ctftab, M_LINKER); if (file->filename != NULL) preload_delete_name(file->filename); /* XXX reclaim module memory? */ @@ -847,6 +855,8 @@ free(ef->ddbstrtab, M_LINKER); if (ef->shstrtab) free(ef->shstrtab, M_LINKER); + if (ef->ctftab) + free(ef->ctftab, M_LINKER); } static const char * ==== //depot/projects/dtrace/src/sys/kern/linker_if.m#7 (text+ko) ==== @@ -96,6 +96,16 @@ }; # +# Load CTF data if necessary and if there is a .SUNW_ctf section +# in the ELF file, returning a pointer to the data and the length. +# +METHOD int ctf_get { + linker_file_t file; + const uint8_t **data; + int *len; +}; + +# # Load a file, returning the new linker_file_t in *result. If # the class does not recognise the file type, zero should be # returned, without modifying *result. If the file is ==== //depot/projects/dtrace/src/sys/sys/linker.h#19 (text+ko) ==== @@ -266,7 +266,7 @@ int elf_reloc_local(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu); const Elf_Sym *elf_get_sym(linker_file_t _lf, Elf_Size _symidx); const char *elf_get_symname(linker_file_t _lf, Elf_Size _symidx); -int sdt_reloc_resolve(uint8_t *, void *); +int linker_ctf_get(linker_file_t, const uint8_t **, int *); int elf_cpu_load_file(linker_file_t); int elf_cpu_unload_file(linker_file_t); From owner-p4-projects@FreeBSD.ORG Sun Feb 17 02:20:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F37116A421; Sun, 17 Feb 2008 02:20:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0B8516A41B for ; Sun, 17 Feb 2008 02:20:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CF8A613C459 for ; Sun, 17 Feb 2008 02:20:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H2KfNt097017 for ; Sun, 17 Feb 2008 02:20:41 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H2KfBc097014 for perforce@freebsd.org; Sun, 17 Feb 2008 02:20:41 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 17 Feb 2008 02:20:41 GMT Message-Id: <200802170220.m1H2KfBc097014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135543 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 02:20:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=135543 Change 135543 by kmacy@kmacy:entropy:iwarp on 2008/02/17 02:20:23 reduce debug noise Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.c#9 integrate .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.h#6 integrate Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.c#9 (text+ko) ==== @@ -175,11 +175,8 @@ sin.sin_family = AF_INET; sin.sin_len = sizeof(struct sockaddr_in); sin.sin_addr.s_addr = e->addr; - - - - printf("send slow on rt=%p eaddr=0x%08x\n", rt, e->addr); - + + CTR2(KTR_CXGB, "send slow on rt=%p eaddr=0x%08x\n", rt, e->addr); again: switch (e->state) { case L2T_STATE_STALE: /* entry is stale, kick off revalidation */ @@ -199,8 +196,6 @@ } arpq_enqueue(e, m); mtx_unlock(&e->lock); - printf("enqueueing arp request\n"); - /* * Only the first packet added to the arpq should kick off * resolution. However, because the m_gethdr below can fail, @@ -211,7 +206,7 @@ */ if (arpresolve(rt->rt_ifp, rt, NULL, (struct sockaddr *)&sin, e->dmac) == 0) { - printf("mac=%x:%x:%x:%x:%x:%x\n", + CTR6(KTR_CXGB, "mac=%x:%x:%x:%x:%x:%x\n", e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5]); if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) @@ -394,8 +389,6 @@ /* Need to allocate a new entry */ e = alloc_l2e(d); if (e) { - printf("initializing new entry\n"); - mtx_lock(&e->lock); /* avoid race with t3_l2t_free */ e->next = d->l2tab[hash].first; d->l2tab[hash].first = e; @@ -470,8 +463,6 @@ int hash = arp_hash(addr, ifidx, d); struct llinfo_arp *la; - printf("t3_l2t_update called with arp info\n"); - rw_rlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) if (e->addr == addr && e->ifindex == ifidx) { @@ -479,7 +470,7 @@ goto found; } rw_runlock(&d->lock); - printf("addr=0x%08x not found\n", addr); + CTR1(KTR_CXGB, "t3_l2t_update: addr=0x%08x not found", addr); return; found: ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_l2t.h#6 (text+ko) ==== @@ -143,8 +143,6 @@ if (__predict_true(e->state == L2T_STATE_VALID)) { return cxgb_ofld_send(dev, (struct mbuf *)m); } - printf("send slow\n"); - return t3_l2t_send_slow(dev, (struct mbuf *)m, e); } From owner-p4-projects@FreeBSD.ORG Sun Feb 17 02:22:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CD91116A419; Sun, 17 Feb 2008 02:22:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A7F416A418 for ; Sun, 17 Feb 2008 02:22:45 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5992D13C45B for ; Sun, 17 Feb 2008 02:22:45 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H2Mjag097140 for ; Sun, 17 Feb 2008 02:22:45 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H2MjZt097136 for perforce@freebsd.org; Sun, 17 Feb 2008 02:22:45 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 17 Feb 2008 02:22:45 GMT Message-Id: <200802170222.m1H2MjZt097136@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135544 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 02:22:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135544 Change 135544 by kmacy@kmacy:entropy:iwarp on 2008/02/17 02:22:43 move setting of CXGB_SHUTDOWN to earlier in shutdown process fix multicast address programming Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#14 edit .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#16 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_adapter.h#14 (text+ko) ==== @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -54,6 +55,7 @@ #include #include + #ifdef CONFIG_DEFINED #include #include @@ -514,10 +516,23 @@ t3_get_next_mcaddr(struct t3_rx_mode *rm) { uint8_t *macaddr = NULL; + struct ifnet *ifp = rm->port->ifp; + struct ifmultiaddr *ifma; + int i = 0; + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (i == rm->idx) { + macaddr = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); + break; + } + i++; + } + IF_ADDR_UNLOCK(ifp); + - if (rm->idx == 0) - macaddr = (uint8_t *)rm->port->hw_addr; - rm->idx++; return (macaddr); } ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_main.c#16 (text+ko) ==== @@ -672,9 +672,12 @@ { int i; + ADAPTER_LOCK(sc); + sc->flags |= CXGB_SHUTDOWN; + ADAPTER_UNLOCK(sc); cxgb_pcpu_shutdown_threads(sc); ADAPTER_LOCK(sc); - sc->flags |= CXGB_SHUTDOWN; + /* * drops the lock */ @@ -1170,10 +1173,10 @@ t3_mac_enable(mac, MAC_DIRECTION_RX); if_link_state_change(pi->ifp, LINK_STATE_UP); } else { - if_link_state_change(pi->ifp, LINK_STATE_DOWN); pi->phy.ops->power_down(&pi->phy, 1); t3_mac_disable(mac, MAC_DIRECTION_RX); t3_link_start(&pi->phy, mac, &pi->link_config); + if_link_state_change(pi->ifp, LINK_STATE_DOWN); } } @@ -1829,10 +1832,10 @@ struct t3_rx_mode rm; struct cmac *mac = &p->mac; - PORT_LOCK_ASSERT_OWNED(p); - t3_init_rx_mode(&rm, p); + mtx_lock(&p->adapter->mdio_lock); t3_mac_set_rx_mode(mac, &rm); + mtx_unlock(&p->adapter->mdio_lock); } static void @@ -1896,14 +1899,14 @@ error = cxgb_set_mtu(p, ifr->ifr_mtu); break; case SIOCSIFADDR: - case SIOCGIFADDR: if (ifa->ifa_addr->sa_family == AF_INET) { - PORT_LOCK(p); ifp->if_flags |= IFF_UP; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + PORT_LOCK(p); cxgb_init_locked(p); + PORT_UNLOCK(p); + } arp_ifinit(ifp, ifa); - PORT_UNLOCK(p); } else error = ether_ioctl(ifp, command, data); break; @@ -1923,14 +1926,14 @@ PORT_UNLOCK(p); break; + case SIOCADDMULTI: + case SIOCDELMULTI: + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + cxgb_set_rxmode(p); + } + break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: - /* - * This is a convenient place to check the link status when - * no interfaces are up and thus the callout is not running - */ - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - cxgb_tick_handler(p->adapter, 0); error = ifmedia_ioctl(ifp, ifr, &p->media, command); break; case SIOCSIFCAP: @@ -2065,11 +2068,17 @@ { int i; + if(adapter->flags & CXGB_SHUTDOWN) + return; + for_each_port(adapter, i) { struct port_info *p = &adapter->port[i]; struct ifnet *ifp = p->ifp; int status; - + + if(adapter->flags & CXGB_SHUTDOWN) + return; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) continue; @@ -2113,6 +2122,9 @@ adapter_t *sc = (adapter_t *)arg; const struct adapter_params *p = &sc->params; + if(sc->flags & CXGB_SHUTDOWN) + return; + ADAPTER_LOCK(sc); if (p->linkpoll_period) check_link_status(sc); From owner-p4-projects@FreeBSD.ORG Sun Feb 17 02:32:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C7A116A421; Sun, 17 Feb 2008 02:32:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41E9516A417 for ; Sun, 17 Feb 2008 02:32:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2114D13C467 for ; Sun, 17 Feb 2008 02:32:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H2Wt9v097491 for ; Sun, 17 Feb 2008 02:32:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H2Wteu097488 for perforce@freebsd.org; Sun, 17 Feb 2008 02:32:55 GMT (envelope-from jb@freebsd.org) Date: Sun, 17 Feb 2008 02:32:55 GMT Message-Id: <200802170232.m1H2Wteu097488@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135545 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 02:32:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=135545 Change 135545 by jb@jb_freebsd1 on 2008/02/17 02:32:07 Don't assert that the linker lock is locked when getting CTF data. To solve the locking problems that DTrace bumps into, we'll have to add a "busy" counter to the linker_file structure so that a module can (lock the linker lock and) say "you can't unload me now because I'm doing stuff, try again later" (then unlock the linker lock) and do it's stuff without otherwise having to hold a lock to stop itself from getting unloaded. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_linker.c#29 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_linker.c#29 (text+ko) ==== @@ -650,8 +650,6 @@ int linker_ctf_get(linker_file_t file, const uint8_t **data, int *len) { - KLD_LOCK_ASSERT(); - return (LINKER_CTF_GET(file, data, len)); } From owner-p4-projects@FreeBSD.ORG Sun Feb 17 05:58:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4892316A420; Sun, 17 Feb 2008 05:58:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9FB916A418 for ; Sun, 17 Feb 2008 05:58:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CA16113C459 for ; Sun, 17 Feb 2008 05:58:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H5wZY1052515 for ; Sun, 17 Feb 2008 05:58:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H5wZMC052512 for perforce@freebsd.org; Sun, 17 Feb 2008 05:58:35 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 05:58:35 GMT Message-Id: <200802170558.m1H5wZMC052512@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135550 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 05:58:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135550 Change 135550 by imp@imp_lighthouse on 2008/02/17 05:58:30 Implement the PCIB_IVAR_DOMAIN variable. On malta, we have only one domain: domain 0. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/gt_pci.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/gt_pci.c#2 (text+ko) ==== @@ -554,6 +554,9 @@ { struct gt_pci_softc *sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); case PCIB_IVAR_BUS: *result = sc->sc_busno; return (0); From owner-p4-projects@FreeBSD.ORG Sun Feb 17 06:02:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B5B416A419; Sun, 17 Feb 2008 06:02:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00CA416A417 for ; Sun, 17 Feb 2008 06:02:40 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EDD5013C448 for ; Sun, 17 Feb 2008 06:02:39 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H62dDn052903 for ; Sun, 17 Feb 2008 06:02:39 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H62dvH052900 for perforce@freebsd.org; Sun, 17 Feb 2008 06:02:39 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 06:02:39 GMT Message-Id: <200802170602.m1H62dvH052900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135551 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 06:02:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135551 Change 135551 by imp@imp_lighthouse on 2008/02/17 06:02:03 Implement reading domain0 here too. Also, fix minor naming issue. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/admpci.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idtpci.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/admpci.c#2 (text+ko) ==== @@ -325,11 +325,14 @@ } static int -gt_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +admpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct admpci_softc *sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); case PCIB_IVAR_BUS: *result = sc->sc_busno; return (0); @@ -339,7 +342,7 @@ } static int -gt_write_ivar(device_t dev, device_t child, int which, uintptr_t result) +admpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result) { struct admpci_softc * sc = device_get_softc(dev); @@ -471,8 +474,8 @@ /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, gt_read_ivar), - DEVMETHOD(bus_write_ivar, gt_write_ivar), + DEVMETHOD(bus_read_ivar, admpci_read_ivar), + DEVMETHOD(bus_write_ivar, admpci_write_ivar), DEVMETHOD(bus_alloc_resource, admpci_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, admpci_activate_resource), ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idtpci.c#2 (text+ko) ==== @@ -441,11 +441,14 @@ } static int -gt_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +idtpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { struct idtpci_softc *sc = device_get_softc(dev); switch (which) { + case PCIB_IVAR_DOMAIN: + *result = 0; + return (0); case PCIB_IVAR_BUS: *result = sc->sc_busno; return (0); @@ -455,7 +458,7 @@ } static int -gt_write_ivar(device_t dev, device_t child, int which, uintptr_t result) +idtpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result) { struct idtpci_softc * sc = device_get_softc(dev); @@ -591,8 +594,8 @@ /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar, gt_read_ivar), - DEVMETHOD(bus_write_ivar, gt_write_ivar), + DEVMETHOD(bus_read_ivar, idtpci_read_ivar), + DEVMETHOD(bus_write_ivar, idtpci_write_ivar), DEVMETHOD(bus_alloc_resource, idtpci_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, idtpci_activate_resource), From owner-p4-projects@FreeBSD.ORG Sun Feb 17 06:15:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 69CAC16A421; Sun, 17 Feb 2008 06:15:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2576E16A419 for ; Sun, 17 Feb 2008 06:15:54 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1FFBB13C45E for ; Sun, 17 Feb 2008 06:15:54 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1H6FrwW055513 for ; Sun, 17 Feb 2008 06:15:53 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1H6FrDE055510 for perforce@freebsd.org; Sun, 17 Feb 2008 06:15:53 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 06:15:53 GMT Message-Id: <200802170615.m1H6FrDE055510@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135552 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 06:15:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=135552 Change 135552 by imp@imp_lighthouse on 2008/02/17 06:15:25 Fix ADM 5120 config file so that we almost link. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/ADM5120#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/std.adm5120#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/ADM5120#2 (text+ko) ==== @@ -18,7 +18,6 @@ # $FreeBSD$ machine mips -cpu CPU_MIPS4KC ident ADM5120 #makeoptions ARCH_FLAGS=-march=mips32 ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/std.adm5120#2 (text+ko) ==== @@ -3,6 +3,7 @@ cpu CPU_MIPS4KC files "../mips32/adm5120/files.adm5120" +options ISA_MIPS32 # device admpci device admsw From owner-p4-projects@FreeBSD.ORG Sun Feb 17 13:22:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DB6016A421; Sun, 17 Feb 2008 13:22:46 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD5F216A418 for ; Sun, 17 Feb 2008 13:22:45 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ADD8E13C458 for ; Sun, 17 Feb 2008 13:22:45 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HDMj0P013142 for ; Sun, 17 Feb 2008 13:22:45 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HDMjE8013137 for perforce@freebsd.org; Sun, 17 Feb 2008 13:22:45 GMT (envelope-from pgj@FreeBSD.org) Date: Sun, 17 Feb 2008 13:22:45 GMT Message-Id: <200802171322.m1HDMjE8013137@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 135560 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 13:22:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135560 Change 135560 by pgj@disznohal on 2008/02/17 13:22:19 Add initial Hungarian translation of Chapter 26: Electronic Mail. Affected files ... .. //depot/projects/docproj_hu/books/handbook/mail/chapter.sgml#2 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/mail/chapter.sgml#2 (text+ko) ==== @@ -4,175 +4,223 @@ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/mail/chapter.sgml,v 1.136 2007/01/26 20:47:36 pav Exp $ --> - + + + Bill Lloyd - Original work by + Eredetileg készítette: Jim Mock - Rewritten by - + Újraírta: - Electronic Mail + Elektronikus levelezés - Synopsis + Áttekintés + email - Electronic Mail, better known as email, is one of the - most widely used forms of communication today. This chapter provides - a basic introduction to running a mail server on &os;, as well as an - introduction to sending and receiving email using &os;; however, - it is not a complete reference and in fact many important - considerations are omitted. For more complete coverage of the - subject, the reader is referred to the many excellent books listed - in . + Az elektronikus levelezés, avagy e-mail, + a kommunikáció egyik legjobban elterjedt + formája. Ebben a fejezetben bemutatjuk, hogyan futtassunk + &os;-n levelezõ szervert, illetve hogyan küldjünk + és fogadjunk e-maileket a &os; használatával. + Ez azonban semmiképpen sem tekinthetõ egy teljes + referenciának és tulajdonképpen számos + fontos tényezõrõl szót sem ejtünk. A + témára úgy kaphatunk egy sokkal + átfogóbb rálátást, ha a ben felsorolt remek könyveket is + elolvassuk. - After reading this chapter, you will know: + A fejezet elolvasása során + megismerjük: - What software components are involved in sending and receiving - electronic mail. + milyen szoftverkomponensek játszanak szerepet az + elektronikus levelek küldésében és + fogadásában - Where basic sendmail configuration - files are located in FreeBSD. + &os;-ben hol találhatóak a + sendmail konfigurációs + állományai - The difference between remote and - local mailboxes. + mi a különbség a helyi és + távoli postaládák között - How to block spammers from illegally using your mail server as a - relay. + hogyan védjük meg a levelezõ + szerverünket a kéretlen levélszemét + továbbítása ellen - How to install and configure an alternate Mail Transfer Agent on - your system, replacing sendmail. + rendszerünkön hogyan telepítsünk + és állítsunk be más levelezõ + szervereket a sendmail + helyett - How to troubleshoot common mail server problems. + hogyan oldjuk meg a levelezõ szerverekkel + kapcsolatban felmerülõ általános + problémákat - How to use SMTP with UUCP. + hogyan használjuk az SMTP protokollt az + UUCP-vel - How to set up the system to send mail only. + hogyan kell rendszerüket csak + levélküldésre beállítani - How to use mail with a dialup connection. + hogyan levelezzünk betárcsázós + kapcsolattal - How to configure SMTP Authentication for added security. + hogyan növeljük rendszerünk + védelmét az SMTP + hitelesítésének + engedélyezésével - How to install and use a Mail User Agent, such as - mutt to send and receive email. + hogyan telepítsünk és + használjunk a levelek küldésére + és fogadására például a + mutthoz hasonló + levelezõ klienseket - - How to download your mail from a remote POP - or IMAP server. + hogyan töltsük le leveleinket egy távoli + POP vagy IMAP + szerverrõl - How to automatically apply filters and rules to incoming - email. + hogyan alkalmazzunk automatikusan adott szabályokat + vagy szûrõket az érkezõ levelekre - Before reading this chapter, you should: + A fejezet elolvasása elõtt ajánlott: - Properly set up your network connection - (). + az internet csatlakozásunk megfelelõ + beállítása () - Properly set up the DNS information for your mail host - (). + a névfeloldás + beállítása () - Know how to install additional third-party software - (). + a külsõ fejlesztésû + alkalmazások telepítésének ismerete + () - Using Electronic Mail + Az elektronikus levelezés használata + POP IMAP DNS - There are five major parts involved in an email exchange. They - are: the user program, the server daemon, DNS, a - remote or local mailbox, and of course, the - mailhost itself. + Öt fontosabb részre bonthatjuk a + levelezést. Ezek: a + felhasználói program, a levélküldõ + démon, a + névfeloldás, a + helyi vagy távoli postaláda és + természetesen maga a + levelezõ szerver. - The User Program + A felhasználói program - This includes command line programs such as + Ide soroljuk a különbözõ parancssoros + programokat, mint például a mutt, - pine, elm, - and mail, and GUI programs such as - balsa, - xfmail to name a few, and something - more sophisticated like a WWW browser. These - programs simply pass off the email transactions to the local - mailhost, either - by calling one of the server - daemons available, or delivering it over TCP. - + pine, elm + és mail, valamint a + különféle grafikus alkalmazásokat, mint + például balsa, + xfmail, csak hogy felsoroljuk + néhány újabb, egy + webböngészõhöz hasonlóan + kifinomult eszközt is. Ezek a programok + egyszerûen átküldik az elektronikus levelekkel + kapcsolatos tranzakciókat a helyi levelezõ + szervernek vagy meghívják + valamelyik levélküldõ + démont, esetleg közvetlenül + TCP-n keresztül + kézbesítenek. + + - Mailhost Server Daemon + A levélküldõ démon + - mail server daemons - sendmail + levelezõ démon + sendmail + - mail server daemons - postfix + levelezõ démon + postfix + - mail server daemons - qmail + levelezõ démon + qmail + - mail server daemons - exim + levelezõ démon + exim - &os; ships with sendmail by - default, but also support numerous other mail server daemons, - just some of which include: + A &os; alapból a sendmail + nevû programot ajánlja fel erre a célra, de + támogat más levelezõ szervereket is, ezek + közül meg is említünk + néhányat + ízelítõként: @@ -188,243 +236,325 @@ - The server daemon usually has two functions—it is responsible - for receiving incoming mail as well as delivering outgoing mail. It is - not responsible for the collection of mail using protocols - such as POP or IMAP to - read your email, nor does it allow connecting to local - mbox or Maildir mailboxes. You may require - an additional daemon for - that. + Ez a démon általában két + feladatot lát el — egyaránt felelõs a + beérkezõ levelek fogadásáért + és a kimenõ levelek + elküldéséért. Azonban + nem tartozik a feladatai közé, + hogy a POP vagy IMAP + protokollokhoz hasonlóan olvashatóvá tegye + a leveleinket illetve csatlakozni engedjen a helyi + mbox vagy Maildir formátumú + postaládáinkhoz. Ezekhez a mûveletekhez egy + külön démon + fog kelleni. - Older versions of sendmail - have some serious security issues which may result in an - attacker gaining local and/or remote access to your machine. - Make sure that you are running a current version to avoid - these problems. Optionally, install an alternative - MTA from the &os; - Ports Collection. + A sendmail régebbi + változatai tartalmaznak olyan komoly biztonsági + hibákat, amelyek kihasználásával + az illetéktelen behatolók helyi és/vagy + távoli hozzáférést tudnak szerezni + a gépünkön. Az ilyen jellegû + problémák elkerülése + érdekében igyekezzünk mindig a legfrissebb + verzióját használni. Vagy a &os; + Portgyûjteményébõl + telepítsünk fel egy másik + levélküldõ démont. + - Email and DNS + Az elektronikus levelek és a + névfeloldás - The Domain Name System (DNS) and its daemon - named play a large role in the delivery of - email. In order to deliver mail from your site to another, the - server daemon will look up the remote site in the DNS to determine the - host that will receive mail for the destination. This process - also occurs when mail is sent from a remote host to your mail - server. + A névfeloldás (Domain Name System, DNS) + és a hozzátartozó named + démon nagy szerepet játszik az elektronikus + levelek továbbításában. A + démon a leveleket úgy küldi át az + egyik géprõl a másikra, hogy a + névfeloldáson keresztül megkeresi a leveleket + kapó távoli gépet. Ez a folyamat + szintén végbemegy, amikor egy távoli + géprõl levelet küldenek a mi + szerverünkre. - MX record + MX rekord - DNS is responsible for mapping - hostnames to IP addresses, as well as for storing information - specific to mail delivery, known as MX records. The MX (Mail - eXchanger) record specifies which host, or hosts, will receive - mail for a particular domain. If you do not have an MX record - for your hostname or domain, the mail will be delivered - directly to your host provided you have an A record pointing - your hostname to your IP address. + A DNS valósítja meg a + hálózati nevek és az IP-címek + összerendelését valamint ez tárolja el + a levélküldésre vonatkozó + információkat is, amiket MX rekordoknak + hívnak. Az MX (Mail eXchanger, + levélváltó) rekord adja meg + azt a gépet vagy azokat a gépeket, amelyek az + adott névtartományban fogadják a leveleket. + Ha a hálózati nevünkhöz vagy + tartományunkhoz nem tartozik MX rekord, akkor a + levél közvetlenül a gépünkre + vándorol feltéve, hogy rendelkezik olyan A + rekorddal, ami összerendeli a gépünk + nevét az IP-címével. + + A &man.host.1; parancs használatával az + alábbi példához hasonlóan + tetszõleges tartomány MX rekordját meg tudjuk + nézni: - You may view the MX records for any domain by using the - &man.host.1; command, as seen in the example below: + &prompt.user; host -t mx +FreeBSD.org FreeBSD.org mail is handled (pri=10) by +mx1.FreeBSD.org - &prompt.user; host -t mx FreeBSD.org -FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org - Receiving Mail + Az elektronikus levelek fogadása + - email - receiving + elektronikus levél + fogadása - Receiving mail for your domain is done by the mail host. It - will collect all mail sent to your domain and store it - either in mbox (the default method for storing mail) or Maildir format, depending - on your configuration. - Once mail has been stored, it may either be read locally using - applications such as &man.mail.1; or - mutt, or remotely accessed and - collected using protocols such as - POP or IMAP. - This means that should you only - wish to read mail locally, you are not required to install a - POP or IMAP server. + A tartományunkhoz tartozó leveleket + fogadását a levelezõ szerver végzi. + Összegyûjti a tartományunkba küldött + összes levelet és ezeket a + beállításainktól függõen + vagy mbox (a levelek + tárolásának alapértelmezett + módja) vagy pedig Maildir formátumban + eltárolja. Ahogy eltárolt egy levelet, úgy + helyben egybõl el is tudjuk olvasni például a + &man.mail.1; vagy a mutt + használatával, illetve távolról a + POP vagy IMAP és a + hasonló protokollokkal tudjuk elérni és + begyûjteni. Ezért tehát ha csak a helyi + gépen kívánjuk olvasni a leveleinket, akkor + ahhoz egyáltalán nem kell POP + vagy IMAP szervert + telepítenünk. - Accessing remote mailboxes using <acronym>POP</acronym> and <acronym>IMAP</acronym> + Távoli postaládák + elérése a <acronym>POP</acronym> és + <acronym>IMAP</acronym> használatával - POP - IMAP - In order to access mailboxes remotely, you are required to - have access to a POP or IMAP - server. These protocols allow users to connect to their mailboxes from - remote locations with ease. Though both - POP and IMAP allow users - to remotely access mailboxes, IMAP offers - many advantages, some of which are: + POP + IMAP - - - IMAP can store messages on a remote - server as well as fetch them. - + A távoli postaládák + eléréséhez tudnunk kell csatlakozni egy + POP vagy IMAP + szerverhez. Ezeken a protokollokon keresztül + tudják a felhasználók minden + különösebb nehézség + nélkül elérni távolról a + helyi postaládáikat. Noha a + POP és az IMAP + segítségével egyaránt el tudjuk + így érni a postaládákat, az + IMAP használatának + mégis több az elõnye, íme + néhány közülük: - - IMAP supports concurrent updates. - + + + az IMAP a levelek leszedése + mellett tárolni is képes a távoli + szerveren + - - IMAP can be extremely useful over - low-speed links as it allows users to fetch the structure - of messages without downloading them; it can also - perform tasks such as searching on the server in - order to minimize data transfer between clients and - servers. - + + az IMAP támogat + párhuzamos lekéréseket + - + + az IMAP hihetetlenül hasznos + tud lenni lassabb összeköttetések + esetében, mivel lehetõvé teszi a + felhasználók számára, hogy + csak az üzenetek vázát + töltsék le és ne az egészet. + Továbbá a szerver és a kliens + közti adatmozgás csökkentése + érdekében képes bizonyos feladatokat + a szerveren elvégezni, mondjuk keresni. + + - In order to install a POP or - IMAP server, the following steps should be - performed: + Egy POP vagy IMAP + szerver telepítéséhez az alábbi + lépések megtétele + szükséges: - + - Choose an IMAP or - POP server that best suits your needs. - The following POP and - IMAP servers are well known and serve - as some good examples: + Válasszuk ki az igényeinket legjobban + kielégítõ IMAP vagy + POP szervert. A következõ + POP és IMAP + szerverek eléggé elterjedtek és + egyben remek példák: - + qpopper; - + - + teapop; - + - + imap-uw; - + - + courier-imap; - + - - Install the POP or - IMAP daemon of your choosing from the - ports - collection. + + A Portgyûjteménybõl + telepítsük fel a kiválasztott + POP vagy IMAP + démont. - Where required, modify /etc/inetd.conf - to load the POP or - IMAP server. + Ha szükséges, akkor a + POP vagy IMAP szerver + betöltéséhez írjuk át az + /etc/inetd.conf + állományt. - + - It should be noted that both POP and - IMAP transmit information, including - username and password credentials in clear-text. This means - that if you wish to secure the transmission of information - across these protocols, you should consider tunneling - sessions over &man.ssh.1;. Tunneling sessions is - described in . - + Meg kell említenünk, hogy mind a + POP és az IMAP + az összes információt, tehát + belértve a felhasználók neveit + és jelszavait titkosítatlan formában + továbbítja. Ez azt jelenti, hogy ha ezeket a + protokollokat biztonságos módon + szeretnénk elérni, akkor az &man.ssh.1; + használatával hozzunk létre + hozzá egy járatot és bújtassuk. + Errõl részletesebben a ban olvashatunk. + - Accessing local mailboxes + A helyi postaládák + elérése + + A helyi postaládákat a szerveren levõ + levelezõ kliensek közvetlen + használatával érhetjük el. Ilyen + alkalmazások például a + mutt vagy a &man.mail.1;. - Mailboxes may be accessed locally by directly utilizing - MUAs on the server on which the mailbox - resides. This can be done using applications such as - mutt or &man.mail.1;. - - The Mail Host - mail host + A levelezõ szerver + + levelezõ szerver + + A levelezõ szerver az a szerver, ami a + gépünk vagy akár az egész + hálózatunk irányába + érkezõ levelek fogadásáért + és elküldéséért + felelõs. - The mail host is the name given to a server that is - responsible for delivering and receiving mail for your host, and - possibly your network. - - Christopher - Shumway - Contributed by - + + Christopher + Shumway + Írta: + - <application>sendmail</application> Configuration + + A <application>sendmail</application> + beállítása sendmail - &man.sendmail.8; is the default Mail Transfer Agent (MTA) in - FreeBSD. sendmail's job is to accept - mail from Mail User Agents (MUA) and deliver it - to the appropriate mailer as defined by its configuration file. - sendmail can also accept network - connections and deliver mail to local mailboxes or deliver it to - another program. + A &man.sendmail.8; a &os; alapértelmezett + levéltovábbító ügynöke (Mail + Transfer Agent, MTA). A + sendmail feladata fogadni a + levelezõ kliensektõl (Mail User Agent, + MUA) érkezõ leveleket és + kézbesíteni azokat a konfigurációs + állományában megadott megfelelõ + levelezõnek. A sendmail + hálózati kapcsolatokat is fogad, képes a + helyi postaládákba vagy akár más + programoknak is leveleket továbbítani. - sendmail uses the following - configuration files: + A sendmail a következõ + állományban tárolja + beállításait: /etc/mail/access + /etc/mail/aliases + /etc/mail/local-host-names + /etc/mail/mailer.conf + /etc/mail/mailertable + /etc/mail/sendmail.cf + /etc/mail/virtusertable + - Filename - Function + Állomány + Szerep @@ -432,628 +562,879 @@ /etc/mail/access - sendmail access database - file + a sendmail + engedélyezett hozzáféréseit + tároló adatbázis /etc/mail/aliases - Mailbox aliases + a postaládák álnevei /etc/mail/local-host-names - Lists of hosts sendmail - accepts mail for - + azon nevek felsorolása, amik + számára a sendmail + leveleket fogad + /etc/mail/mailer.conf - Mailer program configuration + a levelezõ programok + beállításai /etc/mail/mailertable - Mailer delivery table + a levelezõ programok + kézbesítési + táblázata /etc/mail/sendmail.cf - sendmail master - configuration file + A sendmail központi + beállításait tároló + állomány /etc/mail/virtusertable - Virtual users and domain tables + virtuális felhasználók és + tartományok táblázatai - - <filename>/etc/mail/access</filename> + + <filename>/etc/mail/access</filename> - The access database defines what host(s) or IP addresses - have access to the local mail server and what kind of access - they have. Hosts can be listed as , - , or simply passed - to sendmail's error handling routine with a given mailer error. - Hosts that are listed as , which is the - default, are allowed to send mail to this host as long as the - mail's final destination is the local machine. Hosts that are - listed as are rejected for all mail - connections. Hosts that have the option - for their hostname are allowed to send mail for any destination - through this mail server. + Az engedélyezett hozzáféréseket + tároló adatbázis tartalmazza milyen + hálózati neve(ke)n vagy IP-címeken lehet + elérni a helyi levelezõ szervert és milyen + típusú hozzáférést kapnak. A + gépeket (rendben), + (visszautasít), + (továbbítás) + beállításokkal reagálhatjuk le, vagy + egyszerûen csak átadjuk a + sendmail hibakezelõ + rutinjának egy adott kézbesítési + hibával. Ha egy gépet az + beállítással veszük fel a + listára, ami egyébként + alapértelmezés, akkor ez a gép levelet tud + küldeni egészen addig, amíg a + végsõ cél a helyi gép marad. A + beállítással + felsorolt gépek számára semmiféle + levelezés nem engedélyezett. Ha pedig egy + gép mellett a + beállítás jelenik meg, akkor a szerveren + keresztül tetszõleges címre + küldhet. - Configuring the <application>sendmail</application> - Access Database + A <application>sendmail</application> + elérését szabályozó + adatbázis beállítása - cyberspammer.com 550 We do not accept mail from spammers + cyberspammer.com 550 We do not accept mail from spammers FREE.STEALTH.MAILER@ 550 We do not accept mail from spammers another.source.of.spam REJECT okay.cyberspammer.com OK 128.32 RELAY - In this example we have five entries. Mail senders that - match the left hand side of the table are affected by the action - on the right side of the table. The first two examples give an - error code to sendmail's error - handling routine. The message is printed to the remote host when - a mail matches the left hand side of the table. The next entry - rejects mail from a specific host on the Internet, - another.source.of.spam. The next entry accepts - mail connections from a host - okay.cyberspammer.com, which is more exact than - the cyberspammer.com line above. More specific - matches override less exact matches. The last entry allows - relaying of electronic mail from hosts with an IP address that - begins with 128.32. These hosts would be able - to send mail through this mail server that are destined for other - mail servers. + Ebben a példában öt bejegyzést + láthatunk. A táblázat bal felének + valamelyik sorára illeszkedõ küldõkre a + táblázatban a sor jobb felén megjelenõ + cselekvés érvényesül. Az elsõ + két sorban a sendmail + hibakezelõ rutinjának adunk át + hibakódokat. A hozzátartozó üzenet + akkor fog megjelenni a távoli gépen, amikor a + tõle érkezõ levél illeszkedik a bal + oldali szabályra. Az ezeket követõ + bejegyzésben visszalökünk minden olyan levelet, + ami az internetrõl egy adott + számítógéptõl érkezik, + mondjuk a another.source.of.spam + címrõl. A következõ bejegyzésben + az okay.cyberspammer.com + címrõl elfogadjuk a kapcsolódást, ami + viszont sokkal pontosabb megjelölés a fentebb + szereplõ cyberspammer.com sornál. A + pontosabban kifejtett nevek + felülbírálják a kevésbé + pontosan megnevezetteket. Végül az utolsó + bejegyzésben engedélyezzük a levelek + továbbküldését minden olyan gép + számára, aminek a címe + 128.32-vel kezdõdik. Ezek tehát + képesek ezen a levelezõ szerveren keresztül + bárhova leveleket küldeni. + + Az állomány módosítása + után az adatbázis frissítéséhez + mindig le kell futtatnunk egy make parancsot az + /etc/mail/ könyvtárban. - When this file is updated, you need to run - make in /etc/mail/ to - update the database. + - - - <filename>/etc/mail/aliases</filename> + + <filename>/etc/mail/aliases</filename> - The aliases database contains a list of virtual mailboxes - that are expanded to other user(s), files, programs or other - aliases. Here are a few examples that can be used in - /etc/mail/aliases: + Az álneveket tartalmazó adatbázis + virtuális postaládákat sorol fel, amik + más felhasználó(k)ra, + állományokra, programokra vagy további + álnevekre vonatkozhatnak. Íme + néhány példa az + /etc/mail/aliases állományban + szereplõ bejegyzésekre: - Mail Aliases - root: localuser + Virtuális postaládák + + root: localuser ftp-bugs: joe,eric,paul bit.bucket: /dev/null procmail: "|/usr/local/bin/procmail" - The file format is simple; the mailbox name on the left - side of the colon is expanded to the target(s) on the right. - The - first example simply expands the mailbox root - to the mailbox localuser, which is then - looked up again in the aliases database. If no match is found, - then the message is delivered to the local user - localuser. The next example shows a mail - list. Mail to the mailbox ftp-bugs is - expanded to the three local mailboxes joe, - eric, and paul. Note >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Feb 17 13:28:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28A8D16A41A; Sun, 17 Feb 2008 13:28:53 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1C4016A417 for ; Sun, 17 Feb 2008 13:28:52 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D372D13C474 for ; Sun, 17 Feb 2008 13:28:52 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HDSquE013382 for ; Sun, 17 Feb 2008 13:28:52 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HDSq7M013379 for perforce@freebsd.org; Sun, 17 Feb 2008 13:28:52 GMT (envelope-from pgj@FreeBSD.org) Date: Sun, 17 Feb 2008 13:28:52 GMT Message-Id: <200802171328.m1HDSq7M013379@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 135562 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 13:28:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135562 Change 135562 by pgj@disznohal on 2008/02/17 13:27:59 IFC before translation Affected files ... .. //depot/projects/docproj_hu/books/handbook/firewalls/chapter.sgml#3 integrate Differences ... ==== //depot/projects/docproj_hu/books/handbook/firewalls/chapter.sgml#3 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -153,7 +153,11 @@ &man.altq.4; and &man.dummynet.4;. Dummynet has traditionally been closely tied with IPFW, and ALTQ with - IPF/PF. IPF, + PF. Traffic shaping for IPFILTER can currently + be done with IPFILTER for NAT and filtering and + IPFW with &man.dummynet.4; + or by using PF with + ALTQ. IPFW, and PF all use rules to control the access of packets to and from your system, although they go about it different ways and have different rule syntaxes. @@ -2248,7 +2252,7 @@ by setting firewall_type variable to absolute path of file, which contains firewall rules without any command-line options for &man.ipfw.8; itself. A - simple examble of ruleset file can be following: + simple example of ruleset file can be following: add block in all add block out all From owner-p4-projects@FreeBSD.ORG Sun Feb 17 15:07:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0F77F16A420; Sun, 17 Feb 2008 15:07:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED5716A419; Sun, 17 Feb 2008 15:07:16 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id 2EE1513C45D; Sun, 17 Feb 2008 15:07:16 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 4204014305; Sun, 17 Feb 2008 16:15:31 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01492-05; Sun, 17 Feb 2008 16:15:29 +0100 (CET) Message-ID: <47B84D9B.4010903@semihalf.com> Date: Sun, 17 Feb 2008 16:07:07 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> In-Reply-To: <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 15:07:17 -0000 Marcel Moolenaar wrote: >>> Save U-Boot's registers at startup and restore them when >>> performing a syscall. This way we don't have to compile >>> code specially to avoid using those registers. Otherwise >>> we have to encode knowledge of those registers in at least >>> 4 makefiles and introduce a build knob to enable it all. >>> This does not allow us to build everything with a single >>> build world. >> >> Hi Marcel, >> >> I'm not quite sure this is sufficient... I already had a similar >> save/restore >> in place, but there is some general problem with U-Boot that leads to >> hangs >> (experienced): > > Interesting, I didn't see any such problems with 1.3.2-rc1. > After a bit of digging, I guess this is why it didn't bite you up front: very recently (last minute inclusions during 1.3.2-rc1 preparation) Wolfgang changed the dedicated regs layout... with r29 going -> r2 due to certain problems with gcc 4.x producing bigger code when not all 'high' registers it likes are available in the whole block etc. Anyway, the pointer to global_data now became r2, which is system/reserved according to ABI, so r29 unsafety is gone. However, there's r14, which is used for GOT access, and it needs to be addressed still, as we're prone to the same kind of errors. I think the easiest way to go would be following this recent change and switch r14 -> r13. R13 is also non-volatile in ABI and serves small data area pursposes, and we could use it for GOT ptr. This way no context save/restore would be necessary at all. I'll follow up on this on u-boot-users ML. Rafal From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:12:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A7C416A469; Sun, 17 Feb 2008 17:12:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CBDF16A41A for ; Sun, 17 Feb 2008 17:12:49 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4374813C469 for ; Sun, 17 Feb 2008 17:12:49 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHCnov050058 for ; Sun, 17 Feb 2008 17:12:49 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHCn90050055 for perforce@freebsd.org; Sun, 17 Feb 2008 17:12:49 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 17:12:49 GMT Message-Id: <200802171712.m1HHCn90050055@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135575 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:12:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135575 Change 135575 by csjp@csjp_xor on 2008/02/17 17:12:18 Move bsmtrace into the trustedbsd namespace Affected files ... .. //depot/projects/trustedbsd/bsmtrace/HISTORY#1 add .. //depot/projects/trustedbsd/bsmtrace/Makefile#1 add .. //depot/projects/trustedbsd/bsmtrace/README#1 add .. //depot/projects/trustedbsd/bsmtrace/TODO#1 add .. //depot/projects/trustedbsd/bsmtrace/bsm.c#1 add .. //depot/projects/trustedbsd/bsmtrace/bsm.h#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.1#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.c#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf.5#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.ebnf#1 add .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.h#1 add .. //depot/projects/trustedbsd/bsmtrace/conf.c#1 add .. //depot/projects/trustedbsd/bsmtrace/conf.h#1 add .. //depot/projects/trustedbsd/bsmtrace/config.h#1 add .. //depot/projects/trustedbsd/bsmtrace/deuce.h#1 add .. //depot/projects/trustedbsd/bsmtrace/grammar.y#1 add .. //depot/projects/trustedbsd/bsmtrace/includes.h#1 add .. //depot/projects/trustedbsd/bsmtrace/log.c#1 add .. //depot/projects/trustedbsd/bsmtrace/log.h#1 add .. //depot/projects/trustedbsd/bsmtrace/queue.h#1 add .. //depot/projects/trustedbsd/bsmtrace/token.l#1 add .. //depot/projects/trustedbsd/bsmtrace/trigger.c#1 add .. //depot/projects/trustedbsd/bsmtrace/trigger.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:16:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2E6AE16A46C; Sun, 17 Feb 2008 17:16:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFA0E16A41B for ; Sun, 17 Feb 2008 17:16:57 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C695913C468 for ; Sun, 17 Feb 2008 17:16:57 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHGvh1060533 for ; Sun, 17 Feb 2008 17:16:57 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHGt0X060530 for perforce@freebsd.org; Sun, 17 Feb 2008 17:16:55 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 17:16:55 GMT Message-Id: <200802171716.m1HHGt0X060530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135577 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:16:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135577 Change 135577 by csjp@csjp_xor on 2008/02/17 17:16:02 Change the trustedbsd website to reflect the new location of bsmtrace Affected files ... .. //depot/projects/trustedbsd/www/bsmtrace.page#2 edit Differences ... ==== //depot/projects/trustedbsd/www/bsmtrace.page#2 (text+ko) ==== @@ -31,7 +31,7 @@ - $P4: //depot/projects/trustedbsd/www/bsmtrace.page#1 $ + $P4: //depot/projects/trustedbsd/www/bsmtrace.page#2 $ @@ -41,7 +41,7 @@

Perforce: - //depot/user/csjp/bsmtrace/... + //depot/projects/trustedbsd/bsmtrace/...

BSMtrace is a utility that processes audit trails, or real-time From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:34:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3EC2616A420; Sun, 17 Feb 2008 17:34:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0422816A419; Sun, 17 Feb 2008 17:34:25 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.72]) by mx1.freebsd.org (Postfix) with ESMTP id E5E1613C44B; Sun, 17 Feb 2008 17:34:24 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout009/MantshX 4.0) with ESMTP id m1HHYO96017288; Sun, 17 Feb 2008 09:34:24 -0800 (PST) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m1HHYMfV024090 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 17 Feb 2008 09:34:23 -0800 (PST) Message-Id: From: Marcel Moolenaar To: Rafal Jaworowski In-Reply-To: <47B84D9B.4010903@semihalf.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 17 Feb 2008 09:34:21 -0800 References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B84D9B.4010903@semihalf.com> X-Mailer: Apple Mail (2.919.2) Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:34:25 -0000 On Feb 17, 2008, at 7:07 AM, Rafal Jaworowski wrote: > Marcel Moolenaar wrote: >>>> Save U-Boot's registers at startup and restore them when >>>> performing a syscall. This way we don't have to compile >>>> code specially to avoid using those registers. Otherwise >>>> we have to encode knowledge of those registers in at least >>>> 4 makefiles and introduce a build knob to enable it all. >>>> This does not allow us to build everything with a single >>>> build world. >>> >>> Hi Marcel, >>> >>> I'm not quite sure this is sufficient... I already had a similar >>> save/restore >>> in place, but there is some general problem with U-Boot that leads >>> to >>> hangs >>> (experienced): >> >> Interesting, I didn't see any such problems with 1.3.2-rc1. >> > > After a bit of digging, I guess this is why it didn't bite you up > front: very > recently (last minute inclusions during 1.3.2-rc1 preparation) > Wolfgang > changed the dedicated regs layout... with r29 going -> r2 due to > certain > problems with gcc 4.x producing bigger code when not all 'high' > registers it > likes are available in the whole block etc. I'm happy I removed all that knowledge in makefiles and put it in a single source file. Maybe we should save and restore all registers so that we don't have to worry about it anymore. > Anyway, the pointer to global_data > now became r2, which is system/reserved according to ABI, so r29 > unsafety is > gone. I like that change. It makes a lot of sense. > I think the easiest way to go would be following this recent change > and switch > r14 -> r13. R13 is also non-volatile in ABI and serves small data area > pursposes, and we could use it for GOT ptr. This way no context save/ > restore > would be necessary at all. I'll follow up on this on u-boot-users ML. I like that too. If access to the GOT is not performance critical, it can also be put in the global data so that there's only r2... Anyway: Good catch! -- Marcel Moolenaar xcllnt@mac.com From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:43:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2665A16A46C; Sun, 17 Feb 2008 17:43:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE6EE16A420 for ; Sun, 17 Feb 2008 17:43:30 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D34B613C45E for ; Sun, 17 Feb 2008 17:43:25 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHhP3w062268 for ; Sun, 17 Feb 2008 17:43:25 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHhPJX062260 for perforce@freebsd.org; Sun, 17 Feb 2008 17:43:25 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 17:43:25 GMT Message-Id: <200802171743.m1HHhPJX062260@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135579 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:43:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135579 Change 135579 by csjp@csjp_xor on 2008/02/17 17:42:30 Lets try that again, but this time on the correct branch. Affected files ... .. //depot/projects/trustedbsd/bsmtrace/Makefile#2 edit .. //depot/projects/trustedbsd/bsmtrace/README#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsm.c#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.c#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf.5#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.ebnf#2 edit .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.h#2 edit .. //depot/projects/trustedbsd/bsmtrace/conf.c#2 edit .. //depot/projects/trustedbsd/bsmtrace/deuce.h#2 edit .. //depot/projects/trustedbsd/bsmtrace/grammar.y#2 edit .. //depot/projects/trustedbsd/bsmtrace/includes.h#2 edit .. //depot/projects/trustedbsd/bsmtrace/log.c#2 edit .. //depot/projects/trustedbsd/bsmtrace/pipe.c#1 add .. //depot/projects/trustedbsd/bsmtrace/pipe.h#1 add .. //depot/projects/trustedbsd/bsmtrace/token.l#2 edit .. //depot/projects/trustedbsd/bsmtrace/trigger.c#2 edit Differences ... ==== //depot/projects/trustedbsd/bsmtrace/Makefile#2 (text+ko) ==== @@ -1,18 +1,18 @@ -# $Id: Makefile,v 1.7 2007/04/13 14:45:12 csjp Exp $ +# $Id: Makefile,v 1.8 2007/07/13 00:03:50 csjp Exp $ CC = gcc CFLAGS = -Wall -g TARGETS = bsmtrace -OBJ = bsm.o bsmtrace.o conf.o y.tab.o lex.yy.o log.o trigger.o +OBJ = bsm.o bsmtrace.o conf.o y.tab.o lex.yy.o log.o pipe.o trigger.o PREFIX = /usr/local LIBS = -lbsm -.ifdef PCRE -CFLAGS += -I /usr/local/include -CFLAGS += -L /usr/local/lib -CFLAGS += -D PCRE -LIBS += -lpcre -.endif +#.ifdef PCRE +#CFLAGS += -I /usr/local/include +#CFLAGS += -L /usr/local/lib +#CFLAGS += -D PCRE +#LIBS += -lpcre +#.endif all: $(TARGETS) ==== //depot/projects/trustedbsd/bsmtrace/README#2 (text+ko) ==== ==== //depot/projects/trustedbsd/bsmtrace/bsm.c#2 (text+ko) ==== @@ -3,7 +3,7 @@ * Copyright (c) 2007 Christian S.J. Peron * All rights reserved. * - * $Id: bsm.c,v 1.44 2007/04/15 01:23:49 csjp Exp $ + * $Id: bsm.c,v 1.45 2007/10/09 02:24:30 csjp Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -122,8 +122,7 @@ * on the object we are interested in, but a write on some anonymous * object has occured, should we still raise an alert? */ - if (bd->br_path == NULL) - return (0); + /* * Check to see if the user has supplied any objects. If not, then this * is a member match. @@ -132,6 +131,12 @@ if (ap->a_cnt == 0) return (1); /* + * We are interested in particular objects, but the audit record has + * not supplied any. We will treat this as a fail to match. + */ + if (bd->br_path == NULL) + return (0); + /* * Otherwise, the record contains a pathname which may be represented as * a static string, or as a pcre. */ @@ -185,7 +190,7 @@ * sequence, use stderr. This really needs to be fixed to look at what * if anything is specified in the global logging options. */ - if (TAILQ_EMPTY(&bs->bs_log_channel)) { + if (TAILQ_EMPTY(&bs->bs_log_channel) && opts.Fflag != 0) { log_bsm_stderr(NULL, bs, bd); return; } @@ -361,12 +366,38 @@ #endif } +/* + * Implement a function which produces random values with an interesting + * property. This function will produce a random value, where the probability + * of this value being between 0 and size is specified by prob. + * + * Let v be > 0 and < 1 (random value) + * Let P (probability) be > 0 and < 1 + * + * Rv = v * (range / P); + * + */ +static float +bsm_rand_bias(float size, float prob) +{ + unsigned int val; + float r; + + val = arc4random(); + r = (float)val; + while (r > 1) + r = r / 10; + return (r * (size / prob)); +} + static struct bsm_sequence * bsm_sequence_clone(struct bsm_sequence *bs, u_int subj, struct bsm_record_data *bd) { struct bsm_sequence *bs_new; struct bsm_state *bm; + float size, prob; + int rnd; bs_new = bsm_dyn_sequence_find(bs, bd, subj); if (bs_new != NULL) { @@ -403,6 +434,18 @@ bm->bm_raw = bsm_copy_record_data(bd); bm->bm_raw_len = bd->br_raw_len; bs_new->bs_cur_state = TAILQ_NEXT(bm, bm_glue); + /* + * Handle the randomization of the timeout window here. + */ + if (bs_new->bs_seq_time_wnd != 0) { + size = bs_new->bs_seq_time_wnd; + if (bs_new->bs_seq_time_wnd_prob > 0) + prob = (float)bs_new->bs_seq_time_wnd_prob / 100; + else + prob = (float)(65 / 100); + rnd = bsm_rand_bias(size, prob); + bs_new->bs_timeout = bs_new->bs_timeout + rnd; + } return (bs_new); } @@ -490,7 +533,7 @@ bsm_loop(char *atrail) { struct bsm_record_data bd; - int reclen, bytesread; + int reclen, bytesread, recsread; u_char *bsm_rec; tokenstr_t tok; FILE *fp; @@ -501,10 +544,22 @@ fp = fopen(opts.aflag, "r"); if (fp == NULL) bsmtrace_error(1, "%s: %s", opts.aflag, strerror(errno)); + if (strcmp(opts.aflag, DEFAULT_AUDIT_TRAIL) == 0) + audit_pipe_fd = fileno(fp); + dprintf("opened '%s' for audit monitoring\n", opts.aflag); /* * Process the BSM record, one token at a time. */ + recsread = 0; while ((reclen = au_read_rec(fp, &bsm_rec)) != -1) { + /* + * If we are reading data from the audit pipe, we need check + * how many records, if any have been dropped by the kernel. + * If any record loss has been identified, pipe_analyze_loss() + * should increase the internal audit pipe queue length. + */ + if (audit_pipe_fd > 0 && (recsread % 50) == 0) + pipe_analyze_loss(audit_pipe_fd); bzero(&bd, sizeof(bd)); bd.br_raw = bsm_rec; bd.br_raw_len = reclen; @@ -581,6 +636,7 @@ } bsm_sequence_scan(&bd); free(bsm_rec); + recsread++; } - fclose(fp); + (void) fclose(fp); } ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.c#2 (text+ko) ==== @@ -3,7 +3,7 @@ * Copyright (c) 2007 Christian S.J. Peron * All rights reserved. * - * $Id: bsmtrace.c,v 1.18 2007/04/13 14:45:12 csjp Exp $ + * $Id: bsmtrace.c,v 1.19 2007/10/09 02:22:15 csjp Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -48,7 +48,7 @@ (void) sprintf(pidbuf, "%d", getpid()); if (write(fd, pidbuf, strlen(pidbuf)) < 0) bsmtrace_error(1, "write pid file faled"); - close(fd); + (void) close(fd); } /* @@ -68,7 +68,7 @@ else pri = LOG_WARNING; va_start(ap, fmt); - vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, ap); + (void) vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, ap); va_end(ap); syslog(pri, "%s: %s", flag != 0 ? "fatal" : "warning", fmtbuf); /* if we are not yet a daemon, we also write the error message @@ -87,6 +87,7 @@ void bsmtrace_exit(int x) { + exit(x); } @@ -99,10 +100,22 @@ if (!opts.dflag) return; va_start(ap, fmt); - memset(buf, 0, sizeof(buf)); - vsnprintf(buf, sizeof(buf) - 1, fmt, ap); + (void) memset(buf, 0, sizeof(buf)); + (void) vsnprintf(buf, sizeof(buf) - 1, fmt, ap); va_end(ap); - fprintf(stderr, "debug: %s", buf); + (void) fprintf(stderr, "debug: %s", buf); + (void) fflush(stderr); +} + +void +bsmtrace_handle_sigint(int sig) +{ + + if (audit_pipe_fd != 0) { + (void) fputs("\n", stderr); + pipe_report_stats(audit_pipe_fd); + } + bsmtrace_exit(1); } void @@ -115,13 +128,30 @@ openlog("bsmtrace", LOG_NDELAY | LOG_PID, LOG_AUTH | LOG_ALERT); } +static void +bsmtrace_seed(void) +{ + unsigned long seed; + int fd; + + fd = open("/dev/random", O_RDONLY); + if (fd < 0) + bsmtrace_error(1, "open random device failed"); + if (read(fd, &seed, sizeof(seed)) != sizeof(seed)) + bsmtrace_error(1, "read random device failed"); + srandom(seed); + (void) close(fd); +} + int main(int argc, char *argv[]) { int ret, fd; char ch; - signal(SIGCHLD, SIG_IGN); /* Ignore dying children */ + bsmtrace_seed(); + (void) signal(SIGCHLD, SIG_IGN); /* Ignore dying children */ + (void) signal(SIGINT, bsmtrace_handle_sigint); set_default_settings(&opts); while ((ch = getopt(argc, argv, "Fa:bdf:hp:v")) != -1) { switch (ch) { @@ -172,7 +202,9 @@ (void) dup2(fd, STDERR_FILENO); if (fd > 2) (void) close(fd); - setsid(); + if (setsid() < 0) + bsmtrace_error(1, "setsid failed: %s", + strerror(errno)); bsmtrace_write_pidfile(opts.pflag); daemonized = 1; } ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf#2 (text+ko) ==== @@ -67,9 +67,13 @@ # ############################################################ +# +# +# XXX add a sequence which detects system accounts executing code +# +# sequence firewall.change.attempt { subject not $fwadmins; - log { $bsm; }; state { event $execution; object $fwtools; @@ -79,7 +83,6 @@ sequence non.trusted.exec { subject any; - log { $bsm; }; state { event $execution; object not $trusteddirs; @@ -90,7 +93,6 @@ sequence mktemp.race { subject any; - log { $bsm; }; state { event { AUE_SYMLINK; }; object $opendirs; @@ -104,7 +106,7 @@ state { event $login; status failure; - multiplier 5; + multiplier 2; }; state { event $login; @@ -114,7 +116,6 @@ sequence httpd.exec { subject { nobody; }; - log { $bsm; }; state { event { AUE_SOCKET; }; status success; @@ -131,7 +132,7 @@ sequence named.exec { subject { bind; }; - log { $bsm; }; + scope process; state { event { AUE_SOCKET; }; status success; @@ -146,24 +147,47 @@ }; }; +sequence failed.file.write { + subject { csjp; }; + state { + event { fw; }; + status failure; + }; +}; + # -# Test for PCRE's +# This is a comment # -#sequence passwd.access { -# subject any; -# log { $bsm; }; -# state { -# event { fr; }; -# status any; -# object { ^/etc/pass[Ww][Dd]; }; -# }; -#}; -#sequence etc.access { -# subject any; -# log { $bsm; }; -# state { -# event { fr; }; -# status any; -# object { ^/[Ee][Tt][Cc]/*; }; -# }; -#}; +sequence five.config.file.read { + subject { csjp; }; + serial 2343445445; + timeout 60 seconds; + scope global; + priority 100; + state { + event { fr; }; + status any; + object { /etc; }; + trigger "/usr/bin/logger config file read"; + multiplier 5; + }; +}; + +sequence passwd.access { + subject any; + state { + event { fr; }; + status any; + object { /etc/pass[Ww][Dd]; }; + multiplier 5; + }; +}; + +sequence etc.access { + subject any; + state { + event { fr; }; + status any; + object { /[Ee][Tt][Cc]/*; }; + }; +}; ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf.5#2 (text+ko) ==== @@ -90,6 +90,8 @@ ::= "sequence" "{" "subject" ["not"] ( | ( | "any")) ";" ["timeout" ";"] + ["timeout-window" ";"] + ["timeout-probability" ";"] ["priority" ";"] ["log" ( | ) ";"] ["serial" ";"] ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.ebnf#2 (text+ko) ==== @@ -55,6 +55,8 @@ ::= "sequence" "{" "subject" ["not"] ( | ( | "any")) ";" ["timeout" ";"] + ["timeout-window" ";"] + ["timeout-probability" ";"] ["priority" ";"] ["log" ( | ) ";"] ["serial" ";"] ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.h#2 (text+ko) ==== @@ -28,7 +28,7 @@ #ifndef BSM_TRACE_H_ #define BSM_TRACE_H_ -#define BSMTRACE_VERSION "BSMTRACE 1.0.0-BETA" +#define BSMTRACE_VERSION "BSMTRACE 1.2.0-HEAD" struct g_conf { char *aflag; int bflag; @@ -39,6 +39,7 @@ }; struct g_conf opts; +int audit_pipe_fd; /* XXX not happy about this global */ void bsmtrace_error(int, char *, ...); void bsmtrace_exit(int); ==== //depot/projects/trustedbsd/bsmtrace/conf.c#2 (text+ko) ==== @@ -97,7 +97,7 @@ yyin = f; TAILQ_INIT(&bsm_set_head); yyparse(); - fclose(f); + (void) fclose(f); } /* ==== //depot/projects/trustedbsd/bsmtrace/deuce.h#2 (text+ko) ==== @@ -131,6 +131,8 @@ int bs_seq_scope; pid_t bs_seq_scope_data; int bs_seq_serial; + int bs_seq_time_wnd; + int bs_seq_time_wnd_prob; }; struct bsm_record_data { ==== //depot/projects/trustedbsd/bsmtrace/grammar.y#2 (text+ko) ==== @@ -51,9 +51,10 @@ %token STATUS MULTIPLIER OBRACE EBRACE SEMICOLON COMMA SUBJECT %token STRING ANY SUCCESS FAILURE INTEGER TIMEOUT NOT HOURS MINUTES DAYS %token PRIORITY WEEKS SECONDS NONE QUOTE OPBRACKET EPBRACKET LOGCHAN -%token DIRECTORY LOG SCOPE SERIAL +%token DIRECTORY LOG SCOPE SERIAL TIMEOUTWND TIMEOUTPROB %type status_spec SUCCESS FAILURE INTEGER multiplier_spec timeout_spec -%type serial_spec negate_spec priority_spec scope_spec +%type serial_spec negate_spec priority_spec scope_spec timeout_wnd_spec +%type timeout_prob_spec time_spec %type STRING %type set_list set_list_ent %type anon_set @@ -207,33 +208,54 @@ } ; -timeout_spec: - TIMEOUT INTEGER SECONDS SEMICOLON +timeout_prob_spec: + TIMEOUTPROB INTEGER SEMICOLON + { + $$ = $2; + } + ; + +timeout_wnd_spec: + TIMEOUTWND time_spec SEMICOLON { $$ = $2; } - | TIMEOUT INTEGER HOURS SEMICOLON + ; + +time_spec: + INTEGER SECONDS + { + $$ = $1; + } + | INTEGER HOURS { - $$ = $2 * 3600; + $$ = $1 * 3600; } - | TIMEOUT INTEGER MINUTES SEMICOLON + | INTEGER MINUTES { - $$ = $2 * 60; + $$ = $1 * 60; } - | TIMEOUT INTEGER DAYS SEMICOLON + | INTEGER DAYS { - $$ = $2 * 3600 * 24; + $$ = $1 * 3600 * 24; } - | TIMEOUT INTEGER WEEKS SEMICOLON + | INTEGER WEEKS { - $$ = $2 * 3600 * 24 * 7; + $$ = $1 * 3600 * 24 * 7; } - | TIMEOUT NONE SEMICOLON + | NONE { $$ = 0; } ; +timeout_spec: + TIMEOUT time_spec SEMICOLON + { + $$ = $2; + } + ; + sequence_def: SEQUENCE { @@ -337,8 +359,19 @@ } | sequence_options serial_spec { + assert(bs_state != NULL); bs_state->bs_seq_serial = $2; } + | sequence_options timeout_wnd_spec + { + assert(bs_state != NULL); + bs_state->bs_seq_time_wnd = $2; + } + | sequence_options timeout_prob_spec + { + assert(bs_state != NULL); + bs_state->bs_seq_time_wnd_prob = $2; + } ; type_spec: ==== //depot/projects/trustedbsd/bsmtrace/includes.h#2 (text+ko) ==== @@ -3,7 +3,7 @@ * Copyright (c) 2007 Christian S.J. Peron * All rights reserved. * - * $Id: includes.h,v 1.4 2007/04/13 14:45:12 csjp Exp $ + * $Id: includes.h,v 1.5 2007/07/13 00:03:50 csjp Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,6 +33,11 @@ #endif #include #include +#include +#include +#include +#include +#include #include #include @@ -50,7 +55,9 @@ #include #include +#ifndef __APPLE__ #include +#endif #ifdef PCRE #include #endif @@ -64,4 +71,5 @@ #include "conf.h" #include "bsm.h" #include "log.h" +#include "pipe.h" #include "trigger.h" ==== //depot/projects/trustedbsd/bsmtrace/log.c#2 (text+ko) ==== @@ -104,18 +104,18 @@ struct bsm_state *bm; (void) snprintf(dir, MAXPATHLEN, - "%s/%s", lc->log_data.bsm_log_dir, - bs->bs_label); + "%s/%s", lc->log_data.bsm_log_dir, bs->bs_label); error = stat(dir, &sb); if (error < 0 && errno == ENOENT) { if (mkdir(dir, S_IRWXU) < 0) bsmtrace_error(1, "mkdir failed"); } else if (error < 0) bsmtrace_error(1, "stat failed"); - (void) sprintf(path, "%s/%d.%d", dir, br->br_sec, br->br_usec); + (void) sprintf(path, "%s/%d.%d.%lu", + dir, br->br_sec, br->br_usec, random()); fd = open(path, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd < 0) - bsmtrace_error(1, "open failed"); + bsmtrace_error(1, "open: %s: %s", path, strerror(errno)); /* * The logic here becomes a bit complex. We need to check to see if * this is a single state sequence, and if it is, log the BSM record @@ -126,13 +126,13 @@ if ((bs->bs_seq_flags & BSM_SEQUENCE_PARENT) != 0) { if (write(fd, br->br_raw, br->br_raw_len) < 0) bsmtrace_error(1, "write failed"); - close(fd); + (void) close(fd); return (0); } TAILQ_FOREACH(bm, &bs->bs_mhead, bm_glue) if (write(fd, bm->bm_raw, bm->bm_raw_len) < 0) bsmtrace_error(1, "write failed"); - close(fd); + (void) close(fd); return (0); } ==== //depot/projects/trustedbsd/bsmtrace/token.l#2 (text+ko) ==== @@ -64,6 +64,8 @@ subject return (SUBJECT); success return (SUCCESS); timeout return (TIMEOUT); +timeout-window return (TIMEOUTWND); +timeout-prob return (TIMEOUTPROB); trigger return (TRIGGER); weeks return (WEEKS); {integer} { ==== //depot/projects/trustedbsd/bsmtrace/trigger.c#2 (text+ko) ==== @@ -72,15 +72,15 @@ switch (expptr->val) { case EXP_USER: if ((pw = getpwuid(bd->br_auid)) == NULL) - strlcpy(token, "non-attributable", + (void) strlcpy(token, "non-attributable", sizeof(token)); else - strlcpy(token, pw->pw_name, + (void) strlcpy(token, pw->pw_name, sizeof(token)); break; case EXP_OBJECT: if (bd->br_path != NULL) - strlcpy(token, bd->br_path, + (void) strlcpy(token, bd->br_path, sizeof(token)); else { free(ret); @@ -90,7 +90,7 @@ default: assert(0); } - strlcat(ret, token, allocated); + (void) strlcat(ret, token, allocated); p1 = ret + strlen(ret); } else *(p1++) = *(p0++); From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:52:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B732B16A421; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644A916A419 for ; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5ADB813C469 for ; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHqaQu063206 for ; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHqaMv063201 for perforce@freebsd.org; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 17:52:36 GMT Message-Id: <200802171752.m1HHqaMv063201@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135581 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:52:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135581 Change 135581 by imp@imp_lighthouse on 2008/02/17 17:51:42 Better defaults for mips. don't know how to do this in a more generic way. Affected files ... .. //depot/projects/mips2-jnpr/src/share/mk/bsd.own.mk#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/share/mk/bsd.own.mk#2 (text+ko) ==== @@ -326,7 +326,6 @@ INSTALLLIB \ IPFILTER \ IPX \ - KERBEROS \ KVM \ LIB32 \ LIBPTHREAD \ @@ -350,7 +349,6 @@ PROFILE \ RCMDS \ RCS \ - RESCUE \ SENDMAIL \ SETUID_LOGIN \ SHAREDOCS \ @@ -382,6 +380,8 @@ .for var in \ BIND_LIBS \ HESIOD \ + KERBEROS \ + RESCUE \ IDEA .if defined(WITH_${var}) && defined(WITHOUT_${var}) .error WITH_${var} and WITHOUT_${var} can't both be set. From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:52:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 288CA16A50A; Sun, 17 Feb 2008 17:52:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B78BF16A468 for ; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AC51313C46E for ; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHqad1063213 for ; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHqa2e063209 for perforce@freebsd.org; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 17:52:36 GMT Message-Id: <200802171752.m1HHqa2e063209@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135582 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:52:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135582 Change 135582 by imp@imp_lighthouse on 2008/02/17 17:52:10 Omit things that don't work on mips. Affected files ... .. //depot/projects/mips2-jnpr/src/lib/Makefile#2 edit .. //depot/projects/mips2-jnpr/src/usr.bin/Makefile#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/lib/Makefile#2 (text+ko) ==== @@ -32,7 +32,7 @@ libcalendar libcam libcompat libdevinfo libdevstat libdisk \ libedit libexpat libfetch libftpio libgeom ${_libgpib} \ ${_libgssapi} libipsec \ - ${_libipx} libkiconv libmagic libmemstat ${_libmilter} ${_libmp} \ + ${_libipx} libkiconv libmemstat ${_libmilter} ${_libmp} \ ${_libncp} ${_libngatm} libopie libpam libpcap \ libpmc ${_libkse} librt ${_libsdp} ${_libsm} ${_libsmb} \ ${_libsmdb} \ ==== //depot/projects/mips2-jnpr/src/usr.bin/Makefile#2 (text+ko) ==== @@ -57,7 +57,6 @@ expand \ false \ fetch \ - file \ file2c \ find \ finger \ From owner-p4-projects@FreeBSD.ORG Sun Feb 17 17:52:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2290B16A5D0; Sun, 17 Feb 2008 17:52:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65F9616A418 for ; Sun, 17 Feb 2008 17:52:37 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E67AB13C474 for ; Sun, 17 Feb 2008 17:52:36 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HHqaJd063220 for ; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HHqa5K063216 for perforce@freebsd.org; Sun, 17 Feb 2008 17:52:36 GMT (envelope-from imp@freebsd.org) Date: Sun, 17 Feb 2008 17:52:36 GMT Message-Id: <200802171752.m1HHqa5K063216@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135583 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 17:52:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=135583 Change 135583 by imp@imp_lighthouse on 2008/02/17 17:52:33 ISA_MIPS32 Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/std.idt#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/std.idt#2 (text+ko) ==== @@ -2,3 +2,4 @@ # Standard include file for IDT files "../mips32/idt/files.idt" +options ISA_MIPS32 From owner-p4-projects@FreeBSD.ORG Sun Feb 17 19:53:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEE8316A46D; Sun, 17 Feb 2008 19:53:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746F816A421 for ; Sun, 17 Feb 2008 19:53:44 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A62D13C448 for ; Sun, 17 Feb 2008 19:53:44 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HJriEb072819 for ; Sun, 17 Feb 2008 19:53:44 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HJri5S072816 for perforce@freebsd.org; Sun, 17 Feb 2008 19:53:44 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 19:53:44 GMT Message-Id: <200802171953.m1HJri5S072816@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135585 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 19:53:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135585 Change 135585 by csjp@csjp_xor on 2008/02/17 19:52:53 Import initial napkin scratches for netauditd. Lot is bound to change but this is a good initial attempt. Affected files ... .. //depot/projects/trustedbsd/netauditd/Makefile#1 add .. //depot/projects/trustedbsd/netauditd/README#1 add .. //depot/projects/trustedbsd/netauditd/netauditd.c#1 add .. //depot/projects/trustedbsd/netauditd/netauditd.conf#1 add .. //depot/projects/trustedbsd/netauditd/netauditd.h#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Feb 17 20:06:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 652D316A41B; Sun, 17 Feb 2008 20:06:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A99816A419 for ; Sun, 17 Feb 2008 20:06:59 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1854413C45E for ; Sun, 17 Feb 2008 20:06:59 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HK6wNg074763 for ; Sun, 17 Feb 2008 20:06:58 GMT (envelope-from alm@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HK6w7f074760 for perforce@freebsd.org; Sun, 17 Feb 2008 20:06:58 GMT (envelope-from alm@freebsd.org) Date: Sun, 17 Feb 2008 20:06:58 GMT Message-Id: <200802172006.m1HK6w7f074760@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alm@freebsd.org using -f From: Aaron Meihm To: Perforce Change Reviews Cc: Subject: PERFORCE change 135586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 20:06:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135586 Change 135586 by alm@alm_praetorian on 2008/02/17 20:06:39 - Reset CFLAGS - Free consumer queue entry when we no longer require it Affected files ... .. //depot/projects/trustedbsd/netauditd/Makefile#2 edit .. //depot/projects/trustedbsd/netauditd/netauditd.c#2 edit Differences ... ==== //depot/projects/trustedbsd/netauditd/Makefile#2 (text+ko) ==== @@ -2,6 +2,6 @@ SRCS= netauditd.c NO_MAN= -CFLAGS= -Wall -ggdb +CFLAGS+= -Wall -ggdb .include ==== //depot/projects/trustedbsd/netauditd/netauditd.c#2 (text+ko) ==== @@ -422,6 +422,7 @@ else if (ret == q->aq_remain) { dprintf("record %p submitted\n", r); TAILQ_REMOVE(&au->ac_oq, q, aq_glue); + free(q); r->ar_refcount--; if (r->ar_refcount == 0) { free(r->ar_sbuf); From owner-p4-projects@FreeBSD.ORG Sun Feb 17 20:41:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB6AE16A419; Sun, 17 Feb 2008 20:41:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53F6716A41B for ; Sun, 17 Feb 2008 20:41:36 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3D8B013C478 for ; Sun, 17 Feb 2008 20:41:36 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HKfasA077540 for ; Sun, 17 Feb 2008 20:41:36 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HKfZCj077535 for perforce@freebsd.org; Sun, 17 Feb 2008 20:41:35 GMT (envelope-from marcel@freebsd.org) Date: Sun, 17 Feb 2008 20:41:35 GMT Message-Id: <200802172041.m1HKfZCj077535@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135589 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 20:41:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135589 Change 135589 by marcel@marcel_xcllnt on 2008/02/17 20:41:34 IFC @135588 Affected files ... .. //depot/projects/e500/etc/mail/access.sample#2 integrate .. //depot/projects/e500/etc/sendmail/freebsd.mc#3 integrate .. //depot/projects/e500/lib/libc/stdlib/malloc.3#6 integrate .. //depot/projects/e500/lib/libc/stdlib/malloc.c#8 integrate .. //depot/projects/e500/lib/libmilter/Makefile#2 integrate .. //depot/projects/e500/lib/msun/Makefile#8 integrate .. //depot/projects/e500/lib/msun/Symbol.map#7 integrate .. //depot/projects/e500/lib/msun/ld128/k_cosl.c#1 branch .. //depot/projects/e500/lib/msun/ld128/k_sinl.c#1 branch .. //depot/projects/e500/lib/msun/ld128/k_tanl.c#1 branch .. //depot/projects/e500/lib/msun/ld80/k_cosl.c#1 branch .. //depot/projects/e500/lib/msun/ld80/k_sinl.c#1 branch .. //depot/projects/e500/lib/msun/ld80/k_tanl.c#1 branch .. //depot/projects/e500/lib/msun/man/cos.3#2 integrate .. //depot/projects/e500/lib/msun/man/sin.3#2 integrate .. //depot/projects/e500/lib/msun/man/tan.3#2 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2f.c#2 integrate .. //depot/projects/e500/lib/msun/src/k_rem_pio2.c#4 integrate .. //depot/projects/e500/lib/msun/src/math.h#4 integrate .. //depot/projects/e500/lib/msun/src/math_private.h#4 integrate .. //depot/projects/e500/lib/msun/src/s_cos.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_cosl.c#1 branch .. //depot/projects/e500/lib/msun/src/s_sin.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_sinl.c#1 branch .. //depot/projects/e500/lib/msun/src/s_tan.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_tanl.c#1 branch .. //depot/projects/e500/sys/boot/Makefile#5 integrate .. //depot/projects/e500/sys/dev/aic7xxx/aic79xx_osm.c#3 integrate .. //depot/projects/e500/sys/fs/coda/TODO#2 integrate .. //depot/projects/e500/sys/fs/coda/cnode.h#5 integrate .. //depot/projects/e500/sys/fs/coda/coda_kernel.h#3 delete .. //depot/projects/e500/sys/fs/coda/coda_psdev.c#5 integrate .. //depot/projects/e500/sys/kern/kern_exit.c#8 integrate .. //depot/projects/e500/sys/kern/kern_mib.c#6 integrate .. //depot/projects/e500/sys/kern/kern_tc.c#4 integrate Differences ... ==== //depot/projects/e500/etc/mail/access.sample#2 (text+ko) ==== @@ -1,10 +1,17 @@ -# $FreeBSD: src/etc/mail/access.sample,v 1.3 2000/11/02 23:40:40 dirk Exp $ +# $FreeBSD: src/etc/mail/access.sample,v 1.4 2008/02/17 05:22:08 gshapiro Exp $ # # Mail relay access control list. Default is to reject mail unless the # destination is local, or listed in /etc/mail/local-host-names # -cyberspammer.com 550 We don't accept mail from spammers -FREE.STEALTH.MAILER@ 550 We don't accept mail from spammers -another.source.of.spam REJECT -okay.cyberspammer.com OK -128.32 RELAY + +## Examples (commented out for safety) +#From:cyberspammer.com ERROR:"550 We don't accept mail from spammers" +#From:okay.cyberspammer.com OK +#Connect:sendmail.org RELAY +#To:sendmail.org RELAY +#Connect:128.32 RELAY +#Connect:128.32.2 SKIP +#Connect:IPv6:1:2:3:4:5:6:7 RELAY +#Connect:suspicious.example.com QUARANTINE:Mail from suspicious host +#Connect:[127.0.0.3] OK +#Connect:[IPv6:1:2:3:4:5:6:7:8] OK ==== //depot/projects/e500/etc/sendmail/freebsd.mc#3 (text+ko) ==== @@ -44,7 +44,7 @@ # divert(0) -VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.35 2007/11/05 00:18:06 gshapiro Exp $') +VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.36 2008/02/17 05:38:29 gshapiro Exp $') OSTYPE(freebsd6) DOMAIN(generic) @@ -71,7 +71,7 @@ dnl NOTE: This is a subscription service as of July 31, 2001 dnl FEATURE(dnsbl) dnl Alternatively, you can provide your own server and rejection message: -dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}') +dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', ``"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}'') dnl Dialup users should uncomment and define this appropriately dnl define(`SMART_HOST', `your.isp.mail.server') ==== //depot/projects/e500/lib/libc/stdlib/malloc.3#6 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.77 2008/02/06 02:59:54 jasone Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.78 2008/02/17 17:09:24 jasone Exp $ .\" -.Dd February 5, 2008 +.Dd February 17, 2008 .Dt MALLOC 3 .Os .Sh NAME @@ -231,17 +231,6 @@ .It K Double/halve the virtual memory chunk size. The default chunk size is 1 MB. -.It L -Double/halve the per-arena number of slots for lazy deallocation. -Lazy deallocation can decrease lock contention, especially for programs that use -the producer/consumer model. -The default is 256 slots per arena (so -.Ev MALLOC_OPTIONS=9l -will disable lazy deallocation), but note that due to algorithmic details, the -cache is typically flushed well before it completely fills. -This option has no impact unless there are multiple CPUs, and lazy deallocation -does not activate unless the program uses multiple threads. -This option is not available for some configurations (non-PIC). .It M Use .Xr mmap 2 ==== //depot/projects/e500/lib/libc/stdlib/malloc.c#8 (text+ko) ==== @@ -112,13 +112,6 @@ #endif /* - * MALLOC_LAZY_FREE enables the use of a per-thread vector of slots that free() - * can atomically stuff object pointers into. This can reduce arena lock - * contention. - */ -#define MALLOC_LAZY_FREE - -/* * MALLOC_BALANCE enables monitoring of arena lock contention and dynamically * re-balances arena load if exponentially averaged contention exceeds a * certain threshold. @@ -134,7 +127,7 @@ #define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.164 2008/02/08 08:02:34 jasone Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.166 2008/02/17 18:34:17 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -242,10 +235,6 @@ # ifdef MALLOC_BALANCE # undef MALLOC_BALANCE # endif - /* MALLOC_LAZY_FREE requires TLS. */ -# ifdef MALLOC_LAZY_FREE -# undef MALLOC_LAZY_FREE -# endif #endif /* @@ -305,20 +294,6 @@ #define RUN_MAX_SMALL_2POW 15 #define RUN_MAX_SMALL (1U << RUN_MAX_SMALL_2POW) -#ifdef MALLOC_LAZY_FREE - /* Default size of each arena's lazy free cache. */ -# define LAZY_FREE_2POW_DEFAULT 8 - /* - * Number of pseudo-random probes to conduct before considering the cache to - * be overly full. It takes on average n probes to detect fullness of - * (n-1)/n. However, we are effectively doing multiple non-independent - * trials (each deallocation is a trial), so the actual average threshold - * for clearing the cache is somewhat lower. - */ -# define LAZY_FREE_NPROBES_2POW_MIN 2 -# define LAZY_FREE_NPROBES_2POW_MAX 3 -#endif - /* * Hyper-threaded CPUs may need a special instruction inside spin loops in * order to yield to another virtual CPU. If no such instruction is defined @@ -652,16 +627,6 @@ uint32_t contention; #endif -#ifdef MALLOC_LAZY_FREE - /* - * Deallocation of small objects can be lazy, in which case free_cache - * stores pointers to those objects that have not yet been deallocated. - * In order to avoid lock contention, slots are chosen randomly. Empty - * slots contain NULL. - */ - void **free_cache; -#endif - /* * bins is used to store rings of free regions of the following sizes, * assuming a 16-byte quantum, 4kB pagesize, and default MALLOC_OPTIONS. @@ -831,9 +796,6 @@ static bool opt_mmap = true; #endif static size_t opt_dirty_max = DIRTY_MAX_DEFAULT; -#ifdef MALLOC_LAZY_FREE -static int opt_lazy_free_2pow = LAZY_FREE_2POW_DEFAULT; -#endif #ifdef MALLOC_BALANCE static uint64_t opt_balance_threshold = BALANCE_THRESHOLD_DEFAULT; #endif @@ -930,17 +892,13 @@ static void *arena_palloc(arena_t *arena, size_t alignment, size_t size, size_t alloc_size); static size_t arena_salloc(const void *ptr); -#ifdef MALLOC_LAZY_FREE -static void arena_dalloc_lazy_hard(arena_t *arena, arena_chunk_t *chunk, - void *ptr, size_t pageind, arena_chunk_map_t *mapelm, unsigned slot); -#endif static void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr); -static void arena_ralloc_resize_shrink(arena_t *arena, arena_chunk_t *chunk, +static void arena_ralloc_large_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize); -static bool arena_ralloc_resize_grow(arena_t *arena, arena_chunk_t *chunk, +static bool arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize); -static bool arena_ralloc_resize(void *ptr, size_t size, size_t oldsize); +static bool arena_ralloc_large(void *ptr, size_t size, size_t oldsize); static void *arena_ralloc(void *ptr, size_t size, size_t oldsize); static bool arena_new(arena_t *arena); static arena_t *arenas_extend(unsigned ind); @@ -1115,7 +1073,7 @@ return (x); } -#if (defined(MALLOC_LAZY_FREE) || defined(MALLOC_BALANCE)) +#ifdef MALLOC_BALANCE /* * Use a simple linear congruential pseudo-random number generator: * @@ -1159,17 +1117,6 @@ # define PRN(suffix, lg_range) prn_##suffix(lg_range) #endif -/* - * Define PRNGs, one for each purpose, in order to avoid auto-correlation - * problems. - */ - -#ifdef MALLOC_LAZY_FREE -/* Define the per-thread PRNG used for lazy deallocation. */ -static __thread uint32_t lazy_free_x; -PRN_DEFINE(lazy_free, lazy_free_x, 12345, 12347) -#endif - #ifdef MALLOC_BALANCE /* Define the PRNG used for arena assignment. */ static __thread uint32_t balance_x; @@ -2000,27 +1947,8 @@ assert(__isthreaded); -#ifdef MALLOC_LAZY_FREE - /* - * Seed the PRNG used for lazy deallocation. Since seeding only occurs - * on the first allocation by a thread, it is possible for a thread to - * deallocate before seeding. This is not a critical issue though, - * since it is extremely unusual for an application to to use threads - * that deallocate but *never* allocate, and because even if seeding - * never occurs for multiple threads, they will tend to drift apart - * unless some aspect of the application forces deallocation - * synchronization. - */ - SPRN(lazy_free, (uint32_t)(uintptr_t)(_pthread_self())); -#endif - #ifdef MALLOC_BALANCE - /* - * Seed the PRNG used for arena load balancing. We can get away with - * using the same seed here as for the lazy_free PRNG without - * introducing autocorrelation because the PRNG parameters are - * distinct. - */ + /* Seed the PRNG used for arena load balancing. */ SPRN(balance, (uint32_t)(uintptr_t)(_pthread_self())); #endif @@ -3343,92 +3271,6 @@ #endif } -#ifdef MALLOC_LAZY_FREE -static inline void -arena_dalloc_lazy(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t pageind, arena_chunk_map_t *mapelm) -{ - void **free_cache = arena->free_cache; - unsigned i, nprobes, slot; - - if (__isthreaded == false || opt_lazy_free_2pow < 0) { - malloc_spin_lock(&arena->lock); - arena_dalloc_small(arena, chunk, ptr, pageind, *mapelm); - malloc_spin_unlock(&arena->lock); - return; - } - - nprobes = (1U << LAZY_FREE_NPROBES_2POW_MIN) + PRN(lazy_free, - (LAZY_FREE_NPROBES_2POW_MAX - LAZY_FREE_NPROBES_2POW_MIN)); - for (i = 0; i < nprobes; i++) { - slot = PRN(lazy_free, opt_lazy_free_2pow); - if (atomic_cmpset_ptr((uintptr_t *)&free_cache[slot], - (uintptr_t)NULL, (uintptr_t)ptr)) { - return; - } - } - - arena_dalloc_lazy_hard(arena, chunk, ptr, pageind, mapelm, slot); -} - -static void -arena_dalloc_lazy_hard(arena_t *arena, arena_chunk_t *chunk, void *ptr, - size_t pageind, arena_chunk_map_t *mapelm, unsigned slot) -{ - void **free_cache = arena->free_cache; - unsigned i; - - malloc_spin_lock(&arena->lock); - arena_dalloc_small(arena, chunk, ptr, pageind, *mapelm); - - /* - * Check whether another thread already cleared the cache. It is - * possible that another thread cleared the cache *and* this slot was - * already refilled, which could result in a mostly fruitless cache - * sweep, but such a sequence of events causes no correctness issues. - */ - if ((ptr = (void *)atomic_readandclear_ptr( - (uintptr_t *)&free_cache[slot])) - != NULL) { - unsigned lazy_free_mask; - - /* - * Clear the cache, since we failed to find a slot. It is - * possible that other threads will continue to insert objects - * into the cache while this one sweeps, but that is okay, - * since on average the cache is still swept with the same - * frequency. - */ - - /* Handle pointer at current slot. */ - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> - pagesize_2pow); - mapelm = &chunk->map[pageind]; - arena_dalloc_small(arena, chunk, ptr, pageind, *mapelm); - - /* Sweep remainder of slots. */ - lazy_free_mask = (1U << opt_lazy_free_2pow) - 1; - for (i = (slot + 1) & lazy_free_mask; - i != slot; - i = (i + 1) & lazy_free_mask) { - ptr = (void *)atomic_readandclear_ptr( - (uintptr_t *)&free_cache[i]); - if (ptr != NULL) { - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - pageind = (((uintptr_t)ptr - (uintptr_t)chunk) - >> pagesize_2pow); - mapelm = &chunk->map[pageind]; - arena_dalloc_small(arena, chunk, ptr, pageind, - *mapelm); - } - } - } - - malloc_spin_unlock(&arena->lock); -} -#endif - static void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr) { @@ -3479,13 +3321,9 @@ mapelm = &chunk->map[pageind]; if ((*mapelm & CHUNK_MAP_LARGE) == 0) { /* Small allocation. */ -#ifdef MALLOC_LAZY_FREE - arena_dalloc_lazy(arena, chunk, ptr, pageind, mapelm); -#else malloc_spin_lock(&arena->lock); arena_dalloc_small(arena, chunk, ptr, pageind, *mapelm); malloc_spin_unlock(&arena->lock); -#endif } else { assert((*mapelm & CHUNK_MAP_POS_MASK) == 0); arena_dalloc_large(arena, chunk, ptr); @@ -3507,7 +3345,7 @@ } static void -arena_ralloc_resize_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, +arena_ralloc_large_shrink(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize) { extent_node_t *node, key; @@ -3535,7 +3373,7 @@ } static bool -arena_ralloc_resize_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, +arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr, size_t size, size_t oldsize) { extent_node_t *nodeC, key; @@ -3593,21 +3431,44 @@ * always fail if growing an object, and the following run is already in use. */ static bool -arena_ralloc_resize(void *ptr, size_t size, size_t oldsize) +arena_ralloc_large(void *ptr, size_t size, size_t oldsize) { - arena_chunk_t *chunk; - arena_t *arena; + size_t psize; - chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - arena = chunk->arena; - assert(arena->magic == ARENA_MAGIC); - - if (size < oldsize) { - arena_ralloc_resize_shrink(arena, chunk, ptr, size, oldsize); + psize = PAGE_CEILING(size); + if (psize == oldsize) { + /* Same size class. */ + if (opt_junk && size < oldsize) { + memset((void *)((uintptr_t)ptr + size), 0x5a, oldsize - + size); + } return (false); } else { - return (arena_ralloc_resize_grow(arena, chunk, ptr, size, - oldsize)); + arena_chunk_t *chunk; + arena_t *arena; + + chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); + arena = chunk->arena; + assert(arena->magic == ARENA_MAGIC); + + if (psize < oldsize) { + /* Fill before shrinking in order avoid a race. */ + if (opt_junk) { + memset((void *)((uintptr_t)ptr + size), 0x5a, + oldsize - size); + } + arena_ralloc_large_shrink(arena, chunk, ptr, psize, + oldsize); + return (false); + } else { + bool ret = arena_ralloc_large_grow(arena, chunk, ptr, + psize, oldsize); + if (ret == false && opt_zero) { + memset((void *)((uintptr_t)ptr + oldsize), 0, + size - oldsize); + } + return (ret); + } } } @@ -3633,16 +3494,9 @@ pow2_ceil(size) == pow2_ceil(oldsize)) goto IN_PLACE; /* Same size class. */ } else if (oldsize > bin_maxclass && oldsize <= arena_maxclass) { - size_t psize; - assert(size > bin_maxclass); - psize = PAGE_CEILING(size); - - if (psize == oldsize) - goto IN_PLACE; /* Same size class. */ - - if (arena_ralloc_resize(ptr, psize, oldsize) == false) - goto IN_PLACE; + if (arena_ralloc_large(ptr, size, oldsize) == false) + return (ptr); } /* @@ -3710,15 +3564,6 @@ #ifdef MALLOC_BALANCE arena->contention = 0; #endif -#ifdef MALLOC_LAZY_FREE - if (opt_lazy_free_2pow >= 0) { - arena->free_cache = (void **) base_calloc(1, sizeof(void *) - * (1U << opt_lazy_free_2pow)); - if (arena->free_cache == NULL) - return (true); - } else - arena->free_cache = NULL; -#endif /* Initialize bins. */ prev_run_size = pagesize; @@ -4037,13 +3882,6 @@ _malloc_message("CPUs: ", umax2s(ncpus, s), "\n", ""); _malloc_message("Max arenas: ", umax2s(narenas, s), "\n", ""); -#ifdef MALLOC_LAZY_FREE - if (opt_lazy_free_2pow >= 0) { - _malloc_message("Lazy free slots: ", - umax2s(1U << opt_lazy_free_2pow, s), "\n", ""); - } else - _malloc_message("Lazy free slots: 0\n", "", "", ""); -#endif #ifdef MALLOC_BALANCE _malloc_message("Arena balance threshold: ", umax2s(opt_balance_threshold, s), "\n", ""); @@ -4189,11 +4027,6 @@ } } -#ifdef MALLOC_LAZY_FREE - if (ncpus == 1) - opt_lazy_free_2pow = -1; -#endif - /* Get page size. */ { long result; @@ -4345,18 +4178,6 @@ (sizeof(size_t) << 3)) opt_chunk_2pow++; break; - case 'l': -#ifdef MALLOC_LAZY_FREE - if (opt_lazy_free_2pow >= 0) - opt_lazy_free_2pow--; -#endif - break; - case 'L': -#ifdef MALLOC_LAZY_FREE - if (ncpus > 1) - opt_lazy_free_2pow++; -#endif - break; case 'm': #ifdef MALLOC_DSS opt_mmap = false; @@ -4493,14 +4314,6 @@ } arena_maxclass = chunksize - (arena_chunk_header_npages << pagesize_2pow); -#ifdef MALLOC_LAZY_FREE - /* - * Make sure that allocating the free_cache does not exceed the limits - * of what base_alloc() can handle. - */ - while ((sizeof(void *) << opt_lazy_free_2pow) > chunksize) - opt_lazy_free_2pow--; -#endif UTRACE(0, 0, 0); @@ -4644,11 +4457,8 @@ #endif /* * Seed here for the initial thread, since choose_arena_hard() is only - * called for other threads. The seed values don't really matter. + * called for other threads. The seed value doesn't really matter. */ -#ifdef MALLOC_LAZY_FREE - SPRN(lazy_free, 42); -#endif #ifdef MALLOC_BALANCE SPRN(balance, 42); #endif ==== //depot/projects/e500/lib/libmilter/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libmilter/Makefile,v 1.7 2007/04/09 01:45:30 gshapiro Exp $ +# $FreeBSD: src/lib/libmilter/Makefile,v 1.8 2008/02/17 05:14:47 gshapiro Exp $ .include @@ -8,6 +8,7 @@ CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I. CFLAGS+=-DNOT_SENDMAIL -Dsm_snprintf=snprintf CFLAGS+=-D_THREAD_SAFE +CFLAGS+=-DSM_CONF_POLL .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DNETINET6 ==== //depot/projects/e500/lib/msun/Makefile#8 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 5.1beta 93/09/24 -# $FreeBSD: src/lib/msun/Makefile,v 1.87 2008/02/13 16:56:52 bde Exp $ +# $FreeBSD: src/lib/msun/Makefile,v 1.88 2008/02/17 07:33:51 das Exp $ # # ==================================================== # Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -68,7 +68,8 @@ # Location of fpmath.h and _fpmath.h LIBCDIR= ${.CURDIR}/../libc -CFLAGS+= -I${LIBCDIR}/include -I${LIBCDIR}/${MACHINE_ARCH} +CFLAGS+= -I${.CURDIR}/src -I${LIBCDIR}/include \ + -I${LIBCDIR}/${MACHINE_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map VERSION_DEF= ${LIBCDIR}/Versions.def @@ -78,9 +79,10 @@ COMMON_SRCS+= s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c .if ${LDBL_PREC} != 53 # If long double != double use these; otherwise, we alias the double versions. -COMMON_SRCS+= s_ceill.c s_exp2l.c s_floorl.c s_fmal.c s_frexpl.c \ - s_logbl.c s_nanl.c s_nextafterl.c s_nexttoward.c s_rintl.c \ - s_scalbnl.c s_truncl.c +COMMON_SRCS+= k_cosl.c k_sinl.c k_tanl.c s_ceill.c s_cosl.c \ + s_exp2l.c s_floorl.c s_fmal.c \ + s_frexpl.c s_logbl.c s_nanl.c s_nextafterl.c s_nexttoward.c \ + s_rintl.c s_scalbnl.c s_sinl.c s_tanl.c s_truncl.c .endif # C99 complex functions @@ -123,7 +125,7 @@ cimag.3 conj.3 cimag.3 conjf.3 cimag.3 conjl.3 \ cimag.3 creal.3 cimag.3 crealf.3 cimag.3 creall.3 MLINKS+=copysign.3 copysignf.3 copysign.3 copysignl.3 -MLINKS+=cos.3 cosf.3 +MLINKS+=cos.3 cosf.3 cos.3 cosl.3 MLINKS+=cosh.3 coshf.3 MLINKS+=csqrt.3 csqrtf.3 MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3 @@ -166,10 +168,10 @@ MLINKS+=round.3 roundf.3 round.3 roundl.3 MLINKS+=scalbn.3 scalbln.3 scalbn.3 scalblnf.3 scalbn.3 scalblnl.3 MLINKS+=scalbn.3 scalbnf.3 scalbn.3 scalbnl.3 -MLINKS+=sin.3 sinf.3 +MLINKS+=sin.3 sinf.3 sin.3 sinl.3 MLINKS+=sinh.3 sinhf.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3 -MLINKS+=tan.3 tanf.3 +MLINKS+=tan.3 tanf.3 tan.3 tanl.3 MLINKS+=tanh.3 tanhf.3 MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 ==== //depot/projects/e500/lib/msun/Symbol.map#7 (text) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/lib/msun/Symbol.map,v 1.12 2008/01/18 21:43:10 das Exp $ + * $FreeBSD: src/lib/msun/Symbol.map,v 1.13 2008/02/17 07:33:51 das Exp $ */ /* 7.0-CURRENT */ @@ -198,4 +198,7 @@ nearbyintl; rintl; exp2l; + sinl; + cosl; + tanl; }; ==== //depot/projects/e500/lib/msun/man/cos.3#2 (text+ko) ==== @@ -26,14 +26,15 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)cos.3 5.1 (Berkeley) 5/2/91 -.\" $FreeBSD: src/lib/msun/man/cos.3,v 1.12 2007/01/09 01:02:05 imp Exp $ +.\" $FreeBSD: src/lib/msun/man/cos.3,v 1.13 2008/02/17 07:32:44 das Exp $ .\" -.Dd May 2, 1991 +.Dd January 24, 2008 .Dt COS 3 .Os .Sh NAME .Nm cos , -.Nm cosf +.Nm cosf , +.Nm cosl .Nd cosine functions .Sh LIBRARY .Lb libm @@ -43,11 +44,14 @@ .Fn cos "double x" .Ft float .Fn cosf "float x" +.Fn long double +.Ft cosl "long double x" .Sh DESCRIPTION The -.Fn cos -and the -.Fn cosf +.Fn cos , +.Fn cosf , +and +.Fn cosl functions compute the cosine of .Fa x (measured in radians). @@ -57,9 +61,10 @@ .Xr math 3 . .Sh RETURN VALUES The -.Fn cos -and the -.Fn cosf +.Fn cos , +.Fn cosf , +and +.Fn cosl functions return the cosine value. .Sh SEE ALSO .Xr acos 3 , @@ -73,7 +78,5 @@ .Xr tan 3 , .Xr tanh 3 .Sh STANDARDS -The -.Fn cos -function conforms to -.St -isoC . +These functions conform to +.St -isoC-99 . ==== //depot/projects/e500/lib/msun/man/sin.3#2 (text+ko) ==== @@ -27,14 +27,15 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sin.3 6.7 (Berkeley) 4/19/91 -.\" $FreeBSD: src/lib/msun/man/sin.3,v 1.10 2007/01/09 01:02:06 imp Exp $ +.\" $FreeBSD: src/lib/msun/man/sin.3,v 1.11 2008/02/17 07:32:44 das Exp $ .\" -.Dd April 19, 1991 +.Dd January 24, 2008 .Dt SIN 3 .Os .Sh NAME .Nm sin , -.Nm sinf +.Nm sinf , +.Nm sinl .Nd sine functions .Sh LIBRARY .Lb libm @@ -44,11 +45,14 @@ .Fn sin "double x" .Ft float .Fn sinf "float x" +.Ft long double +.Fn sinl "long double x" .Sh DESCRIPTION The -.Fn sin -and the -.Fn sinf +.Fn sin , +.Fn sinf , +and +.Fn sinl functions compute the sine of .Fa x (measured in radians). @@ -56,9 +60,10 @@ or no significance. .Sh RETURN VALUES The -.Fn sin -and the -.Fn sinf +.Fn sin , +.Fn sinf , +and +.Fn sinl functions return the sine value. .Sh SEE ALSO .Xr acos 3 , @@ -72,7 +77,5 @@ .Xr tan 3 , .Xr tanh 3 .Sh STANDARDS -The -.Fn sin -function conforms to -.St -isoC . +These functions conform to +.St -isoC-99 . ==== //depot/projects/e500/lib/msun/man/tan.3#2 (text+ko) ==== @@ -26,14 +26,15 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)tan.3 5.1 (Berkeley) 5/2/91 -.\" $FreeBSD: src/lib/msun/man/tan.3,v 1.10 2007/01/09 01:02:06 imp Exp $ +.\" $FreeBSD: src/lib/msun/man/tan.3,v 1.11 2008/02/17 07:32:44 das Exp $ .\" -.Dd May 2, 1991 +.Dd January 24, 2008 .Dt TAN 3 .Os .Sh NAME .Nm tan , -.Nm tanf +.Nm tanf , +.Nm tanl .Nd tangent functions .Sh LIBRARY .Lb libm @@ -43,11 +44,14 @@ .Fn tan "double x" .Ft float .Fn tanf "float x" +.Ft long double +.Fn tanl "long double x" .Sh DESCRIPTION The -.Fn tan -and the -.Fn tanf +.Fn tan , +.Fn tanf , +and +.Fn tanl functions compute the tangent of .Fa x (measured in radians). @@ -57,8 +61,11 @@ .Xr math 3 . .Sh RETURN VALUES The -.Fn tan -function returns the tangent value. +.Fn tan , +.Fn tanf , +and +.Fn tanl +functions return the tangent value. .Sh SEE ALSO .Xr acos 3 , .Xr asin 3 , @@ -71,7 +78,5 @@ .Xr sinh 3 , .Xr tanh 3 .Sh STANDARDS -The -.Fn tan -function conforms to -.St -isoC . +These functions conform to +.St -isoC-99 . ==== //depot/projects/e500/lib/msun/src/e_rem_pio2.c#2 (text+ko) ==== @@ -13,7 +13,7 @@ */ #ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.8 2005/02/04 18:26:06 das Exp $"; +static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2.c,v 1.9 2008/02/17 07:31:59 das Exp $"; #endif /* __ieee754_rem_pio2(x,y) @@ -25,23 +25,6 @@ #include "math.h" #include "math_private.h" -/* - * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi - */ -static const int32_t two_over_pi[] = { -0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, -0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, -0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, -0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, -0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, -0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, -0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, -0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, -0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, -0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, -0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, -}; - static const int32_t npio2_hw[] = { 0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C, 0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C, @@ -162,7 +145,7 @@ tx[2] = z; nx = 3; while(tx[nx-1]==zero) nx--; /* skip zero term */ - n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi); + n = __kernel_rem_pio2(tx,y,e0,nx,2); if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;} return n; } ==== //depot/projects/e500/lib/msun/src/e_rem_pio2f.c#2 (text+ko) ==== @@ -15,7 +15,7 @@ */ #ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.19 2005/11/23 03:03:09 bde Exp $"; +static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_rem_pio2f.c,v 1.20 2008/02/17 07:31:59 das Exp $"; #endif /* __ieee754_rem_pio2f(x,y) @@ -29,23 +29,6 @@ #include "math_private.h" /* - * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi - */ -static const int32_t two_over_pi[] = { -0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62, -0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A, -0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129, -0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41, -0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8, -0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF, -0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5, -0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08, -0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3, -0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880, -0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B, -}; - -/* * invpio2: 53 bits of 2/pi * pio2_1: first 33 bit of pi/2 * pio2_1t: pi/2 - pio2_1 @@ -90,7 +73,7 @@ e0 = (ix>>23)-150; /* e0 = ilogb(|x|)-23; */ SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23))); tx[0] = z; - n = __kernel_rem_pio2(tx,ty,e0,1,1,two_over_pi); + n = __kernel_rem_pio2(tx,ty,e0,1,1); y[0] = ty[0]; y[1] = ty[0] - y[0]; if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;} ==== //depot/projects/e500/lib/msun/src/k_rem_pio2.c#4 (text+ko) ==== @@ -12,11 +12,11 @@ */ #include -__FBSDID("$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.9 2008/01/20 04:09:44 bde Exp $"); +__FBSDID("$FreeBSD: src/lib/msun/src/k_rem_pio2.c,v 1.10 2008/02/17 07:31:59 das Exp $"); /* - * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2) - * double x[],y[]; int e0,nx,prec; int ipio2[]; + * __kernel_rem_pio2(x,y,e0,nx,prec) + * double x[],y[]; int e0,nx,prec; * * __kernel_rem_pio2 return the last three digits of N with * y = x - N*pi/2 @@ -60,7 +60,8 @@ * r_head = t+w; * r_tail = w - (r_head - t); * - * e0 The exponent of x[0] + * e0 The exponent of x[0]. Must be <= 16360 or you need to + * expand the ipio2 table. * * nx dimension of x[] * @@ -70,13 +71,6 @@ * 2 64 bits (extended) * 3 113 bits (quad) * - * ipio2[] - * integer array, contains the (24*i)-th to (24*i+23)-th - * bit of 2/pi after binary point. The corresponding - * floating value is - * - * ipio2[i] * 2^(-24(i+1)). - * * External function: * double scalbn(), floor(); * @@ -137,6 +131,143 @@ static const int init_jk[] = {2,3,4,6}; /* initial value for jk */ +/* + * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi + * + * integer array, contains the (24*i)-th to (24*i+23)-th + * bit of 2/pi after binary point. The corresponding >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Feb 17 20:42:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6A35516A468; Sun, 17 Feb 2008 20:42:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBB1716A478 for ; Sun, 17 Feb 2008 20:42:37 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D6FBC13C469 for ; Sun, 17 Feb 2008 20:42:37 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HKgb8H077633 for ; Sun, 17 Feb 2008 20:42:37 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HKgbfX077629 for perforce@freebsd.org; Sun, 17 Feb 2008 20:42:37 GMT (envelope-from marcel@freebsd.org) Date: Sun, 17 Feb 2008 20:42:37 GMT Message-Id: <200802172042.m1HKgbfX077629@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135591 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 20:42:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=135591 Change 135591 by marcel@marcel_xcllnt on 2008/02/17 20:42:36 IFC @135590 Affected files ... .. //depot/projects/e500/sbin/mount/getmntopts.3#2 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#6 integrate Differences ... ==== //depot/projects/e500/sbin/mount/getmntopts.3#2 (text+ko) ==== @@ -26,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)getmntopts.3 8.3 (Berkeley) 3/30/95 -.\" $FreeBSD: src/sbin/mount/getmntopts.3,v 1.14 2005/11/24 14:27:53 ru Exp $ +.\" $FreeBSD: src/sbin/mount/getmntopts.3,v 1.15 2008/02/17 20:25:25 yar Exp $ .\" -.Dd March 30, 1995 +.Dd February 17, 2008 .Dt GETMNTOPTS 3 .Os .Sh NAME @@ -163,10 +163,11 @@ .Sh DIAGNOSTICS If the external integer variable .Va getmnt_silent -is non-zero then the +is zero, then the .Fn getmntopts function displays an error message and exits if an unrecognized option is encountered. +Otherwise unrecognized options are silently ignored. By default .Va getmnt_silent is zero. ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#6 (text+ko) ==== @@ -22,11 +22,10 @@ * 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: src/sys/boot/powerpc/uboot/start.S,v 1.2 2008/02/17 20:38:22 marcel Exp $ */ -#include -__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/start.S,v 1.1 2008/02/16 22:40:55 marcel Exp $"); - #include #define STACK_SIZE 8192 From owner-p4-projects@FreeBSD.ORG Sun Feb 17 21:03:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D081216A419; Sun, 17 Feb 2008 21:03:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9605816A46B for ; Sun, 17 Feb 2008 21:03:00 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6849C13C465 for ; Sun, 17 Feb 2008 21:03:00 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HL30Zl087428 for ; Sun, 17 Feb 2008 21:03:00 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HL30oC087425 for perforce@freebsd.org; Sun, 17 Feb 2008 21:03:00 GMT (envelope-from marcel@freebsd.org) Date: Sun, 17 Feb 2008 21:03:00 GMT Message-Id: <200802172103.m1HL30oC087425@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135593 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 21:03:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=135593 Change 135593 by marcel@marcel_xcllnt on 2008/02/17 21:02:27 Add -msoft-float so that we don't depend on CPUTYPE setting it. Affected files ... .. //depot/projects/e500/sys/boot/uboot/lib/Makefile#9 edit Differences ... ==== //depot/projects/e500/sys/boot/uboot/lib/Makefile#9 (text+ko) ==== @@ -11,7 +11,7 @@ # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. -CFLAGS+= -ffreestanding +CFLAGS+= -ffreestanding -msoft-float .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative From owner-p4-projects@FreeBSD.ORG Sun Feb 17 21:36:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4939816A46B; Sun, 17 Feb 2008 21:36:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AF616A41A; Sun, 17 Feb 2008 21:36:22 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7F513C45B; Sun, 17 Feb 2008 21:36:22 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 04FC914306; Sun, 17 Feb 2008 22:44:39 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05098-06; Sun, 17 Feb 2008 22:44:37 +0100 (CET) Message-ID: <47B8A8CD.3040707@semihalf.com> Date: Sun, 17 Feb 2008 22:36:13 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B84D9B.4010903@semihalf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 21:36:23 -0000 Marcel Moolenaar wrote: >>>>> Save U-Boot's registers at startup and restore them when >>>>> performing a syscall. This way we don't have to compile >>>>> code specially to avoid using those registers. Otherwise >>>>> we have to encode knowledge of those registers in at least >>>>> 4 makefiles and introduce a build knob to enable it all. >>>>> This does not allow us to build everything with a single >>>>> build world. >>>> >>>> Hi Marcel, >>>> >>>> I'm not quite sure this is sufficient... I already had a similar >>>> save/restore >>>> in place, but there is some general problem with U-Boot that leads to >>>> hangs >>>> (experienced): >>> >>> Interesting, I didn't see any such problems with 1.3.2-rc1. >>> >> >> After a bit of digging, I guess this is why it didn't bite you up >> front: very >> recently (last minute inclusions during 1.3.2-rc1 preparation) Wolfgang >> changed the dedicated regs layout... with r29 going -> r2 due to certain >> problems with gcc 4.x producing bigger code when not all 'high' >> registers it >> likes are available in the whole block etc. > > I'm happy I removed all that knowledge in makefiles and put it in a > single source file. Maybe we should save and restore all registers > so that we don't have to worry about it anymore. > I don't feel saving/restoring all registers is really required. The problem really is not in what we do when synchronously calling the API, which is under control, but that full context is not saved/restored when u-Boot takes exceptions. Another comment: please note that killing WITH_UBOOT introduces another problem: now both sys/boot/powerpc/uboot/loader and sys/boot/powerpc/ofw/loader are built during buildworld, which may be good from one point of view, but there's no control over which of the loader file is taken during installworld: it seems the last one (u-boot's in this case) overwrites the previous... With such approach at least different names for the binaries are needed, but I'm still not quite convinced WITH_UBOOT should be gone. I'd like to have some control against what underlying firmware the PPC loader is built/installed. Rafal From owner-p4-projects@FreeBSD.ORG Sun Feb 17 22:25:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A5AD116A419; Sun, 17 Feb 2008 22:25:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52EFF16A417 for ; Sun, 17 Feb 2008 22:25:29 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6AB13C46B for ; Sun, 17 Feb 2008 22:25:29 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HMPTgd095026 for ; Sun, 17 Feb 2008 22:25:29 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HMPT5G095023 for perforce@freebsd.org; Sun, 17 Feb 2008 22:25:29 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 22:25:29 GMT Message-Id: <200802172225.m1HMPT5G095023@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135596 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 22:25:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135596 Change 135596 by csjp@ibm01 on 2008/02/17 22:24:43 Annotate limitation in read records from audit pipes. Affected files ... .. //depot/projects/trustedbsd/netauditd/netauditd.c#3 edit Differences ... ==== //depot/projects/trustedbsd/netauditd/netauditd.c#3 (text+ko) ==== @@ -366,8 +366,10 @@ case NETAUDIT_DST_TRAIL: au->ac_fd = open(au->ac_path, O_WRONLY | O_APPEND | \ O_CREAT, S_IRUSR | S_IWUSR); - if (au->ac_fd == -1) + if (au->ac_fd == -1) { + warn("%s", au->ac_path); continue; + } au->ac_established = 1; break; case NETAUDIT_DST_NET: @@ -378,6 +380,7 @@ continue; if (connect(au->ac_fd, au->ac_ainfo->ai_addr, au->ac_ainfo->ai_addrlen) == -1) { + warn("connect"); close(au->ac_fd); continue; } @@ -463,6 +466,10 @@ exit(2); if ((new->ar_sbuf = malloc(NETAUDIT_PIPE_BUFSIZE)) == NULL) exit(2); + /* + * XXXCSJP: It is possible that the audit record will be greater then + * NETAUDIT_PIPE_BUFSIZE, in which case the pipe will truncate it. + */ new->ar_sbuflen = read(au->ac_fd, new->ar_sbuf, NETAUDIT_PIPE_BUFSIZE); if (new->ar_sbuflen == -1) { if (errno != EAGAIN) From owner-p4-projects@FreeBSD.ORG Sun Feb 17 22:29:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E746616A420; Sun, 17 Feb 2008 22:29:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94B3B16A417 for ; Sun, 17 Feb 2008 22:29:33 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7D31C13C467 for ; Sun, 17 Feb 2008 22:29:33 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HMTX8h095197 for ; Sun, 17 Feb 2008 22:29:33 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HMTXWM095194 for perforce@freebsd.org; Sun, 17 Feb 2008 22:29:33 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 22:29:33 GMT Message-Id: <200802172229.m1HMTXWM095194@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135597 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 22:29:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135597 Change 135597 by csjp@ibm01 on 2008/02/17 22:29:27 Add a note that a "dest" can reference multiple audit sources. Affected files ... .. //depot/projects/trustedbsd/netauditd/README#2 edit Differences ... ==== //depot/projects/trustedbsd/netauditd/README#2 (text+ko) ==== @@ -7,7 +7,6 @@ or network sockets. Outputs may include a file or audit trail, or a remote host running netauditd. - Sample Configuration A basic configuration example may be as follows: @@ -18,4 +17,5 @@ This defines an audit input source "src0" which references an audit pipe. Two output sources have been defined for "src0", a trail and a remote -host. +host. It should be noted that a single "dst" can reference multiple +sources. From owner-p4-projects@FreeBSD.ORG Sun Feb 17 22:39:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D48A716A41B; Sun, 17 Feb 2008 22:39:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A93E16A419 for ; Sun, 17 Feb 2008 22:39:44 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6A78C13C44B for ; Sun, 17 Feb 2008 22:39:44 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HMdirm096084 for ; Sun, 17 Feb 2008 22:39:44 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HMdiMe096081 for perforce@freebsd.org; Sun, 17 Feb 2008 22:39:44 GMT (envelope-from csjp@freebsd.org) Date: Sun, 17 Feb 2008 22:39:44 GMT Message-Id: <200802172239.m1HMdiMe096081@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135599 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 22:39:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135599 Change 135599 by csjp@ibm01 on 2008/02/17 22:39:38 Add an example sequence which catches coredumps. Affected files ... .. //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf#3 edit Differences ... ==== //depot/projects/trustedbsd/bsmtrace/bsmtrace.conf#3 (text+ko) ==== @@ -191,3 +191,11 @@ object { /[Ee][Tt][Cc]/*; }; }; }; + +sequence coredump { + subject any; + state { + event { AUE_CORE; }; + status any; + }; +}; From owner-p4-projects@FreeBSD.ORG Sun Feb 17 22:44:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CD4116A420; Sun, 17 Feb 2008 22:44:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6246516A418 for ; Sun, 17 Feb 2008 22:44:50 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A26113C447 for ; Sun, 17 Feb 2008 22:44:50 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1HMinSE096471 for ; Sun, 17 Feb 2008 22:44:49 GMT (envelope-from alm@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1HMinM4096468 for perforce@freebsd.org; Sun, 17 Feb 2008 22:44:49 GMT (envelope-from alm@freebsd.org) Date: Sun, 17 Feb 2008 22:44:49 GMT Message-Id: <200802172244.m1HMinM4096468@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alm@freebsd.org using -f From: Aaron Meihm To: Perforce Change Reviews Cc: Subject: PERFORCE change 135602 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2008 22:44:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=135602 Change 135602 by alm@alm_praetorian on 2008/02/17 22:44:28 Clean up component and configuration file parsing, beginning of support for src network components. Affected files ... .. //depot/projects/trustedbsd/netauditd/netauditd.c#4 edit .. //depot/projects/trustedbsd/netauditd/netauditd.conf#2 edit .. //depot/projects/trustedbsd/netauditd/netauditd.h#2 edit Differences ... ==== //depot/projects/trustedbsd/netauditd/netauditd.c#4 (text+ko) ==== @@ -52,8 +52,9 @@ int (*c_func)(args_t *); } conftab[] = { { "src", "pipe", 4, conf_parse_src_pipe }, + { "src", "net", 5, conf_parse_net }, { "dst", "trail", 5, conf_parse_dst_trail }, - { "dst", "net", 6, conf_parse_dst_net }, + { "dst", "net", 6, conf_parse_net }, { NULL, NULL, 0, NULL } }; @@ -64,6 +65,77 @@ TAILQ_HEAD(au_dstlist, au_cmpnt) au_dstlist; struct au_cmpnt * +component_init(int is_src, char *type, char *name) +{ + struct au_cmpnt *new; + + new = malloc(sizeof(struct au_cmpnt)); + if (new == NULL) + return (NULL); + memset(new, 0, sizeof(struct au_cmpnt)); + if (is_src) { + if (strcmp(type, "net") == 0) + new->ac_type = NETAUDIT_SRC_NET; + else if (strcmp(type, "pipe") == 0) + new->ac_type = NETAUDIT_SRC_PIPE; + else { + free(new); + return (NULL); + } + } + else { + if (strcmp(type, "net") == 0) + new->ac_type = NETAUDIT_DST_NET; + else if (strcmp(type, "trail") == 0) + new->ac_type = NETAUDIT_DST_TRAIL; + else { + free(new); + return (NULL); + } + } + if ((new->ac_name = strdup(name)) == NULL) { + free(new); + return (NULL); + } + TAILQ_INIT(&new->ac_oq); + return (new); +} + +int +component_clear_oq(struct au_cmpnt *ptr) +{ + struct au_queue_ent *a, *b; + + if (TAILQ_EMPTY(&ptr->ac_oq)) + return (0); + TAILQ_FOREACH_SAFE(a, &ptr->ac_oq, aq_glue, b) { + TAILQ_REMOVE(&ptr->ac_oq, a, aq_glue); + a->aq_ptr->ar_refcount--; + if (a->aq_ptr->ar_refcount == 0) { + free(a->aq_ptr->ar_sbuf); + free(a->aq_ptr); + } + free(a); + } + return (1); +} + +void +component_destroy(struct au_cmpnt *ptr) +{ + if (ptr->ac_name != NULL) + free(ptr->ac_name); + if (ptr->ac_path != NULL) + free(ptr->ac_path); + if (ptr->ac_ainfo != NULL) + freeaddrinfo(ptr->ac_ainfo); + if (ptr->ac_consumers != NULL) + free(ptr->ac_consumers); + component_clear_oq(ptr); + free(ptr); +} + +struct au_cmpnt * conf_get_src(char *name) { struct au_cmpnt *ret; @@ -76,12 +148,53 @@ } int +conf_parse_net(args_t *a) +{ + struct addrinfo hints; + struct au_cmpnt *new; + char *host, *svc; + int is_src = 0; + + if (strcmp(a->args[0], "src") == 0) + is_src = 1; + else if (strcmp(a->args[0], "dst") != 0) + return (-1); + host = a->args[3]; + svc = a->args[4]; + if ((new = component_init(is_src, a->args[2], a->args[1])) == NULL) + exit(2); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + if (is_src) { + hints.ai_flags = AI_PASSIVE; + new->ac_type = NETAUDIT_SRC_NET; + } + else + new->ac_type = NETAUDIT_DST_NET; + if (getaddrinfo(host, svc, &hints, &new->ac_ainfo) != 0) { + free(new); + return (-1); + } + if (is_src) + TAILQ_INSERT_TAIL(&au_srclist, new, ac_glue); + else { + if (conf_link_consumers(new, a, 5) == -1) { + component_destroy(new); + return (-1); + } + TAILQ_INSERT_TAIL(&au_dstlist, new, ac_glue); + } + return (0); +} + +int conf_link_consumers(struct au_cmpnt *ac, args_t *a, int start) { struct au_cmpnt *ptr; - int i, j; + int i; - for (j = 0, i = start; i < a->args_n; i++) { + for (i = start; i < a->args_n; i++) { if ((ptr = conf_get_src(a->args[i])) == NULL) return (-1); dprintf("%s <- %s\n", ac->ac_name, ptr->ac_name); @@ -104,13 +217,8 @@ { struct au_cmpnt *new; - new = malloc(sizeof(struct au_cmpnt)); - if (new == NULL) + if ((new = component_init(1, a->args[2], a->args[1])) == NULL) exit(2); - memset(new, 0, sizeof(struct au_cmpnt)); - if ((new->ac_name = strdup(a->args[1])) == NULL) - exit(2); - new->ac_type = NETAUDIT_SRC_PIPE; if ((new->ac_path = strdup(a->args[3])) == NULL) exit(2); TAILQ_INSERT_TAIL(&au_srclist, new, ac_glue); @@ -122,18 +230,14 @@ { struct au_cmpnt *new; - new = malloc(sizeof(struct au_cmpnt)); - if (new == NULL) + if ((new = component_init(0, a->args[2], a->args[1])) == NULL) exit(2); - memset(new, 0, sizeof(struct au_cmpnt)); - if ((new->ac_name = strdup(a->args[1])) == NULL) - exit(2); - new->ac_type = NETAUDIT_DST_TRAIL; if ((new->ac_path = strdup(a->args[3])) == NULL) exit(2); - if (conf_link_consumers(new, a, 4) == -1) + if (conf_link_consumers(new, a, 4) == -1) { + component_destroy(new); return (-1); - TAILQ_INIT(&new->ac_oq); + } TAILQ_INSERT_TAIL(&au_dstlist, new, ac_glue); return (0); } ==== //depot/projects/trustedbsd/netauditd/netauditd.conf#2 (text+ko) ==== @@ -1,6 +1,7 @@ # $Id: netauditd.conf,v 1.3 2008/02/14 05:13:47 alm Exp $ src src0 pipe /dev/auditpipe +#src src1 net 0.0.0.0 9999 dst dst0 trail /tmp/src0/trail src0 ==== //depot/projects/trustedbsd/netauditd/netauditd.h#2 (text+ko) ==== @@ -32,6 +32,7 @@ #define NETAUDIT_DELAY_TIMER 100000 #define NETAUDIT_SRC_PIPE 1 +#define NETAUDIT_SRC_NET 2 #define NETAUDIT_DST_TRAIL 1 #define NETAUDIT_DST_NET 2 @@ -66,13 +67,18 @@ int args_n; } args_t; +int component_clear_oq(struct au_cmpnt *); +void component_destroy(struct au_cmpnt *); +struct au_cmpnt *component_init(int, char *, char *); struct au_cmpnt *conf_get_src(char *); void conf_load(char *); -int conf_link_consumer(struct au_cmpnt *, args_t *, int); +int conf_link_consumers(struct au_cmpnt *, args_t *, int); void conf_parse(char *, int); int conf_parse_src_pipe(args_t *); int conf_parse_dst_trail(args_t *); int conf_parse_dst_net(args_t *); +int conf_parse_src_net(args_t *); +int conf_parse_net(args_t *); args_t *conf_parse_args(char *); void conf_free_args(args_t *); void dprintf(char *, ...); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 00:10:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C73F16A468; Mon, 18 Feb 2008 00:10:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC10B16A417 for ; Mon, 18 Feb 2008 00:10:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AADC413C447 for ; Mon, 18 Feb 2008 00:10:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I0AKG1003636 for ; Mon, 18 Feb 2008 00:10:20 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I0AKTe003630 for perforce@freebsd.org; Mon, 18 Feb 2008 00:10:20 GMT (envelope-from jb@freebsd.org) Date: Mon, 18 Feb 2008 00:10:20 GMT Message-Id: <200802180010.m1I0AKTe003630@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135606 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 00:10:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=135606 Change 135606 by jb@jb_freebsd1 on 2008/02/18 00:09:37 When ready CTF data, we need to be able to decompress it. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#71 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#71 (text+ko) ==== @@ -1416,7 +1416,7 @@ kern/device_if.m standard kern/imgact_elf.c standard kern/imgact_shell.c standard -kern/inflate.c optional gzip +kern/inflate.c optional gzip | ddb_ctf kern/init_main.c standard kern/init_sysent.c standard kern/ksched.c optional _kposix_priority_scheduling From owner-p4-projects@FreeBSD.ORG Mon Feb 18 00:41:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEBB116A418; Mon, 18 Feb 2008 00:41:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BEB816A41A for ; Mon, 18 Feb 2008 00:41:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 43A5313C455 for ; Mon, 18 Feb 2008 00:41:58 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I0fv8d005815 for ; Mon, 18 Feb 2008 00:41:57 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I0fvll005812 for perforce@freebsd.org; Mon, 18 Feb 2008 00:41:57 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 00:41:57 GMT Message-Id: <200802180041.m1I0fvll005812@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135609 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 00:41:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135609 Change 135609 by kmacy@kmacy:entropy:iwarp on 2008/02/18 00:41:43 cleanup and add requirements for QA hardware Affected files ... .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#10 edit Differences ... ==== //depot/projects/iwarp/sys/amd64/conf/GENERIC#10 (text+ko) ==== @@ -26,7 +26,6 @@ makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="cxgb em" options SCHED_ULE options IPI_PREEMPTION @@ -214,15 +213,15 @@ device dcons_crom # Configuration ROM for dcons options ALT_BREAK_TO_DEBUGGER +options HWPMC_HOOKS options KTR -#options ALQ -#options KTR_ALQ options KTR_COMPILE=(KTR_SPARE2) options KTR_CPUMASK=0x7 options KTR_ENTRIES=65536 options KTR_MASK=(KTR_SPARE2) -#options KTR_VERBOSE +device miibus +device rl From owner-p4-projects@FreeBSD.ORG Mon Feb 18 00:42:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E51C16A420; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E0016A417 for ; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A6BD13C45A for ; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I0gxlO005872 for ; Mon, 18 Feb 2008 00:42:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I0gxMW005869 for perforce@freebsd.org; Mon, 18 Feb 2008 00:42:59 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 00:42:59 GMT Message-Id: <200802180042.m1I0gxMW005869@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135610 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 00:42:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135610 Change 135610 by kmacy@kmacy:entropy:iwarp on 2008/02/18 00:42:02 strip down and add KTR support Affected files ... .. //depot/projects/iwarp/sys/i386/conf/GENERIC#7 edit Differences ... ==== //depot/projects/iwarp/sys/i386/conf/GENERIC#7 (text+ko) ==== @@ -25,6 +25,7 @@ #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption @@ -196,13 +197,8 @@ # line to enable it (connects to sio, uart and/or ppc drivers): #device puc -# PCI Ethernet NICs. -device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 adapter Gigabit Ethernet Card -device ixgb # Intel PRO/10GbE Ethernet Card -device le # AMD Am7900 LANCE and Am79C9xx PCnet -device txp # 3Com 3cR990 (``Typhoon'') -device vx # 3Com 3c590, 3c595 (``Vortex'') + # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! @@ -210,57 +206,8 @@ device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet -device dc # DEC/Intel 21143 and various workalikes -device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device lge # Level 1 LXT1001 gigabit Ethernet -device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet -device nfe # nVidia nForce MCP on-board Ethernet -device nge # NatSemi DP83820 gigabit Ethernet -#device nve # nVidia nForce MCP on-board Ethernet Networking -device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') -device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 -device sf # Adaptec AIC-6915 (``Starfire'') -device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet -device ste # Sundance ST201 (D-Link DFE-550TX) -device stge # Sundance/Tamarack TC9021 gigabit Ethernet -device ti # Alteon Networks Tigon I/II gigabit Ethernet -device tl # Texas Instruments ThunderLAN -device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet -device vr # VIA Rhine, Rhine II -device wb # Winbond W89C840F -device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') -# ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC -# 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm -device wlan_scan_ap # 802.11 AP mode scanning -device wlan_scan_sta # 802.11 STA mode scanning -device an # Aironet 4500/4800 802.11 wireless NICs. -device ath # Atheros pci/cardbus NIC's -device ath_hal # Atheros HAL (Hardware Access Layer) -device ath_rate_sample # SampleRate tx rate control for ath -device awi # BayStack 660 and others -device ral # Ralink Technology RT2500 wireless NICs. -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. -#device wl # Older non 802.11 Wavelan wireless NIC. - # Pseudo devices. device loop # Network loopback device random # Entropy device @@ -291,9 +238,6 @@ device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -device ural # Ralink Technology RT2500USB wireless NICs -device rum # Ralink Technology RT2501USB wireless NICs -device zyd # ZyDAS zb1211/zb1211b wireless NICs device urio # Diamond Rio 500 MP3 player device uscanner # Scanners # USB Serial devices @@ -323,6 +267,11 @@ device dcons # Dumb console driver device dcons_crom # Configuration ROM for dcons -options IFNET_MULTIQUEUE # add support for using multiple tx queues to ifnet options ALT_BREAK_TO_DEBUGGER options HWPMC_HOOKS + +options KTR +options KTR_COMPILE=(KTR_SPARE2) +options KTR_CPUMASK=0x7 +options KTR_ENTRIES=65536 +options KTR_MASK=(KTR_SPARE2) From owner-p4-projects@FreeBSD.ORG Mon Feb 18 00:43:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAA0D16A530; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 875F416A419 for ; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6ECED13C45D for ; Mon, 18 Feb 2008 00:42:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I0gxrs005878 for ; Mon, 18 Feb 2008 00:42:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I0gxT1005875 for perforce@freebsd.org; Mon, 18 Feb 2008 00:42:59 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 00:42:59 GMT Message-Id: <200802180042.m1I0gxT1005875@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135611 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 00:43:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135611 Change 135611 by kmacy@kmacy:entropy:iwarp on 2008/02/18 00:42:45 improve error message Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#18 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#18 (text+ko) ==== @@ -473,8 +473,8 @@ static int rx_offload_blackhole(struct t3cdev *dev, struct mbuf **m, int n) { - CH_ERR(tdev2adap(dev), "%d unexpected offload packets, first data 0x%x\n", - n, *mtod(m[0], uint32_t *)); + CH_ERR(tdev2adap(dev), "%d unexpected offload packets, first data 0x%02x\n", + n, (0xff & *mtod(m[0], uint32_t *))); while (n--) m_freem(m[n]); return 0; From owner-p4-projects@FreeBSD.ORG Mon Feb 18 02:11:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1208D16A420; Mon, 18 Feb 2008 02:11:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A33EE16A417; Mon, 18 Feb 2008 02:11:14 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.69]) by mx1.freebsd.org (Postfix) with ESMTP id 8118213C457; Mon, 18 Feb 2008 02:11:14 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp010-s [10.150.69.73]) by smtpoutm.mac.com (Xserve/smtpout006/MantshX 4.0) with ESMTP id m1I2BElN027177; Sun, 17 Feb 2008 18:11:14 -0800 (PST) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp010/MantshX 4.0) with ESMTP id m1I2BCAG026716 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 17 Feb 2008 18:11:13 -0800 (PST) Message-Id: <755B845B-F43E-463D-8D87-7596A8C462F8@mac.com> From: Marcel Moolenaar To: Rafal Jaworowski In-Reply-To: <47B8A8CD.3040707@semihalf.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 17 Feb 2008 18:11:12 -0800 References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B84D9B.4010903@semihalf.com> <47B8A8CD.3040707@semihalf.com> X-Mailer: Apple Mail (2.919.2) Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 02:11:15 -0000 On Feb 17, 2008, at 1:36 PM, Rafal Jaworowski wrote: > Another comment: please note that killing WITH_UBOOT introduces > another > problem: now both sys/boot/powerpc/uboot/loader and > sys/boot/powerpc/ofw/loader are built during buildworld, which may > be good > from one point of view, but there's no control over which of the > loader file > is taken during installworld: it seems the last one (u-boot's in > this case) > overwrites the previous... Oh, yeah. We need to rename the U-Boot loader... More comments: with 1GB, the API signature is not found. What we probably should do is have the platform-specific entry set a hint, which can be based on the address of the global data. In other words: on PowerPC in start.S, we save r2 and use that to control where we're going to search for the API signature. FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-p4-projects@FreeBSD.ORG Mon Feb 18 02:54:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EAE3016A420; Mon, 18 Feb 2008 02:54:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9856716A417 for ; Mon, 18 Feb 2008 02:54:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 65E8813C447 for ; Mon, 18 Feb 2008 02:54:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I2sIpZ024495 for ; Mon, 18 Feb 2008 02:54:18 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I2sHD1024492 for perforce@freebsd.org; Mon, 18 Feb 2008 02:54:17 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 02:54:17 GMT Message-Id: <200802180254.m1I2sHD1024492@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135617 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 02:54:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135617 Change 135617 by imp@imp_lighthouse on 2008/02/18 02:53:22 ADM5120 now links. Untested on real hardware. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/adm5120_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/adm5120/adm5120_machdep.c#3 (text+ko) ==== @@ -152,5 +152,5 @@ /* Set counter_freq for tick_init_params() */ platform_counter_freq = 175 * 1000 * 1000; - tick_init_params(platform_counter_freq, 0); + mips_timer_init_params(platform_counter_freq, 0); } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 03:01:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 801E916A41B; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D84016A417 for ; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0E97613C44B for ; Mon, 18 Feb 2008 03:01:26 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I31Q00025002 for ; Mon, 18 Feb 2008 03:01:26 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I31PZA024993 for perforce@freebsd.org; Mon, 18 Feb 2008 03:01:25 GMT (envelope-from marcel@freebsd.org) Date: Mon, 18 Feb 2008 03:01:25 GMT Message-Id: <200802180301.m1I31PZA024993@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135618 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 03:01:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=135618 Change 135618 by marcel@marcel_xcllnt on 2008/02/18 03:00:27 Save the address of the global data structure in uboot_address. This will be used by the U-Boot library in the API search algorithm. Disable interrupts on entry and enable them for the duration of the syscall. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#7 (text+ko) ==== @@ -40,11 +40,18 @@ lis %r1, stack@ha addi %r1, %r1, stack@l addi %r1, %r1, (STACK_SIZE - 32) - /* Save U-Boot's r14 and r29 */ + /* Hint where to look for the API signature */ + lis %r11, uboot_address@ha + addi %r11, %r11, uboot_address@l + stw %r2, 0(%r11) + /* Save U-Boot's r14 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l stw %r14, 0(%r11) - stw %r29, 4(%r11) + /* Disable interrupts */ + mfmsr %r11 + andi. %r11, %r11, ~0x8000@l + mtmsr %r11 b main /* @@ -54,25 +61,30 @@ stwu %r1, -16(%r1) mflr %r0 stw %r14, 8(%r1) - stw %r29, 12(%r1) stw %r0, 20(%r1) /* Restore U-Boot's r14 and r29 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l lwz %r14, 0(%r11) - lwz %r29, 4(%r11) + /* Enable interrupts */ + mfmsr %r11 + ori %r11, %r11, 0x8000@l + mtmsr %r11 /* Call into u-Boot */ lis %r11, syscall_ptr@ha addi %r11, %r11, syscall_ptr@l lwz %r11, 0(%r11) mtctr %r11 bctrl + /* Disable interrupts */ + mfmsr %r11 + andi. %r11, %r11, ~0x8000@l + mtmsr %r11 /* Epilogue */ lwz %r11, 0(%r1) lwz %r0, 4(%r11) mtlr %r0 lwz %r14, 8(%r1) - lwz %r29, 12(%r1) mr %r1, %r11 blr @@ -88,5 +100,5 @@ .long 0 GLOBAL(saved_regs) .long 0 /* R14 */ - .long 0 /* R29 */ - +GLOBAL(uboot_address) + .long 0 From owner-p4-projects@FreeBSD.ORG Mon Feb 18 03:42:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 26DBB16A419; Mon, 18 Feb 2008 03:42:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C506C16A417 for ; Mon, 18 Feb 2008 03:42:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A7CB113C457 for ; Mon, 18 Feb 2008 03:42:01 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I3g1cI028808 for ; Mon, 18 Feb 2008 03:42:01 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I3fSmn028792 for perforce@freebsd.org; Mon, 18 Feb 2008 03:41:28 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 03:41:28 GMT Message-Id: <200802180341.m1I3fSmn028792@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135619 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 03:42:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=135619 Change 135619 by kmacy@pandemonium:kmacy:xen31 on 2008/02/18 03:41:26 IFC #135616 Affected files ... .. //depot/projects/xen31/LOCKS#2 integrate .. //depot/projects/xen31/MAINTAINERS#2 integrate .. //depot/projects/xen31/Makefile#3 integrate .. //depot/projects/xen31/Makefile.inc1#4 integrate .. //depot/projects/xen31/ObsoleteFiles.inc#9 integrate .. //depot/projects/xen31/UPDATING#4 integrate .. //depot/projects/xen31/bin/date/date.c#2 integrate .. //depot/projects/xen31/contrib/binutils/libiberty/cp-demangle.c#2 integrate .. //depot/projects/xen31/contrib/file/FREEBSD-upgrade#2 integrate .. //depot/projects/xen31/contrib/file/Magdir/bFLT#2 delete .. //depot/projects/xen31/contrib/file/Magdir/chi#2 delete .. //depot/projects/xen31/contrib/file/Magdir/cvs#2 delete .. //depot/projects/xen31/contrib/file/Magdir/hdf#2 delete .. //depot/projects/xen31/contrib/file/Magdir/impulse#2 delete .. //depot/projects/xen31/contrib/file/Magdir/wordperfect#2 delete .. //depot/projects/xen31/contrib/file/acconfig.h#2 delete .. //depot/projects/xen31/contrib/file/magic.c#3 integrate .. //depot/projects/xen31/contrib/file/missing#2 delete .. //depot/projects/xen31/contrib/file/stamp-h.in#2 delete .. //depot/projects/xen31/contrib/gdb/FREEBSD-diffs#1 branch .. //depot/projects/xen31/contrib/libiberty/cp-demangle.c#2 delete .. //depot/projects/xen31/contrib/ncurses/FREEBSD-upgrade#3 integrate .. //depot/projects/xen31/contrib/ncurses/FREEBSD-vendor#1 branch .. //depot/projects/xen31/contrib/ncurses/MANIFEST#3 integrate .. //depot/projects/xen31/contrib/ncurses/NEWS#3 integrate .. //depot/projects/xen31/contrib/ncurses/dist.mk#3 integrate .. //depot/projects/xen31/contrib/ncurses/form/frm_driver.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/include/curses.h.in#3 integrate .. //depot/projects/xen31/contrib/ncurses/include/ncurses_defs#3 integrate .. //depot/projects/xen31/contrib/ncurses/man/curs_clear.3x#2 integrate .. //depot/projects/xen31/contrib/ncurses/man/curs_threads.3x#1 branch .. //depot/projects/xen31/contrib/ncurses/man/man_db.renames#3 integrate .. //depot/projects/xen31/contrib/ncurses/man/manlinks.sed#2 integrate .. //depot/projects/xen31/contrib/ncurses/man/toe.1m#3 integrate .. //depot/projects/xen31/contrib/ncurses/misc/terminfo.src#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/MKlib_gen.sh#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/MKunctrl.awk#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_addch.c#2 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_getch.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_insch.c#2 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_newterm.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_newwin.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_set_term.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_slk.c#2 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_slkclear.c#2 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/lib_slkinit.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/resizeterm.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/base/use_window.c#2 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/curses.priv.h#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/llib-lncursest#1 branch .. //depot/projects/xen31/contrib/ncurses/ncurses/tinfo/lib_data.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/ncurses/tinfo/lib_setup.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/progs/infocmp.c#3 integrate .. //depot/projects/xen31/contrib/ncurses/progs/toe.c#3 integrate .. //depot/projects/xen31/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/xen31/contrib/openpam/include/security/openpam_version.h#3 integrate .. //depot/projects/xen31/contrib/pf/man/pf.conf.5#2 integrate .. //depot/projects/xen31/contrib/top/display.c#2 integrate .. //depot/projects/xen31/contrib/top/layout.h#2 integrate .. //depot/projects/xen31/contrib/top/machine.h#2 integrate .. //depot/projects/xen31/contrib/top/top.c#3 integrate .. //depot/projects/xen31/contrib/top/top.h#2 integrate .. //depot/projects/xen31/crypto/openssh/FREEBSD-Xlist#2 integrate .. //depot/projects/xen31/crypto/openssh/FREEBSD-upgrade#2 integrate .. //depot/projects/xen31/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/xen31/etc/defaults/rc.conf#3 integrate .. //depot/projects/xen31/etc/devd.conf#2 integrate .. //depot/projects/xen31/etc/mail/access.sample#2 integrate .. //depot/projects/xen31/etc/namedb/named.root#3 integrate .. //depot/projects/xen31/etc/netstart#2 integrate .. //depot/projects/xen31/etc/periodic/security/100.chksetuid#3 integrate .. //depot/projects/xen31/etc/rc#2 integrate .. //depot/projects/xen31/etc/rc.d/dhclient#3 integrate .. //depot/projects/xen31/etc/rc.d/hostid#2 integrate .. //depot/projects/xen31/etc/rc.d/ipfw#2 integrate .. //depot/projects/xen31/etc/rc.d/kerberos#2 integrate .. //depot/projects/xen31/etc/rc.d/mountcritremote#3 integrate .. //depot/projects/xen31/etc/rc.d/netif#2 integrate .. //depot/projects/xen31/etc/rc.d/ppp#2 integrate .. //depot/projects/xen31/etc/rc.firewall#3 integrate .. //depot/projects/xen31/etc/rc.subr#2 integrate .. //depot/projects/xen31/etc/sendmail/freebsd.mc#3 integrate .. //depot/projects/xen31/gnu/lib/csu/Makefile#2 integrate .. //depot/projects/xen31/gnu/usr.bin/cvs/Makefile#3 integrate .. //depot/projects/xen31/gnu/usr.bin/cvs/contrib/Makefile#3 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/Makefile#2 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/kgdb.h#3 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/kld.c#1 branch .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/kthr.c#3 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/main.c#2 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/trgt.c#2 integrate .. //depot/projects/xen31/gnu/usr.bin/gdb/kgdb/trgt_i386.c#3 integrate .. //depot/projects/xen31/include/fts.h#2 integrate .. //depot/projects/xen31/include/pthread_np.h#4 integrate .. //depot/projects/xen31/include/unistd.h#3 integrate .. //depot/projects/xen31/lib/libarchive/Makefile#3 integrate .. //depot/projects/xen31/lib/libarchive/archive_read_extract.c#2 integrate .. //depot/projects/xen31/lib/libarchive/archive_read_support_format_tar.c#5 integrate .. //depot/projects/xen31/lib/libarchive/archive_write_disk.c#3 integrate .. //depot/projects/xen31/lib/libarchive/archive_write_set_format_ar.c#3 integrate .. //depot/projects/xen31/lib/libarchive/archive_write_set_format_cpio_newc.c#2 integrate .. //depot/projects/xen31/lib/libarchive/test/Makefile#3 integrate .. //depot/projects/xen31/lib/libarchive/test/test_compat_tar_hardlink.c#1 branch .. //depot/projects/xen31/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu#1 branch .. //depot/projects/xen31/lib/libarchive/test/test_write_disk.c#2 integrate .. //depot/projects/xen31/lib/libarchive/test/test_write_disk_hardlink.c#1 branch .. //depot/projects/xen31/lib/libarchive/test/test_write_format_cpio_newc.c#2 integrate .. //depot/projects/xen31/lib/libc/amd64/_fpmath.h#2 integrate .. //depot/projects/xen31/lib/libc/gen/Makefile.inc#3 integrate .. //depot/projects/xen31/lib/libc/gen/Symbol.map#3 integrate .. //depot/projects/xen31/lib/libc/gen/fts-compat.c#2 integrate .. //depot/projects/xen31/lib/libc/gen/fts-compat.h#2 integrate .. //depot/projects/xen31/lib/libc/gen/fts.3#2 integrate .. //depot/projects/xen31/lib/libc/gen/fts.c#2 integrate .. //depot/projects/xen31/lib/libc/i386/_fpmath.h#2 integrate .. //depot/projects/xen31/lib/libc/ia64/_fpmath.h#2 integrate .. //depot/projects/xen31/lib/libc/include/namespace.h#2 integrate .. //depot/projects/xen31/lib/libc/include/un-namespace.h#2 integrate .. //depot/projects/xen31/lib/libc/locale/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libc/locale/ascii.c#1 branch .. //depot/projects/xen31/lib/libc/locale/mblocal.h#3 integrate .. //depot/projects/xen31/lib/libc/locale/setrunelocale.c#2 integrate .. //depot/projects/xen31/lib/libc/net/getaddrinfo.c#2 integrate .. //depot/projects/xen31/lib/libc/resolv/res_comp.c#2 integrate .. //depot/projects/xen31/lib/libc/sparc64/_fpmath.h#2 integrate .. //depot/projects/xen31/lib/libc/stdlib/malloc.3#4 integrate .. //depot/projects/xen31/lib/libc/stdlib/malloc.c#6 integrate .. //depot/projects/xen31/lib/libc/sys/access.2#3 integrate .. //depot/projects/xen31/lib/libc/sys/extattr_get_file.2#2 integrate .. //depot/projects/xen31/lib/libc/sys/flock.2#2 integrate .. //depot/projects/xen31/lib/libc/sys/readlink.2#2 integrate .. //depot/projects/xen31/lib/libc/sys/sendfile.2#2 integrate .. //depot/projects/xen31/lib/libdevstat/devstat.h#2 integrate .. //depot/projects/xen31/lib/libdisk/disk.c#2 integrate .. //depot/projects/xen31/lib/libelf/gelf_fsize.3#2 integrate .. //depot/projects/xen31/lib/libfetch/common.c#4 integrate .. //depot/projects/xen31/lib/libfetch/fetch.3#3 integrate .. //depot/projects/xen31/lib/libfetch/ftp.c#4 integrate .. //depot/projects/xen31/lib/libfetch/http.c#4 integrate .. //depot/projects/xen31/lib/libkse/Makefile#4 integrate .. //depot/projects/xen31/lib/libkse/kse.map#3 integrate .. //depot/projects/xen31/lib/libkse/sys/lock.c#4 integrate .. //depot/projects/xen31/lib/libkse/thread/thr_mutex.c#6 integrate .. //depot/projects/xen31/lib/libmilter/Makefile#2 integrate .. //depot/projects/xen31/lib/libpmc/pmc.3#4 integrate .. //depot/projects/xen31/lib/librpcsvc/Makefile#2 integrate .. //depot/projects/xen31/lib/librpcsvc/xcrypt.c#2 integrate .. //depot/projects/xen31/lib/libthr/Makefile#3 integrate .. //depot/projects/xen31/lib/libthr/arch/amd64/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/arm/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/arm/include/pthread_md.h#2 integrate .. //depot/projects/xen31/lib/libthr/arch/i386/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/ia64/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/powerpc/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/sparc64/Makefile.inc#2 integrate .. //depot/projects/xen31/lib/libthr/arch/sparc64/include/pthread_md.h#2 integrate .. //depot/projects/xen31/lib/libthr/pthread.map#5 integrate .. //depot/projects/xen31/lib/libthr/thread/thr_mutex.c#5 integrate .. //depot/projects/xen31/lib/msun/Makefile#4 integrate .. //depot/projects/xen31/lib/msun/Symbol.map#5 integrate .. //depot/projects/xen31/lib/msun/amd64/Makefile.inc#4 integrate .. //depot/projects/xen31/lib/msun/amd64/e_remainder.S#1 branch .. //depot/projects/xen31/lib/msun/amd64/e_remainderf.S#1 branch .. //depot/projects/xen31/lib/msun/ld128/k_cosl.c#1 branch .. //depot/projects/xen31/lib/msun/ld128/k_sinl.c#1 branch .. //depot/projects/xen31/lib/msun/ld128/k_tanl.c#1 branch .. //depot/projects/xen31/lib/msun/ld128/s_exp2l.c#1 branch .. //depot/projects/xen31/lib/msun/ld80/k_cosl.c#1 branch .. //depot/projects/xen31/lib/msun/ld80/k_sinl.c#1 branch .. //depot/projects/xen31/lib/msun/ld80/k_tanl.c#1 branch .. //depot/projects/xen31/lib/msun/ld80/s_exp2l.c#1 branch .. //depot/projects/xen31/lib/msun/man/cos.3#2 integrate .. //depot/projects/xen31/lib/msun/man/exp.3#2 integrate .. //depot/projects/xen31/lib/msun/man/log.3#1 branch .. //depot/projects/xen31/lib/msun/man/sin.3#2 integrate .. //depot/projects/xen31/lib/msun/man/tan.3#2 integrate .. //depot/projects/xen31/lib/msun/src/e_exp.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_expf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_hypot.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_hypotf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_pow.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_powf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_rem_pio2.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_rem_pio2f.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_remainder.c#2 integrate .. //depot/projects/xen31/lib/msun/src/e_remainderf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/k_cos.c#2 integrate .. //depot/projects/xen31/lib/msun/src/k_rem_pio2.c#2 integrate .. //depot/projects/xen31/lib/msun/src/k_rem_pio2f.c#2 delete .. //depot/projects/xen31/lib/msun/src/math.h#5 integrate .. //depot/projects/xen31/lib/msun/src/math_private.h#3 integrate .. //depot/projects/xen31/lib/msun/src/s_ceil.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_ceill.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_cos.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_cosl.c#1 branch .. //depot/projects/xen31/lib/msun/src/s_exp2.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_exp2f.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_expm1.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_expm1f.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_floor.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_floorl.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_log1p.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_log1pf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_logb.c#3 integrate .. //depot/projects/xen31/lib/msun/src/s_rint.c#3 integrate .. //depot/projects/xen31/lib/msun/src/s_rintf.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_sin.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_sinl.c#1 branch .. //depot/projects/xen31/lib/msun/src/s_tan.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_tanl.c#1 branch .. //depot/projects/xen31/lib/msun/src/s_trunc.c#2 integrate .. //depot/projects/xen31/lib/msun/src/s_truncl.c#2 integrate .. //depot/projects/xen31/lib/ncurses/ncurses/Makefile#3 integrate .. //depot/projects/xen31/lib/ncurses/ncurses/ncurses_cfg.h#3 integrate .. //depot/projects/xen31/release/amd64/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/doc/en_US.ISO8859-1/hardware/article.sgml#4 integrate .. //depot/projects/xen31/release/doc/en_US.ISO8859-1/relnotes/article.sgml#5 integrate .. //depot/projects/xen31/release/doc/share/misc/dev.archlist.txt#3 integrate .. //depot/projects/xen31/release/fixit.profile#3 integrate .. //depot/projects/xen31/release/i386/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/ia64/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/pc98/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/powerpc/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/sparc64/boot_crunch.conf#2 integrate .. //depot/projects/xen31/release/sun4v/boot_crunch.conf#2 integrate .. //depot/projects/xen31/sbin/dhclient/dhclient-script#2 integrate .. //depot/projects/xen31/sbin/ffsinfo/ffsinfo.c#2 integrate .. //depot/projects/xen31/sbin/fsck_msdosfs/boot.c#3 integrate .. //depot/projects/xen31/sbin/fsck_msdosfs/fat.c#2 integrate .. //depot/projects/xen31/sbin/geom/core/geom.8#2 integrate .. //depot/projects/xen31/sbin/geom/core/geom.c#3 integrate .. //depot/projects/xen31/sbin/gpt/gpt.8#3 integrate .. //depot/projects/xen31/sbin/gpt/gpt.c#4 integrate .. //depot/projects/xen31/sbin/gpt/migrate.c#2 integrate .. //depot/projects/xen31/sbin/gpt/show.c#3 integrate .. //depot/projects/xen31/sbin/ifconfig/ifieee80211.c#3 integrate .. //depot/projects/xen31/sbin/ipfw/ipfw.8#3 integrate .. //depot/projects/xen31/sbin/ipfw/ipfw2.c#4 integrate .. //depot/projects/xen31/sbin/iscontrol/misc.c#2 integrate .. //depot/projects/xen31/sbin/md5/md5.c#2 integrate .. //depot/projects/xen31/sbin/mount/getmntopts.3#2 integrate .. //depot/projects/xen31/sbin/mount/mount.c#2 integrate .. //depot/projects/xen31/sbin/mount_nfs/mount_nfs.8#2 integrate .. //depot/projects/xen31/sbin/mount_nfs/mount_nfs.c#2 integrate .. //depot/projects/xen31/sbin/natd/natd.8#4 integrate .. //depot/projects/xen31/sbin/quotacheck/Makefile#2 integrate .. //depot/projects/xen31/sbin/quotacheck/preen.c#2 integrate .. //depot/projects/xen31/sbin/quotacheck/quotacheck.8#2 integrate .. //depot/projects/xen31/sbin/quotacheck/quotacheck.c#3 integrate .. //depot/projects/xen31/sbin/quotacheck/quotacheck.h#1 branch .. //depot/projects/xen31/share/colldef/el_GR.ISO8859-7.src#2 integrate .. //depot/projects/xen31/share/man/man4/Makefile#6 integrate .. //depot/projects/xen31/share/man/man4/ath.4#2 integrate .. //depot/projects/xen31/share/man/man4/atkbd.4#2 integrate .. //depot/projects/xen31/share/man/man4/awi.4#2 integrate .. //depot/projects/xen31/share/man/man4/axe.4#2 integrate .. //depot/projects/xen31/share/man/man4/ciss.4#2 integrate .. //depot/projects/xen31/share/man/man4/coda.4#1 branch .. //depot/projects/xen31/share/man/man4/dcons.4#2 integrate .. //depot/projects/xen31/share/man/man4/ed.4#3 integrate .. //depot/projects/xen31/share/man/man4/geom_lvm.4#1 branch .. //depot/projects/xen31/share/man/man4/hptiop.4#2 integrate .. //depot/projects/xen31/share/man/man4/hptrr.4#2 integrate .. //depot/projects/xen31/share/man/man4/man4.i386/snc.4#2 integrate .. //depot/projects/xen31/share/man/man4/mfi.4#2 integrate .. //depot/projects/xen31/share/man/man4/mxge.4#3 integrate .. //depot/projects/xen31/share/man/man4/oldcard.4#2 delete .. //depot/projects/xen31/share/man/man4/pcib.4#2 integrate .. //depot/projects/xen31/share/man/man4/puc.4#2 integrate .. //depot/projects/xen31/share/man/man4/rr232x.4#2 delete .. //depot/projects/xen31/share/man/man4/sched_4bsd.4#2 integrate .. //depot/projects/xen31/share/man/man4/sched_ule.4#2 integrate .. //depot/projects/xen31/share/man/man4/sf.4#2 integrate .. //depot/projects/xen31/share/man/man4/sk.4#2 integrate .. //depot/projects/xen31/share/man/man4/syncache.4#3 integrate .. //depot/projects/xen31/share/man/man4/vlan.4#2 integrate .. //depot/projects/xen31/share/man/man4/wi.4#2 integrate .. //depot/projects/xen31/share/man/man4/xl.4#2 integrate .. //depot/projects/xen31/share/man/man5/fstab.5#2 integrate .. //depot/projects/xen31/share/man/man5/rc.conf.5#4 integrate .. //depot/projects/xen31/share/man/man7/clocks.7#2 integrate .. //depot/projects/xen31/share/man/man7/ports.7#3 integrate .. //depot/projects/xen31/share/man/man9/BUF_ISLOCKED.9#1 branch .. //depot/projects/xen31/share/man/man9/BUF_RECURSED.9#1 branch .. //depot/projects/xen31/share/man/man9/BUF_REFCNT.9#2 delete .. //depot/projects/xen31/share/man/man9/Makefile#6 integrate .. //depot/projects/xen31/share/man/man9/VOP_LOCK.9#4 integrate .. //depot/projects/xen31/share/man/man9/lock.9#4 integrate .. //depot/projects/xen31/share/man/man9/mbuf.9#2 integrate .. //depot/projects/xen31/share/man/man9/pci.9#2 integrate .. //depot/projects/xen31/share/man/man9/style.9#3 integrate .. //depot/projects/xen31/share/misc/bsd-family-tree#4 integrate .. //depot/projects/xen31/share/misc/committers-src.dot#5 integrate .. //depot/projects/xen31/share/misc/pci_vendors#3 integrate .. //depot/projects/xen31/share/mk/bsd.dep.mk#2 integrate .. //depot/projects/xen31/share/mk/bsd.own.mk#4 integrate .. //depot/projects/xen31/share/mklocale/la_LN.US-ASCII.src#2 integrate .. //depot/projects/xen31/share/msgdef/Makefile#2 integrate .. //depot/projects/xen31/share/msgdef/ko_KR.UTF-8.src#1 branch .. //depot/projects/xen31/share/msgdef/ko_KR.eucKR.src#2 integrate .. //depot/projects/xen31/share/zoneinfo/leapseconds#2 integrate .. //depot/projects/xen31/sys/Makefile#2 integrate .. //depot/projects/xen31/sys/amd64/acpica/madt.c#2 integrate .. //depot/projects/xen31/sys/amd64/amd64/busdma_machdep.c#3 integrate .. //depot/projects/xen31/sys/amd64/amd64/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/xen31/sys/amd64/amd64/minidump_machdep.c#2 integrate .. //depot/projects/xen31/sys/amd64/amd64/pmap.c#9 integrate .. //depot/projects/xen31/sys/amd64/conf/GENERIC#7 integrate .. //depot/projects/xen31/sys/amd64/conf/NOTES#6 integrate .. //depot/projects/xen31/sys/amd64/include/_types.h#2 integrate .. //depot/projects/xen31/sys/amd64/include/float.h#2 integrate .. //depot/projects/xen31/sys/amd64/include/proc.h#2 integrate .. //depot/projects/xen31/sys/amd64/include/specialreg.h#3 integrate .. //depot/projects/xen31/sys/amd64/isa/clock.c#3 integrate .. //depot/projects/xen31/sys/amd64/linux32/linux32_machdep.c#2 integrate .. //depot/projects/xen31/sys/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/arm/arm/genassym.c#2 integrate .. //depot/projects/xen31/sys/arm/arm/locore.S#2 integrate .. //depot/projects/xen31/sys/arm/arm/pmap.c#9 integrate .. //depot/projects/xen31/sys/arm/arm/swtch.S#2 integrate .. //depot/projects/xen31/sys/arm/include/asmacros.h#3 integrate .. //depot/projects/xen31/sys/arm/include/atomic.h#4 integrate .. //depot/projects/xen31/sys/arm/include/pmap.h#2 integrate .. //depot/projects/xen31/sys/arm/include/sysarch.h#2 integrate .. //depot/projects/xen31/sys/arm/xscale/ixp425/if_npe.c#3 integrate .. //depot/projects/xen31/sys/boot/Makefile#2 integrate .. //depot/projects/xen31/sys/boot/forth/loader.conf.5#2 integrate .. //depot/projects/xen31/sys/boot/ofw/libofw/ofw_console.c#2 integrate .. //depot/projects/xen31/sys/boot/powerpc/ofw/Makefile#3 integrate .. //depot/projects/xen31/sys/boot/powerpc/ofw/conf.c#2 integrate .. //depot/projects/xen31/sys/boot/powerpc/uboot/Makefile#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/conf.c#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/help.uboot#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/ldscript.powerpc#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/metadata.c#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/start.S#1 branch .. //depot/projects/xen31/sys/boot/powerpc/uboot/version#1 branch .. //depot/projects/xen31/sys/boot/uboot/Makefile#1 branch .. //depot/projects/xen31/sys/boot/uboot/common/Makefile.inc#1 branch .. //depot/projects/xen31/sys/boot/uboot/common/main.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/Makefile#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/api_public.h#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/console.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/copy.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/devicename.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/disk.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/elf_freebsd.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/glue.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/libuboot.h#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/module.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/net.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/reboot.c#1 branch .. //depot/projects/xen31/sys/boot/uboot/lib/time.c#1 branch .. //depot/projects/xen31/sys/cam/cam_periph.c#2 integrate .. //depot/projects/xen31/sys/cam/cam_xpt.c#4 integrate .. //depot/projects/xen31/sys/compat/freebsd32/freebsd32_proto.h#4 integrate .. //depot/projects/xen31/sys/compat/freebsd32/freebsd32_syscall.h#4 integrate .. //depot/projects/xen31/sys/compat/freebsd32/freebsd32_syscalls.c#4 integrate .. //depot/projects/xen31/sys/compat/freebsd32/freebsd32_sysent.c#4 integrate .. //depot/projects/xen31/sys/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/xen31/sys/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/xen31/sys/compat/opensolaris/kern/opensolaris_kmem.c#2 integrate .. //depot/projects/xen31/sys/compat/opensolaris/sys/kmem.h#3 integrate .. //depot/projects/xen31/sys/conf/Makefile.arm#2 integrate .. //depot/projects/xen31/sys/conf/NOTES#10 integrate .. //depot/projects/xen31/sys/conf/files#16 integrate .. //depot/projects/xen31/sys/conf/files.amd64#7 integrate .. //depot/projects/xen31/sys/conf/files.i386#14 integrate .. //depot/projects/xen31/sys/conf/files.powerpc#6 integrate .. //depot/projects/xen31/sys/conf/files.sparc64#3 integrate .. //depot/projects/xen31/sys/conf/kern.post.mk#2 integrate .. //depot/projects/xen31/sys/conf/kern.pre.mk#2 integrate .. //depot/projects/xen31/sys/conf/options#8 integrate .. //depot/projects/xen31/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#4 integrate .. //depot/projects/xen31/sys/ddb/db_capture.c#2 integrate .. //depot/projects/xen31/sys/ddb/db_textdump.c#3 integrate .. //depot/projects/xen31/sys/dev/acpica/acpi.c#2 integrate .. //depot/projects/xen31/sys/dev/acpica/acpi_cpu.c#3 integrate .. //depot/projects/xen31/sys/dev/acpica/acpi_hpet.c#3 integrate .. //depot/projects/xen31/sys/dev/acpica/acpi_hpet.h#1 branch .. //depot/projects/xen31/sys/dev/acpica/acpi_thermal.c#3 integrate .. //depot/projects/xen31/sys/dev/aic7xxx/aic79xx_osm.c#2 integrate .. //depot/projects/xen31/sys/dev/amr/amr.c#5 integrate .. //depot/projects/xen31/sys/dev/amr/amrreg.h#2 integrate .. //depot/projects/xen31/sys/dev/amr/amrvar.h#3 integrate .. //depot/projects/xen31/sys/dev/an/if_an.c#3 integrate .. //depot/projects/xen31/sys/dev/an/if_an_pci.c#2 integrate .. //depot/projects/xen31/sys/dev/an/if_anreg.h#3 integrate .. //depot/projects/xen31/sys/dev/ath/if_ath.c#2 integrate .. //depot/projects/xen31/sys/dev/bfe/if_bfe.c#3 integrate .. //depot/projects/xen31/sys/dev/bfe/if_bfereg.h#2 integrate .. //depot/projects/xen31/sys/dev/bge/if_bge.c#4 integrate .. //depot/projects/xen31/sys/dev/bge/if_bgereg.h#3 integrate .. //depot/projects/xen31/sys/dev/ciss/ciss.c#3 integrate .. //depot/projects/xen31/sys/dev/coretemp/coretemp.c#3 integrate .. //depot/projects/xen31/sys/dev/cxgb/cxgb_main.c#5 integrate .. //depot/projects/xen31/sys/dev/cxgb/cxgb_sge.c#5 integrate .. //depot/projects/xen31/sys/dev/cxgb/sys/cxgb_support.c#3 integrate .. //depot/projects/xen31/sys/dev/cxgb/sys/mvec.h#4 integrate .. //depot/projects/xen31/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#3 integrate .. //depot/projects/xen31/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#2 integrate .. //depot/projects/xen31/sys/dev/drm/drm_drv.c#2 integrate .. //depot/projects/xen31/sys/dev/gem/if_gem.c#3 integrate .. //depot/projects/xen31/sys/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/xen31/sys/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/xen31/sys/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/xen31/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/xen31/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/xen31/sys/dev/if_ndis/if_ndis.c#5 integrate .. //depot/projects/xen31/sys/dev/iscsi/initiator/isc_soc.c#2 integrate .. //depot/projects/xen31/sys/dev/lge/if_lge.c#3 integrate .. //depot/projects/xen31/sys/dev/mfi/mfi.c#3 integrate .. //depot/projects/xen31/sys/dev/mfi/mfireg.h#2 integrate .. //depot/projects/xen31/sys/dev/mii/amphy.c#3 integrate .. //depot/projects/xen31/sys/dev/mii/brgphy.c#2 integrate .. //depot/projects/xen31/sys/dev/mii/miidevs#3 integrate .. //depot/projects/xen31/sys/dev/mii/nsphy.c#3 integrate .. //depot/projects/xen31/sys/dev/mii/nsphyter.c#1 branch .. //depot/projects/xen31/sys/dev/mii/nsphyterreg.h#1 branch .. //depot/projects/xen31/sys/dev/msk/if_msk.c#4 integrate .. //depot/projects/xen31/sys/dev/mxge/if_mxge.c#3 integrate .. //depot/projects/xen31/sys/dev/mxge/if_mxge_var.h#3 integrate .. //depot/projects/xen31/sys/dev/mxge/mxge_lro.c#3 integrate .. //depot/projects/xen31/sys/dev/mxge/rss_eth_z8e.h#2 integrate .. //depot/projects/xen31/sys/dev/mxge/rss_ethp_z8e.h#2 integrate .. //depot/projects/xen31/sys/dev/nfe/if_nfe.c#4 integrate .. //depot/projects/xen31/sys/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/xen31/sys/dev/pci/pci.c#3 integrate .. //depot/projects/xen31/sys/dev/ral/rt2560.c#3 integrate .. //depot/projects/xen31/sys/dev/ral/rt2560reg.h#2 integrate .. //depot/projects/xen31/sys/dev/ral/rt2560var.h#2 integrate .. //depot/projects/xen31/sys/dev/re/if_re.c#8 integrate .. //depot/projects/xen31/sys/dev/rr232x/LICENSE#2 delete .. //depot/projects/xen31/sys/dev/rr232x/README#2 delete .. //depot/projects/xen31/sys/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/xen31/sys/dev/rr232x/array.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/him.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/hptintf.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/xen31/sys/dev/rr232x/ldm.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/list.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/xen31/sys/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/osm.h#2 delete .. //depot/projects/xen31/sys/dev/rr232x/osm_bsd.c#2 delete .. //depot/projects/xen31/sys/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/xen31/sys/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/xen31/sys/dev/sf/if_sf.c#1 branch .. //depot/projects/xen31/sys/dev/sf/if_sfreg.h#1 branch .. //depot/projects/xen31/sys/dev/sf/starfire_rx.h#1 branch .. //depot/projects/xen31/sys/dev/sf/starfire_tx.h#1 branch .. //depot/projects/xen31/sys/dev/sk/if_sk.c#3 integrate .. //depot/projects/xen31/sys/dev/sk/if_skreg.h#2 integrate .. //depot/projects/xen31/sys/dev/stge/if_stge.c#4 integrate .. //depot/projects/xen31/sys/dev/syscons/syscons.c#3 integrate .. //depot/projects/xen31/sys/dev/syscons/syscons.h#3 integrate .. //depot/projects/xen31/sys/dev/ti/if_ti.c#3 integrate .. //depot/projects/xen31/sys/dev/twe/twe.c#2 integrate .. //depot/projects/xen31/sys/dev/usb/ehci.c#3 integrate .. //depot/projects/xen31/sys/dev/usb/if_udav.c#3 integrate .. //depot/projects/xen31/sys/dev/usb/uark.c#2 integrate .. //depot/projects/xen31/sys/dev/usb/uftdi.c#2 integrate .. //depot/projects/xen31/sys/dev/usb/uftdireg.h#2 integrate .. //depot/projects/xen31/sys/dev/usb/usbdi.c#2 integrate .. //depot/projects/xen31/sys/dev/wpi/if_wpi.c#3 integrate .. //depot/projects/xen31/sys/dev/xen/blkfront/blkfront.c#14 edit .. //depot/projects/xen31/sys/dev/xen/netfront/netfront.c#10 edit .. //depot/projects/xen31/sys/fs/cd9660/cd9660_vfsops.c#3 integrate .. //depot/projects/xen31/sys/fs/coda/TODO#2 integrate .. //depot/projects/xen31/sys/fs/coda/cnode.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_fbsd.c#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_io.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_kernel.h#2 delete .. //depot/projects/xen31/sys/fs/coda/coda_namecache.c#2 delete .. //depot/projects/xen31/sys/fs/coda/coda_namecache.h#2 delete .. //depot/projects/xen31/sys/fs/coda/coda_opstats.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_pioctl.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_psdev.c#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_psdev.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_subr.c#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_subr.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_venus.c#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_venus.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_vfsops.c#3 integrate .. //depot/projects/xen31/sys/fs/coda/coda_vfsops.h#2 integrate .. //depot/projects/xen31/sys/fs/coda/coda_vnops.c#3 integrate .. //depot/projects/xen31/sys/fs/coda/coda_vnops.h#2 integrate .. //depot/projects/xen31/sys/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/xen31/sys/fs/hpfs/hpfs_subr.h#3 integrate .. //depot/projects/xen31/sys/fs/hpfs/hpfs_vfsops.c#3 integrate .. //depot/projects/xen31/sys/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/xen31/sys/fs/ntfs/ntfs_subr.c#3 integrate .. //depot/projects/xen31/sys/fs/nullfs/null_vfsops.c#3 integrate .. //depot/projects/xen31/sys/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/xen31/sys/fs/nwfs/nwfs_node.c#3 integrate .. //depot/projects/xen31/sys/fs/smbfs/smbfs_node.c#3 integrate .. //depot/projects/xen31/sys/fs/udf/udf_vfsops.c#4 integrate .. //depot/projects/xen31/sys/fs/unionfs/union_subr.c#5 integrate .. //depot/projects/xen31/sys/geom/geom_disk.c#2 integrate .. //depot/projects/xen31/sys/geom/lvm/g_lvm.c#1 branch .. //depot/projects/xen31/sys/geom/lvm/g_lvm.h#1 branch .. //depot/projects/xen31/sys/gnu/fs/ext2fs/ext2_vfsops.c#4 integrate .. //depot/projects/xen31/sys/gnu/fs/reiserfs/reiserfs_inode.c#3 integrate .. //depot/projects/xen31/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c#2 integrate .. //depot/projects/xen31/sys/gnu/fs/xfs/FreeBSD/xfs_buf.h#2 integrate .. //depot/projects/xen31/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/xen31/sys/i386/conf/GENERIC#7 integrate .. //depot/projects/xen31/sys/i386/conf/NOTES#6 integrate .. //depot/projects/xen31/sys/i386/i386/busdma_machdep.c#3 integrate .. //depot/projects/xen31/sys/i386/i386/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/i386/i386/geode.c#2 integrate .. //depot/projects/xen31/sys/i386/i386/minidump_machdep.c#2 integrate .. //depot/projects/xen31/sys/i386/i386/pmap.c#9 integrate .. //depot/projects/xen31/sys/i386/include/proc.h#2 integrate .. //depot/projects/xen31/sys/i386/isa/clock.c#3 integrate .. //depot/projects/xen31/sys/i386/linux/linux_machdep.c#3 integrate .. //depot/projects/xen31/sys/ia64/conf/GENERIC#4 integrate .. //depot/projects/xen31/sys/ia64/ia64/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/ia64/ia64/locore.S#2 integrate .. //depot/projects/xen31/sys/ia64/ia64/machdep.c#5 integrate .. //depot/projects/xen31/sys/ia64/ia64/pmap.c#5 integrate .. //depot/projects/xen31/sys/ia64/include/md_var.h#2 integrate .. //depot/projects/xen31/sys/kern/genassym.sh#2 integrate .. //depot/projects/xen31/sys/kern/init_sysent.c#3 integrate .. //depot/projects/xen31/sys/kern/kern_descrip.c#5 integrate .. //depot/projects/xen31/sys/kern/kern_exit.c#5 integrate .. //depot/projects/xen31/sys/kern/kern_jail.c#4 integrate .. //depot/projects/xen31/sys/kern/kern_lock.c#6 integrate .. //depot/projects/xen31/sys/kern/kern_mbuf.c#7 integrate .. //depot/projects/xen31/sys/kern/kern_mib.c#4 integrate .. //depot/projects/xen31/sys/kern/kern_module.c#3 integrate .. //depot/projects/xen31/sys/kern/kern_mutex.c#4 integrate .. //depot/projects/xen31/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/xen31/sys/kern/kern_shutdown.c#5 integrate .. //depot/projects/xen31/sys/kern/kern_tc.c#3 integrate .. //depot/projects/xen31/sys/kern/kern_time.c#2 integrate .. //depot/projects/xen31/sys/kern/kern_timeout.c#3 integrate .. //depot/projects/xen31/sys/kern/sched_ule.c#7 integrate .. //depot/projects/xen31/sys/kern/subr_autoconf.c#2 integrate .. //depot/projects/xen31/sys/kern/subr_bus.c#4 integrate .. //depot/projects/xen31/sys/kern/subr_lock.c#6 integrate .. //depot/projects/xen31/sys/kern/subr_sleepqueue.c#3 integrate .. //depot/projects/xen31/sys/kern/subr_turnstile.c#3 integrate .. //depot/projects/xen31/sys/kern/syscalls.c#3 integrate .. //depot/projects/xen31/sys/kern/syscalls.master#3 integrate .. //depot/projects/xen31/sys/kern/systrace_args.c#3 integrate .. //depot/projects/xen31/sys/kern/sysv_shm.c#3 integrate .. //depot/projects/xen31/sys/kern/tty_pty.c#4 integrate .. //depot/projects/xen31/sys/kern/uipc_cow.c#2 integrate .. //depot/projects/xen31/sys/kern/uipc_mbuf.c#2 integrate .. //depot/projects/xen31/sys/kern/uipc_shm.c#2 integrate .. //depot/projects/xen31/sys/kern/uipc_sockbuf.c#3 integrate .. //depot/projects/xen31/sys/kern/uipc_socket.c#3 integrate .. //depot/projects/xen31/sys/kern/uipc_syscalls.c#5 integrate .. //depot/projects/xen31/sys/kern/uipc_usrreq.c#5 integrate .. //depot/projects/xen31/sys/kern/vfs_aio.c#3 integrate .. //depot/projects/xen31/sys/kern/vfs_bio.c#5 integrate .. //depot/projects/xen31/sys/kern/vfs_default.c#3 integrate .. //depot/projects/xen31/sys/kern/vfs_mount.c#7 integrate .. //depot/projects/xen31/sys/kern/vfs_subr.c#6 integrate .. //depot/projects/xen31/sys/kern/vfs_syscalls.c#5 integrate .. //depot/projects/xen31/sys/modules/Makefile#5 integrate .. //depot/projects/xen31/sys/modules/coda/Makefile#2 integrate .. //depot/projects/xen31/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/xen31/sys/modules/cxgb/cxgb/Makefile#3 integrate .. //depot/projects/xen31/sys/modules/geom/Makefile#3 integrate .. //depot/projects/xen31/sys/modules/geom/geom_lvm/Makefile#1 branch .. //depot/projects/xen31/sys/modules/mii/Makefile#2 integrate .. //depot/projects/xen31/sys/modules/rr232x/Makefile#2 delete .. //depot/projects/xen31/sys/modules/sf/Makefile#2 integrate .. //depot/projects/xen31/sys/net/bpf.c#4 integrate .. //depot/projects/xen31/sys/net/if_bridge.c#4 integrate .. //depot/projects/xen31/sys/net/route.c#6 integrate .. //depot/projects/xen31/sys/net80211/ieee80211_ht.c#4 integrate .. //depot/projects/xen31/sys/net80211/ieee80211_ht.h#3 integrate .. //depot/projects/xen31/sys/net80211/ieee80211_input.c#3 integrate .. //depot/projects/xen31/sys/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/xen31/sys/netgraph/netflow/ng_netflow.c#2 integrate .. //depot/projects/xen31/sys/netgraph/netgraph.h#3 integrate .. //depot/projects/xen31/sys/netgraph/ng_base.c#5 integrate .. //depot/projects/xen31/sys/netgraph/ng_bpf.c#2 integrate .. //depot/projects/xen31/sys/netgraph/ng_iface.c#2 integrate .. //depot/projects/xen31/sys/netgraph/ng_ppp.c#2 integrate .. //depot/projects/xen31/sys/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/xen31/sys/netgraph/ng_pred1.c#2 integrate .. //depot/projects/xen31/sys/netgraph/ng_tee.c#2 integrate .. //depot/projects/xen31/sys/netinet/in.c#2 integrate .. //depot/projects/xen31/sys/netinet/in_rmx.c#2 integrate .. //depot/projects/xen31/sys/netinet/ip_carp.c#2 integrate .. //depot/projects/xen31/sys/netinet/ip_fw.h#2 integrate .. //depot/projects/xen31/sys/netinet/ip_fw2.c#5 integrate .. //depot/projects/xen31/sys/netinet/ip_id.c#2 integrate .. //depot/projects/xen31/sys/netinet/ip_options.c#3 integrate .. //depot/projects/xen31/sys/netinet/ip_output.c#3 integrate .. //depot/projects/xen31/sys/netinet/sctp_auth.c#2 integrate .. //depot/projects/xen31/sys/netinet/sctp_bsd_addr.c#3 integrate .. //depot/projects/xen31/sys/netinet/sctp_indata.c#3 integrate .. //depot/projects/xen31/sys/netinet/sctp_input.c#2 integrate .. //depot/projects/xen31/sys/netinet/sctp_pcb.c#3 integrate .. //depot/projects/xen31/sys/netinet/sctp_peeloff.c#2 integrate .. //depot/projects/xen31/sys/netinet/sctputil.c#6 integrate .. //depot/projects/xen31/sys/netinet/tcp_usrreq.c#3 integrate .. //depot/projects/xen31/sys/netinet6/in6.c#5 integrate .. //depot/projects/xen31/sys/netinet6/in6_src.c#4 integrate .. //depot/projects/xen31/sys/netinet6/ip6_output.c#5 integrate .. //depot/projects/xen31/sys/netinet6/ip6_var.h#3 integrate .. //depot/projects/xen31/sys/netinet6/raw_ip6.c#4 integrate .. //depot/projects/xen31/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/xen31/sys/netipsec/ipsec.c#3 integrate .. //depot/projects/xen31/sys/netipsec/ipsec.h#3 integrate .. //depot/projects/xen31/sys/netipsec/ipsec6.h#2 integrate .. //depot/projects/xen31/sys/netncp/ncp_conn.c#2 integrate .. //depot/projects/xen31/sys/netsmb/smb_conn.c#2 integrate .. //depot/projects/xen31/sys/nfs4client/nfs4_idmap.c#2 integrate .. //depot/projects/xen31/sys/nfs4client/nfs4_vfsops.c#3 integrate .. //depot/projects/xen31/sys/nfs4client/nfs4_vnops.c#3 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_bio.c#2 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_diskless.c#2 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_node.c#2 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_subs.c#3 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_vfsops.c#4 integrate .. //depot/projects/xen31/sys/nfsclient/nfs_vnops.c#4 integrate .. //depot/projects/xen31/sys/nfsclient/nfsm_subs.h#2 integrate .. //depot/projects/xen31/sys/nfsclient/nfsnode.h#2 integrate .. //depot/projects/xen31/sys/nfsserver/nfs_srvsubs.c#4 integrate .. //depot/projects/xen31/sys/pci/amdsmb.c#2 integrate .. //depot/projects/xen31/sys/pci/if_sf.c#3 delete .. //depot/projects/xen31/sys/pci/if_sfreg.h#2 delete .. //depot/projects/xen31/sys/pci/if_wb.c#2 integrate .. //depot/projects/xen31/sys/pci/nfsmb.c#3 integrate .. //depot/projects/xen31/sys/powerpc/aim/machdep.c#3 integrate .. //depot/projects/xen31/sys/powerpc/aim/ofw_machdep.c#3 integrate .. //depot/projects/xen31/sys/powerpc/conf/GENERIC#6 integrate .. //depot/projects/xen31/sys/powerpc/conf/NOTES#4 integrate .. //depot/projects/xen31/sys/powerpc/include/intr_machdep.h#2 integrate .. //depot/projects/xen31/sys/powerpc/include/openpicreg.h#2 integrate .. //depot/projects/xen31/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/xen31/sys/powerpc/powermac/ata_kauai.c#2 integrate .. //depot/projects/xen31/sys/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/xen31/sys/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/xen31/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/xen31/sys/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/xen31/sys/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/xen31/sys/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/xen31/sys/security/audit/audit.c#5 integrate .. //depot/projects/xen31/sys/security/audit/audit_bsm.c#4 integrate .. //depot/projects/xen31/sys/security/mac_mls/mac_mls.c#5 integrate .. //depot/projects/xen31/sys/sparc64/conf/GENERIC#5 integrate .. //depot/projects/xen31/sys/sparc64/include/md_var.h#2 integrate .. //depot/projects/xen31/sys/sparc64/sparc64/ata_machdep.c#1 branch .. //depot/projects/xen31/sys/sparc64/sparc64/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/sun4v/sun4v/dump_machdep.c#2 integrate .. //depot/projects/xen31/sys/sys/buf.h#3 integrate .. //depot/projects/xen31/sys/sys/bus.h#2 integrate .. //depot/projects/xen31/sys/sys/conf.h#2 integrate .. //depot/projects/xen31/sys/sys/event.h#2 integrate .. //depot/projects/xen31/sys/sys/ipc.h#2 integrate .. //depot/projects/xen31/sys/sys/lock.h#4 integrate .. //depot/projects/xen31/sys/sys/lockmgr.h#5 integrate .. //depot/projects/xen31/sys/sys/mbuf.h#4 integrate .. //depot/projects/xen31/sys/sys/module.h#2 integrate .. //depot/projects/xen31/sys/sys/param.h#12 integrate .. //depot/projects/xen31/sys/sys/priv.h#3 integrate .. //depot/projects/xen31/sys/sys/proc.h#8 integrate .. //depot/projects/xen31/sys/sys/rwlock.h#2 integrate .. //depot/projects/xen31/sys/sys/shm.h#2 integrate .. //depot/projects/xen31/sys/sys/signal.h#3 integrate .. //depot/projects/xen31/sys/sys/socket.h#3 integrate .. //depot/projects/xen31/sys/sys/socketvar.h#3 integrate .. //depot/projects/xen31/sys/sys/syscall.h#3 integrate .. //depot/projects/xen31/sys/sys/syscall.mk#3 integrate .. //depot/projects/xen31/sys/sys/syscallsubr.h#3 integrate .. //depot/projects/xen31/sys/sys/sysproto.h#3 integrate .. //depot/projects/xen31/sys/sys/time.h#3 integrate .. //depot/projects/xen31/sys/sys/user.h#3 integrate .. //depot/projects/xen31/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/xen31/sys/ufs/ffs/ffs_snapshot.c#4 integrate .. //depot/projects/xen31/sys/ufs/ffs/ffs_vfsops.c#4 integrate .. //depot/projects/xen31/sys/ufs/ffs/ffs_vnops.c#5 integrate .. //depot/projects/xen31/sys/ufs/ufs/ufs_extattr.c#3 integrate .. //depot/projects/xen31/tools/build/Makefile#2 integrate .. //depot/projects/xen31/tools/build/mk/OptionalObsoleteFiles.inc#2 integrate .. //depot/projects/xen31/tools/regression/lib/msun/Makefile#3 integrate .. //depot/projects/xen31/tools/regression/lib/msun/test-exponential.c#1 branch .. //depot/projects/xen31/tools/regression/lib/msun/test-exponential.t#1 branch .. //depot/projects/xen31/tools/regression/lib/msun/test-trig.c#1 branch .. //depot/projects/xen31/tools/regression/lib/msun/test-trig.t#1 branch .. //depot/projects/xen31/tools/regression/netinet/ip_id_period/ip_id_period.py#1 branch .. //depot/projects/xen31/tools/regression/posixshm/Makefile#1 branch .. //depot/projects/xen31/tools/regression/posixshm/posixshm.c#1 branch .. //depot/projects/xen31/tools/regression/posixshm/posixshm.t#1 branch .. //depot/projects/xen31/tools/regression/posixshm/test.c#1 branch .. //depot/projects/xen31/tools/regression/posixshm/test.h#1 branch .. //depot/projects/xen31/tools/regression/pthread/mutex_isowned_np/Makefile#1 branch .. //depot/projects/xen31/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c#1 branch .. //depot/projects/xen31/tools/regression/security/open_to_operation/Makefile#1 branch .. //depot/projects/xen31/tools/regression/security/open_to_operation/open_to_operation.c#1 branch .. //depot/projects/xen31/tools/regression/sockets/unix_sorflush/Makefile#1 branch .. //depot/projects/xen31/tools/regression/sockets/unix_sorflush/unix_sorflush.c#1 branch .. //depot/projects/xen31/tools/sched/schedgraph.py#5 integrate .. //depot/projects/xen31/tools/tools/aac/aac_checkq.c#2 integrate .. //depot/projects/xen31/tools/tools/crypto/cryptostats.c#2 integrate .. //depot/projects/xen31/tools/tools/crypto/cryptotest.c#2 integrate .. //depot/projects/xen31/usr.bin/calendar/calendars/calendar.freebsd#5 integrate .. //depot/projects/xen31/usr.bin/file/Makefile#2 integrate .. //depot/projects/xen31/usr.bin/file/file.1#2 delete .. //depot/projects/xen31/usr.bin/file/magic.5#2 delete .. //depot/projects/xen31/usr.bin/fstat/Makefile#3 integrate .. //depot/projects/xen31/usr.bin/fstat/zfs/Makefile#3 integrate .. //depot/projects/xen31/usr.bin/gzip/znew#2 integrate .. //depot/projects/xen31/usr.bin/kdump/Makefile#2 integrate .. //depot/projects/xen31/usr.bin/kdump/mkioctls#2 integrate .. //depot/projects/xen31/usr.bin/kdump/mksubr#2 integrate .. //depot/projects/xen31/usr.bin/logger/logger.c#2 integrate .. //depot/projects/xen31/usr.bin/ministat/ministat.c#2 integrate .. //depot/projects/xen31/usr.bin/mklocale/mklocale.1#2 integrate .. //depot/projects/xen31/usr.bin/mklocale/yacc.y#2 integrate .. //depot/projects/xen31/usr.bin/mt/mt.1#2 integrate .. //depot/projects/xen31/usr.bin/netstat/netstat.h#3 integrate .. //depot/projects/xen31/usr.bin/netstat/route.c#4 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat.c#2 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat_basic.c#2 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat_files.c#3 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat_kstack.c#3 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat_threads.c#3 integrate .. //depot/projects/xen31/usr.bin/procstat/procstat_vm.c#2 integrate .. //depot/projects/xen31/usr.bin/quota/quota.c#2 integrate .. //depot/projects/xen31/usr.bin/sed/compile.c#2 integrate .. //depot/projects/xen31/usr.bin/sed/defs.h#2 integrate .. //depot/projects/xen31/usr.bin/sed/main.c#3 integrate .. //depot/projects/xen31/usr.bin/sed/process.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/cmds.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/convtbl.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/devs.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/fetch.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/icmp.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/icmp6.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/iostat.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/ip.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/ip6.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/keyboard.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/main.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/mbufs.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/netcmds.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/netstat.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/pigs.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/swap.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/tcp.c#2 integrate .. //depot/projects/xen31/usr.bin/systat/vmstat.c#2 integrate .. //depot/projects/xen31/usr.bin/tar/bsdtar.1#3 integrate .. //depot/projects/xen31/usr.bin/tar/bsdtar.c#3 integrate .. //depot/projects/xen31/usr.bin/top/machine.c#4 integrate .. //depot/projects/xen31/usr.bin/truss/Makefile#2 integrate .. //depot/projects/xen31/usr.bin/uniq/uniq.c#2 integrate .. //depot/projects/xen31/usr.bin/vmstat/vmstat.c#3 integrate .. //depot/projects/xen31/usr.bin/xargs/xargs.1#2 integrate .. //depot/projects/xen31/usr.sbin/Makefile#3 integrate .. //depot/projects/xen31/usr.sbin/adduser/adduser.8#2 integrate .. //depot/projects/xen31/usr.sbin/adduser/adduser.sh#2 integrate .. //depot/projects/xen31/usr.sbin/bootparamd/Makefile#2 integrate .. //depot/projects/xen31/usr.sbin/bootparamd/Makefile.inc#2 integrate .. //depot/projects/xen31/usr.sbin/bootparamd/bootparamd/bootparamd.c#3 integrate .. //depot/projects/xen31/usr.sbin/bootparamd/bootparamd/main.c#3 integrate .. //depot/projects/xen31/usr.sbin/iostat/iostat.c#4 integrate .. //depot/projects/xen31/usr.sbin/kbdcontrol/kbdcontrol.1#2 integrate .. //depot/projects/xen31/usr.sbin/kbdcontrol/kbdmap.5#2 integrate .. //depot/projects/xen31/usr.sbin/newsyslog/newsyslog.c#2 integrate .. //depot/projects/xen31/usr.sbin/ofwdump/Makefile#2 integrate .. //depot/projects/xen31/usr.sbin/ofwdump/ofwdump.8#2 integrate .. //depot/projects/xen31/usr.sbin/pkg_install/add/pkg_add.1#5 integrate .. //depot/projects/xen31/usr.sbin/portsnap/phttpget/phttpget.c#2 integrate .. //depot/projects/xen31/usr.sbin/pw/pw.8#2 integrate .. //depot/projects/xen31/usr.sbin/rpcbind/rpcbind.c#4 integrate .. //depot/projects/xen31/usr.sbin/setfmac/setfmac.c#2 integrate .. //depot/projects/xen31/usr.sbin/sysinstall/disks.c#2 integrate .. //depot/projects/xen31/usr.sbin/sysinstall/menus.c#4 integrate .. //depot/projects/xen31/usr.sbin/timed/timed/timed.8#3 integrate .. //depot/projects/xen31/usr.sbin/traceroute6/traceroute6.8#2 integrate .. //depot/projects/xen31/usr.sbin/traceroute6/traceroute6.c#4 integrate .. //depot/projects/xen31/usr.sbin/watch/watch.c#2 integrate .. //depot/projects/xen31/usr.sbin/ypserv/yp_main.c#2 integrate .. //depot/projects/xen31/usr.sbin/ypserv/ypserv.8#2 integrate Differences ... ==== //depot/projects/xen31/LOCKS#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/LOCKS,v 1.3 2006/01/13 06:51:43 ru Exp $ +$FreeBSD: src/LOCKS,v 1.4 2008/01/24 22:07:03 cperciva Exp $ This file documents formal review/approval requirements that have been approved by core. @@ -10,3 +10,4 @@ src/* RELENG_4_* Requires Security Officer approval. src/* RELENG_5_* Requires Security Officer approval. src/* RELENG_6_* Requires Security Officer approval. +src/* RELENG_7_* Requires Security Officer approval. ==== //depot/projects/xen31/MAINTAINERS#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.145 2007/05/23 21:47:19 jfv Exp $ +$FreeBSD: src/MAINTAINERS,v 1.146 2008/01/26 21:58:52 brueffer Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -33,7 +33,6 @@ ahc(4) gibbs Pre-commit review requested. ahd(4) gibbs Pre-commit review requested. NEWCARD imp Pre-commit review requested. -OLDCARD imp Pre-commit review requested. pci bus imp,jhb Pre-commit review requested. cdboot jhb Pre-commit review requested. pxeboot jhb Pre-commit review requested. ==== //depot/projects/xen31/Makefile#3 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.344 2007/12/13 00:08:02 imp Exp $ +# $FreeBSD: src/Makefile,v 1.345 2008/01/30 19:33:18 jhb Exp $ # # The user-driven targets are: # @@ -75,6 +75,8 @@ # developer convenience only. They are intentionally not documented and # completely subject to change without notice. # +# For more information, see the build(7) manual page. +# TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ ==== //depot/projects/xen31/Makefile.inc1#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.591 2007/12/04 12:55:27 yar Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.598 2008/02/05 15:41:58 des Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -227,7 +227,7 @@ # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - -DWITHOUT_FORTRAN -DWITHOUT_GDB + -DWITHOUT_GDB # world stage WMAKEENV= ${CROSSENV} \ @@ -313,8 +313,9 @@ .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These two can depend on any header file. +# XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ @@ -841,8 +842,8 @@ # legacy: Build compatibility shims for the next three targets # legacy: -.if ${BOOTSTRAPPING} < 503000 - @echo "ERROR: Source upgrades from versions prior to 5.3 not supported."; \ +.if ${BOOTSTRAPPING} < 600034 && ${BOOTSTRAPPING} != 0 + @echo "ERROR: Source upgrades from versions prior to 6.0 not supported."; \ false .endif .for _tool in tools/build @@ -871,26 +872,6 @@ .endif .endif -.if ${BOOTSTRAPPING} < 600029 -_texinfo= gnu/usr.bin/texinfo -.endif - -.if ${BOOTSTRAPPING} < 600015 -_cap_mkdb= usr.bin/cap_mkdb -.endif - -.if ${BOOTSTRAPPING} < 600018 -_colldef= usr.bin/colldef -.endif - -.if ${BOOTSTRAPPING} < 600017 -_gencat= usr.bin/gencat -.endif - -.if ${BOOTSTRAPPING} < 600016 -_mklocale= usr.bin/mklocale -.endif - .if ${BOOTSTRAPPING} < 700018 _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif @@ -900,28 +881,23 @@ _crunchgen= usr.sbin/crunch/crunchgen .endif -.if ${BOOTSTRAPPING} < 600020 -_pwd_mkdb= usr.sbin/pwd_mkdb +.if ${BOOTSTRAPPING} < 800013 +_mklocale= usr.bin/mklocale .endif bootstrap-tools: .for _tool in \ + ${_mklocale} \ ${_strfile} \ ${_gperf} \ ${_groff} \ - ${_texinfo} \ - ${_cap_mkdb} \ - ${_colldef} \ - ${_gencat} \ usr.bin/lorder \ usr.bin/makewhatis \ - ${_mklocale} \ usr.bin/rpcgen \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ - ${_crunchgen} \ - ${_pwd_mkdb} + ${_crunchgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ==== //depot/projects/xen31/ObsoleteFiles.inc#9 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.125 2008/01/11 13:41:31 jhb Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.130 2008/02/06 19:45:25 delphij Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20080126: oldcard.4 removal +OLD_FILES+=usr/share/man/man4/card.4.gz +OLD_FILES+=usr/share/man/man4/oldcard.4.gz +# 20080122: Removed from the tree +OLD_FILES+=usr/share/man/man9/BUF_REFCNT.9.gz # 20080108: Moved to section 2 OLD_FILES+=usr/share/man/man3/shm_open.3.gz OLD_FILES+=usr/share/man/man3/shm_unlink.3.gz @@ -3940,7 +3945,9 @@ .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif +.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz ==== //depot/projects/xen31/UPDATING#4 (text+ko) ==== @@ -19,7 +19,37 @@ related kernel options, INVARIANTS, malloc debugging flags in userland, and various verbose features in the kernel. Many developers choose to disable these features on build machines - to maximize performance. + to maximize performance. (To disable malloc debugging, run + ln -s aj /etc/malloc.conf.) + +20080211: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Feb 18 03:44:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1FDD616A421; Mon, 18 Feb 2008 03:44:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B7B16A41B for ; Mon, 18 Feb 2008 03:44:03 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A5D8213C469 for ; Mon, 18 Feb 2008 03:44:03 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I3i3n3030317 for ; Mon, 18 Feb 2008 03:44:03 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I3i3M3030305 for perforce@freebsd.org; Mon, 18 Feb 2008 03:44:03 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 03:44:03 GMT Message-Id: <200802180344.m1I3i3M3030305@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135620 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 03:44:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=135620 Change 135620 by imp@imp_lighthouse on 2008/02/18 03:43:22 IDT builds again. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idt_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/idt/idt_machdep.c#3 (text+ko) ==== @@ -141,7 +141,7 @@ init_param1(); /* TODO: parse argc,argv */ platform_counter_freq = 330000000UL; - tick_init_params(platform_counter_freq, 1); + mips_timer_init_params(platform_counter_freq, 1); cninit(); init_param2(physmem); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 04:35:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 53C4616A421; Mon, 18 Feb 2008 04:35:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FDE16A419 for ; Mon, 18 Feb 2008 04:35:00 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F3CE713C43E for ; Mon, 18 Feb 2008 04:34:59 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I4Yxw4037336 for ; Mon, 18 Feb 2008 04:34:59 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I4YxJD037333 for perforce@freebsd.org; Mon, 18 Feb 2008 04:34:59 GMT (envelope-from marcel@freebsd.org) Date: Mon, 18 Feb 2008 04:34:59 GMT Message-Id: <200802180434.m1I4YxJD037333@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135623 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 04:35:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135623 Change 135623 by marcel@marcel_xcllnt on 2008/02/18 04:34:45 Use uboot_address as the basis for where we start looking for the API signature. We search the 1MB of memory (aligned) in which uboot_address points. If uboot_address is 0, we search the last 1MB of memory, assuming 256MB of RAM. Affected files ... .. //depot/projects/e500/sys/boot/uboot/lib/glue.c#5 edit Differences ... ==== //depot/projects/e500/sys/boot/uboot/lib/glue.c#5 (text+ko) ==== @@ -71,6 +71,8 @@ extern int syscall(int, int *, ...); +/* Some random address used by U-Boot. */ +extern long uboot_address; /* crc32 stuff stolen from lib/libdisk/write_ia64_disk.c */ static uint32_t crc32_tab[] = { @@ -158,10 +160,6 @@ return 1; } -#define API_SEARCH_START (255*1024*1024) /* start at 1MB below the RAM top */ -//#define API_SEARCH_START 0 -#define API_SEARCH_END (256 * 1024 * 1024 - 1) /* ...and search to the end */ - /* * Searches for the U-Boot API signature * @@ -169,14 +167,17 @@ */ int api_search_sig(struct api_signature **sig) { - unsigned char *sp; + unsigned char *sp, *spend; if (sig == NULL) return 0; - sp = (unsigned char *)API_SEARCH_START; + if (uboot_address == 0) + uboot_address = 255 * 1024 * 1024; - while ((sp + (int)API_SIG_MAGLEN) < (unsigned char *)API_SEARCH_END) { + sp = (void *)(uboot_address & ~0x000fffff); + spend = sp + 0x00100000 - API_SIG_MAGLEN; + while (sp < spend) { if (!bcmp(sp, API_SIG_MAGIC, API_SIG_MAGLEN)) { *sig = (struct api_signature *)sp; if (valid_sig(*sig)) From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:03:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B26416A46E; Mon, 18 Feb 2008 05:03:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3795A16A421 for ; Mon, 18 Feb 2008 05:03:32 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 214B213C469 for ; Mon, 18 Feb 2008 05:03:32 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I53VK8048503 for ; Mon, 18 Feb 2008 05:03:31 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I53VOI048500 for perforce@freebsd.org; Mon, 18 Feb 2008 05:03:31 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 05:03:31 GMT Message-Id: <200802180503.m1I53VOI048500@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135624 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:03:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=135624 Change 135624 by kmacy@pandemonium:kmacy:xen31 on 2008/02/18 05:03:22 add compatibility hypercall support Affected files ... .. //depot/projects/xen31/sys/i386/include/cpufunc.h#7 edit .. //depot/projects/xen31/sys/i386/include/pmap.h#11 edit .. //depot/projects/xen31/sys/i386/include/xen/hypercall.h#8 edit .. //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#6 edit .. //depot/projects/xen31/sys/i386/include/xen/xen-os.h#6 edit .. //depot/projects/xen31/sys/kern/subr_kdb.c#4 edit .. //depot/projects/xen31/sys/xen/features.c#2 edit Differences ... ==== //depot/projects/xen31/sys/i386/include/cpufunc.h#7 (text+ko) ==== @@ -45,7 +45,6 @@ #ifdef XEN #include #define NO_EXCHANGE -#include #include #include #include ==== //depot/projects/xen31/sys/i386/include/pmap.h#11 (text+ko) ==== @@ -194,7 +194,6 @@ #ifdef XEN -#include #include #include #include ==== //depot/projects/xen31/sys/i386/include/xen/hypercall.h#8 (text+ko) ==== @@ -30,11 +30,14 @@ #ifndef __HYPERCALL_H__ #define __HYPERCALL_H__ +#include #include #include #define __STR(x) #x #define STR(x) __STR(x) +#define ENOXENSYS 38 + #if defined(XEN) #define HYPERCALL_STR(name) \ @@ -171,6 +174,13 @@ return _hypercall1(int, fpu_taskswitch, set); } +static inline int +HYPERVISOR_sched_op_compat( + int cmd, unsigned long arg) +{ + return _hypercall2(int, sched_op_compat, cmd, arg); +} + static inline int HYPERVISOR_sched_op( int cmd, void *arg) @@ -245,9 +255,19 @@ static inline int HYPERVISOR_event_channel_op( - int cmd, void *op) + int cmd, void *arg) { - return _hypercall2(int, event_channel_op, cmd, op); + int rc = _hypercall2(int, event_channel_op, cmd, arg); + + if (__predict_false(rc == -ENOXENSYS)) { + struct evtchn_op op; + op.cmd = cmd; + memcpy(&op.u, arg, sizeof(op.u)); + rc = _hypercall1(int, event_channel_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); + } + + return (rc); } static inline int @@ -266,9 +286,19 @@ static inline int HYPERVISOR_physdev_op( - int cmd, void *physdev_op) + int cmd, void *arg) { - return _hypercall2(int, physdev_op, cmd, physdev_op); + int rc = _hypercall2(int, physdev_op, cmd, arg); + + if (__predict_false(rc == -ENOXENSYS)) { + struct physdev_op op; + op.cmd = cmd; + memcpy(&op.u, arg, sizeof(op.u)); + rc = _hypercall1(int, physdev_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); + } + + return (rc); } static inline int @@ -312,10 +342,13 @@ struct sched_shutdown sched_shutdown = { .reason = SHUTDOWN_suspend }; - return _hypercall3(int, sched_op, SCHEDOP_shutdown, + int rc = _hypercall3(int, sched_op, SCHEDOP_shutdown, &sched_shutdown, srec); + if (rc == -ENOXENSYS) + rc = _hypercall3(int, sched_op_compat, SCHEDOP_shutdown, + SHUTDOWN_suspend, srec); + return (rc); } -#ifdef notyet static inline int HYPERVISOR_nmi_op( unsigned long op, void *arg) @@ -323,6 +356,7 @@ return _hypercall2(int, nmi_op, op, arg); } +#ifdef notyet static inline unsigned long HYPERVISOR_hvm_op( int op, void *arg) ==== //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#6 (text+ko) ==== @@ -16,6 +16,7 @@ #endif #include +#include #include #include #include ==== //depot/projects/xen31/sys/i386/include/xen/xen-os.h#6 (text+ko) ==== @@ -4,10 +4,14 @@ * random collection of macros and definition */ -#ifndef _OS_H_ -#define _OS_H_ +#ifndef _XEN_OS_H_ +#define _XEN_OS_H_ #include +#ifdef PAE +#define CONFIG_X86_PAE +#endif +#include /* Force a proper event-channel callback from Xen. */ void force_evtchn_callback(void); @@ -70,7 +74,6 @@ /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ #include -#include void printk(const char *fmt, ...); ==== //depot/projects/xen31/sys/kern/subr_kdb.c#4 (text+ko) ==== @@ -306,6 +306,7 @@ */ #ifdef XEN #include /* needed for btext/etext */ +#include #endif void kdb_enter(const char *why, const char *msg) ==== //depot/projects/xen31/sys/xen/features.c#2 (text+ko) ==== @@ -1,3 +1,4 @@ +#include #include #include From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:33:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8FB8116A41B; Mon, 18 Feb 2008 05:33:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D48416A419 for ; Mon, 18 Feb 2008 05:33:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 29F7C13C44B for ; Mon, 18 Feb 2008 05:33:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I5X2bw050521 for ; Mon, 18 Feb 2008 05:33:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I5X1HS050518 for perforce@freebsd.org; Mon, 18 Feb 2008 05:33:01 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 05:33:01 GMT Message-Id: <200802180533.m1I5X1HS050518@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135625 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:33:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135625 Change 135625 by imp@imp_lighthouse on 2008/02/18 05:33:00 make bfe compile for SENTRY5. Note: other problems keep it from compiling. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfe.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfereg.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfe.c#2 (text+ko) ==== ==== //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfereg.h#2 (text+ko) ==== @@ -544,7 +544,7 @@ int bfe_detach(device_t); int bfe_suspend(device_t); int bfe_resume(device_t); -void bfe_shutdown(device_t); +static int bfe_shutdown(device_t); int bfe_miibus_readreg(device_t, int, int); int bfe_miibus_writereg(device_t, int, int, int); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:34:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C52016A468; Mon, 18 Feb 2008 05:34:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A8E16A41A for ; Mon, 18 Feb 2008 05:34:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F19AA13C468 for ; Mon, 18 Feb 2008 05:34:03 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I5Y3V7050601 for ; Mon, 18 Feb 2008 05:34:03 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I5Y3Vh050598 for perforce@freebsd.org; Mon, 18 Feb 2008 05:34:03 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 05:34:03 GMT Message-Id: <200802180534.m1I5Y3Vh050598@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135626 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:34:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=135626 Change 135626 by imp@imp_lighthouse on 2008/02/18 05:33:20 ISA_MIPS32 Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/SENTRY5#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/sentry5/files.sentry5#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/SENTRY5#2 (text+ko) ==== @@ -1,6 +1,6 @@ # # $FreeBSD$ -# $P4: //depot/projects/mips2-jnpr/src/sys/mips/conf/SENTRY5#1 $ +# $P4: //depot/projects/mips2-jnpr/src/sys/mips/conf/SENTRY5#2 $ # # The Broadcom Sentry5 series of processors and boards is very commonly # used in COTS hardware including the Netgear WGT634U. @@ -27,8 +27,9 @@ machine mips ident SENTRY5 -cpu CPU_MIPS4KC # XXX MIPS32? +cpu CPU_MIPS4KC options CPU_NOFPU +options ISA_MIPS32 options CPU_SENTRY5 # XXX should this be a # sub-cpu option? ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/sentry5/files.sentry5#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:40:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3144316A46C; Mon, 18 Feb 2008 05:40:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3C116A421 for ; Mon, 18 Feb 2008 05:40:09 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D5FBA13C457 for ; Mon, 18 Feb 2008 05:40:09 +0000 (UTC) (envelope-from alm@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I5e9xf051037 for ; Mon, 18 Feb 2008 05:40:09 GMT (envelope-from alm@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I5e96E051034 for perforce@freebsd.org; Mon, 18 Feb 2008 05:40:09 GMT (envelope-from alm@freebsd.org) Date: Mon, 18 Feb 2008 05:40:09 GMT Message-Id: <200802180540.m1I5e96E051034@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alm@freebsd.org using -f From: Aaron Meihm To: Perforce Change Reviews Cc: Subject: PERFORCE change 135627 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:40:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=135627 Change 135627 by alm@alm_praetorian on 2008/02/18 05:39:14 Various code cleanup. Introduce srcbuffer struct for incoming records from network peers. Affected files ... .. //depot/projects/trustedbsd/netauditd/netauditd.c#5 edit .. //depot/projects/trustedbsd/netauditd/netauditd.conf#3 edit .. //depot/projects/trustedbsd/netauditd/netauditd.h#3 edit Differences ... ==== //depot/projects/trustedbsd/netauditd/netauditd.c#5 (text+ko) ==== @@ -112,7 +112,7 @@ TAILQ_REMOVE(&ptr->ac_oq, a, aq_glue); a->aq_ptr->ar_refcount--; if (a->aq_ptr->ar_refcount == 0) { - free(a->aq_ptr->ar_sbuf); + free(a->aq_ptr->ar_rec); free(a->aq_ptr); } free(a); @@ -242,33 +242,6 @@ return (0); } -int -conf_parse_dst_net(args_t *a) -{ - struct addrinfo hints; - struct au_cmpnt *new; - int error; - - new = malloc(sizeof(struct au_cmpnt)); - if (new == NULL) - exit(2); - memset(new, 0, sizeof(struct au_cmpnt)); - if ((new->ac_name = strdup(a->args[1])) == NULL) - exit(2); - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - error = getaddrinfo(a->args[3], a->args[4], &hints, &new->ac_ainfo); - if (error) - return (-1); - new->ac_type = NETAUDIT_DST_NET; - if (conf_link_consumers(new, a, 5) == -1) - return (-1); - TAILQ_INIT(&new->ac_oq); - TAILQ_INSERT_TAIL(&au_dstlist, new, ac_glue); - return (0); -} - args_t * conf_parse_args(char *buf) { @@ -422,6 +395,9 @@ if (au->ac_fd == -1) err(1, "%s", au->ac_path); break; + case NETAUDIT_SRC_NET: + netaudit_socket_listen(au); + break; default: exit(2); } @@ -514,8 +490,8 @@ dprintf("consumer %s running output queue\n", au->ac_name); r = q->aq_ptr; - s = r->ar_sbuflen - q->aq_remain; - ret = write(au->ac_fd, r->ar_sbuf + s, + s = r->ar_reclen - q->aq_remain; + ret = write(au->ac_fd, r->ar_rec + s, q->aq_remain); if (ret == -1) { if (errno == EAGAIN) @@ -532,7 +508,7 @@ free(q); r->ar_refcount--; if (r->ar_refcount == 0) { - free(r->ar_sbuf); + free(r->ar_rec); free(r); } } @@ -555,7 +531,7 @@ exit(2); memset(new, 0, sizeof(struct au_queue_ent)); new->aq_ptr = rec; - new->aq_remain = rec->ar_sbuflen; + new->aq_remain = rec->ar_reclen; TAILQ_INSERT_TAIL(&au->ac_consumers[i]->ac_oq, new, aq_glue); dprintf("queued %p: %s\n", rec, au->ac_consumers[i]->ac_name); } @@ -568,24 +544,52 @@ if ((new = malloc(sizeof(struct au_recbuf))) == NULL) exit(2); - if ((new->ar_sbuf = malloc(NETAUDIT_PIPE_BUFSIZE)) == NULL) + if ((new->ar_rec = malloc(NETAUDIT_PIPE_BUFSIZE)) == NULL) exit(2); /* * XXXCSJP: It is possible that the audit record will be greater then * NETAUDIT_PIPE_BUFSIZE, in which case the pipe will truncate it. */ - new->ar_sbuflen = read(au->ac_fd, new->ar_sbuf, NETAUDIT_PIPE_BUFSIZE); - if (new->ar_sbuflen == -1) { + new->ar_reclen = read(au->ac_fd, new->ar_rec, NETAUDIT_PIPE_BUFSIZE); + if (new->ar_reclen == -1) { if (errno != EAGAIN) exit(2); else return; } - dprintf("au_cmpnt %p: read record %u bytes\n", au, new->ar_sbuflen); + dprintf("au_cmpnt %p: read record %u bytes\n", au, new->ar_reclen); netaudit_queue_record(au, new); } void +netaudit_socket_listen(struct au_cmpnt *au) +{ + struct addrinfo *addrptr; + int flags; + + addrptr = au->ac_ainfo; + au->ac_fd = socket(addrptr->ai_family, addrptr->ai_socktype, + addrptr->ai_protocol); + if (au->ac_fd == -1) + err(1, "socket"); + if (bind(au->ac_fd, addrptr->ai_addr, addrptr->ai_addrlen) == -1) + err(1, "bind"); + if (listen(au->ac_fd, 16) == -1) + err(1, "listen"); + if ((flags = fcntl(au->ac_fd, F_GETFL)) == -1) + exit(2); + flags |= O_NONBLOCK; + if (fcntl(au->ac_fd, F_SETFL, flags) == -1) + exit(2); +} + +int +netaudit_socket_read(struct au_cmpnt *au) +{ + return (0); +} + +void usage() { fputs("usage: netauditd [-dh] [-f path]\n", stderr); ==== //depot/projects/trustedbsd/netauditd/netauditd.conf#3 (text+ko) ==== @@ -1,8 +1,7 @@ -# $Id: netauditd.conf,v 1.3 2008/02/14 05:13:47 alm Exp $ +# netauditd configuration file src src0 pipe /dev/auditpipe -#src src1 net 0.0.0.0 9999 +src src1 net 0.0.0.0 9999 -dst dst0 trail /tmp/src0/trail src0 - +dst dst0 trail /tmp/src0/trail src1 dst dst1 net 127.0.0.1 9999 src0 ==== //depot/projects/trustedbsd/netauditd/netauditd.h#3 (text+ko) ==== @@ -37,9 +37,9 @@ #define NETAUDIT_DST_NET 2 struct au_recbuf { - void *ar_sbuf; /* Store buffer */ - u_int32_t ar_sbuflen; /* Buffer data length */ - u_int32_t ar_refcount; + void *ar_rec; + u_int32_t ar_reclen; + u_int32_t ar_refcount; }; struct au_queue_ent { @@ -48,18 +48,28 @@ TAILQ_ENTRY(au_queue_ent) aq_glue; }; +struct au_srcbuffer { + struct au_cmpnt *sb_parent; + int sb_fd; + u_int32_t sb_reclen; + u_char *sb_rec; + u_char sb_buf[8192]; + u_char sb_header[5]; + TAILQ_ENTRY(au_srcbuffer) sb_glue; +}; + struct au_cmpnt { - char *ac_name; /* Component name */ - int ac_type; /* Component type */ - int ac_fd; /* Component fd */ - int ac_established; - int ac_remain; - char *ac_path; /* Component path */ - struct addrinfo *ac_ainfo; - struct au_cmpnt **ac_consumers; /* Consumer list */ - unsigned int ac_nconsumers; - TAILQ_HEAD(ac_oq, au_queue_ent) ac_oq; /* Output queue */ - TAILQ_ENTRY(au_cmpnt) ac_glue; + char *ac_name; + int ac_type; + int ac_fd; + int ac_established; + char *ac_path; + struct addrinfo *ac_ainfo; + struct au_cmpnt **ac_consumers; + unsigned int ac_nconsumers; + TAILQ_HEAD(ac_oq, au_queue_ent) ac_oq; + TAILQ_HEAD(ac_sbufq, au_srcbuffer) ac_sbufq; + TAILQ_ENTRY(au_cmpnt) ac_glue; }; typedef struct _args_t { @@ -76,8 +86,6 @@ void conf_parse(char *, int); int conf_parse_src_pipe(args_t *); int conf_parse_dst_trail(args_t *); -int conf_parse_dst_net(args_t *); -int conf_parse_src_net(args_t *); int conf_parse_net(args_t *); args_t *conf_parse_args(char *); void conf_free_args(args_t *); @@ -87,4 +95,6 @@ void netaudit_queue_record(struct au_cmpnt *, struct au_recbuf *); void netaudit_pipe_read(struct au_cmpnt *); void netaudit_run(void); +void netaudit_socket_listen(struct au_cmpnt *); +int netaudit_socket_read(struct au_cmpnt *); void usage(void); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:54:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5285C16A475; Mon, 18 Feb 2008 05:54:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F382416A46D for ; Mon, 18 Feb 2008 05:54:24 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E01BE13C46A for ; Mon, 18 Feb 2008 05:54:24 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I5sOqk051702 for ; Mon, 18 Feb 2008 05:54:24 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I5sOkU051699 for perforce@freebsd.org; Mon, 18 Feb 2008 05:54:24 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 05:54:24 GMT Message-Id: <200802180554.m1I5sOkU051699@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135629 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:54:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=135629 Change 135629 by imp@imp_lighthouse on 2008/02/18 05:54:03 Prefer uintXX_t to u_intXX_t to make cfe_api.c happy. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/atomic.h#5 (text+ko) ==== @@ -56,20 +56,20 @@ * of interrupts and SMP safe. */ -void atomic_set_8(__volatile u_int8_t *, u_int8_t); -void atomic_clear_8(__volatile u_int8_t *, u_int8_t); -void atomic_add_8(__volatile u_int8_t *, u_int8_t); -void atomic_subtract_8(__volatile u_int8_t *, u_int8_t); +void atomic_set_8(__volatile uint8_t *, uint8_t); +void atomic_clear_8(__volatile uint8_t *, uint8_t); +void atomic_add_8(__volatile uint8_t *, uint8_t); +void atomic_subtract_8(__volatile uint8_t *, uint8_t); -void atomic_set_16(__volatile u_int16_t *, u_int16_t); -void atomic_clear_16(__volatile u_int16_t *, u_int16_t); -void atomic_add_16(__volatile u_int16_t *, u_int16_t); -void atomic_subtract_16(__volatile u_int16_t *, u_int16_t); +void atomic_set_16(__volatile uint16_t *, uint16_t); +void atomic_clear_16(__volatile uint16_t *, uint16_t); +void atomic_add_16(__volatile uint16_t *, uint16_t); +void atomic_subtract_16(__volatile uint16_t *, uint16_t); static __inline void -atomic_set_32(__volatile u_int32_t *p, u_int32_t v) +atomic_set_32(__volatile uint32_t *p, uint32_t v) { - u_int32_t temp; + uint32_t temp; __asm __volatile ( "1:\tll %0, %3\n\t" /* load old value */ @@ -83,9 +83,9 @@ } static __inline void -atomic_clear_32(__volatile u_int32_t *p, u_int32_t v) +atomic_clear_32(__volatile uint32_t *p, uint32_t v) { - u_int32_t temp; + uint32_t temp; v = ~v; __asm __volatile ( @@ -99,9 +99,9 @@ } static __inline void -atomic_add_32(__volatile u_int32_t *p, u_int32_t v) +atomic_add_32(__volatile uint32_t *p, uint32_t v) { - u_int32_t temp; + uint32_t temp; __asm __volatile ( "1:\tll %0, %3\n\t" /* load old value */ @@ -114,9 +114,9 @@ } static __inline void -atomic_subtract_32(__volatile u_int32_t *p, u_int32_t v) +atomic_subtract_32(__volatile uint32_t *p, uint32_t v) { - u_int32_t temp; + uint32_t temp; __asm __volatile ( "1:\tll %0, %3\n\t" /* load old value */ @@ -128,10 +128,10 @@ : "memory"); } -static __inline u_int32_t -atomic_readandclear_32(__volatile u_int32_t *addr) +static __inline uint32_t +atomic_readandclear_32(__volatile uint32_t *addr) { - u_int32_t result,temp; + uint32_t result,temp; __asm __volatile ( "1:\tll %0,%3\n\t" /* load current value, asserting lock */ @@ -145,10 +145,10 @@ return result; } -static __inline u_int32_t -atomic_readandset_32(__volatile u_int32_t *addr, u_int32_t value) +static __inline uint32_t +atomic_readandset_32(__volatile uint32_t *addr, uint32_t value) { - u_int32_t result,temp; + uint32_t result,temp; __asm __volatile ( "1:\tll %0,%3\n\t" /* load current value, asserting lock */ @@ -164,14 +164,14 @@ #define ATOMIC_ACQ_REL(NAME, WIDTH) \ static __inline void \ -atomic_##NAME##_acq_##WIDTH(__volatile u_int##WIDTH##_t *p, u_int##WIDTH##_t v)\ +atomic_##NAME##_acq_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ { \ atomic_##NAME##_##WIDTH(p, v); \ mips_sync(); \ } \ \ static __inline void \ -atomic_##NAME##_rel_##WIDTH(__volatile u_int##WIDTH##_t *p, u_int##WIDTH##_t v)\ +atomic_##NAME##_rel_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ { \ mips_sync(); \ atomic_##NAME##_##WIDTH(p, v); \ @@ -203,10 +203,10 @@ * We assume that a = b will do atomic loads and stores. */ #define ATOMIC_STORE_LOAD(WIDTH) \ -static __inline u_int##WIDTH##_t \ -atomic_load_acq_##WIDTH(__volatile u_int##WIDTH##_t *p) \ +static __inline uint##WIDTH##_t \ +atomic_load_acq_##WIDTH(__volatile uint##WIDTH##_t *p) \ { \ - u_int##WIDTH##_t v; \ + uint##WIDTH##_t v; \ \ v = *p; \ mips_sync(); \ @@ -214,7 +214,7 @@ } \ \ static __inline void \ -atomic_store_rel_##WIDTH(__volatile u_int##WIDTH##_t *p, u_int##WIDTH##_t v)\ +atomic_store_rel_##WIDTH(__volatile uint##WIDTH##_t *p, uint##WIDTH##_t v)\ { \ mips_sync(); \ *p = v; \ @@ -222,8 +222,8 @@ ATOMIC_STORE_LOAD(32) ATOMIC_STORE_LOAD(64) -void atomic_store_64 (__volatile u_int64_t *, u_int64_t *); -void atomic_load_64 (__volatile u_int64_t *, u_int64_t *); +void atomic_store_64 (__volatile uint64_t *, uint64_t *); +void atomic_load_64 (__volatile uint64_t *, uint64_t *); #undef ATOMIC_STORE_LOAD @@ -232,10 +232,10 @@ * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline u_int32_t -atomic_cmpset_32(__volatile u_int32_t* p, u_int32_t cmpval, u_int32_t newval) +static __inline uint32_t +atomic_cmpset_32(__volatile uint32_t* p, uint32_t cmpval, uint32_t newval) { - u_int32_t ret; + uint32_t ret; __asm __volatile ( "1:\tll %0, %4\n\t" /* load old value */ @@ -259,8 +259,8 @@ * two values are equal, update the value of *p with newval. Returns * zero if the compare failed, nonzero otherwise. */ -static __inline u_int32_t -atomic_cmpset_acq_32(__volatile u_int32_t *p, u_int32_t cmpval, u_int32_t newval) +static __inline uint32_t +atomic_cmpset_acq_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { int retval; @@ -269,8 +269,8 @@ return (retval); } -static __inline u_int32_t -atomic_cmpset_rel_32(__volatile u_int32_t *p, u_int32_t cmpval, u_int32_t newval) +static __inline uint32_t +atomic_cmpset_rel_32(__volatile uint32_t *p, uint32_t cmpval, uint32_t newval) { mips_sync(); return (atomic_cmpset_32(p, cmpval, newval)); @@ -280,10 +280,10 @@ * Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. */ -static __inline u_int -atomic_fetchadd_32(__volatile u_int32_t *p, u_int32_t v) +static __inline uint32_t +atomic_fetchadd_32(__volatile uint32_t *p, uint32_t v) { - u_int32_t value, temp; + uint32_t value, temp; __asm __volatile ( "1:\tll %0, %1\n\t" /* load old value */ From owner-p4-projects@FreeBSD.ORG Mon Feb 18 05:59:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 308EE16A496; Mon, 18 Feb 2008 05:59:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D265616A480 for ; Mon, 18 Feb 2008 05:59:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BFBDB13C4D9 for ; Mon, 18 Feb 2008 05:59:30 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I5xUtP051972 for ; Mon, 18 Feb 2008 05:59:30 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I5xUF0051969 for perforce@freebsd.org; Mon, 18 Feb 2008 05:59:30 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 05:59:30 GMT Message-Id: <200802180559.m1I5xUF0051969@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135630 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 05:59:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135630 Change 135630 by imp@imp_lighthouse on 2008/02/18 05:59:03 Fix this the right way. Make bfe_shutdown not be static. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfe.c#3 edit .. //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfereg.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfe.c#3 (text+ko) ==== @@ -79,7 +79,6 @@ static void bfe_init_locked (void *); static void bfe_stop (struct bfe_softc *); static void bfe_watchdog (struct ifnet *); -static int bfe_shutdown (device_t); static void bfe_tick (void *); static void bfe_txeof (struct bfe_softc *); static void bfe_rxeof (struct bfe_softc *); @@ -399,7 +398,7 @@ * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static int +int bfe_shutdown(device_t dev) { struct bfe_softc *sc; ==== //depot/projects/mips2-jnpr/src/sys/dev/bfe/if_bfereg.h#3 (text+ko) ==== @@ -544,7 +544,7 @@ int bfe_detach(device_t); int bfe_suspend(device_t); int bfe_resume(device_t); -static int bfe_shutdown(device_t); +int bfe_shutdown(device_t); int bfe_miibus_readreg(device_t, int, int); int bfe_miibus_writereg(device_t, int, int, int); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 06:00:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8C7016A41B; Mon, 18 Feb 2008 06:00:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95DBC16A469 for ; Mon, 18 Feb 2008 06:00:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7C013C457 for ; Mon, 18 Feb 2008 06:00:32 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I60W0C052123 for ; Mon, 18 Feb 2008 06:00:32 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I60V1F052120 for perforce@freebsd.org; Mon, 18 Feb 2008 06:00:31 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 06:00:31 GMT Message-Id: <200802180600.m1I60V1F052120@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135631 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 06:00:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135631 Change 135631 by imp@imp_lighthouse on 2008/02/18 06:00:00 Catch up with kdb_enter churn. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/cfe/cfe_console.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/cfe/cfe_console.c#2 (text+ko) ==== @@ -274,7 +274,7 @@ if (result > 0) { #if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) if (kdb_alt_break(ch, &alt_break_state)) - kdb_enter("Break sequence on console"); + kdb_enter(KDB_WHY_BREAK, "Break sequence on console"); #endif return (ch); } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 06:02:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F03B16A420; Mon, 18 Feb 2008 06:02:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB64816A46D for ; Mon, 18 Feb 2008 06:02:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9F94213C502 for ; Mon, 18 Feb 2008 06:02:34 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1I62YP3052198 for ; Mon, 18 Feb 2008 06:02:34 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1I62YBW052195 for perforce@freebsd.org; Mon, 18 Feb 2008 06:02:34 GMT (envelope-from imp@freebsd.org) Date: Mon, 18 Feb 2008 06:02:34 GMT Message-Id: <200802180602.m1I62YBW052195@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135632 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 06:02:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135632 Change 135632 by imp@imp_lighthouse on 2008/02/18 06:01:39 mips_timer_init_param() Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/sentry5/s5_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/sentry5/s5_machdep.c#3 (text+ko) ==== @@ -237,5 +237,5 @@ platform_counter_freq = 200 * 1000 * 1000; /* Sentry5 is 200MHz */ # endif - tick_init_params(platform_counter_freq, 0); + mips_timer_init_params(platform_counter_freq, 0); } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 16:08:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 44A2016A421; Mon, 18 Feb 2008 16:08:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E2216A41B for ; Mon, 18 Feb 2008 16:08:15 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D88E113C505 for ; Mon, 18 Feb 2008 16:08:14 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IG8Ekv034810 for ; Mon, 18 Feb 2008 16:08:14 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IG8Eww034807 for perforce@freebsd.org; Mon, 18 Feb 2008 16:08:14 GMT (envelope-from raj@freebsd.org) Date: Mon, 18 Feb 2008 16:08:14 GMT Message-Id: <200802181608.m1IG8Eww034807@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 16:08:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=135656 Change 135656 by raj@raj_mimi on 2008/02/18 16:07:57 Minor loader config define fix (same for AIM in aleady fixed in HEAD) Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/conf.c#5 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/conf.c#5 (text+ko) ==== @@ -65,7 +65,7 @@ #if defined(LOADER_EXT2FS_SUPPORT) &ext2fs_fsops, #endif -#if defined(LOADER_NET_SUPPORT) +#if defined(LOADER_NFS_SUPPORT) &nfs_fsops, #endif #if defined(LOADER_TFTP_SUPPORT) From owner-p4-projects@FreeBSD.ORG Mon Feb 18 16:10:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 95D6816A46B; Mon, 18 Feb 2008 16:10:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4220C16A468 for ; Mon, 18 Feb 2008 16:10:17 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3363013C4F2 for ; Mon, 18 Feb 2008 16:10:17 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IGAHMr034954 for ; Mon, 18 Feb 2008 16:10:17 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IGAGEe034951 for perforce@freebsd.org; Mon, 18 Feb 2008 16:10:16 GMT (envelope-from raj@freebsd.org) Date: Mon, 18 Feb 2008 16:10:16 GMT Message-Id: <200802181610.m1IGAGEe034951@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135657 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 16:10:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=135657 Change 135657 by raj@raj_mimi on 2008/02/18 16:09:40 loader/U-Boot metadata area style cleanup. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#5 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#5 (text+ko) ==== @@ -47,92 +47,94 @@ * Return a 'boothowto' value corresponding to the kernel arguments in * (kargs) and any relevant environment variables. */ -static struct +static struct { - const char *ev; - int mask; + const char *ev; + int mask; } howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} + {"boot_askname", RB_ASKNAME}, + {"boot_cdrom", RB_CDROM}, + {"boot_ddb", RB_KDB}, + {"boot_dfltroot", RB_DFLTROOT}, + {"boot_gdb", RB_GDB}, + {"boot_multicons", RB_MULTIPLE}, + {"boot_mute", RB_MUTE}, + {"boot_pause", RB_PAUSE}, + {"boot_serial", RB_SERIAL}, + {"boot_single", RB_SINGLE}, + {"boot_verbose", RB_VERBOSE}, + {NULL, 0} }; int md_getboothowto(char *kargs) { - char *cp; - int howto; - int active; - int i; - - /* Parse kargs */ - howto = 0; - if (kargs != NULL) { - cp = kargs; - active = 0; - while (*cp != 0) { - if (!active && (*cp == '-')) { - active = 1; - } else if (active) - switch (*cp) { - case 'a': - howto |= RB_ASKNAME; - break; - case 'C': - howto |= RB_CDROM; - break; - case 'd': - howto |= RB_KDB; - break; - case 'D': - howto |= RB_MULTIPLE; - break; - case 'm': - howto |= RB_MUTE; - break; - case 'g': - howto |= RB_GDB; - break; - case 'h': - howto |= RB_SERIAL; - break; - case 'p': - howto |= RB_PAUSE; - break; - case 'r': - howto |= RB_DFLTROOT; - break; - case 's': - howto |= RB_SINGLE; - break; - case 'v': - howto |= RB_VERBOSE; - break; - default: - active = 0; - break; + char *cp; + int howto; + int active; + int i; + + /* Parse kargs */ + howto = 0; + if (kargs != NULL) { + cp = kargs; + active = 0; + while (*cp != 0) { + if (!active && (*cp == '-')) + active = 1; + else if (active) + switch (*cp) { + case 'a': + howto |= RB_ASKNAME; + break; + case 'C': + howto |= RB_CDROM; + break; + case 'd': + howto |= RB_KDB; + break; + case 'D': + howto |= RB_MULTIPLE; + break; + case 'm': + howto |= RB_MUTE; + break; + case 'g': + howto |= RB_GDB; + break; + case 'h': + howto |= RB_SERIAL; + break; + case 'p': + howto |= RB_PAUSE; + break; + case 'r': + howto |= RB_DFLTROOT; + break; + case 's': + howto |= RB_SINGLE; + break; + case 'v': + howto |= RB_VERBOSE; + break; + default: + active = 0; + break; + } + cp++; } - cp++; } - } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; - if (!strcmp(getenv("console"), "comconsole")) - howto |= RB_SERIAL; - if (!strcmp(getenv("console"), "nullconsole")) - howto |= RB_MUTE; - return(howto); + + /* get equivalents from the environment */ + for (i = 0; howto_names[i].ev != NULL; i++) + if (getenv(howto_names[i].ev) != NULL) + howto |= howto_names[i].mask; + if (!strcmp(getenv("console"), "comconsole")) + howto |= RB_SERIAL; + if (!strcmp(getenv("console"), "nullconsole")) + howto |= RB_MUTE; + + return(howto); } /* @@ -143,24 +145,25 @@ vm_offset_t md_copyenv(vm_offset_t addr) { - struct env_var *ep; - - /* traverse the environment */ - for (ep = environ; ep != NULL; ep = ep->ev_next) { - archsw.arch_copyin(ep->ev_name, addr, strlen(ep->ev_name)); - addr += strlen(ep->ev_name); - archsw.arch_copyin("=", addr, 1); - addr++; - if (ep->ev_value != NULL) { - archsw.arch_copyin(ep->ev_value, addr, strlen(ep->ev_value)); - addr += strlen(ep->ev_value); + struct env_var *ep; + + /* traverse the environment */ + for (ep = environ; ep != NULL; ep = ep->ev_next) { + archsw.arch_copyin(ep->ev_name, addr, strlen(ep->ev_name)); + addr += strlen(ep->ev_name); + archsw.arch_copyin("=", addr, 1); + addr++; + if (ep->ev_value != NULL) { + archsw.arch_copyin(ep->ev_value, addr, + strlen(ep->ev_value)); + addr += strlen(ep->ev_value); + } + archsw.arch_copyin("", addr, 1); + addr++; } archsw.arch_copyin("", addr, 1); addr++; - } - archsw.arch_copyin("", addr, 1); - addr++; - return(addr); + return(addr); } /* @@ -225,28 +228,26 @@ vm_offset_t md_copymodules(vm_offset_t addr) { - struct preloaded_file *fp; - struct file_metadata *md; - int c; + struct preloaded_file *fp; + struct file_metadata *md; + int c; - c = addr != 0; - /* start with the first module on the list, should be the kernel */ - for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { + c = addr != 0; + /* start with the first module on the list, should be the kernel */ + for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { - MOD_NAME(addr, fp->f_name, c); /* this field must come first */ - MOD_TYPE(addr, fp->f_type, c); - if (fp->f_args) - MOD_ARGS(addr, fp->f_args, c); - MOD_ADDR(addr, fp->f_addr, c); - MOD_SIZE(addr, fp->f_size, c); - for (md = fp->f_metadata; md != NULL; md = md->md_next) { - if (!(md->md_type & MODINFOMD_NOCOPY)) { - MOD_METADATA(addr, md, c); - } + MOD_NAME(addr, fp->f_name, c); /* this field must come first */ + MOD_TYPE(addr, fp->f_type, c); + if (fp->f_args) + MOD_ARGS(addr, fp->f_args, c); + MOD_ADDR(addr, fp->f_addr, c); + MOD_SIZE(addr, fp->f_size, c); + for (md = fp->f_metadata; md != NULL; md = md->md_next) + if (!(md->md_type & MODINFOMD_NOCOPY)) + MOD_METADATA(addr, md, c); } - } - MOD_END(addr, c); - return(addr); + MOD_END(addr, c); + return(addr); } /* @@ -260,110 +261,108 @@ int md_load(char *args, vm_offset_t *modulep) { - struct bootinfo bootinfo; - struct preloaded_file *kfp; - struct preloaded_file *xp; - struct file_metadata *md; - vm_offset_t kernend; - vm_offset_t addr; - vm_offset_t envp; - vm_offset_t size; - vm_offset_t vaddr; - struct sys_info *si; - char *rootdevname; - int howto; - int i; + struct bootinfo bootinfo; + struct preloaded_file *kfp; + struct preloaded_file *xp; + struct file_metadata *md; + vm_offset_t kernend; + vm_offset_t addr; + vm_offset_t envp; + vm_offset_t size; + vm_offset_t vaddr; + struct sys_info *si; + char *rootdevname; + int howto; + int i; - /* This metadata addreses must be converted for kernel after relocation */ - uint32_t mdt[] = { MODINFOMD_SSYM, MODINFOMD_ESYM, - MODINFOMD_KERNEND, MODINFOMD_ENVP }; + /* This metadata addreses must be converted for kernel after relocation */ + uint32_t mdt[] = { + MODINFOMD_SSYM, MODINFOMD_ESYM, MODINFOMD_KERNEND, MODINFOMD_ENVP + }; - howto = md_getboothowto(args); + howto = md_getboothowto(args); - /* - * Allow the environment variable 'rootdev' to override the supplied device - * This should perhaps go to MI code and/or have $rootdev tested/set by - * MI code before launching the kernel. - */ - rootdevname = getenv("rootdev"); - if (rootdevname == NULL) - rootdevname = getenv("currdev"); - /* Try reading the /etc/fstab file to select the root device */ - getrootmount(rootdevname); + /* + * Allow the environment variable 'rootdev' to override the supplied device + * This should perhaps go to MI code and/or have $rootdev tested/set by + * MI code before launching the kernel. + */ + rootdevname = getenv("rootdev"); + if (rootdevname == NULL) + rootdevname = getenv("currdev"); + /* Try reading the /etc/fstab file to select the root device */ + getrootmount(rootdevname); - /* find the last module in the chain */ - addr = 0; - for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { - if (addr < (xp->f_addr + xp->f_size)) - addr = xp->f_addr + xp->f_size; - } - /* pad to a page boundary */ - addr = roundup(addr, PAGE_SIZE); + /* find the last module in the chain */ + addr = 0; + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; + /* pad to a page boundary */ + addr = roundup(addr, PAGE_SIZE); - /* copy our environment */ - envp = addr; - addr = md_copyenv(addr); + /* copy our environment */ + envp = addr; + addr = md_copyenv(addr); - /* pad to a page boundary */ - addr = roundup(addr, PAGE_SIZE); + /* pad to a page boundary */ + addr = roundup(addr, PAGE_SIZE); - /* Fill information structure */ - if (!(si = ub_get_sys_info())) - panic("can't retrieve U-Boot sysinfo"); + /* Fill information structure */ + if (!(si = ub_get_sys_info())) + panic("can't retrieve U-Boot sysinfo"); - /* Extract mem info */ - for (i = 0; i < si->mr_no; i++) - if (si->mr[i].flags == MR_ATTR_DRAM) { - bootinfo.mem_base = si->mr[i].start; - bootinfo.mem_size = si->mr[i].size; - break; - } + /* Extract mem info */ + for (i = 0; i < si->mr_no; i++) + if (si->mr[i].flags == MR_ATTR_DRAM) { + bootinfo.mem_base = si->mr[i].start; + bootinfo.mem_size = si->mr[i].size; + break; + } - if (i == si->mr_no) - panic("can't retrieve memory info"); + if (i == si->mr_no) + panic("can't retrieve memory info"); - bootinfo.version = 1; - bootinfo.bar_base = si->bar; - bootinfo.cpu_clk = si->clk_cpu; - bootinfo.bus_clk = si->clk_bus; + bootinfo.version = 1; + bootinfo.bar_base = si->bar; + bootinfo.cpu_clk = si->clk_cpu; + bootinfo.bus_clk = si->clk_bus; #if 0 - memcpy(bootinfo.eth0_addr, bd->bi_enetaddr, sizeof(bootinfo.eth0_addr)); -#ifdef CONFIG_HAS_ETH1 - memcpy(bootinfo.eth1_addr, bd->bi_enet1addr, sizeof(bootinfo.eth1_addr)); + memcpy(bootinfo.eth0_addr, bd->bi_enetaddr, sizeof(bootinfo.eth0_addr)); + memcpy(bootinfo.eth1_addr, bd->bi_enet1addr, sizeof(bootinfo.eth1_addr)); #endif -#endif - kernend = 0; - kfp = file_findfile(NULL, "elf32 kernel"); - if (kfp == NULL) - kfp = file_findfile(NULL, "elf kernel"); - if (kfp == NULL) - panic("can't find kernel file"); - file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); - file_addmetadata(kfp, MODINFOMD_BOOTINFO, sizeof bootinfo, &bootinfo); - file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); - file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); + kernend = 0; + kfp = file_findfile(NULL, "elf32 kernel"); + if (kfp == NULL) + kfp = file_findfile(NULL, "elf kernel"); + if (kfp == NULL) + panic("can't find kernel file"); + file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); + file_addmetadata(kfp, MODINFOMD_BOOTINFO, sizeof bootinfo, &bootinfo); + file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); + file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); - *modulep = addr; - size = md_copymodules(0); - kernend = roundup(addr + size, PAGE_SIZE); + *modulep = addr; + size = md_copymodules(0); + kernend = roundup(addr + size, PAGE_SIZE); - md = file_findmetadata(kfp, MODINFOMD_KERNEND); - bcopy(&kernend, md->md_data, sizeof kernend); + md = file_findmetadata(kfp, MODINFOMD_KERNEND); + bcopy(&kernend, md->md_data, sizeof kernend); - /* Convert addresses to the final VA */ - *modulep -= __elfN(relocation_offset); + /* Convert addresses to the final VA */ + *modulep -= __elfN(relocation_offset); - for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) { - md = file_findmetadata(kfp, mdt[i]); - if (md) { - bcopy(md->md_data, &vaddr, sizeof vaddr); - vaddr -= __elfN(relocation_offset); - bcopy(&vaddr, md->md_data, sizeof vaddr); - } - } - (void)md_copymodules(addr); + for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) { + md = file_findmetadata(kfp, mdt[i]); + if (md) { + bcopy(md->md_data, &vaddr, sizeof vaddr); + vaddr -= __elfN(relocation_offset); + bcopy(&vaddr, md->md_data, sizeof vaddr); + } + } + (void)md_copymodules(addr); - return(0); + return(0); } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 16:26:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 461C016A469; Mon, 18 Feb 2008 16:26:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B1CD16A420 for ; Mon, 18 Feb 2008 16:26:34 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F0A2613C478 for ; Mon, 18 Feb 2008 16:26:33 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IGQXQZ039929 for ; Mon, 18 Feb 2008 16:26:33 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IGQX7s039926 for perforce@freebsd.org; Mon, 18 Feb 2008 16:26:33 GMT (envelope-from raj@freebsd.org) Date: Mon, 18 Feb 2008 16:26:33 GMT Message-Id: <200802181626.m1IGQX7s039926@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135658 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 16:26:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135658 Change 135658 by raj@raj_mimi on 2008/02/18 16:26:01 Extend bootinfo metadata and its handling, so that multiple memory regions and Ethernet addresses are passed to the kernel. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#6 edit .. //depot/projects/e500/sys/boot/uboot/common/main.c#6 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#8 edit .. //depot/projects/e500/sys/powerpc/booke/pmap.c#11 edit .. //depot/projects/e500/sys/powerpc/include/bootinfo.h#4 edit .. //depot/projects/e500/sys/powerpc/include/pmap.h#4 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#4 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#6 (text+ko) ==== @@ -1,6 +1,6 @@ /*- * Copyright (c) 1998 Michael Smith - * Copyright (C) 2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2007-2008 Semihalf, Piotr Kruszynski * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,8 +40,10 @@ #include "api_public.h" #include "bootstrap.h" -/* XXX should this go into header? */ +/* XXX this should go into header */ struct sys_info *ub_get_sys_info(void); +const char *ub_env_enum(const char *); +char *ub_env_get(const char *); /* * Return a 'boothowto' value corresponding to the kernel arguments in @@ -66,7 +68,7 @@ {NULL, 0} }; -int +static int md_getboothowto(char *kargs) { char *cp; @@ -142,7 +144,7 @@ * Each variable is formatted as =, with a single nul * separating each variable, and a double nul terminating the environment. */ -vm_offset_t +static vm_offset_t md_copyenv(vm_offset_t addr) { struct env_var *ep; @@ -225,7 +227,7 @@ COPY32(0, a, c); \ } -vm_offset_t +static vm_offset_t md_copymodules(vm_offset_t addr) { struct preloaded_file *fp; @@ -251,6 +253,94 @@ } /* + * Prepare the bootinfo structure. Put a ptr to the allocated struct in addr, + * return size. + */ +static int +md_bootinfo(struct bootinfo **addr) +{ +#define TMP_MAX_ETH 8 +#define TMP_MAX_MR 8 + struct bootinfo *bi; + struct bi_mem_region tmp_mr[TMP_MAX_MR]; + struct bi_eth_addr tmp_eth[TMP_MAX_ETH]; + struct sys_info *si; + char *str, *end; + const char *env; + void *ptr; + u_int8_t tmp_addr[6]; + int i, mr_no, eth_no, size; + + if ((si = ub_get_sys_info()) == NULL) + panic("can't retrieve U-Boot sysinfo"); + + /* + * Handle mem regions (we only care about DRAM) + */ + for (i = 0, mr_no = 0; i < si->mr_no; i++) + if (si->mr[i].flags == MR_ATTR_DRAM) { + if (mr_no >= TMP_MAX_MR) { + printf("too many memory regions: %d\n", + mr_no); + break; + } + tmp_mr[mr_no].mem_base = si->mr[i].start; + tmp_mr[mr_no].mem_size = si->mr[i].size; + mr_no++; + continue; + } + if (mr_no == 0) + panic("can't retrieve RAM info"); + + size = (mr_no * sizeof(struct bi_mem_region) - sizeof(bi->bi_data)); + + /* + * Handle Ethernet addresses: parse u-boot env for eth%daddr + */ + env = NULL; + eth_no = 0; + while ((env = ub_env_enum(env)) != NULL) + if (strncmp(env, "eth", 3) == 0 && + strncmp(env + (strlen(env) - 4), "addr", 4) == 0) { + + str = ub_env_get(env); + for (i = 0; i < 6; i++) { + tmp_addr[i] = str ? strtol(str, &end, 16) : 0; + if (str) + str = (*end) ? end + 1 : end; + + tmp_eth[eth_no].mac_addr[i] = tmp_addr[i]; + } + eth_no++; + } + + size += (eth_no * sizeof(struct bi_eth_addr)) + sizeof(struct bootinfo); + + /* + * Once its whole size is calculated, allocate space for the bootinfo + * and copy over the contents from temp containers. + */ + if ((bi = malloc(size)) == NULL) + panic("can't allocate mem for bootinfo"); + + ptr = (struct bi_mem_region *)bi->bi_data; + bcopy(tmp_mr, ptr, mr_no * sizeof(struct bi_mem_region)); + ptr += mr_no * sizeof(struct bi_mem_region); + bcopy(tmp_eth, ptr, eth_no * sizeof(struct bi_eth_addr)); + + bi->bi_mem_reg_no = mr_no; + bi->bi_eth_addr_no = eth_no; + bi->bi_version = BI_VERSION; + bi->bi_bar_base = si->bar; + bi->bi_cpu_clk = si->clk_cpu; + bi->bi_bus_clk = si->clk_bus; + + *addr = bi; + + return (size); +} + +/* * Load the information expected by a powerpc kernel. * * - The 'boothowto' argument is constructed @@ -261,18 +351,18 @@ int md_load(char *args, vm_offset_t *modulep) { - struct bootinfo bootinfo; struct preloaded_file *kfp; struct preloaded_file *xp; struct file_metadata *md; + struct bootinfo *bip; vm_offset_t kernend; vm_offset_t addr; vm_offset_t envp; vm_offset_t size; vm_offset_t vaddr; - struct sys_info *si; char *rootdevname; int howto; + int bisize; int i; /* This metadata addreses must be converted for kernel after relocation */ @@ -308,31 +398,9 @@ /* pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); - /* Fill information structure */ - if (!(si = ub_get_sys_info())) - panic("can't retrieve U-Boot sysinfo"); + /* prepare bootinfo */ + bisize = md_bootinfo(&bip); - /* Extract mem info */ - for (i = 0; i < si->mr_no; i++) - if (si->mr[i].flags == MR_ATTR_DRAM) { - bootinfo.mem_base = si->mr[i].start; - bootinfo.mem_size = si->mr[i].size; - break; - } - - if (i == si->mr_no) - panic("can't retrieve memory info"); - - bootinfo.version = 1; - bootinfo.bar_base = si->bar; - bootinfo.cpu_clk = si->clk_cpu; - bootinfo.bus_clk = si->clk_bus; - -#if 0 - memcpy(bootinfo.eth0_addr, bd->bi_enetaddr, sizeof(bootinfo.eth0_addr)); - memcpy(bootinfo.eth1_addr, bd->bi_enet1addr, sizeof(bootinfo.eth1_addr)); -#endif - kernend = 0; kfp = file_findfile(NULL, "elf32 kernel"); if (kfp == NULL) @@ -340,7 +408,7 @@ if (kfp == NULL) panic("can't find kernel file"); file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); - file_addmetadata(kfp, MODINFOMD_BOOTINFO, sizeof bootinfo, &bootinfo); + file_addmetadata(kfp, MODINFOMD_BOOTINFO, bisize, bip); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); ==== //depot/projects/e500/sys/boot/uboot/common/main.c#6 (text+ko) ==== @@ -96,17 +96,19 @@ static uint64_t memsize(int flags) { - int i; - struct sys_info * si; + int i; + struct sys_info *si; + uint64_t size; if ((si = ub_get_sys_info()) == NULL) return 0; - + + size = 0; for (i = 0; i < si->mr_no; i++) if (si->mr[i].flags == flags && si->mr[i].size) - return (si->mr[i].size); + size += (si->mr[i].size); - return 0; + return (size); } int ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#8 (text+ko) ==== @@ -261,7 +261,9 @@ void dump_bootinfo(void) { - int i; + struct bi_mem_region *mr; + struct bi_eth_addr *eth; + int i, j; debugf("bootinfo:\n"); if (bootinfo == NULL) { @@ -269,22 +271,25 @@ return; } - debugf(" version = 0x%08x\n", bootinfo->version); - debugf(" mem_base = 0x%08x\n", bootinfo->mem_base); - debugf(" mem_size = 0x%08x\n", bootinfo->mem_size); - debugf(" ccsrbar = 0x%08x\n", bootinfo->bar_base); - debugf(" cpu_clk = 0x%08x\n", bootinfo->cpu_clk); - debugf(" bus_clk = 0x%08x\n", bootinfo->bus_clk); + debugf(" version = 0x%08x\n", bootinfo->bi_version); + debugf(" ccsrbar = 0x%08x\n", bootinfo->bi_bar_base); + debugf(" cpu_clk = 0x%08x\n", bootinfo->bi_cpu_clk); + debugf(" bus_clk = 0x%08x\n", bootinfo->bi_bus_clk); - debugf(" eth0_addr = "); - for (i = 0; i < 6; i++) - debugf("%02x ", bootinfo->eth0_addr[i]); - debugf("\n"); + debugf(" mem regions:\n"); + mr = (struct bi_mem_region *)bootinfo->bi_data; + for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) + debugf(" #%d, base = 0x%08x, size = 0x%08x\n", i, + mr->mem_base, mr->mem_size); - debugf(" eth1_addr = "); - for (i = 0; i < 6; i++) - debugf("%02x ", bootinfo->eth1_addr[i]); - debugf("\n"); + debugf(" eth addresses:\n"); + eth = (struct bi_eth_addr *)mr; + for (i = 0; i < bootinfo->bi_eth_addr_no; i++, eth++) { + debugf(" #%d, addr = ", i); + for (j = 0; j < 6; j++) + debugf("%02x ", eth->mac_addr[j]); + debugf("\n"); + } } void @@ -306,6 +311,8 @@ struct pcpu *pc; void *kmdp; vm_offset_t end; + struct bi_mem_region *mr; + int i; kmdp = NULL; @@ -341,18 +348,24 @@ while(1); } - availmem_regions[0].mr_start = bootinfo->mem_base; - availmem_regions[0].mr_size = bootinfo->mem_size; - availmem_regions_sz = 1; + /* Initialize memory regions table */ + mr = (struct bi_mem_region *)bootinfo->bi_data; + for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) { + if (i == MEM_REGIONS) + break; + availmem_regions[i].mr_start = mr->mem_base; + availmem_regions[i].mr_size = mr->mem_size; + } + availmem_regions_sz = i; /* Initialize TLB1 handling */ - tlb1_init(bootinfo->bar_base); + tlb1_init(bootinfo->bi_bar_base); /* * Time Base and Decrementer are updated every 8 CCB bus clocks. * HID0[SEL_TBCLK] = 0 */ - decr_config(bootinfo->bus_clk/8); + decr_config(bootinfo->bi_bus_clk/8); /* Init params/tunables that can be overridden by the loader. */ init_param1(); @@ -368,7 +381,7 @@ pc->pc_cpuid = 0; __asm __volatile("mtsprg 0, %0" :: "r"(pc)); - /* Initialize syste mutexes. */ + /* Initialize system mutexes. */ mutex_init(); /* Initialize the console before printing anything. */ ==== //depot/projects/e500/sys/powerpc/booke/pmap.c#11 (text+ko) ==== @@ -84,6 +84,7 @@ #include #include #include +#include #include #include "mmu_if.h" @@ -109,7 +110,6 @@ /* Kernel physical load address. */ extern uint32_t kernload; -#define MEM_REGIONS 8 struct mem_region availmem_regions[MEM_REGIONS]; int availmem_regions_sz; ==== //depot/projects/e500/sys/powerpc/include/bootinfo.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2006 Semihalf, Marian Balakowicz + * Copyright (C) 2006-2008 Semihalf, Marian Balakowicz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,36 @@ #define _MACHINE_BOOTINFO_H_ #if !defined(LOCORE) -/* Kernel hardware spec, received from loader(8) */ -struct bootinfo { - u_int32_t version; + +/* Platform hardware spec, received from loader(8) */ + +#define BI_VERSION 1 + +struct bi_mem_region { vm_paddr_t mem_base; vm_size_t mem_size; - vm_offset_t bar_base; - u_int32_t cpu_clk; - u_int32_t bus_clk; - u_int8_t eth0_addr[6]; +}; + +struct bi_eth_addr { + u_int8_t mac_addr[6]; +}; + +struct bootinfo { + u_int32_t bi_version; + vm_offset_t bi_bar_base; + u_int32_t bi_cpu_clk; + u_int32_t bi_bus_clk; + u_int8_t bi_mem_reg_no; + u_int8_t bi_eth_addr_no; + + u_int8_t bi_data[1]; + /* + * The bi_data container is allocated in run time and has the + * following layout: + * + * - bi_mem_reg_no elements of struct bi_mem_region + * - bi_eth_addr_no elements of struct bi_eth_addr + */ }; extern struct bootinfo *bootinfo; ==== //depot/projects/e500/sys/powerpc/include/pmap.h#4 (text+ko) ==== @@ -130,6 +130,7 @@ TAILQ_HEAD(, pv_entry) pv_list; }; +#define MEM_REGIONS 8 #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #endif /* AIM */ ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#4 (text+ko) ==== @@ -525,7 +525,7 @@ switch (index) { case OCPBUS_IVAR_CLOCK: - *result = bootinfo->bus_clk; + *result = bootinfo->bi_bus_clk; return (0); case OCPBUS_IVAR_DEVTYPE: *result = dinfo->ocp_devtype; From owner-p4-projects@FreeBSD.ORG Mon Feb 18 16:37:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5836C16A468; Mon, 18 Feb 2008 16:37:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ACB016A421; Mon, 18 Feb 2008 16:37:38 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id 77BBF13C45D; Mon, 18 Feb 2008 16:37:37 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 9876014387; Mon, 18 Feb 2008 17:45:57 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11972-02; Mon, 18 Feb 2008 17:45:56 +0100 (CET) Message-ID: <47B9B44D.9040604@semihalf.com> Date: Mon, 18 Feb 2008 17:37:33 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802162141.m1GLfgkj048217@repoman.freebsd.org> <47B75EB3.2020001@semihalf.com> <504560A3-EABB-4896-8B3E-C7FC89F31EFB@mac.com> <47B84D9B.4010903@semihalf.com> <47B8A8CD.3040707@semihalf.com> <755B845B-F43E-463D-8D87-7596A8C462F8@mac.com> In-Reply-To: <755B845B-F43E-463D-8D87-7596A8C462F8@mac.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Marcel Moolenaar , Perforce Change Reviews Subject: Re: PERFORCE change 135517 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 16:37:38 -0000 Marcel Moolenaar wrote: >> Another comment: please note that killing WITH_UBOOT introduces another >> problem: now both sys/boot/powerpc/uboot/loader and >> sys/boot/powerpc/ofw/loader are built during buildworld, which may be >> good >> from one point of view, but there's no control over which of the >> loader file >> is taken during installworld: it seems the last one (u-boot's in this >> case) >> overwrites the previous... > > Oh, yeah. We need to rename the U-Boot loader... > > More comments: with 1GB, the API signature is not found. What we > probably should do is have the platform-specific entry set a > hint, which can be based on the address of the global data. In > other words: on PowerPC in start.S, we save r2 and use that to > control where we're going to search for the API signature. > Ah, so the lowest 256MB constraint which I mentioned in this other email must have been removed. I like your hint discovery, very nice :-) Rafal From owner-p4-projects@FreeBSD.ORG Mon Feb 18 16:44:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 070C316A41A; Mon, 18 Feb 2008 16:44:53 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C043416A417 for ; Mon, 18 Feb 2008 16:44:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B391313C457 for ; Mon, 18 Feb 2008 16:44:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IGiqdL041774 for ; Mon, 18 Feb 2008 16:44:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IGiqLx041771 for perforce@freebsd.org; Mon, 18 Feb 2008 16:44:52 GMT (envelope-from hselasky@FreeBSD.org) Date: Mon, 18 Feb 2008 16:44:52 GMT Message-Id: <200802181644.m1IGiqLx041771@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135659 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 16:44:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135659 Change 135659 by hselasky@hselasky_laptop001 on 2008/02/18 16:44:27 Clearify comments. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#115 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#115 (text+ko) ==== @@ -206,7 +206,8 @@ /*------------------------------------------------------------------------* * usbd_get_pipe_by_addr * - * This function searches for an USB pipe by endpoint address. + * This function searches for an USB pipe by endpoint address and + * direction. *------------------------------------------------------------------------*/ struct usbd_pipe * usbd_get_pipe_by_addr(struct usbd_device *udev, uint8_t ea_val) @@ -219,7 +220,7 @@ /* * According to the USB specification not all bits are used - * for the endpoint address. Mask away the reserved bits: + * for the endpoint address. Keep defined bits only: */ ea_val &= EA_MASK; From owner-p4-projects@FreeBSD.ORG Mon Feb 18 17:42:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7F88E16A419; Mon, 18 Feb 2008 17:42:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A5616A417 for ; Mon, 18 Feb 2008 17:42:54 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3805F13C43E for ; Mon, 18 Feb 2008 17:42:54 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IHgs8Z061012 for ; Mon, 18 Feb 2008 17:42:54 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IHgrku061009 for perforce@freebsd.org; Mon, 18 Feb 2008 17:42:53 GMT (envelope-from raj@freebsd.org) Date: Mon, 18 Feb 2008 17:42:53 GMT Message-Id: <200802181742.m1IHgrku061009@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 17:42:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=135666 Change 135666 by raj@raj_mimi on 2008/02/18 17:41:53 Clean up U-Boot API glue protos etc.: introduce a dedicated header file. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#7 edit .. //depot/projects/e500/sys/boot/uboot/common/main.c#7 edit .. //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 edit .. //depot/projects/e500/sys/boot/uboot/lib/glue.c#6 edit .. //depot/projects/e500/sys/boot/uboot/lib/glue.h#1 add Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#7 (text+ko) ==== @@ -39,11 +39,7 @@ #include "api_public.h" #include "bootstrap.h" - -/* XXX this should go into header */ -struct sys_info *ub_get_sys_info(void); -const char *ub_env_enum(const char *); -char *ub_env_get(const char *); +#include "glue.h" /* * Return a 'boothowto' value corresponding to the kernel arguments in ==== //depot/projects/e500/sys/boot/uboot/common/main.c#7 (text+ko) ==== @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD: src/sys/boot/uboot/common/main.c,v 1.1 2008/02/16 22:13:11 marcel Exp $"); #include + +#include "api_public.h" #include "bootstrap.h" - +#include "glue.h" #include "libuboot.h" -#include "api_public.h" struct uboot_devdesc currdev; struct arch_switch archsw; /* MI/MD interface boundary */ @@ -54,11 +55,6 @@ extern unsigned char __sbss_end[]; extern unsigned char _end[]; -extern void * syscall_ptr; - -struct sys_info * ub_get_sys_info(void); - - void dump_si(struct sys_info *si) { #ifdef DEBUG ==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 (text+ko) ==== @@ -1,5 +1,10 @@ /* $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.1 2008/02/16 22:13:11 marcel Exp $ */ +/* + * This file needs to be kept in sync with U-Boot reference: + * http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/api_public.h + */ + #ifndef _API_PUBLIC_H_ #define _API_PUBLIC_H_ ==== //depot/projects/e500/sys/boot/uboot/lib/glue.c#6 (text+ko) ==== @@ -29,9 +29,10 @@ #include #include "api_public.h" +#include "glue.h" +#define DEBUG #undef DEBUG -#define DEBUG #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); printf(fmt,##args); } while (0) @@ -39,38 +40,6 @@ #define debugf(fmt, args...) #endif -/* console */ -int ub_getc(void); -int ub_tstc(void); -void ub_putc(char c); -void ub_puts(const char *s); - -/* system */ -void ub_reset(void); -struct sys_info * ub_get_sys_info(void); - -/* time */ -void ub_udelay(unsigned long); -unsigned long ub_get_timer(unsigned long); - -/* env vars */ -char * ub_env_get(const char *name); -void ub_env_set(const char *name, char *value); -const char * ub_env_enum(const char *last); - -/* devices */ -int ub_dev_enum(void); -int ub_dev_open(int handle); -int ub_dev_close(int handle); -int ub_dev_read(int handle, void *buf, - lbasize_t len, lbastart_t start); -int ub_dev_send(int handle, void *buf, int len); -int ub_dev_recv(int handle, void *buf, int len); - -int api_search_sig(struct api_signature **sig); - -extern int syscall(int, int *, ...); - /* Some random address used by U-Boot. */ extern long uboot_address; @@ -190,15 +159,6 @@ return 0; } - -/* - * NOTICE: ub_ library calls are part of the application, not U-Boot code! - * They are front-end wrappers that are used by the consumer application: they - * prepare arguments for particular syscall and jump to the low level - * syscall() - * - */ - /**************************************** * * console From owner-p4-projects@FreeBSD.ORG Mon Feb 18 17:51:53 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE45416A417; Mon, 18 Feb 2008 17:51:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD9216A417 for ; Mon, 18 Feb 2008 17:51:50 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.69]) by mx1.freebsd.org (Postfix) with ESMTP id 383AA13C45A for ; Mon, 18 Feb 2008 17:51:50 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp001-s [10.150.69.64]) by smtpoutm.mac.com (Xserve/smtpout006/MantshX 4.0) with ESMTP id m1IHpoBH003313; Mon, 18 Feb 2008 09:51:50 -0800 (PST) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp001/MantshX 4.0) with ESMTP id m1IHplOi001722 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 18 Feb 2008 09:51:48 -0800 (PST) Message-Id: <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> From: Marcel Moolenaar To: Rafal Jaworowski In-Reply-To: <200802181742.m1IHgrku061009@repoman.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 18 Feb 2008 09:51:46 -0800 References: <200802181742.m1IHgrku061009@repoman.freebsd.org> X-Mailer: Apple Mail (2.919.2) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 17:51:53 -0000 On Feb 18, 2008, at 9:42 AM, Rafal Jaworowski wrote: > ==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 (text > +ko) ==== > > @@ -1,5 +1,10 @@ > /* $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.1 2008/02/16 > 22:13:11 marcel Exp $ */ > > +/* > + * This file needs to be kept in sync with U-Boot reference: > + * http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/api_public.h > + */ > + > #ifndef _API_PUBLIC_H_ > #define _API_PUBLIC_H_ > Rafal, Can you add an appropriate copyright notice for this file. After that I'll merge the lot into CVS again... Thanks, -- Marcel Moolenaar xcllnt@mac.com From owner-p4-projects@FreeBSD.ORG Mon Feb 18 19:26:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E710A16A469; Mon, 18 Feb 2008 19:26:21 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D55316A41B; Mon, 18 Feb 2008 19:26:21 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDDA13C467; Mon, 18 Feb 2008 19:26:21 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 9FF0514376; Mon, 18 Feb 2008 20:34:42 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05064-06; Mon, 18 Feb 2008 20:34:41 +0100 (CET) Message-ID: <47B9DBD8.3090100@semihalf.com> Date: Mon, 18 Feb 2008 20:26:16 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802181742.m1IHgrku061009@repoman.freebsd.org> <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> In-Reply-To: <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Rafal Jaworowski , Perforce Change Reviews Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 19:26:22 -0000 Marcel Moolenaar wrote: >> ==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 (text+ko) > > Can you add an appropriate copyright notice for this file. > After that I'll merge the lot into CVS again... > The reason I did not put the (c) originally is I wasn't sure how to do it properly and simply followed U-Boot's export.h direction. It is desirable that this header file be verbatim copy of U-Boot's since it describes the API interface, but their files need to be GPL, ours BSD. So I left this without one, as the export.h does in similar case. Any advice on such matter? Anyone else has the clue? Rafal From owner-p4-projects@FreeBSD.ORG Mon Feb 18 19:46:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4733516A421; Mon, 18 Feb 2008 19:46:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E889016A41A for ; Mon, 18 Feb 2008 19:46:02 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DD16E13C43E for ; Mon, 18 Feb 2008 19:46:02 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IJk2kO073008 for ; Mon, 18 Feb 2008 19:46:02 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IJk2JI073005 for perforce@freebsd.org; Mon, 18 Feb 2008 19:46:02 GMT (envelope-from swise@FreeBSD.org) Date: Mon, 18 Feb 2008 19:46:02 GMT Message-Id: <200802181946.m1IJk2JI073005@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 135672 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 19:46:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135672 Change 135672 by swise@swise:vic10:iwarp on 2008/02/18 19:45:21 Support 5.0 firmware. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c#3 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c#3 (text+ko) ==== @@ -263,36 +263,19 @@ static int iwch_build_rdma_recv(struct iwch_dev *rhp, union t3_wr *wqe, struct ib_recv_wr *wr) { - int i, err = 0; - u32 pbl_addr[4]; - u8 page_size[4]; + int i; if (wr->num_sge > T3_MAX_SGE) return (-EINVAL); - err = iwch_sgl2pbl_map(rhp, wr->sg_list, wr->num_sge, pbl_addr, - page_size); - if (err) - return err; - wqe->recv.pagesz[0] = page_size[0]; - wqe->recv.pagesz[1] = page_size[1]; - wqe->recv.pagesz[2] = page_size[2]; - wqe->recv.pagesz[3] = page_size[3]; wqe->recv.num_sgle = cpu_to_be32(wr->num_sge); for (i = 0; i < wr->num_sge; i++) { wqe->recv.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey); wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length); - - /* to in the WQE == the offset into the page */ - wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) % - (1UL << (12 + page_size[i]))); - - /* pbl_addr is the adapters address in the PBL */ - wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]); + wqe->recv.sgl[i].to = cpu_to_be64(wr->sg_list[i].addr); } for (; i < T3_MAX_SGE; i++) { wqe->recv.sgl[i].stag = 0; wqe->recv.sgl[i].len = 0; wqe->recv.sgl[i].to = 0; - wqe->recv.pbl_addr[i] = 0; } return 0; } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 19:49:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31C6416A421; Mon, 18 Feb 2008 19:49:02 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA05616A420; Mon, 18 Feb 2008 19:49:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AD99113C465; Mon, 18 Feb 2008 19:49:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1IJfXja026854; Mon, 18 Feb 2008 12:41:33 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 18 Feb 2008 12:47:03 -0700 (MST) Message-Id: <20080218.124703.439510167.imp@bsdimp.com> To: raj@semihalf.com From: "M. Warner Losh" In-Reply-To: <47B9DBD8.3090100@semihalf.com> References: <200802181742.m1IHgrku061009@repoman.freebsd.org> <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> <47B9DBD8.3090100@semihalf.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: raj@FreeBSD.org, perforce@FreeBSD.org, xcllnt@mac.com Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 19:49:02 -0000 In message: <47B9DBD8.3090100@semihalf.com> Rafal Jaworowski writes: : Marcel Moolenaar wrote: : >> ==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#4 (text+ko) : > : > Can you add an appropriate copyright notice for this file. : > After that I'll merge the lot into CVS again... : > : : The reason I did not put the (c) originally is I wasn't sure how to do it : properly and simply followed U-Boot's export.h direction. It is desirable that : this header file be verbatim copy of U-Boot's since it describes the API : interface, but their files need to be GPL, ours BSD. So I left this without : one, as the export.h does in similar case. : : Any advice on such matter? Anyone else has the clue? If it is just an interface, one could add an explicit notice that things are in the public domain. Warner From owner-p4-projects@FreeBSD.ORG Mon Feb 18 20:31:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4B31816A46C; Mon, 18 Feb 2008 20:31:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC84316A419 for ; Mon, 18 Feb 2008 20:31:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E197213C4CC for ; Mon, 18 Feb 2008 20:31:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IKVnIo079345 for ; Mon, 18 Feb 2008 20:31:49 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IKVnmn079342 for perforce@freebsd.org; Mon, 18 Feb 2008 20:31:49 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 18 Feb 2008 20:31:49 GMT Message-Id: <200802182031.m1IKVnmn079342@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135673 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 20:31:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135673 Change 135673 by kmacy@kmacy:entropy:iwarp on 2008/02/18 20:31:44 remove "skipping" printf if mp0 is set Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#12 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#12 (text+ko) ==== @@ -942,9 +942,9 @@ else printf("returned EAGAIN\n"); } - } else if ((tp->t_flags & TF_TOE) && uio) - printf("skipping t3_soreceive flags=0x%x iovcnt=%d mp0=%p sb_state=0x%x\n", - flags, uio->uio_iovcnt, mp0, so->so_rcv.sb_state); + } else if ((tp->t_flags & TF_TOE) && uio && mp0 == NULL) + printf("skipping t3_soreceive flags=0x%x iovcnt=%d sb_state=0x%x\n", + flags, uio->uio_iovcnt, so->so_rcv.sb_state); return pru_soreceive(so, psa, uio, mp0, controlp, flagsp); } From owner-p4-projects@FreeBSD.ORG Mon Feb 18 21:12:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 485DF16A41B; Mon, 18 Feb 2008 21:12:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D55216A418 for ; Mon, 18 Feb 2008 21:12:33 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0312B13C461 for ; Mon, 18 Feb 2008 21:12:33 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ILCWpN091965 for ; Mon, 18 Feb 2008 21:12:32 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ILCWMn091962 for perforce@freebsd.org; Mon, 18 Feb 2008 21:12:32 GMT (envelope-from raj@freebsd.org) Date: Mon, 18 Feb 2008 21:12:32 GMT Message-Id: <200802182112.m1ILCWMn091962@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135677 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 21:12:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135677 Change 135677 by raj@raj_mimi on 2008/02/18 21:12:15 Improve HID0 fields recognition on E500 core (SEL_TBCLK). While there, eliminate redundant 7450 bitmask definition, other style fixes. Affected files ... .. //depot/projects/e500/sys/powerpc/include/hid.h#3 edit Differences ... ==== //depot/projects/e500/sys/powerpc/include/hid.h#3 (text+ko) ==== @@ -64,21 +64,14 @@ #define HID0_SGE 0x00000080 /* Enable store gathering */ #define HID0_DCFA 0x00000040 /* Data cache flush assist */ #define HID0_BTIC 0x00000020 /* Enable BTIC */ -#define HID0_LRSTK 0x00000010 /* Link register stack enable (7450) */ +#define HID0_LRSTK 0x00000010 /* Link register stack enable (7450) */ #define HID0_ABE 0x00000008 /* Enable address broadcast */ -#define HID0_FOLD 0x00000008 /* Branch folding enable (7450) */ +#define HID0_FOLD 0x00000008 /* Branch folding enable (7450) */ #define HID0_BHT 0x00000004 /* Enable branch history table */ #define HID0_NOPTI 0x00000001 /* No-op the dcbt(st) */ #if defined(AIM) -#define HID0_7450_BITMASK \ - "\20" \ - "\040EMCP\037b1\036b2\035b3\034b4\033TBEN\032b6\031STEN" \ - "\030HBATEN\027NAP\026SLEEP\025DPM\024b12\023BHTCLR\022XAEN\021NHR" \ - "\020ICE\017DCE\016ILOCK\015DLOCK\014ICFI\013DCFI\012SPD\011XBSEN" \ - "\010SGE\007b25\006BTIC\005LRSTK\004FOLD\003BHT\002NOPDST\001NOPTI" - #define HID0_TBEN 0x04000000 /* Time base enable (7450) */ #elif defined(E500) @@ -107,45 +100,45 @@ "\20" \ "\040EMCP\037b1\036b2\035b3\034b4\033b5\032b6\031b7" \ "\030DOZE\027NAP\026SLEEP\025b11\024b12\023b13\022b14\021b15" \ - "\020b16\017TBEN\016b18\015b19\014b20\013b21\012b22\011b23" \ + "\020b16\017TBEN\016SEL_TBCLK\015b19\014b20\013b21\012b22\011b23" \ "\010EN_MAS7_UPDATE\007DCFA\006b26\005b27\004b28\003b29\002b30\001NOPTI" /* * HID0 bit definitions per cpu model * - * bit 603 604 750 7400 7410 7450 7457 e500 - * 0 EMCP EMCP EMCP EMCP EMCP - - EMCP - * 1 - ECP DBP - - - - - - * 2 EBA EBA EBA EBA EDA - - - - * 3 EBD EBD EBD EBD EBD - - - - * 4 SBCLK - BCLK BCKL BCLK - - - - * 5 EICE - - - - TBEN TBEN - - * 6 ECLK - ECLK ECLK ECLK - - - - * 7 PAR PAR PAR PAR PAR STEN STEN - - * 8 DOZE - DOZE DOZE DOZE - HBATEN DOZE - * 9 NAP - NAP NAP NAP NAP NAP NAP - * 10 SLEEP - SLEEP SLEEP SLEEP SLEEP SLEEP SLEEP - * 11 DPM - DPM DPM DPM DPM DPM - - * 12 RISEG - - RISEG - - - - - * 13 - - - EIEC EIEC BHTCLR BHTCLR - - * 14 - - - - - XAEN XAEN - - * 15 - NHR NHR NHR NHR NHR NHR - - * 16 ICE ICE ICE ICE ICE ICE ICE - - * 17 DCE DCE DCE DCE DCE DCE DCE TBEN - * 18 ILOCK ILOCK ILOCK ILOCK ILOCK ILOCK ILOCK SEL_TBCLK - * 19 DLOCK DLOCK DLOCK DLOCK DLOCK DLOCK DLOCK - - * 20 ICFI ICFI ICFI ICFI ICFI ICFI ICFI - - * 21 DCFI DCFI DCFI DCFI DCFI DCFI DCFI - - * 22 - - SPD SPD SPG SPD SPD - - * 23 - - IFEM IFTT IFTT - XBSEN - - * 24 - SIE SGE SGE SGE SGE SGE EN_MAS7_UPDATE - * 25 - - DCFA DCFA DCFA - - DCFA - * 26 - - BTIC BTIC BTIC BTIC BTIC - - * 27 FBIOB - - - - LRSTK LRSTK - - * 28 - - ABE - - FOLD FOLD - - * 29 - BHT BHT BHT BHT BHT BHT - - * 30 - - - NOPDST NOPDST NOPDST NOPDST - - * 31 NOOPTI - NOOPTI NOPTI NOPTI NOPTI NOPTI NOPTI + * bit 603 604 750 7400 7410 7450 7457 e500 + * 0 EMCP EMCP EMCP EMCP EMCP - - EMCP + * 1 - ECP DBP - - - - - + * 2 EBA EBA EBA EBA EDA - - - + * 3 EBD EBD EBD EBD EBD - - - + * 4 SBCLK - BCLK BCKL BCLK - - - + * 5 EICE - - - - TBEN TBEN - + * 6 ECLK - ECLK ECLK ECLK - - - + * 7 PAR PAR PAR PAR PAR STEN STEN - + * 8 DOZE - DOZE DOZE DOZE - HBATEN DOZE + * 9 NAP - NAP NAP NAP NAP NAP NAP + * 10 SLEEP - SLEEP SLEEP SLEEP SLEEP SLEEP SLEEP + * 11 DPM - DPM DPM DPM DPM DPM - + * 12 RISEG - - RISEG - - - - + * 13 - - - EIEC EIEC BHTCLR BHTCLR - + * 14 - - - - - XAEN XAEN - + * 15 - NHR NHR NHR NHR NHR NHR - + * 16 ICE ICE ICE ICE ICE ICE ICE - + * 17 DCE DCE DCE DCE DCE DCE DCE TBEN + * 18 ILOCK ILOCK ILOCK ILOCK ILOCK ILOCK ILOCK SEL_TBCLK + * 19 DLOCK DLOCK DLOCK DLOCK DLOCK DLOCK DLOCK - + * 20 ICFI ICFI ICFI ICFI ICFI ICFI ICFI - + * 21 DCFI DCFI DCFI DCFI DCFI DCFI DCFI - + * 22 - - SPD SPD SPG SPD SPD - + * 23 - - IFEM IFTT IFTT - XBSEN - + * 24 - SIE SGE SGE SGE SGE SGE EN_MAS7_UPDATE + * 25 - - DCFA DCFA DCFA - - DCFA + * 26 - - BTIC BTIC BTIC BTIC BTIC - + * 27 FBIOB - - - - LRSTK LRSTK - + * 28 - - ABE - - FOLD FOLD - + * 29 - BHT BHT BHT BHT BHT BHT - + * 30 - - - NOPDST NOPDST NOPDST NOPDST - + * 31 NOOPTI - NOOPTI NOPTI NOPTI NOPTI NOPTI NOPTI * * 604: ECP = Enable cache parity checking * 604: SIE = Serial instruction execution disable From owner-p4-projects@FreeBSD.ORG Mon Feb 18 21:37:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 843F016A46B; Mon, 18 Feb 2008 21:37:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31A7016A421 for ; Mon, 18 Feb 2008 21:37:59 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 26BF813C44B for ; Mon, 18 Feb 2008 21:37:59 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ILbxFh093898 for ; Mon, 18 Feb 2008 21:37:59 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ILbxHH093895 for perforce@freebsd.org; Mon, 18 Feb 2008 21:37:59 GMT (envelope-from marcel@freebsd.org) Date: Mon, 18 Feb 2008 21:37:59 GMT Message-Id: <200802182137.m1ILbxHH093895@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135678 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 21:37:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135678 Change 135678 by marcel@marcel_xcllnt on 2008/02/18 21:37:25 o rename U-Boot loader to ubldr. o rename help file to ubldr.help o remove loader related configuration file or man pages. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#8 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#8 (text+ko) ==== @@ -1,9 +1,10 @@ # $FreeBSD: src/sys/boot/powerpc/uboot/Makefile,v 1.1 2008/02/16 22:40:55 marcel Exp $ -PROG= loader +PROG= ubldr NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b +NO_MAN= # Architecture-specific loader code SRCS= start.S conf.c metadata.c vers.c @@ -59,7 +60,7 @@ CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I. -CLEANFILES+= vers.c loader.help +CLEANFILES+= vers.c ${PROG}.help CFLAGS+= -ffreestanding @@ -84,16 +85,11 @@ vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} -loader.help: help.common help.uboot +${PROG}.help: help.common help.uboot cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} .PATH: ${.CURDIR}/../../forth -FILES= loader.help loader.4th support.4th loader.conf -FILESDIR_loader.conf= /boot/defaults - -.if !exists(${DESTDIR}/boot/loader.rc) -FILES+= loader.rc -.endif +FILES= ${PROG}.help .include From owner-p4-projects@FreeBSD.ORG Mon Feb 18 22:21:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDD6216A420; Mon, 18 Feb 2008 22:21:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E6616A41A for ; Mon, 18 Feb 2008 22:21:45 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A7C4013C442 for ; Mon, 18 Feb 2008 22:21:45 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1IMLjDY098092 for ; Mon, 18 Feb 2008 22:21:45 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1IMLjdK098089 for perforce@freebsd.org; Mon, 18 Feb 2008 22:21:45 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 18 Feb 2008 22:21:45 GMT Message-Id: <200802182221.m1IMLjdK098089@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135681 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 22:21:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135681 Change 135681 by thompsa@thompsa_heff on 2008/02/18 22:20:57 Remove the mbuf from the send queue early on as ieee80211_cancel_scan() will reenter wpi_start causing the mbuf to be sent and disappear from the queue. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#5 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#5 (text+ko) ==== @@ -2196,7 +2196,7 @@ if (ic->ic_state != IEEE80211_S_RUN) break; - IFQ_POLL(&ifp->if_snd, m0); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; @@ -2238,7 +2238,6 @@ break; } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); BPF_MTAP(ifp, m0); m0 = ieee80211_encap(ic, m0, ni); From owner-p4-projects@FreeBSD.ORG Mon Feb 18 22:54:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 07E2B16A41B; Mon, 18 Feb 2008 22:54:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C036116A417; Mon, 18 Feb 2008 22:54:10 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 7F7FF13C44B; Mon, 18 Feb 2008 22:54:09 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1JRBxo-0001kE-9p; Mon, 18 Feb 2008 22:47:44 +0300 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id 3D7FC7D1C05; Mon, 18 Feb 2008 22:47:43 +0300 (MSK) Date: Mon, 18 Feb 2008 22:47:43 +0300 From: Stanislav Sedov To: Rafal Jaworowski Message-ID: <20080218194743.GB73371@dracon.ht-systems.ru> References: <200802181742.m1IHgrku061009@repoman.freebsd.org> <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> <47B9DBD8.3090100@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47B9DBD8.3090100@semihalf.com> Organization: The FreeBSD Project X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI X-Mailer: carrier-pigeon X-Operating-System: FreeBSD quasar.ht-systems.ru 7.0-BETA2 FreeBSD 7.0-BETA2 Cc: Rafal Jaworowski , Perforce Change Reviews , Marcel Moolenaar Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 22:54:11 -0000 On Mon, Feb 18, 2008 at 08:26:16PM +0100 Rafal Jaworowski mentioned: > > The reason I did not put the (c) originally is I wasn't sure how to do it > properly and simply followed U-Boot's export.h direction. It is desirable that > this header file be verbatim copy of U-Boot's since it describes the API > interface, but their files need to be GPL, ours BSD. So I left this without > one, as the export.h does in similar case. > > Any advice on such matter? Anyone else has the clue? > I suppose, it'd be better to either ask Denk to release it in public domain, or reimplement the header ourselves. It'd be not very difficult to keep it in sync with u-boot by hand. -- Stanislav Sedov ST4096-RIPE From owner-p4-projects@FreeBSD.ORG Mon Feb 18 23:29:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13D5216A421; Mon, 18 Feb 2008 23:29:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1F6216A418 for ; Mon, 18 Feb 2008 23:29:56 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A76A513C4D1 for ; Mon, 18 Feb 2008 23:29:56 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1INTu0F003072 for ; Mon, 18 Feb 2008 23:29:56 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1INTuiV003069 for perforce@freebsd.org; Mon, 18 Feb 2008 23:29:56 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 18 Feb 2008 23:29:56 GMT Message-Id: <200802182329.m1INTuiV003069@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135683 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 23:29:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135683 Change 135683 by thompsa@thompsa_heff on 2008/02/18 23:29:07 MF //depot/user/benjsc/wpi/sys/dev/wpi/if_wpi.c@131090 Dont try to stop the callout. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#6 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#6 (text+ko) ==== @@ -1333,9 +1333,9 @@ int error; WPI_LOCK_DECL; - WPI_LOCK(sc); - callout_stop(&sc->calib_to); - WPI_UNLOCK(sc); + DPRINTF(("%s: %s -> %s\n", __func__, + ieee80211_state_name[ic->ic_state], + ieee80211_state_name[nstate])); switch (nstate) { case IEEE80211_S_SCAN: @@ -3329,14 +3329,15 @@ int temp; WPI_LOCK_DECL; + if ( ic->ic_state != IEEE80211_S_RUN ) + return; + /* automatic rate control triggered every 500ms */ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) { - WPI_LOCK(sc); if (ic->ic_opmode == IEEE80211_M_STA) wpi_iter_func(sc, ic->ic_bss); else ieee80211_iterate_nodes(&ic->ic_sta, wpi_iter_func, sc); - WPI_UNLOCK(sc); } /* update sensor data */ From owner-p4-projects@FreeBSD.ORG Mon Feb 18 23:33:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5099616A46E; Mon, 18 Feb 2008 23:33:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 153A816A421 for ; Mon, 18 Feb 2008 23:33:00 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E668F13C442 for ; Mon, 18 Feb 2008 23:32:59 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1INWxui003301 for ; Mon, 18 Feb 2008 23:32:59 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1INWxEw003291 for perforce@freebsd.org; Mon, 18 Feb 2008 23:32:59 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 18 Feb 2008 23:32:59 GMT Message-Id: <200802182332.m1INWxEw003291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135684 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 23:33:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135684 Change 135684 by thompsa@thompsa_heff on 2008/02/18 23:32:19 style. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#7 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#7 (text+ko) ==== @@ -3329,7 +3329,7 @@ int temp; WPI_LOCK_DECL; - if ( ic->ic_state != IEEE80211_S_RUN ) + if (ic->ic_state != IEEE80211_S_RUN) return; /* automatic rate control triggered every 500ms */ From owner-p4-projects@FreeBSD.ORG Mon Feb 18 23:35:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CD6B16A41A; Mon, 18 Feb 2008 23:35:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A9EE16A418 for ; Mon, 18 Feb 2008 23:35:02 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2820E13C467 for ; Mon, 18 Feb 2008 23:35:02 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1INZ2lU003471 for ; Mon, 18 Feb 2008 23:35:02 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1INZ1q8003467 for perforce@freebsd.org; Mon, 18 Feb 2008 23:35:01 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 18 Feb 2008 23:35:01 GMT Message-Id: <200802182335.m1INZ1q8003467@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135685 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 23:35:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=135685 Change 135685 by thompsa@thompsa_heff on 2008/02/18 23:34:33 style * 2 Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#8 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#8 (text+ko) ==== @@ -3330,7 +3330,7 @@ WPI_LOCK_DECL; if (ic->ic_state != IEEE80211_S_RUN) - return; + return; /* automatic rate control triggered every 500ms */ if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) { From owner-p4-projects@FreeBSD.ORG Mon Feb 18 23:51:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CAF216A41A; Mon, 18 Feb 2008 23:51:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119E016A418 for ; Mon, 18 Feb 2008 23:51:19 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0612913C442 for ; Mon, 18 Feb 2008 23:51:19 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1INpI5q004213 for ; Mon, 18 Feb 2008 23:51:18 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1INpIlj004210 for perforce@freebsd.org; Mon, 18 Feb 2008 23:51:18 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 18 Feb 2008 23:51:18 GMT Message-Id: <200802182351.m1INpIlj004210@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135686 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 23:51:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135686 Change 135686 by thompsa@thompsa_heff on 2008/02/18 23:50:54 MF //depot/user/benjsc/wpi/sys/dev/wpi/if_wpi.c@131089 1. ic->ic_bsschan is the bss channel, not ni->ni_cha; it's well-defined in RUN state so use it (other times it may be set to ANY) 2. remove watchdog_cnt since it does nothing bug duplicate sc_tx_timer 3. good drivers should never set channel state; remove code on SCAN_START 4. rewrite wpi_tx_start 5. calculate 802.11 header length correctly in wpi_tx_start 6. take ssid info from scan state, not ieee80211com; when a scan is issued by a user application it may be differnt (if not now, then in the future) o Place some debug code in wpi_scan under debug o Minor style changes (Note these don't include all the style changes provded by sam - they'll be committed in a separate commit) o Correct assoc state to fall through when not in RUN state Applied from a slightly modified version originally submitted by Submitted By: sam@ (With many thanks!) Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#9 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#9 (text+ko) ==== @@ -1339,8 +1339,8 @@ switch (nstate) { case IEEE80211_S_SCAN: - DPRINTF(("NEWSTATE:SCAN\n")); - /* Scanning is handled in net80211 via the scan_start, + /* + * Scanning is handled in net80211 via the scan_start, * scan_end, scan_curchan functions. Hence all we do when * changing to the SCAN state is update the leds */ @@ -1352,11 +1352,10 @@ case IEEE80211_S_ASSOC: DPRINTF(("NEWSTATE:ASSOC\n")); if (ic->ic_state != IEEE80211_S_RUN) - break; + break; /* FALLTHROUGH */ case IEEE80211_S_AUTH: - DPRINTF(("NEWSTATE:AUTH\n")); sc->flags |= WPI_FLAG_AUTH; sc->config.associd = 0; sc->config.filter &= ~htole32(WPI_FILTER_BSS); @@ -1365,7 +1364,6 @@ break; case IEEE80211_S_RUN: - DPRINTF(("NEWSTATE:RUN\n")); if (ic->ic_opmode == IEEE80211_M_MONITOR) { /* link LED blinks while monitoring */ wpi_set_led(sc, WPI_LED_LINK, 5, 5); @@ -1409,7 +1407,7 @@ return error; } - if ((error = wpi_set_txpower(sc, ic->ic_bss->ni_chan, 1)) != 0) { + if ((error = wpi_set_txpower(sc, ic->ic_bsschan, 1)) != 0) { device_printf(sc->sc_dev, "could set txpower\n"); return error; @@ -1428,9 +1426,6 @@ break; case IEEE80211_S_INIT: - DPRINTF(("NEWSTATE:INIT\n")); - break; - default: break; } @@ -1595,7 +1590,6 @@ struct wpi_rx_head *head; struct wpi_rx_tail *tail; struct wpi_rbuf *rbuf; - struct ieee80211_frame *wh; struct ieee80211_node *ni; struct mbuf *m, *mnew; WPI_LOCK_DECL; @@ -1688,12 +1682,11 @@ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m); } - wh = mtod(m, struct ieee80211_frame *); WPI_UNLOCK(sc); /* XXX frame length > sizeof(struct ieee80211_frame_min)? */ /* grab a reference to the source node */ - ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); /* send the frame to the 802.11 layer */ ieee80211_input(ic, m, ni, stat->rssi, 0, 0); @@ -1746,7 +1739,6 @@ ring->queued--; sc->sc_tx_timer = 0; - sc->watchdog_cnt = 0; callout_stop(&sc->watchdog_to); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; wpi_start(ifp); @@ -1855,9 +1847,6 @@ DPRINTFN(WPI_DEBUG_SCANNING, ("scanning channel %d status %x\n", scan->chan, le32toh(scan->status))); - - /* fix current channel */ - ic->ic_bss->ni_chan = &ic->ic_channels[scan->chan]; break; } case WPI_STOP_SCAN: @@ -1877,7 +1866,8 @@ struct wpi_missed_beacon *beacon = (struct wpi_missed_beacon *)(desc + 1); - if (le32toh(beacon->consecutive) >= ic->ic_bmissthreshold) { + if (le32toh(beacon->consecutive) >= + ic->ic_bmissthreshold) { DPRINTF(("Beacon miss: %u >= %u\n", le32toh(beacon->consecutive), ic->ic_bmissthreshold)); @@ -1892,7 +1882,6 @@ /* tell the firmware what we have processed */ hw = (hw == 0) ? WPI_RX_RING_COUNT - 1 : hw - 1; WPI_WRITE(sc, WPI_RX_WIDX, hw & ~7); - } static void @@ -1977,6 +1966,7 @@ int ac) { struct ieee80211com *ic = &sc->sc_ic; + const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; struct wpi_tx_ring *ring = &sc->txq[ac]; struct wpi_tx_desc *desc; struct wpi_tx_data *data; @@ -1984,9 +1974,8 @@ struct wpi_cmd_data *tx; struct ieee80211_frame *wh; struct ieee80211_key *k; - const struct chanAccParams *cap; struct mbuf *mnew; - int i, error, nsegs, rate, hdrlen, noack = 0; + int i, error, nsegs, rate, hdrlen, ismcast; bus_dma_segment_t segs[WPI_MAX_SCATTER]; desc = &ring->desc[ring->cur]; @@ -1994,60 +1983,19 @@ wh = mtod(m0, struct ieee80211_frame *); - if (IEEE80211_QOS_HAS_SEQ(wh)) { - hdrlen = sizeof (struct ieee80211_qosframe); - cap = &ic->ic_wme.wme_chanParams; - noack = cap->cap_wmeParams[ac].wmep_noackPolicy; - } else - hdrlen = sizeof (struct ieee80211_frame); + hdrlen = ieee80211_hdrsize(wh); + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); if (wh->i_fc[1] & IEEE80211_FC1_WEP) { - if ((k = ieee80211_crypto_encap(ic, ni, m0)) == NULL) { + k = ieee80211_crypto_encap(ic, ni, m0); + if (k == NULL){ m_freem(m0); return ENOBUFS; } - /* packet header may have moved, reset our local pointer */ wh = mtod(m0, struct ieee80211_frame *); } - /* pickup a rate */ - if (IEEE80211_IS_MULTICAST(wh->i_addr1)|| - ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT)) { - /* - * mgmt/multicast frames are sent at the lowest available - * bit-rate - */ - rate = ni->ni_rates.rs_rates[0]; - } else { - if (ic->ic_fixed_rate != -1) { - rate = ic->ic_sup_rates[ic->ic_curmode]. - rs_rates[ic->ic_fixed_rate]; - } else - rate = ni->ni_rates.rs_rates[ni->ni_txrate]; - } - rate &= IEEE80211_RATE_VAL; - -#ifndef WPI_CURRENT - if (sc->sc_drvbpf != NULL) { -#else - if (bpf_peers_present(sc->sc_drvbpf)) { -#endif - - struct wpi_tx_radiotap_header *tap = &sc->sc_txtap; - - tap->wt_flags = 0; - tap->wt_chan_freq = htole16(ni->ni_chan->ic_freq); - tap->wt_chan_flags = htole16(ni->ni_chan->ic_flags); - tap->wt_rate = rate; - tap->wt_hwqueue = ac; - if (wh->i_fc[1] & IEEE80211_FC1_WEP) - tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP; - - bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0); - } - cmd = &ring->cmd[ring->cur]; cmd->code = WPI_CMD_TX_DATA; cmd->flags = 0; @@ -2055,45 +2003,67 @@ cmd->idx = ring->cur; tx = (struct wpi_cmd_data *)cmd->data; - tx->flags = 0; + tx->flags = htole32(WPI_TX_AUTO_SEQ); + tx->timeout= htole16(0); + tx->ofdm_mask = 0xff; + tx->cck_mask = 0x0f; + tx->lifetime = htole32(WPI_LIFETIME_INFINITE); + tx->id = ismcast ? WPI_ID_BROADCAST : WPI_ID_BSS; + tx->len = htole16( m0->m_pkthdr.len); - if (!noack && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { - tx->flags |= htole32(WPI_TX_NEED_ACK); - } else if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > ic->ic_rtsthreshold) { - tx->flags |= htole32(WPI_TX_NEED_RTS | WPI_TX_FULL_TXOP); + if (ismcast) { + if ((ni->ni_flags & IEEE80211_NODE_QOS) == 0 || + !cap->cap_wmeParams[ac].wmep_noackPolicy) + tx->flags |= htole32(WPI_TX_NEED_ACK); + if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > ic->ic_rtsthreshold) { + tx->flags |= htole32(WPI_TX_NEED_RTS|WPI_TX_FULL_TXOP); + tx->rts_ntries = 7; + } } - tx->flags |= htole32(WPI_TX_AUTO_SEQ); - - tx->id = IEEE80211_IS_MULTICAST(wh->i_addr1) ? WPI_ID_BROADCAST : - WPI_ID_BSS; - - if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == - IEEE80211_FC0_TYPE_MGT) { + /* pick a rate */ + if((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MASK){ uint8_t subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; /* tell h/w to set timestamp in probe responses */ if (subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP) - tx->flags |= htole32(WPI_TX_INSERT_TSTAMP); + tx->flags |= htole32(WPI_TX_INSERT_TSTAMP); if (subtype == IEEE80211_FC0_SUBTYPE_ASSOC_REQ || - subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) + subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) tx->timeout = htole16(3); else tx->timeout = htole16(2); - } else - tx->timeout = htole16(0); + rate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL; + } else if (ismcast ){ + rate = ic->ic_mcast_rate; + } else if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE){ + rate = ic->ic_fixed_rate; + } else { + rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + rate &= IEEE80211_RATE_VAL; + } tx->rate = wpi_plcp_signal(rate); /* be very persistant at sending frames out */ - tx->rts_ntries = 7; - tx->data_ntries = 15; + tx->data_ntries = 15; /* XXX Way too high */ - tx->ofdm_mask = 0xff; - tx->cck_mask = 0x0f; - tx->lifetime = htole32(WPI_LIFETIME_INFINITE); +#ifndef WPI_CURRENT + if (sc->sc_drvbpf != NULL ){ +#else + if (bpf_peers_present(sc->sc_drvbpf)){ +#endif + struct wpi_tx_radiotap_header *tap = &sc->sc_txtap; + tap->wt_flags = 0; + tap->wt_chan_freq = htole16(ni->ni_chan->ic_freq); + tap->wt_chan_flags = htole16(ni->ni_chan->ic_flags); + tap->wt_rate = rate; + tap->wt_hwqueue = ac; + if (wh->i_fc[1] & IEEE80211_FC1_WEP) + tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP; - tx->len = htole16(m0->m_pkthdr.len); + bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0); + } /* save and trim IEEE802.11 header */ m_copydata(m0, 0, hdrlen, (caddr_t)&tx->wh); @@ -2227,10 +2197,7 @@ continue; } - /* no QoS encapsulation for EAPOL frames */ - ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ? - M_WME_GETAC(m0) : WME_AC_BE; - + ac = M_WME_GETAC(m0); if (sc->txq[ac].queued > sc->txq[ac].count - 8) { /* there is no place left in this ring */ IFQ_DRV_PREPEND(&ifp->if_snd, m0); @@ -2262,7 +2229,6 @@ } sc->sc_tx_timer = 5; - sc->watchdog_cnt = 5; ic->ic_lastdata = ticks; } @@ -2277,17 +2243,12 @@ WPI_LOCK(sc); - DPRINTFN(WPI_DEBUG_WATCHDOG, ("watchdog_cnt: %d\n", sc->watchdog_cnt)); - - if (sc->watchdog_cnt == 0 || --sc->watchdog_cnt) - goto done; - - if (--sc->sc_tx_timer != 0) { + DPRINTFN(WPI_DEBUG_WATCHDOG, ("tx_timer: %d\n", sc->sc_tx_timer)); + if (sc->sc_tx_timer && --sc->sc_tx_timer != 0) { device_printf(sc->sc_dev,"device timeout\n"); ifp->if_oerrors++; taskqueue_enqueue(sc->sc_tq2, &sc->sc_restarttask); } -done: WPI_UNLOCK(sc); } @@ -2685,6 +2646,7 @@ wpi_scan(struct wpi_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_scan_state *ss = ic->ic_scan; struct wpi_tx_ring *ring = &sc->cmdq; struct wpi_tx_desc *desc; struct wpi_tx_data *data; @@ -2696,7 +2658,7 @@ struct ieee80211_channel *c; enum ieee80211_phymode mode; uint8_t *frm; - int nrates, pktlen, error; + int nrates, pktlen, error, i, nssid; bus_addr_t physaddr; struct ifnet *ifp = ic->ic_ifp; @@ -2743,17 +2705,21 @@ hdr->tx.flags = htole32(WPI_TX_AUTO_SEQ); /*XXX Need to cater for multiple essids */ - memset(&hdr->scan_essids[0], 0, 4 * sizeof(hdr->scan_essids[0])); - hdr->scan_essids[0].id = IEEE80211_ELEMID_SSID; - hdr->scan_essids[0].esslen = ic->ic_des_ssid[0].len; - memcpy(hdr->scan_essids[0].essid, ic->ic_des_ssid[0].ssid, - ic->ic_des_ssid[0].len); - - if (wpi_debug & WPI_DEBUG_SCANNING) { + memset(&hdr->scan_essids, 0, sizeof(hdr->scan_essids)); + nssid = MIN(ss->ss_nssid, WPI_SCAN_MAX_ESSIDS); + for(i = 0; i < nssid; i++ ){ + hdr->scan_essids[i].id = IEEE80211_ELEMID_SSID; + hdr->scan_essids[i].esslen = MIN(ss->ss_ssid[i].len, 32); + memcpy(hdr->scan_essids[i].essid, ss->ss_ssid[i].ssid, + hdr->scan_essids[i].esslen); +#ifdef WPI_DEBUG + if (wpi_debug & WPI_DEBUG_SCANNING) { printf("Scanning Essid: "); - ieee80211_print_essid(ic->ic_des_ssid[0].ssid, - ic->ic_des_ssid[0].len); + ieee80211_print_essid(ic->ic_des_ssid[i].ssid, + ic->ic_des_ssid[i].len); printf("\n"); + } +#endif } /* @@ -3259,7 +3225,7 @@ uint32_t tmp; int ac; - sc->watchdog_cnt = sc->sc_tx_timer = 0; + sc->sc_tx_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); /* disable interrupts */ @@ -3905,7 +3871,7 @@ default: KASSERT(1, ("Unknown Command: %d\n", cmd)); - return "UNKNOWN CMD"; // Make the compiler happy + return "UNKNOWN CMD"; /* Make the compiler happy */ } } #endif From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:12:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 803B816A469; Tue, 19 Feb 2008 00:12:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13A9016A419 for ; Tue, 19 Feb 2008 00:12:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 085D413C448 for ; Tue, 19 Feb 2008 00:12:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0Ced0006292 for ; Tue, 19 Feb 2008 00:12:40 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0Cegr006289 for perforce@freebsd.org; Tue, 19 Feb 2008 00:12:40 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 00:12:40 GMT Message-Id: <200802190012.m1J0Cegr006289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135687 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:12:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=135687 Change 135687 by sam@sam_ebb on 2008/02/19 00:12:15 first step towards vap support Affected files ... .. //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#7 edit .. //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.h#5 edit .. //depot/projects/vap/sys/dev/ath/if_ath.c#22 edit .. //depot/projects/vap/sys/dev/ath/if_athrate.h#7 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#12 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#7 (text+ko) ==== @@ -671,15 +671,15 @@ ath_rate_ctl_reset(struct ath_softc *sc, struct ieee80211_node *ni) { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) - struct ieee80211com *ic = &sc->sc_ic; struct ath_node *an = ATH_NODE(ni); + const struct ieee80211_txparam *tp = an->an_tp; struct sample_node *sn = ATH_NODE_SAMPLE(an); const HAL_RATE_TABLE *rt = sc->sc_currates; int x, y, srate; KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); sn->static_rate_ndx = -1; - if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) { + if (tp != NULL && tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { /* * A fixed rate is to be used; ic_fixed_rate is the * IEEE code for this rate (sans basic bit). Convert this @@ -688,7 +688,7 @@ */ /* NB: the rate set is assumed sorted */ srate = ni->ni_rates.rs_nrates - 1; - for (; srate >= 0 && RATE(srate) != ic->ic_fixed_rate; srate--) + for (; srate >= 0 && RATE(srate) != tp->ucastrate; srate--) ; /* * The fixed rate may not be available due to races @@ -786,18 +786,19 @@ * Reset the rate control state for each 802.11 state transition. */ void -ath_rate_newstate(struct ath_softc *sc, enum ieee80211_state state) +ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) { - struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211com *ic = vap->iv_ic; + struct ath_softc *sc = ic->ic_ifp->if_softc; if (state == IEEE80211_S_RUN) { - if (ic->ic_opmode != IEEE80211_M_STA) { + if (vap->iv_opmode != IEEE80211_M_STA) { /* * Sync rates for associated stations and neighbors. */ ieee80211_iterate_nodes(&ic->ic_sta, rate_cb, sc); } - ath_rate_newassoc(sc, ATH_NODE(ic->ic_bss), 1); + ath_rate_newassoc(sc, ATH_NODE(vap->iv_bss), 1); } } ==== //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.h#5 (text+ko) ==== ==== //depot/projects/vap/sys/dev/ath/if_ath.c#22 (text+ko) ==== @@ -99,49 +99,57 @@ ATH_LED_POLL, }; +static struct ieee80211vap *ath_vap_create(struct ieee80211com *, + const char name[IFNAMSIZ], int unit, int opmode, + int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]); +static void ath_vap_delete(struct ieee80211vap *); static void ath_init(void *); static void ath_stop_locked(struct ifnet *); static void ath_stop(struct ifnet *); static void ath_start(struct ifnet *); static int ath_reset(struct ifnet *); +static int ath_reset_vap(struct ieee80211vap *); static int ath_media_change(struct ifnet *); static void ath_watchdog(struct ifnet *); static int ath_ioctl(struct ifnet *, u_long, caddr_t); static void ath_fatal_proc(void *, int); static void ath_rxorn_proc(void *, int); +static void ath_bmiss_vap(struct ieee80211vap *); static void ath_bmiss_proc(void *, int); -static int ath_key_alloc(struct ieee80211com *, +static int ath_key_alloc(struct ieee80211vap *, const struct ieee80211_key *, ieee80211_keyix *, ieee80211_keyix *); -static int ath_key_delete(struct ieee80211com *, +static int ath_key_delete(struct ieee80211vap *, const struct ieee80211_key *); -static int ath_key_set(struct ieee80211com *, const struct ieee80211_key *, +static int ath_key_set(struct ieee80211vap *, const struct ieee80211_key *, const u_int8_t mac[IEEE80211_ADDR_LEN]); -static void ath_key_update_begin(struct ieee80211com *); -static void ath_key_update_end(struct ieee80211com *); +static void ath_key_update_begin(struct ieee80211vap *); +static void ath_key_update_end(struct ieee80211vap *); static void ath_mode_init(struct ath_softc *); static void ath_setslottime(struct ath_softc *); static void ath_updateslot(struct ifnet *); static int ath_beaconq_setup(struct ath_hal *); static int ath_beacon_alloc(struct ath_softc *, struct ieee80211_node *); -static void ath_beacon_update(struct ieee80211com *, int item); +static void ath_beacon_update(struct ieee80211vap *, int item); static void ath_beacon_setup(struct ath_softc *, struct ath_buf *); static void ath_beacon_proc(void *, int); +static struct ath_buf *ath_beacon_generate(struct ath_softc *, + struct ieee80211vap *); static void ath_bstuck_proc(void *, int); +static void ath_beacon_return(struct ath_softc *, struct ath_buf *); static void ath_beacon_free(struct ath_softc *); -static void ath_beacon_config(struct ath_softc *); +static void ath_beacon_config(struct ath_softc *, struct ieee80211vap *); static void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *, ath_bufhead *); static int ath_desc_alloc(struct ath_softc *); static void ath_desc_free(struct ath_softc *); static struct ieee80211_node *ath_node_alloc(struct ieee80211_node_table *); static void ath_node_free(struct ieee80211_node *); -static int8_t ath_node_getrssi(const struct ieee80211_node *); static void ath_node_getsignal(const struct ieee80211_node *, int8_t *, int8_t *); static int ath_rxbuf_init(struct ath_softc *, struct ath_buf *); -static void ath_recv_mgmt(struct ieee80211com *ic, struct mbuf *m, - struct ieee80211_node *ni, +static void ath_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, int rssi, int noise, u_int32_t rstamp); static void ath_setdefantenna(struct ath_softc *, u_int); static void ath_rx_proc(void *, int); @@ -157,6 +165,7 @@ static void ath_tx_proc_q0(void *, int); static void ath_tx_proc_q0123(void *, int); static void ath_tx_proc(void *, int); +static void ath_tx_draintxq(struct ath_softc *, struct ath_txq *); static int ath_chan_set(struct ath_softc *, struct ieee80211_channel *); static void ath_draintxq(struct ath_softc *); static void ath_stoprecv(struct ath_softc *); @@ -166,13 +175,12 @@ static void ath_scan_end(struct ieee80211com *); static void ath_set_channel(struct ieee80211com *); static void ath_calibrate(void *); -static int ath_newstate(struct ieee80211com *, enum ieee80211_state, int); +static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void ath_setup_stationkey(struct ieee80211_node *); static void ath_newassoc(struct ieee80211_node *, int); static int ath_getchannels(struct ath_softc *, HAL_REG_DOMAIN, HAL_CTRY_CODE, HAL_BOOL, HAL_BOOL); static void ath_led_event(struct ath_softc *, int); -static void ath_update_txpow(struct ath_softc *); static int ath_rate_setup(struct ath_softc *, u_int mode); static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); @@ -378,7 +386,6 @@ goto bad; } callout_init(&sc->sc_cal_ch, CALLOUT_MPSAFE); - callout_init(&sc->sc_dfs_ch, CALLOUT_MPSAFE); ATH_TXBUF_LOCK_INIT(sc); @@ -412,8 +419,6 @@ error = EIO; goto bad2; } - /* NB: s/w q, qnum used only by WITNESS */ - ath_txq_init(sc, &sc->sc_mcastq, HAL_NUM_TX_QUEUES+1); /* NB: insure BK queue is the lowest priority h/w queue */ if (!ath_tx_setup(sc, WME_AC_BK, HAL_WME_AC_BK)) { if_printf(ifp, "unable to setup xmit queue for %s traffic!\n", @@ -497,10 +502,6 @@ IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; - ic->ic_reset = ath_reset; - ic->ic_newassoc = ath_newassoc; - ic->ic_updateslot = ath_updateslot; - ic->ic_wme.wme_update = ath_wme_update; /* XXX not right but it's not used anywhere important */ ic->ic_phytype = IEEE80211_T_OFDM; ic->ic_opmode = IEEE80211_M_STA; @@ -603,32 +604,26 @@ /* get mac address from hardware */ ath_hal_getmac(ah, ic->ic_myaddr); + /* NB: used to size node table key mapping array */ + ic->ic_max_keyix = sc->sc_keymax; /* call MI attach routine. */ ieee80211_ifattach(ic); sc->sc_opmode = ic->ic_opmode; + /* override default methods */ + ic->ic_newassoc = ath_newassoc; + ic->ic_updateslot = ath_updateslot; + ic->ic_wme.wme_update = ath_wme_update; + ic->ic_vap_create = ath_vap_create; + ic->ic_vap_delete = ath_vap_delete; + ic->ic_raw_xmit = ath_raw_xmit; ic->ic_node_alloc = ath_node_alloc; sc->sc_node_free = ic->ic_node_free; ic->ic_node_free = ath_node_free; - ic->ic_node_getrssi = ath_node_getrssi; ic->ic_node_getsignal = ath_node_getsignal; - sc->sc_recv_mgmt = ic->ic_recv_mgmt; - ic->ic_recv_mgmt = ath_recv_mgmt; - sc->sc_newstate = ic->ic_newstate; - ic->ic_newstate = ath_newstate; ic->ic_scan_start = ath_scan_start; ic->ic_scan_end = ath_scan_end; ic->ic_set_channel = ath_set_channel; - ic->ic_crypto.cs_max_keyix = sc->sc_keymax; - ic->ic_crypto.cs_key_alloc = ath_key_alloc; - ic->ic_crypto.cs_key_delete = ath_key_delete; - ic->ic_crypto.cs_key_set = ath_key_set; - ic->ic_crypto.cs_key_update_begin = ath_key_update_begin; - ic->ic_crypto.cs_key_update_end = ath_key_update_end; - ic->ic_raw_xmit = ath_raw_xmit; - ic->ic_update_beacon = ath_beacon_update; - /* complete initialization */ - ieee80211_media_init(ic, ath_media_change, ieee80211_media_status); ath_bpfattach(sc); /* @@ -690,6 +685,112 @@ return 0; } +static struct ieee80211vap * +ath_vap_create(struct ieee80211com *ic, + const char name[IFNAMSIZ], int unit, int opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + struct ath_vap *avp; + struct ieee80211vap *vap; + + if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ + return NULL; + avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), + M_80211_VAP, M_NOWAIT | M_ZERO); + if (avp == NULL) + return NULL; + vap = &avp->av_vap; + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + + /* h/w crypto support */ + vap->iv_key_alloc = ath_key_alloc; + vap->iv_key_delete = ath_key_delete; + vap->iv_key_set = ath_key_set; + vap->iv_key_update_begin = ath_key_update_begin; + vap->iv_key_update_end = ath_key_update_end; + + /* override various methods */ + avp->av_recv_mgmt = vap->iv_recv_mgmt; + vap->iv_recv_mgmt = ath_recv_mgmt; + vap->iv_reset = ath_reset_vap; + vap->iv_update_beacon = ath_beacon_update; + avp->av_newstate = vap->iv_newstate; + vap->iv_newstate = ath_newstate; + avp->av_bmiss = vap->iv_bmiss; + vap->iv_bmiss = ath_bmiss_vap; + + /* complete setup */ + ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status); + + ic->ic_opmode = opmode; + return vap; +} + +static void +ath_vap_delete(struct ieee80211vap *vap) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ath_softc *sc = ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + struct ath_vap *avp = ATH_VAP(vap); + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * Quiesce the hardware while we remove the vap. In + * particular we need to reclaim all references to + * the vap state by any frames pending on the tx queues. + */ + ath_hal_intrset(ah, 0); /* disable interrupts */ + ath_draintxq(sc); /* stop xmit side */ + ath_stoprecv(sc); /* stop recv side */ + } + /* + * Reclaim any pending mcast frames for the vap. + */ + ath_tx_draintxq(sc, &avp->av_mcastq); + ATH_TXQ_LOCK_DESTROY(&avp->av_mcastq); + + /* + * Reclaim beacon state. Note this must be done before + * the vap instance is reclaimed as we may have a reference + * to it in the buffer for the beacon frame. + */ + if (avp->av_bcbuf != NULL) { + if (avp->av_bslot != -1) { + sc->sc_bslot[avp->av_bslot] = NULL; + sc->sc_nbcnvaps--; + } + ath_beacon_return(sc, avp->av_bcbuf); + avp->av_bcbuf = NULL; + if (sc->sc_nbcnvaps == 0) + sc->sc_stagbeacons = 0; + } + /* + * Update bookkeeping. + */ + if (vap->iv_opmode == IEEE80211_M_STA) { + sc->sc_nstavaps--; + } + ieee80211_vap_detach(vap); + free(avp, M_80211_VAP); + sc->sc_nvaps--; + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * Restart rx+tx machines if still running (RUNNING will + * be reset if we just destroyed the last vap). + */ + if (ath_startrecv(sc) != 0) + if_printf(ifp, "%s: unable to restart recv logic\n", + __func__); + if (sc->sc_beacons) + ath_beacon_config(sc, NULL); + ath_hal_intrset(ah, sc->sc_imask); + } +} + void ath_suspend(struct ath_softc *sc) { @@ -864,37 +965,39 @@ } static void +ath_bmiss_vap(struct ieee80211vap *vap) +{ + struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; + u_int64_t lastrx = sc->sc_lastrx; + u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); + u_int bmisstimeout = + vap->iv_bmissthreshold * vap->iv_bss->ni_intval * 1024; + + DPRINTF(sc, ATH_DEBUG_BEACON, + "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n", + __func__, (unsigned long long) tsf, + (unsigned long long)(tsf - lastrx), + (unsigned long long) lastrx, bmisstimeout); + /* + * Workaround phantom bmiss interrupts by sanity-checking + * the time of our last rx'd frame. If it is within the + * beacon miss interval then ignore the interrupt. If it's + * truly a bmiss we'll get another interrupt soon and that'll + * be dispatched up for processing. + */ + if (tsf - lastrx > bmisstimeout) + ATH_VAP(vap)->av_bmiss(vap); + else + sc->sc_stats.ast_bmiss_phantom++; +} + +static void ath_bmiss_proc(void *arg, int pending) { struct ath_softc *sc = arg; - struct ieee80211com *ic = &sc->sc_ic; DPRINTF(sc, ATH_DEBUG_ANY, "%s: pending %u\n", __func__, pending); - KASSERT(ic->ic_opmode == IEEE80211_M_STA, - ("unexpect operating mode %u", ic->ic_opmode)); - if (ic->ic_state == IEEE80211_S_RUN) { - u_int64_t lastrx = sc->sc_lastrx; - u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah); - u_int bmisstimeout = - ic->ic_bmissthreshold * ic->ic_bss->ni_intval * 1024; - - DPRINTF(sc, ATH_DEBUG_BEACON, - "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n", - __func__, (unsigned long long) tsf, - (unsigned long long)(tsf - lastrx), - (unsigned long long) lastrx, bmisstimeout); - /* - * Workaround phantom bmiss interrupts by sanity-checking - * the time of our last rx'd frame. If it is within the - * beacon miss interval then ignore the interrupt. If it's - * truly a bmiss we'll get another interrupt soon and that'll - * be dispatched up for processing. - */ - if (tsf - lastrx > bmisstimeout) - ieee80211_beacon_miss(ic); - else - sc->sc_stats.ast_bmiss_phantom++; - } + ieee80211_beacon_miss(&sc->sc_ic); } /* @@ -971,13 +1074,9 @@ status); goto done; } + ath_chan_change(sc, ic->ic_curchan); /* - * This is needed only to setup initial state - * but it's best done after a reset. - */ - ath_update_txpow(sc); - /* * Likewise this is set during reset so update * state cached in the driver. */ @@ -1009,27 +1108,16 @@ */ if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; - ath_hal_intrset(ah, sc->sc_imask); ifp->if_drv_flags |= IFF_DRV_RUNNING; - ic->ic_state = IEEE80211_S_INIT; + ath_hal_intrset(ah, sc->sc_imask); - /* - * The hardware should be ready to go now so it's safe - * to kick the 802.11 state machine as it's likely to - * immediately call back to us to send mgmt frames. - */ - ath_chan_change(sc, ic->ic_curchan); #ifdef ATH_TX99_DIAG if (sc->sc_tx99 != NULL) sc->sc_tx99->start(sc->sc_tx99); else #endif - if (ic->ic_opmode != IEEE80211_M_MONITOR) { - if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) - ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); - } else - ieee80211_new_state(ic, IEEE80211_S_RUN, -1); + ieee80211_start_all(ic); /* start all vap's */ done: ATH_UNLOCK(sc); } @@ -1038,7 +1126,6 @@ ath_stop_locked(struct ifnet *ifp) { struct ath_softc *sc = ifp->if_softc; - struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; DPRINTF(sc, ATH_DEBUG_ANY, "%s: invalid %u if_flags 0x%x\n", @@ -1065,7 +1152,6 @@ if (sc->sc_tx99 != NULL) sc->sc_tx99->stop(sc->sc_tx99); #endif - ieee80211_new_state(ic, IEEE80211_S_INIT, -1); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; ifp->if_timer = 0; if (!sc->sc_invalid) { @@ -1083,8 +1169,7 @@ ath_hal_phydisable(ah); } else sc->sc_rxlink = NULL; - IFQ_DRV_PURGE(&ifp->if_snd); - ath_beacon_free(sc); + ath_beacon_free(sc); /* XXX not needed */ } } @@ -1138,7 +1223,6 @@ if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_TRUE, &status)) if_printf(ifp, "%s: unable to reset hardware; hal status %u\n", __func__, status); - ath_update_txpow(sc); /* update tx power state */ sc->sc_diversity = ath_hal_getdiversity(ah); sc->sc_calinterval = 1; sc->sc_caltries = 0; @@ -1150,14 +1234,20 @@ * might change as a result. */ ath_chan_change(sc, ic->ic_curchan); - if (ic->ic_state == IEEE80211_S_RUN) - ath_beacon_config(sc); /* restart beacons */ + if (sc->sc_beacons) + ath_beacon_config(sc, NULL); /* restart beacons */ ath_hal_intrset(ah, sc->sc_imask); ath_start(ifp); /* restart xmit */ return 0; } +static int +ath_reset_vap(struct ieee80211vap *vap) +{ + return ath_reset(vap->iv_ic->ic_ifp); +} + static int ath_ff_always(struct ath_txq *txq, struct ath_buf *bf) { @@ -1210,7 +1300,7 @@ sc->sc_stats.ast_ff_flush++; /* encap and xmit */ - bf->bf_m = ieee80211_encap(&sc->sc_ic, bf->bf_m, ni); + bf->bf_m = ieee80211_encap(ni, bf->bf_m); if (bf->bf_m == NULL) { DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_FF, "%s: discard, encapsulation failure\n", @@ -1330,7 +1420,6 @@ ath_ff_check(struct ath_softc *sc, struct ath_txq *txq, struct ath_buf *bf, struct mbuf *m, struct ieee80211_node *ni) { - struct ieee80211com *ic = ni->ni_ic; struct ath_node *an = ATH_NODE(ni); struct ath_buf *bfstaged; int ff_flush, pri; @@ -1423,7 +1512,7 @@ ether_sprintf(an->an_node.ni_macaddr)); /* encap and xmit */ - bfstaged->bf_m = ieee80211_encap(ic, bfstaged->bf_m, ni); + bfstaged->bf_m = ieee80211_encap(ni, bfstaged->bf_m); if (bfstaged->bf_m == NULL) { DPRINTF(sc, ATH_DEBUG_XMIT | ATH_DEBUG_FF, "%s: discard, encap failure\n", __func__); @@ -1525,13 +1614,10 @@ ath_start(struct ifnet *ifp) { struct ath_softc *sc = ifp->if_softc; - struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; struct ath_buf *bf; struct mbuf *m, *next; - struct ieee80211_frame *wh; - struct ether_header *eh; struct ath_txq *txq; ath_bufhead frags; int pri; @@ -1539,6 +1625,9 @@ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) return; for (;;) { + IFQ_POLL(&ifp->if_snd, m); + if (m == NULL) + break; /* * Grab a TX buffer and associated resources. */ @@ -1550,158 +1639,70 @@ if (bf == NULL) { DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of xmit buffers\n", __func__); + /* XXX tail drop */ sc->sc_stats.ast_tx_qstop++; ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } - /* - * Poll the management queue for frames; they - * have priority over normal data frames. - */ - IF_DEQUEUE(&ic->ic_mgtq, m); + + STAILQ_INIT(&frags); + IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { /* - * No data frames go out unless we're associated. + * The q was emptied while we blocked, + * this can happen when we're preempted. */ - if (ic->ic_state != IEEE80211_S_RUN) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: discard data packet, state %s\n", - __func__, - ieee80211_state_name[ic->ic_state]); - sc->sc_stats.ast_tx_discard++; - ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); - ATH_TXBUF_UNLOCK(sc); - break; - } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); /* XXX: LOCK */ - if (m == NULL) { - ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); - ATH_TXBUF_UNLOCK(sc); - break; - } + ni = NULL; + goto reclaim; + } + ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; + pri = M_WME_GETAC(m); + txq = sc->sc_ac2q[pri]; + if (ni->ni_ath_flags & IEEE80211_NODE_FF) { /* - * Cancel any background scan. + * Check queue length; if too deep drop this + * frame (tail drop considered good). */ - if (ic->ic_flags & IEEE80211_F_SCAN) - ieee80211_cancel_scan(ic); - - STAILQ_INIT(&frags); - /* - * Find the node for the destination so we can do - * things like power save and fast frames aggregation. - */ - if (m->m_len < sizeof(struct ether_header) && - (m = m_pullup(m, sizeof(struct ether_header))) == NULL) { - ic->ic_stats.is_tx_nobuf++; /* XXX */ - ni = NULL; - goto bad; - } - eh = mtod(m, struct ether_header *); - ni = ieee80211_find_txnode(ic, eh->ether_dhost); - if (ni == NULL) { - /* NB: ieee80211_find_txnode does stat+msg */ + if (txq->axq_depth >= sc->sc_fftxqmax) { + DPRINTF(sc, ATH_DEBUG_FF, + "[%s] tail drop on q %u depth %u\n", + ether_sprintf(ni->ni_macaddr), + txq->axq_qnum, txq->axq_depth); + sc->sc_stats.ast_tx_qfull++; m_freem(m); - goto bad; - } - if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && - (m->m_flags & M_PWR_SAV) == 0) { - /* - * Station in power save mode; pass the frame - * to the 802.11 layer and continue. We'll get - * the frame back when the time is right. - */ - ieee80211_pwrsave(ni, m); goto reclaim; } - /* calculate priority so we can find the tx queue */ - if (ieee80211_classify(ic, m, ni)) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: discard, classification failure\n", - __func__); - m_freem(m); - goto bad; - } - pri = M_WME_GETAC(m); - txq = sc->sc_ac2q[pri]; - if (ni->ni_ath_flags & IEEE80211_NODE_FF) { - /* - * Check queue length; if too deep drop this - * frame (tail drop considered good). - */ - if (txq->axq_depth >= sc->sc_fftxqmax) { - DPRINTF(sc, ATH_DEBUG_FF, - "[%s] tail drop on q %u depth %u\n", - ether_sprintf(ni->ni_macaddr), - txq->axq_qnum, txq->axq_depth); - sc->sc_stats.ast_tx_qfull++; - m_freem(m); - goto reclaim; - } - m = ath_ff_check(sc, txq, bf, m, ni); - if (m == NULL) { - /* NB: ni ref & bf held on stageq */ - continue; - } - } - ifp->if_opackets++; - BPF_MTAP(ifp, m); - /* - * Encapsulate the packet in prep for transmission. - */ - m = ieee80211_encap(ic, m, ni); + m = ath_ff_check(sc, txq, bf, m, ni); if (m == NULL) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: encapsulation failure\n", - __func__); - sc->sc_stats.ast_tx_encap++; - goto bad; + /* NB: ni ref & bf held on stageq */ + continue; } - /* - * Check for fragmentation. If this frame - * has been broken up verify we have enough - * buffers to send all the fragments so all - * go out or none... - */ - if ((m->m_flags & M_FRAG) && - !ath_txfrag_setup(sc, &frags, m, ni)) { - DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: out of txfrag buffers\n", __func__); - ic->ic_stats.is_tx_nobuf++; /* XXX */ - ath_freetx(m); - goto bad; - } - } else { - /* - * Hack! The referenced node pointer is in the - * rcvif field of the packet header. This is - * placed there by ieee80211_mgmt_output because - * we need to hold the reference with the frame - * and there's no other way (other than packet - * tags which we consider too expensive to use) - * to pass it along. - */ - ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; - m->m_pkthdr.rcvif = NULL; - - wh = mtod(m, struct ieee80211_frame *); - if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == - IEEE80211_FC0_SUBTYPE_PROBE_RESP) { - /* fill time stamp */ - u_int64_t tsf; - u_int32_t *tstamp; - - tsf = ath_hal_gettsf64(ah); - /* XXX: adjust 100us delay to xmit */ - tsf += 100; - tstamp = (u_int32_t *)&wh[1]; - tstamp[0] = htole32(tsf & 0xffffffff); - tstamp[1] = htole32(tsf >> 32); - } - sc->sc_stats.ast_tx_mgmt++; + } + ifp->if_opackets++; + /* + * Encapsulate the packet in prep for transmission. + */ + m = ieee80211_encap(ni, m); + if (m == NULL) { + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: encapsulation failure\n", __func__); + sc->sc_stats.ast_tx_encap++; + goto bad; + } + /* + * Check for fragmentation. If this frame + * has been broken up verify we have enough + * buffers to send all the fragments so all + * go out or none... + */ + if ((m->m_flags & M_FRAG) && + !ath_txfrag_setup(sc, &frags, m, ni)) { + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: out of txfrag buffers\n", __func__); + ic->ic_stats.is_tx_nobuf++; /* XXX */ + ath_freetx(m); + goto bad; } - nextfrag: /* * Pass the frame to the h/w for transmission. @@ -1735,11 +1736,11 @@ * Beware of state changing between frags. * XXX check sta power-save state? */ - if (ic->ic_state != IEEE80211_S_RUN) { + if (ni->ni_vap->iv_state != IEEE80211_S_RUN) { DPRINTF(sc, ATH_DEBUG_XMIT, "%s: flush fragmented packet, state %s\n", __func__, - ieee80211_state_name[ic->ic_state]); + ieee80211_state_name[ni->ni_vap->iv_state]); ath_freetx(next); goto reclaim; } @@ -1751,7 +1752,6 @@ } ifp->if_timer = 5; - ic->ic_lastdata = ticks; #if 0 /* * Flush stale frames from the fast-frame staging queue. @@ -1765,30 +1765,9 @@ static int ath_media_change(struct ifnet *ifp) { -#define IS_UP(ifp) \ - ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) - int error; - - error = ieee80211_media_change(ifp); - if (error == ENETRESET) { - struct ath_softc *sc = ifp->if_softc; - struct ieee80211com *ic = &sc->sc_ic; - - if (ic->ic_opmode == IEEE80211_M_AHDEMO) { - /* - * Adhoc demo mode is just ibss mode w/o beacons - * (mostly). The hal knows nothing about it; - * tell it we're operating in ibss mode. - */ - sc->sc_opmode = HAL_M_IBSS; - } else - sc->sc_opmode = ic->ic_opmode; - if (IS_UP(ifp)) - ath_init(sc); /* XXX lose error */ - error = 0; - } - return error; -#undef IS_UP + int error = ieee80211_media_change(ifp); + /* NB: only the fixed rate can change and that doesn't need a reset */ + return (error == ENETRESET ? 0 : error); } #ifdef ATH_DEBUG @@ -2091,10 +2070,10 @@ * 64 entries. */ static int -ath_key_alloc(struct ieee80211com *ic, const struct ieee80211_key *k, +ath_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *k, ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix) { - struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; /* * Group key allocation must be handled specially for @@ -2108,8 +2087,8 @@ * multi-station operation. */ if ((k->wk_flags & IEEE80211_KEY_GROUP) && !sc->sc_mcastkey) { - if (!(&ic->ic_nw_keys[0] <= k && - k < &ic->ic_nw_keys[IEEE80211_WEP_NKID])) { + if (!(&vap->iv_nw_keys[0] <= k && + k < &vap->iv_nw_keys[IEEE80211_WEP_NKID])) { /* should not happen */ DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s: bogus group key\n", __func__); @@ -2119,7 +2098,7 @@ * XXX we pre-allocate the global keys so * have no way to check if they've already been allocated. */ - *keyix = *rxkeyix = k - ic->ic_nw_keys; + *keyix = *rxkeyix = k - vap->iv_nw_keys; return 1; } @@ -2148,9 +2127,9 @@ * Delete an entry in the key cache allocated by ath_key_alloc. */ static int -ath_key_delete(struct ieee80211com *ic, const struct ieee80211_key *k) +ath_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) { - struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; struct ath_hal *ah = sc->sc_ah; const struct ieee80211_cipher *cip = k->wk_cipher; u_int keyix = k->wk_keyix; @@ -2188,12 +2167,12 @@ * slot(s) must already have been allocated by ath_key_alloc. */ static int -ath_key_set(struct ieee80211com *ic, const struct ieee80211_key *k, +ath_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, const u_int8_t mac[IEEE80211_ADDR_LEN]) { - struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; - return ath_keyset(sc, k, mac, ic->ic_bss); + return ath_keyset(sc, k, mac, vap->iv_bss); } /* @@ -2203,9 +2182,9 @@ * uses that originate in the driver. */ static void -ath_key_update_begin(struct ieee80211com *ic) +ath_key_update_begin(struct ieee80211vap *vap) { - struct ifnet *ifp = ic->ic_ifp; + struct ifnet *ifp = vap->iv_ic->ic_ifp; struct ath_softc *sc = ifp->if_softc; DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s:\n", __func__); @@ -2216,9 +2195,9 @@ } static void -ath_key_update_end(struct ieee80211com *ic) +ath_key_update_end(struct ieee80211vap *vap) { - struct ifnet *ifp = ic->ic_ifp; + struct ifnet *ifp = vap->iv_ic->ic_ifp; struct ath_softc *sc = ifp->if_softc; DPRINTF(sc, ATH_DEBUG_KEYCACHE, "%s:\n", __func__); @@ -2233,8 +2212,6 @@ * operating mode and state: * * o always accept unicast, broadcast, and multicast traffic - * o maintain current state of phy error reception (the hal - * may enable phy error frames for noise immunity work) * o probe request frames are accepted only when operating in * hostap, adhoc, or monitor modes * o enable promiscuous mode according to the interface state @@ -2246,31 +2223,68 @@ * - when scanning * o accept control frames: * - when in monitor mode + * XXX BAR frames for 11n */ static u_int32_t ath_calcrxfilter(struct ath_softc *sc) { -#define RX_FILTER_PRESERVE (HAL_RX_FILTER_PHYERR | HAL_RX_FILTER_PHYRADAR) struct ieee80211com *ic = &sc->sc_ic; - struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; u_int32_t rfilt; - rfilt = (ath_hal_getrxfilter(ah) & RX_FILTER_PRESERVE) - | HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; + rfilt = HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; if (ic->ic_opmode != IEEE80211_M_STA) rfilt |= HAL_RX_FILTER_PROBEREQ; if (ic->ic_opmode != IEEE80211_M_HOSTAP && (ifp->if_flags & IFF_PROMISC)) rfilt |= HAL_RX_FILTER_PROM; if (ic->ic_opmode == IEEE80211_M_STA || - ic->ic_opmode == IEEE80211_M_IBSS || + sc->sc_opmode == HAL_M_IBSS || sc->sc_scanning) rfilt |= HAL_RX_FILTER_BEACON; if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; + if (ic->ic_opmode == IEEE80211_M_STA && + !sc->sc_needmib && !sc->sc_scanning) + rfilt |= HAL_RX_FILTER_PHYERR; return rfilt; -#undef RX_FILTER_PRESERVE +} + +/* + * Merge multicast address from all vap's to form the hardware + * filter. Ideally we should only inspect our own list and the + * 802.11 layer would merge for us but that's bit difficult so + * for now we put the onus on the driver. + */ +static void +ath_merge_mcast(struct ath_softc *sc, u_int32_t mfilt[2]) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap; + + mfilt[0] = mfilt[1] = 0; + /* XXX locking */ + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + struct ifnet *ifp = vap->iv_ifp; + struct ifmultiaddr *ifma; + + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + caddr_t dl; + u_int32_t val; + u_int8_t pos; + + /* calculate XOR of eight 6bit values */ + dl = LLADDR((struct sockaddr_dl *) ifma->ifma_addr); + val = LE_READ_4(dl + 0); + pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; + val = LE_READ_4(dl + 3); + pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; + pos &= 0x3f; + mfilt[pos / 32] |= (1 << (pos % 32)); + } + IF_ADDR_UNLOCK(ifp); + } } static void @@ -2279,9 +2293,7 @@ struct ieee80211com *ic = &sc->sc_ic; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:16:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0ECF16A469; Tue, 19 Feb 2008 00:16:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E04916A419 for ; Tue, 19 Feb 2008 00:16:49 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B91C13C465 for ; Tue, 19 Feb 2008 00:16:49 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0Gn0a007296 for ; Tue, 19 Feb 2008 00:16:49 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0GncY007292 for perforce@freebsd.org; Tue, 19 Feb 2008 00:16:49 GMT (envelope-from marcel@freebsd.org) Date: Tue, 19 Feb 2008 00:16:49 GMT Message-Id: <200802190016.m1J0GncY007292@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135688 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:16:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135688 Change 135688 by marcel@marcel_xcllnt on 2008/02/19 00:16:28 o Remove GEOM_MBR o Add WITNESS_SKIPSPIN Affected files ... .. //depot/projects/e500/sys/powerpc/conf/JUNIPER#2 edit Differences ... ==== //depot/projects/e500/sys/powerpc/conf/JUNIPER#2 (text+ko) ==== @@ -19,7 +19,6 @@ options FFS options GDB options GEOM_PART_GPT -options GEOM_MBR options INET options INET6 options INVARIANTS @@ -38,6 +37,7 @@ options SYSVSEM options SYSVSHM options WITNESS +options WITNESS_SKIPSPIN device ata device atadisk From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:34:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8042316A468; Tue, 19 Feb 2008 00:34:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D1F016A420 for ; Tue, 19 Feb 2008 00:34:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 21EB113C44B for ; Tue, 19 Feb 2008 00:34:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0Y608008072 for ; Tue, 19 Feb 2008 00:34:06 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0Y65Q008069 for perforce@freebsd.org; Tue, 19 Feb 2008 00:34:06 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 19 Feb 2008 00:34:06 GMT Message-Id: <200802190034.m1J0Y65Q008069@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135689 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:34:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=135689 Change 135689 by kmacy@pandemonium:kmacy:xen31 on 2008/02/19 00:33:47 add in more backward compatibility support Affected files ... .. //depot/projects/xen31/sys/i386/i386/machdep.c#16 edit .. //depot/projects/xen31/sys/i386/include/xen/hypercall.h#9 edit .. //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#7 edit Differences ... ==== //depot/projects/xen31/sys/i386/i386/machdep.c#16 (text+ko) ==== @@ -2166,10 +2166,17 @@ void init386(int first) { - int error, gsel_tss, metadata_missing, x; unsigned long gdtmachpfn; struct pcpu *pc; + struct callback_register event = { + .type = CALLBACKTYPE_event, + .address = {GSEL(GCODE_SEL, SEL_KPL), (unsigned long)Xhypervisor_callback }, + }; + struct callback_register failsafe = { + .type = CALLBACKTYPE_failsafe, + .address = {GSEL(GCODE_SEL, SEL_KPL), (unsigned long)failsafe_callback }, + }; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) @@ -2238,10 +2245,16 @@ if ((error = HYPERVISOR_set_trap_table(trap_table)) != 0) { panic("set_trap_table failed - error %d\n", error); } - HYPERVISOR_set_callbacks(GSEL(GCODE_SEL, SEL_KPL), - (unsigned long)Xhypervisor_callback, - GSEL(GCODE_SEL, SEL_KPL), (unsigned long)failsafe_callback); - + + error = HYPERVISOR_callback_op(CALLBACKOP_register, &event); + if (error == 0) + error = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe); +#if CONFIG_XEN_COMPAT <= 0x030002 + if (error == -ENOXENSYS) + HYPERVISOR_set_callbacks(GSEL(GCODE_SEL, SEL_KPL), + (unsigned long)Xhypervisor_callback, + GSEL(GCODE_SEL, SEL_KPL), (unsigned long)failsafe_callback); +#endif pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(prvspace, pc); PCPU_SET(curthread, &thread0); ==== //depot/projects/xen31/sys/i386/include/xen/hypercall.h#9 (text+ko) ==== @@ -37,6 +37,7 @@ #define __STR(x) #x #define STR(x) __STR(x) #define ENOXENSYS 38 +#define CONFIG_XEN_COMPAT 0x030002 #if defined(XEN) @@ -259,6 +260,7 @@ { int rc = _hypercall2(int, event_channel_op, cmd, arg); +#if CONFIG_XEN_COMPAT <= 0x030002 if (__predict_false(rc == -ENOXENSYS)) { struct evtchn_op op; op.cmd = cmd; @@ -266,7 +268,7 @@ rc = _hypercall1(int, event_channel_op_compat, &op); memcpy(arg, &op.u, sizeof(op.u)); } - +#endif return (rc); } @@ -289,7 +291,7 @@ int cmd, void *arg) { int rc = _hypercall2(int, physdev_op, cmd, arg); - +#if CONFIG_XEN_COMPAT <= 0x030002 if (__predict_false(rc == -ENOXENSYS)) { struct physdev_op op; op.cmd = cmd; @@ -297,7 +299,7 @@ rc = _hypercall1(int, physdev_op_compat, &op); memcpy(arg, &op.u, sizeof(op.u)); } - +#endif return (rc); } @@ -344,34 +346,40 @@ }; int rc = _hypercall3(int, sched_op, SCHEDOP_shutdown, &sched_shutdown, srec); +#if CONFIG_XEN_COMPAT <= 0x030002 if (rc == -ENOXENSYS) rc = _hypercall3(int, sched_op_compat, SCHEDOP_shutdown, SHUTDOWN_suspend, srec); +#endif return (rc); } + +#if CONFIG_XEN_COMPAT <= 0x030002 static inline int HYPERVISOR_nmi_op( unsigned long op, void *arg) { return _hypercall2(int, nmi_op, op, arg); } +#endif -#ifdef notyet +static inline int +HYPERVISOR_callback_op( + int cmd, void *arg) +{ + return _hypercall2(int, callback_op, cmd, arg); +} + +#ifndef CONFIG_XEN static inline unsigned long HYPERVISOR_hvm_op( int op, void *arg) { return _hypercall2(unsigned long, hvm_op, op, arg); } +#endif static inline int -HYPERVISOR_callback_op( - int cmd, void *arg) -{ - return _hypercall2(int, callback_op, cmd, arg); -} - -static inline int HYPERVISOR_xenoprof_op( int op, void *arg) { @@ -384,7 +392,6 @@ { return _hypercall2(int, kexec_op, op, args); } -#endif #endif /* __HYPERCALL_H__ */ /* ==== //depot/projects/xen31/sys/i386/include/xen/hypervisor.h#7 (text+ko) ==== @@ -12,8 +12,10 @@ #define is_running_on_xen() 1 #ifdef PAE +#ifndef CONFIG_X86_PAE #define CONFIG_X86_PAE #endif +#endif #include #include @@ -22,6 +24,7 @@ #include #include #include +#include #include #if defined(__amd64__) @@ -55,7 +58,11 @@ { int rc = HYPERVISOR_sched_op(SCHEDOP_yield, NULL); - return rc; +#if CONFIG_XEN_COMPAT <= 0x030002 + if (rc == -ENOXENSYS) + rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); +#endif + return (rc); } static inline int @@ -64,18 +71,25 @@ { int rc = HYPERVISOR_sched_op(SCHEDOP_block, NULL); - return rc; +#if CONFIG_XEN_COMPAT <= 0x030002 + if (rc == -ENOXENSYS) + rc = HYPERVISOR_sched_op_compat(SCHEDOP_block, 0); +#endif + return (rc); } -static inline int +static inline void HYPERVISOR_shutdown(unsigned int reason) { struct sched_shutdown sched_shutdown = { .reason = reason }; - return HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown); + HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown); +#if CONFIG_XEN_COMPAT <= 0x030002 + HYPERVISOR_sched_op_compat(SCHEDOP_shutdown, reason); +#endif } static inline void @@ -92,13 +106,19 @@ HYPERVISOR_poll( evtchn_port_t *ports, unsigned int nr_ports, int ticks) { + int rc; struct sched_poll sched_poll = { .nr_ports = nr_ports, .timeout = get_system_time(ticks) }; set_xen_guest_handle(sched_poll.ports, ports); - return HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll); + rc = HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll); +#if CONFIG_XEN_COMPAT <= 0x030002 + if (rc == -ENOXENSYS) + rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); +#endif + return (rc); } static inline void From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:35:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96C5C16A469; Tue, 19 Feb 2008 00:35:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C7FA16A421 for ; Tue, 19 Feb 2008 00:35:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5270113C45E for ; Tue, 19 Feb 2008 00:35:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0Z8Ds008185 for ; Tue, 19 Feb 2008 00:35:08 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0Z868008182 for perforce@freebsd.org; Tue, 19 Feb 2008 00:35:08 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 00:35:08 GMT Message-Id: <200802190035.m1J0Z868008182@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:35:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=135690 Change 135690 by sam@sam_ebb on 2008/02/19 00:34:40 Change beacon miss handling to dispatch the event only to sta vap's in RUN state instead of checking in the handler. Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_proto.c#21 edit .. //depot/projects/vap/sys/net80211/ieee80211_sta.c#5 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#21 (text+ko) ==== @@ -1276,13 +1276,21 @@ void ieee80211_beacon_miss(struct ieee80211com *ic) { - if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { - struct ieee80211vap *vap; + struct ieee80211vap *vap; - /* XXX locking */ - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) - if (vap->iv_bmiss != NULL) - vap->iv_bmiss(vap); + if (ic->ic_flags & IEEE80211_F_SCAN) + return; + /* XXX locking */ + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + /* + * We only pass events through for sta vap's in RUN state; + * may be too restrictive but for now this saves all the + * handlers duplicating these checks. + */ + if (vap->iv_opmode == IEEE80211_M_STA && + vap->iv_state == IEEE80211_S_RUN && + vap->iv_bmiss != NULL) + vap->iv_bmiss(vap); } } ==== //depot/projects/vap/sys/net80211/ieee80211_sta.c#5 (text+ko) ==== @@ -94,26 +94,24 @@ vap->iv_bmiss = sta_beacon_miss; } +/* + * Handle a beacon miss event. The common code filters out + * spurious events that can happen when scanning and/or before + * reaching RUN state. + */ static void sta_beacon_miss(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; - if (ic->ic_flags & IEEE80211_F_SCAN) { - /* XXX check ic_curchan != ic_bsschan? */ - return; - } + KASSERT((ic->ic_flags & IEEE80211_F_SCAN) == 0, ("scanning")); + KASSERT(vap->iv_state == IEEE80211_S_RUN, + ("wrong state %d", vap->iv_state)); + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG, "beacon miss, mode %u state %s\n", vap->iv_opmode, ieee80211_state_name[vap->iv_state]); - /* - * Our handling is only meaningful for stations that are - * associated; any other conditions else will be handled - * through different means (e.g. the tx timeout on mgt frames). - */ - if (vap->iv_state < IEEE80211_S_RUN) - return; if (++vap->iv_bmiss_count < vap->iv_bmiss_max) { /* From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:41:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B341516A420; Tue, 19 Feb 2008 00:41:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60BB416A417 for ; Tue, 19 Feb 2008 00:41:15 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 55FF813C458 for ; Tue, 19 Feb 2008 00:41:15 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0fFuC008501 for ; Tue, 19 Feb 2008 00:41:15 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0fF1f008498 for perforce@freebsd.org; Tue, 19 Feb 2008 00:41:15 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 00:41:15 GMT Message-Id: <200802190041.m1J0fF1f008498@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135691 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:41:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135691 Change 135691 by sam@sam_ebb on 2008/02/19 00:40:15 purge driver reset methods that tried to handle channel change specially for monitor mode; this has been pointless for a long time as channel changes are done entirely through the ic_set_channel callback Affected files ... .. //depot/projects/vap/sys/dev/ral/rt2661.c#10 edit .. //depot/projects/vap/sys/dev/usb/if_ural.c#8 edit Differences ... ==== //depot/projects/vap/sys/dev/ral/rt2661.c#10 (text) ==== @@ -133,7 +133,6 @@ static int rt2661_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void rt2661_watchdog(void *); -static int rt2661_reset(struct ieee80211vap *); static int rt2661_ioctl(struct ifnet *, u_long, caddr_t); static void rt2661_bbp_write(struct rt2661_softc *, uint8_t, uint8_t); @@ -416,7 +415,6 @@ /* enable s/w bmiss handling for sta mode */ ieee80211_vap_setup(ic, vap, name, unit, opmode, flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); - vap->iv_reset = rt2661_reset; /* override state transition machine */ rvp->ral_newstate = vap->iv_newstate; @@ -1900,25 +1898,6 @@ } } -/* - * This function allows for fast channel switching in monitor mode (used by - * net-mgmt/kismet). In IBSS mode, we must explicitly reset the interface to - * generate a new beacon frame. - */ -static int -rt2661_reset(struct ieee80211vap *vap) -{ - struct ieee80211com *ic = vap->iv_ic; - struct rt2661_softc *sc = ic->ic_ifp->if_softc; - - if (vap->iv_opmode != IEEE80211_M_MONITOR) - return ENETRESET; - - rt2661_set_chan(sc, ic->ic_curchan); - - return 0; -} - static int rt2661_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { ==== //depot/projects/vap/sys/dev/usb/if_ural.c#8 (text+ko) ==== @@ -146,7 +146,6 @@ struct ieee80211_node *); static void ural_start(struct ifnet *); static void ural_watchdog(void *); -static int ural_reset(struct ieee80211vap *); static int ural_ioctl(struct ifnet *, u_long, caddr_t); static void ural_set_testmode(struct ural_softc *); static void ural_eeprom_read(struct ural_softc *, uint16_t, void *, @@ -585,7 +584,6 @@ ieee80211_vap_setup(ic, vap, name, unit, opmode, flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); - vap->iv_reset = ural_reset; /* override state transition machine */ uvp->newstate = vap->iv_newstate; vap->iv_newstate = ural_newstate; @@ -1531,25 +1529,6 @@ RAL_UNLOCK(sc); } -/* - * This function allows for fast channel switching in monitor mode (used by - * net-mgmt/kismet). In IBSS mode, we must explicitly reset the interface to - * generate a new beacon frame. - */ -static int -ural_reset(struct ieee80211vap *vap) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ural_softc *sc = ic->ic_ifp->if_softc; - - if (vap->iv_opmode != IEEE80211_M_MONITOR) - return ENETRESET; - - ural_set_chan(sc, ic->ic_curchan); - - return 0; -} - static int ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:42:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0A9BC16A420; Tue, 19 Feb 2008 00:42:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC1E316A418 for ; Tue, 19 Feb 2008 00:42:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A12DE13C45E for ; Tue, 19 Feb 2008 00:42:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0gGCK008554 for ; Tue, 19 Feb 2008 00:42:16 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0gGQp008551 for perforce@freebsd.org; Tue, 19 Feb 2008 00:42:16 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 00:42:16 GMT Message-Id: <200802190042.m1J0gGQp008551@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135692 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:42:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=135692 Change 135692 by sam@sam_ebb on 2008/02/19 00:41:17 adopt sephe's idea: pass the ioctl cmd code to the reset method so drivers can optimize their work Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211.c#23 edit .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#27 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#29 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211.c#23 (text+ko) ==== @@ -275,7 +275,7 @@ * can override this method to implement more optimized support. */ static int -default_reset(struct ieee80211vap *vap) +default_reset(struct ieee80211vap *vap, u_long cmd) { return ENETRESET; } ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#27 (text+ko) ==== @@ -3171,7 +3171,7 @@ ieee80211_init(vap); error = 0; } else if (error == ERESTART) { - error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap) : 0; + error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap, cmd) : 0; } return error; } ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#29 (text+ko) ==== @@ -398,7 +398,7 @@ /* beacon miss processing */ void (*iv_bmiss)(struct ieee80211vap *); /* reset device state after 802.11 parameter/state change */ - int (*iv_reset)(struct ieee80211vap *); + int (*iv_reset)(struct ieee80211vap *, u_long); /* [schedule] beacon frame update */ void (*iv_update_beacon)(struct ieee80211vap *, int); /* state machine processing */ From owner-p4-projects@FreeBSD.ORG Tue Feb 19 00:42:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60D8316A532; Tue, 19 Feb 2008 00:42:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D190F16A417 for ; Tue, 19 Feb 2008 00:42:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C79C613C467 for ; Tue, 19 Feb 2008 00:42:16 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J0gGSt008560 for ; Tue, 19 Feb 2008 00:42:16 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J0gGKT008557 for perforce@freebsd.org; Tue, 19 Feb 2008 00:42:16 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 00:42:16 GMT Message-Id: <200802190042.m1J0gGKT008557@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135693 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:42:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=135693 Change 135693 by sam@sam_ebb on 2008/02/19 00:41:45 track iv_reset api change Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#23 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#23 (text+ko) ==== @@ -109,7 +109,7 @@ static void ath_stop(struct ifnet *); static void ath_start(struct ifnet *); static int ath_reset(struct ifnet *); -static int ath_reset_vap(struct ieee80211vap *); +static int ath_reset_vap(struct ieee80211vap *, u_long); static int ath_media_change(struct ifnet *); static void ath_watchdog(struct ifnet *); static int ath_ioctl(struct ifnet *, u_long, caddr_t); @@ -1243,7 +1243,7 @@ } static int -ath_reset_vap(struct ieee80211vap *vap) +ath_reset_vap(struct ieee80211vap *vap, u_long cmd) { return ath_reset(vap->iv_ic->ic_ifp); } From owner-p4-projects@FreeBSD.ORG Tue Feb 19 01:57:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6B2D016A418; Tue, 19 Feb 2008 01:57:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 303DA16A421 for ; Tue, 19 Feb 2008 01:57:34 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2380113C478 for ; Tue, 19 Feb 2008 01:57:34 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J1vXum025866 for ; Tue, 19 Feb 2008 01:57:33 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J1vXxR025863 for perforce@freebsd.org; Tue, 19 Feb 2008 01:57:33 GMT (envelope-from thompsa@freebsd.org) Date: Tue, 19 Feb 2008 01:57:33 GMT Message-Id: <200802190157.m1J1vXxR025863@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135694 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 01:57:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135694 Change 135694 by thompsa@thompsa_heff on 2008/02/19 01:57:33 MF //depot/user/benjsc/wpi/sys/dev/wpi/if_wpi.c@130843 Fix locking in wpi_init. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#10 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#10 (text+ko) ==== @@ -3157,10 +3157,10 @@ WPI_WRITE(sc, WPI_UCODE_CLR, WPI_RADIO_OFF); WPI_WRITE(sc, WPI_UCODE_CLR, WPI_RADIO_OFF); - if ((error = wpi_load_firmware(sc)) != 0) { + if ((wpi_load_firmware(sc)) != 0) { device_printf(sc->sc_dev, "A problem occurred loading the firmware to the driver\n"); - return; + goto fail; } /* At this point the firmware is up and running. If the hardware @@ -3177,7 +3177,7 @@ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_RUNNING; device_printf(sc->sc_dev,"Radio Transmitter is switched off\n"); - return; + goto fail; } /* wait for thermal sensors to calibrate */ @@ -3190,8 +3190,7 @@ if (ntries == 1000) { device_printf(sc->sc_dev, "timeout waiting for thermal sensors calibration\n"); - error = ETIMEDOUT; - return; + goto fail; } DPRINTFN(WPI_DEBUG_TEMP,("temperature %d\n", sc->temp)); @@ -3204,6 +3203,10 @@ ieee80211_new_state(ic, IEEE80211_S_RUN, -1); else if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); + return; + +fail: + WPI_UNLOCK(sc); } static void From owner-p4-projects@FreeBSD.ORG Tue Feb 19 02:06:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8FC316A41B; Tue, 19 Feb 2008 02:06:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACB8D16A46B for ; Tue, 19 Feb 2008 02:06:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9E61E13C474 for ; Tue, 19 Feb 2008 02:06:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J26hDQ027479 for ; Tue, 19 Feb 2008 02:06:43 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J26hYc027476 for perforce@freebsd.org; Tue, 19 Feb 2008 02:06:43 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 02:06:43 GMT Message-Id: <200802190206.m1J26hYc027476@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135695 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 02:06:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=135695 Change 135695 by sam@sam_ebb on 2008/02/19 02:06:37 o add multi-vap create o add bssid clone/allocation o correctly map net80211 opmode to hal mode o correct per-vap mcast q reclaim o add support for sta mode s/w bmiss when operating as an ap o hookup hal calls to check for bssid mask and tsf adjust support Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#24 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#13 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#24 (text+ko) ==== @@ -579,6 +579,8 @@ */ if (ath_hal_hasbursting(ah)) ic->ic_caps |= IEEE80211_C_BURST; + sc->sc_hasbmask = ath_hal_hasbssidmask(ah); + sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); if (ath_hal_hasfastframes(ah)) ic->ic_caps |= IEEE80211_C_FF; if (ath_hal_getwirelessmodes(ah, ath_countrycode) & (HAL_MODE_108G|HAL_MODE_TURBO)) @@ -608,7 +610,7 @@ ic->ic_max_keyix = sc->sc_keymax; /* call MI attach routine. */ ieee80211_ifattach(ic); - sc->sc_opmode = ic->ic_opmode; + sc->sc_opmode = HAL_M_STA; /* override default methods */ ic->ic_newassoc = ath_newassoc; @@ -685,21 +687,117 @@ return 0; } +/* + * MAC address handling for multiple BSS on the same radio. + * The first vap uses the MAC address from the EEPROM. For + * subsequent vap's we set the U/L bit (bit 1) in the MAC + * address and use the next six bits as an index. + */ +static void +assign_address(struct ath_softc *sc, uint8_t mac[IEEE80211_ADDR_LEN], int clone) +{ + int i; + + if (clone && sc->sc_hasbmask) { + /* NB: we only do this if h/w supports multiple bssid */ + for (i = 0; i < 32; i++) + if ((sc->sc_bssidmask & (1<sc_bssidmask |= 1<sc_nbssid0++; +} + +static void +reclaim_address(struct ath_softc *sc, uint8_t mac[IEEE80211_ADDR_LEN]) +{ + int i = mac[0] >> 2; + if (i != 0 || --sc->sc_nbssid0 == 0) + sc->sc_bssidmask &= ~(1<ic_ifp->if_softc; struct ath_vap *avp; struct ieee80211vap *vap; + uint8_t mac[IEEE80211_ADDR_LEN]; + int ic_opmode, needbeacon; - if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ + needbeacon = 0; + IEEE80211_ADDR_COPY(mac, mac0); + + /* XXX ic unlocked and race against add? */ + switch (opmode) { + case IEEE80211_M_STA: + if (sc->sc_nstavaps != 0) /* XXX only 1 sta for now */ + return NULL; + if (sc->sc_nvaps) { + /* + * When there are multiple vaps we must fall + * back to s/w beacon miss handling. + */ + flags |= IEEE80211_CLONE_NOBEACONS; + } + if (flags & IEEE80211_CLONE_NOBEACONS) { + sc->sc_swbmiss = 1; + ic_opmode = IEEE80211_M_HOSTAP; + } else + ic_opmode = opmode; + break; + case IEEE80211_M_IBSS: + if (sc->sc_nvaps != 0) /* XXX only 1 for now */ + return NULL; + ic_opmode = opmode; + needbeacon = 1; + break; + case IEEE80211_M_AHDEMO: + /* fall thru... */ + case IEEE80211_M_MONITOR: + if (sc->sc_nvaps != 0 && ic->ic_opmode != opmode) { + /* XXX not right for monitor mode */ + ic_opmode = ic->ic_opmode; + } else + ic_opmode = opmode; + break; + case IEEE80211_M_HOSTAP: + needbeacon = 1; + /* fall thru... */ + case IEEE80211_M_WDS: + if (sc->sc_nvaps && ic->ic_opmode == IEEE80211_M_STA) + return NULL; + if (opmode == IEEE80211_M_WDS) { + /* + * Silently remove any request for a unique + * bssid; WDS vap's always share the local + * mac address. + */ + flags &= ~IEEE80211_CLONE_BSSID; + } + ic_opmode = IEEE80211_M_HOSTAP; + break; + default: + return NULL; + } + if (needbeacon & STAILQ_EMPTY(&sc->sc_bbuf)) return NULL; + avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), M_80211_VAP, M_NOWAIT | M_ZERO); if (avp == NULL) return NULL; + + if (opmode == IEEE80211_M_HOSTAP) + assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); + vap = &avp->av_vap; ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); @@ -720,10 +818,85 @@ avp->av_bmiss = vap->iv_bmiss; vap->iv_bmiss = ath_bmiss_vap; + avp->av_bslot = -1; + if (needbeacon) { + /* + * Allocate beacon state and setup the q for buffered + * multicast frames. We know a beacon buffer is + * available because we checked above. + */ + avp->av_bcbuf = STAILQ_FIRST(&sc->sc_bbuf); + STAILQ_REMOVE_HEAD(&sc->sc_bbuf, bf_list); + if (opmode != IEEE80211_M_IBSS || !sc->sc_hasveol) { + int slot; + /* + * Assign the vap to a beacon xmit slot. As above + * this cannot fail to find a free one. + */ + avp->av_bslot = 0; + for (slot = 0; slot < ATH_BCBUF; slot++) { + if (sc->sc_bslot[slot] == NULL) { + /* + * XXX hack, space out slots to better + * deal with traffic coming out of the + * cab q. + */ + if (slot + 1 < ATH_BCBUF && + sc->sc_bslot[slot+1] == NULL) { + avp->av_bslot = slot + 1; + break; + } + avp->av_bslot = slot; + /* NB: keep looking for a double slot */ + } + } + KASSERT(sc->sc_bslot[avp->av_bslot] == NULL, + ("beacon slot %u not empty", avp->av_bslot)); + sc->sc_bslot[avp->av_bslot] = vap; + sc->sc_nbcnvaps++; + } + if (sc->sc_hastsfadd) { + /* + * Multple vaps are to transmit beacons and we + * have h/w support for TSF adjusting; enable + * use of staggered beacons. + */ + sc->sc_stagbeacons = 1; + } + STAILQ_INIT(&avp->av_mcastq.axq_q); + ATH_TXQ_LOCK_INIT(sc, &avp->av_mcastq); + } /* complete setup */ ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status); - ic->ic_opmode = opmode; + ic->ic_opmode = ic_opmode; + if (opmode != IEEE80211_M_WDS) + sc->sc_nvaps++; + switch (ic_opmode) { + case IEEE80211_M_IBSS: + sc->sc_opmode = HAL_M_IBSS; + break; + case IEEE80211_M_STA: + sc->sc_opmode = HAL_M_STA; + break; + case IEEE80211_M_AHDEMO: + case IEEE80211_M_HOSTAP: + sc->sc_opmode = HAL_M_HOSTAP; + break; + case IEEE80211_M_MONITOR: + sc->sc_opmode = HAL_M_MONITOR; + break; + default: + /* XXX should not happen */ + break; + } + + if (sc->sc_hastsfadd) { + /* + * Configure whether or not TSF adjust should be done. + */ + ath_hal_settsfadjust(sc->sc_ah, sc->sc_stagbeacons); + } return vap; } @@ -746,12 +919,8 @@ ath_draintxq(sc); /* stop xmit side */ ath_stoprecv(sc); /* stop recv side */ } - /* - * Reclaim any pending mcast frames for the vap. - */ - ath_tx_draintxq(sc, &avp->av_mcastq); - ATH_TXQ_LOCK_DESTROY(&avp->av_mcastq); + ieee80211_vap_detach(vap); /* * Reclaim beacon state. Note this must be done before * the vap instance is reclaimed as we may have a reference @@ -766,16 +935,25 @@ avp->av_bcbuf = NULL; if (sc->sc_nbcnvaps == 0) sc->sc_stagbeacons = 0; + /* + * Reclaim any pending mcast frames for the vap. + */ + ath_tx_draintxq(sc, &avp->av_mcastq); + ATH_TXQ_LOCK_DESTROY(&avp->av_mcastq); } /* * Update bookkeeping. */ if (vap->iv_opmode == IEEE80211_M_STA) { sc->sc_nstavaps--; + if (sc->sc_nstavaps == 0 && sc->sc_swbmiss) + sc->sc_swbmiss = 0; + } else if (vap->iv_opmode == IEEE80211_M_HOSTAP) { + reclaim_address(sc, vap->iv_myaddr); } - ieee80211_vap_detach(vap); + if (vap->iv_opmode != IEEE80211_M_WDS) + sc->sc_nvaps--; free(avp, M_80211_VAP); - sc->sc_nvaps--; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { /* @@ -2216,13 +2394,17 @@ * hostap, adhoc, or monitor modes * o enable promiscuous mode according to the interface state * o accept beacons: + * - when operating in station mode for collecting rssi data when + * the station is otherwise quiet, or * - when operating in adhoc mode so the 802.11 layer creates * node table entries for peers, - * - when operating in station mode for collecting rssi data when - * the station is otherwise quiet, or * - when scanning + * - when doing s/w beacon miss (e.g. for ap+sta) * o accept control frames: * - when in monitor mode + * o accept PHY error frames when hardware doesn't have MIB support + * to count and we need them for ANI (sta mode only at the moment) + * and we are not scanning (ANI is disabled) * XXX BAR frames for 11n */ static u_int32_t @@ -2240,7 +2422,7 @@ rfilt |= HAL_RX_FILTER_PROM; if (ic->ic_opmode == IEEE80211_M_STA || sc->sc_opmode == HAL_M_IBSS || - sc->sc_scanning) + sc->sc_swbmiss || sc->sc_scanning) rfilt |= HAL_RX_FILTER_BEACON; if (ic->ic_opmode == IEEE80211_M_MONITOR) rfilt |= HAL_RX_FILTER_CONTROL; @@ -2977,7 +3159,7 @@ nexttbtt = roundup(nexttbtt, intval); DPRINTF(sc, ATH_DEBUG_BEACON, "%s: nexttbtt %u intval %u (%u)\n", __func__, nexttbtt, intval, ni->ni_intval); - if (ic->ic_opmode == IEEE80211_M_STA) { + if (ic->ic_opmode == IEEE80211_M_STA && !sc->sc_swbmiss) { HAL_BEACON_STATE bs; int dtimperiod, dtimcount; int cfpperiod, cfpcount; ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#13 (text+ko) ==== @@ -206,6 +206,9 @@ int sc_debug; int sc_nvaps; /* # vaps */ int sc_nstavaps; /* # station vaps */ + u_int8_t sc_nbssid0; /* # vap's using base mac */ + uint32_t sc_bssidmask; /* bssid mask */ + u_int32_t sc_countrycode; u_int32_t sc_regdomain; void (*sc_node_free)(struct ieee80211_node *); @@ -238,6 +241,7 @@ sc_hasbmask : 1,/* bssid mask support */ sc_hastsfadd: 1,/* tsf adjust support */ sc_beacons : 1,/* beacons running */ + sc_swbmiss : 1,/* sta mode using sw bmiss */ sc_stagbeacons:1;/* use staggered beacons */ /* rate tables */ #define IEEE80211_MODE_HALF (IEEE80211_MODE_MAX+0) @@ -552,6 +556,14 @@ #endif #define ath_hal_hasfastframes(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_FASTFRAME, 0, NULL) == HAL_OK) +#define ath_hal_hasbssidmask(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_BSSIDMASK, 0, NULL) == HAL_OK) +#define ath_hal_hastsfadjust(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_TSF_ADJUST, 0, NULL) == HAL_OK) +#define ath_hal_gettsfadjust(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_TSF_ADJUST, 1, NULL) == HAL_OK) +#define ath_hal_settsfadjust(_ah, _onoff) \ + ath_hal_setcapability(_ah, HAL_CAP_TSF_ADJUST, 1, _onoff, NULL) #define ath_hal_hasrfsilent(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_RFSILENT, 0, NULL) == HAL_OK) #define ath_hal_getrfkill(_ah) \ From owner-p4-projects@FreeBSD.ORG Tue Feb 19 02:14:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2A2A16A468; Tue, 19 Feb 2008 02:14:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC9816A417 for ; Tue, 19 Feb 2008 02:14:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9250E13C457 for ; Tue, 19 Feb 2008 02:14:55 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J2Etwi028725 for ; Tue, 19 Feb 2008 02:14:55 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J2Eqfa028721 for perforce@freebsd.org; Tue, 19 Feb 2008 02:14:52 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 19 Feb 2008 02:14:52 GMT Message-Id: <200802190214.m1J2Eqfa028721@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135696 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 02:14:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=135696 Change 135696 by kmacy@pandemonium:kmacy:xen31 on 2008/02/19 02:14:09 don't thread pv entry free list through the page tables don't ignore mapping in pmap_enter if valid bit isn't set Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#37 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#37 (text+ko) ==== @@ -612,43 +612,48 @@ * - Assumes a vm_offset_t will fit in a pte (true for i386). * Because PG_V is never set, there can be no mappings to invalidate. */ +static int ptelist_count = 0; static vm_offset_t pmap_ptelist_alloc(vm_offset_t *head) { - pt_entry_t *pte; vm_offset_t va; - - va = *head; - if (va == 0) - return (va); /* Out of memory */ - pte = vtopte(va); - *head = *pte; - if (*head & PG_V) - panic("pmap_ptelist_alloc: va with PG_V set!"); - *pte = 0; + vm_offset_t *phead = (vm_offset_t *)*head; + + if (ptelist_count == 0) { + printf("out of memory!!!!!!\n"); + return (0); /* Out of memory */ + } + ptelist_count--; + va = phead[ptelist_count]; return (va); } static void pmap_ptelist_free(vm_offset_t *head, vm_offset_t va) { - pt_entry_t *pte; + vm_offset_t *phead = (vm_offset_t *)*head; - if (va & PG_V) - panic("pmap_ptelist_free: freeing va with PG_V set!"); - pte = vtopte(va); - *pte = *head; /* virtual! PG_V is 0 though */ - *head = va; + phead[ptelist_count++] = va; } static void pmap_ptelist_init(vm_offset_t *head, void *base, int npages) { - int i; + int i, nstackpages; vm_offset_t va; + vm_page_t m; + + nstackpages = (npages + PAGE_SIZE/sizeof(vm_offset_t) - 1)/ (PAGE_SIZE/sizeof(vm_offset_t)); + for (i = 0; i < nstackpages; i++) { + va = (vm_offset_t)base + i * PAGE_SIZE; + m = vm_page_alloc(NULL, i, + VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | + VM_ALLOC_ZERO); + pmap_qenter(va, &m, 1); + } - *head = 0; - for (i = npages - 1; i >= 0; i--) { + *head = (vm_offset_t)base; + for (i = npages - 1; i >= nstackpages; i--) { va = (vm_offset_t)base + i * PAGE_SIZE; pmap_ptelist_free(head, va); } @@ -2595,12 +2600,15 @@ pa = VM_PAGE_TO_PHYS(m); om = NULL; opa = origpte = 0; + +#if 0 + KASSERT((*pte & PG_V) || (*pte == 0), ("address set but not valid pte=%p *pte=0x%016jx", + pte, *pte)); +#endif + origpte = PT_GET(pte); + opa = origpte & PG_FRAME; + - if (*pte & PG_V) { - origpte = PT_GET(pte); - opa = origpte & PG_FRAME; - } - /* * Mapping has not changed, must be protection or wiring change. */ @@ -2695,7 +2703,7 @@ * to update the pte. */ if ((origpte & ~(PG_M|PG_A)) != newpte) { - if (origpte & PG_V) { + if (origpte) { invlva = FALSE; origpte = pte_load_store(pte, newpte | PG_A); if (origpte & PG_A) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 02:21:02 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9EBB416A46B; Tue, 19 Feb 2008 02:21:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BB3F16A421 for ; Tue, 19 Feb 2008 02:21:02 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3DBCC13C43E for ; Tue, 19 Feb 2008 02:21:02 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J2L28x029101 for ; Tue, 19 Feb 2008 02:21:02 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J2L2fj029098 for perforce@freebsd.org; Tue, 19 Feb 2008 02:21:02 GMT (envelope-from marcel@freebsd.org) Date: Tue, 19 Feb 2008 02:21:02 GMT Message-Id: <200802190221.m1J2L2fj029098@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135697 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 02:21:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=135697 Change 135697 by marcel@marcel_xcllnt on 2008/02/19 02:20:48 Fix the INTR_FILTER changes. Affected files ... .. //depot/projects/e500/sys/dev/quicc/quicc_bfe.h#2 edit .. //depot/projects/e500/sys/dev/quicc/quicc_core.c#3 edit Differences ... ==== //depot/projects/e500/sys/dev/quicc/quicc_bfe.h#2 (text+ko) ==== @@ -66,7 +66,7 @@ int quicc_bus_read_ivar(device_t, device_t, int, uintptr_t *); int quicc_bus_release_resource(device_t, device_t, int, int, struct resource *); int quicc_bus_setup_intr(device_t, device_t, struct resource *, int, - void (*)(void *), void *, void **); + driver_filter_t *, void (*)(void *), void *, void **); int quicc_bus_teardown_intr(device_t, device_t, struct resource *, void *); #endif /* _DEV_QUICC_BFE_H_ */ ==== //depot/projects/e500/sys/dev/quicc/quicc_core.c#3 (text+ko) ==== @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#define __RMAN_RESOURCE_VISIBLE - #include #include #include @@ -71,11 +69,11 @@ device_t qd_dev; int qd_devtype; - driver_intr_t *qd_ih; + driver_filter_t *qd_ih; void *qd_ih_arg; }; -static void +static int quicc_bfe_intr(void *arg) { struct quicc_device *qd; @@ -88,10 +86,12 @@ else qd = NULL; - if (qd == NULL || qd->qd_ih == NULL) + if (qd == NULL || qd->qd_ih == NULL) { device_printf(sc->sc_dev, "Stray interrupt %08x\n", sipnr); - else - (*qd->qd_ih)(qd->qd_ih_arg); + return (FILTER_STRAY); + } + + return ((*qd->qd_ih)(qd->qd_ih_arg)); } int @@ -124,11 +124,11 @@ if (sc->sc_ires != NULL) { error = bus_setup_intr(dev, sc->sc_ires, - INTR_TYPE_TTY | INTR_FAST, NULL, quicc_bfe_intr, sc, - &sc->sc_icookie); + INTR_TYPE_TTY, quicc_bfe_intr, NULL, sc, &sc->sc_icookie); if (error) { error = bus_setup_intr(dev, sc->sc_ires, - INTR_TYPE_TTY | INTR_MPSAFE, NULL, quicc_bfe_intr, sc, + INTR_TYPE_TTY | INTR_MPSAFE, NULL, + (driver_intr_t *)quicc_bfe_intr, sc, &sc->sc_icookie); } else sc->sc_fastintr = 1; @@ -328,7 +328,8 @@ int quicc_bus_setup_intr(device_t dev, device_t child, struct resource *r, - int flags, void (*ihand)(void *), void *arg, void **cookiep) + int flags, driver_filter_t *filt, void (*ihand)(void *), void *arg, + void **cookiep) { struct quicc_device *qd; struct quicc_softc *sc; @@ -337,22 +338,22 @@ return (EINVAL); /* Interrupt handlers must be FAST or MPSAFE. */ - if ((flags & (INTR_FAST|INTR_MPSAFE)) == 0) + if (filt == NULL && !(flags & INTR_MPSAFE)) return (EINVAL); sc = device_get_softc(dev); if (sc->sc_polled) return (ENXIO); - if (sc->sc_fastintr && !(flags & INTR_FAST)) { + if (sc->sc_fastintr && filt == NULL) { sc->sc_fastintr = 0; bus_teardown_intr(dev, sc->sc_ires, sc->sc_icookie); bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_TTY | INTR_MPSAFE, - NULL, quicc_bfe_intr, sc, &sc->sc_icookie); + NULL, (driver_intr_t *)quicc_bfe_intr, sc, &sc->sc_icookie); } qd = device_get_ivars(child); - qd->qd_ih = ihand; + qd->qd_ih = (filt != NULL) ? filt : (driver_filter_t *)ihand; qd->qd_ih_arg = arg; *cookiep = ihand; return (0); From owner-p4-projects@FreeBSD.ORG Tue Feb 19 03:21:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4561916A419; Tue, 19 Feb 2008 03:21:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E70D116A417 for ; Tue, 19 Feb 2008 03:21:05 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D678F13C448 for ; Tue, 19 Feb 2008 03:21:05 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J3L5BD034189 for ; Tue, 19 Feb 2008 03:21:05 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J3L4j0034186 for perforce@freebsd.org; Tue, 19 Feb 2008 03:21:04 GMT (envelope-from marcel@freebsd.org) Date: Tue, 19 Feb 2008 03:21:04 GMT Message-Id: <200802190321.m1J3L4j0034186@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135698 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 03:21:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=135698 Change 135698 by marcel@marcel_xcllnt on 2008/02/19 03:20:36 o Remove quicc(4) - It causes a NULL-pointer dereference by virtue of it not using RMAN. o Remove uhci(4) - It causes an interrupt storm. Affected files ... .. //depot/projects/e500/sys/powerpc/conf/JUNIPER#3 edit Differences ... ==== //depot/projects/e500/sys/powerpc/conf/JUNIPER#3 (text+ko) ==== @@ -51,7 +51,7 @@ device miibus device pci device pty -device quicc +#device quicc device random #device rl device scbus @@ -60,6 +60,6 @@ device tun device uart device ugen -device uhci +#device uhci device umass device usb From owner-p4-projects@FreeBSD.ORG Tue Feb 19 04:57:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C88816A421; Tue, 19 Feb 2008 04:57:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6162316A41A for ; Tue, 19 Feb 2008 04:57:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8FB13C459 for ; Tue, 19 Feb 2008 04:57:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J4vkiH063589 for ; Tue, 19 Feb 2008 04:57:46 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J4vkla063585 for perforce@freebsd.org; Tue, 19 Feb 2008 04:57:46 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 04:57:46 GMT Message-Id: <200802190457.m1J4vkla063585@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135700 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 04:57:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=135700 Change 135700 by sam@sam_ebb on 2008/02/19 04:56:47 Fixups to make multiple ap vaps work: o allocate all the beacon buffers (not just 1!) o fixup the state machine to to be multi-vap aware o move newstate super call up so we have the bss node setup before we do driver work that depends on it o import fixups to set associd+bssid in newstate only when needed While here add printfs to vap_create failure causes; may want to move them to debug msgs eventually. Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#25 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#25 (text+ko) ==== @@ -738,8 +738,10 @@ /* XXX ic unlocked and race against add? */ switch (opmode) { case IEEE80211_M_STA: - if (sc->sc_nstavaps != 0) /* XXX only 1 sta for now */ + if (sc->sc_nstavaps != 0) { /* XXX only 1 sta for now */ + device_printf(sc->sc_dev, "only 1 sta vap supported\n"); return NULL; + } if (sc->sc_nvaps) { /* * When there are multiple vaps we must fall @@ -754,8 +756,11 @@ ic_opmode = opmode; break; case IEEE80211_M_IBSS: - if (sc->sc_nvaps != 0) /* XXX only 1 for now */ + if (sc->sc_nvaps != 0) { /* XXX only 1 for now */ + device_printf(sc->sc_dev, + "only 1 ibss vap supported\n"); return NULL; + } ic_opmode = opmode; needbeacon = 1; break; @@ -772,8 +777,11 @@ needbeacon = 1; /* fall thru... */ case IEEE80211_M_WDS: - if (sc->sc_nvaps && ic->ic_opmode == IEEE80211_M_STA) + if (sc->sc_nvaps && ic->ic_opmode == IEEE80211_M_STA) { + device_printf(sc->sc_dev, + "wds not supported in sta mode\n"); return NULL; + } if (opmode == IEEE80211_M_WDS) { /* * Silently remove any request for a unique @@ -785,15 +793,20 @@ ic_opmode = IEEE80211_M_HOSTAP; break; default: + device_printf(sc->sc_dev, "unknown opmode %d\n", opmode); return NULL; } - if (needbeacon & STAILQ_EMPTY(&sc->sc_bbuf)) + if (needbeacon & STAILQ_EMPTY(&sc->sc_bbuf)) { + device_printf(sc->sc_dev, "no beacon buffer available\n"); return NULL; + } avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), M_80211_VAP, M_NOWAIT | M_ZERO); - if (avp == NULL) + if (avp == NULL) { + device_printf(sc->sc_dev, "unable to allocate memory\n"); return NULL; + } if (opmode == IEEE80211_M_HOSTAP) assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); @@ -3475,7 +3488,7 @@ } error = ath_descdma_setup(sc, &sc->sc_bdma, &sc->sc_bbuf, - "beacon", 1, 1); + "beacon", ATH_BCBUF, 1); if (error != 0) { ath_descdma_cleanup(sc, &sc->sc_txdma, &sc->sc_txbuf); ath_descdma_cleanup(sc, &sc->sc_rxdma, &sc->sc_rxbuf); @@ -5397,6 +5410,22 @@ sc->sc_syncbeacon = 1; } +/* + * Walk the vap list and check if there any vap's in RUN state. + */ +static int +ath_isanyrunningvaps(const struct ieee80211vap *this) +{ + const struct ieee80211com *ic = this->iv_ic; + const struct ieee80211vap *vap; + + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { + if (vap != this && vap->iv_state == IEEE80211_S_RUN) + return 1; + } + return 0; +} + static int ath_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -5404,8 +5433,8 @@ struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_vap *avp = ATH_VAP(vap); struct ath_hal *ah = sc->sc_ah; - struct ieee80211_node *ni; - int i, error, stamode; + struct ieee80211_node *ni = NULL; + int i, error; u_int32_t rfilt; static const HAL_LED_STATE leds[] = { HAL_LED_INIT, /* IEEE80211_S_INIT */ @@ -5427,40 +5456,41 @@ if (nstate == IEEE80211_S_INIT) { /* - * Shutdown host/driver operation: + * If there are no vaps left in RUN state then + * shutdown host/driver operation: * o disable interrupts so we don't rx frames * o clean any pending items on the task q * o notify the rate control algorithm */ - sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); - ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL); + if (!ath_isanyrunningvaps(vap)) { + sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); + /* + * Disable interrupts. + */ + ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL); + sc->sc_beacons = 0; #if 0 - /* XXX can't use taskqueue_drain 'cuz we're holding sc_mtx */ - taskqueue_drain(sc->sc_tq, &sc->sc_rxtask); - taskqueue_drain(sc->sc_tq, &sc->sc_rxorntask); - taskqueue_drain(sc->sc_tq, &sc->sc_bmisstask); - taskqueue_drain(sc->sc_tq, &sc->sc_bstucktask); + /* XXX can't use taskqueue_drain 'cuz we're holding sc_mtx */ + taskqueue_drain(sc->sc_tq, &sc->sc_rxtask); + taskqueue_drain(sc->sc_tq, &sc->sc_rxorntask); + taskqueue_drain(sc->sc_tq, &sc->sc_bmisstask); + taskqueue_drain(sc->sc_tq, &sc->sc_bstucktask); #endif + } ath_rate_newstate(vap, nstate); - goto done; + return avp->av_newstate(vap, nstate, arg); } + ni = vap->iv_bss; - rfilt = ath_calcrxfilter(sc); - stamode = (sc->sc_opmode == HAL_M_STA || sc->sc_opmode == HAL_M_IBSS); - if (stamode && nstate == IEEE80211_S_RUN) { + if (vap->iv_opmode == IEEE80211_M_STA && nstate == IEEE80211_S_RUN) { sc->sc_curaid = ni->ni_associd; IEEE80211_ADDR_COPY(sc->sc_curbssid, ni->ni_bssid); - } else - sc->sc_curaid = 0; - + ath_hal_setassocid(ah, sc->sc_curbssid, sc->sc_curaid); + } DPRINTF(sc, ATH_DEBUG_STATE, "%s: RX filter 0x%x bssid %s aid 0x%x\n", - __func__, rfilt, ether_sprintf(sc->sc_curbssid), - sc->sc_curaid); - + __func__, rfilt, ether_sprintf(sc->sc_curbssid), sc->sc_curaid); ath_hal_setrxfilter(ah, rfilt); - if (stamode) - ath_hal_setassocid(ah, sc->sc_curbssid, ni->ni_associd); if (vap->iv_opmode != IEEE80211_M_STA && (vap->iv_flags & IEEE80211_F_PRIVACY)) { @@ -5468,23 +5498,26 @@ if (ath_hal_keyisvalid(ah, i)) ath_hal_keysetmac(ah, i, ni->ni_bssid); } - /* * Notify the rate control algorithm so rates * are setup should ath_beacon_alloc be called. */ ath_rate_newstate(vap, nstate); - if (nstate == IEEE80211_S_RUN) { + /* + * Invoke the parent method to do net80211 work. + */ + error = avp->av_newstate(vap, nstate, arg); + + if (error == 0 && nstate == IEEE80211_S_RUN) { + /* NB: collect bss node again, it may have changed */ + ni = vap->iv_bss; + DPRINTF(sc, ATH_DEBUG_STATE, - "%s(RUN): iv_flags=0x%08x iv=%d bssid=%s " - "capinfo=0x%04x chan=%d\n" - , __func__ - , vap->iv_flags - , ni->ni_intval - , ether_sprintf(ni->ni_bssid) - , ni->ni_capinfo - , ieee80211_chan2ieee(ic, ic->ic_curchan)); + "%s(RUN): iv_flags 0x%08x bintvl %d bssid %s " + "capinfo 0x%04x chan %d\n", __func__, + vap->iv_flags, ni->ni_intval, ether_sprintf(ni->ni_bssid), + ni->ni_capinfo, ieee80211_chan2ieee(ic, ic->ic_curchan)); switch (vap->iv_opmode) { case IEEE80211_M_HOSTAP: @@ -5499,7 +5532,7 @@ * be called with beacon transmission active. */ ath_hal_stoptxdma(ah, sc->sc_bhalq); - ath_beacon_free(sc); + error = ath_beacon_alloc(sc, ni); if (error != 0) goto bad; @@ -5507,13 +5540,17 @@ * If joining an adhoc network defer beacon timer * configuration to the next beacon frame so we * have a current TSF to use. Otherwise we're - * starting an ibss/bss so there's no need to delay. + * starting an ibss/bss so there's no need to delay; + * if this is the first vap moving to RUN state, then + * beacon state needs to be [re]configured. */ if (vap->iv_opmode == IEEE80211_M_IBSS && - vap->iv_bss->ni_tstamp.tsf != 0) + ni->ni_tstamp.tsf != 0) { sc->sc_syncbeacon = 1; - else + } else if (!sc->sc_beacons) { ath_beacon_config(sc, vap); + sc->sc_beacons = 1; + } break; case IEEE80211_M_STA: /* @@ -5530,6 +5567,8 @@ */ sc->sc_syncbeacon = 1; break; + case IEEE80211_M_WDS: + break; default: break; } @@ -5544,24 +5583,19 @@ sc->sc_halstats.ns_avgbrssi = ATH_RSSI_DUMMY_MARKER; sc->sc_halstats.ns_avgrssi = ATH_RSSI_DUMMY_MARKER; sc->sc_halstats.ns_avgtxrssi = ATH_RSSI_DUMMY_MARKER; + /* + * Finally, start any timers. + */ + if (sc->sc_calinterval != 0) { + /* start periodic recalibration timer */ + callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz, + ath_calibrate, sc); + } } else { ath_hal_intrset(ah, sc->sc_imask &~ (HAL_INT_SWBA | HAL_INT_BMISS)); sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); } -done: - /* - * Invoke the parent method to complete the work. - */ - error = avp->av_newstate(vap, nstate, arg); - /* - * Finally, start any timers. - */ - if (nstate == IEEE80211_S_RUN) { - /* start periodic recalibration timer */ - callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz, - ath_calibrate, sc); - } bad: return error; } From owner-p4-projects@FreeBSD.ORG Tue Feb 19 09:14:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2999516A46E; Tue, 19 Feb 2008 09:14:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E261316A46B for ; Tue, 19 Feb 2008 09:14:39 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 981FF13C4F6 for ; Tue, 19 Feb 2008 09:14:39 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1J9EdQ6013788 for ; Tue, 19 Feb 2008 09:14:39 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1J9Ed2Z013785 for perforce@freebsd.org; Tue, 19 Feb 2008 09:14:39 GMT (envelope-from thompsa@freebsd.org) Date: Tue, 19 Feb 2008 09:14:39 GMT Message-Id: <200802190914.m1J9Ed2Z013785@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 135712 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 09:14:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135712 Change 135712 by thompsa@thompsa_heff on 2008/02/19 09:14:13 Fix the build. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#11 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#11 (text+ko) ==== @@ -1331,7 +1331,6 @@ struct wpi_softc *sc = ifp->if_softc; struct ieee80211_node *ni; int error; - WPI_LOCK_DECL; DPRINTF(("%s: %s -> %s\n", __func__, ieee80211_state_name[ic->ic_state], @@ -3096,7 +3095,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; uint32_t tmp; - int ntries, error, qid; + int ntries, qid; WPI_LOCK_DECL; WPI_LOCK(sc); @@ -3296,7 +3295,6 @@ struct wpi_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; int temp; - WPI_LOCK_DECL; if (ic->ic_state != IEEE80211_S_RUN) return; From owner-p4-projects@FreeBSD.ORG Tue Feb 19 15:44:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B751816A468; Tue, 19 Feb 2008 15:44:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B53816A41A for ; Tue, 19 Feb 2008 15:44:29 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 657F113C45B for ; Tue, 19 Feb 2008 15:44:29 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JFiTDm062093 for ; Tue, 19 Feb 2008 15:44:29 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JFiTSt062090 for perforce@freebsd.org; Tue, 19 Feb 2008 15:44:29 GMT (envelope-from swise@FreeBSD.org) Date: Tue, 19 Feb 2008 15:44:29 GMT Message-Id: <200802191544.m1JFiTSt062090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 135724 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 15:44:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135724 Change 135724 by swise@swise:vic10:iwarp on 2008/02/19 15:44:09 Set SO_NO_DDP for rdma sockets. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#4 edit .. //depot/projects/iwarp/sys/kern/uipc_socket.c#4 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#4 (text+ko) ==== @@ -647,6 +647,11 @@ goto err; } + if (ep->com.so->so_rcv.sb_mb) { + printf("%s data after soreceive called! so %p sb_mb %p top %p\n", + __FUNCTION__, ep->com.so, ep->com.so->so_rcv.sb_mb, top); + } + m = top; do { /* @@ -1282,6 +1287,9 @@ static int create_sock(struct iwch_ep_common *epc) { int err; + struct sockopt sopt; + int on=1; + err = socreate(AF_INET, &epc->so, SOCK_STREAM, IPPROTO_TCP, epc->thread->td_ucred, epc->thread); if (err) @@ -1290,6 +1298,19 @@ epc->so->so_upcallarg = epc; epc->so->so_rcv.sb_flags |= SB_UPCALL; epc->so->so_state |= SS_NBIO; + + PDBG("%s ep %p so %p state %s\n", __FUNCTION__, ep, ep->com.so, states[ep->com.state]); + + sopt.sopt_dir = SOPT_SET; + sopt.sopt_level = SOL_SOCKET; + sopt.sopt_name = SO_NO_DDP; + sopt.sopt_val = (caddr_t)&on; + sopt.sopt_valsize = sizeof on; + sopt.sopt_td = NULL; + err = sosetopt(epc->so, &sopt); + if (err) + printf("%s can't set SO_NO_DDP err %d\n", __FUNCTION__, err); + return 0; } @@ -1526,8 +1547,9 @@ default: if (ep->com.so->so_rcv.sb_cc) printf("%s Unexpected streaming data." - " ep %p state %d so %p\n", - __FUNCTION__, ep, state_read(&ep->com), ep->com.so); + " ep %p state %d so %p so_state %x so_rcv.sb_cc %u so_rcv.sb_mb %p\n", + __FUNCTION__, ep, state_read(&ep->com), ep->com.so, ep->com.so->so_state, + ep->com.so->so_rcv.sb_cc, ep->com.so->so_rcv.sb_mb); break; } return; ==== //depot/projects/iwarp/sys/kern/uipc_socket.c#4 (text+ko) ==== @@ -2015,6 +2015,8 @@ case SO_TIMESTAMP: case SO_BINTIME: case SO_NOSIGPIPE: + case SO_NO_DDP: + case SO_NO_OFFLOAD: error = sooptcopyin(sopt, &optval, sizeof optval, sizeof optval); if (error) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 16:28:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 37AC816A41A; Tue, 19 Feb 2008 16:28:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F16AC16A417 for ; Tue, 19 Feb 2008 16:28:14 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DD37413C461 for ; Tue, 19 Feb 2008 16:28:14 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JGSEbX066278 for ; Tue, 19 Feb 2008 16:28:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JGSETf066275 for perforce@freebsd.org; Tue, 19 Feb 2008 16:28:14 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 16:28:14 GMT Message-Id: <200802191628.m1JGSETf066275@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135725 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 16:28:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=135725 Change 135725 by sam@sam_ebb on 2008/02/19 16:27:15 bump copyright date Affected files ... .. //depot/projects/vap/sys/dev/ath/ah_osdep.c#3 edit .. //depot/projects/vap/sys/dev/ath/ah_osdep.h#3 edit .. //depot/projects/vap/sys/dev/ath/if_ath.c#26 edit .. //depot/projects/vap/sys/dev/ath/if_ath_pci.c#6 edit .. //depot/projects/vap/sys/dev/ath/if_athioctl.h#6 edit .. //depot/projects/vap/sys/dev/ath/if_athrate.h#8 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#14 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/ah_osdep.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/dev/ath/ah_osdep.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/dev/ath/if_ath.c#26 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/dev/ath/if_ath_pci.c#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/dev/ath/if_athioctl.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without ==== //depot/projects/vap/sys/dev/ath/if_athrate.h#8 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2004-2008 Sam Leffler, Errno Consulting * Copyright (c) 2004 Video54 Technologies, Inc. * All rights reserved. * ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#14 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-p4-projects@FreeBSD.ORG Tue Feb 19 16:47:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BE50816A469; Tue, 19 Feb 2008 16:47:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 823D516A421 for ; Tue, 19 Feb 2008 16:47:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5DE13C4DB for ; Tue, 19 Feb 2008 16:47:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JGlZ3g076116 for ; Tue, 19 Feb 2008 16:47:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JGlZsL076113 for perforce@freebsd.org; Tue, 19 Feb 2008 16:47:35 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 16:47:35 GMT Message-Id: <200802191647.m1JGlZsL076113@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135727 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 16:47:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135727 Change 135727 by sam@sam_ebb on 2008/02/19 16:47:17 switch over to vap setup Affected files ... .. //depot/projects/vap/usr.sbin/wlandebug/wlandebug.c#4 edit Differences ... ==== //depot/projects/vap/usr.sbin/wlandebug/wlandebug.c#4 (text+ko) ==== @@ -156,47 +156,44 @@ exit(-1); } +static void +setoid(char oid[], size_t oidlen, const char *wlan) +{ +#ifdef __linux__ + snprintf(oid, oidlen, "net.%s.debug", wlan); +#elif __FreeBSD__ + snprintf(oid, oidlen, "net.wlan.%s.debug", wlan+4); +#elif __NetBSD__ + snprintf(oid, oidlen, "net.link.ieee80211.%s.debug", wlan+4); +#else +#error "No support for this system" +#endif +} + int main(int argc, char *argv[]) { - const char *ifname = "ath0"; const char *cp, *tp; const char *sep; int op, i, unit; u_int32_t debug, ndebug; size_t debuglen, parentlen; - char oid[256], parent[256]; + char oid[256]; progname = argv[0]; + setoid(oid, sizeof(oid), "wlan0"); if (argc > 1) { if (strcmp(argv[1], "-i") == 0) { if (argc < 2) errx(1, "missing interface name for -i option"); - ifname = argv[2]; + if (strncmp(argv[2], "wlan", 4) != 0) + errx(1, "expecting a wlan interface name"); + setoid(oid, sizeof(oid), argv[2]); argc -= 2, argv += 2; } else if (strcmp(argv[1], "-?") == 0) usage(); } - for (unit = 0; unit < 10; unit++) { -#ifdef __linux__ - snprintf(oid, sizeof(oid), "net.wlan%d.%%parent", unit); -#else - snprintf(oid, sizeof(oid), "net.wlan.%d.%%parent", unit); -#endif - parentlen = sizeof(parent); - if (sysctlbyname(oid, parent, &parentlen, NULL, 0) < 0) - continue; - if (strncmp(parent, ifname, parentlen) == 0) - break; - } - if (unit == 10) - errx(1, "%s: cannot locate wlan sysctl node.", ifname); -#ifdef __linux__ - snprintf(oid, sizeof(oid), "net.wlan%d.debug", unit); -#else - snprintf(oid, sizeof(oid), "net.wlan.%d.debug", unit); -#endif debuglen = sizeof(debug); if (sysctlbyname(oid, &debug, &debuglen, NULL, 0) < 0) err(1, "sysctl-get(%s)", oid); From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:00:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B41C416A505; Tue, 19 Feb 2008 18:00:52 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79C9416A502 for ; Tue, 19 Feb 2008 18:00:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5FE3813C4CE for ; Tue, 19 Feb 2008 18:00:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JI0qPj081806 for ; Tue, 19 Feb 2008 18:00:52 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JI0q1D081803 for perforce@freebsd.org; Tue, 19 Feb 2008 18:00:52 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 18:00:52 GMT Message-Id: <200802191800.m1JI0q1D081803@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135730 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:00:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135730 Change 135730 by sam@sam_ebb on 2008/02/19 18:00:23 shuffle newstate some more so we don't accidentally turn off SWBA Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#27 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#27 (text+ko) ==== @@ -5454,31 +5454,16 @@ callout_stop(&sc->sc_cal_ch); ath_hal_setledstate(ah, leds[nstate]); /* set LED */ - if (nstate == IEEE80211_S_INIT) { + if (nstate == IEEE80211_S_SCAN) { /* - * If there are no vaps left in RUN state then - * shutdown host/driver operation: - * o disable interrupts so we don't rx frames - * o clean any pending items on the task q - * o notify the rate control algorithm + * Scanning: turn off beacon miss and don't beacon. + * Mark beacon state so when we reach RUN state we'll + * [re]setup beacons. */ - if (!ath_isanyrunningvaps(vap)) { - sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); - /* - * Disable interrupts. - */ - ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL); - sc->sc_beacons = 0; -#if 0 - /* XXX can't use taskqueue_drain 'cuz we're holding sc_mtx */ - taskqueue_drain(sc->sc_tq, &sc->sc_rxtask); - taskqueue_drain(sc->sc_tq, &sc->sc_rxorntask); - taskqueue_drain(sc->sc_tq, &sc->sc_bmisstask); - taskqueue_drain(sc->sc_tq, &sc->sc_bstucktask); -#endif - } - ath_rate_newstate(vap, nstate); - return avp->av_newstate(vap, nstate, arg); + ath_hal_intrset(ah, + sc->sc_imask &~ (HAL_INT_SWBA | HAL_INT_BMISS)); + sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); + sc->sc_beacons = 0; } ni = vap->iv_bss; @@ -5492,6 +5477,7 @@ __func__, rfilt, ether_sprintf(sc->sc_curbssid), sc->sc_curaid); ath_hal_setrxfilter(ah, rfilt); + /* XXX is this to restore keycache on resume? */ if (vap->iv_opmode != IEEE80211_M_STA && (vap->iv_flags & IEEE80211_F_PRIVACY)) { for (i = 0; i < IEEE80211_WEP_NKID; i++) @@ -5508,8 +5494,10 @@ * Invoke the parent method to do net80211 work. */ error = avp->av_newstate(vap, nstate, arg); + if (error != 0) + goto bad; - if (error == 0 && nstate == IEEE80211_S_RUN) { + if (nstate == IEEE80211_S_RUN) { /* NB: collect bss node again, it may have changed */ ni = vap->iv_bss; @@ -5591,10 +5579,27 @@ callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz, ath_calibrate, sc); } - } else { - ath_hal_intrset(ah, - sc->sc_imask &~ (HAL_INT_SWBA | HAL_INT_BMISS)); - sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); + } else if (nstate == IEEE80211_S_INIT) { + /* + * If there are no vaps left in RUN state then + * shutdown host/driver operation: + * o disable interrupts so we don't rx frames + * o clean any pending items on the task q + * o notify the rate control algorithm + */ + if (!ath_isanyrunningvaps(vap)) { + sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS); + /* disable interrupts */ + ath_hal_intrset(ah, sc->sc_imask &~ HAL_INT_GLOBAL); + sc->sc_beacons = 0; +#if 0 + /* XXX can't use taskqueue_drain 'cuz we're holding sc_mtx */ + taskqueue_drain(sc->sc_tq, &sc->sc_rxtask); + taskqueue_drain(sc->sc_tq, &sc->sc_rxorntask); + taskqueue_drain(sc->sc_tq, &sc->sc_bmisstask); + taskqueue_drain(sc->sc_tq, &sc->sc_bstucktask); +#endif + } } bad: return error; From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:22:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8C16316A468; Tue, 19 Feb 2008 18:22:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49A3716A419 for ; Tue, 19 Feb 2008 18:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 37A6013C4CC for ; Tue, 19 Feb 2008 18:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIMM6I085205 for ; Tue, 19 Feb 2008 18:22:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIMLIO085202 for perforce@freebsd.org; Tue, 19 Feb 2008 18:22:21 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:22:21 GMT Message-Id: <200802191822.m1JIMLIO085202@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135732 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:22:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=135732 Change 135732 by hselasky@hselasky_laptop001 on 2008/02/19 18:21:43 Add more documentation to "usb_requests.c". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#19 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_requests.c#19 (text+ko) ==== @@ -62,6 +62,14 @@ /*------------------------------------------------------------------------* * usbreq_reset_port + * + * This function will instruct an USB HUB to perform a reset sequence + * on the specified port number. + * + * Returns: + * 0: Success. The USB device should now be at address zero. + * Else: Failure. No USB device is present and the USB port should be + * disabled. *------------------------------------------------------------------------*/ usbd_status_t usbreq_reset_port(struct usbd_device *udev, struct mtx *mtx, uint8_t port) @@ -149,6 +157,21 @@ /*------------------------------------------------------------------------* * usbreq_get_desc + * + * This function can be used to retrieve USB descriptors. It contains + * some additional logic like zeroing of missing descriptor bytes and + * retrying an USB descriptor in case of failure. The "min_len" + * argument specifies the minimum descriptor length. The "max_len" + * argument specifies the maximum descriptor length. If the real + * descriptor length is less than the minimum length the missing + * byte(s) will be zeroed. The length field, first byte, of the USB + * descriptor will get overwritten in case it indicates a length that + * is too big. Also the type field, second byte, of the USB descriptor + * will get forced to the correct type. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_desc(struct usbd_device *udev, struct mtx *mtx, void *desc, @@ -228,6 +251,10 @@ * using the first language ID. The maximum length "len" includes * the terminating zero. The "len" argument should be twice as * big pluss 2 bytes, compared with the actual maximum string length ! + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_string_any(struct usbd_device *udev, struct mtx *mtx, char *buf, @@ -308,6 +335,10 @@ * * If you don't know the language ID, consider using * "usbreq_get_string_any()". + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_string_desc(struct usbd_device *udev, struct mtx *mtx, void *sdesc, @@ -320,6 +351,10 @@ /*------------------------------------------------------------------------* * usbreq_get_config_desc + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_config_desc(struct usbd_device *udev, struct mtx *mtx, usb_config_descriptor_t *d, @@ -343,6 +378,14 @@ /*------------------------------------------------------------------------* * usbreq_get_config_desc_full + * + * This function gets the complete USB configuration descriptor, + * limited by the specified "size" which is usually equal to the + * "wTotalLength" field stored in the USB configuration descriptor. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_config_desc_full(struct usbd_device *udev, struct mtx *mtx, void *d, @@ -355,6 +398,10 @@ /*------------------------------------------------------------------------* * usbreq_get_device_desc + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_device_desc(struct usbd_device *udev, struct mtx *mtx, @@ -367,6 +414,10 @@ /*------------------------------------------------------------------------* * usbreq_get_alt_interface_no + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_alt_interface_no(struct usbd_device *udev, struct mtx *mtx, @@ -389,6 +440,10 @@ /*------------------------------------------------------------------------* * usbreq_set_alt_interface_no + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_alt_interface_no(struct usbd_device *udev, struct mtx *mtx, @@ -412,6 +467,10 @@ /*------------------------------------------------------------------------* * usbreq_get_device_status + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_device_status(struct usbd_device *udev, struct mtx *mtx, @@ -429,6 +488,10 @@ /*------------------------------------------------------------------------* * usbreq_get_hub_descriptor + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_hub_descriptor(struct usbd_device *udev, struct mtx *mtx, @@ -446,6 +509,10 @@ /*------------------------------------------------------------------------* * usbreq_get_hub_status + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_hub_status(struct usbd_device *udev, struct mtx *mtx, @@ -463,6 +530,13 @@ /*------------------------------------------------------------------------* * usbreq_set_address + * + * This function is used to set the address for an USB device. After + * port reset the USB device will respond at address zero. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_address(struct usbd_device *udev, struct mtx *mtx, uint16_t addr) @@ -484,6 +558,10 @@ /*------------------------------------------------------------------------* * usbreq_get_port_status + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_port_status(struct usbd_device *udev, struct mtx *mtx, @@ -502,6 +580,10 @@ /*------------------------------------------------------------------------* * usbreq_clear_hub_feature + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_clear_hub_feature(struct usbd_device *udev, struct mtx *mtx, @@ -519,6 +601,10 @@ /*------------------------------------------------------------------------* * usbreq_set_hub_feature + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_hub_feature(struct usbd_device *udev, struct mtx *mtx, @@ -536,6 +622,10 @@ /*------------------------------------------------------------------------* * usbreq_clear_port_feature + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_clear_port_feature(struct usbd_device *udev, struct mtx *mtx, @@ -554,6 +644,10 @@ /*------------------------------------------------------------------------* * usbreq_set_port_feature + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_port_feature(struct usbd_device *udev, struct mtx *mtx, @@ -572,6 +666,10 @@ /*------------------------------------------------------------------------* * usbreq_set_protocol + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_protocol(struct usbd_device *udev, struct mtx *mtx, @@ -597,6 +695,10 @@ /*------------------------------------------------------------------------* * usbreq_set_report + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_report(struct usbd_device *udev, struct mtx *mtx, void *data, uint16_t len, @@ -621,6 +723,10 @@ /*------------------------------------------------------------------------* * usbreq_get_report + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_report(struct usbd_device *udev, struct mtx *mtx, void *data, @@ -645,6 +751,10 @@ /*------------------------------------------------------------------------* * usbreq_set_idle + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_idle(struct usbd_device *udev, struct mtx *mtx, @@ -669,6 +779,10 @@ /*------------------------------------------------------------------------* * usbreq_get_report_descriptor + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_report_descriptor(struct usbd_device *udev, struct mtx *mtx, @@ -691,6 +805,14 @@ /*------------------------------------------------------------------------* * usbreq_set_config + * + * This function is used to select the current configuration number in + * both USB device side mode and USB host side mode. When setting the + * configuration the function of the interfaces can change. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_set_config(struct usbd_device *udev, struct mtx *mtx, uint8_t conf) @@ -721,6 +843,10 @@ /*------------------------------------------------------------------------* * usbreq_get_config + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbreq_get_config(struct usbd_device *udev, struct mtx *mtx, uint8_t *pconf) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:28:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2298416A469; Tue, 19 Feb 2008 18:28:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D09BB16A420 for ; Tue, 19 Feb 2008 18:28:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF91B13C4E8 for ; Tue, 19 Feb 2008 18:28:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JISSIs085834 for ; Tue, 19 Feb 2008 18:28:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JISSVf085831 for perforce@freebsd.org; Tue, 19 Feb 2008 18:28:28 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:28:28 GMT Message-Id: <200802191828.m1JISSVf085831@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135733 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:28:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=135733 Change 135733 by hselasky@hselasky_laptop001 on 2008/02/19 18:28:12 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#20 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_requests.c#20 (text+ko) ==== @@ -66,7 +66,7 @@ * This function will instruct an USB HUB to perform a reset sequence * on the specified port number. * - * Returns: + * Returns: * 0: Success. The USB device should now be at address zero. * Else: Failure. No USB device is present and the USB port should be * disabled. From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:31:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A306816A46B; Tue, 19 Feb 2008 18:31:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675F016A41B for ; Tue, 19 Feb 2008 18:31:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5177013C4FD for ; Tue, 19 Feb 2008 18:31:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIVVBn086018 for ; Tue, 19 Feb 2008 18:31:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIVVLO086015 for perforce@freebsd.org; Tue, 19 Feb 2008 18:31:31 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:31:31 GMT Message-Id: <200802191831.m1JIVVLO086015@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135734 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:31:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135734 Change 135734 by hselasky@hselasky_laptop001 on 2008/02/19 18:30:36 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#116 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#116 (text+ko) ==== @@ -208,6 +208,10 @@ * * This function searches for an USB pipe by endpoint address and * direction. + * + * Returns: + * NULL: Failure + * Else: Success *------------------------------------------------------------------------*/ struct usbd_pipe * usbd_get_pipe_by_addr(struct usbd_device *udev, uint8_t ea_val) @@ -363,6 +367,10 @@ * This function stores the number of USB interfaces excluding * alternate settings, which the USB config descriptor reports into * the unsigned 8-bit integer pointed to by "count". + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbd_interface_count(struct usbd_device *udev, uint8_t *count) @@ -3047,6 +3055,10 @@ /*------------------------------------------------------------------------* * usbd_handle_set_config + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ static usbd_status_t usbd_handle_set_config(struct usbd_xfer *xfer, uint8_t conf_no) @@ -3084,6 +3096,10 @@ * * This function is used to make a BULK or INTERRUPT endpoint * send STALL tokens. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ static usbd_status_t usbd_handle_set_stall_sub(struct usbd_device *udev, uint8_t ea_val, @@ -3160,6 +3176,10 @@ /*------------------------------------------------------------------------* * usbd_handle_stall + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ static usbd_status_t usbd_handle_set_stall(struct usbd_xfer *xfer, uint8_t ep, uint8_t do_stall) @@ -3174,6 +3194,10 @@ /*------------------------------------------------------------------------* * usbd_handle_get_stall + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ static uint8_t usbd_handle_get_stall(struct usbd_device *udev, uint8_t ea_val) @@ -3196,6 +3220,10 @@ /*------------------------------------------------------------------------* * usbd_handle_remote_wakeup + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ static usbd_status_t usbd_handle_remote_wakeup(struct usbd_xfer *xfer, uint8_t is_on) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:36:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E2CEA16A475; Tue, 19 Feb 2008 18:36:37 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FCCD16A41A for ; Tue, 19 Feb 2008 18:36:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7E41513C461 for ; Tue, 19 Feb 2008 18:36:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIabLU086315 for ; Tue, 19 Feb 2008 18:36:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIab8E086312 for perforce@freebsd.org; Tue, 19 Feb 2008 18:36:37 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:36:37 GMT Message-Id: <200802191836.m1JIab8E086312@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135735 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:36:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=135735 Change 135735 by hselasky@hselasky_laptop001 on 2008/02/19 18:35:44 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#97 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#97 (text+ko) ==== @@ -1034,6 +1034,10 @@ * * This function selects configuration by index, independent of the * actual configuration number. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbd_set_config_index(struct usbd_device *udev, uint8_t index, uint8_t msg) @@ -1191,6 +1195,10 @@ * given interface index. The interface should not be in use when this * function is called. That means there should be no open USB * transfers. Else an error is returned. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbd_set_alt_interface_index(struct usbd_device *udev, @@ -1221,6 +1229,10 @@ * This function dumps information about an USB device to the * structure pointed to by the "di" argument. It is used by some * IOCTLs. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ int usbd_fill_deviceinfo(struct usbd_device *udev, struct usb_device_info *di) @@ -1708,6 +1720,10 @@ * usbd_suspend_resume_device * * The following function will suspend or resume the USB device. + * + * Returns: + * 0: Success + * Else: Failure *------------------------------------------------------------------------*/ usbd_status_t usbd_suspend_resume(struct usbd_device *udev, uint8_t do_suspend) @@ -3198,7 +3214,7 @@ #endif /*------------------------------------------------------------------------* - * usbd_make_str_desc - convert an ASCII string into a UNICODE string + * usbd_make_str_desc - convert an ASCII string into a UNICODE string *------------------------------------------------------------------------*/ uint8_t usbd_make_str_desc(void *ptr, uint16_t max_len, const char *s) @@ -3236,7 +3252,9 @@ } /*------------------------------------------------------------------------* - * mtx_drop_recurse - drop mutex recurse level + * mtx_drop_recurse - drop mutex recurse level + * + * Returns the recurse level of the mutex. *------------------------------------------------------------------------*/ uint32_t mtx_drop_recurse(struct mtx *mtx) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:42:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE73816A419; Tue, 19 Feb 2008 18:42:44 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9347E16A417 for ; Tue, 19 Feb 2008 18:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8232F13C4DD for ; Tue, 19 Feb 2008 18:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIgin8086576 for ; Tue, 19 Feb 2008 18:42:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIgiEJ086573 for perforce@freebsd.org; Tue, 19 Feb 2008 18:42:44 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:42:44 GMT Message-Id: <200802191842.m1JIgiEJ086573@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135736 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:42:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135736 Change 135736 by hselasky@hselasky_laptop001 on 2008/02/19 18:41:43 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template.c#14 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template.c#14 (text+ko) ==== @@ -46,6 +46,9 @@ #include #include +/*------------------------------------------------------------------------* + * usbd_make_raw_desc + *------------------------------------------------------------------------*/ static void usbd_make_raw_desc(struct usbd_temp_setup *temp, const uint8_t *raw) @@ -82,6 +85,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_make_endpoint_desc + *------------------------------------------------------------------------*/ static void usbd_make_endpoint_desc(struct usbd_temp_setup *temp, const struct usb_temp_endpoint_desc *ted) @@ -176,6 +182,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_make_interface_desc + *------------------------------------------------------------------------*/ static void usbd_make_interface_desc(struct usbd_temp_setup *temp, const struct usb_temp_interface_desc *tid) @@ -241,6 +250,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_make_config_desc + *------------------------------------------------------------------------*/ static void usbd_make_config_desc(struct usbd_temp_setup *temp, const struct usb_temp_config_desc *tcd) @@ -297,6 +309,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_make_device_desc + *------------------------------------------------------------------------*/ static void usbd_make_device_desc(struct usbd_temp_setup *temp, const struct usb_temp_device_desc *tdd) @@ -387,6 +402,9 @@ return; } +/*------------------------------------------------------------------------* + * usbd_hw_ep_match + *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_match(const struct usbd_hw_ep_profile *pf, uint8_t ep_type, uint8_t ep_dir_in) @@ -406,6 +424,9 @@ return (0); } +/*------------------------------------------------------------------------* + * usbd_hw_ep_find_match + *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_find_match(struct usbd_hw_ep_scratch *ues, struct usbd_sw_ep_scratch *ep, uint8_t is_simplex) @@ -517,6 +538,9 @@ return (1); /* failure */ } +/*------------------------------------------------------------------------* + * usbd_hw_ep_get_needs + *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_get_needs(struct usbd_hw_ep_scratch *ues, uint8_t ep_type, uint8_t is_complete) @@ -665,6 +689,13 @@ goto repeat; } +/*------------------------------------------------------------------------* + * usbd_hw_ep_resolve + * + * Return values: + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ static usbd_status_t usbd_hw_ep_resolve(struct usbd_device *udev, usb_descriptor_t *desc) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:51:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DF0D816A420; Tue, 19 Feb 2008 18:51:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A53316A417 for ; Tue, 19 Feb 2008 18:51:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 59D6E13C465 for ; Tue, 19 Feb 2008 18:51:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIps2M087072 for ; Tue, 19 Feb 2008 18:51:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIpsqZ087069 for perforce@freebsd.org; Tue, 19 Feb 2008 18:51:54 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 18:51:54 GMT Message-Id: <200802191851.m1JIpsqZ087069@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135737 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:51:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=135737 Change 135737 by sam@sam_ebb on 2008/02/19 18:51:26 fixup staggered beacon scheduling: o assign vap 0 to slot 0 always to optimize single bss operation o correct slot assignment spreading o switch stagbeacons on+off based on the number of vaps beaconing Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#28 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#28 (text+ko) ==== @@ -719,6 +719,28 @@ if (i != 0 || --sc->sc_nbssid0 == 0) sc->sc_bssidmask &= ~(1<sc_bslot[slot] == NULL) { + if (sc->sc_bslot[(slot+1)%ATH_BCBUF] == NULL && + sc->sc_bslot[(slot-1)%ATH_BCBUF] == NULL) + return slot; + free = slot; + /* NB: keep looking for a double slot */ + } + return free; +} static struct ieee80211vap * ath_vap_create(struct ieee80211com *ic, @@ -796,6 +818,9 @@ device_printf(sc->sc_dev, "unknown opmode %d\n", opmode); return NULL; } + /* + * Check that a beacon buffer is available; the code below assumes it. + */ if (needbeacon & STAILQ_EMPTY(&sc->sc_bbuf)) { device_printf(sc->sc_dev, "no beacon buffer available\n"); return NULL; @@ -808,6 +833,7 @@ return NULL; } + /* STA, AHDEMO? */ if (opmode == IEEE80211_M_HOSTAP) assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); @@ -841,34 +867,17 @@ avp->av_bcbuf = STAILQ_FIRST(&sc->sc_bbuf); STAILQ_REMOVE_HEAD(&sc->sc_bbuf, bf_list); if (opmode != IEEE80211_M_IBSS || !sc->sc_hasveol) { - int slot; /* * Assign the vap to a beacon xmit slot. As above * this cannot fail to find a free one. */ - avp->av_bslot = 0; - for (slot = 0; slot < ATH_BCBUF; slot++) { - if (sc->sc_bslot[slot] == NULL) { - /* - * XXX hack, space out slots to better - * deal with traffic coming out of the - * cab q. - */ - if (slot + 1 < ATH_BCBUF && - sc->sc_bslot[slot+1] == NULL) { - avp->av_bslot = slot + 1; - break; - } - avp->av_bslot = slot; - /* NB: keep looking for a double slot */ - } - } + avp->av_bslot = assign_bslot(sc); KASSERT(sc->sc_bslot[avp->av_bslot] == NULL, ("beacon slot %u not empty", avp->av_bslot)); sc->sc_bslot[avp->av_bslot] = vap; sc->sc_nbcnvaps++; } - if (sc->sc_hastsfadd) { + if (sc->sc_hastsfadd && sc->sc_nbcnvaps > 0) { /* * Multple vaps are to transmit beacons and we * have h/w support for TSF adjusting; enable @@ -946,8 +955,11 @@ } ath_beacon_return(sc, avp->av_bcbuf); avp->av_bcbuf = NULL; - if (sc->sc_nbcnvaps == 0) + if (sc->sc_nbcnvaps == 0) { sc->sc_stagbeacons = 0; + if (sc->sc_hastsfadd) + ath_hal_settsfadjust(sc->sc_ah, 0); + } /* * Reclaim any pending mcast frames for the vap. */ From owner-p4-projects@FreeBSD.ORG Tue Feb 19 18:57:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A65716A421; Tue, 19 Feb 2008 18:57:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAFC116A418 for ; Tue, 19 Feb 2008 18:56:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CA3AA13C455 for ; Tue, 19 Feb 2008 18:56:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JIuxSY090890 for ; Tue, 19 Feb 2008 18:56:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JIuxkE090887 for perforce@freebsd.org; Tue, 19 Feb 2008 18:56:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 18:56:59 GMT Message-Id: <200802191856.m1JIuxkE090887@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135738 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 18:57:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135738 Change 135738 by hselasky@hselasky_laptop001 on 2008/02/19 18:56:05 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template.c#15 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template.c#15 (text+ko) ==== @@ -48,6 +48,9 @@ /*------------------------------------------------------------------------* * usbd_make_raw_desc + * + * This function will insert a raw USB descriptor into the generated + * USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_raw_desc(struct usbd_temp_setup *temp, @@ -87,6 +90,10 @@ /*------------------------------------------------------------------------* * usbd_make_endpoint_desc + * + * This function will generate an USB endpoint descriptor from the + * given USB template endpoint descriptor, which will be inserted into + * the USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_endpoint_desc(struct usbd_temp_setup *temp, @@ -184,6 +191,10 @@ /*------------------------------------------------------------------------* * usbd_make_interface_desc + * + * This function will generate an USB interface descriptor from the + * given USB template interface descriptor, which will be inserted + * into the USB configuration. *------------------------------------------------------------------------*/ static void usbd_make_interface_desc(struct usbd_temp_setup *temp, @@ -252,6 +263,10 @@ /*------------------------------------------------------------------------* * usbd_make_config_desc + * + * This function will generate an USB config descriptor from the given + * USB template config descriptor, which will be inserted into the USB + * configuration. *------------------------------------------------------------------------*/ static void usbd_make_config_desc(struct usbd_temp_setup *temp, @@ -311,6 +326,9 @@ /*------------------------------------------------------------------------* * usbd_make_device_desc + * + * This function will generate an USB device descriptor from the + * given USB template device descriptor. *------------------------------------------------------------------------*/ static void usbd_make_device_desc(struct usbd_temp_setup *temp, @@ -404,6 +422,10 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_match + * + * Return values: + * 0: The endpoint profile does not match the criterias + * Else: The endpoint profile matches the criterias *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_match(const struct usbd_hw_ep_profile *pf, @@ -426,6 +448,13 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_find_match + * + * This function is used to find the best matching endpoint profile + * for and endpoint belonging to an USB descriptor. + * + * Return values: + * 0: Success. Got a match. + * Else: Failure. No match. *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_find_match(struct usbd_hw_ep_scratch *ues, @@ -540,6 +569,13 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_get_needs + * + * This function will figure out the type and number of endpoints + * which are needed for an USB configuration. + * + * Return values: + * 0: Success. + * Else: Failure. *------------------------------------------------------------------------*/ static uint8_t usbd_hw_ep_get_needs(struct usbd_hw_ep_scratch *ues, @@ -692,6 +728,9 @@ /*------------------------------------------------------------------------* * usbd_hw_ep_resolve * + * This function will try to resolve endpoint requirements by the + * given endpoint profiles that the USB hardware reports. + * * Return values: * 0: Success * Else: Failure @@ -962,7 +1001,8 @@ /*------------------------------------------------------------------------* * usbd_temp_get_desc * - * This function is a demultiplexer for USB device requests. + * This function is a demultiplexer for local USB device side control + * endpoint requests. *------------------------------------------------------------------------*/ void usbd_temp_get_desc(struct usbd_device *udev, usb_device_request_t *req, From owner-p4-projects@FreeBSD.ORG Tue Feb 19 19:25:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A014816A475; Tue, 19 Feb 2008 19:25:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DC4A16A421 for ; Tue, 19 Feb 2008 19:25:29 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3562A13C4E8 for ; Tue, 19 Feb 2008 19:25:29 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JJPTch006515 for ; Tue, 19 Feb 2008 19:25:29 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JJPSt4006512 for perforce@freebsd.org; Tue, 19 Feb 2008 19:25:28 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 19:25:28 GMT Message-Id: <200802191925.m1JJPSt4006512@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135739 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 19:25:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=135739 Change 135739 by sam@sam_ebb on 2008/02/19 19:25:18 correct handling of active media status on vaps Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211.c#24 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211.c#24 (text+ko) ==== @@ -1253,6 +1253,8 @@ vap->iv_bss->ni_txrate, mode); } else imr->ifm_active |= IFM_AUTO; + if (imr->ifm_status & IFM_ACTIVE) + imr->ifm_current = imr->ifm_active; } /* From owner-p4-projects@FreeBSD.ORG Tue Feb 19 19:33:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 57A8216A41A; Tue, 19 Feb 2008 19:33:39 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 042BD16A418 for ; Tue, 19 Feb 2008 19:33:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E873513C46E for ; Tue, 19 Feb 2008 19:33:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JJXcGN007007 for ; Tue, 19 Feb 2008 19:33:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JJXcbU007002 for perforce@freebsd.org; Tue, 19 Feb 2008 19:33:38 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 19:33:38 GMT Message-Id: <200802191933.m1JJXcbU007002@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135740 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 19:33:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=135740 Change 135740 by hselasky@hselasky_laptop001 on 2008/02/19 19:33:34 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#7 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_template_cdce.c#7 (text+ko) ==== @@ -269,6 +269,13 @@ .iSerialNumber = STRING_ETH_SERIAL_INDEX, }; +/*------------------------------------------------------------------------* + * eth_get_string_desc + * + * Return values: + * NULL: Failure. No such string. + * Else: Success. Pointer to string descriptor is returned. + *------------------------------------------------------------------------*/ static const void * eth_get_string_desc(uint16_t lang_id, uint8_t string_index) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 19:40:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 65A4C16A421; Tue, 19 Feb 2008 19:40:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 123E116A46B for ; Tue, 19 Feb 2008 19:40:48 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 019DC13C510 for ; Tue, 19 Feb 2008 19:40:47 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JJelRR007334 for ; Tue, 19 Feb 2008 19:40:47 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JJelLi007331 for perforce@freebsd.org; Tue, 19 Feb 2008 19:40:47 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 19:40:47 GMT Message-Id: <200802191940.m1JJelLi007331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135741 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 19:40:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=135741 Change 135741 by sam@sam_ebb on 2008/02/19 19:39:52 (slightly) improve media status for 802.11 interfaces; really need to get the state to do this right but that belongs in the 802.11 code and not in if_media handling Affected files ... .. //depot/projects/vap/sbin/ifconfig/ifmedia.c#5 edit Differences ... ==== //depot/projects/vap/sbin/ifconfig/ifmedia.c#5 (text+ko) ==== @@ -102,6 +102,11 @@ static struct ifmedia_description *get_subtype_desc(int, struct ifmedia_type_to_subtype *ttos); +#define IFM_OPMODE(x) \ + ((x) & (IFM_IEEE80211_ADHOC | IFM_IEEE80211_HOSTAP | \ + IFM_IEEE80211_IBSS | IFM_IEEE80211_WDS | IFM_IEEE80211_MONITOR)) +#define IFM_IEEE80211_STA 0 + static void media_status(int s) { @@ -162,10 +167,13 @@ break; case IFM_IEEE80211: - /* XXX: Different value for adhoc? */ - if (ifmr.ifm_status & IFM_ACTIVE) - printf("associated"); - else + if (ifmr.ifm_status & IFM_ACTIVE) { + /* NB: only sta mode associates */ + if (IFM_OPMODE(ifmr.ifm_active) == IFM_IEEE80211_STA) + printf("associated"); + else + printf("running"); + } else printf("no carrier"); break; } From owner-p4-projects@FreeBSD.ORG Tue Feb 19 20:25:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9960816A41A; Tue, 19 Feb 2008 20:25:34 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 460BF16A417 for ; Tue, 19 Feb 2008 20:25:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3615813C468 for ; Tue, 19 Feb 2008 20:25:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JKPYX1011697 for ; Tue, 19 Feb 2008 20:25:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JKPXJa011694 for perforce@freebsd.org; Tue, 19 Feb 2008 20:25:33 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 20:25:33 GMT Message-Id: <200802192025.m1JKPXJa011694@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135742 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 20:25:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135742 Change 135742 by hselasky@hselasky_laptop001 on 2008/02/19 20:24:34 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb.c#33 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb.c#33 (text+ko) ==== @@ -65,7 +65,8 @@ MALLOC_DEFINE(M_USBDEV, "USBdev", "USB device"); MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller"); -/* define this unconditionally in case a kernel module is loaded that +/* + * Define this unconditionally in case a kernel module is loaded that * has been compiled with debugging options. */ SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging"); @@ -86,6 +87,8 @@ static uint8_t usb_post_init_called = 0; +/* prototypes */ + static device_probe_t usb_probe; static device_attach_t usb_attach; static device_detach_t usb_detach; @@ -134,6 +137,9 @@ .d_name = "usb_dummy_cdev", }; +/*------------------------------------------------------------------------* + * usb_dummy_open + *------------------------------------------------------------------------*/ static int usb_dummy_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { @@ -141,7 +147,9 @@ } /*------------------------------------------------------------------------* - * usb_event_thread - explore the device tree from the root + * usb_event_thread + * + * This function is used to explore the device tree from the root. *------------------------------------------------------------------------*/ static void usb_event_thread(struct usbd_bus *bus) @@ -211,8 +219,7 @@ /*------------------------------------------------------------------------* * usb_needs_explore * - * This functions is called when the USB event thread - * needs to be explored. + * This functions is called when the USB event thread needs run. *------------------------------------------------------------------------*/ void usb_needs_explore(struct usbd_bus *bus, uint8_t what) @@ -297,6 +304,11 @@ return; } +/*------------------------------------------------------------------------* + * usb_create_event_thread + * + * This function will simply create the event thread for an USB bus. + *------------------------------------------------------------------------*/ static void usb_create_event_thread(struct usbd_bus *bus) { @@ -308,8 +320,11 @@ return; } -/* called from "{ehci,ohci,uhci}_pci_attach()" */ - +/*------------------------------------------------------------------------* + * usb_probe + * + * This function is called from "{ehci,ohci,uhci}_pci_attach()". + *------------------------------------------------------------------------*/ static int usb_probe(device_t dev) { @@ -317,6 +332,14 @@ return (0); } +/*------------------------------------------------------------------------* + * usb_attach_sub + * + * This function is the real USB bus attach code. It is factored out, + * hence it can be called at two different places in time. During + * bootup this function is called from "usb_post_init". During + * hot-plug it is called directly from the "usb_attach()" method. + *------------------------------------------------------------------------*/ static void usb_attach_sub(device_t dev, struct usbd_bus *bus) { @@ -399,6 +422,9 @@ return; } +/*------------------------------------------------------------------------* + * usb_attach + *------------------------------------------------------------------------*/ static int usb_attach(device_t dev) { @@ -414,6 +440,12 @@ return (0); /* return success */ } +/*------------------------------------------------------------------------* + * usb_post_init + * + * This function is called to attach all USB busses that were found + * during bootup. + *------------------------------------------------------------------------*/ static void usb_post_init(void *arg) { @@ -450,6 +482,9 @@ SYSINIT(usb_post_init, SI_SUB_KICK_SCHEDULER, SI_ORDER_ANY, usb_post_init, NULL); +/*------------------------------------------------------------------------* + * usb_detach + *------------------------------------------------------------------------*/ static int usb_detach(device_t dev) { @@ -500,6 +535,11 @@ return (0); } +/*------------------------------------------------------------------------* + * usb_clone_sub + * + * This function will create a dynamic "/dev/usbX.Y" device file. + *------------------------------------------------------------------------*/ static struct usbd_clone * usb_clone_sub(struct usbd_bus *bus) { @@ -563,6 +603,11 @@ return (NULL); } +/*------------------------------------------------------------------------* + * usb_clone_remove + * + * This function will cleanup all the "/dev/usbX.Y" kernel files. + *------------------------------------------------------------------------*/ static void usb_clone_remove(struct usbd_bus *bus) { @@ -615,6 +660,11 @@ return; } +/*------------------------------------------------------------------------* + * usb_clone + * + * This function is the kernel clone callback for "/dev/usbX.Y". + *------------------------------------------------------------------------*/ static void usb_clone(void *arg, USB_UCRED char *name, int namelen, struct cdev **dev) { @@ -637,6 +687,11 @@ return; } +/*------------------------------------------------------------------------* + * usb_ioctl + * + * This function handles all IOCTL's on "/dev/usbX.Y". + *------------------------------------------------------------------------*/ static int usb_ioctl(struct usb_cdev *dev, u_long cmd, caddr_t addr, int32_t fflags, struct thread *td) @@ -794,6 +849,12 @@ #endif +/*------------------------------------------------------------------------* + * usb_init + * + * This function is called before the USB system is started, and is + * used to initialise global mutexes, if any. + *------------------------------------------------------------------------*/ static void usb_init(void *arg) { @@ -807,6 +868,9 @@ SYSINIT(usb_init, SI_SUB_DRIVERS, SI_ORDER_FIRST, usb_init, NULL); +/*------------------------------------------------------------------------* + * usb_uninit + *------------------------------------------------------------------------*/ static void usb_uninit(void *arg) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 20:37:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D0D816A420; Tue, 19 Feb 2008 20:37:50 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4233B16A41A for ; Tue, 19 Feb 2008 20:37:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3361413C45A for ; Tue, 19 Feb 2008 20:37:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JKbo24012310 for ; Tue, 19 Feb 2008 20:37:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JKbomN012307 for perforce@freebsd.org; Tue, 19 Feb 2008 20:37:50 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 20:37:50 GMT Message-Id: <200802192037.m1JKbomN012307@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135743 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 20:37:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135743 Change 135743 by hselasky@hselasky_laptop001 on 2008/02/19 20:37:33 Spelling. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb.c#34 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb.c#34 (text+ko) ==== @@ -219,7 +219,7 @@ /*------------------------------------------------------------------------* * usb_needs_explore * - * This functions is called when the USB event thread needs run. + * This functions is called when the USB event thread needs to run. *------------------------------------------------------------------------*/ void usb_needs_explore(struct usbd_bus *bus, uint8_t what) From owner-p4-projects@FreeBSD.ORG Tue Feb 19 20:52:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8E21E16A47C; Tue, 19 Feb 2008 20:52:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3925C16A46B for ; Tue, 19 Feb 2008 20:52:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC6813C4CE for ; Tue, 19 Feb 2008 20:52:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JKqASX022300 for ; Tue, 19 Feb 2008 20:52:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JKqAp0022297 for perforce@freebsd.org; Tue, 19 Feb 2008 20:52:10 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 20:52:10 GMT Message-Id: <200802192052.m1JKqAp0022297@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135745 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 20:52:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135745 Change 135745 by hselasky@hselasky_laptop001 on 2008/02/19 20:51:21 Style documentation like the other USB files. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#25 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#25 (text+ko) ==== @@ -386,9 +386,12 @@ * Linux emulation layer *------------------------------------------------------------------------*/ -/* The following function returns the maximum number of isochronous +/*------------------------------------------------------------------------* + * usb_max_isoc_frames + * + * The following function returns the maximum number of isochronous * frames that we support per URB. It is not part of the Linux USB API. - */ + *------------------------------------------------------------------------*/ static uint16_t usb_max_isoc_frames(struct usb_device *dev) { @@ -396,10 +399,13 @@ USB_MAX_HIGH_SPEED_ISOC_FRAMES : USB_MAX_FULL_SPEED_ISOC_FRAMES); } -/* This function is used to queue an URB after that it has been +/*------------------------------------------------------------------------* + * usb_submit_urb + * + * This function is used to queue an URB after that it has been * initialized. If it returns non-zero, it means that the URB was not * queued. - */ + *------------------------------------------------------------------------*/ int32_t usb_submit_urb(struct urb *urb, uint16_t mem_flags) { @@ -438,12 +444,14 @@ return (0); } -/* +/*------------------------------------------------------------------------* + * usb_unlink_urb + * * This function is used to stop an URB after that it is been * submitted, but before the "complete" callback has been called. On * FreeBSD this function is always non-blocking, and will always call * the "complete" callback with an error before it returns. - */ + *------------------------------------------------------------------------*/ int32_t usb_unlink_urb(struct urb *urb) { @@ -498,10 +506,13 @@ return (0); } -/* This function must always be used to clear the stall. Stall is when +/*------------------------------------------------------------------------* + * usb_clear_halt + * + * This function must always be used to clear the stall. Stall is when * an USB endpoint returns a stall message to the USB host controller. * Until the stall is cleared, no data can be transferred. - */ + *------------------------------------------------------------------------*/ int32_t usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe) { @@ -533,9 +544,12 @@ UF_ENDPOINT_HALT, addr, NULL, 0, 1000)); } -/* This is an internal function that is used to perform synchronous +/*------------------------------------------------------------------------* + * usb_start_wait_urb + * + * This is an internal function that is used to perform synchronous * Linux USB transfers. - */ + *------------------------------------------------------------------------*/ static int32_t usb_start_wait_urb(struct urb *urb, uint32_t timeout, uint32_t *p_actlen) { @@ -710,11 +724,14 @@ return (err); } -/* The following function will select which alternate setting of an +/*------------------------------------------------------------------------* + * usb_set_interface + * + * The following function will select which alternate setting of an * USB interface you plan to use. By default alternate setting with * index zero is selected. Note that "iface_no" is not the interface * index, but rather the value of "bInterfaceNumber". - */ + *------------------------------------------------------------------------*/ int32_t usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index) { @@ -733,14 +750,17 @@ return (err); } -/* The following function is an extension to the Linux USB API that +/*------------------------------------------------------------------------* + * usb_setup_endpoint + * + * The following function is an extension to the Linux USB API that * allows you to set a maximum buffer size for a given USB endpoint. * The maximum buffer size is per URB. If you don't call this function * to set a maximum buffer size, the endpoint will not be functional. * Note that for isochronous endpoints the maximum buffer size must be * a non-zero dummy, hence this function will base the maximum buffer * size on "wMaxPacketSize". - */ + *------------------------------------------------------------------------*/ int32_t usb_setup_endpoint(struct usb_device *dev, struct usb_host_endpoint *uhe, uint32_t bufsize) { @@ -819,10 +839,13 @@ return (0); } -/* The following function is used to build up a per USB device +/*------------------------------------------------------------------------* + * usb_linux_create_usb_device + * + * The following function is used to build up a per USB device * structure tree, that mimics the Linux one. The root structure * is returned by this function. - */ + *------------------------------------------------------------------------*/ static struct usb_device * usb_linux_create_usb_device(struct usbd_device *udev, device_t dev) { @@ -967,12 +990,15 @@ return (p_ud); } -/* This function should always be used when you allocate an URB for +/*------------------------------------------------------------------------* + * usb_alloc_urb + * + * This function should always be used when you allocate an URB for * use with the USB Linux stack. In case of an isochronous transfer * you must specifiy the maximum number of "iso_packets" which you * plan to transfer per URB. This function is always blocking, and * "mem_flags" are not regarded like on Linux. - */ + *------------------------------------------------------------------------*/ struct urb * usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags) { @@ -1003,11 +1029,14 @@ return (urb); } -/* The following function will return the Linux USB host endpoint +/*------------------------------------------------------------------------* + * usb_find_host_endpoint + * + * The following function will return the Linux USB host endpoint * structure that matches the given endpoint type and endpoint * value. If no match is found, NULL is returned. This function is not * part of the Linux USB API and is only used internally. - */ + *------------------------------------------------------------------------*/ struct usb_host_endpoint * usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep) { @@ -1061,12 +1090,15 @@ return (NULL); } -/* The following function returns a pointer to an alternate setting by +/*------------------------------------------------------------------------* + * usb_altnum_to_altsetting + * + * The following function returns a pointer to an alternate setting by * index given a "usb_interface" pointer. If the alternate setting by * index does not exist, NULL is returned. And alternate setting is a * variant of an interface, but usually with slightly different * characteristics. - */ + *------------------------------------------------------------------------*/ struct usb_host_interface * usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index) { @@ -1076,9 +1108,12 @@ return (intf->altsetting + alt_index); } -/* The following function searches up an USB interface by +/*------------------------------------------------------------------------* + * usb_ifnum_to_if + * + * The following function searches up an USB interface by * "bInterfaceNumber". If no match is found, NULL is returned. - */ + *------------------------------------------------------------------------*/ struct usb_interface * usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no) { @@ -1095,24 +1130,33 @@ return (NULL); } +/*------------------------------------------------------------------------* + * usb_buffer_alloc + *------------------------------------------------------------------------*/ void * usb_buffer_alloc(struct usb_device *dev, uint32_t size, uint16_t mem_flags, uint8_t *dma_addr) { return (malloc(size, M_USBDEV, M_WAITOK | M_ZERO)); } +/*------------------------------------------------------------------------* + * usb_get_intfdata + *------------------------------------------------------------------------*/ void * usb_get_intfdata(struct usb_interface *intf) { return (intf->bsd_priv_sc); } -/* The following function is used by the "USB_DRIVER_EXPORT()" macro, +/*------------------------------------------------------------------------* + * usb_linux_register + * + * The following function is used by the "USB_DRIVER_EXPORT()" macro, * and is used to register a Linux USB driver, so that its * "usb_device_id" structures gets searched a probe time. This * function is not part of the Linux USB API, and is for internal use * only. - */ + *------------------------------------------------------------------------*/ void usb_linux_register(void *arg) { @@ -1126,13 +1170,16 @@ return; } -/* The following function is used by the "USB_DRIVER_EXPORT()" macro, +/*------------------------------------------------------------------------* + * usb_linux_deregister + * + * The following function is used by the "USB_DRIVER_EXPORT()" macro, * and is used to deregister a Linux USB driver. This function will * ensure that all driver instances belonging to the Linux USB device * driver in question, gets detached before the driver is * unloaded. This function is not part of the Linux USB API, and is * for internal use only. - */ + *------------------------------------------------------------------------*/ void usb_linux_deregister(void *arg) { @@ -1153,9 +1200,12 @@ return; } -/* The following function is only used by the FreeBSD USB stack, to +/*------------------------------------------------------------------------* + * usb_linux_free_usb_device + * + * The following function is only used by the FreeBSD USB stack, to * cleanup and free memory after that a Linux USB device was attached. - */ + *------------------------------------------------------------------------*/ void usb_linux_free_usb_device(struct usb_device *dev) { @@ -1174,6 +1224,9 @@ return; } +/*------------------------------------------------------------------------* + * usb_buffer_free + *------------------------------------------------------------------------*/ void usb_buffer_free(struct usb_device *dev, uint32_t size, void *addr, uint8_t dma_addr) @@ -1182,6 +1235,9 @@ return; } +/*------------------------------------------------------------------------* + * usb_free_urb + *------------------------------------------------------------------------*/ void usb_free_urb(struct urb *urb) { @@ -1196,10 +1252,13 @@ return; } -/* The following function can be used to initialize a custom URB. It +/*------------------------------------------------------------------------* + * usb_init_urb + * + * The following function can be used to initialize a custom URB. It * is not recommended to use this function. Use "usb_alloc_urb()" * instead. - */ + *------------------------------------------------------------------------*/ void usb_init_urb(struct urb *urb) { @@ -1210,6 +1269,9 @@ return; } +/*------------------------------------------------------------------------* + * usb_kill_urb + *------------------------------------------------------------------------*/ void usb_kill_urb(struct urb *urb) { @@ -1219,9 +1281,12 @@ return; } -/* The following function sets the per Linux USB interface private +/*------------------------------------------------------------------------* + * usb_set_intfdata + * + * The following function sets the per Linux USB interface private * data pointer. It is used by most Linux USB device drivers. - */ + *------------------------------------------------------------------------*/ void usb_set_intfdata(struct usb_interface *intf, void *data) { @@ -1229,9 +1294,12 @@ return; } -/* The following function will release all FreeBSD USB transfers +/*------------------------------------------------------------------------* + * usb_linux_cleanup_interface + * + * The following function will release all FreeBSD USB transfers * associated with a Linux USB interface. It is for internal use only. - */ + *------------------------------------------------------------------------*/ static void usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface) { @@ -1255,9 +1323,12 @@ return; } -/* The following function is used by "usb_start_wait_urb()" to wake it +/*------------------------------------------------------------------------* + * usb_linux_wait_complete + * + * The following function is used by "usb_start_wait_urb()" to wake it * up, when an USB transfer has finished. - */ + *------------------------------------------------------------------------*/ static void usb_linux_wait_complete(struct urb *urb, struct pt_regs *pt_regs) { @@ -1268,6 +1339,9 @@ return; } +/*------------------------------------------------------------------------* + * usb_linux_complete + *------------------------------------------------------------------------*/ static void usb_linux_complete(struct usbd_xfer *xfer) { @@ -1281,11 +1355,14 @@ return; } -/* The following is the FreeBSD isochronous USB callback. Isochronous +/*------------------------------------------------------------------------* + * usb_linux_isoc_callback + * + * The following is the FreeBSD isochronous USB callback. Isochronous * frames are USB packets transferred 1000 or 8000 times per second, * depending on whether a full- or high- speed USB transfer is * used. - */ + *------------------------------------------------------------------------*/ static void usb_linux_isoc_callback(struct usbd_xfer *xfer) { @@ -1442,12 +1519,15 @@ } } -/* The following is the FreeBSD BULK/INTERRUPT and CONTROL USB +/*------------------------------------------------------------------------* + * usb_linux_non_isoc_callback + * + * The following is the FreeBSD BULK/INTERRUPT and CONTROL USB * callback. It dequeues Linux USB stack compatible URB's, transforms * the URB fields into a FreeBSD USB transfer, and defragments the USB * transfer as required. When the transfer is complete the "complete" * callback is called. - */ + *------------------------------------------------------------------------*/ static void usb_linux_non_isoc_callback(struct usbd_xfer *xfer) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 20:53:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F121A16A41A; Tue, 19 Feb 2008 20:53:11 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B68AD16A46B for ; Tue, 19 Feb 2008 20:53:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8EA8513C44B for ; Tue, 19 Feb 2008 20:53:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JKrBZt022341 for ; Tue, 19 Feb 2008 20:53:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JKrBtw022338 for perforce@freebsd.org; Tue, 19 Feb 2008 20:53:11 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 20:53:11 GMT Message-Id: <200802192053.m1JKrBtw022338@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135746 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 20:53:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135746 Change 135746 by hselasky@hselasky_laptop001 on 2008/02/19 20:53:04 s/Static/static/g Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#12 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_hid.c#12 (text+ko) ==== @@ -60,7 +60,7 @@ #define DPRINTFN(n,x) #endif -Static void hid_clear_local(struct hid_item *); +static void hid_clear_local(struct hid_item *); #define MAXUSAGE 100 struct hid_data { @@ -76,7 +76,7 @@ int kindset; }; -Static void +static void hid_clear_local(struct hid_item *c) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 20:58:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C8C016A418; Tue, 19 Feb 2008 20:58:20 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B9416A420 for ; Tue, 19 Feb 2008 20:58:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1777013C467 for ; Tue, 19 Feb 2008 20:58:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JKwJHb022681 for ; Tue, 19 Feb 2008 20:58:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JKwJZZ022678 for perforce@freebsd.org; Tue, 19 Feb 2008 20:58:19 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 20:58:19 GMT Message-Id: <200802192058.m1JKwJZZ022678@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135748 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 20:58:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135748 Change 135748 by hselasky@hselasky_laptop001 on 2008/02/19 20:58:16 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#13 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_hid.c#13 (text+ko) ==== @@ -76,6 +76,9 @@ int kindset; }; +/*------------------------------------------------------------------------* + * hid_clear_local + *------------------------------------------------------------------------*/ static void hid_clear_local(struct hid_item *c) { @@ -92,6 +95,9 @@ c->set_delimiter = 0; } +/*------------------------------------------------------------------------* + * hid_start_parse + *------------------------------------------------------------------------*/ struct hid_data * hid_start_parse(const void *d, int len, int kindset) { @@ -104,6 +110,9 @@ return (s); } +/*------------------------------------------------------------------------* + * hid_end_parse + *------------------------------------------------------------------------*/ void hid_end_parse(struct hid_data *s) { @@ -117,6 +126,9 @@ free(s, M_TEMP); } +/*------------------------------------------------------------------------* + * hid_get_item + *------------------------------------------------------------------------*/ int hid_get_item(struct hid_data *s, struct hid_item *h) { @@ -367,6 +379,9 @@ } } +/*------------------------------------------------------------------------* + * hid_report_size + *------------------------------------------------------------------------*/ int hid_report_size(const void *buf, int len, enum hid_kind k, uint8_t *idp) { @@ -396,6 +411,9 @@ return ((size + 7) / 8); } +/*------------------------------------------------------------------------* + * hid_locate + *------------------------------------------------------------------------*/ int hid_locate(const void *desc, int size, uint32_t u, enum hid_kind k, struct hid_location *loc, uint32_t *flags) @@ -418,6 +436,9 @@ return (0); } +/*------------------------------------------------------------------------* + * hid_get_data + *------------------------------------------------------------------------*/ u_long hid_get_data(const u_char *buf, uint32_t len, struct hid_location *loc) { @@ -449,6 +470,9 @@ return (data); } +/*------------------------------------------------------------------------* + * hid_is_collection + *------------------------------------------------------------------------*/ int hid_is_collection(const void *desc, int size, uint32_t usage) { @@ -467,6 +491,9 @@ return (err); } +/*------------------------------------------------------------------------* + * hid_get_descriptor_from_usb + *------------------------------------------------------------------------*/ usb_hid_descriptor_t * hid_get_descriptor_from_usb(usb_config_descriptor_t *cd, usb_interface_descriptor_t *id) @@ -488,6 +515,9 @@ return (NULL); } +/*------------------------------------------------------------------------* + * hid_read_report_desc_from_usb + *------------------------------------------------------------------------*/ usbd_status_t hid_read_report_desc_from_usb(struct usbd_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, From owner-p4-projects@FreeBSD.ORG Tue Feb 19 21:01:23 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B4BA716A41A; Tue, 19 Feb 2008 21:01:23 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6255416A46D for ; Tue, 19 Feb 2008 21:01:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 52C8F13C448 for ; Tue, 19 Feb 2008 21:01:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JL1Ng5022903 for ; Tue, 19 Feb 2008 21:01:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JL1Nwx022900 for perforce@freebsd.org; Tue, 19 Feb 2008 21:01:23 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 21:01:23 GMT Message-Id: <200802192101.m1JL1Nwx022900@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135749 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 21:01:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=135749 Change 135749 by hselasky@hselasky_laptop001 on 2008/02/19 21:01:14 Add more documentation. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#14 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_hid.c#14 (text+ko) ==== @@ -493,6 +493,13 @@ /*------------------------------------------------------------------------* * hid_get_descriptor_from_usb + * + * This function will search for a HID descriptor inside between two + * USB interface descriptors. + * + * Return values: + * NULL: No more HID descriptors. + * Else: Pointer to HID descriptor. *------------------------------------------------------------------------*/ usb_hid_descriptor_t * hid_get_descriptor_from_usb(usb_config_descriptor_t *cd, @@ -517,6 +524,13 @@ /*------------------------------------------------------------------------* * hid_read_report_desc_from_usb + * + * This function will read out an USB report descriptor from the USB + * device. + * + * Return values: + * NULL: Failure. + * Else: Success. The pointer should eventually be passed to free(). *------------------------------------------------------------------------*/ usbd_status_t hid_read_report_desc_from_usb(struct usbd_device *udev, struct mtx *mtx, From owner-p4-projects@FreeBSD.ORG Tue Feb 19 21:13:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 153DE16A420; Tue, 19 Feb 2008 21:13:44 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD3A016A41A for ; Tue, 19 Feb 2008 21:13:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BD65713C45D for ; Tue, 19 Feb 2008 21:13:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JLDh91025612 for ; Tue, 19 Feb 2008 21:13:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JLDh4N025609 for perforce@freebsd.org; Tue, 19 Feb 2008 21:13:43 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 19 Feb 2008 21:13:43 GMT Message-Id: <200802192113.m1JLDh4N025609@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 135752 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 21:13:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=135752 Change 135752 by hselasky@hselasky_laptop001 on 2008/02/19 21:13:38 Spelling. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#15 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_hid.c#15 (text+ko) ==== @@ -494,8 +494,8 @@ /*------------------------------------------------------------------------* * hid_get_descriptor_from_usb * - * This function will search for a HID descriptor inside between two - * USB interface descriptors. + * This function will search for a HID descriptor between two USB + * interface descriptors. * * Return values: * NULL: No more HID descriptors. From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:11:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F25716A468; Tue, 19 Feb 2008 23:11:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C11716A420 for ; Tue, 19 Feb 2008 23:11:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 33AE013C468 for ; Tue, 19 Feb 2008 23:11:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNBlw7035517 for ; Tue, 19 Feb 2008 23:11:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNBkoT035514 for perforce@freebsd.org; Tue, 19 Feb 2008 23:11:46 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:11:46 GMT Message-Id: <200802192311.m1JNBkoT035514@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135753 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:11:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=135753 Change 135753 by jb@jb_freebsd1 on 2008/02/19 23:11:34 Add a linker_ctf structure to pass all the CTF stuff back in. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_linker.c#30 edit .. //depot/projects/dtrace/src/sys/kern/linker_if.m#8 edit .. //depot/projects/dtrace/src/sys/sys/linker.h#20 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_linker.c#30 (text+ko) ==== @@ -648,9 +648,9 @@ } int -linker_ctf_get(linker_file_t file, const uint8_t **data, int *len) +linker_ctf_get(linker_file_t file, linker_ctf_t *lc) { - return (LINKER_CTF_GET(file, data, len)); + return (LINKER_CTF_GET(file, lc)); } static int @@ -701,7 +701,7 @@ */ int linker_file_function_listall(linker_file_t lf, - int (*callback_func)(linker_file_t, linker_symval_t *, void *), void *arg) + linker_function_nameval_callback_t callback_func, void *arg) { return (LINKER_EACH_FUNCTION_NAMEVAL(lf, callback_func, arg)); } ==== //depot/projects/dtrace/src/sys/kern/linker_if.m#8 (text+ko) ==== @@ -97,12 +97,11 @@ # # Load CTF data if necessary and if there is a .SUNW_ctf section -# in the ELF file, returning a pointer to the data and the length. +# in the ELF file, returning info in the linker CTF structure. # METHOD int ctf_get { linker_file_t file; - const uint8_t **data; - int *len; + linker_ctf_t *lc; }; # ==== //depot/projects/dtrace/src/sys/sys/linker.h#20 (text+ko) ==== @@ -59,7 +59,7 @@ size_t size; } linker_symval_t; -typedef int (*linker_function_nameval_callback_t)(linker_file_t, linker_symval_t *, void *); +typedef int (*linker_function_nameval_callback_t)(linker_file_t, int, linker_symval_t *, void *); struct common_symbol { STAILQ_ENTRY(common_symbol) link; @@ -158,8 +158,8 @@ /* * List all functions in a file. */ -int linker_file_function_listall(linker_file_t, int (*)(linker_file_t, - linker_symval_t *, void *), void *); +int linker_file_function_listall(linker_file_t, + linker_function_nameval_callback_t, void *); /* * Functions soley for use by the linker class handlers. @@ -266,7 +266,20 @@ int elf_reloc_local(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu); const Elf_Sym *elf_get_sym(linker_file_t _lf, Elf_Size _symidx); const char *elf_get_symname(linker_file_t _lf, Elf_Size _symidx); -int linker_ctf_get(linker_file_t, const uint8_t **, int *); + +typedef struct linker_ctf { + const uint8_t *ctftab; /* Decompressed CTF data. */ + int ctfcnt; /* Number of CTF data bytes. */ + const Elf_Sym *symtab; /* Ptr to the symbol table. */ + int nsym; /* Number of symbols. */ + const char *strtab; /* Ptr to the string table. */ + int strcnt; /* Number of string bytes. */ + uint32_t **ctfoffp; /* Ptr to array of obj/fnc offsets. */ + uint32_t **typoffp; /* Ptr to array of type offsets. */ + long *typlenp; /* Ptr to number of type data entries. */ +} linker_ctf_t; + +int linker_ctf_get(linker_file_t, linker_ctf_t *); int elf_cpu_load_file(linker_file_t); int elf_cpu_unload_file(linker_file_t); From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:13:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0CDB316A46B; Tue, 19 Feb 2008 23:13:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE54016A418 for ; Tue, 19 Feb 2008 23:13:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A101A13C4E7 for ; Tue, 19 Feb 2008 23:13:49 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNDnQL036298 for ; Tue, 19 Feb 2008 23:13:49 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNDnCa036295 for perforce@freebsd.org; Tue, 19 Feb 2008 23:13:49 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:13:49 GMT Message-Id: <200802192313.m1JNDnCa036295@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135754 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:13:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135754 Change 135754 by jb@jb_freebsd1 on 2008/02/19 23:13:11 Add hook variables for the CTF data arrays and ensure that the memory gets freed with other stuff. Affected files ... .. //depot/projects/dtrace/src/sys/kern/link_elf.c#16 edit .. //depot/projects/dtrace/src/sys/kern/link_elf_obj.c#13 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/link_elf.c#16 (text+ko) ==== @@ -63,6 +63,10 @@ #include +#ifdef DDB_CTF +#include +#endif + #include "linker_if.h" #define MAXSEGS 4 @@ -101,6 +105,9 @@ caddr_t strbase; /* malloc'ed string base */ caddr_t ctftab; /* CTF table */ long ctfcnt; /* number of bytes in CTF table */ + caddr_t ctfoff; /* CTF offset table */ + caddr_t typoff; /* Type offset table */ + long typlen; /* Number of type entries. */ #ifdef GDB struct link_map gdb; /* hooks for gdb */ #endif @@ -127,7 +134,7 @@ int (*)(const char *, void *), void *); static int link_elf_each_function_nameval(linker_file_t, - int (*)(linker_file_t, linker_symval_t*, void *), + linker_function_nameval_callback_t, void *); static void link_elf_reloc_local(linker_file_t); static Elf_Addr elf_lookup(linker_file_t lf, Elf_Size symidx, int deps); @@ -917,6 +924,10 @@ free(ef->strbase, M_LINKER); if (ef->ctftab) free(ef->ctftab, M_LINKER); + if (ef->ctfoff) + free(ef->ctfoff, M_LINKER); + if (ef->typoff) + free(ef->typoff, M_LINKER); } static void @@ -1236,7 +1247,7 @@ static int link_elf_each_function_nameval(linker_file_t file, - int (*callback)(linker_file_t, linker_symval_t *, void *), void *opaque) + linker_function_nameval_callback_t callback, void *opaque) { linker_symval_t symval; elf_file_t ef = (elf_file_t)file; @@ -1250,7 +1261,7 @@ error = link_elf_symbol_values(file, (c_linker_sym_t) symp, &symval); if (error) return (error); - error = callback(file, &symval, opaque); + error = callback(file, i, &symval, opaque); if (error) return (error); } ==== //depot/projects/dtrace/src/sys/kern/link_elf_obj.c#13 (text+ko) ==== @@ -58,6 +58,10 @@ #include +#ifdef DDB_CTF +#include +#endif + #include "linker_if.h" typedef struct { @@ -108,6 +112,9 @@ caddr_t ctftab; /* CTF table */ long ctfcnt; /* number of bytes in CTF table */ + caddr_t ctfoff; /* CTF offset table */ + caddr_t typoff; /* Type offset table */ + long typlen; /* Number of type entries. */ } *elf_file_t; @@ -130,7 +137,7 @@ static int link_elf_each_function_name(linker_file_t, int (*)(const char *, void *), void *); static int link_elf_each_function_nameval(linker_file_t, - int (*)(linker_file_t, linker_symval_t*, void *), + linker_function_nameval_callback_t, void *); static void link_elf_reloc_local(linker_file_t); @@ -823,6 +830,10 @@ free(ef->progtab, M_LINKER); if (ef->ctftab) free(ef->ctftab, M_LINKER); + if (ef->ctfoff) + free(ef->ctfoff, M_LINKER); + if (ef->typoff) + free(ef->typoff, M_LINKER); if (file->filename != NULL) preload_delete_name(file->filename); /* XXX reclaim module memory? */ @@ -857,6 +868,10 @@ free(ef->shstrtab, M_LINKER); if (ef->ctftab) free(ef->ctftab, M_LINKER); + if (ef->ctfoff) + free(ef->ctfoff, M_LINKER); + if (ef->typoff) + free(ef->typoff, M_LINKER); } static const char * @@ -1080,7 +1095,7 @@ static int link_elf_each_function_nameval(linker_file_t file, - int (*callback)(linker_file_t, linker_symval_t *, void *), void *opaque) + linker_function_nameval_callback_t callback, void *opaque) { linker_symval_t symval; elf_file_t ef = (elf_file_t)file; @@ -1094,7 +1109,7 @@ error = link_elf_symbol_values(file, (c_linker_sym_t) symp, &symval); if (error) return (error); - error = callback(file, &symval, opaque); + error = callback(file, i, &symval, opaque); if (error) return (error); } From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:17:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 76C1E16A41B; Tue, 19 Feb 2008 23:17:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B6D416A419 for ; Tue, 19 Feb 2008 23:17:54 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1A31013C461 for ; Tue, 19 Feb 2008 23:17:54 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNHr1m036636 for ; Tue, 19 Feb 2008 23:17:53 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNHrq6036633 for perforce@freebsd.org; Tue, 19 Feb 2008 23:17:53 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:17:53 GMT Message-Id: <200802192317.m1JNHrq6036633@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135755 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:17:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=135755 Change 135755 by jb@jb_freebsd1 on 2008/02/19 23:17:42 CTF data can be (and usually is) compressed, so we need to do that at the time when the data is read from the file. The ctfoff, typoff and typlen variables in the elf_file struucture must be set from outside (by the fbt kernel module) due to licensing restrictions. The CTF parsing code is covered by the CDDL and the format isn't documented outside the code. I think I'll propose a clean-room CTF implementation as a Google Summer of Code project. It would be nice to be able to use the info in DDB. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_ctf.c#2 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_ctf.c#2 (text+ko) ==== @@ -26,15 +26,41 @@ /* * Note this file is included by both link_elf.c and link_elf_obj.c. + * + * The CTF header structure definition can't be used here because it's + * (annoyingly) covered by the CDDL. We will just use a few bytes from + * it as an integer array where we 'know' what they mean. */ +#define CTF_HDR_SIZE 36 +#define CTF_HDR_STRTAB_U32 7 +#define CTF_HDR_STRLEN_U32 8 + +#ifdef DDB_CTF +static void * +z_alloc(void *nil, u_int items, u_int size) +{ + void *ptr; + + ptr = malloc(items * size, M_TEMP, M_NOWAIT); + return ptr; +} +static void +z_free(void *nil, void *ptr) +{ + free(ptr, M_TEMP); +} + +#endif + static int -link_elf_ctf_get(linker_file_t lf, const uint8_t **data, int *len) +link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc) { #ifdef DDB_CTF Elf_Ehdr *hdr = NULL; Elf_Shdr *shdr = NULL; caddr_t ctftab = NULL; + caddr_t raw = NULL; caddr_t shstrtab = NULL; elf_file_t ef = (elf_file_t) lf; int flags; @@ -42,18 +68,18 @@ int nbytes; int resid; int vfslocked; + size_t sz; struct nameidata nd; struct thread *td = curthread; - + uint8_t ctf_hdr[CTF_HDR_SIZE]; #endif int error = 0; - if (lf == NULL || data == NULL || len == NULL) + if (lf == NULL || lc == NULL) return (EINVAL); /* Set the defaults for no CTF present. That's not a crime! */ - *data = NULL; - *len = 0; + bzero(lc, sizeof(*lc)); #ifdef DDB_CTF /* @@ -67,8 +93,15 @@ /* Now check if we've already loaded the CTF data.. */ if (ef->ctfcnt > 0) { /* We only need to load once. */ - *data = ef->ctftab; - *len = ef->ctfcnt; + lc->ctftab = ef->ctftab; + lc->ctfcnt = ef->ctfcnt; + lc->symtab = ef->ddbsymtab; + lc->strtab = ef->ddbstrtab; + lc->strcnt = ef->ddbstrcnt; + lc->nsym = ef->ddbsymcnt; + lc->ctfoffp = (uint32_t **) &ef->ctfoff; + lc->typoffp = (uint32_t **) &ef->typoff; + lc->typlenp = &ef->typlen; return (0); } @@ -155,18 +188,100 @@ if (i >= hdr->e_shnum) goto out; - /* Allocate memory to buffer the CTF data. */ - if ((ctftab = malloc(shdr[i].sh_size, M_LINKER, M_WAITOK)) == NULL) { + /* Read the CTF header. */ + if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctf_hdr, sizeof(ctf_hdr), + shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, + NOCRED, &resid, td)) != 0) + goto out; + + /* Check the CTF magic number. (XXX check for big endian!) */ + if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf) + goto out; + + /* Check if version 2. */ + if (ctf_hdr[2] != 2) + goto out; + + /* Check if the data is compressed. */ + if ((ctf_hdr[3] & 0x1) != 0) { + uint32_t *u32 = (uint32_t *) ctf_hdr; + + /* + * The last two fields in the CTF header are the offset + * from the end of the header to the start of the string + * data and the length of that string data. se this + * information to determine the decompressed CTF data + * buffer required. + */ + sz = u32[CTF_HDR_STRTAB_U32] + u32[CTF_HDR_STRLEN_U32] + + sizeof(ctf_hdr); + + /* + * Allocate memory for the compressed CTF data, including + * the header (which isn't compressed). + */ + if ((raw = malloc(shdr[i].sh_size, M_LINKER, M_WAITOK)) == NULL) { + error = ENOMEM; + goto out; + } + } else { + /* + * The CTF data is not compressed, so the ELF section + * size is the same as the buffer size required. + */ + sz = shdr[i].sh_size; + } + + /* + * Allocate memory to buffer the CTF data in it's decompressed + * form. + */ + if ((ctftab = malloc(sz, M_LINKER, M_WAITOK)) == NULL) { error = ENOMEM; goto out; } - /* Read the CTF data. */ - if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctftab, shdr[i].sh_size, - shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, - NOCRED, &resid, td)) != 0) + /* + * Read the CTF data into the raw buffer if compressed, or + * directly into the CTF buffer otherwise. + */ + if ((error = vn_rdwr(UIO_READ, nd.ni_vp, raw == NULL ? ctftab : raw, + shdr[i].sh_size, shdr[i].sh_offset, UIO_SYSSPACE, IO_NODELOCKED, + td->td_ucred, NOCRED, &resid, td)) != 0) goto out; + /* Check if decompression is required. */ + if (raw != NULL) { + z_stream zs; + int ret; + + /* + * The header isn't compressed, so copy that into the + * CTF buffer first. + */ + bcopy(ctf_hdr, ctftab, sizeof(ctf_hdr)); + + /* Initialise the zlib structure. */ + bzero(&zs, sizeof(zs)); + zs.zalloc = z_alloc; + zs.zfree = z_free; + + if (inflateInit(&zs) != Z_OK) { + error = EIO; + goto out; + } + + zs.avail_in = shdr[i].sh_size - sizeof(ctf_hdr); + zs.next_in = ((uint8_t *) raw) + sizeof(ctf_hdr); + zs.avail_out = sz - sizeof(ctf_hdr); + zs.next_out = ((uint8_t *) ctftab) + sizeof(ctf_hdr); + if ((ret = inflate(&zs, Z_FINISH)) != Z_STREAM_END) { + printf("%s(%d): zlib inflate returned %d\n", __func__, __LINE__, ret); + error = EIO; + goto out; + } + } + /* Got the CTF data! */ ef->ctftab = ctftab; ef->ctfcnt = shdr[i].sh_size; @@ -175,8 +290,15 @@ ctftab = NULL; /* Let the caller use the CTF data read. */ - *data = ef->ctftab; - *len = ef->ctfcnt; + lc->ctftab = ef->ctftab; + lc->ctfcnt = ef->ctfcnt; + lc->symtab = ef->ddbsymtab; + lc->strtab = ef->ddbstrtab; + lc->strcnt = ef->ddbstrcnt; + lc->nsym = ef->ddbsymcnt; + lc->ctfoffp = (uint32_t **) &ef->ctfoff; + lc->typoffp = (uint32_t **) &ef->typoff; + lc->typlenp = &ef->typlen; out: VOP_UNLOCK(nd.ni_vp, 0); @@ -191,6 +313,8 @@ free(shstrtab, M_LINKER); if (ctftab != NULL) free(ctftab, M_LINKER); + if (raw != NULL) + free(raw, M_LINKER); #else error = EOPNOTSUPP; #endif From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:19:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A67B916A420; Tue, 19 Feb 2008 23:19:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 542E916A418 for ; Tue, 19 Feb 2008 23:19:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 47A5A13C455 for ; Tue, 19 Feb 2008 23:19:00 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNIt36036666 for ; Tue, 19 Feb 2008 23:18:55 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNItdL036663 for perforce@freebsd.org; Tue, 19 Feb 2008 23:18:55 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:18:55 GMT Message-Id: <200802192318.m1JNItdL036663@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135756 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:19:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135756 Change 135756 by jb@jb_freebsd1 on 2008/02/19 23:18:33 The CTF code is zipped, not gzipped. Affected files ... .. //depot/projects/dtrace/src/sys/conf/files#72 edit Differences ... ==== //depot/projects/dtrace/src/sys/conf/files#72 (text+ko) ==== @@ -1416,7 +1416,7 @@ kern/device_if.m standard kern/imgact_elf.c standard kern/imgact_shell.c standard -kern/inflate.c optional gzip | ddb_ctf +kern/inflate.c optional gzip kern/init_main.c standard kern/init_sysent.c standard kern/ksched.c optional _kposix_priority_scheduling @@ -1660,7 +1660,8 @@ net/slcompress.c optional netgraph_vjc | ppp | sl | sppp | \ netgraph_sppp net/zlib.c optional crypto | geom_uzip | ipsec | \ - mxge | ppp_deflate | netgraph_deflate + mxge | ppp_deflate | netgraph_deflate | \ + ddb_ctf net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan_acl net80211/ieee80211_amrr.c optional wlan_amrr From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:19:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4161C16A41A; Tue, 19 Feb 2008 23:19:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88E316A46C for ; Tue, 19 Feb 2008 23:19:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B95FA13C47E for ; Tue, 19 Feb 2008 23:19:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNJuAI036716 for ; Tue, 19 Feb 2008 23:19:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNJuSk036713 for perforce@freebsd.org; Tue, 19 Feb 2008 23:19:56 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:19:56 GMT Message-Id: <200802192319.m1JNJuSk036713@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135757 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:19:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135757 Change 135757 by jb@jb_freebsd1 on 2008/02/19 23:19:51 Add code to implement probe argument descriptions by interpreting the CTF data. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#8 (text+ko) ==== @@ -60,7 +60,6 @@ #include -MALLOC_DECLARE(M_FBT); MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); #define FBT_PUSHL_EBP 0x55 @@ -83,6 +82,7 @@ static d_open_t fbt_open; static int fbt_unload(void); +static void fbt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); static void fbt_provide_module(void *, modctl_t *); static void fbt_destroy(void *, dtrace_id_t, void *); static void fbt_enable(void *, dtrace_id_t, void *); @@ -117,7 +117,7 @@ fbt_disable, fbt_suspend, fbt_resume, - NULL, + fbt_getargdesc, NULL, NULL, fbt_destroy @@ -136,6 +136,7 @@ int fbtp_loadcnt; int fbtp_primary; int fbtp_invop_cnt; + int fbtp_symindx; struct fbt_probe *fbtp_next; } fbt_probe_t; @@ -206,7 +207,8 @@ } static int -fbt_provide_module_function(linker_file_t lf, linker_symval_t *symval, void *opaque) +fbt_provide_module_function(linker_file_t lf, int symindx, + linker_symval_t *symval, void *opaque) { char *modname = opaque; const char *name = symval->name; @@ -271,6 +273,7 @@ fbt->fbtp_rval = DTRACE_INVOP_PUSHL_EBP; fbt->fbtp_savedval = *instr; fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_symindx = symindx; fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; @@ -357,6 +360,7 @@ fbt->fbtp_patchpoint = instr; fbt->fbtp_ctl = lf; fbt->fbtp_loadcnt = lf->loadcnt; + fbt->fbtp_symindx = symindx; #ifndef __amd64__ if (*instr == FBT_POPL_EBP) { @@ -386,7 +390,6 @@ goto again; } -/*ARGSUSED*/ static void fbt_provide_module(void *arg, modctl_t *lf) { @@ -437,7 +440,6 @@ (void) linker_file_function_listall(lf, fbt_provide_module_function, modname); } -/* ARGSUSED */ static void fbt_destroy(void *arg, dtrace_id_t id, void *parg) { @@ -476,7 +478,6 @@ } while (fbt != NULL); } -/* ARGSUSED */ static void fbt_enable(void *arg, dtrace_id_t id, void *parg) { @@ -505,7 +506,6 @@ } } -/* ARGSUSED */ static void fbt_disable(void *arg, dtrace_id_t id, void *parg) { @@ -522,7 +522,6 @@ *fbt->fbtp_patchpoint = fbt->fbtp_savedval; } -/*ARGSUSED*/ static void fbt_suspend(void *arg, dtrace_id_t id, void *parg) { @@ -538,7 +537,6 @@ *fbt->fbtp_patchpoint = fbt->fbtp_savedval; } -/*ARGSUSED*/ static void fbt_resume(void *arg, dtrace_id_t id, void *parg) { @@ -554,7 +552,758 @@ *fbt->fbtp_patchpoint = fbt->fbtp_patchval; } +static int +fbt_ctfoff_init(modctl_t *lf, linker_ctf_t *lc) +{ + const Elf_Sym *symp = lc->symtab;; + const char *name; + const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; + const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); + int i; + uint32_t *ctfoff; + uint32_t objtoff = hp->cth_objtoff; + uint32_t funcoff = hp->cth_funcoff; + ushort_t info; + ushort_t vlen; + + /* Sanity check. */ + if (hp->cth_magic != CTF_MAGIC) { + printf("Bad magic value in CTF data of '%s'\n",lf->pathname); + return (EINVAL); + } + + if (lc->symtab == NULL) { + printf("No symbol table in '%s'\n",lf->pathname); + return (EINVAL); + } + + if ((ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK)) == NULL) + return (ENOMEM); + + *lc->ctfoffp = ctfoff; + + for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { + if (symp->st_name == 0 || symp->st_shndx == SHN_UNDEF) { + *ctfoff = 0xffffffff; + continue; + } + + if (symp->st_name < lc->strcnt) + name = lc->strtab + symp->st_name; + else + name = "(?)"; + + switch (ELF_ST_TYPE(symp->st_info)) { + case STT_OBJECT: + if (objtoff >= hp->cth_funcoff || + (symp->st_shndx == SHN_ABS && symp->st_value == 0)) { + *ctfoff = 0xffffffff; + break; + } + + *ctfoff = objtoff; + objtoff += sizeof (ushort_t); + break; + + case STT_FUNC: + if (funcoff >= hp->cth_typeoff) { + *ctfoff = 0xffffffff; + break; + } + + *ctfoff = funcoff; + + info = *((const ushort_t *)(ctfdata + funcoff)); + vlen = CTF_INFO_VLEN(info); + + /* + * If we encounter a zero pad at the end, just skip it. + * Otherwise skip over the function and its return type + * (+2) and the argument list (vlen). + */ + if (CTF_INFO_KIND(info) == CTF_K_UNKNOWN && vlen == 0) + funcoff += sizeof (ushort_t); /* skip pad */ + else + funcoff += sizeof (ushort_t) * (vlen + 2); + break; + + default: + *ctfoff = 0xffffffff; + break; + } + } + + return (0); +} + +static ssize_t +fbt_get_ctt_size(uint8_t version, const ctf_type_t *tp, ssize_t *sizep, + ssize_t *incrementp) +{ + ssize_t size, increment; + + if (version > CTF_VERSION_1 && + tp->ctt_size == CTF_LSIZE_SENT) { + size = CTF_TYPE_LSIZE(tp); + increment = sizeof (ctf_type_t); + } else { + size = tp->ctt_size; + increment = sizeof (ctf_stype_t); + } + + if (sizep) + *sizep = size; + if (incrementp) + *incrementp = increment; + + return (size); +} + +static int +fbt_typoff_init(linker_ctf_t *lc) +{ + const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; + const ctf_type_t *tbuf; + const ctf_type_t *tend; + const ctf_type_t *tp; + const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); + int ctf_typemax = 0; + uint32_t *xp; + ulong_t pop[CTF_K_MAX + 1] = { 0 }; + + + /* Sanity check. */ + if (hp->cth_magic != CTF_MAGIC) + return (EINVAL); + + tbuf = (const ctf_type_t *) (ctfdata + hp->cth_typeoff); + tend = (const ctf_type_t *) (ctfdata + hp->cth_stroff); + + int child = hp->cth_parname != 0; + + /* + * We make two passes through the entire type section. In this first + * pass, we count the number of each type and the total number of types. + */ + for (tp = tbuf; tp < tend; ctf_typemax++) { + ushort_t kind = CTF_INFO_KIND(tp->ctt_info); + ulong_t vlen = CTF_INFO_VLEN(tp->ctt_info); + ssize_t size, increment; + + size_t vbytes; + uint_t n; + + (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); + + switch (kind) { + case CTF_K_INTEGER: + case CTF_K_FLOAT: + vbytes = sizeof (uint_t); + break; + case CTF_K_ARRAY: + vbytes = sizeof (ctf_array_t); + break; + case CTF_K_FUNCTION: + vbytes = sizeof (ushort_t) * (vlen + (vlen & 1)); + break; + case CTF_K_STRUCT: + case CTF_K_UNION: + if (size < CTF_LSTRUCT_THRESH) { + ctf_member_t *mp = (ctf_member_t *) + ((uintptr_t)tp + increment); + + vbytes = sizeof (ctf_member_t) * vlen; + for (n = vlen; n != 0; n--, mp++) + child |= CTF_TYPE_ISCHILD(mp->ctm_type); + } else { + ctf_lmember_t *lmp = (ctf_lmember_t *) + ((uintptr_t)tp + increment); + + vbytes = sizeof (ctf_lmember_t) * vlen; + for (n = vlen; n != 0; n--, lmp++) + child |= + CTF_TYPE_ISCHILD(lmp->ctlm_type); + } + break; + case CTF_K_ENUM: + vbytes = sizeof (ctf_enum_t) * vlen; + break; + case CTF_K_FORWARD: + /* + * For forward declarations, ctt_type is the CTF_K_* + * kind for the tag, so bump that population count too. + * If ctt_type is unknown, treat the tag as a struct. + */ + if (tp->ctt_type == CTF_K_UNKNOWN || + tp->ctt_type >= CTF_K_MAX) + pop[CTF_K_STRUCT]++; + else + pop[tp->ctt_type]++; + /*FALLTHRU*/ + case CTF_K_UNKNOWN: + vbytes = 0; + break; + case CTF_K_POINTER: + case CTF_K_TYPEDEF: + case CTF_K_VOLATILE: + case CTF_K_CONST: + case CTF_K_RESTRICT: + child |= CTF_TYPE_ISCHILD(tp->ctt_type); + vbytes = 0; + break; + default: + printf("%s(%d): detected invalid CTF kind -- %u\n", __func__, __LINE__, kind); + return (EIO); + } + tp = (ctf_type_t *)((uintptr_t)tp + increment + vbytes); + pop[kind]++; + } + + *lc->typlenp = ctf_typemax; + + if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) + return (ENOMEM); + + *lc->typoffp = xp; + + /* type id 0 is used as a sentinel value */ + *xp++ = 0; + + /* + * In the second pass, fill in the type offset. + */ + for (tp = tbuf; tp < tend; xp++) { + ushort_t kind = CTF_INFO_KIND(tp->ctt_info); + ulong_t vlen = CTF_INFO_VLEN(tp->ctt_info); + ssize_t size, increment; + + size_t vbytes; + uint_t n; + + (void) fbt_get_ctt_size(hp->cth_version, tp, &size, &increment); + + switch (kind) { + case CTF_K_INTEGER: + case CTF_K_FLOAT: + vbytes = sizeof (uint_t); + break; + case CTF_K_ARRAY: + vbytes = sizeof (ctf_array_t); + break; + case CTF_K_FUNCTION: + vbytes = sizeof (ushort_t) * (vlen + (vlen & 1)); + break; + case CTF_K_STRUCT: + case CTF_K_UNION: + if (size < CTF_LSTRUCT_THRESH) { + ctf_member_t *mp = (ctf_member_t *) + ((uintptr_t)tp + increment); + + vbytes = sizeof (ctf_member_t) * vlen; + for (n = vlen; n != 0; n--, mp++) + child |= CTF_TYPE_ISCHILD(mp->ctm_type); + } else { + ctf_lmember_t *lmp = (ctf_lmember_t *) + ((uintptr_t)tp + increment); + + vbytes = sizeof (ctf_lmember_t) * vlen; + for (n = vlen; n != 0; n--, lmp++) + child |= + CTF_TYPE_ISCHILD(lmp->ctlm_type); + } + break; + case CTF_K_ENUM: + vbytes = sizeof (ctf_enum_t) * vlen; + break; + case CTF_K_FORWARD: + case CTF_K_UNKNOWN: + vbytes = 0; + break; + case CTF_K_POINTER: + case CTF_K_TYPEDEF: + case CTF_K_VOLATILE: + case CTF_K_CONST: + case CTF_K_RESTRICT: + vbytes = 0; + break; + default: + printf("%s(%d): detected invalid CTF kind -- %u\n", __func__, __LINE__, kind); + return (EIO); + } + *xp = (uint32_t)((uintptr_t) tp - (uintptr_t) ctfdata); + tp = (ctf_type_t *)((uintptr_t)tp + increment + vbytes); + } + + return (0); +} + +/* + * CTF Declaration Stack + * + * In order to implement ctf_type_name(), we must convert a type graph back + * into a C type declaration. Unfortunately, a type graph represents a storage + * class ordering of the type whereas a type declaration must obey the C rules + * for operator precedence, and the two orderings are frequently in conflict. + * For example, consider these CTF type graphs and their C declarations: + * + * CTF_K_POINTER -> CTF_K_FUNCTION -> CTF_K_INTEGER : int (*)() + * CTF_K_POINTER -> CTF_K_ARRAY -> CTF_K_INTEGER : int (*)[] + * + * In each case, parentheses are used to raise operator * to higher lexical + * precedence, so the string form of the C declaration cannot be constructed by + * walking the type graph links and forming the string from left to right. + * + * The functions in this file build a set of stacks from the type graph nodes + * corresponding to the C operator precedence levels in the appropriate order. + * The code in ctf_type_name() can then iterate over the levels and nodes in + * lexical precedence order and construct the final C declaration string. + */ +typedef struct ctf_list { + struct ctf_list *l_prev; /* previous pointer or tail pointer */ + struct ctf_list *l_next; /* next pointer or head pointer */ +} ctf_list_t; + +#define ctf_list_prev(elem) ((void *)(((ctf_list_t *)(elem))->l_prev)) +#define ctf_list_next(elem) ((void *)(((ctf_list_t *)(elem))->l_next)) + +typedef enum { + CTF_PREC_BASE, + CTF_PREC_POINTER, + CTF_PREC_ARRAY, + CTF_PREC_FUNCTION, + CTF_PREC_MAX +} ctf_decl_prec_t; + +typedef struct ctf_decl_node { + ctf_list_t cd_list; /* linked list pointers */ + ctf_id_t cd_type; /* type identifier */ + uint_t cd_kind; /* type kind */ + uint_t cd_n; /* type dimension if array */ +} ctf_decl_node_t; + +typedef struct ctf_decl { + ctf_list_t cd_nodes[CTF_PREC_MAX]; /* declaration node stacks */ + int cd_order[CTF_PREC_MAX]; /* storage order of decls */ + ctf_decl_prec_t cd_qualp; /* qualifier precision */ + ctf_decl_prec_t cd_ordp; /* ordered precision */ + char *cd_buf; /* buffer for output */ + char *cd_ptr; /* buffer location */ + char *cd_end; /* buffer limit */ + size_t cd_len; /* buffer space required */ + int cd_err; /* saved error value */ +} ctf_decl_t; + +/* + * Simple doubly-linked list append routine. This implementation assumes that + * each list element contains an embedded ctf_list_t as the first member. + * An additional ctf_list_t is used to store the head (l_next) and tail + * (l_prev) pointers. The current head and tail list elements have their + * previous and next pointers set to NULL, respectively. + */ +static void +ctf_list_append(ctf_list_t *lp, void *new) +{ + ctf_list_t *p = lp->l_prev; /* p = tail list element */ + ctf_list_t *q = new; /* q = new list element */ + + lp->l_prev = q; + q->l_prev = p; + q->l_next = NULL; + + if (p != NULL) + p->l_next = q; + else + lp->l_next = q; +} + +/* + * Prepend the specified existing element to the given ctf_list_t. The + * existing pointer should be pointing at a struct with embedded ctf_list_t. + */ static void +ctf_list_prepend(ctf_list_t *lp, void *new) +{ + ctf_list_t *p = new; /* p = new list element */ + ctf_list_t *q = lp->l_next; /* q = head list element */ + + lp->l_next = p; + p->l_prev = NULL; + p->l_next = q; + + if (q != NULL) + q->l_prev = p; + else + lp->l_prev = p; +} + +static void +ctf_decl_init(ctf_decl_t *cd, char *buf, size_t len) +{ + int i; + + bzero(cd, sizeof (ctf_decl_t)); + + for (i = CTF_PREC_BASE; i < CTF_PREC_MAX; i++) + cd->cd_order[i] = CTF_PREC_BASE - 1; + + cd->cd_qualp = CTF_PREC_BASE; + cd->cd_ordp = CTF_PREC_BASE; + + cd->cd_buf = buf; + cd->cd_ptr = buf; + cd->cd_end = buf + len; +} + +static void +ctf_decl_fini(ctf_decl_t *cd) +{ + ctf_decl_node_t *cdp, *ndp; + int i; + + for (i = CTF_PREC_BASE; i < CTF_PREC_MAX; i++) { + for (cdp = ctf_list_next(&cd->cd_nodes[i]); + cdp != NULL; cdp = ndp) { + ndp = ctf_list_next(cdp); + free(cdp, M_FBT); + } + } +} + +static const ctf_type_t * +ctf_lookup_by_id(linker_ctf_t *lc, ctf_id_t type) +{ + const ctf_type_t *tp; + uint32_t offset; + uint32_t *typoff = *lc->typoffp; + + if (type >= *lc->typlenp) { + printf("%s(%d): type %d exceeds max %ld\n",__func__,__LINE__,(int) type,*lc->typlenp); + return(NULL); + } + + /* Check if the type isn't cross-referenced. */ + if ((offset = typoff[type]) == 0) { + printf("%s(%d): type %d isn't cross referenced\n",__func__,__LINE__, (int) type); + return(NULL); + } + + tp = (const ctf_type_t *)(lc->ctftab + offset + sizeof(ctf_header_t)); + + return (tp); +} + +static void +fbt_array_info(linker_ctf_t *lc, ctf_id_t type, ctf_arinfo_t *arp) +{ + const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; + const ctf_type_t *tp; + const ctf_array_t *ap; + ssize_t increment; + + bzero(arp, sizeof(*arp)); + + if ((tp = ctf_lookup_by_id(lc, type)) == NULL) + return; + + if (CTF_INFO_KIND(tp->ctt_info) != CTF_K_ARRAY) + return; + + (void) fbt_get_ctt_size(hp->cth_version, tp, NULL, &increment); + + ap = (const ctf_array_t *)((uintptr_t)tp + increment); + arp->ctr_contents = ap->cta_contents; + arp->ctr_index = ap->cta_index; + arp->ctr_nelems = ap->cta_nelems; +} + +static const char * +ctf_strptr(linker_ctf_t *lc, int name) +{ + const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab;; + const char *strp = ""; + + if (name < 0 || name >= hp->cth_strlen) + return(strp); + + strp = (const char *)(lc->ctftab + hp->cth_stroff + name + sizeof(ctf_header_t)); + + return (strp); +} + +static void +ctf_decl_push(ctf_decl_t *cd, linker_ctf_t *lc, ctf_id_t type) +{ + ctf_decl_node_t *cdp; + ctf_decl_prec_t prec; + uint_t kind, n = 1; + int is_qual = 0; + + const ctf_type_t *tp; + ctf_arinfo_t ar; + + if ((tp = ctf_lookup_by_id(lc, type)) == NULL) { + cd->cd_err = ENOENT; + return; + } + + switch (kind = CTF_INFO_KIND(tp->ctt_info)) { + case CTF_K_ARRAY: + fbt_array_info(lc, type, &ar); + ctf_decl_push(cd, lc, ar.ctr_contents); + n = ar.ctr_nelems; + prec = CTF_PREC_ARRAY; + break; + + case CTF_K_TYPEDEF: + if (ctf_strptr(lc, tp->ctt_name)[0] == '\0') { + ctf_decl_push(cd, lc, tp->ctt_type); + return; + } + prec = CTF_PREC_BASE; + break; + + case CTF_K_FUNCTION: + ctf_decl_push(cd, lc, tp->ctt_type); + prec = CTF_PREC_FUNCTION; + break; + + case CTF_K_POINTER: + ctf_decl_push(cd, lc, tp->ctt_type); + prec = CTF_PREC_POINTER; + break; + + case CTF_K_VOLATILE: + case CTF_K_CONST: + case CTF_K_RESTRICT: + ctf_decl_push(cd, lc, tp->ctt_type); + prec = cd->cd_qualp; + is_qual++; + break; + + default: + prec = CTF_PREC_BASE; + } + + if ((cdp = malloc(sizeof (ctf_decl_node_t), M_FBT, M_WAITOK)) == NULL) { + cd->cd_err = EAGAIN; + return; + } + + cdp->cd_type = type; + cdp->cd_kind = kind; + cdp->cd_n = n; + + if (ctf_list_next(&cd->cd_nodes[prec]) == NULL) + cd->cd_order[prec] = cd->cd_ordp++; + + /* + * Reset cd_qualp to the highest precedence level that we've seen so + * far that can be qualified (CTF_PREC_BASE or CTF_PREC_POINTER). + */ + if (prec > cd->cd_qualp && prec < CTF_PREC_ARRAY) + cd->cd_qualp = prec; + + /* + * C array declarators are ordered inside out so prepend them. Also by + * convention qualifiers of base types precede the type specifier (e.g. + * const int vs. int const) even though the two forms are equivalent. + */ + if (kind == CTF_K_ARRAY || (is_qual && prec == CTF_PREC_BASE)) + ctf_list_prepend(&cd->cd_nodes[prec], cdp); + else + ctf_list_append(&cd->cd_nodes[prec], cdp); +} + +static void +ctf_decl_sprintf(ctf_decl_t *cd, const char *format, ...) +{ + size_t len = (size_t)(cd->cd_end - cd->cd_ptr); + va_list ap; + size_t n; + + va_start(ap, format); + n = vsnprintf(cd->cd_ptr, len, format, ap); + va_end(ap); + + cd->cd_ptr += MIN(n, len); + cd->cd_len += n; +} + +static ssize_t +fbt_type_name(linker_ctf_t *lc, ctf_id_t type, char *buf, size_t len) +{ + ctf_decl_t cd; + ctf_decl_node_t *cdp; + ctf_decl_prec_t prec, lp, rp; + int ptr, arr; + uint_t k; + + if (lc == NULL && type == CTF_ERR) + return (-1); /* simplify caller code by permitting CTF_ERR */ + + ctf_decl_init(&cd, buf, len); + ctf_decl_push(&cd, lc, type); + + if (cd.cd_err != 0) { + ctf_decl_fini(&cd); + return (-1); + } + + /* + * If the type graph's order conflicts with lexical precedence order + * for pointers or arrays, then we need to surround the declarations at + * the corresponding lexical precedence with parentheses. This can + * result in either a parenthesized pointer (*) as in int (*)() or + * int (*)[], or in a parenthesized pointer and array as in int (*[])(). + */ + ptr = cd.cd_order[CTF_PREC_POINTER] > CTF_PREC_POINTER; + arr = cd.cd_order[CTF_PREC_ARRAY] > CTF_PREC_ARRAY; + + rp = arr ? CTF_PREC_ARRAY : ptr ? CTF_PREC_POINTER : -1; + lp = ptr ? CTF_PREC_POINTER : arr ? CTF_PREC_ARRAY : -1; + + k = CTF_K_POINTER; /* avoid leading whitespace (see below) */ + + for (prec = CTF_PREC_BASE; prec < CTF_PREC_MAX; prec++) { + for (cdp = ctf_list_next(&cd.cd_nodes[prec]); + cdp != NULL; cdp = ctf_list_next(cdp)) { + + const ctf_type_t *tp = + ctf_lookup_by_id(lc, cdp->cd_type); + const char *name = ctf_strptr(lc, tp->ctt_name); + + if (k != CTF_K_POINTER && k != CTF_K_ARRAY) + ctf_decl_sprintf(&cd, " "); + + if (lp == prec) { + ctf_decl_sprintf(&cd, "("); + lp = -1; + } + + switch (cdp->cd_kind) { + case CTF_K_INTEGER: + case CTF_K_FLOAT: + case CTF_K_TYPEDEF: + ctf_decl_sprintf(&cd, "%s", name); + break; + case CTF_K_POINTER: + ctf_decl_sprintf(&cd, "*"); + break; + case CTF_K_ARRAY: + ctf_decl_sprintf(&cd, "[%u]", cdp->cd_n); + break; + case CTF_K_FUNCTION: + ctf_decl_sprintf(&cd, "()"); + break; + case CTF_K_STRUCT: + case CTF_K_FORWARD: + ctf_decl_sprintf(&cd, "struct %s", name); + break; + case CTF_K_UNION: + ctf_decl_sprintf(&cd, "union %s", name); + break; + case CTF_K_ENUM: + ctf_decl_sprintf(&cd, "enum %s", name); + break; + case CTF_K_VOLATILE: + ctf_decl_sprintf(&cd, "volatile"); + break; + case CTF_K_CONST: + ctf_decl_sprintf(&cd, "const"); + break; + case CTF_K_RESTRICT: + ctf_decl_sprintf(&cd, "restrict"); + break; + } + + k = cdp->cd_kind; + } + + if (rp == prec) + ctf_decl_sprintf(&cd, ")"); + } + + ctf_decl_fini(&cd); + return (cd.cd_len); +} + +static void +fbt_getargdesc(void *arg __unused, dtrace_id_t id __unused, void *parg, dtrace_argdesc_t *desc) +{ + const ushort_t *dp; + fbt_probe_t *fbt = parg; + linker_ctf_t lc; + modctl_t *ctl = fbt->fbtp_ctl; + int ndx = desc->dtargd_ndx; + int symindx = fbt->fbtp_symindx; + uint32_t *ctfoff; + uint32_t offset; + ushort_t info, kind, n; + + desc->dtargd_ndx = DTRACE_ARGNONE; + + /* Get a pointer to the CTF data and it's length. */ + if (linker_ctf_get(ctl, &lc) != 0) + /* No CTF data? Something wrong? *shrug* */ + return; + + /* Check if this module hasn't been initialised yet. */ + if (*lc.ctfoffp == NULL) { + /* + * Initialise the CTF object and function symindx to + * byte offset array. + */ + if (fbt_ctfoff_init(ctl, &lc) != 0) + return; + + /* Initialise the CTF type to byte offset array. */ + if (fbt_typoff_init(&lc) != 0) + return; + } + + ctfoff = *lc.ctfoffp; + + if (ctfoff == NULL || *lc.typoffp == NULL) + return; + + /* Check if the symbol index is out of range. */ + if (symindx >= lc.nsym) + return; + + /* Check if the symbol isn't cross-referenced. */ + if ((offset = ctfoff[symindx]) == 0xffffffff) + return; + + dp = (const ushort_t *)(lc.ctftab + offset + sizeof(ctf_header_t)); + + info = *dp++; + kind = CTF_INFO_KIND(info); + n = CTF_INFO_VLEN(info); + + if (kind == CTF_K_UNKNOWN && n == 0) { + printf("%s(%d): Unknown function!\n",__func__,__LINE__); + return; + } + + if (kind != CTF_K_FUNCTION) { + printf("%s(%d): Expected a function!\n",__func__,__LINE__); + return; + } + + /* Check if the requested argument doesn't exist. */ + if (ndx >= n) + return; + + /* Skip the return type and arguments up to the one requested. */ + dp += ndx + 1; + + if (fbt_type_name(&lc, *dp, desc->dtargd_native, sizeof(desc->dtargd_native)) > 0) + desc->dtargd_ndx = ndx; + + return; +} + +static void fbt_load(void *dummy) { /* Create the /dev/dtrace/fbt entry. */ @@ -602,7 +1351,6 @@ return (error); } -/* ARGSUSED */ static int fbt_modevent(module_t mod __unused, int type, void *data __unused) { @@ -627,7 +1375,6 @@ return (error); } -/* ARGSUSED */ static int fbt_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *td __unused) { From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:36:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E62416A46D; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 499C516A420 for ; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3AFBD13C45A for ; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNaI3q037531 for ; Tue, 19 Feb 2008 23:36:18 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNaGGh037528 for perforce@freebsd.org; Tue, 19 Feb 2008 23:36:16 GMT (envelope-from jb@freebsd.org) Date: Tue, 19 Feb 2008 23:36:16 GMT Message-Id: <200802192336.m1JNaGGh037528@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135758 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:36:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=135758 Change 135758 by jb@jb_freebsd1 on 2008/02/19 23:35:49 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#63 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#39 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.staff.sgml#12 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#31 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/Makefile#5 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/audit/chapter.sgml#1 branch .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/book.sgml#4 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/chapters.ent#3 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/jails/chapter.sgml#1 branch .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/multimedia/chapter.sgml#3 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/network-servers/chapter.sgml#1 branch .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/preface/preface.sgml#3 integrate .. //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/virtualization/chapter.sgml#1 branch .. //depot/projects/dtrace/doc/share/pgpkeys/shaun.key#4 integrate .. //depot/projects/dtrace/doc/share/sgml/mirrors.xml#11 integrate .. //depot/projects/dtrace/doc/zh_TW.Big5/share/sgml/authors.ent#6 integrate .. //depot/projects/dtrace/ports/GIDs#17 integrate .. //depot/projects/dtrace/ports/MOVED#67 integrate .. //depot/projects/dtrace/ports/Mk/bsd.lua.mk#11 integrate .. //depot/projects/dtrace/ports/UIDs#20 integrate .. //depot/projects/dtrace/ports/UPDATING#54 integrate .. //depot/projects/dtrace/src/bin/sh/mksyntax.c#4 integrate .. //depot/projects/dtrace/src/etc/mail/access.sample#4 integrate .. //depot/projects/dtrace/src/etc/sendmail/freebsd.mc#8 integrate .. //depot/projects/dtrace/src/games/fortune/strfile/strfile.c#4 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/man/man/man.c#6 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/man/manpath/manpath.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_entry_strmode.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_platform.h#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_open_filename.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_bzip2.c#8 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_gzip.c#8 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_ar.c#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_iso9660.c#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_mtree.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_disk.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_open_filename.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/config_freebsd.h#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/main.c#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test.h#3 integrate .. //depot/projects/dtrace/src/lib/libc/db/test/btree.tests/main.c#5 integrate .. //depot/projects/dtrace/src/lib/libc/db/test/dbtest.c#5 integrate .. //depot/projects/dtrace/src/lib/libc/regex/grot/main.c#4 integrate .. //depot/projects/dtrace/src/lib/libc/resolv/res_comp.c#5 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.3#11 integrate .. //depot/projects/dtrace/src/lib/libc/stdlib/malloc.c#19 integrate .. //depot/projects/dtrace/src/lib/libdisk/disk.c#5 integrate .. //depot/projects/dtrace/src/lib/libmilter/Makefile#5 integrate .. //depot/projects/dtrace/src/lib/msun/Makefile#12 integrate .. //depot/projects/dtrace/src/lib/msun/Symbol.map#10 integrate .. //depot/projects/dtrace/src/lib/msun/ld128/k_cosl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/ld128/k_sinl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/ld128/k_tanl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/ld80/k_cosl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/ld80/k_sinl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/ld80/k_tanl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/man/cos.3#5 integrate .. //depot/projects/dtrace/src/lib/msun/man/j0.3#5 integrate .. //depot/projects/dtrace/src/lib/msun/man/lgamma.3#5 integrate .. //depot/projects/dtrace/src/lib/msun/man/sin.3#5 integrate .. //depot/projects/dtrace/src/lib/msun/man/tan.3#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_exp.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_rem_pio2.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/e_rem_pio2f.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/k_cos.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/k_rem_pio2.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/k_sin.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/math.h#9 integrate .. //depot/projects/dtrace/src/lib/msun/src/math_private.h#7 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_ceil.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_cos.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_cosl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/src/s_floor.c#5 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_sin.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_sinl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/src/s_tan.c#4 integrate .. //depot/projects/dtrace/src/lib/msun/src/s_tanl.c#1 branch .. //depot/projects/dtrace/src/lib/msun/src/s_tgammaf.c#1 branch .. //depot/projects/dtrace/src/lib/msun/src/s_trunc.c#5 integrate .. //depot/projects/dtrace/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#17 integrate .. //depot/projects/dtrace/src/sbin/ipfw/ipfw.8#18 integrate .. //depot/projects/dtrace/src/sbin/ipfw/ipfw2.c#17 integrate .. //depot/projects/dtrace/src/sbin/mount/getmntopts.3#4 integrate .. //depot/projects/dtrace/src/sbin/mount_nfs/mount_nfs.c#7 integrate .. //depot/projects/dtrace/src/sbin/sconfig/sconfig.c#5 integrate .. //depot/projects/dtrace/src/secure/usr.bin/bdes/bdes.c#4 integrate .. //depot/projects/dtrace/src/share/man/man9/pci.9#5 integrate .. //depot/projects/dtrace/src/share/misc/committers-src.dot#8 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/dump_machdep.c#6 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/minidump_machdep.c#5 integrate .. //depot/projects/dtrace/src/sys/amd64/conf/GENERIC#34 integrate .. //depot/projects/dtrace/src/sys/boot/Makefile#8 integrate .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/Makefile#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/conf.c#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/help.uboot#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/ldscript.powerpc#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/metadata.c#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/start.S#1 branch .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/version#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/Makefile#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/common/Makefile.inc#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/common/main.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/Makefile#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/api_public.h#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/console.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/copy.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/devicename.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/disk.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/elf_freebsd.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/glue.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/libuboot.h#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/module.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/net.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/reboot.c#1 branch .. //depot/projects/dtrace/src/sys/boot/uboot/lib/time.c#1 branch .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_cpu.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_thermal.c#10 integrate .. //depot/projects/dtrace/src/sys/dev/aic7xxx/aic79xx_osm.c#6 integrate .. //depot/projects/dtrace/src/sys/dev/ti/if_ti.c#9 integrate .. //depot/projects/dtrace/src/sys/fs/coda/TODO#2 integrate .. //depot/projects/dtrace/src/sys/fs/coda/cnode.h#5 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_kernel.h#3 delete .. //depot/projects/dtrace/src/sys/fs/coda/coda_psdev.c#6 integrate .. //depot/projects/dtrace/src/sys/fs/coda/coda_vnops.c#9 integrate .. //depot/projects/dtrace/src/sys/geom/geom_disk.c#7 integrate .. //depot/projects/dtrace/src/sys/i386/i386/dump_machdep.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/i386/minidump_machdep.c#6 integrate .. //depot/projects/dtrace/src/sys/ia64/conf/GENERIC#13 integrate .. //depot/projects/dtrace/src/sys/kern/kern_exit.c#19 integrate .. //depot/projects/dtrace/src/sys/kern/kern_lock.c#20 integrate .. //depot/projects/dtrace/src/sys/kern/kern_mib.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/kern_tc.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/subr_autoconf.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_default.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_mount.c#27 integrate .. //depot/projects/dtrace/src/sys/nfsclient/nfs_vfsops.c#16 integrate .. //depot/projects/dtrace/src/sys/powerpc/conf/GENERIC#15 integrate .. //depot/projects/dtrace/src/sys/sys/buf.h#10 integrate .. //depot/projects/dtrace/src/sys/sys/conf.h#8 integrate .. //depot/projects/dtrace/src/sys/sys/lockmgr.h#16 integrate .. //depot/projects/dtrace/src/sys/sys/param.h#41 integrate .. //depot/projects/dtrace/src/sys/sys/priv.h#6 integrate .. //depot/projects/dtrace/src/sys/ufs/ffs/ffs_vnops.c#14 integrate .. //depot/projects/dtrace/src/tools/regression/fsx/fsx.c#6 integrate .. //depot/projects/dtrace/src/tools/regression/lib/msun/Makefile#8 integrate .. //depot/projects/dtrace/src/tools/regression/lib/msun/test-exponential.c#2 integrate .. //depot/projects/dtrace/src/tools/regression/lib/msun/test-trig.c#1 branch .. //depot/projects/dtrace/src/tools/regression/lib/msun/test-trig.t#1 branch .. //depot/projects/dtrace/src/tools/regression/security/open_to_operation/Makefile#1 branch .. //depot/projects/dtrace/src/tools/regression/security/open_to_operation/open_to_operation.c#1 branch .. //depot/projects/dtrace/src/usr.bin/calendar/calendars/calendar.dutch#2 integrate .. //depot/projects/dtrace/src/usr.bin/ncplogin/ncplogin.c#5 integrate .. //depot/projects/dtrace/src/usr.bin/quota/quota.c#6 integrate .. //depot/projects/dtrace/src/usr.bin/tar/write.c#7 integrate .. //depot/projects/dtrace/src/usr.sbin/cdcontrol/cdcontrol.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/powerd/powerd.c#5 integrate .. //depot/projects/dtrace/src/usr.sbin/zic/zdump.c#4 integrate .. //depot/projects/dtrace/www/en/administration.sgml#6 integrate .. //depot/projects/dtrace/www/en/developers.sgml#29 integrate .. //depot/projects/dtrace/www/en/gnome/docs/faq2.sgml#14 integrate .. //depot/projects/dtrace/www/en/gnome/docs/faq220.sgml#2 integrate .. //depot/projects/dtrace/www/en/news/status/Makefile#10 integrate .. //depot/projects/dtrace/www/en/news/status/report-2007-10-2007-12.xml#1 branch .. //depot/projects/dtrace/www/en/news/status/status.sgml#11 integrate .. //depot/projects/dtrace/www/en/releases/5.5R/errata.html#12 integrate .. //depot/projects/dtrace/www/en/releases/6.3R/errata.html#3 integrate .. //depot/projects/dtrace/www/es/Makefile#6 integrate .. //depot/projects/dtrace/www/es/Makefile.inc#3 integrate .. //depot/projects/dtrace/www/es/community.sgml#5 integrate .. //depot/projects/dtrace/www/es/docproj/current.sgml#5 integrate .. //depot/projects/dtrace/www/es/docproj/doc-set.sgml#5 integrate .. //depot/projects/dtrace/www/es/docproj/sgml.sgml#4 integrate .. //depot/projects/dtrace/www/es/docproj/who.sgml#4 integrate .. //depot/projects/dtrace/www/es/index.xsl#9 integrate .. //depot/projects/dtrace/www/es/internet.sgml#7 integrate .. //depot/projects/dtrace/www/es/platforms/Makefile#4 integrate .. //depot/projects/dtrace/www/es/platforms/alpha.sgml#5 integrate .. //depot/projects/dtrace/www/es/platforms/amd64.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/arm.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/ia64/Makefile#1 branch .. //depot/projects/dtrace/www/es/platforms/ia64/index.xsl#1 branch .. //depot/projects/dtrace/www/es/platforms/ia64/machines.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/ia64/refs.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/ia64/todo.xsl#1 branch .. //depot/projects/dtrace/www/es/platforms/index.sgml#6 integrate .. //depot/projects/dtrace/www/es/platforms/mips.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/sparc.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/sun4v.sgml#1 branch .. //depot/projects/dtrace/www/es/platforms/x86-64.sgml#4 delete .. //depot/projects/dtrace/www/es/platforms/xbox.sgml#1 branch .. //depot/projects/dtrace/www/es/search/index-site.sgml#4 integrate .. //depot/projects/dtrace/www/es/search/search-mid.sgml#4 integrate .. //depot/projects/dtrace/www/es/search/searchhints.sgml#4 integrate .. //depot/projects/dtrace/www/es/send-pr.sgml#6 integrate .. //depot/projects/dtrace/www/es/share/sgml/header.l10n.ent#4 integrate .. //depot/projects/dtrace/www/es/share/sgml/navibar.l10n.ent#4 integrate .. //depot/projects/dtrace/www/es/support.sgml#6 integrate .. //depot/projects/dtrace/www/share/sgml/news.xml#40 integrate .. //depot/projects/dtrace/www/share/sgml/usergroups.xml#17 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#63 (text+ko) ==== @@ -1,4 +1,4 @@ - + + + The &os; Documentation Engineering Team @@ -146,6 +146,10 @@ &a.rwatson; + + + &a.bz; + ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#31 (text+ko) ==== @@ -13,7 +13,7 @@ builds for the other languages, and we will poke fun of you in public. - $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.438 2008/02/05 18:52:24 antoine Exp $ + $FreeBSD: doc/en_US.ISO8859-1/share/sgml/authors.ent,v 1.439 2008/02/15 18:16:15 olli Exp $ --> aaron@FreeBSD.org"> @@ -774,6 +774,8 @@ oliver@FreeBSD.org"> +olli@FreeBSD.org"> + onoe@FreeBSD.org"> orion@FreeBSD.org"> ==== //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: doc/es_ES.ISO8859-1/books/handbook/Makefile,v 1.12 2007/06/28 02:46:37 chinsan Exp $ +# $FreeBSD: doc/es_ES.ISO8859-1/books/handbook/Makefile,v 1.13 2008/02/18 21:03:03 carvay Exp $ # $FreeBSDes: doc/es_ES.ISO8859-1/books/handbook/Makefile,v 1.6 2004/10/08 22:36:28 jesusr Exp $ # # Build the FreeBSD Handbook. @@ -151,6 +151,7 @@ # # SGML content +SRCS+= audit/chapter.sgml SRCS+= book.sgml SRCS+= colophon.sgml SRCS+= advanced-networking/chapter.sgml @@ -166,6 +167,7 @@ SRCS+= geom/chapter.sgml SRCS+= install/chapter.sgml SRCS+= introduction/chapter.sgml +SRCS+= jails/chapter.sgml SRCS+= kernelconfig/chapter.sgml SRCS+= kerneldebug/chapter.sgml SRCS+= kernelopts/chapter.sgml @@ -175,6 +177,7 @@ SRCS+= mail/chapter.sgml SRCS+= mirrors/chapter.sgml SRCS+= multimedia/chapter.sgml +SRCS+= network-servers/chapter.sgml SRCS+= pgpkeys/chapter.sgml SRCS+= ports/chapter.sgml SRCS+= ppp-and-slip/chapter.sgml @@ -184,6 +187,7 @@ SRCS+= serialcomms/chapter.sgml SRCS+= users/chapter.sgml SRCS+= vinum/chapter.sgml +SRCS+= virtualization/chapter.sgml SRCS+= x11/chapter.sgml # Entities ==== //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/book.sgml#4 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -25,9 +25,11 @@ + + @@ -37,6 +39,7 @@ + @@ -49,6 +52,7 @@ + %pgpkeys; ]> @@ -147,7 +151,7 @@ - + &chap.preface; Primeros pasos @@ -267,10 +271,13 @@ + + + @@ -316,7 +323,7 @@ - + ==== //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/chapters.ent#3 (text+ko) ==== @@ -9,7 +9,7 @@ Los capítulos deben listarse en el mismo orden en el que son referenciados. - $FreeBSD: doc/es_ES.ISO8859-1/books/handbook/chapters.ent,v 1.7 2006/01/19 22:37:06 carvay Exp $ + $FreeBSD: doc/es_ES.ISO8859-1/books/handbook/chapters.ent,v 1.8 2008/02/18 21:03:03 carvay Exp $ $FreeBSDes: doc/es_ES.ISO8859-1/books/handbook/chapters.ent,v 1.2 2004/10/08 22:36:51 jesusr Exp $ --> @@ -36,10 +36,13 @@ + + + @@ -47,7 +50,7 @@ - + ==== //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/multimedia/chapter.sgml#3 (text+ko) ==== @@ -1,10 +1,13 @@ + + @@ -57,7 +60,7 @@ - Identificar el Dispositivo Correcto + Identificar el dispositivo correcto PCI ISA @@ -226,7 +229,7 @@ - Recompilar el Kernel + Recompilar el kernel Una vez conseguido el fichero de configuración del kernel que necesita debe recompilar el kernel. Por favor consulte @@ -235,7 +238,7 @@ - Crear y Probar Nodos de Dispositivos + Crear y probar nodos de dispositivos nodos de dispositivos Tras reiniciar, acceda al sistema y escriba dmesg | grep pcm tal y como se muestra aquí: @@ -329,7 +332,7 @@ - Problemas Comunes + Problemas comunes nodo de dispositivo ==== //depot/projects/dtrace/doc/es_ES.ISO8859-1/books/handbook/preface/preface.sgml#3 (text+ko) ==== @@ -1,393 +1,673 @@ - Preface + Prefacio - Intended - Audience + A quién va + dirigido este texto - The FreeBSD newcomer will find that the first section of this - book guides the user through the FreeBSD installation process, and - gently introduces the concepts and conventions that underpin Unix. - Working through this section requires little more than the desire - to explore, and the ability to take on board new concepts as they - are introduced. + La primera sección de este libro está pensada + para guiar a los recién llegados a &os; durante el proceso + de instalación y presentarles los conceptos y convenciones + que dan entidad a &unix;. Para sacar provecho de esta sección + lo único que el lector necesitará son ganas de + explorar y habilidad para ir interiorizando nuevos conceptos a + medida que le van planteando. - Once you have travelled this far, the second, far larger, - section of the Handbook is a comprehensive reference to all manner - of topics of interest to FreeBSD system administrators. Some of - these chapters may recommend that you do some prior reading, and - this is noted in the synopsis at the beginning of each - chapter. + La siguiente sección, la segunda, mucho más + extensa, es una referencia completa de todo tipo de temas de + interés para administradores de sistemas &os;. Es posible + que alguno de esos capítulos requiera que previamente + lea otros textos; si es el caso esto se anuncia en la sinopsis + situada al principio de cada capítulo. - For a list of additional sources of information, please see Hay una lista de fuentes de información adicionales en el . - Changes from the - First Edition + Cambios desde la + segunda edición + + Esta tercera edición es la culminación de + más de dos años de trabajo de los miembros + del FreeBSD Documentation Project. Estos son los cambios + más importantes que encontrará en esta + nueva edición: + + + + , configuración + y adaptación del sistema, ha sido ampliado con + nuevos datos sobre el sistema de gestión de + energía y recursos ACPI, la utilidad del + sistema cron y más + opciones de personalización del kernel. + + + + , seguridad, ha sido + ampliado con información sobre redes privadas + virtuales (VPN), listas de control de accesos al + sistema de ficheros (más conocidas por ACL) e + información sobre avisos de seguridad. + + + + , Mandatory Access Control (MAC), + es un capítulo nuevo. En él se expone + qué es MAC y de qué forma puede utilizarse + en FreeBSD como complemento de la seguridad del sistema. + + + + , almacenamiento, se ha + ampliado con información sobre dispositivos USB + de almacenamiento, instantáneas (snapshots) + de sistemas de ficheros, sistemas de ficheros basados + en ficheros y en red, y particiones de disco + cifradas. + + + + , Vinum, es un + capítulo nuevo. Describe el uso de Vinum, un gestor + de volúmenes lógicos que permite disponer de + discos lógicos independientes de dispositivo, + así como de RAID-0, RAID-1 y RAID-5 por + software. + + + + Se ha añadido una sección de + depuración de problemas al , PPP y SLIP. + + + + , correo electrónico, + ha sido ampliado con información sobre el + uso de MTA alternativos, autentificación + SMTP, UUCP, fetchmail, + procmail así como + otros temas avanzados relacionados con el correo. + + + + , servidores de red, + es un capítulo nuevo. En él se + incluye información sobre la configuración + de Apache HTTP Server, + ftpd y cómo + configurar Samba para + su uso con clientes µsoft; &windows;. Ciertas + partes de , networking avanzado, + se han trasladado a este capítulo para + dar más solidez al contenido. + + + + , + networking avanzado, incluye en + esta edición nuevos datos sobre el uso de + dispositivos &bluetooth; en &os;, la configuración + de redes wireless y el networking + ATM (Asynchronous Transfer Mode). + + + + Se ha creado un glosario para disponer de una + ubicación centralizada donde encontrar + definiciones de términos técnicos que + se utilizan a lo largo del libro. + + + + Las tablas e imágenes que aparecen en + el libro han experimentado diversas mejoras + est´ticas. + + + + Cambios desde + la primera edición - This second edition is the culmination of over two years of - work by the dedicated members of the FreeBSD Documentation - Project. The following are the major changes in this new - edition: + La segunda edición fue la culminación + de más de dos años de trabajo de los miembros + del FreeBSD Documentation Project. Estos son los principales + cambios que encontrará en esta edición: - + - A complete Index has been added. + Se ha creado un índice completo. - All ASCII figures have been replaced by graphical diagrams. + Todos los esquemas ASCII han sido reemplazados + por diagramas gráficos. - A standard synopsis has been added to each chapter to - give a quick summary of what information the chapter contains, - and what the reader is expected to know. + Se ha añadido una sinopsis estándar + a cada capítulo donde se ofrece un breve sumario + del contenido del capítulo y qué se + espera que sepa el lector para poder sacarle + provecho. - The content has been logically reorganized into three - parts: Getting Started, System Administration, and - Appendices. + Se ha reorganizado de forma lógica el contenido + en tres partes: primeros pasos, + administración del sistema y + apéndices. - Chapter 2 (Installing FreeBSD) was completely - rewritten with many screenshots to make it much easier for new - users to grasp the text. + El + (instalación de &os;) ha sido + reescrito completamente e incluye gran cantidad de + capturas de pantalla para facilitar su comprensión + a los nuevos usuarios. - Chapter 3 (Unix Basics) has been expanded to contain - additional information about processes, daemons, and - signals. + El + (conceptos básicos de &unix;) + se ha ampliado con más información sobre + procesos, dæmons y señales. - Chapter 4 (Installing Applications) has been expanded - to contain additional information about binary package - management. + El + (instalación de aplicaciones) + incluye información sobre la gestión + de paquetes binarios. - Chapter 5 (The X Window System) has been completely - rewritten with an emphasis on using modern desktop - technologies such as KDE and GNOME on XFree86 4.X. + El , (El sistema X Window) + ha sido reescrito totalmente, con especial énfasis + en el uso de modernas tecnologías de escritorio + como KDE y GNOME + en &xfree86; 4.X. - Chapter 7 (The FreeBSD Booting Process) has been - expanded. + El (El proceso de arranque de &os;) + ha sido ampliado. - Chapter 12 (Storage) has been written from what used - to be two separate chapters on Disks and Backups. We feel - that the topics are easier to comprehend when presented as a - single chapter. A section on RAID (both hardware and - software) has also been added. + El (Almacenamiento) + ha sido el fruto de refundir el contenido de lo eran + dos capítulos sobre discos y + copias de seguridad. Pensamos que + estos temas eran más fáciles de entender + si se trataban en un mismo capítulo. Se ha + añadido también una sección + sobre RAID (tanto hardware como software). - Chapter 15 (Serial Communications) has been completely - reorganized and updated for FreeBSD 4.X/5.X. + El (communicaciones serie) + ha sido reorganizado y actualizado completamente + con información sobre &os; 4.X y 5.X. - Chapter 16 (PPP and SLIP) has been substantially - updated. + El (PPP y SLIP) + ha sido actualizado en gran parte. - Many new sections have been added to Chapter 17 - (Advanced Networking). + Se han añadido muchas secciones nuevas al + (Networking avanzado). - Chapter 18 (Electronic Mail) has been expanded to - include more information about configuring + El (correo electrónico + incluye ahora más información + sobre la configuración de sendmail. - Chapter 20 (Linux Compatibility) has been expanded to - include information about installing - Oracle and - SAP/R3. + El (compatibilidad con&linux;) + se ha ampliado con información sobre + la instalación de + &oracle; y + &sap.r3;. - The following new topics are covered in this second - edition: + En esta segunda edición se incluyen + también estos nuevos contenidos: - Configuration and Tuning (Chapter 6). + Configuración y adaptación + del sistema (). - Sound (Chapter 14) + Multimedia () - Organization of This - Book + Cómo se + organiza este libro - This book is split into three logically distinct sections. - The first section, Getting Started, covers - the installation and basic usage of FreeBSD. It is expected that - the reader will follow these chapters in sequence, possibly - skipping chapters covering familiar topics. The second section, - System Administration, covers a broad - collection of subjects that are of interest to more advanced - FreeBSD users. Each section begins with a succinct synopsis that - describes what the chapter covers and what the reader is expected - to already know. This is meant to allow the casual reader to skip - around to find chapters of interest. The third section contains - appendices of reference information. + Este libro se divide en cinco secciones lógicamente + distintas. La primera, primeros pasos, + trata sobre la instalación y el uso más + básico de &os;. Está pensada para que el + lector los recorra en secuencialmente, aunque puede + saltarse algunos si tratan sobre temas que le resulten + familiares. La segunda sección, + Tareas comunes, está dedicada + a las características de &os; que suelen utilizarse + con más frecuencia. Esta sección, así + como las siguientes, pueden leerse en cualquier orden. Cada + capítulo comienza con una sinópsis sucinta en + la que se describe el contenido del capítulo y qué + es lo que se espera que sepa el lector antes de leerlo. Esto + se hace para dar ocasión al lector ocasional a que elija + el capítulo que más pueda interesarle. La + tercera sección, Administración del + sistema, trata sobre diversos aspectos de la + administración del sistema. La cuarta sección, + Redes y comunicaciones, está + dedicada al networking y temas relacionados + con los servidores. La quinta sección dispone de + apéndices con información de referencia. + + + + + , Presentación + + Este capítulo, como su nombre indica, presenta + &os; al usuario. En él se cuenta la historia del + Proyecto &os;, sus objetivos y su modelo de desarrollo. + + + + , Instalación + + Guía al usuario a través de un proceso + completo de instalación. Se explican también + algunos aspectos avanzados como la instalación + a través de una consola serie. + + + + , Conceptos básicos + de &unix; + + Se explican los comandos más básicos y + el funcionamiento del sistema operativo &os;. Si ya se + tiene experiencia con &linux; u otro tipo de &unix; + posiblemente sea este un capítulo que no deba + leerse. + + + + , Instalación de + aplicaciones + + Se explica la instalación de software desarrollado + por personas ajenas al proyecto, tanto mediante la innovadora + Colección de Ports de &os; como mediante + paquetes binarios estándar (packages). + + + + , El sistema X Window + + Describe el sistema X Windows en general y su + uso en &os; en particular. Describe también + entornos de escritorio de uso común como + KDE y GNOME. + + + + + + + , Aplicaciones de escritorio + + Se enumeran algunas aplicaciones de escritorio muy comunes, + como navegadores web y suites ofimáticas, y cómo + instalar estas aplicaciones en &os;. + + + + , Multimedia + + Trata sobre la configuración la reproducción + de sonido y vídeo en su sistema. Describe también + algunas aplicaciones de sonido y vídeo. + + + + , Configuración + del kernel de &os; + + Explica bajo qué circunstancias tendrá + que configurar un nuevo kernel y facilita instrucciones + detalladas para la configuración, compilación + e instalación de un kernel personalizado. + + + + , Imprimir + + Describe la gestión de impresoras en &os;, + abarcando aspectos diversos como las páginas + banner, las cuentas de impresión + así como la configuración inicial. + + - Chapter 1, Introduction + , Compatibilidad binaria + con &linux; - Introduces FreeBSD to a new user. It describes the - history of the FreeBSD Project, its goals and development model. + Describe las características de compatibilidad + con &linux; de &os;. Incluye también instrucciones + detalladas de instalación de varias aplicaciones + &linux; muy populares, como + &oracle;, &sap.r3; + y &mathematica;. + + + - Chapter 2, Installation + , Configuración + y adaptación del sistema - Walks a user through the entire installation process. - Some advanced installation topics, such as installing through - a serial console, are also covered. + Describe los parámetros que los administradores + de sistemas tienen a su alcance para hacer que &os; + rinda al máximo. Describe también + los diversos ficheros de configuración que + se usan en &os; y dónde están. >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:36:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31AB516A511; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BFEC16A46B for ; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5F0EF13C45B for ; Tue, 19 Feb 2008 23:36:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNaIhX037537 for ; Tue, 19 Feb 2008 23:36:18 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNaIlb037534 for perforce@freebsd.org; Tue, 19 Feb 2008 23:36:18 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 23:36:18 GMT Message-Id: <200802192336.m1JNaIlb037534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135759 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:36:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135759 Change 135759 by sam@sam_ebb on 2008/02/19 23:35:51 sort_channels expects there are channels; avoid calling it with an empty table Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#7 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#7 (text+ko) ==== @@ -172,6 +172,7 @@ uint8_t *aa = a; uint8_t *ai, *t; + KASSERT(n > 0, ("no channels")); for (ai = aa+size; --n >= 1; ai += size) for (t = ai; t > aa; t -= size) { uint8_t *u = t - size; @@ -191,7 +192,8 @@ void ieee80211_sort_channels(struct ieee80211_channel chans[], int nchans) { - sort_channels(chans, nchans, sizeof(struct ieee80211_channel)); + if (nchans > 0) + sort_channels(chans, nchans, sizeof(struct ieee80211_channel)); } /* From owner-p4-projects@FreeBSD.ORG Tue Feb 19 23:38:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F309016A419; Tue, 19 Feb 2008 23:38:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7D5116A417 for ; Tue, 19 Feb 2008 23:38:20 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AACE813C465 for ; Tue, 19 Feb 2008 23:38:20 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1JNcK7u037644 for ; Tue, 19 Feb 2008 23:38:20 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1JNcKvG037641 for perforce@freebsd.org; Tue, 19 Feb 2008 23:38:20 GMT (envelope-from sam@freebsd.org) Date: Tue, 19 Feb 2008 23:38:20 GMT Message-Id: <200802192338.m1JNcKvG037641@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 23:38:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=135760 Change 135760 by sam@sam_ebb on 2008/02/19 23:37:22 Suppress the aggressive inline of gcc; there is no obvious benefit to doing it and the downsides are significant. Once I can nagivate the maze of twisty #ifdefs in cdefs.h I'll add __noinline where it belongs. Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#28 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#28 (text+ko) ==== @@ -58,6 +58,12 @@ #include #endif +#ifdef __GNUC__ +#define __noinline __attribute__ ((noinline)) +#else +#define __noinline +#endif + #include #include #include @@ -70,7 +76,7 @@ static struct ieee80211_channel *findchannel(struct ieee80211com *, int ieee, int mode); -static int +static __noinline int ieee80211_ioctl_getkey(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -126,7 +132,7 @@ return copyout(&ik, ireq->i_data, sizeof(ik)); } -static int +static __noinline int ieee80211_ioctl_getchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -136,7 +142,7 @@ return copyout(&ic->ic_chan_active, ireq->i_data, ireq->i_len); } -static int +static __noinline int ieee80211_ioctl_getchaninfo(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -150,7 +156,7 @@ return copyout(&ic->ic_nchans, ireq->i_data, space); } -static int +static __noinline int ieee80211_ioctl_getwpaie(struct ieee80211vap *vap, struct ieee80211req *ireq, int req) { @@ -199,7 +205,7 @@ return copyout(&wpaie, ireq->i_data, ireq->i_len); } -static int +static __noinline int ieee80211_ioctl_getstastats(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211_node *ni; @@ -253,7 +259,7 @@ req->space += scan_space(se, &ielen); } -static void +static __noinline void get_scan_result(void *arg, const struct ieee80211_scan_entry *se) { struct scanreq *req = arg; @@ -298,7 +304,7 @@ req->sr = (struct ieee80211req_scan_result *)(((uint8_t *)sr) + len); } -static int +static __noinline int ieee80211_ioctl_getscanresults(struct ieee80211vap *vap, struct ieee80211req *ireq) { @@ -361,7 +367,7 @@ req->space += sta_space(ni, &ielen); } -static void +static __noinline void get_sta_info(void *arg, struct ieee80211_node *ni) { struct stainforeq *req = arg; @@ -428,7 +434,7 @@ req->space -= len; } -static int +static __noinline int getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, struct ieee80211_node *ni, int off) { @@ -471,7 +477,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_getstainfo(struct ieee80211vap *vap, struct ieee80211req *ireq) { uint8_t macaddr[IEEE80211_ADDR_LEN]; @@ -494,7 +500,7 @@ return getstainfo_common(vap, ireq, ni, off); } -static int +static __noinline int ieee80211_ioctl_getstatxpow(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211_node *ni; @@ -515,7 +521,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_getwmeparam(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -558,7 +564,7 @@ return 0; } -static int +static __noinline int ieee80211_ioctl_getmaccmd(struct ieee80211vap *vap, struct ieee80211req *ireq) { const struct ieee80211_aclator *acl = vap->iv_acl; @@ -581,7 +587,7 @@ return (vap->iv_flags & cap) != 0; } -static int +static __noinline int ieee80211_ioctl_getcurchan(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -638,7 +644,7 @@ return EINVAL; } -static int +static __noinline int ieee80211_ioctl_getregdomain(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -650,7 +656,7 @@ sizeof(ic->ic_regdomain)); } -static int +static __noinline int ieee80211_ioctl_getroam(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -660,7 +666,7 @@ sizeof(vap->iv_roamparms)); } -static int +static __noinline int ieee80211_ioctl_gettxparams(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -669,7 +675,7 @@ return copyout(vap->iv_txparms, ireq->i_data, sizeof(vap->iv_txparms)); } -static int +static __noinline int ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, const struct ieee80211req *ireq) { @@ -711,10 +717,7 @@ * but special-casing the compilation of this one module in the * build system would be awkward. */ -#ifdef __GNUC__ -__attribute__ ((noinline)) -#endif -static int +static __noinline int ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq) { @@ -1038,7 +1041,7 @@ #undef MS } -static int +static __noinline int ieee80211_ioctl_setkey(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211req_key ik; @@ -1111,7 +1114,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_delkey(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211req_del_key dk; @@ -1186,7 +1189,7 @@ ieee80211_node_leave(ni); } -static int +static __noinline int setmlme_common(struct ieee80211vap *vap, int op, const uint8_t mac[IEEE80211_ADDR_LEN], int reason) { @@ -1341,7 +1344,7 @@ look->se = se; } -static int +static __noinline int setmlme_assoc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], int ssid_len, const uint8_t ssid[IEEE80211_NWID_LEN]) { @@ -1364,7 +1367,7 @@ return 0; } -static int +static __noinline int ieee80211_ioctl_setmlme(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211req_mlme mlme; @@ -1383,7 +1386,7 @@ mlme.im_macaddr, mlme.im_reason); } -static int +static __noinline int ieee80211_ioctl_macmac(struct ieee80211vap *vap, struct ieee80211req *ireq) { uint8_t mac[IEEE80211_ADDR_LEN]; @@ -1408,7 +1411,7 @@ return 0; } -static int +static __noinline int ieee80211_ioctl_setmaccmd(struct ieee80211vap *vap, struct ieee80211req *ireq) { const struct ieee80211_aclator *acl = vap->iv_acl; @@ -1446,7 +1449,7 @@ return 0; } -static int +static __noinline int ieee80211_ioctl_setchanlist(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -1489,7 +1492,7 @@ return ENETRESET; } -static int +static __noinline int ieee80211_ioctl_setstastats(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211_node *ni; @@ -1515,7 +1518,7 @@ return 0; } -static int +static __noinline int ieee80211_ioctl_setstatxpow(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211_node *ni; @@ -1535,7 +1538,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_setwmeparam(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -1772,7 +1775,7 @@ * Old api for setting the current channel; this is * deprecated because channel numbers are ambiguous. */ -static int +static __noinline int ieee80211_ioctl_setchannel(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -1853,7 +1856,7 @@ * channel description is provide so there is no ambiguity in * identifying the channel. */ -static int +static __noinline int ieee80211_ioctl_setcurchan(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -1889,7 +1892,7 @@ return 1; } -static int +static __noinline int ieee80211_ioctl_setregdomain(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -2028,7 +2031,7 @@ return (mcs & 0x7f) <= 15; /* XXX could search ht rate set */ } -static int +static __noinline int ieee80211_ioctl_settxparams(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -2170,7 +2173,7 @@ vap->iv_rsn_ie = ie; } -static int +static __noinline int ieee80211_ioctl_setappie_locked(struct ieee80211vap *vap, const struct ieee80211req *ireq, int fc0) { @@ -2241,7 +2244,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_setappie(struct ieee80211vap *vap, const struct ieee80211req *ireq) { @@ -2259,7 +2262,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_chanswitch(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211com *ic = vap->iv_ic; @@ -2287,7 +2290,7 @@ return error; } -static int +static __noinline int ieee80211_ioctl_scanreq(struct ieee80211vap *vap, struct ieee80211req *ireq) { #define IEEE80211_IOC_SCAN_FLAGS \ @@ -2407,7 +2410,7 @@ IEEE80211_IS_CHAN_HT(bss->ni_chan); } -static int +static __noinline int ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq) { static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 00:25:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2DE9D16A418; Wed, 20 Feb 2008 00:25:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DEAF16A417 for ; Wed, 20 Feb 2008 00:25:09 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7155A13C43E for ; Wed, 20 Feb 2008 00:25:09 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K0P9C6041842 for ; Wed, 20 Feb 2008 00:25:09 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K0P93x041839 for perforce@freebsd.org; Wed, 20 Feb 2008 00:25:09 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 00:25:09 GMT Message-Id: <200802200025.m1K0P93x041839@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135761 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 00:25:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=135761 Change 135761 by sam@sam_ebb on 2008/02/20 00:25:08 hookup regdomain support Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#29 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#15 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#29 (text+ko) ==== @@ -178,8 +178,12 @@ static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void ath_setup_stationkey(struct ieee80211_node *); static void ath_newassoc(struct ieee80211_node *, int); -static int ath_getchannels(struct ath_softc *, - HAL_REG_DOMAIN, HAL_CTRY_CODE, HAL_BOOL, HAL_BOOL); +static int ath_setregdomain(struct ieee80211com *, + struct ieee80211_regdomain *, int, + struct ieee80211_channel []); +static void ath_getradiocaps(struct ieee80211com *, int *, + struct ieee80211_channel []); +static int ath_getchannels(struct ath_softc *); static void ath_led_event(struct ath_softc *, int); static int ath_rate_setup(struct ath_softc *, u_int mode); @@ -197,21 +201,6 @@ static int ath_calinterval = 30; /* calibrate every 30 secs */ SYSCTL_INT(_hw_ath, OID_AUTO, calibrate, CTLFLAG_RW, &ath_calinterval, 0, "chip calibration interval (secs)"); -static int ath_outdoor = AH_TRUE; /* outdoor operation */ -SYSCTL_INT(_hw_ath, OID_AUTO, outdoor, CTLFLAG_RW, &ath_outdoor, - 0, "outdoor operation"); -TUNABLE_INT("hw.ath.outdoor", &ath_outdoor); -static int ath_xchanmode = AH_TRUE; /* extended channel use */ -SYSCTL_INT(_hw_ath, OID_AUTO, xchanmode, CTLFLAG_RW, &ath_xchanmode, - 0, "extended channel mode"); -TUNABLE_INT("hw.ath.xchanmode", &ath_xchanmode); -static int ath_countrycode = CTRY_DEFAULT; /* country code */ -SYSCTL_INT(_hw_ath, OID_AUTO, countrycode, CTLFLAG_RW, &ath_countrycode, - 0, "country code"); -TUNABLE_INT("hw.ath.countrycode", &ath_countrycode); -static int ath_regdomain = 0; /* regulatory domain */ -SYSCTL_INT(_hw_ath, OID_AUTO, regdomain, CTLFLAG_RD, &ath_regdomain, - 0, "regulatory domain"); static int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */ SYSCTL_INT(_hw_ath, OID_AUTO, rxbuf, CTLFLAG_RW, &ath_rxbuf, @@ -350,13 +339,9 @@ ath_hal_keyreset(ah, i); /* - * Collect the channel list using the default country - * code and including outdoor channels. The 802.11 layer - * is resposible for filtering this list based on settings - * like the phy mode. + * Collect the default channel list. */ - error = ath_getchannels(sc, ath_regdomain, ath_countrycode, - ath_outdoor != 0, ath_xchanmode != 0); + error = ath_getchannels(sc); if (error != 0) goto bad; @@ -583,7 +568,7 @@ sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); if (ath_hal_hasfastframes(ah)) ic->ic_caps |= IEEE80211_C_FF; - if (ath_hal_getwirelessmodes(ah, ath_countrycode) & (HAL_MODE_108G|HAL_MODE_TURBO)) + if (ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country) & (HAL_MODE_108G|HAL_MODE_TURBO)) ic->ic_caps |= IEEE80211_C_TURBOP; /* @@ -610,6 +595,8 @@ ic->ic_max_keyix = sc->sc_keymax; /* call MI attach routine. */ ieee80211_ifattach(ic); + ic->ic_setregdomain = ath_setregdomain; + ic->ic_getradiocaps = ath_getradiocaps; sc->sc_opmode = HAL_M_STA; /* override default methods */ @@ -5694,43 +5681,40 @@ } static int -ath_getchannels(struct ath_softc *sc, - HAL_REG_DOMAIN rd, HAL_CTRY_CODE cc, HAL_BOOL outdoor, HAL_BOOL xchanmode) +getchannels(struct ath_softc *sc, int *nchans, struct ieee80211_channel chans[], + int cc, int ecm, int outdoor) { - struct ieee80211com *ic = &sc->sc_ic; - struct ifnet *ifp = sc->sc_ifp; struct ath_hal *ah = sc->sc_ah; - HAL_CHANNEL *chans; - int i, nchan; - u_int32_t regdomain; + HAL_CHANNEL *halchans; + int i, nhalchans, error; - chans = malloc(IEEE80211_CHAN_MAX * sizeof(HAL_CHANNEL), + halchans = malloc(IEEE80211_CHAN_MAX * sizeof(HAL_CHANNEL), M_TEMP, M_NOWAIT); - if (chans == NULL) { - if_printf(ifp, "unable to allocate channel table\n"); + if (halchans == NULL) { + device_printf(sc->sc_dev, + "%s: unable to allocate channel table\n", __func__); return ENOMEM; } - if (!ath_hal_init_channels(ah, chans, IEEE80211_CHAN_MAX, &nchan, - NULL, 0, NULL, cc, HAL_MODE_ALL, outdoor, xchanmode)) { - (void) ath_hal_getregdomain(ah, ®domain); - if_printf(ifp, "unable to collect channel list from hal; " - "regdomain likely %u country code %u\n", regdomain, cc); - free(chans, M_TEMP); - return EINVAL; + error = 0; + if (!ath_hal_init_channels(ah, halchans, IEEE80211_CHAN_MAX, &nhalchans, + NULL, 0, NULL, CTRY_DEFAULT, HAL_MODE_ALL, AH_FALSE, AH_TRUE)) { + error = EINVAL; + goto done; } + if (nchans == NULL) /* no table requested */ + goto done; /* * Convert HAL channels to ieee80211 ones. */ - memset(ic->ic_channels, 0, sizeof(ic->ic_channels)); - for (i = 0; i < nchan; i++) { - HAL_CHANNEL *c = &chans[i]; - struct ieee80211_channel *ichan = &ic->ic_channels[i]; + for (i = 0; i < nhalchans; i++) { + HAL_CHANNEL *c = &halchans[i]; + struct ieee80211_channel *ichan = &chans[i]; ichan->ic_ieee = ath_hal_mhz2ieee(ah, c->channel, c->channelFlags); if (bootverbose) - if_printf(ifp, "hal channel %u/%x -> %u\n", + device_printf(sc->sc_dev, "hal channel %u/%x -> %u\n", c->channel, c->channelFlags, ichan->ic_ieee); ichan->ic_freq = c->channel; @@ -5756,12 +5740,94 @@ ichan->ic_maxpower = c->maxTxPower; /* 1/2 dBm */ ichan->ic_minpower = c->minTxPower; /* 1/2 dBm */ } - ic->ic_nchans = nchan; - free(chans, M_TEMP); - (void) ath_hal_getregdomain(ah, &sc->sc_regdomain); - ath_hal_getcountrycode(ah, &sc->sc_countrycode); - sc->sc_xchanmode = xchanmode; - sc->sc_outdoor = outdoor; + *nchans = nhalchans; +done: + free(halchans, M_TEMP); + return error; +} + +static int +ath_setregdomain(struct ieee80211com *ic, struct ieee80211_regdomain *rd, + int nchans, struct ieee80211_channel chans[]) +{ + struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + u_int32_t ord; + int error; + + (void) ath_hal_getregdomain(ah, &ord); + /* XXX map sku->rd */ + ath_hal_setregdomain(ah, rd->regdomain); + error = getchannels(sc, &nchans, chans, rd->country, + rd->ecm ? AH_TRUE : AH_FALSE, + rd->location == 'O' ? AH_TRUE : AH_FALSE); + if (error != 0) { + /* + * Restore previous state. + */ + ath_hal_setregdomain(ah, ord); + (void) getchannels(sc, NULL, NULL, ic->ic_regdomain.country, + ic->ic_regdomain.ecm ? AH_TRUE : AH_FALSE, + ic->ic_regdomain.location == 'O' ? AH_TRUE : AH_FALSE); + return error; + } + return 0; +} + +static void +ath_getradiocaps(struct ieee80211com *ic, + int *nchans, struct ieee80211_channel chans[]) +{ + struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + u_int32_t ord; + + (void) ath_hal_getregdomain(ah, &ord); + ath_hal_setregdomain(ah, 0); + /* XXX not quite right but close enough for now */ + getchannels(sc, nchans, chans, CTRY_DEBUG, AH_TRUE, AH_FALSE); + ath_hal_setregdomain(ah, ord); +} + +static int +ath_mapregdomain(struct ath_softc *sc, u_int32_t rd) +{ + /* map Atheros rd's to SKU's */ + return rd; +} + +static int +ath_getchannels(struct ath_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ath_hal *ah = sc->sc_ah; + u_int32_t rd, cc; + int error; + + /* + * Convert HAL channels to ieee80211 ones. + */ + error = getchannels(sc, &ic->ic_nchans, ic->ic_channels, + CTRY_DEFAULT, AH_TRUE, AH_FALSE); + (void) ath_hal_getregdomain(ah, &rd); + ath_hal_getcountrycode(ah, &cc); /* NB: cannot fail */ + if (error) { + device_printf(sc->sc_dev, + "%s: unable to collect channel list from hal, error %d\n", + __func__, error); + if (error == EINVAL) { + device_printf(sc->sc_dev, + "%s: regdomain likely %u country code %u\n", + __func__, rd, cc); + } + return error; + } + ic->ic_regdomain.regdomain = ath_mapregdomain(sc, rd); + ic->ic_regdomain.country = cc; + ic->ic_regdomain.ecm = 1; + ic->ic_regdomain.location = 'I'; + ic->ic_regdomain.isocc[0] = ' '; /* XXX don't know */ + ic->ic_regdomain.isocc[1] = ' '; return 0; } ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#15 (text+ko) ==== @@ -209,8 +209,6 @@ u_int8_t sc_nbssid0; /* # vap's using base mac */ uint32_t sc_bssidmask; /* bssid mask */ - u_int32_t sc_countrycode; - u_int32_t sc_regdomain; void (*sc_node_free)(struct ieee80211_node *); device_t sc_dev; HAL_BUS_TAG sc_st; /* bus space tag */ @@ -497,7 +495,7 @@ #define ath_hal_getregdomain(_ah, _prd) \ (ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK) #define ath_hal_setregdomain(_ah, _rd) \ - ((*(_ah)->ah_setRegulatoryDomain)((_ah), (_rd), NULL)) + (*(uint16_t *)(((uint8_t *)(_ah)) + 520) = (_rd)) #define ath_hal_getcountrycode(_ah, _pcc) \ (*(_pcc) = (_ah)->ah_countryCode) #define ath_hal_hastkipsplit(_ah) \ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 01:13:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21F9716A409; Wed, 20 Feb 2008 01:13:34 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A852316A401; Wed, 20 Feb 2008 01:13:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7111713C45B; Wed, 20 Feb 2008 01:13:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1K1AZai053627; Tue, 19 Feb 2008 18:10:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 19 Feb 2008 18:10:53 -0700 (MST) Message-Id: <20080219.181053.824013453.imp@bsdimp.com> To: sam@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200802192338.m1JNcKvG037641@repoman.freebsd.org> References: <200802192338.m1JNcKvG037641@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@FreeBSD.org Subject: Re: PERFORCE change 135760 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 01:13:34 -0000 Suppress the aggressive inline of gcc; there is no obvious benefit to doing it and the downsides are significant. Once I can nagivate the maze of twisty #ifdefs in cdefs.h I'll add __noinline where it belongs. Maybe the following is sufficient? Index: cdefs.h =================================================================== RCS file: /cache/ncvs/src/sys/sys/cdefs.h,v retrieving revision 1.94 diff -u -r1.94 cdefs.h --- cdefs.h 9 Dec 2007 21:00:36 -0000 1.94 +++ cdefs.h 20 Feb 2008 01:09:57 -0000 @@ -241,6 +241,12 @@ #define __gnu89_inline #endif +#if __GNUC_PREREQ__(3, 1) +#define __noinline __attribute__((__noinline__)) +#else +#define __noinline +#endif + #if __GNUC_PREREQ__(3, 3) #define __nonnull(x) __attribute__((__nonnull__(x))) #else From owner-p4-projects@FreeBSD.ORG Wed Feb 20 01:43:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EA61E16A403; Wed, 20 Feb 2008 01:43:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABE2D16A401 for ; Wed, 20 Feb 2008 01:43:30 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A1A5513C43E for ; Wed, 20 Feb 2008 01:43:30 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K1hU0H056739 for ; Wed, 20 Feb 2008 01:43:30 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K1hU0s056736 for perforce@freebsd.org; Wed, 20 Feb 2008 01:43:30 GMT (envelope-from marcel@freebsd.org) Date: Wed, 20 Feb 2008 01:43:30 GMT Message-Id: <200802200143.m1K1hU0s056736@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135763 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 01:43:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135763 Change 135763 by marcel@marcel_xcllnt on 2008/02/20 01:42:47 Add option FPU_EMU, used to enable/compile-in the FPU emulator. Affected files ... .. //depot/projects/e500/sys/conf/options.powerpc#4 edit .. //depot/projects/e500/sys/powerpc/conf/JUNIPER#4 edit Differences ... ==== //depot/projects/e500/sys/conf/options.powerpc#4 (text+ko) ==== @@ -11,6 +11,7 @@ POWERMAC opt_platform.h PSIM MPC85xx +FPU_EMU SC_OFWFB opt_ofwfb.h ==== //depot/projects/e500/sys/powerpc/conf/JUNIPER#4 (text+ko) ==== @@ -5,6 +5,8 @@ makeoptions NO_MODULES=yes makeoptions WERROR="-Werror -Wno-format -Wno-redundant-decls" +options FPU_EMU + options _KPOSIX_PRIORITY_SCHEDULING options ALT_BREAK_TO_DEBUGGER options BREAK_TO_DEBUGGER From owner-p4-projects@FreeBSD.ORG Wed Feb 20 01:58:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 339D616A405; Wed, 20 Feb 2008 01:58:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC8B816A404 for ; Wed, 20 Feb 2008 01:58:46 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E0D1B13C455 for ; Wed, 20 Feb 2008 01:58:46 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K1wk2k057492 for ; Wed, 20 Feb 2008 01:58:46 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K1wkap057489 for perforce@freebsd.org; Wed, 20 Feb 2008 01:58:46 GMT (envelope-from marcel@freebsd.org) Date: Wed, 20 Feb 2008 01:58:46 GMT Message-Id: <200802200158.m1K1wkap057489@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135764 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 01:58:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=135764 Change 135764 by marcel@marcel_xcllnt on 2008/02/20 01:58:15 Hook-up the FPU emulator. This merely passes make depend. Replace __KERNEL_RCSID with __FBSDID while I'm here. Affected files ... .. //depot/projects/e500/sys/conf/files.powerpc#15 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#2 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#2 edit Differences ... ==== //depot/projects/e500/sys/conf/files.powerpc#15 (text+ko) ==== @@ -86,6 +86,15 @@ powerpc/booke/swtch.S optional e500 powerpc/booke/trap.c optional e500 powerpc/booke/uio_machdep.c optional e500 +powerpc/fpu/fpu_add.c optional fpu_emu +powerpc/fpu/fpu_compare.c optional fpu_emu +powerpc/fpu/fpu_div.c optional fpu_emu +powerpc/fpu/fpu_emu.c optional fpu_emu +powerpc/fpu/fpu_explode.c optional fpu_emu +powerpc/fpu/fpu_implode.c optional fpu_emu +powerpc/fpu/fpu_mul.c optional fpu_emu +powerpc/fpu/fpu_sqrt.c optional fpu_emu +powerpc/fpu/fpu_subr.c optional fpu_emu powerpc/booke/vm_machdep.c optional e500 powerpc/mpc85xx/nexus.c optional mpc85xx powerpc/mpc85xx/ocpbus.c optional mpc85xx ==== //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#2 (text+ko) ==== @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_add.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #if defined(DIAGNOSTIC)||defined(DEBUG) @@ -55,7 +55,7 @@ #endif #include -#include +//#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#2 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#2 (text+ko) ==== @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_compare.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_div.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #if defined(DIAGNOSTIC)||defined(DEBUG) ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#2 (text+ko) ==== @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.14 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include "opt_ddb.h" @@ -86,9 +86,9 @@ #include #include #include -#include /* for evcnt */ +//#include /* for evcnt */ -#include +//#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#2 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#2 (text+ko) ==== @@ -46,13 +46,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.6 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #include #include -#include +//#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#2 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#2 (text+ko) ==== @@ -46,13 +46,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.6 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #include #include -#include +//#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_mul.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #if defined(DIAGNOSTIC)||defined(DEBUG) ==== //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_sqrt.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #if defined(DIAGNOSTIC)||defined(DEBUG) ==== //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#2 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_subr.c,v 1.4 2005/12/11 12:18:42 christos Exp $"); +__FBSDID("$FreeBSD$"); #include #if defined(DIAGNOSTIC)||defined(DEBUG) @@ -53,7 +53,7 @@ #endif #include -#include +//#include #include #include From owner-p4-projects@FreeBSD.ORG Wed Feb 20 03:25:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC26616A408; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5988F16A401 for ; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3478913C461 for ; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K3PIRW065627 for ; Wed, 20 Feb 2008 03:25:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K3PHaR065624 for perforce@freebsd.org; Wed, 20 Feb 2008 03:25:17 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 20 Feb 2008 03:25:17 GMT Message-Id: <200802200325.m1K3PHaR065624@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135766 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 03:25:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135766 Change 135766 by kmacy@kmacy:entropy:iwarp on 2008/02/20 03:24:34 silently drop early offload replies Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#19 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_offload.c#19 (text+ko) ==== @@ -473,8 +473,6 @@ static int rx_offload_blackhole(struct t3cdev *dev, struct mbuf **m, int n) { - CH_ERR(tdev2adap(dev), "%d unexpected offload packets, first data 0x%02x\n", - n, (0xff & *mtod(m[0], uint32_t *))); while (n--) m_freem(m[n]); return 0; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 03:25:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60A4E16A4EE; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6916916A404 for ; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5CE1913C469 for ; Wed, 20 Feb 2008 03:25:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K3PIWs065633 for ; Wed, 20 Feb 2008 03:25:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K3PIkV065630 for perforce@freebsd.org; Wed, 20 Feb 2008 03:25:18 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 20 Feb 2008 03:25:18 GMT Message-Id: <200802200325.m1K3PIkV065630@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135767 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 03:25:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135767 Change 135767 by kmacy@kmacy:entropy:iwarp on 2008/02/20 03:25:04 add acpi to modules build Affected files ... .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#11 edit .. //depot/projects/iwarp/sys/i386/conf/GENERIC#8 edit Differences ... ==== //depot/projects/iwarp/sys/amd64/conf/GENERIC#11 (text+ko) ==== @@ -23,7 +23,7 @@ # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. -makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" +makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph acpi" makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols ==== //depot/projects/iwarp/sys/i386/conf/GENERIC#8 (text+ko) ==== @@ -25,7 +25,7 @@ #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph" +makeoptions MODULES_OVERRIDE="cxgb em if_vlan linux linprocfs hwpmc netgraph acpi" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-p4-projects@FreeBSD.ORG Wed Feb 20 03:26:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E853D16A408; Wed, 20 Feb 2008 03:26:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950BD16A406 for ; Wed, 20 Feb 2008 03:26:19 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8825B13C4DD for ; Wed, 20 Feb 2008 03:26:19 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K3QJST065684 for ; Wed, 20 Feb 2008 03:26:19 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K3QJNm065681 for perforce@freebsd.org; Wed, 20 Feb 2008 03:26:19 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 20 Feb 2008 03:26:19 GMT Message-Id: <200802200326.m1K3QJNm065681@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135768 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 03:26:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135768 Change 135768 by kmacy@kmacy:entropy:iwarp on 2008/02/20 03:25:30 change device_printfs to logs to rate limit messages Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_osdep.h#9 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_osdep.h#9 (text+ko) ==== @@ -341,13 +341,14 @@ #define DBG(...) #endif +#include + #define promisc_rx_mode(rm) ((rm)->port->ifp->if_flags & IFF_PROMISC) #define allmulti_rx_mode(rm) ((rm)->port->ifp->if_flags & IFF_ALLMULTI) -#define CH_ERR(adap, fmt, ...)device_printf(adap->dev, fmt, ##__VA_ARGS__) - -#define CH_WARN(adap, fmt, ...) device_printf(adap->dev, fmt, ##__VA_ARGS__) -#define CH_ALERT(adap, fmt, ...) device_printf(adap->dev, fmt, ##__VA_ARGS__) +#define CH_ERR(adap, fmt, ...) log(LOG_ERR, fmt, ##__VA_ARGS__) +#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__) +#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, fmt, ##__VA_ARGS__) #define t3_os_sleep(x) DELAY((x) * 1000) From owner-p4-projects@FreeBSD.ORG Wed Feb 20 03:27:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5030616A403; Wed, 20 Feb 2008 03:27:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F12BD16A401 for ; Wed, 20 Feb 2008 03:27:20 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E44EB13C455 for ; Wed, 20 Feb 2008 03:27:20 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K3RKrr065720 for ; Wed, 20 Feb 2008 03:27:20 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K3RKub065717 for perforce@freebsd.org; Wed, 20 Feb 2008 03:27:20 GMT (envelope-from marcel@freebsd.org) Date: Wed, 20 Feb 2008 03:27:20 GMT Message-Id: <200802200327.m1K3RKub065717@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135769 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 03:27:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=135769 Change 135769 by marcel@marcel_xcllnt on 2008/02/20 03:26:59 Make this compile for the most part. o fpu_emu.c needs more work. o we need __cmpdi2 in libkern. Affected files ... .. //depot/projects/e500/sys/conf/files.powerpc#16 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#1 add .. //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#3 edit Differences ... ==== //depot/projects/e500/sys/conf/files.powerpc#16 (text+ko) ==== @@ -89,7 +89,7 @@ powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu -powerpc/fpu/fpu_emu.c optional fpu_emu +#powerpc/fpu/fpu_emu.c optional fpu_emu powerpc/fpu/fpu_explode.c optional fpu_emu powerpc/fpu/fpu_implode.c optional fpu_emu powerpc/fpu/fpu_mul.c optional fpu_emu ==== //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#3 (text+ko) ==== @@ -49,14 +49,12 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#if defined(DIAGNOSTIC)||defined(DEBUG) -#include -#endif +#include +#include #include -//#include -#include #include #include @@ -109,7 +107,7 @@ } rd = ((fe->fe_fpscr) & FPSCR_RN); if (ISZERO(y)) { - if (rd != FSR_RD_RM) /* only -0 + -0 gives -0 */ + if (rd != FP_RM) /* only -0 + -0 gives -0 */ y->fp_sign &= x->fp_sign; else /* any -0 operand gives -0 */ y->fp_sign |= x->fp_sign; @@ -197,7 +195,7 @@ if ((r0 | r1 | r2 | r3) == 0) { /* case ii */ r->fp_class = FPC_ZERO; - r->fp_sign = rd == FSR_RD_RM; + r->fp_sign = rd == FP_RM; return (r); } } else { ==== //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#3 (text+ko) ==== @@ -50,10 +50,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include +#include #include -#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#3 (text+ko) ==== @@ -47,13 +47,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#if defined(DIAGNOSTIC)||defined(DEBUG) -#include -#endif +#include #include -#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#3 (text+ko) ==== @@ -88,12 +88,12 @@ #include //#include /* for evcnt */ -//#include +#include #include -#include #include #include +#include #define FPU_EMU_EVCNT_DECL(name) \ static struct evcnt fpu_emu_ev_##name = \ ==== //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#3 (text+ko) ==== @@ -48,17 +48,17 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#include +#include #include -//#include #include -#include #include #include #include +#include /* * N.B.: in all of the following, we assume the FP format is ==== //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#3 (text+ko) ==== @@ -48,17 +48,18 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#include +#include #include -//#include +#include #include -#include #include #include #include +#include static int round(struct fpemu *, struct fpn *); static int toinf(struct fpemu *, int); @@ -103,7 +104,7 @@ /* Go to rounddown to round down; break to round up. */ switch ((fe->fe_fpscr) & FPSCR_RN) { - case FSR_RD_RN: + case FP_RN: default: /* * Round only if guard is set (gr & 2). If guard is set, @@ -116,17 +117,17 @@ break; goto rounddown; - case FSR_RD_RZ: + case FP_RZ: /* Round towards zero, i.e., down. */ goto rounddown; - case FSR_RD_RM: + case FP_RM: /* Round towards -Inf: up if negative, down if positive. */ if (fp->fp_sign) break; goto rounddown; - case FSR_RD_RP: + case FP_RP: /* Round towards +Inf: up if positive, down otherwise. */ if (!fp->fp_sign) break; @@ -168,19 +169,19 @@ switch ((fe->fe_fpscr) & FPSCR_RN) { default: - case FSR_RD_RN: /* the nearest value is always Inf */ + case FP_RN: /* the nearest value is always Inf */ inf = 1; break; - case FSR_RD_RZ: /* toward 0 => never towards Inf */ + case FP_RZ: /* toward 0 => never towards Inf */ inf = 0; break; - case FSR_RD_RP: /* toward +Inf iff positive */ + case FP_RP: /* toward +Inf iff positive */ inf = sign == 0; break; - case FSR_RD_RM: /* toward -Inf iff negative */ + case FP_RM: /* toward -Inf iff negative */ inf = sign; break; } ==== //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#3 (text+ko) ==== @@ -47,13 +47,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#if defined(DIAGNOSTIC)||defined(DEBUG) -#include -#endif +#include #include -#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#3 (text+ko) ==== @@ -47,13 +47,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#if defined(DIAGNOSTIC)||defined(DEBUG) -#include -#endif +#include #include -#include #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#3 (text+ko) ==== @@ -47,14 +47,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include -#if defined(DIAGNOSTIC)||defined(DEBUG) -#include -#endif +#include #include -//#include -#include #include #include From owner-p4-projects@FreeBSD.ORG Wed Feb 20 03:56:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 41BBC16A408; Wed, 20 Feb 2008 03:56:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0710816A403 for ; Wed, 20 Feb 2008 03:56:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EE9CA13C45A for ; Wed, 20 Feb 2008 03:56:54 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K3usgq067074 for ; Wed, 20 Feb 2008 03:56:54 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K3us44067071 for perforce@freebsd.org; Wed, 20 Feb 2008 03:56:54 GMT (envelope-from marcel@freebsd.org) Date: Wed, 20 Feb 2008 03:56:54 GMT Message-Id: <200802200356.m1K3us44067071@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135770 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 03:56:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=135770 Change 135770 by marcel@marcel_xcllnt on 2008/02/20 03:56:23 Add __cmpdi2() to libkern on PowerPC. Implementation derived from __ucmpdi2(). Affected files ... .. //depot/projects/e500/sys/conf/files.powerpc#17 edit .. //depot/projects/e500/sys/libkern/cmpdi2.c#1 add .. //depot/projects/e500/sys/libkern/quad.h#2 edit Differences ... ==== //depot/projects/e500/sys/conf/files.powerpc#17 (text+ko) ==== @@ -50,6 +50,7 @@ libkern/ashldi3.c standard libkern/ashrdi3.c standard libkern/bcmp.c standard +libkern/cmpdi2.c standard libkern/divdi3.c standard libkern/ffs.c standard libkern/ffsl.c standard @@ -89,7 +90,7 @@ powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu -#powerpc/fpu/fpu_emu.c optional fpu_emu +powerpc/fpu/fpu_emu.c optional fpu_emu powerpc/fpu/fpu_explode.c optional fpu_emu powerpc/fpu/fpu_implode.c optional fpu_emu powerpc/fpu/fpu_mul.c optional fpu_emu ==== //depot/projects/e500/sys/libkern/quad.h#2 (text+ko) ==== @@ -101,6 +101,7 @@ quad_t __ashldi3(quad_t, qshift_t); quad_t __ashrdi3(quad_t, qshift_t); +int __cmpdi2(quad_t a, quad_t b); quad_t __divdi3(quad_t a, quad_t b); quad_t __lshrdi3(quad_t, qshift_t); quad_t __moddi3(quad_t a, quad_t b); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 04:12:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DB0216A402; Wed, 20 Feb 2008 04:12:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8670716A401 for ; Wed, 20 Feb 2008 04:12:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 79D7313C448 for ; Wed, 20 Feb 2008 04:12:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K4CAKT068941 for ; Wed, 20 Feb 2008 04:12:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K4CAYV068938 for perforce@freebsd.org; Wed, 20 Feb 2008 04:12:10 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 04:12:10 GMT Message-Id: <200802200412.m1K4CAYV068938@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135771 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 04:12:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135771 Change 135771 by sam@sam_ebb on 2008/02/20 04:11:48 Make a lame attempt at locking vap create/delete; we can't do this properly because there are lots of calls deep below us that do malloc(M_WAITOK). Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#30 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#30 (text+ko) ==== @@ -741,15 +741,17 @@ uint8_t mac[IEEE80211_ADDR_LEN]; int ic_opmode, needbeacon; + avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), + M_80211_VAP, M_WAITOK | M_ZERO); needbeacon = 0; IEEE80211_ADDR_COPY(mac, mac0); - /* XXX ic unlocked and race against add? */ + ATH_LOCK(sc); switch (opmode) { case IEEE80211_M_STA: if (sc->sc_nstavaps != 0) { /* XXX only 1 sta for now */ device_printf(sc->sc_dev, "only 1 sta vap supported\n"); - return NULL; + goto bad; } if (sc->sc_nvaps) { /* @@ -768,7 +770,7 @@ if (sc->sc_nvaps != 0) { /* XXX only 1 for now */ device_printf(sc->sc_dev, "only 1 ibss vap supported\n"); - return NULL; + goto bad; } ic_opmode = opmode; needbeacon = 1; @@ -789,7 +791,7 @@ if (sc->sc_nvaps && ic->ic_opmode == IEEE80211_M_STA) { device_printf(sc->sc_dev, "wds not supported in sta mode\n"); - return NULL; + goto bad; } if (opmode == IEEE80211_M_WDS) { /* @@ -803,29 +805,26 @@ break; default: device_printf(sc->sc_dev, "unknown opmode %d\n", opmode); - return NULL; + goto bad; } /* * Check that a beacon buffer is available; the code below assumes it. */ if (needbeacon & STAILQ_EMPTY(&sc->sc_bbuf)) { device_printf(sc->sc_dev, "no beacon buffer available\n"); - return NULL; + goto bad; } - avp = (struct ath_vap *) malloc(sizeof(struct ath_vap), - M_80211_VAP, M_NOWAIT | M_ZERO); - if (avp == NULL) { - device_printf(sc->sc_dev, "unable to allocate memory\n"); - return NULL; - } - /* STA, AHDEMO? */ if (opmode == IEEE80211_M_HOSTAP) assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); vap = &avp->av_vap; + /* XXX can't hold mutex across if_alloc */ + ATH_UNLOCK(sc); + /* XXX check return */ ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + ATH_LOCK(sc); /* h/w crypto support */ vap->iv_key_alloc = ath_key_alloc; @@ -875,8 +874,6 @@ STAILQ_INIT(&avp->av_mcastq.axq_q); ATH_TXQ_LOCK_INIT(sc, &avp->av_mcastq); } - /* complete setup */ - ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status); ic->ic_opmode = ic_opmode; if (opmode != IEEE80211_M_WDS) @@ -899,14 +896,22 @@ /* XXX should not happen */ break; } - if (sc->sc_hastsfadd) { /* * Configure whether or not TSF adjust should be done. */ ath_hal_settsfadjust(sc->sc_ah, sc->sc_stagbeacons); } + ATH_UNLOCK(sc); + + /* complete setup */ + ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status); return vap; +bad: + /* XXX can leak ic->ic_ifp */ + free(avp, M_80211_VAP); + ATH_UNLOCK(sc); + return NULL; } static void @@ -930,6 +935,7 @@ } ieee80211_vap_detach(vap); + ATH_LOCK(sc); /* * Reclaim beacon state. Note this must be done before * the vap instance is reclaimed as we may have a reference @@ -965,6 +971,7 @@ } if (vap->iv_opmode != IEEE80211_M_WDS) sc->sc_nvaps--; + ATH_UNLOCK(sc); free(avp, M_80211_VAP); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { From owner-p4-projects@FreeBSD.ORG Wed Feb 20 04:17:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7AE7D16A402; Wed, 20 Feb 2008 04:17:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DEF816A401 for ; Wed, 20 Feb 2008 04:17:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1905613C45D for ; Wed, 20 Feb 2008 04:17:19 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K4HIY9069968 for ; Wed, 20 Feb 2008 04:17:18 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K4HIr3069965 for perforce@freebsd.org; Wed, 20 Feb 2008 04:17:18 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 04:17:18 GMT Message-Id: <200802200417.m1K4HIr3069965@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135772 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 04:17:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135772 Change 135772 by sam@sam_ebb on 2008/02/20 04:16:30 remove incorrect comment; there is no leak Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#31 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#31 (text+ko) ==== @@ -908,7 +908,6 @@ ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status); return vap; bad: - /* XXX can leak ic->ic_ifp */ free(avp, M_80211_VAP); ATH_UNLOCK(sc); return NULL; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 04:30:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 18BB816A407; Wed, 20 Feb 2008 04:30:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA57916A400 for ; Wed, 20 Feb 2008 04:30:32 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AC03413C45A for ; Wed, 20 Feb 2008 04:30:32 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K4UWSP070556 for ; Wed, 20 Feb 2008 04:30:32 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K4UWOT070553 for perforce@freebsd.org; Wed, 20 Feb 2008 04:30:32 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 20 Feb 2008 04:30:32 GMT Message-Id: <200802200430.m1K4UWOT070553@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135773 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 04:30:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135773 Change 135773 by kmacy@kmacy:entropy:iwarp on 2008/02/20 04:30:02 remove references to driver local copy of stack functions Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#13 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tcp_subr.c#2 delete .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tcp_usrreq.c#2 delete Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#13 (text+ko) ==== @@ -115,17 +115,6 @@ prp = pffindtype(AF_INET, SOCK_STREAM); pru_sosend = prp->pr_usrreqs->pru_sosend; pru_soreceive = prp->pr_usrreqs->pru_soreceive; -#ifdef TCP_USRREQS_OVERLOAD - tcp_usrreqs.pru_connect = cxgb_tcp_usrreqs.pru_connect; - tcp_usrreqs.pru_abort = cxgb_tcp_usrreqs.pru_abort; - tcp_usrreqs.pru_listen = cxgb_tcp_usrreqs.pru_listen; - tcp_usrreqs.pru_send = cxgb_tcp_usrreqs.pru_send; - tcp_usrreqs.pru_abort = cxgb_tcp_usrreqs.pru_abort; - tcp_usrreqs.pru_disconnect = cxgb_tcp_usrreqs.pru_disconnect; - tcp_usrreqs.pru_close = cxgb_tcp_usrreqs.pru_close; - tcp_usrreqs.pru_shutdown = cxgb_tcp_usrreqs.pru_shutdown; - tcp_usrreqs.pru_rcvd = cxgb_tcp_usrreqs.pru_rcvd; -#endif } struct cxgb_dma_info { From owner-p4-projects@FreeBSD.ORG Wed Feb 20 05:13:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 15EAD16A405; Wed, 20 Feb 2008 05:13:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE6B16A400 for ; Wed, 20 Feb 2008 05:13:18 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C1E5F13C457 for ; Wed, 20 Feb 2008 05:13:18 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K5DIr7083025 for ; Wed, 20 Feb 2008 05:13:18 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K5DI1P082872 for perforce@freebsd.org; Wed, 20 Feb 2008 05:13:18 GMT (envelope-from marcel@freebsd.org) Date: Wed, 20 Feb 2008 05:13:18 GMT Message-Id: <200802200513.m1K5DI1P082872@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135774 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 05:13:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135774 Change 135774 by marcel@marcel_xcllnt on 2008/02/20 05:12:57 Replace NetBSD's evcnt with sysctl. Minor tweaking to make it compile. Affected files ... .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#4 edit Differences ... ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#4 (text+ko) ==== @@ -80,13 +80,17 @@ #include "opt_ddb.h" +#define DEBUG + #include +#include +#include +#include #include +#include #include -#include #include #include -//#include /* for evcnt */ #include #include @@ -95,13 +99,14 @@ #include #include +SYSCTL_NODE(_hw, OID_AUTO, fpu_emu, CTLFLAG_RW, 0, "FPU emulator"); + #define FPU_EMU_EVCNT_DECL(name) \ -static struct evcnt fpu_emu_ev_##name = \ - EVCNT_INITIALIZER(EVCNT_TYPE_TRAP, NULL, "fpemu", #name); \ -EVCNT_ATTACH_STATIC(fpu_emu_ev_##name) +static u_int fpu_emu_evcnt_##name; \ +SYSCTL_INT(_hw_fpu_emu, OID_AUTO, evcnt_##name, CTLFLAG_RD, \ + &fpu_emu_evcnt_##name, 0, "") -#define FPU_EMU_EVCNT_INCR(name) \ - fpu_emu_ev_##name.ev_count++ +#define FPU_EMU_EVCNT_INCR(name) fpu_emu_evcnt_##name++ FPU_EMU_EVCNT_DECL(stfiwx); FPU_EMU_EVCNT_DECL(fpstore); @@ -143,14 +148,11 @@ #define FPSR_EX (FPSCR_VE|FPSCR_OE|FPSCR_UE|FPSCR_ZE|FPSCR_XE) #define FPSR_EXOP (FPSR_EX_MSK&(~FPSR_EX)) - int fpe_debug = 0; -#ifdef DDB -extern vaddr_t opc_disasm(vaddr_t loc, int opcode); -#endif +#ifdef DEBUG +vm_offset_t opc_disasm(vm_offset_t, int); -#ifdef DEBUG /* * Dump a `fpn' structure. */ @@ -238,7 +240,7 @@ if (fpe_debug & FPE_EX) { printf("fpu_emulate: illegal insn %x at %p:", insn.i_int, (void *) (frame->srr0)); - opc_disasm((vaddr_t)(frame->srr0), insn.i_int); + opc_disasm(frame->srr0, insn.i_int); } #endif /* @@ -248,7 +250,7 @@ sig = SIGILL; #ifdef DEBUG if (fpe_debug & FPE_EX) - Debugger(); + kdb_enter(KDB_WHY_UNSET, "illegal instruction"); #endif } lastill = frame->srr0; @@ -272,7 +274,7 @@ struct fpn *fp; union instr instr = *insn; int *a; - vaddr_t addr; + vm_offset_t addr; int ra, rb, rc, rt, type, mask, fsr, cx, bf, setcr; unsigned int cond; struct fpreg *fs; @@ -293,7 +295,7 @@ #if defined(DDB) && defined(DEBUG) if (fpe_debug & FPE_EX) { - vaddr_t loc = tf->srr0; + vm_offset_t loc = tf->srr0; printf("Trying to emulate: %p ", (void *)loc); opc_disasm(loc, instr.i_int); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 06:09:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6F7A316A407; Wed, 20 Feb 2008 06:09:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1DE16A401 for ; Wed, 20 Feb 2008 06:09:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0508013C4CC for ; Wed, 20 Feb 2008 06:09:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1K69JHC087580 for ; Wed, 20 Feb 2008 06:09:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1K69IeX087577 for perforce@freebsd.org; Wed, 20 Feb 2008 06:09:18 GMT (envelope-from jb@freebsd.org) Date: Wed, 20 Feb 2008 06:09:18 GMT Message-Id: <200802200609.m1K69IeX087577@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135775 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 06:09:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135775 Change 135775 by jb@jb_freebsd1 on 2008/02/20 06:08:23 Avoid a core dump. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/common/ctf/ctf_lookup.c#8 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/common/ctf/ctf_lookup.c#8 (text) ==== @@ -219,6 +219,9 @@ { ctf_file_t *fp = *fpp; /* caller passes in starting CTF container */ + if (fp == NULL || type < 0) + return (NULL); + if ((fp->ctf_flags & LCTF_CHILD) && CTF_TYPE_ISPARENT(type) && (fp = fp->ctf_parent) == NULL) { (void) ctf_set_errno(*fpp, ECTF_NOPARENT); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 13:02:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 92FB616A40D; Wed, 20 Feb 2008 13:02:32 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4626D16A40A for ; Wed, 20 Feb 2008 13:02:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3072013C4D9 for ; Wed, 20 Feb 2008 13:02:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KD2W7Q043770 for ; Wed, 20 Feb 2008 13:02:32 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KD2VrK043767 for perforce@freebsd.org; Wed, 20 Feb 2008 13:02:31 GMT (envelope-from sephe@FreeBSD.org) Date: Wed, 20 Feb 2008 13:02:31 GMT Message-Id: <200802201302.m1KD2VrK043767@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 135785 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 13:02:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=135785 Change 135785 by sephe@sephe_zealot:sam_wifi on 2008/02/20 13:01:38 Add raw_xmit support. Submitted by: sam Affected files ... .. //depot/projects/wifi/sys/dev/bwi/if_bwi.c#23 edit Differences ... ==== //depot/projects/wifi/sys/dev/bwi/if_bwi.c#23 (text+ko) ==== @@ -97,6 +97,8 @@ static int bwi_ioctl(struct ifnet *, u_long, caddr_t); static void bwi_start(struct ifnet *); static void bwi_start_locked(struct ifnet *); +static int bwi_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); static void bwi_watchdog(struct ifnet *); static void bwi_scan_start(struct ieee80211com *); static void bwi_set_channel(struct ieee80211com *); @@ -123,6 +125,9 @@ static int bwi_newbuf(struct bwi_softc *, int, int); static int bwi_encap(struct bwi_softc *, int, struct mbuf *, struct ieee80211_node *); +static int bwi_encap_raw(struct bwi_softc *, int, struct mbuf *, + struct ieee80211_node *, + const struct ieee80211_bpf_params *); static void bwi_init_rxdesc_ring32(struct bwi_softc *, uint32_t, bus_addr_t, int, int); @@ -541,6 +546,7 @@ ic->ic_set_channel = bwi_set_channel; ic->ic_node_alloc = bwi_node_alloc; ic->ic_newassoc = bwi_newassoc; + ic->ic_raw_xmit = bwi_raw_xmit; /* complete initialization */ ieee80211_media_init(ic, bwi_media_change, ieee80211_media_status); ieee80211_amrr_init(&sc->sc_amrr, ic, @@ -1442,6 +1448,55 @@ ifp->if_timer = 5; } +static int +bwi_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, + const struct ieee80211_bpf_params *params) +{ + struct ieee80211com *ic = ni->ni_ic; + struct ifnet *ifp = ic->ic_ifp; + struct bwi_softc *sc = ifp->if_softc; + /* XXX wme? */ + struct bwi_txbuf_data *tbd = &sc->sc_tx_bdata[BWI_TX_DATA_RING]; + int idx, error; + + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + ieee80211_free_node(ni); + m_freem(m); + return ENETDOWN; + } + + BWI_LOCK(sc); + idx = tbd->tbd_idx; + KASSERT(tbd->tbd_buf[idx].tb_mbuf == NULL, ("slot %d not empty", idx)); + if (params == NULL) { + /* + * Legacy path; interpret frame contents to decide + * precisely how to send the frame. + */ + error = bwi_encap(sc, idx, m, ni); + } else { + /* + * Caller supplied explicit parameters to use in + * sending the frame. + */ + error = bwi_encap_raw(sc, idx, m, ni, params); + } + if (error == 0) { + ifp->if_opackets++; + if (++tbd->tbd_used + BWI_TX_NSPRDESC >= BWI_TX_NDESC) + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + tbd->tbd_idx = (idx + 1) % BWI_TX_NDESC; + ifp->if_timer = 5; + } else { + /* NB: m is reclaimed on encap failure */ + ieee80211_free_node(ni); + ifp->if_oerrors++; + } + BWI_UNLOCK(sc); + return error; +} + static void bwi_watchdog(struct ifnet *ifp) { @@ -3166,6 +3221,162 @@ return error; } +static int +bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m, + struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct bwi_ring_data *rd = &sc->sc_tx_rdata[BWI_TX_DATA_RING]; + struct bwi_txbuf_data *tbd = &sc->sc_tx_bdata[BWI_TX_DATA_RING]; + struct bwi_txbuf *tb = &tbd->tbd_buf[idx]; + struct bwi_mac *mac; + struct bwi_txbuf_hdr *hdr; + struct ieee80211_frame *wh; + uint8_t rate, rate_fb; + uint32_t mac_ctrl; + uint16_t phy_ctrl; + bus_addr_t paddr; + int ismcast, pkt_len, error; + + KASSERT(sc->sc_cur_regwin->rw_type == BWI_REGWIN_T_MAC, + ("current regwin type %d", sc->sc_cur_regwin->rw_type)); + mac = (struct bwi_mac *)sc->sc_cur_regwin; + + wh = mtod(m, struct ieee80211_frame *); + ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + + /* Get 802.11 frame len before prepending TX header */ + pkt_len = m->m_pkthdr.len + IEEE80211_CRC_LEN; + + /* + * Find TX rate + */ + bzero(tb->tb_rate_idx, sizeof(tb->tb_rate_idx)); + rate = params->ibp_rate0; + rate_fb = (params->ibp_try1 != 0) ? + params->ibp_rate1 : params->ibp_rate0; + tb->tb_rate_idx[0] = rate; + tb->tb_rate_idx[1] = rate_fb; + sc->sc_tx_rate = rate; + + /* + * TX radio tap + */ + if (bpf_peers_present(sc->sc_drvbpf)) { + sc->sc_tx_th.wt_flags = 0; + /* XXX IEEE80211_BPF_CRYPTO */ + if (wh->i_fc[1] & IEEE80211_FC1_WEP) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; + if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + sc->sc_tx_th.wt_rate = rate; + + bpf_mtap2(sc->sc_drvbpf, &sc->sc_tx_th, sc->sc_tx_th_len, m); + } + + /* + * Setup the embedded TX header + */ + M_PREPEND(m, sizeof(*hdr), M_DONTWAIT); + if (m == NULL) { + if_printf(ic->ic_ifp, "prepend TX header failed\n"); + return ENOBUFS; + } + hdr = mtod(m, struct bwi_txbuf_hdr *); + + bzero(hdr, sizeof(*hdr)); + + bcopy(wh->i_fc, hdr->txh_fc, sizeof(hdr->txh_fc)); + bcopy(wh->i_addr1, hdr->txh_addr1, sizeof(hdr->txh_addr1)); + + mac_ctrl = BWI_TXH_MAC_C_HWSEQ | BWI_TXH_MAC_C_FIRST_FRAG; + if (!ismcast && (params->ibp_flags & IEEE80211_BPF_NOACK) == 0) { + uint16_t dur; + uint8_t ack_rate; + + /* XXX rate_fb? */ + ack_rate = ieee80211_ack_rate(ni, rate_fb); + dur = ieee80211_txtime(ni, + sizeof(struct ieee80211_frame_ack) + IEEE80211_CRC_LEN, + ack_rate, 0); + + hdr->txh_fb_duration = htole16(dur); + mac_ctrl |= BWI_TXH_MAC_C_ACK; + } + + hdr->txh_id = __SHIFTIN(BWI_TX_DATA_RING, BWI_TXH_ID_RING_MASK) | + __SHIFTIN(idx, BWI_TXH_ID_IDX_MASK); + + bwi_plcp_header(hdr->txh_plcp, pkt_len, rate); + bwi_plcp_header(hdr->txh_fb_plcp, pkt_len, rate_fb); + + phy_ctrl = __SHIFTIN(mac->mac_rf.rf_ant_mode, + BWI_TXH_PHY_C_ANTMODE_MASK); + if (ieee80211_rate2modtype(rate) == IEEE80211_MODTYPE_OFDM) { + phy_ctrl |= BWI_TXH_PHY_C_OFDM; + mac_ctrl |= BWI_TXH_MAC_C_FB_OFDM; + } else if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) + phy_ctrl |= BWI_TXH_PHY_C_SHPREAMBLE; + + hdr->txh_mac_ctrl = htole32(mac_ctrl); + hdr->txh_phy_ctrl = htole16(phy_ctrl); + + /* Catch any further usage */ + hdr = NULL; + wh = NULL; + + /* DMA load */ + error = bus_dmamap_load_mbuf(sc->sc_buf_dtag, tb->tb_dmap, m, + bwi_dma_buf_addr, &paddr, BUS_DMA_NOWAIT); + if (error != 0) { + struct mbuf *m_new; + + if (error != EFBIG) { + if_printf(ic->ic_ifp, + "%s: can't load TX buffer (1) %d\n", + __func__, error); + goto back; + } + m_new = m_defrag(m, M_DONTWAIT); + if (m_new == NULL) { + if_printf(ic->ic_ifp, "%s: can't defrag TX buffer\n", + __func__); + error = ENOBUFS; + goto back; + } + m = m_new; + error = bus_dmamap_load_mbuf(sc->sc_buf_dtag, tb->tb_dmap, m, + bwi_dma_buf_addr, &paddr, + BUS_DMA_NOWAIT); + if (error) { + if_printf(ic->ic_ifp, + "%s: can't load TX buffer (2) %d\n", + __func__, error); + goto back; + } + } + + bus_dmamap_sync(sc->sc_buf_dtag, tb->tb_dmap, BUS_DMASYNC_PREWRITE); + + tb->tb_mbuf = m; + tb->tb_ni = ni; + + DPRINTF(sc, BWI_DBG_TX, "idx %d, pkt_len %d, buflen %d\n", + idx, pkt_len, m->m_pkthdr.len); + + /* Setup TX descriptor */ + sc->sc_setup_txdesc(sc, rd, idx, paddr, m->m_pkthdr.len); + bus_dmamap_sync(sc->sc_txring_dtag, rd->rdata_dmap, + BUS_DMASYNC_PREWRITE); + + /* Kick start */ + sc->sc_start_tx(sc, rd->rdata_txrx_ctrl, idx); +back: + if (error) + m_freem(m); + return error; +} + static void bwi_start_tx32(struct bwi_softc *sc, uint32_t tx_ctrl, int idx) { From owner-p4-projects@FreeBSD.ORG Wed Feb 20 14:10:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4D5116A47C; Wed, 20 Feb 2008 14:10:49 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 602F616A475 for ; Wed, 20 Feb 2008 14:10:49 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A43D13C50E for ; Wed, 20 Feb 2008 14:10:49 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KEAndf050321 for ; Wed, 20 Feb 2008 14:10:49 GMT (envelope-from sephe@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KEAnmE050318 for perforce@freebsd.org; Wed, 20 Feb 2008 14:10:49 GMT (envelope-from sephe@FreeBSD.org) Date: Wed, 20 Feb 2008 14:10:49 GMT Message-Id: <200802201410.m1KEAnmE050318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau To: Perforce Change Reviews Cc: Subject: PERFORCE change 135790 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 14:10:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135790 Change 135790 by sephe@sephe_zealot:sam_wifi on 2008/02/20 14:10:14 Make firmware autoloading work. Discussed with: sam kevlo mlaier Affected files ... .. //depot/projects/wifi/sys/dev/bwi/bwimac.c#8 edit .. //depot/projects/wifi/sys/dev/bwi/if_bwivar.h#13 edit .. //depot/projects/wifi/sys/modules/bwifw/Makefile#4 edit Differences ... ==== //depot/projects/wifi/sys/dev/bwi/bwimac.c#8 (text+ko) ==== @@ -882,6 +882,20 @@ char fwname[64]; int idx; + /* + * Try getting the firmware stub so firmware + * module would be loaded automatically + */ + if (mac->mac_stub == NULL) { + snprintf(fwname, sizeof(fwname), BWI_FW_STUB_PATH, + sc->sc_fw_version); + mac->mac_stub = firmware_get(fwname); + if (mac->mac_stub == NULL) { + if_printf(ifp, "request firmware %s failed\n", fwname); + return ENOMEM; + } + } + if (mac->mac_ucode == NULL) { snprintf(fwname, sizeof(fwname), BWI_FW_UCODE_PATH, sc->sc_fw_version, @@ -987,6 +1001,11 @@ firmware_put(mac->mac_iv_ext, FIRMWARE_UNLOAD); mac->mac_iv_ext = NULL; } + + if (mac->mac_stub != NULL) { + firmware_put(mac->mac_stub, FIRMWARE_UNLOAD); + mac->mac_stub = NULL; + } } static int ==== //depot/projects/wifi/sys/dev/bwi/if_bwivar.h#13 (text+ko) ==== @@ -292,6 +292,7 @@ #define BWI_FW_VERSION3_REVMAX 0x128 #define BWI_FW_PATH "bwi_v%d_" +#define BWI_FW_STUB_PATH BWI_FW_PATH "ucode" #define BWI_FW_UCODE_PATH BWI_FW_PATH "ucode%d" #define BWI_FW_PCM_PATH BWI_FW_PATH "pcm%d" #define BWI_FW_IV_PATH BWI_FW_PATH "b0g0initvals%d" @@ -463,6 +464,7 @@ struct bwi_tpctl mac_tpctl; /* TX power control */ uint32_t mac_flags; /* BWI_MAC_F_ */ + const struct firmware *mac_stub; const struct firmware *mac_ucode; const struct firmware *mac_pcm; const struct firmware *mac_iv; ==== //depot/projects/wifi/sys/modules/bwifw/Makefile#4 (text+ko) ==== @@ -2,8 +2,9 @@ .PATH: ${.CURDIR}/../../contrib/dev/bwi +FWNAME= bwi_v3 FWFILE= wl_apsta-3.130.20.0.o -_FWIMGS=ucode11 ucode2 ucode4 ucode5 \ +_FWIMGS=ucode ucode11 ucode2 ucode4 ucode5 \ a0g0bsinitvals2 a0g0bsinitvals5 a0g0initvals2 \ a0g0initvals5 a0g1bsinitvals5 a0g1initvals5 \ b0g0bsinitvals2 b0g0bsinitvals5 b0g0initvals2 b0g0initvals5 \ @@ -14,14 +15,14 @@ SUBDIR= fwcutter FWCUTTER= fwcutter/b43-fwcutter -KMOD= bwi_v3 -FIRMWS= ${_FWIMGS:C/.*/&.fw:${KMOD}_&/} +KMOD= ${FWNAME}_ucode +FIRMWS= ${_FWIMGS:C/.*/&.fw:${FWNAME}_&/} -bwi_v3: ${FWIMGS} +${FWNAME}: ${FWIMGS} # NB: the cutter has v3/v4 pathname prefixes built-in; yech ${FWIMGS}: ${FWCUTTER} ${FWFILE} - ln -sf . v3; ${FWCUTTER} -w . ${FWFILE}; rm v3 + ln -sf . v3; ${FWCUTTER} -w . ${FWFILE}; rm v3; touch ucode.fw ${FWCUTTER}: fwcutter From owner-p4-projects@FreeBSD.ORG Wed Feb 20 14:51:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2C8316A405; Wed, 20 Feb 2008 14:51:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B89CA16A404 for ; Wed, 20 Feb 2008 14:51:31 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A256813C4D3 for ; Wed, 20 Feb 2008 14:51:31 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KEpVQ0052897 for ; Wed, 20 Feb 2008 14:51:31 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KEpVkl052894 for perforce@freebsd.org; Wed, 20 Feb 2008 14:51:31 GMT (envelope-from raj@freebsd.org) Date: Wed, 20 Feb 2008 14:51:31 GMT Message-Id: <200802201451.m1KEpVkl052894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135792 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 14:51:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=135792 Change 135792 by raj@raj_mimi on 2008/02/20 14:50:58 o Don't switch to own stack. We should be fine on U-Boot's original one; this also helps safely return to the caller when something goes wrong in loader's early main() routine. o Eliminate WITH_UBOOT leftover. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#8 edit .. //depot/projects/e500/tools/build/options/WITH_UBOOT#2 delete Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#8 (text+ko) ==== @@ -28,18 +28,12 @@ #include -#define STACK_SIZE 8192 - /* * Entry point to the loader that U-Boot passes control to. */ .text .globl _start _start: - /* Fix up a stack */ - lis %r1, stack@ha - addi %r1, %r1, stack@l - addi %r1, %r1, (STACK_SIZE - 32) /* Hint where to look for the API signature */ lis %r11, uboot_address@ha addi %r11, %r11, uboot_address@l @@ -62,7 +56,7 @@ mflr %r0 stw %r14, 8(%r1) stw %r0, 20(%r1) - /* Restore U-Boot's r14 and r29 */ + /* Restore U-Boot's r14 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l lwz %r14, 0(%r11) @@ -70,7 +64,7 @@ mfmsr %r11 ori %r11, %r11, 0x8000@l mtmsr %r11 - /* Call into u-Boot */ + /* Call into U-Boot */ lis %r11, syscall_ptr@ha addi %r11, %r11, syscall_ptr@l lwz %r11, 0(%r11) @@ -92,10 +86,6 @@ * Data section */ .data - .align 4 -stack: - .space STACK_SIZE - GLOBAL(syscall_ptr) .long 0 GLOBAL(saved_regs) From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:54:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C25B16A418; Wed, 20 Feb 2008 15:54:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1BC916A411 for ; Wed, 20 Feb 2008 15:54:37 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B844413C4CE for ; Wed, 20 Feb 2008 15:54:37 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFsbJG057432 for ; Wed, 20 Feb 2008 15:54:37 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFsbtW057429 for perforce@freebsd.org; Wed, 20 Feb 2008 15:54:37 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:54:37 GMT Message-Id: <200802201554.m1KFsbtW057429@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135796 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:54:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=135796 Change 135796 by rrs@rrs-mips2-jnpr on 2008/02/20 15:54:00 adds new addr demark for large memory systems. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#10 (text+ko) ==== @@ -55,7 +55,7 @@ #define MIPS_MAX_MEM_ADDR 0xbe000000 #define MIPS_RESERVED_ADDR 0xbfc80000 - +#define MIPS_KSEG0_LARGEST_PHYS 0x20000000 #define MIPS_CACHED_TO_PHYS(x) ((unsigned)(x) & 0x1fffffff) #define MIPS_PHYS_TO_CACHED(x) ((unsigned)(x) | MIPS_CACHED_MEMORY_ADDR) #define MIPS_UNCACHED_TO_PHYS(x) ((unsigned)(x) & 0x1fffffff) From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:54:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 963C116A509; Wed, 20 Feb 2008 15:54:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 096B816A412 for ; Wed, 20 Feb 2008 15:54:38 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DBFD213C4DB for ; Wed, 20 Feb 2008 15:54:37 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFsbIA057438 for ; Wed, 20 Feb 2008 15:54:37 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFsbHl057435 for perforce@freebsd.org; Wed, 20 Feb 2008 15:54:37 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:54:37 GMT Message-Id: <200802201554.m1KFsbHl057435@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135797 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:54:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=135797 Change 135797 by rrs@rrs-mips2-jnpr on 2008/02/20 15:54:28 adds new func in front for the debugger. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#9 (text+ko) ==== @@ -125,6 +125,12 @@ #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) #define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx) +#define PMAP_LGMEM_LOCK_INIT(sysmap) mtx_init(&(sysmap)->lock, "pmap-lgmem", \ + "per-cpu-map", (MTX_DEF| MTX_DUPOK)) +#define PMAP_LGMEM_LOCK(sysmap) mtx_lock(&(sysmap)->lock) +#define PMAP_LGMEM_UNLOCK(sysmap) mtx_unlock(&(sysmap)->lock) +#define PMAP_LGMEM_DESTROY(sysmap) mtx_destroy(&(sysmap)->lock) + #endif /* _KERNEL */ /* @@ -181,6 +187,7 @@ /* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa); /* PMAP_INLINE */ void pmap_kremove(vm_offset_t va); void * pmap_kenter_temporary(vm_paddr_t pa, int i); +void pmap_kenter_temporary_free(vm_paddr_t pa); int pmap_compute_pages_to_dump(void); void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:55:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 30F7C16A559; Wed, 20 Feb 2008 15:55:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCBB516A49C for ; Wed, 20 Feb 2008 15:55:39 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD6C13C4EC for ; Wed, 20 Feb 2008 15:55:39 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFtd0U057564 for ; Wed, 20 Feb 2008 15:55:39 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFtcHO057561 for perforce@freebsd.org; Wed, 20 Feb 2008 15:55:38 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:55:38 GMT Message-Id: <200802201555.m1KFtcHO057561@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135798 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:55:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=135798 Change 135798 by rrs@rrs-mips2-jnpr on 2008/02/20 15:55:18 update for large memory systems.. still have some prints that need to come out. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#19 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#19 (text+ko) ==== @@ -193,6 +193,24 @@ static void pmap_update_page_action(void *arg); #endif +struct local_sysmaps { + struct mtx lock; + pt_entry_t CMAP1; + pt_entry_t CMAP2; + caddr_t CADDR1; + caddr_t CADDR2; + uint16_t valid1, valid2; +}; + +/* This structure is for large memory + * above 512Meg. We can't (in 32 bit mode) + * just use the direct mapped MIPS_CACHED_TO_PHYS() + * macros since we can't see the memory and must + * map it in when we need to access it. In 64 + * bit mode this goes away. + */ +static struct local_sysmaps sysmap_lmem[MAXCPU]; +caddr_t virtual_sys_start = (caddr_t)0; pd_entry_t pmap_segmap(pmap_t pmap, vm_offset_t va) @@ -248,7 +266,9 @@ pa = phys_avail[0]; phys_avail[0] += size; - + if (pa >= MIPS_KSEG0_LARGEST_PHYS) { + panic("Out of memory below 512Meg?"); + } va = MIPS_PHYS_TO_CACHED(pa); bzero((caddr_t) va, size); return va; @@ -264,15 +284,20 @@ pt_entry_t *pgtab; pt_entry_t *pte; int i, j; + int memory_larger_than_512meg = 0; /* Sort. */ again: for (i = 0; phys_avail[i + 1] != 0; i += 2) { + if(phys_avail[i+1] >= MIPS_KSEG0_LARGEST_PHYS) { + memory_larger_than_512meg++; + } if (i < 2) continue; if (phys_avail[i - 2] > phys_avail[i]) { vm_paddr_t ptemp[2]; + ptemp[0] = phys_avail[i+0]; ptemp[1] = phys_avail[i+1]; @@ -310,6 +335,31 @@ */ kstack0 = pmap_steal_memory(KSTACK_PAGES << PAGE_SHIFT); + + virtual_avail = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET; + virtual_end = VM_MAX_KERNEL_ADDRESS; + + /* Steal some virtual space that will not be in + * kernel_segmap. This va memory space will be used to + * map in kernel pages that are outside the 512Meg + * region. Note that we only do this steal when we + * do have memory in this region, that way for + * systems with smaller memory we don't "steal" + * any va ranges :-) + */ + if (memory_larger_than_512meg) { + for ( i=0; i< MAXCPU; i++) { + sysmap_lmem[i].CMAP1 = PG_G; + sysmap_lmem[i].CMAP2 = PG_G; + sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; + virtual_avail += PAGE_SIZE; + sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; + virtual_avail += PAGE_SIZE; + sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; + PMAP_LGMEM_LOCK_INIT(&sysmap_lmem[i]); + } + } + virtual_sys_start = (caddr_t)virtual_avail; /* * Allocate segment table for the kernel */ @@ -318,7 +368,23 @@ /* * Allocate second level page tables for the kernel */ - pgtab = (pt_entry_t *) pmap_steal_memory(PAGE_SIZE*NKPT); + nkpt = NKPT; + if (memory_larger_than_512meg) { + /* If we have a large memory system + * we CANNOT afford to hit pmap_growkernel() and allocate memory. Since + * we MAY end up with a page that is NOT mappable. For + * that reason we up front grab more. Normall NKPT is 120 (YMMV see pmap.h) + * this gives us 480meg of kernel virtual addresses at the + * cost of 120 pages (each page gets us 4 Meg). Since + * the kernel starts at virtual_avail, we can use this to + * calculate how many entris are left from there to the end + * of the segmap, we want to allocate all of it, which would + * be somewhere above 0xC0000000 - 0xFFFFFFFF which results in + * about 256 entries or so instead of the 120. + */ + nkpt = (PAGE_SIZE/sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT); + } + pgtab = (pt_entry_t *) pmap_steal_memory(PAGE_SIZE*nkpt); /* * The R[4-7]?00 stores only one copy of the Global bit in the @@ -327,17 +393,18 @@ * when Entry LO and Entry HI G bits are anded together * they will produce a global bit to store in the tlb. */ - for (i = 0, pte = pgtab; i < (NKPT * NPTEPG); i++, pte++) + for (i = 0, pte = pgtab; i < (nkpt * NPTEPG); i++, pte++) *pte = PG_G; - virtual_avail = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET; - virtual_end = VM_MAX_KERNEL_ADDRESS; - + printf("Va=0x%x Ve=%x\n", virtual_avail, virtual_end); /* * The segment table contains the KVA of the pages in the * second level page table. */ - for (i = 0, j = (virtual_avail >> SEGSHIFT); i < NKPT; i++, j++) + printf("init kernel_segmap va >> = %d nkpt:%d\n", + (virtual_avail >> SEGSHIFT), + nkpt); + for (i = 0, j = (virtual_avail >> SEGSHIFT); i < nkpt; i++, j++) kernel_segmap[j] = (pd_entry_t)(pgtab + (i * NPTEPG)); avail_start = phys_avail[0]; @@ -356,8 +423,9 @@ kernel_pmap->pm_segtab = kernel_segmap; kernel_pmap->pm_active = ~0; TAILQ_INIT(&kernel_pmap->pm_pvlist); - nkpt = NKPT; - + printf("avail_start:0x%x avail_end:0x%x\n", + avail_start, avail_end); + kernel_pmap->pm_asid[PCPU_GET(cpuid)].asid = PMAP_ASID_RESERVED; kernel_pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; pmap_max_asid = VMNUM_PIDS; @@ -672,7 +740,8 @@ vm_offset_t va, sva; va = sva = *virt; - + printf("pmap_map: enters virt:0x%x start:%x end:0x%x prot:0x%x\n", + *virt, start, end, prot); while (start < end) { pmap_kenter(va, start); va += PAGE_SIZE; @@ -1214,6 +1283,17 @@ nkpt++; ptppaddr = VM_PAGE_TO_PHYS(nkpg); + if (ptppaddr >= MIPS_KSEG0_LARGEST_PHYS) { + /* We need to do something here, but I am not + * sure what. We can access anything in the + * 0 - 512Meg region, but if we get a page to + * go in the kernel segmap that is outside of + * of that we really need to have another mapping + * beyond the temporary ones I have. Not sure + * how to do this yet. FIXME FIXME. + */ + panic("Gak, can't handle a k-page table outside of lower 512Meg"); + } pte = (pt_entry_t *) MIPS_PHYS_TO_CACHED(ptppaddr); segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t) pte; @@ -1958,9 +2038,38 @@ TRUE); } else #endif - va = MIPS_PHYS_TO_CACHED(pa); + if (pa < MIPS_KSEG0_LARGEST_PHYS) { + va = MIPS_PHYS_TO_CACHED(pa); + } else { + int cpu; + struct local_sysmaps *sysm; + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + /* Since this is for the debugger, no locks or any other fun */ + sysm->CMAP1 = mips_paddr_to_tlbpfn(pa) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + sysm->valid1 = 1; + va = (vm_offset_t)sysm->CADDR1; + } + return((void *)va); +} - return((void *)va); +void +pmap_kenter_temporary_free(vm_paddr_t pa) +{ + int cpu; + struct local_sysmaps *sysm; + if (pa < MIPS_KSEG0_LARGEST_PHYS) { + /* nothing to do for this case */ + return; + } + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + if (sysm->valid1) { + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + } } /* @@ -2064,7 +2173,7 @@ { vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - + printf("pmap_zero_page:phys is %x\n", phys); #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { struct fpage *fp1; @@ -2085,9 +2194,27 @@ */ } else #endif - { + if(phys < MIPS_KSEG0_LARGEST_PHYS){ + va = MIPS_PHYS_TO_CACHED(phys); + bzero((caddr_t) va, PAGE_SIZE); + } else { + int cpu; + struct local_sysmaps *sysm; + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + PMAP_LGMEM_LOCK(sysm); + sched_pin(); + sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + sysm->valid1 = 1; + bzero(sysm->CADDR1, PAGE_SIZE); + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + sched_unpin(); + PMAP_LGMEM_UNLOCK(sysm); } } @@ -2122,9 +2249,25 @@ mtx_unlock(&sysmaps->lock); } else #endif - { + if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_CACHED(phys); bzero((char *)(caddr_t)va + off, size); + } else { + int cpu; + struct local_sysmaps *sysm; + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + PMAP_LGMEM_LOCK(sysm); + sched_pin(); + sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + sysm->valid1 = 1; + bzero((char *)sysm->CADDR1 + off, size); + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + sched_unpin(); + PMAP_LGMEM_UNLOCK(sysm); } } @@ -2143,9 +2286,25 @@ sched_unpin(); } else #endif - { + if (phys < MIPS_KSEG0_LARGEST_PHYS) { va = MIPS_PHYS_TO_CACHED(phys); bzero((caddr_t) va, PAGE_SIZE); + } else { + int cpu; + struct local_sysmaps *sysm; + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + PMAP_LGMEM_LOCK(sysm); + sched_pin(); + sysm->CMAP1 = mips_paddr_to_tlbpfn(phys) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + sysm->valid1 = 1; + bzero(sysm->CADDR1, PAGE_SIZE); + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + sched_unpin(); + PMAP_LGMEM_UNLOCK(sysm); } } @@ -2192,9 +2351,56 @@ } else #endif { + if ((phy_src < MIPS_KSEG0_LARGEST_PHYS) && (phy_dst < MIPS_KSEG0_LARGEST_PHYS)) { + /* easy case, all can be accessed via KSEG0 */ va_src = MIPS_PHYS_TO_CACHED(phy_src); va_dst = MIPS_PHYS_TO_CACHED(phy_dst); bcopy((caddr_t) va_src, (caddr_t) va_dst, PAGE_SIZE); + } else { + int cpu; + struct local_sysmaps *sysm; + cpu = PCPU_GET(cpuid); + sysm = &sysmap_lmem[cpu]; + PMAP_LGMEM_LOCK(sysm); + sched_pin(); + if(phy_src < MIPS_KSEG0_LARGEST_PHYS) { + /* one side needs mapping - dest */ + va_src = MIPS_PHYS_TO_CACHED(phy_src); + sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); + sysm->valid2 = 2; + va_dst = (vm_offset_t)sysm->CADDR2; + } else if(phy_dst < MIPS_KSEG0_LARGEST_PHYS) { + /* one side needs mapping - src */ + va_dst = MIPS_PHYS_TO_CACHED(phy_dst); + sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + va_src = (vm_offset_t)sysm->CADDR1; + sysm->valid1 = 1; + } else { + /* all need mapping */ + sysm->CMAP1 = mips_paddr_to_tlbpfn(phy_src) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + sysm->CMAP2 = mips_paddr_to_tlbpfn(phy_dst) | PG_RW | PG_V | PG_G | PG_W | PG_CACHE; + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR1, sysm->CMAP1); + pmap_TLB_update_kernel((vm_offset_t)sysm->CADDR2, sysm->CMAP2); + sysm->valid1 = sysm->valid2 = 1; + va_src = (vm_offset_t)sysm->CADDR1; + va_dst = (vm_offset_t)sysm->CADDR2; + } + bcopy((void *)va_src, (void *)va_dst, PAGE_SIZE); + if (sysm->valid1) { + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR1); + sysm->CMAP1 = 0; + sysm->valid1 = 0; + } + if (sysm->valid2) { + pmap_TLB_invalidate_kernel((vm_offset_t)sysm->CADDR2); + sysm->CMAP2 = 0; + sysm->valid2 = 0; + } + sched_unpin(); + PMAP_LGMEM_UNLOCK(sysm); + } } } @@ -2571,6 +2777,11 @@ * routine is intended to be used for mapping device memory, * NOT real memory. */ + +/* + * Note I don't know if any of this will work if pa is above + * 512Meg. + */ void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { @@ -2970,10 +3181,31 @@ pt_entry_t *ptep; if (kernel_pmap) { + if(va >= (vm_offset_t)virtual_sys_start) { + /* Its inside the virtual address range */ ptep = pmap_pte(kernel_pmap, va); if (ptep) pa = mips_tlbpfn_to_paddr(*ptep) | - (va & PAGE_MASK); + (va & PAGE_MASK); + } else { + int i; + /* its inside the special mapping area, + * I don't think this should happen, but if it does + * I want it toa all work right :-) + * Note if it does happen, we assume the caller has the + * lock? FIXME, this needs to be checked FIXEM - RRS. + */ + for(i=0; i Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E768916A508; Wed, 20 Feb 2008 15:56:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A60DE16A504 for ; Wed, 20 Feb 2008 15:56:40 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8395513C448 for ; Wed, 20 Feb 2008 15:56:40 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFueZr057630 for ; Wed, 20 Feb 2008 15:56:40 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFueZ6057627 for perforce@freebsd.org; Wed, 20 Feb 2008 15:56:40 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:56:40 GMT Message-Id: <200802201556.m1KFueZ6057627@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135799 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:56:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135799 Change 135799 by rrs@rrs-mips2-jnpr on 2008/02/20 15:55:45 comments for future readers. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/dump_machdep.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/dump_machdep.c#2 (text+ko) ==== @@ -27,3 +27,9 @@ #include __FBSDID("$FreeBSD$"); + +/* Note to writer, when using pmap_kenter_temporary() you must, + * after using the va to write out the page, call + * pmap_kenter_temporary_free(). You should probably also + * pin the dump thread to the CPU with sched_pin(). + */ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:57:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7168A16A408; Wed, 20 Feb 2008 15:57:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 346E016A404 for ; Wed, 20 Feb 2008 15:57:42 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D9FA113C4EA for ; Wed, 20 Feb 2008 15:57:41 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFvfMr057685 for ; Wed, 20 Feb 2008 15:57:41 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFvfUt057682 for perforce@freebsd.org; Wed, 20 Feb 2008 15:57:41 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:57:41 GMT Message-Id: <200802201557.m1KFvfUt057682@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135800 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:57:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135800 Change 135800 by rrs@rrs-mips2-jnpr on 2008/02/20 15:57:28 change uart display Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#5 (text+ko) ==== @@ -656,10 +656,8 @@ #define OCTEON_VISUAL_UART 1 #ifdef OCTEON_VISUAL_UART - static int where1 = 0; - if (ipend) - octeon_led_run_wheel(&where1, 6 + device_get_unit(sc->sc_dev)); + octeon_led_run_wheel(); #endif return ((sc->sc_leaving) ? 0 : ipend); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:58:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 758CB16A41A; Wed, 20 Feb 2008 15:58:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34CD916A409 for ; Wed, 20 Feb 2008 15:58:43 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 18EF613C4CC for ; Wed, 20 Feb 2008 15:58:43 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFwg1T057736 for ; Wed, 20 Feb 2008 15:58:42 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFwgIW057733 for perforce@freebsd.org; Wed, 20 Feb 2008 15:58:42 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:58:42 GMT Message-Id: <200802201558.m1KFwgIW057733@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135801 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:58:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=135801 Change 135801 by rrs@rrs-mips2-jnpr on 2008/02/20 15:58:03 Change in signature to support FreeBSD! display Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_pcmap_regs.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_pcmap_regs.h#3 (text+ko) ==== @@ -892,7 +892,7 @@ extern void octeon_wait_uart_flush(int uart_index, uint8_t ch); extern void octeon_uart_write_byte0(uint8_t ch); extern void octeon_led_write_char0(char val); -extern void octeon_led_run_wheel(int *pos, int led_position); +extern void octeon_led_run_wheel(void); extern void octeon_debug_symbol(void); extern void mips_disable_interrupt_controls(void); extern uint32_t octeon_cpu_clock; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 15:59:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B7B1F16A407; Wed, 20 Feb 2008 15:59:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0AA16A400 for ; Wed, 20 Feb 2008 15:59:44 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 645A913C459 for ; Wed, 20 Feb 2008 15:59:44 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KFxiWb057767 for ; Wed, 20 Feb 2008 15:59:44 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KFxiW4057764 for perforce@freebsd.org; Wed, 20 Feb 2008 15:59:44 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 15:59:44 GMT Message-Id: <200802201559.m1KFxiW4057764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135802 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 15:59:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135802 Change 135802 by rrs@rrs-mips2-jnpr on 2008/02/20 15:58:51 still need to remove prints and cleanup.. but real memory now used in octeon_board_real() case. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#10 (text+ko) ==== @@ -296,15 +296,25 @@ } } -static char progress[8] = { '-', '/', '|', '\\', '-', '/', '|', '\\'}; +static char progress[8] = { 'F', 'R', 'E', 'E', 'B', 'S', 'D', '!'}; + +int prog_count=0; -void octeon_led_run_wheel (/*int count, */int *prog_count, int led_position) +void octeon_led_run_wheel (void) { if (!octeon_board_real()) return; - octeon_led_write_char(led_position, progress[*prog_count]); - *prog_count += 1; - *prog_count &= 0x7; + if(prog_count > 7) { + int i; + /* blank display and reset */ + prog_count = 0; + for(i=0; i<8; i++) { + octeon_led_write_char(i, ' '); + } + } else { + octeon_led_write_char(prog_count, progress[prog_count]); + prog_count += 1; + } } #define LSR_DATAREADY 0x01 /* Data ready */ @@ -789,7 +799,7 @@ #define OCTEON_CURRENT_DESC_VERSION 6 #define OCTEON_ARGV_MAX_ARGS (64) -#define OCTOEN_SERIAL_LEN 20 +#define OCTEON_SERIAL_LEN 20 typedef struct { @@ -823,7 +833,7 @@ uint16_t chip_type; uint8_t chip_rev_major; uint8_t chip_rev_minor; - char board_serial_number[OCTOEN_SERIAL_LEN]; + char board_serial_number[OCTEON_SERIAL_LEN]; uint8_t mac_addr_base[6]; uint8_t mac_addr_count; uint64_t cvmx_desc_vaddr; @@ -857,7 +867,7 @@ uint16_t chip_type; uint8_t chip_rev_major; uint8_t chip_rev_minor; - char board_serial_number[OCTOEN_SERIAL_LEN]; + char board_serial_number[OCTEON_SERIAL_LEN]; uint8_t mac_addr_base[6]; uint8_t mac_addr_count; #if (CVMX_BOOTINFO_MIN_VER >= 1) @@ -888,7 +898,7 @@ } cvmx_bootinfo_t; uint32_t octeon_cpu_clock; -uint64_t octeon_dram; +uint64_t octeon_dram=0; uint32_t octeon_bd_ver = 0, octeon_cvmx_bd_ver = 0, octeon_board_rev_major, octeon_board_rev_minor, octeon_board_type; uint8_t octeon_mac_addr[6] = { 0 }; int octeon_core_mask, octeon_mac_addr_count; @@ -1029,7 +1039,8 @@ int descriptor_not_parsed = 1; if ((app_descriptor_addr == 0) || (app_descriptor_addr >= 0xAfffffff)) { - + printf("address of app_descriptor is %x\n", + app_descriptor_addr); } else { app_desc_ptr = (octeon_boot_descriptor_t *) app_descriptor_addr; @@ -1059,6 +1070,7 @@ printf(" Mac Address %02X.%02X.%02X.%02X.%02X.%02X\n", octeon_mac_addr[0], octeon_mac_addr[1], octeon_mac_addr[2], octeon_mac_addr[3], octeon_mac_addr[4], octeon_mac_addr[5]); + printf("config flags:0x%x\n",cvmx_config_flags); } #define CVMX_BOOTINFO_CFG_FLAG_PCI_HOST (1ull << 0) @@ -1108,14 +1120,15 @@ extern int *end; extern void _start(void); -extern int Maxmem; +/*extern int Maxmem;*/ static void mips_init(void) { - int i; + u_int64_t cvm_mem_ctl; - + uint32_t realmem_bytes; + printf("entry: mips_init()\n"); bootverbose = 0; @@ -1139,51 +1152,64 @@ printf("mips_rd_ebase %x\n", mips_rd_ebase()); printf("mips_rd_config %x\n", mips_rd_config()); - int realmem_bytes; /* XXX: Override. Temporary hard-code */ - realmem_bytes = (((octeon_board_real())?256:96) << 20); - /* phys_avail regions are in bytes */ - phys_avail[0] = (MIPS_KSEG0_TO_PHYS((vm_offset_t)&end) + PAGE_SIZE) & ~(PAGE_SIZE - 1); - phys_avail[1] = realmem_bytes - 64 - 1; - phys_avail[2] = phys_avail[3] = 0; + if(octeon_board_real()) { + printf("octeon_dram == %llx\n", octeon_dram); + printf("reduced to ram: %u MB", (uint32_t)octeon_dram >> 20); -#ifdef MEM_EXTEND - + realmem_bytes = (octeon_dram - PAGE_SIZE); + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("Real memory bytes is %x\n", realmem_bytes); + } else { + /* Simulator we limit to 96 meg */ + realmem_bytes = (96 << 20); + } /* phys_avail regions are in bytes */ phys_avail[0] = (MIPS_KSEG0_TO_PHYS((vm_offset_t)&end) + PAGE_SIZE) & ~(PAGE_SIZE - 1); if (octeon_board_real()) { - phys_avail[1] = OCTEON_DRAM_FIRST_256_END; + if (realmem_bytes > OCTEON_DRAM_FIRST_256_END) + phys_avail[1] = OCTEON_DRAM_FIRST_256_END; + else + phys_avail[1] = realmem_bytes; + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + printf("phys_avail[0] = %x phys_avail[1] = %x\n", + phys_avail[0] , phys_avail[1]); } else { - phys_avail[1] = (96 << 20); + /* Simulator gets 96Meg period. */ + phys_avail[1] = (96 << 20); } - phys_avail[2] = phys_avail[3] = 0; - - realmem_bytes = (phys_avail[1] - phys_avail[0] + 1); - -#define DONT_USE_3RD_BANK 1 // This will enable use of mem above 512M mark. - -#ifndef DONT_USE_3RD_BANK - if (octeon_board_real()) { - phys_avail[2] = OCTEON_DRAM_ABOVE_512_START; - phys_avail[3] = OCTEON_DRAM_ABOVE_512_START + (128 * 1024 * 1024) - 1; - phys_avail[4] = phys_avail[5] = 0; - realmem_bytes += (128 * 1024 * 1024); - } - -#endif /* DONT_USE_3RD_BANK */ - -#endif /* MEM_EXTEND */ - - - realmem = btoc(realmem_bytes); - - for (i=0; i<10; i+=2) { - if (phys_avail[i]) - physmem += btoc(phys_avail[i+1] - phys_avail[i]); - else - break; + /*- + * Octeon Memory looks as follows: + * PA + * 0000 0000 to 0x0 0000 0000 0000 + * 0FFF FFFF First 256 MB memory Maps to 0x0 0000 0FFF FFFF + * + * 1000 0000 to 0x1 0000 1000 0000 + * 1FFF FFFF Uncached Bu I/O space.converted to 0x1 0000 1FFF FFFF + * + * 2FFF FFFF to Cached 0x0 0000 2000 0000 + * FFFF FFFF all dram mem above the first 512M 0x3 FFFF FFFF FFFF + * + */ + physmem = btoc(phys_avail[1] - phys_avail[0]); + if ((octeon_board_real()) && + (realmem_bytes > OCTEON_DRAM_FIRST_256_END)){ + /* take out the upper non-cached 1/2 */ + realmem_bytes -= OCTEON_DRAM_FIRST_256_END; + realmem_bytes &= ~(PAGE_SIZE - 1); + /* Now map the rest of the memory */ + phys_avail[2] = 0x20000000; + printf("realmem_bytes is now at %x\n", realmem_bytes); + phys_avail[3] = ((uint32_t)0x20000000 + realmem_bytes); + printf("Next block of memory goes from %x to %x\n", + phys_avail[2], phys_avail[3]); + physmem += btoc(phys_avail[3] - phys_avail[2]); + } else { + printf("realmem_bytes is %d\n", realmem_bytes); } + realmem = physmem; printf("\nCode: _start 0x%X _end 0x%X", (uint32_t) (&_start), (uint32_t) (&end)); printf("\nTotal DRAM Size 0x%X", (uint32_t)octeon_dram); @@ -1200,7 +1226,6 @@ pmap_bootstrap(); mips_proc0_init(); mutex_init(); - #ifdef DDB kdb_init(); #endif From owner-p4-projects@FreeBSD.ORG Wed Feb 20 16:00:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DBD5F16A40E; Wed, 20 Feb 2008 16:00:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0E4416A40B for ; Wed, 20 Feb 2008 16:00:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8947413C4EE for ; Wed, 20 Feb 2008 16:00:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KG0j16057913 for ; Wed, 20 Feb 2008 16:00:45 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KG0jLL057910 for perforce@freebsd.org; Wed, 20 Feb 2008 16:00:45 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 16:00:45 GMT Message-Id: <200802201600.m1KG0jLL057910@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135803 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 16:00:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135803 Change 135803 by rrs@rrs-mips2-jnpr on 2008/02/20 15:59:50 Less output has packets come/in out Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#4 (text+ko) ==== @@ -583,11 +583,11 @@ #define ENABLE_BACK_PRESSURE 0 #define RGMX_MAX_PAK_RECEIVE 5000000 - +#ifdef __not_used__ static void octeon_dump_pow_stats(void); +#endif - #ifdef OCTEON_RGMX_SCHEDULED_ISRS @@ -794,19 +794,17 @@ void *data_start, *new_data_start; struct mbuf *mbuf; -#define DEBUG_RX_PKT_DUMP 1 #ifdef DEBUG_RX_PKT_DUMP - int i; + int i; u_char *dc; #endif data_start = octeon_pow_pktptr_to_kbuffer(work->packet_ptr); -#define DEBUG_RX2 #ifdef DEBUG_RX2 printf(" WQE 0x%p: port:%u ", work, port); - printf(" Grp: %u, %x Tag: %x type: %u 0x%x\n", + printf(" Grp: %u, %x Tag: %x type: %u 0x%x\n", work->grp, work->grp, work->tag, work->tag_type, work->tag_type); #endif @@ -912,8 +910,6 @@ #define OCTEON_VISUAL_RGMX 1 #ifdef OCTEON_VISUAL_RGMX -static int where0 = 0; -static int where1 = 0; #endif @@ -934,7 +930,7 @@ #ifdef OCTEON_VISUAL_RGMX - octeon_led_run_wheel(&where0, 3); + octeon_led_run_wheel(); #endif while (1) { @@ -951,7 +947,7 @@ break; } #ifdef OCTEON_VISUAL_RGMX - octeon_led_run_wheel(&where1, 4); + octeon_led_run_wheel(); #endif octeon_rgmx_rx_process_work(work, work->ipprt); @@ -1291,16 +1287,18 @@ /* * put the mbuf onto pending queue */ -#define DEBUG_TX_PKT_DUMP 1 + #ifdef DEBUG_TX_PKT_DUMP - int ii; - u_char *dc = out_buff; + { + int ii; + u_char *dc = out_buff; - printf("\n"); - printf("Out: "); - for (ii = 0; ii < len; ii++) - printf(" %X", dc[ii]); - printf("\n"); + printf("\n"); + printf("Out: "); + for (ii = 0; ii < len; ii++) + printf(" %X", dc[ii]); + printf("\n"); + } #endif IF_ENQUEUE(&sc->tx_pending_queue, m); @@ -2035,7 +2033,7 @@ } } #endif - +#ifdef _not_used_ static void octeon_dump_pow_stats(void) { @@ -2084,7 +2082,7 @@ printf(" Grp-%u: %u ", i, inpt_q_grp.bits.iq_cnt); } } - +#endif /* ------------------------------------------------------------------- * * octeon_line_status_loop() * @@ -2116,7 +2114,7 @@ /*octeon_dump_fpa_pool(OCTEON_FPA_WQE_RX_POOL);*/ /*octeon_dump_fpa_pool(OCTEON_FPA_TX_PACKET_POOL);*/ octeon_dump_rgmx_stats(16); - octeon_dump_pow_stats(); + /*octeon_dump_pow_stats();*/ } #endif } From owner-p4-projects@FreeBSD.ORG Wed Feb 20 16:22:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31DC816A407; Wed, 20 Feb 2008 16:22:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E897116A404 for ; Wed, 20 Feb 2008 16:22:07 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B80F313C45E for ; Wed, 20 Feb 2008 16:22:07 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KGM7pb060891 for ; Wed, 20 Feb 2008 16:22:07 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KGM76k060888 for perforce@freebsd.org; Wed, 20 Feb 2008 16:22:07 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 16:22:07 GMT Message-Id: <200802201622.m1KGM76k060888@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135805 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 16:22:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=135805 Change 135805 by rrs@rrs-mips2-jnpr on 2008/02/20 16:21:25 Kill an extraneous debug message. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#20 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#20 (text+ko) ==== @@ -2173,7 +2173,6 @@ { vm_offset_t va; vm_paddr_t phys = VM_PAGE_TO_PHYS(m); - printf("pmap_zero_page:phys is %x\n", phys); #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) { struct fpage *fp1; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 17:58:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C41D916A407; Wed, 20 Feb 2008 17:58:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B16A16A402 for ; Wed, 20 Feb 2008 17:58:48 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 485BF13C467 for ; Wed, 20 Feb 2008 17:58:48 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KHwmO9075606 for ; Wed, 20 Feb 2008 17:58:48 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KHwlof075603 for perforce@freebsd.org; Wed, 20 Feb 2008 17:58:47 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 17:58:47 GMT Message-Id: <200802201758.m1KHwlof075603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135807 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 17:58:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135807 Change 135807 by rrs@rrs-mips2-jnpr on 2008/02/20 17:58:30 S9 indent of file. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#10 (text+ko) ==== @@ -72,33 +72,34 @@ /* * Pmap stuff */ -struct pv_entry; +struct pv_entry; struct md_page { - int pv_list_count; - int pv_flags; - TAILQ_HEAD(,pv_entry) pv_list; + int pv_list_count; + int pv_flags; + TAILQ_HEAD(, pv_entry)pv_list; }; -#define PV_TABLE_MOD 0x01 /* modified */ -#define PV_TABLE_REF 0x02 /* referenced */ +#define PV_TABLE_MOD 0x01 /* modified */ +#define PV_TABLE_REF 0x02 /* referenced */ #define ASID_BITS 8 #define ASIDGEN_BITS (32 - ASID_BITS) #define ASIDGEN_MASK ((1 << ASIDGEN_BITS) - 1) struct pmap { - pd_entry_t *pm_segtab; /* KVA of segment table */ - TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */ - int pm_count; /* reference count */ - int pm_active; /* active on cpus */ + pd_entry_t *pm_segtab; /* KVA of segment table */ + TAILQ_HEAD(, pv_entry)pm_pvlist; /* list of mappings in + * pmap */ + int pm_count; /* reference count */ + int pm_active; /* active on cpus */ struct { - u_int32_t asid:ASID_BITS; /* TLB address space tag */ - u_int32_t gen:ASIDGEN_BITS; /* its generation number */ - } pm_asid[MAXSMPCPU]; - struct pmap_statistics pm_stats; /* pmap statistics */ - struct vm_page *pm_ptphint; /* pmap ptp hint */ - struct mtx pm_mtx; + u_int32_t asid:ASID_BITS; /* TLB address space tag */ + u_int32_t gen:ASIDGEN_BITS; /* its generation number */ + } pm_asid[MAXSMPCPU]; + struct pmap_statistics pm_stats; /* pmap statistics */ + struct vm_page *pm_ptphint; /* pmap ptp hint */ + struct mtx pm_mtx; }; typedef struct pmap *pmap_t; @@ -108,10 +109,10 @@ #include #include -pt_entry_t *pmap_pte(pmap_t, vm_offset_t); -pd_entry_t pmap_segmap(pmap_t pmap, vm_offset_t va); -vm_offset_t pmap_kextract(vm_offset_t va); -extern pmap_t kernel_pmap; +pt_entry_t *pmap_pte(pmap_t, vm_offset_t); +pd_entry_t pmap_segmap(pmap_t pmap, vm_offset_t va); +vm_offset_t pmap_kextract(vm_offset_t va); +extern pmap_t kernel_pmap; #define vtophys(va) pmap_kextract(((vm_offset_t) (va))) @@ -131,20 +132,20 @@ #define PMAP_LGMEM_UNLOCK(sysmap) mtx_unlock(&(sysmap)->lock) #define PMAP_LGMEM_DESTROY(sysmap) mtx_destroy(&(sysmap)->lock) -#endif /* _KERNEL */ +#endif /* _KERNEL */ /* * For each vm_page_t, there is a list of all currently valid virtual * mappings of that page. An entry is a pv_entry_t, the list is pv_table. */ typedef struct pv_entry { - pmap_t pv_pmap; /* pmap where mapping lies */ - vm_offset_t pv_va; /* virtual address for mapping */ - TAILQ_ENTRY(pv_entry) pv_list; - TAILQ_ENTRY(pv_entry) pv_plist; - vm_page_t pv_ptem; /* VM page for pte */ - boolean_t pv_wired; /* whether this entry is wired */ -} *pv_entry_t; + pmap_t pv_pmap; /* pmap where mapping lies */ + vm_offset_t pv_va; /* virtual address for mapping */ + TAILQ_ENTRY(pv_entry)pv_list; + TAILQ_ENTRY(pv_entry)pv_plist; + vm_page_t pv_ptem; /* VM page for pte */ + boolean_t pv_wired; /* whether this entry is wired */ +} *pv_entry_t; #ifdef _KERNEL @@ -164,7 +165,7 @@ extern vm_offset_t clean_eva; extern vm_offset_t clean_sva; extern vm_offset_t phys_avail[]; -extern char *ptvmmap; /* poor name! */ +extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; extern pd_entry_t *segbase; @@ -176,20 +177,20 @@ #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #define pmap_kernel() kernel_pmap -void pmap_bootstrap(void); -void *pmap_mapdev(vm_offset_t, vm_size_t); -void pmap_unmapdev(vm_offset_t, vm_size_t); +void pmap_bootstrap(void); +void *pmap_mapdev(vm_offset_t, vm_size_t); +void pmap_unmapdev(vm_offset_t, vm_size_t); vm_offset_t pmap_steal_memory(vm_size_t size); -void pmap_set_modified(vm_offset_t pa); -int page_is_managed(vm_offset_t pa); -void pmap_page_is_free(vm_page_t m); -void pmap_kushmem_reattach(struct proc *); -/* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa); -/* PMAP_INLINE */ void pmap_kremove(vm_offset_t va); -void * pmap_kenter_temporary(vm_paddr_t pa, int i); -void pmap_kenter_temporary_free(vm_paddr_t pa); -int pmap_compute_pages_to_dump(void); -void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); +void pmap_set_modified(vm_offset_t pa); +int page_is_managed(vm_offset_t pa); +void pmap_page_is_free(vm_page_t m); +void pmap_kushmem_reattach(struct proc *); + /* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa); + /* PMAP_INLINE */ void pmap_kremove(vm_offset_t va); +void *pmap_kenter_temporary(vm_paddr_t pa, int i); +void pmap_kenter_temporary_free(vm_paddr_t pa); +int pmap_compute_pages_to_dump(void); +void pmap_update_page(pmap_t pmap, vm_offset_t va, pt_entry_t pte); /* * floating virtual pages (FPAGES) @@ -200,15 +201,16 @@ #define FPAGES 2 #define FPAGES_SHARED 2 #define FSPACE ((FPAGES * MAXCPU + FPAGES_SHARED) * PAGE_SIZE) -#define PMAP_FPAGE1 0x00 /* Used by pmap_zero_page & pmap_copy_page */ +#define PMAP_FPAGE1 0x00 /* Used by pmap_zero_page & + * pmap_copy_page */ #define PMAP_FPAGE2 0x01 /* Used by pmap_copy_page */ #define PMAP_FPAGE3 0x00 /* Used by pmap_zero_page_idle */ #define PMAP_FPAGE_KENTER_TEMP 0x01 /* Used by coredump */ struct fpage { - vm_offset_t kva; - u_int state; + vm_offset_t kva; + u_int state; }; struct sysmaps { @@ -216,12 +218,13 @@ struct fpage fp[FPAGES]; }; -vm_offset_t pmap_map_fpage(vm_paddr_t pa, struct fpage *fp, - boolean_t check_unmaped); -void pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp); +vm_offset_t +pmap_map_fpage(vm_paddr_t pa, struct fpage *fp, + boolean_t check_unmaped); +void pmap_unmap_fpage(vm_paddr_t pa, struct fpage *fp); -#endif /* _KERNEL */ +#endif /* _KERNEL */ -#endif /* !LOCORE */ +#endif /* !LOCORE */ -#endif /* !_MACHINE_PMAP_H_ */ +#endif /* !_MACHINE_PMAP_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 17:59:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E128F16A406; Wed, 20 Feb 2008 17:59:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A52EA16A404 for ; Wed, 20 Feb 2008 17:59:49 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8B91613C44B for ; Wed, 20 Feb 2008 17:59:49 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KHxnSY075641 for ; Wed, 20 Feb 2008 17:59:49 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KHxnaI075638 for perforce@freebsd.org; Wed, 20 Feb 2008 17:59:49 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 17:59:49 GMT Message-Id: <200802201759.m1KHxnaI075638@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135808 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 17:59:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135808 Change 135808 by rrs@rrs-mips2-jnpr on 2008/02/20 17:59:08 s9indent. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#11 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#11 (text+ko) ==== @@ -349,25 +349,25 @@ * CPU identification, from PRID register. */ union cpuprid { - int cpuprid; + int cpuprid; struct { #if BYTE_ORDER == BIG_ENDIAN - u_int pad1:8; /* reserved */ - u_int cp_vendor:8; /* company identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_minrev:4; /* minor revision identifier */ + u_int pad1:8; /* reserved */ + u_int cp_vendor:8; /* company identifier */ + u_int cp_imp:8; /* implementation identifier */ + u_int cp_majrev:4; /* major revision identifier */ + u_int cp_minrev:4; /* minor revision identifier */ #else - u_int cp_minrev:4; /* minor revision identifier */ - u_int cp_majrev:4; /* major revision identifier */ - u_int cp_imp:8; /* implementation identifier */ - u_int cp_vendor:8; /* company identifier */ - u_int pad1:8; /* reserved */ + u_int cp_minrev:4; /* minor revision identifier */ + u_int cp_majrev:4; /* major revision identifier */ + u_int cp_imp:8; /* implementation identifier */ + u_int cp_vendor:8; /* company identifier */ + u_int pad1:8; /* reserved */ #endif - } cpu; + } cpu; }; -#endif /* !_LOCORE */ +#endif /* !_LOCORE */ /* * CTL_MACHDEP definitions. @@ -391,87 +391,88 @@ /* * MIPS CPU types (cp_imp). */ -#define MIPS_R2000 0x01 /* MIPS R2000 CPU ISA I */ -#define MIPS_R3000 0x02 /* MIPS R3000 CPU ISA I */ -#define MIPS_R6000 0x03 /* MIPS R6000 CPU ISA II */ -#define MIPS_R4000 0x04 /* MIPS R4000/4400 CPU ISA III */ -#define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivate ISA I */ -#define MIPS_R6000A 0x06 /* MIPS R6000A CPU ISA II */ -#define MIPS_R3IDT 0x07 /* IDT R3000 derivate ISA I */ -#define MIPS_R10000 0x09 /* MIPS R10000/T5 CPU ISA IV */ -#define MIPS_R4200 0x0a /* MIPS R4200 CPU (ICE) ISA III */ -#define MIPS_R4300 0x0b /* NEC VR4300 CPU ISA III */ -#define MIPS_R4100 0x0c /* NEC VR41xx CPU MIPS-16 ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R4700 0x21 /* QED R4700 Orion ISA III */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based CPU ISA I */ -#define MIPS_R5000 0x23 /* MIPS R5000 CPU ISA IV */ -#define MIPS_RM7000 0x27 /* QED RM7000 CPU ISA IV */ -#define MIPS_RM52X0 0x28 /* QED RM52X0 CPU ISA IV */ -#define MIPS_VR5400 0x54 /* NEC Vr5400 CPU ISA IV+ */ -#define MIPS_RM9000 0x34 /* E9000 CPU */ +#define MIPS_R2000 0x01 /* MIPS R2000 CPU ISA I */ +#define MIPS_R3000 0x02 /* MIPS R3000 CPU ISA I */ +#define MIPS_R6000 0x03 /* MIPS R6000 CPU ISA II */ +#define MIPS_R4000 0x04 /* MIPS R4000/4400 CPU ISA III */ +#define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivate ISA I */ +#define MIPS_R6000A 0x06 /* MIPS R6000A CPU ISA II */ +#define MIPS_R3IDT 0x07 /* IDT R3000 derivate ISA I */ +#define MIPS_R10000 0x09 /* MIPS R10000/T5 CPU ISA IV */ +#define MIPS_R4200 0x0a /* MIPS R4200 CPU (ICE) ISA III */ +#define MIPS_R4300 0x0b /* NEC VR4300 CPU ISA III */ +#define MIPS_R4100 0x0c /* NEC VR41xx CPU MIPS-16 ISA III */ +#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ +#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ +#define MIPS_R4700 0x21 /* QED R4700 Orion ISA III */ +#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based CPU ISA I */ +#define MIPS_R5000 0x23 /* MIPS R5000 CPU ISA IV */ +#define MIPS_RM7000 0x27 /* QED RM7000 CPU ISA IV */ +#define MIPS_RM52X0 0x28 /* QED RM52X0 CPU ISA IV */ +#define MIPS_VR5400 0x54 /* NEC Vr5400 CPU ISA IV+ */ +#define MIPS_RM9000 0x34 /* E9000 CPU */ /* * MIPS FPU types */ -#define MIPS_SOFT 0x00 /* Software emulation ISA I */ -#define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ -#define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ -#define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ -#define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ -#define MIPS_R4010 0x05 /* MIPS R4000/R4400 FPC ISA II */ -#define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ -#define MIPS_R10010 0x09 /* MIPS R10000/T5 FPU ISA IV */ -#define MIPS_R4210 0x0a /* MIPS R4200 FPC (ICE) ISA III */ -#define MIPS_UNKF1 0x0b /* unnanounced product cpu ISA III */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R3SONY 0x21 /* Sony R3000 based FPU ISA I */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ -#define MIPS_R5010 0x23 /* MIPS R5000 based FPU ISA IV */ -#define MIPS_RM7000 0x27 /* QED RM7000 FPU ISA IV */ -#define MIPS_RM5230 0x28 /* QED RM52X0 based FPU ISA IV */ -#define MIPS_RM52XX 0x28 /* QED RM52X0 based FPU ISA IV */ -#define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ +#define MIPS_SOFT 0x00 /* Software emulation ISA I */ +#define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ +#define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ +#define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ +#define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ +#define MIPS_R4010 0x05 /* MIPS R4000/R4400 FPC ISA II */ +#define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ +#define MIPS_R10010 0x09 /* MIPS R10000/T5 FPU ISA IV */ +#define MIPS_R4210 0x0a /* MIPS R4200 FPC (ICE) ISA III */ +#define MIPS_UNKF1 0x0b /* unnanounced product cpu ISA III */ +#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ +#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ +#define MIPS_R3SONY 0x21 /* Sony R3000 based FPU ISA I */ +#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ +#define MIPS_R5010 0x23 /* MIPS R5000 based FPU ISA IV */ +#define MIPS_RM7000 0x27 /* QED RM7000 FPU ISA IV */ +#define MIPS_RM5230 0x28 /* QED RM52X0 based FPU ISA IV */ +#define MIPS_RM52XX 0x28 /* QED RM52X0 based FPU ISA IV */ +#define MIPS_VR5400 0x54 /* NEC Vr5400 FPU ISA IV+ */ #ifndef _LOCORE -extern union cpuprid cpu_id; +extern union cpuprid cpu_id; + #define mips_proc_type() ((cpu_id.cpu.cp_vendor << 8) | cpu_id.cpu.cp_imp) #define mips_set_proc_type(type) (cpu_id.cpu.cp_vendor = (type) >> 8, \ cpu_id.cpu.cp_imp = ((type) & 0x00ff)) -#endif /* !_LOCORE */ +#endif /* !_LOCORE */ #if defined(_KERNEL) && !defined(_LOCORE) -extern union cpuprid fpu_id; +extern union cpuprid fpu_id; struct tlb; struct user; u_int32_t mips_cp0_config1_read(void); -int Mips_ConfigCache(void); -void Mips_SetWIRED(int); -void Mips_SetPID(int); -u_int Mips_GetCOUNT(void); -void Mips_SetCOMPARE(u_int); -u_int Mips_GetCOMPARE(void); +int Mips_ConfigCache(void); +void Mips_SetWIRED(int); +void Mips_SetPID(int); +u_int Mips_GetCOUNT(void); +void Mips_SetCOMPARE(u_int); +u_int Mips_GetCOMPARE(void); -void Mips_SyncCache(void); -void Mips_SyncDCache(vm_offset_t, int); -void Mips_HitSyncDCache(vm_offset_t, int); -void Mips_HitSyncSCache(vm_offset_t, int); -void Mips_IOSyncDCache(vm_offset_t, int, int); -void Mips_HitInvalidateDCache(vm_offset_t, int); -void Mips_SyncICache(vm_offset_t, int); -void Mips_InvalidateICache(vm_offset_t, int); +void Mips_SyncCache(void); +void Mips_SyncDCache(vm_offset_t, int); +void Mips_HitSyncDCache(vm_offset_t, int); +void Mips_HitSyncSCache(vm_offset_t, int); +void Mips_IOSyncDCache(vm_offset_t, int, int); +void Mips_HitInvalidateDCache(vm_offset_t, int); +void Mips_SyncICache(vm_offset_t, int); +void Mips_InvalidateICache(vm_offset_t, int); -void Mips_TLBFlush(int); -void Mips_TLBFlushAddr(vm_offset_t); -void Mips_TLBWriteIndexed(int, struct tlb *); -void Mips_TLBUpdate(vm_offset_t, unsigned); -void Mips_TLBRead(int, struct tlb *); -void mips_TBIAP(int); -void wbflush(void); +void Mips_TLBFlush(int); +void Mips_TLBFlushAddr(vm_offset_t); +void Mips_TLBWriteIndexed(int, struct tlb *); +void Mips_TLBUpdate(vm_offset_t, unsigned); +void Mips_TLBRead(int, struct tlb *); +void mips_TBIAP(int); +void wbflush(void); extern u_int32_t cpu_counter_interval; /* Number of counter ticks/tick */ extern u_int32_t cpu_counter_last; /* Last compare value loaded */ @@ -536,30 +537,30 @@ * Low level access routines to CPU registers */ -void setsoftintr0(void); -void clearsoftintr0(void); -void setsoftintr1(void); -void clearsoftintr1(void); -void setsr(u_int32_t); +void setsoftintr0(void); +void clearsoftintr0(void); +void setsoftintr1(void); +void clearsoftintr1(void); +void setsr(u_int32_t); u_int32_t getsr(void); u_int32_t mips_cp0_status_read(void); -void mips_cp0_status_write(u_int32_t); +void mips_cp0_status_write(u_int32_t); -int disableintr(void); -void restoreintr(int); -int enableintr(void); -int Mips_TLBGetPID(void); +int disableintr(void); +void restoreintr(int); +int enableintr(void); +int Mips_TLBGetPID(void); -void swi_vm(void *); -void cpu_halt(void); -void cpu_reset(void); +void swi_vm(void *); +void cpu_halt(void); +void cpu_reset(void); u_int32_t set_intr_mask(u_int32_t); u_int32_t get_intr_mask(void); u_int32_t get_cyclecount(void); -#define cpu_spinwait() /* nothing */ +#define cpu_spinwait() /* nothing */ -#endif /* _KERNEL */ -#endif /* !_MACHINE_CPU_H_ */ +#endif /* _KERNEL */ +#endif /* !_MACHINE_CPU_H_ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 17:59:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EE3D16A51D; Wed, 20 Feb 2008 17:59:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54B216A407 for ; Wed, 20 Feb 2008 17:59:49 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CA60913C458 for ; Wed, 20 Feb 2008 17:59:49 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KHxnJI075648 for ; Wed, 20 Feb 2008 17:59:49 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KHxnqR075644 for perforce@freebsd.org; Wed, 20 Feb 2008 17:59:49 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 17:59:49 GMT Message-Id: <200802201759.m1KHxnqR075644@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 17:59:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135809 Change 135809 by rrs@rrs-mips2-jnpr on 2008/02/20 17:59:35 s9indent of file. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#21 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#21 (text+ko) ==== @@ -161,22 +161,23 @@ */ static uma_zone_t pvzone; static struct vm_object pvzone_obj; -static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0; +static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; int pmap_pagedaemon_waken = 0; struct fpage fpages_shared[FPAGES_SHARED]; struct sysmaps sysmaps_pcpu[MAXCPU]; -static PMAP_INLINE void free_pv_entry(pv_entry_t pv); -static pv_entry_t get_pv_entry(void); -static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem); +static PMAP_INLINE void free_pv_entry(pv_entry_t pv); +static pv_entry_t get_pv_entry(void); +static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem); static int pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va); static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, vm_offset_t va); static boolean_t pmap_testbit(vm_page_t m, int bit); -static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, +static void +pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m, boolean_t wired); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -187,19 +188,21 @@ static void pmap_TLB_invalidate_kernel(vm_offset_t); static void pmap_TLB_update_kernel(vm_offset_t, pt_entry_t); static void pmap_init_fpage(void); + #ifdef SMP static void pmap_invalidate_page_action(void *arg); static void pmap_invalidate_all_action(void *arg); static void pmap_update_page_action(void *arg); + #endif struct local_sysmaps { - struct mtx lock; + struct mtx lock; pt_entry_t CMAP1; pt_entry_t CMAP2; - caddr_t CADDR1; - caddr_t CADDR2; - uint16_t valid1, valid2; + caddr_t CADDR1; + caddr_t CADDR2; + uint16_t valid1, valid2; }; /* This structure is for large memory @@ -216,9 +219,9 @@ pmap_segmap(pmap_t pmap, vm_offset_t va) { if (pmap->pm_segtab) - return(pmap->pm_segtab[((vm_offset_t)(va) >> SEGSHIFT)]); + return (pmap->pm_segtab[((vm_offset_t)(va) >> SEGSHIFT)]); else - return((pd_entry_t) 0); + return ((pd_entry_t)0); } /* @@ -233,7 +236,7 @@ pt_entry_t *pdeaddr; if (pmap) { - pdeaddr = (pt_entry_t *) pmap_segmap(pmap, va); + pdeaddr = (pt_entry_t *)pmap_segmap(pmap, va); if (pdeaddr) { return pdeaddr + vad_to_pte_offset(va); } @@ -253,12 +256,13 @@ bank_size = phys_avail[1] - phys_avail[0]; while (size > bank_size) { int i; - for (i = 0; phys_avail[i+2]; i+= 2) { - phys_avail[i] = phys_avail[i+2]; - phys_avail[i+1] = phys_avail[i+3]; + + for (i = 0; phys_avail[i + 2]; i += 2) { + phys_avail[i] = phys_avail[i + 2]; + phys_avail[i + 1] = phys_avail[i + 3]; } phys_avail[i] = 0; - phys_avail[i+1] = 0; + phys_avail[i + 1] = 0; if (!phys_avail[0]) panic("pmap_steal_memory: out of memory"); bank_size = phys_avail[1] - phys_avail[0]; @@ -267,10 +271,10 @@ pa = phys_avail[0]; phys_avail[0] += size; if (pa >= MIPS_KSEG0_LARGEST_PHYS) { - panic("Out of memory below 512Meg?"); + panic("Out of memory below 512Meg?"); } va = MIPS_PHYS_TO_CACHED(pa); - bzero((caddr_t) va, size); + bzero((caddr_t)va, size); return va; } @@ -289,8 +293,8 @@ /* Sort. */ again: for (i = 0; phys_avail[i + 1] != 0; i += 2) { - if(phys_avail[i+1] >= MIPS_KSEG0_LARGEST_PHYS) { - memory_larger_than_512meg++; + if (phys_avail[i + 1] >= MIPS_KSEG0_LARGEST_PHYS) { + memory_larger_than_512meg++; } if (i < 2) continue; @@ -298,8 +302,8 @@ vm_paddr_t ptemp[2]; - ptemp[0] = phys_avail[i+0]; - ptemp[1] = phys_avail[i+1]; + ptemp[0] = phys_avail[i + 0]; + ptemp[1] = phys_avail[i + 1]; phys_avail[i + 0] = phys_avail[i - 2]; phys_avail[i + 1] = phys_avail[i - 1]; @@ -317,17 +321,15 @@ size = phys_avail[i + 1] - phys_avail[i]; printf("%#08jx - %#08jx, %ju bytes (%ju pages)\n", - (uintmax_t)phys_avail[i], - (uintmax_t)phys_avail[i + 1] - 1, - (uintmax_t)size, (uintmax_t)size / PAGE_SIZE); + (uintmax_t) phys_avail[i], + (uintmax_t) phys_avail[i + 1] - 1, + (uintmax_t) size, (uintmax_t) size / PAGE_SIZE); } } - - /* * Steal the message buffer from the beginning of memory. */ - msgbufp = (struct msgbuf *) pmap_steal_memory(MSGBUF_SIZE); + msgbufp = (struct msgbuf *)pmap_steal_memory(MSGBUF_SIZE); msgbufinit(msgbufp, MSGBUF_SIZE); /* @@ -339,78 +341,77 @@ virtual_avail = VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET; virtual_end = VM_MAX_KERNEL_ADDRESS; - /* Steal some virtual space that will not be in - * kernel_segmap. This va memory space will be used to - * map in kernel pages that are outside the 512Meg - * region. Note that we only do this steal when we - * do have memory in this region, that way for - * systems with smaller memory we don't "steal" - * any va ranges :-) + /* + * Steal some virtual space that will not be in kernel_segmap. This + * va memory space will be used to map in kernel pages that are + * outside the 512Meg region. Note that we only do this steal when + * we do have memory in this region, that way for systems with + * smaller memory we don't "steal" any va ranges :-) */ if (memory_larger_than_512meg) { - for ( i=0; i< MAXCPU; i++) { - sysmap_lmem[i].CMAP1 = PG_G; - sysmap_lmem[i].CMAP2 = PG_G; - sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; - virtual_avail += PAGE_SIZE; - sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; - virtual_avail += PAGE_SIZE; - sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; - PMAP_LGMEM_LOCK_INIT(&sysmap_lmem[i]); - } + for (i = 0; i < MAXCPU; i++) { + sysmap_lmem[i].CMAP1 = PG_G; + sysmap_lmem[i].CMAP2 = PG_G; + sysmap_lmem[i].CADDR1 = (caddr_t)virtual_avail; + virtual_avail += PAGE_SIZE; + sysmap_lmem[i].CADDR2 = (caddr_t)virtual_avail; + virtual_avail += PAGE_SIZE; + sysmap_lmem[i].valid1 = sysmap_lmem[i].valid2 = 0; + PMAP_LGMEM_LOCK_INIT(&sysmap_lmem[i]); + } } virtual_sys_start = (caddr_t)virtual_avail; /* * Allocate segment table for the kernel */ - kernel_segmap = (pd_entry_t *) pmap_steal_memory(PAGE_SIZE); + kernel_segmap = (pd_entry_t *)pmap_steal_memory(PAGE_SIZE); /* * Allocate second level page tables for the kernel */ nkpt = NKPT; if (memory_larger_than_512meg) { - /* If we have a large memory system - * we CANNOT afford to hit pmap_growkernel() and allocate memory. Since - * we MAY end up with a page that is NOT mappable. For - * that reason we up front grab more. Normall NKPT is 120 (YMMV see pmap.h) - * this gives us 480meg of kernel virtual addresses at the - * cost of 120 pages (each page gets us 4 Meg). Since - * the kernel starts at virtual_avail, we can use this to - * calculate how many entris are left from there to the end - * of the segmap, we want to allocate all of it, which would - * be somewhere above 0xC0000000 - 0xFFFFFFFF which results in - * about 256 entries or so instead of the 120. - */ - nkpt = (PAGE_SIZE/sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT); + /* + * If we have a large memory system we CANNOT afford to hit + * pmap_growkernel() and allocate memory. Since we MAY end + * up with a page that is NOT mappable. For that reason we + * up front grab more. Normall NKPT is 120 (YMMV see pmap.h) + * this gives us 480meg of kernel virtual addresses at the + * cost of 120 pages (each page gets us 4 Meg). Since the + * kernel starts at virtual_avail, we can use this to + * calculate how many entris are left from there to the end + * of the segmap, we want to allocate all of it, which would + * be somewhere above 0xC0000000 - 0xFFFFFFFF which results + * in about 256 entries or so instead of the 120. + */ + nkpt = (PAGE_SIZE / sizeof(pd_entry_t)) - (virtual_avail >> SEGSHIFT); } - pgtab = (pt_entry_t *) pmap_steal_memory(PAGE_SIZE*nkpt); + pgtab = (pt_entry_t *)pmap_steal_memory(PAGE_SIZE * nkpt); /* * The R[4-7]?00 stores only one copy of the Global bit in the - * translation lookaside buffer for each 2 page entry. - * Thus invalid entrys must have the Global bit set so - * when Entry LO and Entry HI G bits are anded together - * they will produce a global bit to store in the tlb. + * translation lookaside buffer for each 2 page entry. Thus invalid + * entrys must have the Global bit set so when Entry LO and Entry HI + * G bits are anded together they will produce a global bit to store + * in the tlb. */ for (i = 0, pte = pgtab; i < (nkpt * NPTEPG); i++, pte++) *pte = PG_G; printf("Va=0x%x Ve=%x\n", virtual_avail, virtual_end); /* - * The segment table contains the KVA of the pages in the - * second level page table. + * The segment table contains the KVA of the pages in the second + * level page table. */ printf("init kernel_segmap va >> = %d nkpt:%d\n", - (virtual_avail >> SEGSHIFT), - nkpt); + (virtual_avail >> SEGSHIFT), + nkpt); for (i = 0, j = (virtual_avail >> SEGSHIFT); i < nkpt; i++, j++) kernel_segmap[j] = (pd_entry_t)(pgtab + (i * NPTEPG)); avail_start = phys_avail[0]; - for (i = 0; phys_avail[i+2]; i+= 2) - ; - avail_end = phys_avail[i+1]; + for (i = 0; phys_avail[i + 2]; i += 2); + avail_end = phys_avail[i + 1]; /* * The kernel's pmap is statically allocated so we don't have to use @@ -424,8 +425,8 @@ kernel_pmap->pm_active = ~0; TAILQ_INIT(&kernel_pmap->pm_pvlist); printf("avail_start:0x%x avail_end:0x%x\n", - avail_start, avail_end); - + avail_start, avail_end); + kernel_pmap->pm_asid[PCPU_GET(cpuid)].asid = PMAP_ASID_RESERVED; kernel_pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; pmap_max_asid = VMNUM_PIDS; @@ -458,7 +459,6 @@ if (need_wired_tlb_page_pool) { pmap_init_fpage(); } - /* * Initialize the address space (zone) for the pv entries. Set a * high water mark so that the system can recover from excessive @@ -484,11 +484,12 @@ static int pmap_nw_modified(pt_entry_t pte) { - if ((pte & (PG_M|PG_RO)) == (PG_M|PG_RO)) + if ((pte & (PG_M | PG_RO)) == (PG_M | PG_RO)) return (1); else return (0); } + #endif @@ -500,9 +501,9 @@ pmap_track_modified(vm_offset_t va) { /* - * Kernel submap initialization has been moved for MD to MI - * code. ie from cpu_startup() to vm_ksubmap_init(). - * clean_sva and clean_eva are part of the kmi structure. + * Kernel submap initialization has been moved for MD to MI code. ie + * from cpu_startup() to vm_ksubmap_init(). clean_sva and clean_eva + * are part of the kmi structure. */ if ((va < kmi.clean_sva) || (va >= kmi.clean_eva)) return (1); @@ -514,19 +515,19 @@ pmap_invalidate_all(pmap_t pmap) { #ifdef SMP - smp_rendezvous(0, pmap_invalidate_all_action, 0, (void *) pmap); + smp_rendezvous(0, pmap_invalidate_all_action, 0, (void *)pmap); } static void pmap_invalidate_all_action(void *arg) { - pmap_t pmap = (pmap_t) arg; + pmap_t pmap = (pmap_t)arg; + #endif if (pmap->pm_active & PCPU_GET(cpumask)) { pmap_TLB_invalidate_all(); - } - else + } else pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; } @@ -540,31 +541,31 @@ { #ifdef SMP struct pmap_invalidate_page_arg arg; + arg.pmap = pmap; arg.va = va; - smp_rendezvous(0, pmap_invalidate_page_action, 0, (void *) &arg); + smp_rendezvous(0, pmap_invalidate_page_action, 0, (void *)&arg); } static void pmap_invalidate_page_action(void *arg) { - pmap_t pmap = ((struct pmap_invalidate_page_arg *) arg)->pmap; - vm_offset_t va = ((struct pmap_invalidate_page_arg *) arg)->va; + pmap_t pmap = ((struct pmap_invalidate_page_arg *)arg)->pmap; + vm_offset_t va = ((struct pmap_invalidate_page_arg *)arg)->va; + #endif if (is_kernel_pmap(pmap)) { pmap_TLB_invalidate_kernel(va); return; } - if (pmap->pm_asid[PCPU_GET(cpuid)].gen != PCPU_GET(asid_generation)) return; else if (!(pmap->pm_active & PCPU_GET(cpumask))) { pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; return; } - va = pmap_va_asid(pmap, (va & ~PGOFSET)); mips_TBIS(va); } @@ -590,32 +591,32 @@ { #ifdef SMP struct pmap_update_page_arg arg; + arg.pmap = pmap; arg.va = va; arg.pte = pte; - smp_rendezvous(0, pmap_update_page_action, 0, (void *) &arg); + smp_rendezvous(0, pmap_update_page_action, 0, (void *)&arg); } static void pmap_update_page_action(void *arg) { - pmap_t pmap = ((struct pmap_update_page_arg *) arg)->pmap; - vm_offset_t va = ((struct pmap_update_page_arg *) arg)->va; - pt_entry_t pte = ((struct pmap_update_page_arg *) arg)->pte; + pmap_t pmap = ((struct pmap_update_page_arg *)arg)->pmap; + vm_offset_t va = ((struct pmap_update_page_arg *)arg)->va; + pt_entry_t pte = ((struct pmap_update_page_arg *)arg)->pte; + #endif if (is_kernel_pmap(pmap)) { pmap_TLB_update_kernel(va, pte); return; } - - if (pmap->pm_asid[PCPU_GET(cpuid)].gen != PCPU_GET(asid_generation) ) + if (pmap->pm_asid[PCPU_GET(cpuid)].gen != PCPU_GET(asid_generation)) return; else if (!(pmap->pm_active & PCPU_GET(cpumask))) { pmap->pm_asid[PCPU_GET(cpuid)].gen = 0; return; } - va = pmap_va_asid(pmap, va); MachTLBUpdate(va, pte); @@ -642,7 +643,7 @@ pmap_extract(pmap_t pmap, vm_offset_t va) { pt_entry_t *pte; - vm_offset_t retval=0; + vm_offset_t retval = 0; PMAP_LOCK(pmap); pte = pmap_pte(pmap, va); @@ -676,7 +677,6 @@ m = PHYS_TO_VM_PAGE(mips_tlbpfn_to_paddr(pte)); vm_page_hold(m); } - vm_page_unlock_queues(); PMAP_UNLOCK(pmap); return (m); @@ -689,7 +689,7 @@ /* * add a wired page to the kva */ -/* PMAP_INLINE */ void + /* PMAP_INLINE */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa) { register pt_entry_t *pte; @@ -712,7 +712,7 @@ /* * remove a page from the kernel pagetables */ -/* PMAP_INLINE */ void + /* PMAP_INLINE */ void pmap_kremove(vm_offset_t va) { register pt_entry_t *pte; @@ -737,18 +737,18 @@ vm_offset_t pmap_map(vm_offset_t *virt, vm_offset_t start, vm_offset_t end, int prot) { - vm_offset_t va, sva; + vm_offset_t va, sva; - va = sva = *virt; - printf("pmap_map: enters virt:0x%x start:%x end:0x%x prot:0x%x\n", - *virt, start, end, prot); - while (start < end) { - pmap_kenter(va, start); - va += PAGE_SIZE; - start += PAGE_SIZE; - } - *virt = va; - return (sva); + va = sva = *virt; + printf("pmap_map: enters virt:0x%x start:%x end:0x%x prot:0x%x\n", + *virt, start, end, prot); + while (start < end) { + pmap_kenter(va, start); + va += PAGE_SIZE; + start += PAGE_SIZE; + } + *virt = va; + return (sva); } /* @@ -809,34 +809,33 @@ struct sysmaps *sysmaps; /* - * We allocate a total of (FPAGES*MAXCPU + FPAGES_SHARED + 1) - * pages at first. FPAGES & FPAGES_SHARED should be EVEN - * Then we'll adjust 'kva' to be even-page aligned so that - * the fpage area can be wired in the TLB with a single - * TLB entry. + * We allocate a total of (FPAGES*MAXCPU + FPAGES_SHARED + 1) pages + * at first. FPAGES & FPAGES_SHARED should be EVEN Then we'll adjust + * 'kva' to be even-page aligned so that the fpage area can be wired + * in the TLB with a single TLB entry. */ kva = kmem_alloc_nofault(kernel_map, - (FPAGES*MAXCPU + 1 + FPAGES_SHARED) * PAGE_SIZE); + (FPAGES * MAXCPU + 1 + FPAGES_SHARED) * PAGE_SIZE); if ((void *)kva == NULL) panic("pmap_init_fpage: fpage allocation failed"); /* - * Make up start at an even page number so we can wire down - * the fpage area in the tlb with a single tlb entry. + * Make up start at an even page number so we can wire down the + * fpage area in the tlb with a single tlb entry. */ - if ((((vm_offset_t) kva) >> PGSHIFT) & 1) { - /* - * 'kva' is not even-page aligned. - * Adjust it and free the first page which is unused. - */ - kmem_free(kernel_map, (vm_offset_t) kva, NBPG); - kva = ((vm_offset_t) kva) + NBPG; + if ((((vm_offset_t)kva) >> PGSHIFT) & 1) { + /* + * 'kva' is not even-page aligned. Adjust it and free the + * first page which is unused. + */ + kmem_free(kernel_map, (vm_offset_t)kva, NBPG); + kva = ((vm_offset_t)kva) + NBPG; } else { /* - * 'kva' is even page aligned. - * We don't need the last page, free it. + * 'kva' is even page aligned. We don't need the last page, + * free it. */ - kmem_free(kernel_map, ((vm_offset_t) kva) + FSPACE, NBPG); + kmem_free(kernel_map, ((vm_offset_t)kva) + FSPACE, NBPG); } for (i = 0; i < MAXCPU; i++) { @@ -844,17 +843,16 @@ mtx_init(&sysmaps->lock, "SYSMAPS", NULL, MTX_DEF); /* Assign FPAGES pages to the CPU */ - for (j =0; j < FPAGES; j++) + for (j = 0; j < FPAGES; j++) sysmaps->fp[j].kva = kva + (j) * PAGE_SIZE; kva = ((vm_offset_t)kva) + (FPAGES * PAGE_SIZE); } /* - * An additional 2 pages are needed, one for - * pmap_zero_page_idle() and one for coredump. - * These pages are shared by all cpu's + * An additional 2 pages are needed, one for pmap_zero_page_idle() + * and one for coredump. These pages are shared by all cpu's */ - fpages_shared[PMAP_FPAGE3].kva = kva; + fpages_shared[PMAP_FPAGE3].kva = kva; fpages_shared[PMAP_FPAGE_KENTER_TEMP].kva = kva + PAGE_SIZE; } @@ -878,7 +876,6 @@ else panic("pmap_map_fpage: fpage is busy"); } - fp->state = TRUE; kva = fp->kva; @@ -888,7 +885,7 @@ pmap_TLB_update_kernel(kva, npte); - return(kva); + return (kva); } /* @@ -907,7 +904,6 @@ if (!(fp->state)) { panic("pmap_unmap_fpage: fpage is free"); } - kva = fp->kva; pte = pmap_pte(kernel_pmap, kva); @@ -933,7 +929,8 @@ * drops to zero, then it decrements the wire count. */ static int -_pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m) { +_pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m) +{ /* * unmap the page table page @@ -978,7 +975,7 @@ if (mpte == NULL) { ptepindex = (va >> SEGSHIFT); if (pmap->pm_ptphint && - (pmap->pm_ptphint->pindex == ptepindex)) { + (pmap->pm_ptphint->pindex == ptepindex)) { mpte = pmap->pm_ptphint; } else { pteva = *pmap_pde(pmap, va); @@ -986,7 +983,6 @@ pmap->pm_ptphint = mpte; } } - return pmap_unwire_pte_hold(pmap, mpte); } @@ -1021,7 +1017,7 @@ PMAP_LOCK_INIT(pmap); - req = VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED | + req = VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO; #ifdef VM_ALLOC_WIRED_TLB_PG_POOL @@ -1031,12 +1027,12 @@ /* * allocate the page directory page */ - ptdpg = vm_page_alloc( NULL, NUSERPGTBLS, req); + ptdpg = vm_page_alloc(NULL, NUSERPGTBLS, req); #if 0 /* I think we can just delete these, now that PG_BUSY is gone */ vm_page_lock_queues(); - vm_page_flag_clear(ptdpg, PG_BUSY); /* not usually mapped*/ + vm_page_flag_clear(ptdpg, PG_BUSY); /* not usually mapped */ #endif ptdpg->valid = VM_PAGE_BITS_ALL; @@ -1051,9 +1047,9 @@ pmap->pm_active = 0; pmap->pm_ptphint = NULL; - for (i=0; i < MAXCPU; i++) { + for (i = 0; i < MAXCPU; i++) { pmap->pm_asid[i].asid = PMAP_ASID_RESERVED; - pmap->pm_asid[i].gen = 0; + pmap->pm_asid[i].gen = 0; } TAILQ_INIT(&pmap->pm_pvlist); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -1076,7 +1072,7 @@ (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, ("_pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); - req = VM_ALLOC_WIRED| VM_ALLOC_ZERO| VM_ALLOC_NOOBJ; + req = VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_NOOBJ; #ifdef VM_ALLOC_WIRED_TLB_PG_POOL if (need_wired_tlb_page_pool) req |= VM_ALLOC_WIRED_TLB_PG_POOL; @@ -1092,14 +1088,12 @@ vm_page_lock_queues(); PMAP_LOCK(pmap); } - /* - * Indicate the need to retry. While waiting, the page table - * page may have been allocated. + * Indicate the need to retry. While waiting, the page + * table page may have been allocated. */ return (NULL); } - if ((m->flags & PG_ZERO) == 0) pmap_zero_page(m); @@ -1107,15 +1101,15 @@ ("_pmap_allocpte: %p->queue != PQ_NONE", m)); /* - * Map the pagetable page into the process address space, if - * it isn't already there. + * Map the pagetable page into the process address space, if it + * isn't already there. */ pmap->pm_stats.resident_count++; ptepa = VM_PAGE_TO_PHYS(m); pteva = MIPS_PHYS_TO_CACHED(ptepa); - pmap->pm_segtab[ptepindex] = (pd_entry_t) pteva; + pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva; /* * Set the page table hint @@ -1143,8 +1137,8 @@ vm_page_t m; KASSERT((flags & (M_NOWAIT | M_WAITOK)) == M_NOWAIT || - (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, - ("pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); + (flags & (M_NOWAIT | M_WAITOK)) == M_WAITOK, + ("pmap_allocpte: flags is neither M_NOWAIT nor M_WAITOK")); /* * Calculate pagetable page index @@ -1154,19 +1148,18 @@ /* * Get the page directory entry */ - pteva = (vm_offset_t) pmap->pm_segtab[ptepindex]; + pteva = (vm_offset_t)pmap->pm_segtab[ptepindex]; /* - * If the page table page is mapped, we just increment the - * hold count, and activate it. + * If the page table page is mapped, we just increment the hold + * count, and activate it. */ if (pteva) { /* - * In order to get the page table page, try the - * hint first. + * In order to get the page table page, try the hint first. */ if (pmap->pm_ptphint && - (pmap->pm_ptphint->pindex == ptepindex)) { + (pmap->pm_ptphint->pindex == ptepindex)) { m = pmap->pm_ptphint; } else { m = PHYS_TO_VM_PAGE(MIPS_CACHED_TO_PHYS(pteva)); @@ -1175,7 +1168,8 @@ m->wire_count++; } else { /* - * Here if the pte page isn't mapped, or if it has been deallocated. + * Here if the pte page isn't mapped, or if it has been + * deallocated. */ m = _pmap_allocpte(pmap, ptepindex, flags); if (m == NULL && (flags & M_WAITOK)) @@ -1267,7 +1261,6 @@ } continue; } - /* * This index is bogus, but out of the way */ @@ -1284,26 +1277,25 @@ ptppaddr = VM_PAGE_TO_PHYS(nkpg); if (ptppaddr >= MIPS_KSEG0_LARGEST_PHYS) { - /* We need to do something here, but I am not - * sure what. We can access anything in the - * 0 - 512Meg region, but if we get a page to - * go in the kernel segmap that is outside of - * of that we really need to have another mapping - * beyond the temporary ones I have. Not sure - * how to do this yet. FIXME FIXME. - */ - panic("Gak, can't handle a k-page table outside of lower 512Meg"); + /* + * We need to do something here, but I am not sure + * what. We can access anything in the 0 - 512Meg + * region, but if we get a page to go in the kernel + * segmap that is outside of of that we really need + * to have another mapping beyond the temporary ones + * I have. Not sure how to do this yet. FIXME FIXME. + */ + panic("Gak, can't handle a k-page table outside of lower 512Meg"); } - pte = (pt_entry_t *) MIPS_PHYS_TO_CACHED(ptppaddr); - segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t) pte; + pte = (pt_entry_t *)MIPS_PHYS_TO_CACHED(ptppaddr); + segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t)pte; /* - * The R[4-7]?00 stores only one copy of the Global bit - * in the translation lookaside buffer for each 2 page - * entry. Thus invalid entrys must have the Global bit - * set so when Entry LO and Entry HI G bits are anded - * together they will produce a global bit to store in - * the tlb. + * The R[4-7]?00 stores only one copy of the Global bit in + * the translation lookaside buffer for each 2 page entry. + * Thus invalid entrys must have the Global bit set so when + * Entry LO and Entry HI G bits are anded together they will + * produce a global bit to store in the tlb. */ for (i = 0; i < NPTEPG; i++, pte++) *pte = PG_G; @@ -1345,9 +1337,9 @@ pv_entry_count++; if ((pv_entry_count > pv_entry_high_water) && - (pmap_pagedaemon_waken == 0)) { + (pmap_pagedaemon_waken == 0)) { pmap_pagedaemon_waken = 1; - wakeup (&vm_pages_needed); + wakeup(&vm_pages_needed); } return uma_zalloc(pvzone, M_NOWAIT); } @@ -1407,7 +1399,7 @@ */ static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t mpte, vm_page_t m, - boolean_t wired) + boolean_t wired) { pv_entry_t pv; @@ -1457,7 +1449,7 @@ #if defined(PMAP_DIAGNOSTIC) if (pmap_nw_modified(oldpte)) { printf( - "pmap_remove: modified page not writable: va: 0x%x, pte: 0x%x\n", + "pmap_remove: modified page not writable: va: 0x%x, pte: 0x%x\n", va, oldpte); } #endif @@ -1492,11 +1484,10 @@ if (!ptq || !pmap_pte_v(ptq)) { return; } - /* * get a local va for mappings for this pmap. */ - (void) pmap_remove_pte(pmap, ptq, va); + (void)pmap_remove_pte(pmap, ptq, va); pmap_invalidate_page(pmap, va); return; @@ -1523,21 +1514,18 @@ PMAP_LOCK(pmap); /* - * special handling of removing one page. a very - * common operation and easy to short circuit some - * code. + * special handling of removing one page. a very common operation + * and easy to short circuit some code. */ if ((sva + PAGE_SIZE) == eva) { pmap_remove_page(pmap, sva); goto out; } - for (va = sva; va < eva; va = nva) { if (!*pmap_pde(pmap, va)) { nva = mips_segtrunc(va + MIPS_SEGSIZE); continue; } - pmap_remove_page(pmap, va); nva = va + PAGE_SIZE; } @@ -1599,7 +1587,7 @@ #if defined(PMAP_DIAGNOSTIC) if (pmap_nw_modified(tpte)) { printf( - "pmap_remove_all: modified page not writable: va: 0x%x, pte: 0x%x\n", + "pmap_remove_all: modified page not writable: va: 0x%x, pte: 0x%x\n", pv->pv_va, tpte); } #endif @@ -1636,7 +1624,6 @@ pmap_remove(pmap, sva, eva); return; } - if (prot & VM_PROT_WRITE) return; @@ -1654,7 +1641,6 @@ sva = mips_segtrunc(sva + MIPS_SEGSIZE); continue; } - /* * If pte is invalid, skip this page */ @@ -1680,7 +1666,6 @@ } } } - pbits = (pbits & ~PG_M) | PG_RO; if (pbits != *pte) { @@ -1688,7 +1673,6 @@ goto retry; pmap_update_page(pmap, sva, pbits); } - sva += PAGE_SIZE; } vm_page_unlock_queues(); @@ -1732,13 +1716,12 @@ PMAP_LOCK(pmap); /* - * In the case that a page table page is not - * resident, we are creating it here. + * In the case that a page table page is not resident, we are + * creating it here. */ if (va < VM_MAXUSER_ADDRESS) { mpte = pmap_allocpte(pmap, va, M_WAITOK); } - pte = pmap_pte(pmap, va); /* @@ -1748,7 +1731,6 @@ panic("pmap_enter: invalid page directory, pdir=%p, va=0x%x\n", (void *)pmap->pm_segtab, va); } - pa = VM_PAGE_TO_PHYS(m); om = NULL; origpte = *pte; @@ -1761,8 +1743,8 @@ /* * Wiring change, just update stats. We don't worry about * wiring PT pages as they remain resident as long as there - * are valid mappings in them. Hence, if a user page is wired, - * the PT page will be also. + * are valid mappings in them. Hence, if a user page is + * wired, the PT page will be also. */ if (wired && ((origpte & PG_W) == 0)) pmap->pm_stats.wired_count++; @@ -1772,7 +1754,7 @@ #if defined(PMAP_DIAGNOSTIC) if (pmap_nw_modified(origpte)) { printf( - "pmap_enter: modified page not writable: va: 0x%x, pte: 0x%x\n", + "pmap_enter: modified page not writable: va: 0x%x, pte: 0x%x\n", va, origpte); } #endif @@ -1784,8 +1766,8 @@ mpte->wire_count--; /* - * We might be turning off write access to the page, - * so we go ahead and sense modify status. + * We might be turning off write access to the page, so we + * go ahead and sense modify status. */ if (page_is_managed(opa)) { om = m; @@ -1798,13 +1780,12 @@ */ if (opa) { if (origpte & PG_W) - pmap->pm_stats.wired_count--; + pmap->pm_stats.wired_count--; if (page_is_managed(opa)) { om = PHYS_TO_VM_PAGE(opa); pmap_remove_entry(pmap, om, va); } - if (mpte != NULL) { mpte->wire_count--; KASSERT(mpte->wire_count > 0, @@ -1819,10 +1800,9 @@ * raise IPL while manipulating pv_table since pmap_enter can be * called at interrupt time. */ - if((m->flags & (PG_FICTITIOUS|PG_UNMANAGED)) == 0) { + if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { pmap_insert_entry(pmap, va, mpte, m, wired); } - /* * Increment counters */ @@ -1849,8 +1829,8 @@ newpte |= PG_G; /* - * if the mapping or permission bits are different, we need - * to update the pte. + * if the mapping or permission bits are different, we need to + * update the pte. */ if (origpte != newpte) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:00:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A7AF16A410; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2296716A400 for ; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0568913C506 for ; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KI0pa1075809 for ; Wed, 20 Feb 2008 18:00:51 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KI0oOq075806 for perforce@freebsd.org; Wed, 20 Feb 2008 18:00:50 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:00:50 GMT Message-Id: <200802201800.m1KI0oOq075806@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135810 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:00:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=135810 Change 135810 by rrs@rrs-mips2-jnpr on 2008/02/20 18:00:04 s9indent of file Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#11 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#11 (text+ko) ==== @@ -197,20 +197,24 @@ -static __inline u_int32_t mips_rd_ebase(void) +static __inline u_int32_t +mips_rd_ebase(void) { int v0; __asm __volatile("mfc0 %[v0], $15, 1 ;" - : [v0] "=&r" (v0)); + : [v0] "=&r"(v0)); + mips_barrier(); return (v0); } -static __inline void mips_wr_ebase(u_int32_t a0) +static __inline void +mips_wr_ebase(u_int32_t a0) { __asm __volatile("mtc0 %[a0], $15, 1 ;" - : - : [a0] "r"(a0)); + : + : [a0] "r"(a0)); + mips_barrier(); } @@ -219,225 +223,248 @@ * Perform a board-level soft-reset. * Note that this is not emulated by gxemul. */ -void octeon_reset (void) +void +octeon_reset(void) { - void (*reset_func)(void) = (void (*)(void) )0x1fc00000; - reset_func(); + void (*reset_func) (void)= (void (*) (void))0x1fc00000; + + reset_func(); } -static inline uint32_t octeon_disable_interrupts (void) +static inline uint32_t +octeon_disable_interrupts(void) { - uint32_t status_bits; + uint32_t status_bits; - status_bits = mips_rd_status(); - mips_wr_status(status_bits & ~MIPS_SR_INT_IE); - return (status_bits); + status_bits = mips_rd_status(); + mips_wr_status(status_bits & ~MIPS_SR_INT_IE); + return (status_bits); } -static inline void octeon_set_interrupts (uint32_t status_bits) +static inline void +octeon_set_interrupts(uint32_t status_bits) { - mips_wr_status(status_bits); + mips_wr_status(status_bits); } -void octeon_led_write_char (int char_position, char val) +void +octeon_led_write_char(int char_position, char val) { - uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); + uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); - if (!octeon_board_real()) return; + if (!octeon_board_real()) + return; - char_position &= 0x7; /* only 8 chars */ - ptr += char_position; - oct_write8_x8(ptr, val); + char_position &= 0x7; /* only 8 chars */ + ptr += char_position; + oct_write8_x8(ptr, val); } -void octeon_led_write_char0 (char val) +void +octeon_led_write_char0(char val) { - uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); + uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); - if (!octeon_board_real()) return; + if (!octeon_board_real()) + return; - oct_write8_x8(ptr, val); + oct_write8_x8(ptr, val); } -void octeon_led_write_hexchar (int char_position, char hexval) +void +octeon_led_write_hexchar(int char_position, char hexval) { - uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); - char char1, char2; + uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); + char char1, char2; - if (!octeon_board_real()) return; + if (!octeon_board_real()) + return; - char1 = (hexval >> 4) & 0x0f; char1 = (char1 < 10)?char1+'0':char1+'7'; - char2 = (hexval & 0x0f); char2 = (char2 < 10)?char2+'0':char2+'7'; - char_position &= 0x7; /* only 8 chars */ - if (char_position > 6) char_position = 6; - ptr += char_position; - oct_write8_x8(ptr, char1); - ptr++; - oct_write8_x8(ptr, char2); + char1 = (hexval >> 4) & 0x0f; + char1 = (char1 < 10) ? char1 + '0' : char1 + '7'; + char2 = (hexval & 0x0f); + char2 = (char2 < 10) ? char2 + '0' : char2 + '7'; + char_position &= 0x7; /* only 8 chars */ + if (char_position > 6) + char_position = 6; + ptr += char_position; + oct_write8_x8(ptr, char1); + ptr++; + oct_write8_x8(ptr, char2); } -void octeon_led_write_string (const char *str) +void +octeon_led_write_string(const char *str) { - uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); - int i; + uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); + int i; - if (!octeon_board_real()) return; + if (!octeon_board_real()) + return; - for (i=0; i<8; i++, ptr++) { - if (str && *str) { - oct_write8_x8(ptr, *str++); - } else { - oct_write8_x8(ptr, ' '); - } - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); - } + for (i = 0; i < 8; i++, ptr++) { + if (str && *str) { + oct_write8_x8(ptr, *str++); + } else { + oct_write8_x8(ptr, ' '); + } + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); + } } -static char progress[8] = { 'F', 'R', 'E', 'E', 'B', 'S', 'D', '!'}; +static char progress[8] = {'F', 'R', 'E', 'E', 'B', 'S', 'D', '!'}; -int prog_count=0; +int prog_count = 0; -void octeon_led_run_wheel (void) +void +octeon_led_run_wheel(void) { - if (!octeon_board_real()) return; + if (!octeon_board_real()) + return; + + if (prog_count > 7) { + int i; - if(prog_count > 7) { - int i; - /* blank display and reset */ - prog_count = 0; - for(i=0; i<8; i++) { - octeon_led_write_char(i, ' '); - } - } else { - octeon_led_write_char(prog_count, progress[prog_count]); - prog_count += 1; - } + /* blank display and reset */ + prog_count = 0; + for (i = 0; i < 8; i++) { + octeon_led_write_char(i, ' '); + } + } else { + octeon_led_write_char(prog_count, progress[prog_count]); + prog_count += 1; + } } -#define LSR_DATAREADY 0x01 /* Data ready */ -#define LSR_THRE 0x20 /* Transmit holding register empty */ -#define LSR_TEMT 0x40 /* Transmitter Empty. THR, TSR & FIFO */ -#define USR_TXFIFO_NOTFULL 0x02 /* Uart TX FIFO Not full */ +#define LSR_DATAREADY 0x01 /* Data ready */ +#define LSR_THRE 0x20 /* Transmit holding register empty */ +#define LSR_TEMT 0x40 /* Transmitter Empty. THR, TSR & FIFO */ +#define USR_TXFIFO_NOTFULL 0x02 /* Uart TX FIFO Not full */ /* * octeon_uart_write_byte - * + * * Put out a single byte off of uart port. */ -void octeon_uart_write_byte (int uart_index, uint8_t ch) +void +octeon_uart_write_byte(int uart_index, uint8_t ch) { - uint64_t val, val2; - if ((uart_index < 0) || (uart_index > 1)) { - return; - } + uint64_t val, val2; - while (1) { - val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); - val2 = oct_read64(OCTEON_MIO_UART0_USR + (uart_index * 0x400)); - if ((((uint8_t) val) & LSR_THRE) || - (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { - break; - } - } + if ((uart_index < 0) || (uart_index > 1)) { + return; + } + while (1) { + val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); + val2 = oct_read64(OCTEON_MIO_UART0_USR + (uart_index * 0x400)); + if ((((uint8_t) val) & LSR_THRE) || + (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { + break; + } + } - /* Write the byte */ -// oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); - oct_write64(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); + /* Write the byte */ + //oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); + oct_write64(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); + /* Force Flush the IOBus */ + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); } -void octeon_uart_write_byte0 (uint8_t ch) +void +octeon_uart_write_byte0(uint8_t ch) { - uint64_t val, val2; + uint64_t val, val2; - while (1) { - val = oct_read64(OCTEON_MIO_UART0_LSR); - val2 = oct_read64(OCTEON_MIO_UART0_USR); - if ((((uint8_t) val) & LSR_THRE) || - (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { - break; - } - } + while (1) { + val = oct_read64(OCTEON_MIO_UART0_LSR); + val2 = oct_read64(OCTEON_MIO_UART0_USR); + if ((((uint8_t) val) & LSR_THRE) || + (((uint8_t) val2) & USR_TXFIFO_NOTFULL)) { + break; + } + } - /* Write the byte */ -// oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); - oct_write64(OCTEON_MIO_UART0_THR, (uint64_t) ch); + /* Write the byte */ + //oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); + oct_write64(OCTEON_MIO_UART0_THR, (uint64_t) ch); - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); + /* Force Flush the IOBus */ + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); } /* * octeon_uart_write_string - * + * */ -void octeon_uart_write_string (int uart_index, const char *str) +void +octeon_uart_write_string(int uart_index, const char *str) { - /* Just loop writing one byte at a time */ - - while (*str) - { - octeon_uart_write_byte(uart_index, *str); - if (*str == '\n') { - octeon_uart_write_byte(uart_index, '\r'); - } - str++; - } - } + /* Just loop writing one byte at a time */ + + while (*str) { + octeon_uart_write_byte(uart_index, *str); + if (*str == '\n') { + octeon_uart_write_byte(uart_index, '\r'); + } + str++; + } +} static char wstr[30]; -void octeon_led_write_hex (uint32_t wl) +void +octeon_led_write_hex(uint32_t wl) { - char nbuf[80]; + char nbuf[80]; - sprintf(nbuf, "%X", wl); - octeon_led_write_string(nbuf); + sprintf(nbuf, "%X", wl); + octeon_led_write_string(nbuf); } -void octeon_uart_write_hex2 (uint32_t wl, uint32_t wh) +void +octeon_uart_write_hex2(uint32_t wl, uint32_t wh) { - sprintf(wstr, "0x%X-0x%X ", wh, wl); - octeon_uart_write_string(0, wstr); + sprintf(wstr, "0x%X-0x%X ", wh, wl); + octeon_uart_write_string(0, wstr); } -void octeon_uart_write_hex (uint32_t wl) +void +octeon_uart_write_hex(uint32_t wl) { - sprintf(wstr, " 0x%X ", wl); - octeon_uart_write_string(0, wstr); + sprintf(wstr, " 0x%X ", wl); + octeon_uart_write_string(0, wstr); } /* * octeon_wait_uart_flush */ -void octeon_wait_uart_flush (int uart_index, uint8_t ch) +void +octeon_wait_uart_flush(int uart_index, uint8_t ch) { - uint64_t val; - int64_t val3; - uint32_t cpu_status_bits; + uint64_t val; + int64_t val3; + uint32_t cpu_status_bits; - if ((uart_index < 0) || (uart_index > 1)) { - return; - } - - cpu_status_bits = octeon_disable_interrupts(); - /* Force Flush the IOBus */ - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); - for (val3 = 0xfffffffff; val3 > 0; val3--) { - val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); - if (((uint8_t) val) & LSR_TEMT) { - break; - } - } - octeon_set_interrupts(cpu_status_bits); + if ((uart_index < 0) || (uart_index > 1)) { + return; + } + cpu_status_bits = octeon_disable_interrupts(); + /* Force Flush the IOBus */ + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); + for (val3 = 0xfffffffff; val3 > 0; val3--) { + val = oct_read64(OCTEON_MIO_UART0_LSR + (uart_index * 0x400)); + if (((uint8_t) val) & LSR_TEMT) { + break; + } + } + octeon_set_interrupts(cpu_status_bits); } @@ -447,23 +474,26 @@ * Does nothing. * Used to mark the point for simulator to begin tracing */ -void octeon_debug_symbol (void) +void +octeon_debug_symbol(void) { } -void octeon_ciu_stop_gtimer (int timer) +void +octeon_ciu_stop_gtimer(int timer) { - oct_write64(OCTEON_CIU_GENTIMER_ADDR(timer), 0ll); + oct_write64(OCTEON_CIU_GENTIMER_ADDR(timer), 0ll); } -void octeon_ciu_start_gtimer (int timer, u_int one_shot, uint64_t time_cycles) +void +octeon_ciu_start_gtimer(int timer, u_int one_shot, uint64_t time_cycles) { - octeon_ciu_gentimer gentimer; + octeon_ciu_gentimer gentimer; - gentimer.word64 = 0; - gentimer.bits.one_shot = one_shot; - gentimer.bits.len = time_cycles - 1; - oct_write64(OCTEON_CIU_GENTIMER_ADDR(timer), gentimer.word64); + gentimer.word64 = 0; + gentimer.bits.one_shot = one_shot; + gentimer.bits.len = time_cycles - 1; + oct_write64(OCTEON_CIU_GENTIMER_ADDR(timer), gentimer.word64); } /* @@ -471,22 +501,23 @@ * * Shutdown all CIU to IP2, IP3 mappings */ -void octeon_ciu_reset (void) +void +octeon_ciu_reset(void) { - octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_0); - octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_1); - octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_2); - octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_3); + octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_0); + octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_1); + octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_2); + octeon_ciu_stop_gtimer(CIU_GENTIMER_NUM_3); - ciu_disable_intr(CIU_THIS_CORE, CIU_INT_0, CIU_EN_0); - ciu_disable_intr(CIU_THIS_CORE, CIU_INT_0, CIU_EN_1); - ciu_disable_intr(CIU_THIS_CORE, CIU_INT_1, CIU_EN_0); - ciu_disable_intr(CIU_THIS_CORE, CIU_INT_1, CIU_EN_1); + ciu_disable_intr(CIU_THIS_CORE, CIU_INT_0, CIU_EN_0); + ciu_disable_intr(CIU_THIS_CORE, CIU_INT_0, CIU_EN_1); + ciu_disable_intr(CIU_THIS_CORE, CIU_INT_1, CIU_EN_0); + ciu_disable_intr(CIU_THIS_CORE, CIU_INT_1, CIU_EN_1); - ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_0, CIU_EN_0, 0ll); - ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_1, CIU_EN_0, 0ll); - ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_1, CIU_EN_1, 0ll); + ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_0, CIU_EN_0, 0ll); + ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_1, CIU_EN_0, 0ll); + ciu_clear_int_summary(CIU_THIS_CORE, CIU_INT_1, CIU_EN_1, 0ll); } /* @@ -494,12 +525,13 @@ * * Disable interrupts in the CPU controller */ -void mips_disable_interrupt_controls (void) +void +mips_disable_interrupt_controls(void) { - /* - * Disable interrupts in CIU. - */ - octeon_ciu_reset(); + /* + * Disable interrupts in CIU. + */ + octeon_ciu_reset(); } static uint64_t ciu_get_intr_sum_reg_addr(int core_num, int intx, int enx); @@ -507,101 +539,108 @@ /* * ciu_get_intr_sum_reg_addr */ -static uint64_t ciu_get_intr_sum_reg_addr (int core_num, int intx, int enx) +static uint64_t +ciu_get_intr_sum_reg_addr(int core_num, int intx, int enx) { - uint64_t ciu_intr_sum_reg_addr; + uint64_t ciu_intr_sum_reg_addr; - if (enx == CIU_EN_0) { - ciu_intr_sum_reg_addr = OCTEON_CIU_SUMMARY_BASE_ADDR + (core_num * 0x10) + - (intx * 0x8); - } else { - ciu_intr_sum_reg_addr = OCTEON_CIU_SUMMARY_INT1_ADDR; - } + if (enx == CIU_EN_0) { + ciu_intr_sum_reg_addr = OCTEON_CIU_SUMMARY_BASE_ADDR + (core_num * 0x10) + + (intx * 0x8); + } else { + ciu_intr_sum_reg_addr = OCTEON_CIU_SUMMARY_INT1_ADDR; + } - return (ciu_intr_sum_reg_addr); + return (ciu_intr_sum_reg_addr); } -//#ifndef OCTEON_SMP +// +#ifndef OCTEON_SMP static uint64_t ciu_get_intr_en_reg_addr(int core_num, int intx, int enx); /* * ciu_get_intr_en_reg_addr */ -static uint64_t ciu_get_intr_en_reg_addr (int core_num, int intx, int enx) +static uint64_t +ciu_get_intr_en_reg_addr(int core_num, int intx, int enx) { - uint64_t ciu_intr_reg_addr; + uint64_t ciu_intr_reg_addr; - ciu_intr_reg_addr = OCTEON_CIU_ENABLE_BASE_ADDR + ((enx == 0) ? 0x0 : 0x8) + - (intx * 0x10) + (core_num * 0x20); + ciu_intr_reg_addr = OCTEON_CIU_ENABLE_BASE_ADDR + ((enx == 0) ? 0x0 : 0x8) + + (intx * 0x10) + (core_num * 0x20); - return (ciu_intr_reg_addr); + return (ciu_intr_reg_addr); } -//#else +// +#else -uint64_t ciu_get_en_reg_addr_new (int corenum, int intx, int enx, int ciu_ip); +uint64_t ciu_get_en_reg_addr_new(int corenum, int intx, int enx, int ciu_ip); /* * ciu_get_intr_reg_addr * * 200 ---int0,en0 ip2 * 208 ---int0,en1 ip2 ----> this is wrong... this is watchdog - * + * * 210 ---int0,en0 ip3 -- * 218 ---int0,en1 ip3 ----> same here.. .this is watchdog... right? - * + * * 220 ---int1,en0 ip2 * 228 ---int1,en1 ip2 * 230 ---int1,en0 ip3 -- * 238 ---int1,en1 ip3 * */ -uint64_t ciu_get_en_reg_addr_new (int corenum, int intx, int enx, int ciu_ip) +uint64_t +ciu_get_en_reg_addr_new(int corenum, int intx, int enx, int ciu_ip) { - uint64_t ciu_intr_reg_addr = OCTEON_CIU_ENABLE_BASE_ADDR; + uint64_t ciu_intr_reg_addr = OCTEON_CIU_ENABLE_BASE_ADDR; - if (enx < CIU_EN_0 || enx > CIU_EN_1) { - printf("%s: invalid enx value %d, should be %d or %d\n", - __FUNCTION__, enx, CIU_EN_0, CIU_EN_1); - return 0; - } - if (intx < CIU_INT_0 || intx > CIU_INT_1) { - printf("%s: invalid intx value %d, should be %d or %d\n", - __FUNCTION__, enx, CIU_INT_0, CIU_INT_1); - return 0; - } - if (ciu_ip < CIU_MIPS_IP2 || ciu_ip > CIU_MIPS_IP3) { - printf("%s: invalid ciu_ip value %d, should be %d or %d\n", - __FUNCTION__, ciu_ip, CIU_MIPS_IP2, CIU_MIPS_IP3); - return 0; - } + if (enx < CIU_EN_0 || enx > CIU_EN_1) { + printf("%s: invalid enx value %d, should be %d or %d\n", + __FUNCTION__, enx, CIU_EN_0, CIU_EN_1); + return 0; + } + if (intx < CIU_INT_0 || intx > CIU_INT_1) { + printf("%s: invalid intx value %d, should be %d or %d\n", + __FUNCTION__, enx, CIU_INT_0, CIU_INT_1); + return 0; + } + if (ciu_ip < CIU_MIPS_IP2 || ciu_ip > CIU_MIPS_IP3) { + printf("%s: invalid ciu_ip value %d, should be %d or %d\n", + __FUNCTION__, ciu_ip, CIU_MIPS_IP2, CIU_MIPS_IP3); + return 0; + } + ciu_intr_reg_addr += (enx * 0x8); + ciu_intr_reg_addr += (ciu_ip * 0x10); + ciu_intr_reg_addr += (intx * 0x20); - ciu_intr_reg_addr += (enx * 0x8); - ciu_intr_reg_addr += (ciu_ip * 0x10); - ciu_intr_reg_addr += (intx * 0x20); + return (ciu_intr_reg_addr); +} - return (ciu_intr_reg_addr); -} -//#endif +// +#endif /* * ciu_get_int_summary */ -uint64_t ciu_get_int_summary (int core_num, int intx, int enx) +uint64_t ciu_get_int_summary(int core_num, int intx, int enx) { - uint64_t ciu_intr_sum_reg_addr; + uint64_t ciu_intr_sum_reg_addr; - if (core_num == CIU_THIS_CORE) { - core_num = octeon_get_core_num(); - } - ciu_intr_sum_reg_addr = ciu_get_intr_sum_reg_addr(core_num, intx, enx); - return (oct_read64(ciu_intr_sum_reg_addr)); + if (core_num == CIU_THIS_CORE) { + core_num = octeon_get_core_num(); + } + ciu_intr_sum_reg_addr = ciu_get_intr_sum_reg_addr(core_num, intx, enx); + return (oct_read64(ciu_intr_sum_reg_addr)); } -//#define DEBUG_CIU 1 +// +#define DEBUG_CIU 1 #ifdef DEBUG_CIU #define DEBUG_CIU_SUM 1 @@ -612,121 +651,122 @@ /* * ciu_clear_int_summary */ -void ciu_clear_int_summary (int core_num, int intx, int enx, uint64_t write_bits) +void +ciu_clear_int_summary(int core_num, int intx, int enx, uint64_t write_bits) { - uint32_t cpu_status_bits; - uint64_t ciu_intr_sum_reg_addr; + uint32_t cpu_status_bits; + uint64_t ciu_intr_sum_reg_addr; -//#define DEBUG_CIU_SUM 1 + // +#define DEBUG_CIU_SUM 1 #ifdef DEBUG_CIU_SUM - uint64_t ciu_intr_sum_bits; + uint64_t ciu_intr_sum_bits; #endif - if (core_num == CIU_THIS_CORE) { - core_num = octeon_get_core_num(); - } - + if (core_num == CIU_THIS_CORE) { + core_num = octeon_get_core_num(); + } #ifdef DEBUG_CIU_SUM - printf(" CIU: core %u clear sum IntX %u Enx %u Bits: 0x%llX\n", - core_num, intx, enx, write_bits); + printf(" CIU: core %u clear sum IntX %u Enx %u Bits: 0x%llX\n", + core_num, intx, enx, write_bits); #endif - cpu_status_bits = octeon_disable_interrupts(); + cpu_status_bits = octeon_disable_interrupts(); - ciu_intr_sum_reg_addr = ciu_get_intr_sum_reg_addr(core_num, intx, enx); + ciu_intr_sum_reg_addr = ciu_get_intr_sum_reg_addr(core_num, intx, enx); #ifdef DEBUG_CIU_SUM - ciu_intr_sum_bits = oct_read64(ciu_intr_sum_reg_addr); /* unneeded dummy read */ - printf(" CIU: status: 0x%X reg_addr: 0x%llX Val: 0x%llX -> 0x%llX", - cpu_status_bits, ciu_intr_sum_reg_addr, ciu_intr_sum_bits, - ciu_intr_sum_bits | write_bits); + ciu_intr_sum_bits = oct_read64(ciu_intr_sum_reg_addr); /* unneeded dummy read */ + printf(" CIU: status: 0x%X reg_addr: 0x%llX Val: 0x%llX -> 0x%llX", + cpu_status_bits, ciu_intr_sum_reg_addr, ciu_intr_sum_bits, + ciu_intr_sum_bits | write_bits); #endif - oct_write64(ciu_intr_sum_reg_addr, write_bits); - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ + oct_write64(ciu_intr_sum_reg_addr, write_bits); + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ #ifdef DEBUG_CIU_SUM - printf(" Readback: 0x%llX\n\n ", (uint64_t) oct_read64(ciu_intr_sum_reg_addr)); + printf(" Readback: 0x%llX\n\n ", (uint64_t) oct_read64(ciu_intr_sum_reg_addr)); #endif - - octeon_set_interrupts(cpu_status_bits); + + octeon_set_interrupts(cpu_status_bits); } /* * ciu_disable_intr */ -void ciu_disable_intr (int core_num, int intx, int enx) +void +ciu_disable_intr(int core_num, int intx, int enx) { - uint32_t cpu_status_bits; - uint64_t ciu_intr_reg_addr; + uint32_t cpu_status_bits; + uint64_t ciu_intr_reg_addr; - if (core_num == CIU_THIS_CORE) { - core_num = octeon_get_core_num(); - } + if (core_num == CIU_THIS_CORE) { + core_num = octeon_get_core_num(); + } + cpu_status_bits = octeon_disable_interrupts(); - cpu_status_bits = octeon_disable_interrupts(); - - ciu_intr_reg_addr = ciu_get_intr_en_reg_addr(core_num, intx, enx); + ciu_intr_reg_addr = ciu_get_intr_en_reg_addr(core_num, intx, enx); - oct_read64(ciu_intr_reg_addr); /* Dummy read */ + oct_read64(ciu_intr_reg_addr); /* Dummy read */ - oct_write64(ciu_intr_reg_addr, 0LL); - oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ + oct_write64(ciu_intr_reg_addr, 0LL); + oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ - octeon_set_interrupts(cpu_status_bits); + octeon_set_interrupts(cpu_status_bits); } -void ciu_dump_interrutps_enabled (int core_num, int intx, int enx, int ciu_ip); -void ciu_dump_interrutps_enabled (int core_num, int intx, int enx, int ciu_ip) +void ciu_dump_interrutps_enabled(int core_num, int intx, int enx, int ciu_ip); +void +ciu_dump_interrutps_enabled(int core_num, int intx, int enx, int ciu_ip) { uint64_t ciu_intr_reg_addr; uint64_t ciu_intr_bits; - if (core_num == CIU_THIS_CORE) { - core_num = octeon_get_core_num(); - } - + if (core_num == CIU_THIS_CORE) { + core_num = octeon_get_core_num(); + } #ifndef OCTEON_SMP_1 ciu_intr_reg_addr = ciu_get_intr_en_reg_addr(core_num, intx, enx); #else ciu_intr_reg_addr = ciu_get_en_reg_addr_new(core_num, intx, enx, ciu_ip); #endif - if (!ciu_intr_reg_addr) { - printf("Bad call to %s\n", __FUNCTION__); - while(1); - return; - } - - ciu_intr_bits = oct_read64(ciu_intr_reg_addr); - printf(" CIU core %d int: %d en: %d ip: %d Add: 0x%llX enabled: 0x%llX SR: %X\n", - core_num, intx, enx, ciu_ip, ciu_intr_reg_addr, ciu_intr_bits, mips_rd_status()); + if (!ciu_intr_reg_addr) { + printf("Bad call to %s\n", __FUNCTION__); + while (1); + return; + } + ciu_intr_bits = oct_read64(ciu_intr_reg_addr); + printf(" CIU core %d int: %d en: %d ip: %d Add: 0x%llX enabled: 0x%llX SR: %X\n", + core_num, intx, enx, ciu_ip, ciu_intr_reg_addr, ciu_intr_bits, mips_rd_status()); } /* * ciu_enable_interrupts */ -void ciu_enable_interrupts (int core_num, int intx, int enx, uint64_t set_these_interrupt_bits, - int ciu_ip) +void +ciu_enable_interrupts(int core_num, int intx, int enx, uint64_t set_these_interrupt_bits, + int ciu_ip) { uint32_t cpu_status_bits; uint64_t ciu_intr_reg_addr; uint64_t ciu_intr_bits; - if (core_num == CIU_THIS_CORE) { - core_num = octeon_get_core_num(); - } + if (core_num == CIU_THIS_CORE) { + core_num = octeon_get_core_num(); + } + // +#define DEBUG_CIU_EN 1 -// #define DEBUG_CIU_EN 1 - #ifdef DEBUG_CIU_EN - printf(" CIU: core %u enabling Intx %u Enx %u IP %d Bits: 0x%llX\n", - core_num, intx, enx, ciu_ip, set_these_interrupt_bits); + printf(" CIU: core %u enabling Intx %u Enx %u IP %d Bits: 0x%llX\n", + core_num, intx, enx, ciu_ip, set_these_interrupt_bits); #endif cpu_status_bits = octeon_disable_interrupts(); @@ -737,19 +777,18 @@ ciu_intr_reg_addr = ciu_get_en_reg_addr_new(core_num, intx, enx, ciu_ip); #endif - if (!ciu_intr_reg_addr) { - printf("Bad call to %s\n", __FUNCTION__); - while(1); - return; - } - - ciu_intr_bits = oct_read64(ciu_intr_reg_addr); + if (!ciu_intr_reg_addr) { + printf("Bad call to %s\n", __FUNCTION__); + while (1); + return; + } + ciu_intr_bits = oct_read64(ciu_intr_reg_addr); #ifdef DEBUG_CIU_EN - printf(" CIU: status: 0x%X reg_addr: 0x%llX Val: 0x%llX -> 0x%llX", - cpu_status_bits, ciu_intr_reg_addr, ciu_intr_bits, ciu_intr_bits | set_these_interrupt_bits); + printf(" CIU: status: 0x%X reg_addr: 0x%llX Val: 0x%llX -> 0x%llX", + cpu_status_bits, ciu_intr_reg_addr, ciu_intr_bits, ciu_intr_bits | set_these_interrupt_bits); #endif - ciu_intr_bits |= set_these_interrupt_bits; + ciu_intr_bits |= set_these_interrupt_bits; oct_write64(ciu_intr_reg_addr, ciu_intr_bits); #ifdef OCTEON_SMP mips_wbflush(); @@ -757,7 +796,7 @@ oct_read64(OCTEON_MIO_BOOT_BIST_STAT); /* Bus Barrier */ #ifdef DEBUG_CIU_EN - printf(" Readback: 0x%llX\n\n ", (uint64_t) oct_read64(ciu_intr_reg_addr)); + printf(" Readback: 0x%llX\n\n ", (uint64_t) oct_read64(ciu_intr_reg_addr)); #endif octeon_set_interrupts(cpu_status_bits); @@ -765,10 +804,10 @@ static void -mips_platform_init (void) +mips_platform_init(void) { - octeon_ciu_reset(); - octeon_uart_write_string(0, "\nPlatform Starting\n"); + octeon_ciu_reset(); + octeon_uart_write_string(0, "\nPlatform Starting\n"); } @@ -781,7 +820,7 @@ **************************************************************************************** */ -/* Define the struct that is initialized by the bootloader used by the +/* Define the struct that is initialized by the bootloader used by the * startup code. * * Copyright (c) 2004, 2005, 2006 Cavium Networks. @@ -803,89 +842,94 @@ typedef struct { - /* Start of block referenced by assembly code - do not change! */ - uint32_t desc_version; - uint32_t desc_size; + /* Start of block referenced by assembly code - do not change! */ + uint32_t desc_version; + uint32_t desc_size; - uint64_t stack_top; - uint64_t heap_base; - uint64_t heap_end; - uint64_t entry_point; /* Only used by bootloader */ - uint64_t desc_vaddr; - /* End of This block referenced by assembly code - do not change! */ + uint64_t stack_top; + uint64_t heap_base; + uint64_t heap_end; + uint64_t entry_point; /* Only used by bootloader */ + uint64_t desc_vaddr; + /* End of This block referenced by assembly code - do not change! */ - uint32_t exception_base_addr; - uint32_t stack_size; - uint32_t heap_size; - uint32_t argc; /* Argc count for application */ - uint32_t argv[OCTEON_ARGV_MAX_ARGS]; - uint32_t flags; - uint32_t core_mask; - uint32_t dram_size; /**< DRAM size in megabyes */ - uint32_t phy_mem_desc_addr; /**< physical address of free memory descriptor block*/ - uint32_t debugger_flags_base_addr; /**< used to pass flags from app to debugger */ - uint32_t eclock_hz; /**< CPU clock speed, in hz */ - uint32_t dclock_hz; /**< DRAM clock speed, in hz */ - uint32_t spi_clock_hz; /**< SPI4 clock in hz */ - uint16_t board_type; - uint8_t board_rev_major; - uint8_t board_rev_minor; - uint16_t chip_type; - uint8_t chip_rev_major; - uint8_t chip_rev_minor; - char board_serial_number[OCTEON_SERIAL_LEN]; - uint8_t mac_addr_base[6]; - uint8_t mac_addr_count; - uint64_t cvmx_desc_vaddr; + uint32_t exception_base_addr; + uint32_t stack_size; + uint32_t heap_size; + uint32_t argc; /* Argc count for application */ + uint32_t argv[OCTEON_ARGV_MAX_ARGS]; + uint32_t flags; + uint32_t core_mask; + uint32_t dram_size; /**< DRAM size in megabyes */ + uint32_t phy_mem_desc_addr; /**< physical address of free memory descriptor block*/ + uint32_t debugger_flags_base_addr; /**< used to pass flags from app to debugger */ + uint32_t eclock_hz; /**< CPU clock speed, in hz */ + uint32_t dclock_hz; /**< DRAM clock speed, in hz */ + uint32_t spi_clock_hz; /**< SPI4 clock in hz */ + uint16_t board_type; + uint8_t board_rev_major; + uint8_t board_rev_minor; + uint16_t chip_type; + uint8_t chip_rev_major; + uint8_t chip_rev_minor; + char board_serial_number[OCTEON_SERIAL_LEN]; + uint8_t mac_addr_base[6]; + uint8_t mac_addr_count; + uint64_t cvmx_desc_vaddr; -} octeon_boot_descriptor_t; +} octeon_boot_descriptor_t; -#define CVMX_BOOTINFO_MIN_VER 2 +#define CVMX_BOOTINFO_MIN_VER 2 typedef struct { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:00:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D07716A52C; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44CBD16A401 for ; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0A013C507 for ; Wed, 20 Feb 2008 18:00:51 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KI0pix075815 for ; Wed, 20 Feb 2008 18:00:51 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KI0pqv075812 for perforce@freebsd.org; Wed, 20 Feb 2008 18:00:51 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:00:51 GMT Message-Id: <200802201800.m1KI0pqv075812@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135811 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:00:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=135811 Change 135811 by rrs@rrs-mips2-jnpr on 2008/02/20 18:00:25 s9 indent. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#6 (text+ko) ==== @@ -76,7 +76,7 @@ #include /* Cavium specific defines pulled from there update of ns16559.h */ -#define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ +#define USR_TXFIFO_NOTFULL 2 /* Uart TX FIFO Not full */ #include "uart_if.h" @@ -338,13 +338,13 @@ uart_barrier(bas); } -static inline void +static inline void oct16550_wait_txhr_empty(struct uart_bas *bas, int limit, int delay) { while (((uart_getreg(bas, OCT_REG_LSR) & LSR_THRE) == 0) && ((uart_getreg(bas, OCT_REG_USR) & USR_TX_FIFO_NOTFULL) == 0) && --limit) DELAY(delay); -} +} static void oct16550_putc(struct uart_bas *bas, int c) @@ -548,8 +548,7 @@ case UART_IOCTL_BREAK: lcr = uart_getreg(bas, OCT_REG_LCR); if (data) - - lcr |= LCR_SBREAK; + lcr |= LCR_SBREAK; else lcr &= ~LCR_SBREAK; uart_setreg(bas, OCT_REG_LCR, lcr); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:01:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ABF9D16A40A; Wed, 20 Feb 2008 18:01:52 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7023C16A406 for ; Wed, 20 Feb 2008 18:01:52 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 55F1213C4CE for ; Wed, 20 Feb 2008 18:01:52 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KI1qWD075862 for ; Wed, 20 Feb 2008 18:01:52 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KI1q0O075859 for perforce@freebsd.org; Wed, 20 Feb 2008 18:01:52 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:01:52 GMT Message-Id: <200802201801.m1KI1q0O075859@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135812 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:01:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=135812 Change 135812 by rrs@rrs-mips2-jnpr on 2008/02/20 18:00:53 s9indent of file. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#5 (text+ko) ==== @@ -194,8 +194,10 @@ static void octeon_rgmx_stop(struct rgmx_softc_dev *sc); static void octeon_rgmx_config_speed(u_int port, u_int); static void octeon_dump_rgmx_stats(u_int port); + #ifdef __not_used__ static void rgmx_timer_periodic(void); + #endif static void octeon_rgmx_enable_RED_all(int, int); @@ -217,6 +219,7 @@ /* Standard driver entry points. These can be static. */ static void octeon_rgmx_init(void *); + /* static driver_intr_t rgmx_intr; */ static int octeon_rgmx_ioctl(struct ifnet *, u_long, caddr_t); static void octeon_rgmx_output_start(struct ifnet *); @@ -272,7 +275,7 @@ -static u_int +static u_int get_rgmx_port_ordinal(u_int port) { u_int idx; @@ -299,7 +302,7 @@ -static void +static void octeon_rgmx_init_sc(struct rgmx_softc_dev *sc, device_t dev, u_int port, u_int num_devices) { int ii; @@ -329,7 +332,7 @@ } -static int +static int octeon_rgmx_init_ifnet(struct rgmx_softc_dev *sc) { struct ifnet *ifp; @@ -355,14 +358,14 @@ ifp->if_capenable = ifp->if_capabilities; ifp->if_init = octeon_rgmx_init; ifp->if_linkmib = NULL; - /*&sc->mibdata; */ + /* &sc->mibdata; */ ifp->if_linkmiblen = 0; - /*sizeof(sc->mibdata);*/ + /* sizeof(sc->mibdata); */ /* * Set fixed interface flags. */ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - /*|IFF_NEEDSGIANT; */ + /* |IFF_NEEDSGIANT; */ if (ifp->if_snd.ifq_maxlen == 0) ifp->if_snd.ifq_maxlen = ifqmaxlen; @@ -385,7 +388,7 @@ /* ------------------------------------------------------------------- * * rgmii_identify() * * ------------------------------------------------------------------- */ -static void +static void rgmii_identify(driver_t * drv, device_t parent) { BUS_ADD_CHILD(parent, 0, "rgmii", 0); @@ -395,7 +398,7 @@ /* ------------------------------------------------------------------- * * rgmii_probe() * * ------------------------------------------------------------------- */ -static int +static int rgmii_probe(device_t dev) { if (device_get_unit(dev) != 0) @@ -410,7 +413,7 @@ /* ------------------------------------------------------------------- * * rgmii_attach() * * ------------------------------------------------------------------- */ -static int +static int rgmii_attach(device_t dev) { struct rgmx_softc_dev *sc; @@ -585,20 +588,21 @@ #ifdef __not_used__ static void octeon_dump_pow_stats(void); + #endif #ifdef OCTEON_RGMX_SCHEDULED_ISRS -static void +static void octeon_rgmx_isr_link(void *context, int pending) { octeon_line_status_loop(NULL); } -static void +static void octeon_rgmx_isr_rxtx(void *context, int pending) { octeon_rx_loop(NULL); @@ -615,7 +619,7 @@ #define OCTEON_RGMX_POW_TIME_THR_INTS 1 -static int +static int octeon_rgmx_intr_fast(void *arg) { @@ -676,7 +680,7 @@ * Also note that the RGMX_LOCK/UNLOCK code will have to checked/added, since that is new and * was not supported with this model. */ -static int +static int octeon_rgmx_intr(void *arg) { int flag = 0; @@ -785,7 +789,7 @@ #define DEBUG_RX 1 -static void +static void octeon_rgmx_rx_process_work(octeon_wqe_t * work, u_int port) { struct rgmx_softc_dev *sc; @@ -803,8 +807,8 @@ data_start = octeon_pow_pktptr_to_kbuffer(work->packet_ptr); #ifdef DEBUG_RX2 - printf(" WQE 0x%p: port:%u ", work, port); - printf(" Grp: %u, %x Tag: %x type: %u 0x%x\n", + printf(" WQE 0x%p: port:%u ", work, port); + printf(" Grp: %u, %x Tag: %x type: %u 0x%x\n", work->grp, work->grp, work->tag, work->tag_type, work->tag_type); #endif @@ -858,7 +862,12 @@ mbuf = octeon_rgmx_build_new_rx_mbuf(ifp, new_data_start, len); if (mbuf) { - /*printf(" Passing pkt to ifp: pkt_len: %u len: %u ", mbuf->m_pkthdr.len, mbuf->m_len); */ + /* + * printf(" Passing pkt to + * ifp: pkt_len: %u len: %u + * ", mbuf->m_pkthdr.len, + * mbuf->m_len); + */ #ifdef DEBUG_RX_PKT_DUMP dc = mtod(mbuf, u_char *); @@ -913,7 +922,7 @@ #endif -static void +static void octeon_rx_loop(void *unused) { u_int core_id; @@ -996,7 +1005,7 @@ } -static u_int +static u_int octeon_rgmx_pko_xmit_packet(struct rgmx_softc_dev *sc, void *out_buff, u_int len, u_int checksum) { octeon_pko_command_word0_t pko_cmd; @@ -1008,14 +1017,12 @@ int queue = 0; /* - * we should randomize queue - * based on core num. Using same - * queue 0 for this - * port, by all cores on is less efficient. + * we should randomize queue based on core num. Using same queue 0 + * for this port, by all cores on is less efficient. */ /* - * Prepare the PKO buffer and command word. Cmd Buf Word 0 - * No FAU Set #-segs and #-bytes + * Prepare the PKO buffer and command word. Cmd Buf Word 0 No FAU + * Set #-segs and #-bytes */ pko_cmd.word64 = 0; pko_cmd.bits.segs = 1; @@ -1031,10 +1038,10 @@ pko_pkt_word.bits.addr = OCTEON_PTR2PHYS(out_buff); pko_pkt_word.bits.pool = OCTEON_FPA_TX_PACKET_POOL; pko_pkt_word.bits.size = 2048; - /*dummy.Actual len is above. */ + /* dummy.Actual len is above. */ #ifdef DEBUG_TX - printf(" PKO: 0x%llX 0x%llX ", pko_cmd.word64, pko_pkt_word.word64); + printf(" PKO: 0x%llX 0x%llX ", pko_cmd.word64, pko_pkt_word.word64); #endif /* @@ -1114,7 +1121,7 @@ static void octeon_rgmx_xmit_mark_buffers_done(struct rgmx_softc_dev *sc, u_int n); -static void +static void octeon_rgmx_xmit_mark_buffers_done(struct rgmx_softc_dev *sc, u_int n) { struct mbuf *m; @@ -1129,7 +1136,7 @@ IF_DEQUEUE(&sc->tx_pending_queue, m); if (!m) { break; - /*Queue became empty now.Break out. */ + /* Queue became empty now.Break out. */ } /* * Return the mbuf to system. @@ -1139,7 +1146,7 @@ } if (!i) { return; - /*Nothing removed from queue. */ + /* Nothing removed from queue. */ } /* * The transmitter is no more active. Reset output active flag and @@ -1160,7 +1167,7 @@ * * Drop all packets queued at ifnet layer. */ -static void +static void octeon_rgmx_output_flush(struct ifnet *ifp) { struct mbuf *m; @@ -1189,7 +1196,7 @@ * * Start output on interface. */ -static void +static void octeon_rgmx_output_start(struct ifnet *ifp) { struct rgmx_softc_dev *sc = ifp->if_softc; @@ -1206,7 +1213,7 @@ * * Start output on interface. Assume Driver locked */ -static void +static void octeon_rgmx_output_start_locked(struct ifnet *ifp) { struct rgmx_softc_dev *sc = ifp->if_softc; @@ -1290,14 +1297,14 @@ #ifdef DEBUG_TX_PKT_DUMP { - int ii; - u_char *dc = out_buff; + int ii; + u_char *dc = out_buff; - printf("\n"); - printf("Out: "); - for (ii = 0; ii < len; ii++) - printf(" %X", dc[ii]); - printf("\n"); + printf("\n"); + printf("Out: "); + for (ii = 0; ii < len; ii++) + printf(" %X", dc[ii]); + printf("\n"); } #endif @@ -1329,7 +1336,7 @@ * outgoing packets in the transmission buffer. */ ifp->if_oerrors++; - /*sc->mibdata.dot3StatsInternalMacTransmitErrors++;*/ + /* sc->mibdata.dot3StatsInternalMacTransmitErrors++; */ ifp->if_drv_flags |= IFF_DRV_OACTIVE; return; } @@ -1344,7 +1351,7 @@ * Initialize Octeon hardware components. To get the RGMX going. * */ -static void +static void octeon_config_hw_units_pre_ports(void) { @@ -1408,7 +1415,7 @@ -static void +static void octeon_config_hw_units_port(struct rgmx_softc_dev *sc, u_int port) { const u_int priorities[8] = {8, 8, 8, 8, 8, 8, 8, 8}; @@ -1460,8 +1467,8 @@ struct { uint64_t rsvd3:4; uint64_t thr_freq:28; - /*R / O */ - uint64_t rsvd2:4; + /* R / O */ + uint64_t rsvd2:4; uint64_t thr_period:20; uint64_t rsvd:8; } bits; @@ -1515,7 +1522,7 @@ } octeon_pow_inpt_q_grp_qos; -static void +static void octeon_config_hw_units_post_ports(void) { @@ -1535,10 +1542,10 @@ #else thr.bits.ds_thr = thr.bits.iq_thr = 1; - /*Only if doing - *absolute queue - cnt interrupts. + /* + * Only if doing absolute queue - cnt interrupts. */ - oct_write64(OCTEON_POW_WORKQUEUE_INT_THRESHOLD(OCTEON_POW_RX_GROUP_NUM), thr.word64); + oct_write64(OCTEON_POW_WORKQUEUE_INT_THRESHOLD(OCTEON_POW_RX_GROUP_NUM), thr.word64); #endif ciu_enable_interrupts(OCTEON_CORE_ID, OCTEON_RGMX_CIU_INTX, OCTEON_RGMX_CIU_ENX, @@ -1560,7 +1567,7 @@ -static void +static void octeon_rgmx_config_pip(u_int port) { octeon_pip_gbl_cfg_t pip_config; @@ -1625,7 +1632,7 @@ * octeon_rgmx_stop_port * */ -static u_int +static u_int octeon_rgmx_stop_port(u_int port) { int interface = INTERFACE(port); @@ -1640,7 +1647,7 @@ return (last_enabled); } -static void +static void octeon_rgmx_start_port(u_int port) { int interface = INTERFACE(port); @@ -1653,7 +1660,7 @@ } -static void +static void octeon_rgmx_stop(struct rgmx_softc_dev *sc) { octeon_rgmx_stop_port(sc->port); @@ -1667,7 +1674,7 @@ /* Change the media selection. */ -static int +static int octeon_rgmx_medchange(struct ifnet *ifp) { struct rgmx_softc_dev *sc = ifp->if_softc; @@ -1708,7 +1715,7 @@ } -static void +static void octeon_rgmx_medstat(struct ifnet *ifp, struct ifmediareq *ifm) { /* @@ -1716,7 +1723,7 @@ */ } -static int +static int octeon_rgmx_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct rgmx_softc_dev *sc = ifp->if_softc; @@ -1813,7 +1820,7 @@ * Initialize the rgmx driver for this instance * Initialize device. */ -static void +static void octeon_rgmx_mark_ready(struct rgmx_softc_dev *sc) { @@ -1843,7 +1850,7 @@ } -static void +static void octeon_rgmx_init(void *xsc) { @@ -1860,7 +1867,7 @@ -static void +static void octeon_rgmx_config_speed(u_int port, u_int report_link) { int index = INDEX(port); @@ -1949,7 +1956,7 @@ if (link_status.bits.status != old_link_status.bits.status) { #define DEBUG_LINESTATUS - if (link_status.bits.status) { + if (link_status.bits.status) { #ifdef DEBUG_LINESTATUS printf(" %u/%u: Interface is now alive\n", iface, port); #endif @@ -1969,14 +1976,14 @@ -static void +static void octeon_dump_rgmx_stats(u_int port) { } #ifdef _not_used_ -static void +static void rgmx_timer_periodic(void) { u_int port; @@ -2032,9 +2039,10 @@ octeon_rgmx_config_speed(port, 1); } } + #endif #ifdef _not_used_ -static void +static void octeon_dump_pow_stats(void) { octeon_rgmx_pow_nos_cnt nos_cnt; @@ -2082,12 +2090,13 @@ printf(" Grp-%u: %u ", i, inpt_q_grp.bits.iq_cnt); } } + #endif /* ------------------------------------------------------------------- * * octeon_line_status_loop() * * ------------------------------------------------------------------- */ -static void +static void octeon_line_status_loop(void *unused) { struct rgmx_softc_dev *sc; @@ -2106,15 +2115,15 @@ #define DEBUG_RGMX_DUMP #ifdef DEBUG_RGMX_DUMP - static int count = 0; + static int count = 0; if (++count > 5) { count = 0; - /*octeon_dump_fpa_pool(OCTEON_FPA_RX_PACKET_POOL);*/ - /*octeon_dump_fpa_pool(OCTEON_FPA_WQE_RX_POOL);*/ - /*octeon_dump_fpa_pool(OCTEON_FPA_TX_PACKET_POOL);*/ + /* octeon_dump_fpa_pool(OCTEON_FPA_RX_PACKET_POOL); */ + /* octeon_dump_fpa_pool(OCTEON_FPA_WQE_RX_POOL); */ + /* octeon_dump_fpa_pool(OCTEON_FPA_TX_PACKET_POOL); */ octeon_dump_rgmx_stats(16); - /*octeon_dump_pow_stats();*/ + /* octeon_dump_pow_stats(); */ } #endif } @@ -2129,7 +2138,7 @@ * Program the ethernet HW address * */ -static void +static void octeon_rgmx_set_mac(u_int port) { struct rgmx_softc_dev *sc; @@ -2170,7 +2179,7 @@ /* ------------------------------------------------------------------- * * octeon_config_rgmii_port() * * ------------------------------------------------------------------- */ -static void +static void octeon_config_rgmii_port(u_int port) { u_int iface = INTERFACE(port); @@ -2205,7 +2214,7 @@ -static void +static void octeon_rgmx_enable_RED_queue(int queue, int slow_drop, int all_drop) { octeon_rgmx_ipd_queue_red_marks_t red_marks; @@ -2230,7 +2239,7 @@ } -static void +static void octeon_rgmx_enable_RED_all(int slow_drop, int all_drop) { @@ -2270,7 +2279,7 @@ /* ------------------------------------------------------------------- * * octeon_has_4ports() * * ------------------------------------------------------------------- */ -static int +static int octeon_has_4ports(void) { u_int chipid; @@ -2300,7 +2309,7 @@ * We will not support detachment for now. But keep adding good code that will be used * someday. */ -static void +static void octeon_rgmx_free_intr(struct rgmx_softc_dev *sc) { device_t dev = sc->sc_dev; @@ -2323,6 +2332,7 @@ #endif } + #endif static device_method_t rgmii_methods[] = { From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:02:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CD69516A411; Wed, 20 Feb 2008 18:02:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B64E16A40D for ; Wed, 20 Feb 2008 18:02:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6E62A13C457 for ; Wed, 20 Feb 2008 18:02:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KI23M5075876 for ; Wed, 20 Feb 2008 18:02:03 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KI1qrw075865 for perforce@freebsd.org; Wed, 20 Feb 2008 18:01:52 GMT (envelope-from rpaulo@FreeBSD.org) Date: Wed, 20 Feb 2008 18:01:52 GMT Message-Id: <200802201801.m1KI1qrw075865@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 135813 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:02:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=135813 Change 135813 by rpaulo@rpaulo_vmware on 2008/02/20 18:01:19 IFC Affected files ... .. //depot/projects/tcpecn/amd64/acpica/madt.c#2 integrate .. //depot/projects/tcpecn/amd64/amd64/busdma_machdep.c#3 integrate .. //depot/projects/tcpecn/amd64/amd64/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/amd64/amd64/identcpu.c#3 integrate .. //depot/projects/tcpecn/amd64/amd64/minidump_machdep.c#2 integrate .. //depot/projects/tcpecn/amd64/conf/GENERIC#5 integrate .. //depot/projects/tcpecn/amd64/conf/NOTES#4 integrate .. //depot/projects/tcpecn/amd64/include/proc.h#2 integrate .. //depot/projects/tcpecn/amd64/include/specialreg.h#3 integrate .. //depot/projects/tcpecn/amd64/linux32/linux32_machdep.c#2 integrate .. //depot/projects/tcpecn/arm/arm/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/arm/arm/genassym.c#2 integrate .. //depot/projects/tcpecn/arm/arm/locore.S#2 integrate .. //depot/projects/tcpecn/arm/arm/pmap.c#5 integrate .. //depot/projects/tcpecn/arm/arm/swtch.S#2 integrate .. //depot/projects/tcpecn/arm/include/asmacros.h#3 integrate .. //depot/projects/tcpecn/arm/include/atomic.h#4 integrate .. //depot/projects/tcpecn/arm/include/pmap.h#2 integrate .. //depot/projects/tcpecn/arm/include/sysarch.h#2 integrate .. //depot/projects/tcpecn/boot/Makefile#2 integrate .. //depot/projects/tcpecn/boot/ofw/libofw/ofw_console.c#2 integrate .. //depot/projects/tcpecn/boot/powerpc/ofw/Makefile#3 integrate .. //depot/projects/tcpecn/boot/powerpc/ofw/conf.c#2 integrate .. //depot/projects/tcpecn/boot/powerpc/uboot/Makefile#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/conf.c#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/help.uboot#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/ldscript.powerpc#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/metadata.c#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/start.S#1 branch .. //depot/projects/tcpecn/boot/powerpc/uboot/version#1 branch .. //depot/projects/tcpecn/boot/uboot/Makefile#1 branch .. //depot/projects/tcpecn/boot/uboot/common/Makefile.inc#1 branch .. //depot/projects/tcpecn/boot/uboot/common/main.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/Makefile#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/api_public.h#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/console.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/copy.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/devicename.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/disk.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/elf_freebsd.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/glue.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/libuboot.h#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/module.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/net.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/reboot.c#1 branch .. //depot/projects/tcpecn/boot/uboot/lib/time.c#1 branch .. //depot/projects/tcpecn/cam/cam_periph.c#2 integrate .. //depot/projects/tcpecn/cam/cam_xpt.c#4 integrate .. //depot/projects/tcpecn/compat/freebsd32/freebsd32_proto.h#5 integrate .. //depot/projects/tcpecn/compat/freebsd32/freebsd32_syscall.h#5 integrate .. //depot/projects/tcpecn/compat/freebsd32/freebsd32_syscalls.c#5 integrate .. //depot/projects/tcpecn/compat/freebsd32/freebsd32_sysent.c#5 integrate .. //depot/projects/tcpecn/compat/freebsd32/syscalls.master#5 integrate .. //depot/projects/tcpecn/compat/ndis/kern_ndis.c#2 integrate .. //depot/projects/tcpecn/compat/opensolaris/kern/opensolaris_kmem.c#2 integrate .. //depot/projects/tcpecn/compat/opensolaris/sys/kmem.h#3 integrate .. //depot/projects/tcpecn/conf/Makefile.arm#2 integrate .. //depot/projects/tcpecn/conf/NOTES#5 integrate .. //depot/projects/tcpecn/conf/files#5 integrate .. //depot/projects/tcpecn/conf/files.amd64#3 integrate .. //depot/projects/tcpecn/conf/files.i386#3 integrate .. //depot/projects/tcpecn/conf/files.powerpc#3 integrate .. //depot/projects/tcpecn/conf/files.sparc64#3 integrate .. //depot/projects/tcpecn/conf/kern.post.mk#2 integrate .. //depot/projects/tcpecn/conf/kern.pre.mk#2 integrate .. //depot/projects/tcpecn/conf/options#5 integrate .. //depot/projects/tcpecn/contrib/opensolaris/uts/common/fs/zfs/arc.c#3 integrate .. //depot/projects/tcpecn/ddb/db_capture.c#2 integrate .. //depot/projects/tcpecn/ddb/db_textdump.c#3 integrate .. //depot/projects/tcpecn/dev/acpica/acpi.c#2 integrate .. //depot/projects/tcpecn/dev/acpica/acpi_cpu.c#2 integrate .. //depot/projects/tcpecn/dev/acpica/acpi_thermal.c#4 integrate .. //depot/projects/tcpecn/dev/aic7xxx/aic79xx_osm.c#2 integrate .. //depot/projects/tcpecn/dev/amr/amr.c#4 integrate .. //depot/projects/tcpecn/dev/amr/amrreg.h#2 integrate .. //depot/projects/tcpecn/dev/amr/amrvar.h#3 integrate .. //depot/projects/tcpecn/dev/bfe/if_bfe.c#2 integrate .. //depot/projects/tcpecn/dev/bfe/if_bfereg.h#2 integrate .. //depot/projects/tcpecn/dev/ciss/ciss.c#2 integrate .. //depot/projects/tcpecn/dev/coretemp/coretemp.c#3 integrate .. //depot/projects/tcpecn/dev/cxgb/cxgb_sge.c#4 integrate .. //depot/projects/tcpecn/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#2 integrate .. //depot/projects/tcpecn/dev/cxgb/ulp/tom/cxgb_tcp.h#2 integrate .. //depot/projects/tcpecn/dev/hatm/if_hatm_intr.c#2 integrate .. //depot/projects/tcpecn/dev/hptiop/hptiop.c#2 integrate .. //depot/projects/tcpecn/dev/hptiop/hptiop.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/tcpecn/dev/hptrr/array.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/him.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/tcpecn/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/tcpecn/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/tcpecn/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/tcpecn/dev/hptrr/ldm.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/list.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/tcpecn/dev/hptrr/osm.h#2 integrate .. //depot/projects/tcpecn/dev/iscsi/initiator/isc_soc.c#2 integrate .. //depot/projects/tcpecn/dev/lge/if_lge.c#2 integrate .. //depot/projects/tcpecn/dev/mfi/mfi.c#3 integrate .. //depot/projects/tcpecn/dev/mfi/mfireg.h#2 integrate .. //depot/projects/tcpecn/dev/mii/amphy.c#2 integrate .. //depot/projects/tcpecn/dev/mii/miidevs#2 integrate .. //depot/projects/tcpecn/dev/mii/nsphy.c#2 integrate .. //depot/projects/tcpecn/dev/mii/nsphyter.c#1 branch .. //depot/projects/tcpecn/dev/mii/nsphyterreg.h#1 branch .. //depot/projects/tcpecn/dev/msk/if_msk.c#4 integrate .. //depot/projects/tcpecn/dev/mxge/if_mxge.c#3 integrate .. //depot/projects/tcpecn/dev/mxge/if_mxge_var.h#3 integrate .. //depot/projects/tcpecn/dev/mxge/mxge_lro.c#3 integrate .. //depot/projects/tcpecn/dev/mxge/rss_eth_z8e.h#2 integrate .. //depot/projects/tcpecn/dev/mxge/rss_ethp_z8e.h#2 integrate .. //depot/projects/tcpecn/dev/nfe/if_nfe.c#3 integrate .. //depot/projects/tcpecn/dev/patm/if_patm_rx.c#2 integrate .. //depot/projects/tcpecn/dev/pci/pci.c#2 integrate .. //depot/projects/tcpecn/dev/ral/rt2560.c#2 integrate .. //depot/projects/tcpecn/dev/ral/rt2560reg.h#2 integrate .. //depot/projects/tcpecn/dev/ral/rt2560var.h#2 integrate .. //depot/projects/tcpecn/dev/rr232x/LICENSE#2 delete .. //depot/projects/tcpecn/dev/rr232x/README#2 delete .. //depot/projects/tcpecn/dev/rr232x/amd64-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/tcpecn/dev/rr232x/array.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/him.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/himfuncs.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/hptintf.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/i386-elf.rr232x_lib.o.uu#2 delete .. //depot/projects/tcpecn/dev/rr232x/ldm.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/list.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/os_bsd.c#2 delete .. //depot/projects/tcpecn/dev/rr232x/os_bsd.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/osm.h#2 delete .. //depot/projects/tcpecn/dev/rr232x/osm_bsd.c#2 delete .. //depot/projects/tcpecn/dev/rr232x/rr232x_config.c#2 delete .. //depot/projects/tcpecn/dev/rr232x/rr232x_config.h#2 delete .. //depot/projects/tcpecn/dev/sk/if_sk.c#2 integrate .. //depot/projects/tcpecn/dev/sk/if_skreg.h#2 integrate .. //depot/projects/tcpecn/dev/syscons/syscons.c#4 integrate .. //depot/projects/tcpecn/dev/syscons/syscons.h#3 integrate .. //depot/projects/tcpecn/dev/ti/if_ti.c#2 integrate .. //depot/projects/tcpecn/dev/twe/twe.c#2 integrate .. //depot/projects/tcpecn/dev/usb/ehci.c#3 integrate .. //depot/projects/tcpecn/dev/usb/if_udav.c#3 integrate .. //depot/projects/tcpecn/dev/usb/uark.c#2 integrate .. //depot/projects/tcpecn/dev/usb/uftdi.c#2 integrate .. //depot/projects/tcpecn/dev/usb/uftdireg.h#2 integrate .. //depot/projects/tcpecn/dev/usb/usbdi.c#2 integrate .. //depot/projects/tcpecn/dev/wpi/if_wpi.c#4 integrate .. //depot/projects/tcpecn/fs/cd9660/cd9660_vfsops.c#3 integrate .. //depot/projects/tcpecn/fs/coda/TODO#2 integrate .. //depot/projects/tcpecn/fs/coda/cnode.h#3 integrate .. //depot/projects/tcpecn/fs/coda/coda_fbsd.c#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_io.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_kernel.h#2 delete .. //depot/projects/tcpecn/fs/coda/coda_namecache.c#2 delete .. //depot/projects/tcpecn/fs/coda/coda_namecache.h#3 delete .. //depot/projects/tcpecn/fs/coda/coda_opstats.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_pioctl.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_psdev.c#3 integrate .. //depot/projects/tcpecn/fs/coda/coda_psdev.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_subr.c#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_subr.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_venus.c#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_venus.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_vfsops.c#3 integrate .. //depot/projects/tcpecn/fs/coda/coda_vfsops.h#2 integrate .. //depot/projects/tcpecn/fs/coda/coda_vnops.c#3 integrate .. //depot/projects/tcpecn/fs/coda/coda_vnops.h#2 integrate .. //depot/projects/tcpecn/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/tcpecn/fs/hpfs/hpfs_subr.h#3 integrate .. //depot/projects/tcpecn/fs/hpfs/hpfs_vfsops.c#4 integrate .. //depot/projects/tcpecn/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/tcpecn/fs/ntfs/ntfs_subr.c#3 integrate .. //depot/projects/tcpecn/fs/nullfs/null_vfsops.c#3 integrate .. //depot/projects/tcpecn/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/tcpecn/fs/nwfs/nwfs_node.c#3 integrate .. //depot/projects/tcpecn/fs/smbfs/smbfs_node.c#3 integrate .. //depot/projects/tcpecn/fs/udf/udf_vfsops.c#4 integrate .. //depot/projects/tcpecn/fs/unionfs/union_subr.c#4 integrate .. //depot/projects/tcpecn/geom/geom_disk.c#2 integrate .. //depot/projects/tcpecn/geom/linux_lvm/g_linux_lvm.c#1 branch .. //depot/projects/tcpecn/geom/linux_lvm/g_linux_lvm.h#1 branch .. //depot/projects/tcpecn/gnu/fs/ext2fs/ext2_vfsops.c#3 integrate .. //depot/projects/tcpecn/gnu/fs/reiserfs/reiserfs_inode.c#3 integrate .. //depot/projects/tcpecn/gnu/fs/xfs/FreeBSD/xfs_buf.c#3 integrate .. //depot/projects/tcpecn/i386/acpica/madt.c#2 integrate .. //depot/projects/tcpecn/i386/conf/GENERIC#5 integrate .. //depot/projects/tcpecn/i386/conf/NOTES#4 integrate .. //depot/projects/tcpecn/i386/i386/busdma_machdep.c#3 integrate .. //depot/projects/tcpecn/i386/i386/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/i386/i386/geode.c#2 integrate .. //depot/projects/tcpecn/i386/i386/minidump_machdep.c#2 integrate .. //depot/projects/tcpecn/i386/include/proc.h#2 integrate .. //depot/projects/tcpecn/i386/linux/linux_machdep.c#3 integrate .. //depot/projects/tcpecn/ia64/conf/GENERIC#4 integrate .. //depot/projects/tcpecn/ia64/ia64/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/ia64/ia64/locore.S#2 integrate .. //depot/projects/tcpecn/ia64/ia64/machdep.c#3 integrate .. //depot/projects/tcpecn/ia64/ia64/pmap.c#3 integrate .. //depot/projects/tcpecn/ia64/include/md_var.h#2 integrate .. //depot/projects/tcpecn/kern/init_sysent.c#4 integrate .. //depot/projects/tcpecn/kern/kern_descrip.c#5 integrate .. //depot/projects/tcpecn/kern/kern_exit.c#3 integrate .. //depot/projects/tcpecn/kern/kern_jail.c#3 integrate .. //depot/projects/tcpecn/kern/kern_lock.c#5 integrate .. //depot/projects/tcpecn/kern/kern_mbuf.c#3 integrate .. //depot/projects/tcpecn/kern/kern_mib.c#5 integrate .. //depot/projects/tcpecn/kern/kern_module.c#3 integrate .. //depot/projects/tcpecn/kern/kern_mutex.c#4 integrate .. //depot/projects/tcpecn/kern/kern_rwlock.c#5 integrate .. //depot/projects/tcpecn/kern/kern_shutdown.c#4 integrate .. //depot/projects/tcpecn/kern/kern_tc.c#3 integrate .. //depot/projects/tcpecn/kern/kern_timeout.c#2 integrate .. //depot/projects/tcpecn/kern/subr_autoconf.c#2 integrate .. //depot/projects/tcpecn/kern/subr_bus.c#4 integrate .. //depot/projects/tcpecn/kern/subr_lock.c#4 integrate .. //depot/projects/tcpecn/kern/subr_sleepqueue.c#2 integrate .. //depot/projects/tcpecn/kern/subr_turnstile.c#2 integrate .. //depot/projects/tcpecn/kern/syscalls.c#4 integrate .. //depot/projects/tcpecn/kern/syscalls.master#4 integrate .. //depot/projects/tcpecn/kern/systrace_args.c#4 integrate .. //depot/projects/tcpecn/kern/sysv_shm.c#2 integrate .. //depot/projects/tcpecn/kern/tty_pty.c#3 integrate .. //depot/projects/tcpecn/kern/uipc_cow.c#2 integrate .. //depot/projects/tcpecn/kern/uipc_mbuf.c#3 integrate .. //depot/projects/tcpecn/kern/uipc_shm.c#3 integrate .. //depot/projects/tcpecn/kern/uipc_sockbuf.c#3 integrate .. //depot/projects/tcpecn/kern/uipc_socket.c#2 integrate .. //depot/projects/tcpecn/kern/uipc_syscalls.c#4 integrate .. //depot/projects/tcpecn/kern/vfs_aio.c#3 integrate .. //depot/projects/tcpecn/kern/vfs_bio.c#5 integrate .. //depot/projects/tcpecn/kern/vfs_default.c#3 integrate .. //depot/projects/tcpecn/kern/vfs_mount.c#5 integrate .. //depot/projects/tcpecn/kern/vfs_subr.c#5 integrate .. //depot/projects/tcpecn/kern/vfs_syscalls.c#4 integrate .. //depot/projects/tcpecn/modules/Makefile#3 integrate .. //depot/projects/tcpecn/modules/coda/Makefile#2 integrate .. //depot/projects/tcpecn/modules/coda5/Makefile#2 integrate .. //depot/projects/tcpecn/modules/cxgb/cxgb/Makefile#3 integrate .. //depot/projects/tcpecn/modules/geom/Makefile#2 integrate .. //depot/projects/tcpecn/modules/geom/geom_linux_lvm/Makefile#1 branch .. //depot/projects/tcpecn/modules/mii/Makefile#2 integrate .. //depot/projects/tcpecn/modules/rr232x/Makefile#2 delete .. //depot/projects/tcpecn/net/bpf.c#3 integrate .. //depot/projects/tcpecn/net/route.c#4 integrate .. //depot/projects/tcpecn/net80211/ieee80211_ht.c#2 integrate .. //depot/projects/tcpecn/net80211/ieee80211_ht.h#2 integrate .. //depot/projects/tcpecn/net80211/ieee80211_input.c#2 integrate .. //depot/projects/tcpecn/netgraph/netflow/netflow.c#2 integrate .. //depot/projects/tcpecn/netgraph/netflow/ng_netflow.c#2 integrate .. //depot/projects/tcpecn/netgraph/netgraph.h#2 integrate .. //depot/projects/tcpecn/netgraph/ng_base.c#3 integrate .. //depot/projects/tcpecn/netgraph/ng_bpf.c#2 integrate .. //depot/projects/tcpecn/netgraph/ng_iface.c#2 integrate .. //depot/projects/tcpecn/netgraph/ng_ppp.c#3 integrate .. //depot/projects/tcpecn/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/tcpecn/netgraph/ng_pred1.c#2 integrate .. //depot/projects/tcpecn/netgraph/ng_tee.c#2 integrate .. //depot/projects/tcpecn/netinet/in.c#2 integrate .. //depot/projects/tcpecn/netinet/in_rmx.c#2 integrate .. //depot/projects/tcpecn/netinet/ip_carp.c#2 integrate .. //depot/projects/tcpecn/netinet/ip_fw.h#2 integrate .. //depot/projects/tcpecn/netinet/ip_fw2.c#3 integrate .. //depot/projects/tcpecn/netinet/ip_id.c#2 integrate .. //depot/projects/tcpecn/netinet/ip_options.c#2 integrate .. //depot/projects/tcpecn/netinet/ip_output.c#2 integrate .. //depot/projects/tcpecn/netinet/sctp_auth.c#2 integrate .. //depot/projects/tcpecn/netinet/sctp_bsd_addr.c#3 integrate .. //depot/projects/tcpecn/netinet/sctp_indata.c#2 integrate .. //depot/projects/tcpecn/netinet/sctp_input.c#2 integrate .. //depot/projects/tcpecn/netinet/sctp_pcb.c#2 integrate .. //depot/projects/tcpecn/netinet/sctp_peeloff.c#2 integrate .. //depot/projects/tcpecn/netinet/sctputil.c#3 integrate .. //depot/projects/tcpecn/netinet6/in6.c#4 integrate .. //depot/projects/tcpecn/netinet6/ip6_output.c#4 integrate .. //depot/projects/tcpecn/netinet6/ip6_var.h#3 integrate .. //depot/projects/tcpecn/netinet6/raw_ip6.c#4 integrate .. //depot/projects/tcpecn/netinet6/udp6_usrreq.c#4 integrate .. //depot/projects/tcpecn/netipsec/ipsec.c#3 integrate .. //depot/projects/tcpecn/netipsec/ipsec.h#3 integrate .. //depot/projects/tcpecn/netipsec/ipsec6.h#2 integrate .. //depot/projects/tcpecn/netncp/ncp_conn.c#2 integrate .. //depot/projects/tcpecn/netsmb/smb_conn.c#2 integrate .. //depot/projects/tcpecn/nfs4client/nfs4_idmap.c#2 integrate .. //depot/projects/tcpecn/nfs4client/nfs4_vfsops.c#3 integrate .. //depot/projects/tcpecn/nfs4client/nfs4_vnops.c#3 integrate .. //depot/projects/tcpecn/nfsclient/nfs_bio.c#2 integrate .. //depot/projects/tcpecn/nfsclient/nfs_diskless.c#2 integrate .. //depot/projects/tcpecn/nfsclient/nfs_node.c#2 integrate .. //depot/projects/tcpecn/nfsclient/nfs_socket.c#3 integrate .. //depot/projects/tcpecn/nfsclient/nfs_subs.c#3 integrate .. //depot/projects/tcpecn/nfsclient/nfs_vfsops.c#3 integrate .. //depot/projects/tcpecn/nfsclient/nfs_vnops.c#3 integrate .. //depot/projects/tcpecn/nfsclient/nfsm_subs.h#2 integrate .. //depot/projects/tcpecn/nfsclient/nfsnode.h#2 integrate .. //depot/projects/tcpecn/pci/if_wb.c#2 integrate .. //depot/projects/tcpecn/powerpc/aim/machdep.c#2 integrate .. //depot/projects/tcpecn/powerpc/aim/ofw_machdep.c#2 integrate .. //depot/projects/tcpecn/powerpc/conf/GENERIC#4 integrate .. //depot/projects/tcpecn/powerpc/conf/NOTES#3 integrate .. //depot/projects/tcpecn/powerpc/include/intr_machdep.h#2 integrate .. //depot/projects/tcpecn/powerpc/include/openpicreg.h#2 integrate .. //depot/projects/tcpecn/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/tcpecn/powerpc/powermac/ata_kauai.c#2 integrate .. //depot/projects/tcpecn/powerpc/powermac/hrowpic.c#2 integrate .. //depot/projects/tcpecn/powerpc/powermac/openpic_macio.c#2 integrate .. //depot/projects/tcpecn/powerpc/powerpc/intr_machdep.c#2 integrate .. //depot/projects/tcpecn/powerpc/powerpc/openpic.c#2 integrate .. //depot/projects/tcpecn/powerpc/powerpc/pic_if.m#2 integrate .. //depot/projects/tcpecn/powerpc/psim/openpic_iobus.c#2 integrate .. //depot/projects/tcpecn/security/audit/audit.c#3 integrate .. //depot/projects/tcpecn/security/mac_mls/mac_mls.c#2 integrate .. //depot/projects/tcpecn/sparc64/include/md_var.h#2 integrate .. //depot/projects/tcpecn/sparc64/sparc64/ata_machdep.c#1 branch .. //depot/projects/tcpecn/sparc64/sparc64/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/sun4v/sun4v/dump_machdep.c#2 integrate .. //depot/projects/tcpecn/sys/buf.h#3 integrate .. //depot/projects/tcpecn/sys/bus.h#2 integrate .. //depot/projects/tcpecn/sys/conf.h#2 integrate .. //depot/projects/tcpecn/sys/event.h#2 integrate .. //depot/projects/tcpecn/sys/ipc.h#2 integrate .. //depot/projects/tcpecn/sys/lock.h#2 integrate .. //depot/projects/tcpecn/sys/lockmgr.h#4 integrate .. //depot/projects/tcpecn/sys/mbuf.h#4 integrate .. //depot/projects/tcpecn/sys/module.h#2 integrate .. //depot/projects/tcpecn/sys/param.h#6 integrate .. //depot/projects/tcpecn/sys/priv.h#3 integrate .. //depot/projects/tcpecn/sys/proc.h#4 integrate .. //depot/projects/tcpecn/sys/rwlock.h#2 integrate .. //depot/projects/tcpecn/sys/shm.h#2 integrate .. //depot/projects/tcpecn/sys/socket.h#3 integrate .. //depot/projects/tcpecn/sys/socketvar.h#3 integrate .. //depot/projects/tcpecn/sys/syscall.h#4 integrate .. //depot/projects/tcpecn/sys/syscall.mk#4 integrate .. //depot/projects/tcpecn/sys/syscallsubr.h#3 integrate .. //depot/projects/tcpecn/sys/sysproto.h#4 integrate .. //depot/projects/tcpecn/sys/user.h#4 integrate .. //depot/projects/tcpecn/tools/embed_mfs.sh#1 branch .. //depot/projects/tcpecn/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/tcpecn/ufs/ffs/ffs_vfsops.c#3 integrate .. //depot/projects/tcpecn/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/tcpecn/ufs/ufs/ufs_extattr.c#3 integrate Differences ... ==== //depot/projects/tcpecn/amd64/acpica/madt.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.24 2007/05/08 22:01:02 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.25 2008/01/31 16:51:42 jhb Exp $"); #include #include @@ -109,9 +109,11 @@ /* * Code to abuse the crashdump map to map in the tables for the early * probe. We cheat and make the following assumptions about how we - * use this KVA: page 0 is used to map in the first page of each table - * found via the RSDT or XSDT and pages 1 to n are used to map in the - * RSDT or XSDT. The offset is in pages; the length is in bytes. + * use this KVA: pages 0 and 1 are used to map in the header of each + * table found via the RSDT or XSDT and pages 2 to n are used to map + * in the RSDT or XSDT. We have to use 2 pages for the table headers + * in case a header spans a page boundary. The offset is in pages; + * the length is in bytes. */ static void * madt_map(vm_paddr_t pa, int offset, vm_offset_t length) @@ -232,7 +234,7 @@ printf("MADT: RSDP failed extended checksum\n"); return (ENXIO); } - xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 1, + xsdt = madt_map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); if (xsdt == NULL) { if (bootverbose) @@ -246,7 +248,7 @@ break; madt_unmap_table(xsdt); } else { - rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 1, + rsdt = madt_map_table(rsdp->RsdtPhysicalAddress, 2, ACPI_SIG_RSDT); if (rsdt == NULL) { if (bootverbose) ==== //depot/projects/tcpecn/amd64/amd64/busdma_machdep.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.84 2007/11/27 17:28:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.85 2008/02/12 16:24:30 scottl Exp $"); #include #include @@ -598,14 +598,14 @@ * Count the number of bounce pages * needed in order to complete this transfer */ - vaddr = trunc_page((vm_offset_t)buf); + vaddr = (vm_offset_t)buf; vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); if (run_filter(dmat, paddr) != 0) map->pagesneeded++; - vaddr += PAGE_SIZE; + vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } ==== //depot/projects/tcpecn/amd64/amd64/dump_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.12 2006/04/21 04:24:50 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/dump_machdep.c,v 1.14 2008/02/15 06:26:25 scottl Exp $"); #include #include @@ -140,7 +140,7 @@ ptr += len; sz -= len; if (fragsz == DEV_BSIZE) { - error = di->dumper(di->priv, buffer, 0, dumplo, + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); if (error) return error; @@ -160,7 +160,7 @@ if (fragsz == 0) return (0); - error = di->dumper(di->priv, buffer, 0, dumplo, DEV_BSIZE); + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); dumplo += DEV_BSIZE; fragsz = 0; return (error); @@ -177,6 +177,7 @@ uint64_t pgs; size_t counter, sz, chunk; int i, c, error, twiddle; + u_int maxdumppgs; error = 0; /* catch case in which chunk size is 0 */ counter = 0; /* Update twiddle every 16MB */ @@ -184,13 +185,16 @@ va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; + maxdumppgs = di->maxiosize / PAGE_SIZE; + if (maxdumppgs == 0) /* seatbelt */ + maxdumppgs = 1; printf(" chunk %d: %ldMB (%ld pages)", seqnr, PG2MB(pgs), pgs); while (pgs) { chunk = pgs; - if (chunk > MAXDUMPPGS) - chunk = MAXDUMPPGS; + if (chunk > maxdumppgs) + chunk = maxdumppgs; sz = chunk << PAGE_SHIFT; counter += sz; if (counter >> 24) { @@ -201,7 +205,7 @@ a = pa + i * PAGE_SIZE; va = pmap_kenter_temporary(trunc_page(a), i); } - error = di->dumper(di->priv, va, 0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz; @@ -327,7 +331,7 @@ ehdr.e_phnum); /* Dump leader */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); @@ -358,12 +362,12 @@ goto fail; /* Dump trailer */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; /* Signal completion, signoff and exit stage left. */ - di->dumper(di->priv, NULL, 0, 0, 0); + dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); return; ==== //depot/projects/tcpecn/amd64/amd64/identcpu.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.155 2007/12/08 21:13:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.157 2008/02/02 23:17:27 das Exp $"); #include "opt_cpu.h" @@ -223,7 +223,7 @@ "\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 @@ "\021" "\022" "\023DCA" /* Direct Cache Access */ - "\024" - "\025" - "\026" + "\024SSE4.1" + "\025SSE4.2" + "\026x2APIC" /* xAPIC Extensions */ "\027" - "\030" + "\030POPCNT" "\031" "\032" "\033" ==== //depot/projects/tcpecn/amd64/amd64/minidump_machdep.c#2 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.2 2006/12/05 11:31:33 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/minidump_machdep.c,v 1.4 2008/02/15 06:26:25 scottl Exp $"); #include #include @@ -111,7 +111,7 @@ if (fragsz == 0) return (0); - error = di->dumper(di->priv, dump_va, 0, dumplo, fragsz); + error = dump_write(di, dump_va, 0, dumplo, fragsz); dumplo += fragsz; fragsz = 0; return (error); @@ -122,7 +122,11 @@ { size_t len; int error, i, c; + u_int maxdumpsz; + maxdumpsz = di->maxiosize; + if (maxdumpsz == 0) /* seatbelt */ + maxdumpsz = PAGE_SIZE; error = 0; if ((sz % PAGE_SIZE) != 0) { printf("size not page aligned\n"); @@ -143,7 +147,7 @@ return (error); } while (sz) { - len = (MAXDUMPPGS * PAGE_SIZE) - fragsz; + len = maxdumpsz - fragsz; if (len > sz) len = sz; counter += len; @@ -153,7 +157,7 @@ counter &= (1<<24) - 1; } if (ptr) { - error = di->dumper(di->priv, ptr, 0, dumplo, len); + error = dump_write(di, ptr, 0, dumplo, len); if (error) return (error); dumplo += len; @@ -165,7 +169,7 @@ fragsz += len; pa += len; sz -= len; - if (fragsz == (MAXDUMPPGS * PAGE_SIZE)) { + if (fragsz == maxdumpsz) { error = blk_flush(di); if (error) return (error); @@ -284,7 +288,7 @@ printf("Dumping %llu MB:", (long long)dumpsize >> 20); /* Dump leader */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); @@ -375,13 +379,13 @@ goto fail; /* Dump trailer */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); /* Signal completion, signoff and exit stage left. */ - di->dumper(di->priv, NULL, 0, 0, 0); + dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); return; ==== //depot/projects/tcpecn/amd64/conf/GENERIC#5 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.491 2008/01/07 21:40:09 jhb Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.493 2008/02/19 06:30:49 ru Exp $ cpu HAMMER ident GENERIC @@ -30,7 +30,7 @@ options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists @@ -116,7 +116,6 @@ device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters - # SCSI peripherals device scbus # SCSI bus (required for SCSI) device ch # SCSI media changers @@ -133,7 +132,6 @@ device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device rr232x # Highpoint RocketRAID 232x device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID ==== //depot/projects/tcpecn/amd64/conf/NOTES#4 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.74 2007/12/28 22:50:04 rpaulo Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.75 2008/02/03 07:07:30 scottl Exp $ # # @@ -381,11 +381,6 @@ device hptrr # -# Highpoint RocketRAID 232x. This is software RAID but with hardware -# acceleration assistance for RAID_5. -device rr232x - -# # Highpoint RocketRaid 3xxx series SATA RAID device hptiop ==== //depot/projects/tcpecn/amd64/include/proc.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 - * $FreeBSD: src/sys/amd64/include/proc.h,v 1.24 2005/04/04 21:53:52 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/proc.h,v 1.25 2008/01/31 08:24:27 mav Exp $ */ #ifndef _MACHINE_PROC_H_ @@ -44,4 +44,17 @@ struct mdproc { }; +#ifdef _KERNEL + +/* Get the current kernel thread stack usage. */ +#define GET_STACK_USAGE(total, used) do { \ + struct thread *td = curthread; \ + (total) = td->td_kstack_pages * PAGE_SIZE; \ + (used) = (char *)td->td_kstack + \ + td->td_kstack_pages * PAGE_SIZE - \ + (char *)&td; \ +} while (0) + +#endif /* _KERNEL */ + #endif /* !_MACHINE_PROC_H_ */ ==== //depot/projects/tcpecn/amd64/include/specialreg.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.41 2007/12/08 21:13:01 alc Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.43 2008/02/02 23:17:27 das Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -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 ==== //depot/projects/tcpecn/amd64/linux32/linux32_machdep.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.45 2007/07/04 23:06:43 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.46 2008/02/11 19:35:03 jkim Exp $"); #include #include @@ -907,21 +907,22 @@ PROC_UNLOCK(p); } - /* This gives us our maximum stack size */ - if (linux_args->len > STACK_SIZE - GUARD_SIZE) - bsd_args.len = linux_args->len; - else - bsd_args.len = STACK_SIZE - GUARD_SIZE; - /* - * This gives us a new BOS. If we're using VM_STACK, then - * mmap will just map the top SGROWSIZ bytes, and let - * the stack grow down to the limit at BOS. If we're - * not using VM_STACK we map the full stack, since we - * don't have a way to autogrow it. + * This gives us our maximum stack size and a new BOS. + * If we're using VM_STACK, then mmap will just map + * the top SGROWSIZ bytes, and let the stack grow down + * to the limit at BOS. If we're not using VM_STACK + * we map the full stack, since we don't have a way + * to autogrow it. */ - bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - - bsd_args.len; + if (linux_args->len > STACK_SIZE - GUARD_SIZE) { + bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); + bsd_args.len = linux_args->len; + } else { + bsd_args.addr = (caddr_t)PTRIN(linux_args->addr) - + (STACK_SIZE - GUARD_SIZE - linux_args->len); + bsd_args.len = STACK_SIZE - GUARD_SIZE; + } } else { bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); bsd_args.len = linux_args->len; ==== //depot/projects/tcpecn/arm/arm/dump_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/dump_machdep.c,v 1.2 2005/10/03 14:05:03 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/dump_machdep.c,v 1.3 2008/01/28 19:04:06 ru Exp $"); #include #include @@ -138,7 +138,7 @@ ptr += len; sz -= len; if (fragsz == DEV_BSIZE) { - error = di->dumper(di->priv, buffer, 0, dumplo, + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); if (error) return error; @@ -158,7 +158,7 @@ if (fragsz == 0) return (0); - error = di->dumper(di->priv, buffer, 0, dumplo, DEV_BSIZE); + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); dumplo += DEV_BSIZE; fragsz = 0; return (error); @@ -207,7 +207,7 @@ cpu_tlb_flushID_SE(0); cpu_cpwait(); } - error = di->dumper(di->priv, + error = dump_write(di, (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); if (error) break; @@ -330,7 +330,7 @@ ehdr.e_phnum); /* Dump leader */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); @@ -361,12 +361,12 @@ goto fail; /* Dump trailer */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; /* Signal completion, signoff and exit stage left. */ - di->dumper(di->priv, NULL, 0, 0, 0); + dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); return; ==== //depot/projects/tcpecn/arm/arm/genassym.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.10 2007/08/08 09:27:52 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.11 2008/02/05 10:22:33 raj Exp $"); #include #include #include @@ -102,6 +102,8 @@ ASSYM(P_FLAG, offsetof(struct proc, p_flag)); ASSYM(ARM_TP_ADDRESS, ARM_TP_ADDRESS); +ASSYM(ARM_RAS_START, ARM_RAS_START); +ASSYM(ARM_RAS_END, ARM_RAS_END); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(PDESIZE, PDESIZE); ASSYM(PMAP_DOMAIN_KERNEL, PMAP_DOMAIN_KERNEL); ==== //depot/projects/tcpecn/arm/arm/locore.S#2 (text+ko) ==== @@ -37,7 +37,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.17 2007/09/27 20:52:17 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.18 2008/02/05 10:23:42 raj Exp $"); /* What size should this really be ? It is only used by initarm() */ #define INIT_ARM_STACK_SIZE 2048 @@ -69,7 +69,7 @@ #if defined (FLASHADDR) && defined(LOADERRAMADDR) /* Check if we're running from flash. */ ldr r7, =FLASHADDR - /* + /* * If we're running with MMU disabled, test against the * physical address instead. */ @@ -88,7 +88,7 @@ bls from_ram do_copy: ldr r9, =KERNBASE - adr r1, _start + adr r1, _start ldr r0, Lreal_start ldr r2, Lend sub r2, r2, r0 @@ -105,7 +105,7 @@ adr r7, Lunmapped bic r7, r7, #0xff000000 orr r7, r7, #PHYSADDR - + disable_mmu: /* Disable MMU for a while */ @@ -170,7 +170,7 @@ ldr pc, .Lvirt_done virt_done: - mov fp, #0 /* trace back starts here */ + mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ /* init arm will return the new stack pointer. */ @@ -180,7 +180,7 @@ adr r0, .Lmainreturned b _C_LABEL(panic) - /* NOTEACHED */ + /* NOTREACHED */ #ifdef STARTUP_PAGETABLE_ADDR #define MMU_INIT(va,pa,n_sec,attr) \ .word n_sec ; \ @@ -229,9 +229,6 @@ .text .align 0 -#ifndef OFW - /* OFW based systems will used OF_boot() */ - .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -260,7 +257,7 @@ mov r2, #0 /* - * MMU & IDC off, 32 bit program & data space + * MMU & IDC off, 32 bit program & data space * Hurl ourselves into the ROM */ mov r0, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) @@ -285,7 +282,6 @@ .Lcpu_reset_needs_v4_MMU_disable: .word _C_LABEL(cpu_reset_needs_v4_MMU_disable) -#endif /* OFW */ #ifdef IPKDB /* ==== //depot/projects/tcpecn/arm/arm/pmap.c#5 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.97 2008/01/17 12:41:59 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.98 2008/01/31 00:05:40 cognet Exp $"); #include #include #include @@ -199,11 +199,8 @@ static void pmap_enter_locked(pmap_t, vm_offset_t, vm_page_t, vm_prot_t, boolean_t, int); -static void pmap_vac_me_harder(struct vm_page *, pmap_t, - vm_offset_t); -static void pmap_vac_me_kpmap(struct vm_page *, pmap_t, +static __inline void pmap_fix_cache(struct vm_page *, pmap_t, vm_offset_t); -static void pmap_vac_me_user(struct vm_page *, pmap_t, vm_offset_t); static void pmap_alloc_l1(pmap_t); static void pmap_free_l1(pmap_t); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:20:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C214F16A40A; Wed, 20 Feb 2008 18:20:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8746316A408 for ; Wed, 20 Feb 2008 18:20:22 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 553FF13C457 for ; Wed, 20 Feb 2008 18:20:22 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIKMST081039 for ; Wed, 20 Feb 2008 18:20:22 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIKMJC081036 for perforce@freebsd.org; Wed, 20 Feb 2008 18:20:22 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:20:22 GMT Message-Id: <200802201820.m1KIKMJC081036@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135814 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:20:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=135814 Change 135814 by rrs@rrs-mips2-jnpr on 2008/02/20 18:19:22 Get rid of debug CIU: Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#12 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#12 (text+ko) ==== @@ -657,8 +657,8 @@ uint32_t cpu_status_bits; uint64_t ciu_intr_sum_reg_addr; - // -#define DEBUG_CIU_SUM 1 + + /*#define DEBUG_CIU_SUM 1 */ #ifdef DEBUG_CIU_SUM uint64_t ciu_intr_sum_bits; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:31:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BBE2816A404; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 801B816A401 for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 42F9B13C45D for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIVYmt081476 for ; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIVYSr081473 for perforce@freebsd.org; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:31:34 GMT Message-Id: <200802201831.m1KIVYSr081473@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:31:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135815 Change 135815 by rrs@rrs-mips2-jnpr on 2008/02/20 18:30:48 s9 indent, kill rest of // Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_pcmap_regs.h#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_pcmap_regs.h#4 (text+ko) ==== @@ -49,68 +49,87 @@ #if defined(__mips_n32) || defined(__mips_n64) -static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) +static inline void +oct_write64(uint64_t csr_addr, uint64_t val64) { - uint64_t *ptr = (uint64_t *) csr_addr; - *ptr = val64; + uint64_t *ptr = (uint64_t *) csr_addr; + + *ptr = val64; } -static inline void oct_write64_int64 (uint64_t csr_addr, int64_t val64i) +static inline void +oct_write64_int64(uint64_t csr_addr, int64_t val64i) { - int64_t *ptr = (int64_t *) csr_addr; - *ptr = val64; + int64_t *ptr = (int64_t *) csr_addr; + + *ptr = val64; } -static inline void oct_write8_x8 (uint64_t csr_addr, uint8_t val8) +static inline void +oct_write8_x8(uint64_t csr_addr, uint8_t val8) { - uint64_t *ptr = (uint64_t *) csr_addr; - *ptr = (uint64_t) val8; + uint64_t *ptr = (uint64_t *) csr_addr; + + *ptr = (uint64_t) val8; } -static inline void oct_write8 (uint64_t csr_addr, uint8_t val8) +static inline void +oct_write8(uint64_t csr_addr, uint8_t val8) { - oct_write64(csr_addr, (uint64_t) val8); + oct_write64(csr_addr, (uint64_t) val8); } -static inline void oct_write16 (uint64_t csr_addr, uint16_t val16) +static inline void +oct_write16(uint64_t csr_addr, uint16_t val16) { - oct_write64(csr_addr, (uint64_t) val16); + oct_write64(csr_addr, (uint64_t) val16); } -static inline void oct_write32 (uint64_t csr_addr, uint32_t val32) +static inline void +oct_write32(uint64_t csr_addr, uint32_t val32) { - oct_write64(csr_addr, (uint64_t) val32); + oct_write64(csr_addr, (uint64_t) val32); } -static inline uint8_t oct_read8 (uint64_t csr_addr) +static inline uint8_t +oct_read8(uint64_t csr_addr) { - uint8_t *ptr = (uint8_t *) csr_addr; - return (*ptr); + uint8_t *ptr = (uint8_t *) csr_addr; + + return (*ptr); } -static inline uint16_t oct_read16 (uint64_t csr_addr) +static inline uint16_t +oct_read16(uint64_t csr_addr) { - uint16_t *ptr = (uint16_t *) csr_addr; - return (*ptr); + uint16_t *ptr = (uint16_t *) csr_addr; + + return (*ptr); } -static inline uint32_t oct_read32 (uint64_t csr_addr) +static inline uint32_t +oct_read32(uint64_t csr_addr) { - uint32_t *ptr = (uint32_t *) csr_addr; - return (*ptr); + uint32_t *ptr = (uint32_t *) csr_addr; + + return (*ptr); } -static inline uint64_t oct_read64 (uint64_t csr_addr) +static inline uint64_t +oct_read64(uint64_t csr_addr) { - uint64_t *ptr = (uint64_t *) csr_addr; - return (*ptr); + uint64_t *ptr = (uint64_t *) csr_addr; + + return (*ptr); } -static inline int32_t oct_readint32 (uint64_t csr_addr) +static inline int32_t +oct_readint32(uint64_t csr_addr) { - int32_t *ptr = (int32_t *) csr_addr; - return (*ptr); + int32_t *ptr = (int32_t *) csr_addr; + + return (*ptr); } @@ -124,60 +143,62 @@ /* * Read/write functions */ -static inline void oct_write64 (uint64_t csr_addr, uint64_t val64) +static inline void +oct_write64(uint64_t csr_addr, uint64_t val64) { - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - uint32_t valh = (uint64_t)val64 >> 32; - uint32_t vall = val64; - uint32_t tmp1; - uint32_t tmp2; - uint32_t tmp3; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t valh = (uint64_t) val64 >> 32; + uint32_t vall = val64; + uint32_t tmp1; + uint32_t tmp2; + uint32_t tmp3; - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %5, 32\n" - "dsll %2, %4, 32\n" - "dsrl %2, %2, 32\n" - "or %0, %0, %2\n" - "dsll %2, %6, 32\n" - "dsrl %2, %2, 32\n" - "or %1, %1, %2\n" - "sd %0, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) - : "r" (valh), "r" (vall), - "r" (csr_addrh), "r" (csr_addrl) - ); + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %5, 32\n" + "dsll %2, %4, 32\n" + "dsrl %2, %2, 32\n" + "or %0, %0, %2\n" + "dsll %2, %6, 32\n" + "dsrl %2, %2, 32\n" + "or %1, %1, %2\n" + "sd %0, 0(%1)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2), "=&r"(tmp3) + : "r"(valh), "r"(vall), + "r"(csr_addrh), "r"(csr_addrl) + ); } -static inline void oct_write64_int64 (uint64_t csr_addr, int64_t val64i) +static inline void +oct_write64_int64(uint64_t csr_addr, int64_t val64i) { - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - int32_t valh = (uint64_t)val64i >> 32; - int32_t vall = val64i; - uint32_t tmp1; - uint32_t tmp2; - uint32_t tmp3; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + int32_t valh = (uint64_t) val64i >> 32; + int32_t vall = val64i; + uint32_t tmp1; + uint32_t tmp2; + uint32_t tmp3; - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %5, 32\n" - "dsll %2, %4, 32\n" - "dsrl %2, %2, 32\n" - "or %0, %0, %2\n" - "dsll %2, %6, 32\n" - "dsrl %2, %2, 32\n" - "or %1, %1, %2\n" - "sd %0, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3) - : "r" (valh), "r" (vall), - "r" (csr_addrh), "r" (csr_addrl) - ); + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %5, 32\n" + "dsll %2, %4, 32\n" + "dsrl %2, %2, 32\n" + "or %0, %0, %2\n" + "dsll %2, %6, 32\n" + "dsrl %2, %2, 32\n" + "or %1, %1, %2\n" + "sd %0, 0(%1)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2), "=&r"(tmp3) + : "r"(valh), "r"(vall), + "r"(csr_addrh), "r"(csr_addrl) + ); } @@ -186,23 +207,24 @@ * * 8 bit data write into IO Space. Written using an 8 bit bus io transaction */ -static inline void oct_write8_x8 (uint64_t csr_addr, uint8_t val8) +static inline void +oct_write8_x8(uint64_t csr_addr, uint8_t val8) { - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1; + uint32_t tmp2; - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sb %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val8), "r" (csr_addrh), "r" (csr_addrl) ); + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %4, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "sb %2, 0(%0)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(val8), "r"(csr_addrh), "r"(csr_addrl)); } /* @@ -210,182 +232,198 @@ * * 8 bit data write into IO Space. Written using a 64 bit bus io transaction */ -static inline void oct_write8 (uint64_t csr_addr, uint8_t val8) +static inline void +oct_write8(uint64_t csr_addr, uint8_t val8) { #if 0 - oct_write64(csr_addr, (uint64_t) val8); + oct_write64(csr_addr, (uint64_t) val8); #else - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1; + uint32_t tmp2; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %4, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "sb %2, 0(%0)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(val8), "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sb %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val8), "r" (csr_addrh), "r" (csr_addrl) ); #endif } -static inline void oct_write16 (uint64_t csr_addr, uint16_t val16) +static inline void +oct_write16(uint64_t csr_addr, uint16_t val16) { #if 0 - oct_write64(csr_addr, (uint64_t) val16); + oct_write64(csr_addr, (uint64_t) val16); #else - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1; + uint32_t tmp2; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %4, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "sh %2, 0(%0)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(val16), "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sh %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val16), "r" (csr_addrh), "r" (csr_addrl) ); #endif } -static inline void oct_write32 (uint64_t csr_addr, uint32_t val32) +static inline void +oct_write32(uint64_t csr_addr, uint32_t val32) { -#if 0 - oct_write64(csr_addr, (uint64_t) val32); +#if 0 + oct_write64(csr_addr, (uint64_t) val32); #else - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1; - uint32_t tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1; + uint32_t tmp2; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %3, 32\n" + "dsll %1, %4, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "sw %2, 0(%0)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(val32), "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %3, 32\n" - "dsll %1, %4, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "sw %2, 0(%0)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (val32), "r" (csr_addrh), "r" (csr_addrl) ); #endif } -static inline uint8_t oct_read8 (uint64_t csr_addr) +static inline uint8_t +oct_read8(uint64_t csr_addr) { - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1, tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1, tmp2; + + __asm __volatile( + ".set mips64\n" + "dsll %1, %2, 32\n" + "dsll %0, %3, 32\n" + "dsrl %0, %0, 32\n" + "or %1, %1, %0\n" + "lb %1, 0(%1)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %1, %2, 32\n" - "dsll %0, %3, 32\n" - "dsrl %0, %0, 32\n" - "or %1, %1, %0\n" - "lb %1, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (csr_addrh), "r" (csr_addrl) ); - return ((uint8_t) tmp2); + return ((uint8_t) tmp2); } -static inline uint16_t oct_read16 (uint64_t csr_addr) +static inline uint16_t +oct_read16(uint64_t csr_addr) { - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t tmp1, tmp2; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t tmp1, tmp2; + + __asm __volatile( + ".set mips64\n" + "dsll %1, %2, 32\n" + "dsll %0, %3, 32\n" + "dsrl %0, %0, 32\n" + "or %1, %1, %0\n" + "lh %1, 0(%1)\n" + ".set mips0\n" + : "=&r"(tmp1), "=&r"(tmp2) + : "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %1, %2, 32\n" - "dsll %0, %3, 32\n" - "dsrl %0, %0, 32\n" - "or %1, %1, %0\n" - "lh %1, 0(%1)\n" - ".set mips0\n" - : "=&r" (tmp1), "=&r" (tmp2) - : "r" (csr_addrh), "r" (csr_addrl) ); - return ((uint16_t) tmp2); + return ((uint16_t) tmp2); } -static inline uint32_t oct_read32 (uint64_t csr_addr) +static inline uint32_t +oct_read32(uint64_t csr_addr) { - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - uint32_t val32; - uint32_t tmp; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t val32; + uint32_t tmp; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %2, 32\n" + "dsll %1, %3, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "lw %0, 0(%0)\n" + ".set mips0\n" + : "=&r"(val32), "=&r"(tmp) + : "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "lw %0, 0(%0)\n" - ".set mips0\n" - : "=&r" (val32), "=&r" (tmp) - : "r" (csr_addrh), "r" (csr_addrl) ); - return (val32); + return (val32); } -static inline uint64_t oct_read64 (uint64_t csr_addr) +static inline uint64_t +oct_read64(uint64_t csr_addr) { - uint32_t csr_addrh = csr_addr >> 32; - uint32_t csr_addrl = csr_addr; - uint32_t valh; - uint32_t vall; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + uint32_t valh; + uint32_t vall; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %2, 32\n" + "dsll %1, %3, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "ld %1, 0(%0)\n" + "dsrl %0, %1, 32\n" + "dsll %1, %1, 32\n" + "dsrl %1, %1, 32\n" + ".set mips0\n" + : "=&r"(valh), "=&r"(vall) + : "r"(csr_addrh), "r"(csr_addrl) + ); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "ld %1, 0(%0)\n" - "dsrl %0, %1, 32\n" - "dsll %1, %1, 32\n" - "dsrl %1, %1, 32\n" - ".set mips0\n" - : "=&r" (valh), "=&r" (vall) - : "r" (csr_addrh), "r" (csr_addrl) - ); - return ((uint64_t)valh << 32) | vall; + return ((uint64_t) valh << 32) | vall; } -static inline int32_t oct_readint32 (uint64_t csr_addr) +static inline int32_t +oct_readint32(uint64_t csr_addr) { - uint32_t csr_addrh = csr_addr>>32; - uint32_t csr_addrl = csr_addr; - int32_t val32; - uint32_t tmp; + uint32_t csr_addrh = csr_addr >> 32; + uint32_t csr_addrl = csr_addr; + int32_t val32; + uint32_t tmp; + + __asm __volatile( + ".set mips64\n" + "dsll %0, %2, 32\n" + "dsll %1, %3, 32\n" + "dsrl %1, %1, 32\n" + "or %0, %0, %1\n" + "lw %0, 0(%0)\n" + : "=&r"(val32), "=&r"(tmp) + : "r"(csr_addrh), "r"(csr_addrl)); - __asm __volatile ( - ".set mips64\n" - "dsll %0, %2, 32\n" - "dsll %1, %3, 32\n" - "dsrl %1, %1, 32\n" - "or %0, %0, %1\n" - "lw %0, 0(%0)\n" - : "=&r" (val32), "=&r" (tmp) - : "r" (csr_addrh), "r" (csr_addrl) ); - return (val32); + return (val32); } @@ -393,7 +431,7 @@ #define OCTEON_HW_BASE ((volatile uint64_t *) 0L) -#define OCTEON_REG_OFFSET (-4 * 1024ll) /* local scratchpad reg base */ +#define OCTEON_REG_OFFSET (-4 * 1024ll) /* local scratchpad reg base */ #define OCTEON_SCRATCH_BASE ((volatile uint8_t *)(OCTEON_HW_BASE + \ OCTEON_REG_OFFSET)) @@ -403,19 +441,21 @@ #define OCTEON_SCRATCH_2 32 -static inline uint64_t oct_mf_chord (void) +static inline uint64_t +oct_mf_chord(void) { - uint64_t dest; + uint64_t dest; + + __asm __volatile(".set push\n" + ".set noreorder\n" + ".set noat\n" + ".set mips64\n" + "dmfc2 $1, 0x400\n" + "move %0, $1\n" + ".set pop\n" + : "=r"(dest)::"$1"); - __asm __volatile ( ".set push\n" - ".set noreorder\n" - ".set noat\n" - ".set mips64\n" - "dmfc2 $1, 0x400\n" - "move %0, $1\n" - ".set pop\n" - : "=r" (dest) : : "$1"); - return dest; + return dest; } @@ -485,14 +525,16 @@ ".set mips0\n" \ : "=&r" (dest) : ) -static inline uint64_t oct_scratch_read64 (uint64_t address) +static inline uint64_t +oct_scratch_read64(uint64_t address) { - return(*((volatile uint64_t *)(OCTEON_SCRATCH_BASE + address))); + return (*((volatile uint64_t *)(OCTEON_SCRATCH_BASE + address))); } -static inline void oct_scratch_write64 (uint64_t address, uint64_t value) +static inline void +oct_scratch_write64(uint64_t address, uint64_t value) { - *((volatile uint64_t *)(OCTEON_SCRATCH_BASE + address)) = value; + *((volatile uint64_t *)(OCTEON_SCRATCH_BASE + address)) = value; } @@ -511,17 +553,17 @@ * Octeon Address Space Definitions */ typedef enum { - OCTEON_MIPS_SPACE_XKSEG = 3LL, - OCTEON_MIPS_SPACE_XKPHYS = 2LL, - OCTEON_MIPS_SPACE_XSSEG = 1LL, - OCTEON_MIPS_SPACE_XUSEG = 0LL + OCTEON_MIPS_SPACE_XKSEG = 3LL, + OCTEON_MIPS_SPACE_XKPHYS = 2LL, + OCTEON_MIPS_SPACE_XSSEG = 1LL, + OCTEON_MIPS_SPACE_XUSEG = 0LL } octeon_mips_space_t; typedef enum { - OCTEON_MIPS_XKSEG_SPACE_KSEG0 = 0LL, - OCTEON_MIPS_XKSEG_SPACE_KSEG1 = 1LL, - OCTEON_MIPS_XKSEG_SPACE_SSEG = 2LL, - OCTEON_MIPS_XKSEG_SPACE_KSEG3 = 3LL + OCTEON_MIPS_XKSEG_SPACE_KSEG0 = 0LL, + OCTEON_MIPS_XKSEG_SPACE_KSEG1 = 1LL, + OCTEON_MIPS_XKSEG_SPACE_SSEG = 2LL, + OCTEON_MIPS_XKSEG_SPACE_KSEG3 = 3LL } octeon_mips_xkseg_space_t; @@ -535,9 +577,9 @@ * We limit the allocated device physical blocks to low mem. So use Kseg0 */ -//#ifdef PTR_SIZE == sizeof(u_int32) +/*#ifdef PTR_SIZE == sizeof(u_int32)*/ #define OCTEON_PHYS2PTR(addr) ((void *) (((uint32_t) addr) | 0x80000000)) -//#endif +/*#endif*/ #if 0 #ifdef PTR_SIZE == sizeof(u_int64) @@ -553,13 +595,13 @@ #define OCTEON_PTR2PHYS(addr) octeon_ptr_to_phys(addr) -//#ifdef PTR_SIZE == sizeof(uint32_t) +/*#ifdef PTR_SIZE == sizeof(uint32_t)*/ -#define mipsx_addr_size uint32_t // u_int64 -#define MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT 30 // 62 -#define MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED 0x1fffffff // 0x1fffffff +#define mipsx_addr_size uint32_t /* u_int64 */ +#define MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT 30 /* 62 */ +#define MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED 0x1fffffff /* 0x1fffffff */ -//#endif +/*#endif*/ #if 0 #ifdef PTR_SIZE == sizeof(uint64_t) @@ -577,20 +619,22 @@ #if 0 -static inline mipsx_addr_size octeon_ptr_to_phys (void *ptr) +static inline mipsx_addr_size +octeon_ptr_to_phys(void *ptr) { - if ((((mipsx_addr_size) ptr) >> MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT) == 2) { - /* - * KSEG0 based address ? - */ - return ((mipsx_addr_size) ptr & MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED); - } else { - /* - * Ask kernel/vm to give us the phys translation. - */ - return (vtophys(ptr)); - } + if ((((mipsx_addr_size) ptr) >> MIPSX_ADDR_SIZE_KSEGX_BIT_SHIFT) == 2) { + /* + * KSEG0 based address ? + */ + return ((mipsx_addr_size) ptr & MIPSX_ADDR_SIZE_KSEGX_MASK_REMOVED); + } else { + /* + * Ask kernel/vm to give us the phys translation. + */ + return (vtophys(ptr)); + } } + #endif #define OCTEON_IO_SEG OCTEON_MIPS_SPACE_XKPHYS @@ -614,69 +658,77 @@ * octeon_addr_t */ typedef union { - uint64_t word64; + uint64_t word64; - struct { - octeon_mips_space_t R : 2; - uint64_t offset :62; - } sva; // mapped or unmapped virtual address + struct { + octeon_mips_space_t R:2; + uint64_t offset:62; + } sva; /* mapped or unmapped virtual address */ - struct { - uint64_t zeroes :33; - uint64_t offset :31; - } suseg; // mapped USEG virtual addresses (typically) + struct { + uint64_t zeroes:33; + uint64_t offset:31; + } suseg; /* mapped USEG virtual addresses (typically) */ - struct { - uint64_t ones :33; - octeon_mips_xkseg_space_t sp : 2; - uint64_t offset :29; - } sxkseg; // mapped or unmapped virtual address + struct { + uint64_t ones:33; + octeon_mips_xkseg_space_t sp:2; + uint64_t offset:29; + } sxkseg; /* mapped or unmapped virtual address */ - struct { - octeon_mips_space_t R :2; // CVMX_MIPS_SPACE_XKPHYS in this case - uint64_t cca : 3; // ignored by octeon - uint64_t mbz :10; - uint64_t pa :49; // physical address - } sxkphys; // physical address accessed through xkphys unmapped virtual address + struct { + octeon_mips_space_t R:2; /* CVMX_MIPS_SPACE_XKPHYS in + * this case */ + uint64_t cca:3; /* ignored by octeon */ + uint64_t mbz:10; + uint64_t pa:49; /* physical address */ + } sxkphys; /* physical address accessed through xkphys + * unmapped virtual address */ - struct { - uint64_t mbz :15; - uint64_t is_io : 1; // if set, the address is uncached and resides on MCB bus - uint64_t did : 8; // the hardware ignores this field when is_io==0, else device ID - uint64_t unaddr: 4; // the hardware ignores <39:36> in Octeon I - uint64_t offset :36; - } sphys; // physical address + struct { + uint64_t mbz:15; + uint64_t is_io:1; /* if set, the address is uncached and + * resides on MCB bus */ + uint64_t did:8; /* the hardware ignores this field when + * is_io==0, else device ID */ + uint64_t unaddr:4; /* the hardware ignores <39:36> in + * Octeon I */ + uint64_t offset:36; + } sphys; /* physical address */ - struct { - uint64_t zeroes :24; // techically, <47:40> are dont-cares - uint64_t unaddr: 4; // the hardware ignores <39:36> in Octeon I - uint64_t offset :36; - } smem; // physical mem address + struct { + uint64_t zeroes:24; /* techically, <47:40> are dont-cares */ + uint64_t unaddr:4; /* the hardware ignores <39:36> in + * Octeon I */ + uint64_t offset:36; + } smem; /* physical mem address */ - struct { - uint64_t mem_region :2; - uint64_t mbz :13; - uint64_t is_io : 1; // 1 in this case - uint64_t did : 8; // the hardware ignores this field when is_io==0, else device ID - uint64_t unaddr: 4; // the hardware ignores <39:36> in Octeon I - uint64_t offset :36; - } sio; // physical IO address + struct { + uint64_t mem_region:2; + uint64_t mbz:13; + uint64_t is_io:1; /* 1 in this case */ + uint64_t did:8; /* the hardware ignores this field when + * is_io==0, else device ID */ + uint64_t unaddr:4; /* the hardware ignores <39:36> in + * Octeon I */ + uint64_t offset:36; + } sio; /* physical IO address */ - struct { - uint64_t didspace : 24; - uint64_t unused : 40; - } sfilldidspace; + struct { + uint64_t didspace:24; + uint64_t unused:40; + } sfilldidspace; -} octeon_addr_t; +} octeon_addr_t; typedef union { - uint64_t word64; - struct { - uint32_t word32hi; - uint32_t word32lo; - } bits; -} octeon_word_t; + uint64_t word64; + struct { + uint32_t word32hi; + uint32_t word32lo; + } bits; +} octeon_word_t; @@ -686,10 +738,11 @@ * * Builds a memory address for I/O based on the Major 5bits and Sub DID 3bits */ -static inline uint64_t octeon_build_io_address (uint64_t major_did, - uint64_t sub_did) +static inline uint64_t +octeon_build_io_address(uint64_t major_did, + uint64_t sub_did) { - return ((0x1ull << 48) | (major_did << 43) | (sub_did << 40)); + return ((0x1ull << 48) | (major_did << 43) | (sub_did << 40)); } /* @@ -700,9 +753,10 @@ * @param bits Number of bits in the mask * @return The mask */ -static inline uint64_t octeon_build_mask (uint64_t bits) +static inline uint64_t +octeon_build_mask(uint64_t bits) { - return ~((~0x0ull) << bits); + return ~((~0x0ull) << bits); } /* @@ -724,19 +778,20 @@ * @param value Value to use * @return Value masked and shifted */ -static inline uint64_t octeon_build_bits (uint64_t high_bit, uint64_t low_bit, - uint64_t value) +static inline uint64_t +octeon_build_bits(uint64_t high_bit, uint64_t low_bit, + uint64_t value) { - return ((value & octeon_build_mask(high_bit - low_bit + 1)) << low_bit); + return ((value & octeon_build_mask(high_bit - low_bit + 1)) << low_bit); } /********************** simple spinlocks ***************/ typedef struct { - volatile uint32_t value; -} octeon_spinlock_t; + volatile uint32_t value; +} octeon_spinlock_t; -// note - macros not expanded in inline ASM, so values hardcoded +/* note - macros not expanded in inline ASM, so values hardcoded */ #define OCTEON_SPINLOCK_UNLOCKED_VAL 0 #define OCTEON_SPINLOCK_LOCKED_VAL 1 @@ -745,21 +800,24 @@ * * @param lock Lock to initialize */ -static inline void octeon_spinlock_init(octeon_spinlock_t *lock) +static inline void +octeon_spinlock_init(octeon_spinlock_t * lock) { - lock->value = OCTEON_SPINLOCK_UNLOCKED_VAL; + lock->value = OCTEON_SPINLOCK_UNLOCKED_VAL; } + /** * Releases lock * * @param lock pointer to lock structure */ -static inline void octeon_spinlock_unlock(octeon_spinlock_t *lock) +static inline void +octeon_spinlock_unlock(octeon_spinlock_t * lock) { - OCTEON_SYNCWS; + OCTEON_SYNCWS; - lock->value = 0; - OCTEON_SYNCWS; + lock->value = 0; + OCTEON_SYNCWS; } /** @@ -767,21 +825,22 @@ * * @param lock pointer to lock structure */ -static inline void octeon_spinlock_lock(octeon_spinlock_t *lock) +static inline void +octeon_spinlock_lock(octeon_spinlock_t * lock) { - unsigned int tmp; - __asm __volatile( - ".set noreorder \n" - "1: ll %1, %0 \n" - " bnez %1, 1b \n" - " li %1, 1 \n" - " sc %1, %0 \n" - " beqz %1, 1b \n" - " nop \n" - ".set reorder \n" - : "+m" (lock->value), "=&r" (tmp ) - : >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:31:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 33AA716A50B; Wed, 20 Feb 2008 18:31:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADEE816A400 for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 91DE813C509 for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIVY30081482 for ; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIVYMV081479 for perforce@freebsd.org; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:31:34 GMT Message-Id: <200802201831.m1KIVYMV081479@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:31:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135816 Change 135816 by rrs@rrs-mips2-jnpr on 2008/02/20 18:31:08 kill rest of // Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#13 (text+ko) ==== @@ -368,7 +368,7 @@ } /* Write the byte */ - //oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); + /*oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); */ oct_write64(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); /* Force Flush the IOBus */ @@ -391,7 +391,7 @@ } /* Write the byte */ - //oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); + /*oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); */ oct_write64(OCTEON_MIO_UART0_THR, (uint64_t) ch); /* Force Flush the IOBus */ @@ -554,7 +554,7 @@ return (ciu_intr_sum_reg_addr); } -// +/* */ #ifndef OCTEON_SMP static uint64_t ciu_get_intr_en_reg_addr(int core_num, int intx, int enx); @@ -575,7 +575,7 @@ -// +/* */ #else uint64_t ciu_get_en_reg_addr_new(int corenum, int intx, int enx, int ciu_ip); @@ -622,7 +622,7 @@ return (ciu_intr_reg_addr); } -// +/* */ #endif /* @@ -639,7 +639,7 @@ return (oct_read64(ciu_intr_sum_reg_addr)); } -// +/* */ #define DEBUG_CIU 1 #ifdef DEBUG_CIU @@ -761,7 +761,7 @@ if (core_num == CIU_THIS_CORE) { core_num = octeon_get_core_num(); } - // + /* */ #define DEBUG_CIU_EN 1 #ifdef DEBUG_CIU_EN From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:31:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2306C16A55E; Wed, 20 Feb 2008 18:31:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D79616A4E1 for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AD65513C514 for ; Wed, 20 Feb 2008 18:31:34 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIVYE3081489 for ; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIVY9O081486 for perforce@freebsd.org; Wed, 20 Feb 2008 18:31:34 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:31:34 GMT Message-Id: <200802201831.m1KIVY9O081486@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:31:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135817 Change 135817 by rrs@rrs-mips2-jnpr on 2008/02/20 18:31:23 get rid of // Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeonreg.h#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeonreg.h#3 (text+ko) ==== @@ -214,22 +214,22 @@ #define OCTEON_PCI0_IO_BASE OCTEON_PCIMEM3_BASE #define OCTEON_PCI0_ADDR( addr ) (OCTEON_PCI0_IO_BASE + (addr)) -#define OCTEON_RTCADR 0x70 // OCTEON_PCI_IO_ADDR8(0x70) -#define OCTEON_RTCDAT 0x71 // OCTEON_PCI_IO_ADDR8(0x71) +#define OCTEON_RTCADR 0x70 /* OCTEON_PCI_IO_ADDR8(0x70) */ +#define OCTEON_RTCDAT 0x71 /* OCTEON_PCI_IO_ADDR8(0x71) */ #define OCTEON_SMSC_COM1_ADR 0x3f8 #define OCTEON_SMSC_COM2_ADR 0x2f8 #define OCTEON_UARTT0ADR OCTEON_PCI0_ADDR(OCTEON_SMSC_COM1_ADR) -#define OCTEON_UARTT1ADR OCTEON_SMSC_COM2_ADR // OCTEON_PCI0_ADDR(OCTEON_SMSC_COM2_ADR) +#define OCTEON_UARTT1ADR OCTEON_SMSC_COM2_ADR /* OCTEON_PCI0_ADDR(OCTEON_SMSC_COM2_ADR) */ #define OCTEON_SMSC_1284_ADR 0x378 -#define OCTEON_1284ADR OCTEON_SMSC_1284_ADR // OCTEON_PCI0_ADDR(OCTEON_SMSC_1284_ADR) +#define OCTEON_1284ADR OCTEON_SMSC_1284_ADR /* OCTEON_PCI0_ADDR(OCTEON_SMSC_1284_ADR) */ #define OCTEON_SMSC_FDD_ADR 0x3f0 -#define OCTEON_FDDADR OCTEON_SMSC_FDD_ADR // OCTEON_PCI0_ADDR(OCTEON_SMSC_FDD_ADR) +#define OCTEON_FDDADR OCTEON_SMSC_FDD_ADR /* OCTEON_PCI0_ADDR(OCTEON_SMSC_FDD_ADR) */ #define OCTEON_SMSC_KYBD_ADR 0x60 /* Fixed 0x60, 0x64 */ -#define OCTEON_KYBDADR OCTEON_SMSC_KYBD_ADR // OCTEON_PCI0_ADDR(OCTEON_SMSC_KYBD_ADR) +#define OCTEON_KYBDADR OCTEON_SMSC_KYBD_ADR /* OCTEON_PCI0_ADDR(OCTEON_SMSC_KYBD_ADR) */ #define OCTEON_SMSC_MOUSE_ADR OCTEON_SMSC_KYBD_ADR #define OCTEON_MOUSEADR OCTEON_KYBDADR From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:32:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 72F1D16A40B; Wed, 20 Feb 2008 18:32:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE42416A409 for ; Wed, 20 Feb 2008 18:32:35 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D46A413C519 for ; Wed, 20 Feb 2008 18:32:35 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIWZZH081547 for ; Wed, 20 Feb 2008 18:32:35 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIWZc8081544 for perforce@freebsd.org; Wed, 20 Feb 2008 18:32:35 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:32:35 GMT Message-Id: <200802201832.m1KIWZc8081544@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:32:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135818 Change 135818 by rrs@rrs-mips2-jnpr on 2008/02/20 18:31:44 get rid of rest of // Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#7 (text+ko) ==== @@ -319,7 +319,7 @@ uart_barrier(bas); /* Disable the FIFO (if present). */ - //uart_setreg(bas, OCT_REG_FCR, 0); + /* uart_setreg(bas, OCT_REG_FCR, 0); */ uart_barrier(bas); /* Set RTS & DTR. */ @@ -472,7 +472,7 @@ uart_barrier(bas); /* - * Enable the interrupt in CIU. // UART-x2 @ IP2 + * Enable the interrupt in CIU. /* UART-x2 @ IP2 */ */ ciu_enable_interrupts(0, CIU_INT_0, CIU_EN_0, (!unit) ? CIU_UART_BITS_UART0 : CIU_UART_BITS_UART1, CIU_MIPS_IP2); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:36:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 986BA16A403; Wed, 20 Feb 2008 18:36:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4588616A401 for ; Wed, 20 Feb 2008 18:36:40 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2ADDE13C4EC for ; Wed, 20 Feb 2008 18:36:40 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIaecr081746 for ; Wed, 20 Feb 2008 18:36:40 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIaetD081743 for perforce@freebsd.org; Wed, 20 Feb 2008 18:36:40 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 18:36:40 GMT Message-Id: <200802201836.m1KIaetD081743@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135819 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:36:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135819 Change 135819 by sam@sam_ebb on 2008/02/20 18:36:19 set bssid mask according to mac addresses being used Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#32 edit .. //depot/projects/vap/sys/dev/ath/if_athvar.h#16 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#32 (text+ko) ==== @@ -590,6 +590,8 @@ /* get mac address from hardware */ ath_hal_getmac(ah, ic->ic_myaddr); + if (sc->sc_hasbmask) + ath_hal_getbssidmask(ah, sc->sc_hwbssidmask); /* NB: used to size node table key mapping array */ ic->ic_max_keyix = sc->sc_keymax; @@ -690,8 +692,10 @@ for (i = 0; i < 32; i++) if ((sc->sc_bssidmask & (1<sc_hwbssidmask[0] &= ~mac[0]; + } } else i = 0; sc->sc_bssidmask |= 1<> 2; - if (i != 0 || --sc->sc_nbssid0 == 0) + if (i != 0 || --sc->sc_nbssid0 == 0) { sc->sc_bssidmask &= ~(1<sc_hwbssidmask[0] |= mac[0]; + /* put back U/L bit if any other vaps need it */ + if (sc->sc_bssidmask & ~1) + sc->sc_hwbssidmask[0] &= ~0x2; + } } + /* * Assign a beacon xmit slot. We try to space out * assignments so when beacons are staggered the @@ -816,8 +826,10 @@ } /* STA, AHDEMO? */ - if (opmode == IEEE80211_M_HOSTAP) + if (opmode == IEEE80211_M_HOSTAP) { assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); + ath_hal_setbssidmask(sc->sc_ah, sc->sc_hwbssidmask); + } vap = &avp->av_vap; /* XXX can't hold mutex across if_alloc */ @@ -967,6 +979,7 @@ sc->sc_swbmiss = 0; } else if (vap->iv_opmode == IEEE80211_M_HOSTAP) { reclaim_address(sc, vap->iv_myaddr); + ath_hal_setbssidmask(ah, sc->sc_hwbssidmask); } if (vap->iv_opmode != IEEE80211_M_WDS) sc->sc_nvaps--; ==== //depot/projects/vap/sys/dev/ath/if_athvar.h#16 (text+ko) ==== @@ -206,6 +206,7 @@ int sc_debug; int sc_nvaps; /* # vaps */ int sc_nstavaps; /* # station vaps */ + u_int8_t sc_hwbssidmask[IEEE80211_ADDR_LEN]; u_int8_t sc_nbssid0; /* # vap's using base mac */ uint32_t sc_bssidmask; /* bssid mask */ @@ -373,6 +374,10 @@ ((*(_ah)->ah_getMacAddress)((_ah), (_mac))) #define ath_hal_setmac(_ah, _mac) \ ((*(_ah)->ah_setMacAddress)((_ah), (_mac))) +#define ath_hal_getbssidmask(_ah, _mask) \ + ((*(_ah)->ah_getBssIdMask)((_ah), (_mask))) +#define ath_hal_setbssidmask(_ah, _mask) \ + ((*(_ah)->ah_setBssIdMask)((_ah), (_mask))) #define ath_hal_intrset(_ah, _mask) \ ((*(_ah)->ah_setInterrupts)((_ah), (_mask))) #define ath_hal_intrget(_ah) \ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:38:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F2B7C16A40B; Wed, 20 Feb 2008 18:38:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FB3B16A407 for ; Wed, 20 Feb 2008 18:38:42 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB5F13C50B for ; Wed, 20 Feb 2008 18:38:42 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIcgau081809 for ; Wed, 20 Feb 2008 18:38:42 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIcg9T081806 for perforce@freebsd.org; Wed, 20 Feb 2008 18:38:42 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:38:42 GMT Message-Id: <200802201838.m1KIcg9T081806@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135820 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:38:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=135820 Change 135820 by rrs@rrs-mips2-jnpr on 2008/02/20 18:38:01 fixes embeddeed comment Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#8 (text+ko) ==== @@ -472,7 +472,7 @@ uart_barrier(bas); /* - * Enable the interrupt in CIU. /* UART-x2 @ IP2 */ + * Enable the interrupt in CIU. UART-x2 @ IP2 */ ciu_enable_interrupts(0, CIU_INT_0, CIU_EN_0, (!unit) ? CIU_UART_BITS_UART0 : CIU_UART_BITS_UART1, CIU_MIPS_IP2); From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:42:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A298516A402; Wed, 20 Feb 2008 18:42:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 682AD16A40E for ; Wed, 20 Feb 2008 18:42:47 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4E33813C506 for ; Wed, 20 Feb 2008 18:42:47 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIglvM082004 for ; Wed, 20 Feb 2008 18:42:47 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIglYk082001 for perforce@freebsd.org; Wed, 20 Feb 2008 18:42:47 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:42:47 GMT Message-Id: <200802201842.m1KIglYk082001@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:42:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=135822 Change 135822 by rrs@rrs-mips2-jnpr on 2008/02/20 18:42:13 more CIU debug purge Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#14 (text+ko) ==== @@ -639,15 +639,8 @@ return (oct_read64(ciu_intr_sum_reg_addr)); } -/* */ -#define DEBUG_CIU 1 -#ifdef DEBUG_CIU -#define DEBUG_CIU_SUM 1 -#define DEBUG_CIU_EN 1 -#endif - /* * ciu_clear_int_summary */ @@ -658,8 +651,6 @@ uint64_t ciu_intr_sum_reg_addr; - /*#define DEBUG_CIU_SUM 1 */ - #ifdef DEBUG_CIU_SUM uint64_t ciu_intr_sum_bits; #endif @@ -761,8 +752,6 @@ if (core_num == CIU_THIS_CORE) { core_num = octeon_get_core_num(); } - /* */ -#define DEBUG_CIU_EN 1 #ifdef DEBUG_CIU_EN printf(" CIU: core %u enabling Intx %u Enx %u IP %d Bits: 0x%llX\n", From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:49:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A0DA016A40B; Wed, 20 Feb 2008 18:49:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CBC16A408 for ; Wed, 20 Feb 2008 18:49:56 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4C16513C458 for ; Wed, 20 Feb 2008 18:49:56 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KInuNs082355 for ; Wed, 20 Feb 2008 18:49:56 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIntxa082352 for perforce@freebsd.org; Wed, 20 Feb 2008 18:49:55 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:49:55 GMT Message-Id: <200802201849.m1KIntxa082352@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:49:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135823 Change 135823 by rrs@rrs-mips2-jnpr on 2008/02/20 18:49:09 for octeon, wheel should be run out of clock. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#7 (text+ko) ==== @@ -116,6 +116,7 @@ if (!clock_started) { mips_timer_hz = hz * 2; + printf("hz=%d mthz=%d\n", hz, mips_timer_hz); stathz = mips_timer_hz / 15; profhz = mips_timer_hz / 3; printf("cpu_initclocks(): stathz = 0x%x, profhz = 0x%x\n", @@ -197,6 +198,11 @@ } +#ifdef TARGET_OCTEON +static int wheel_run=0; +void octeon_led_run_wheel(void); +#endif + uint32_t clockintr(uint32_t mask, struct clockframe *frame) { @@ -217,7 +223,14 @@ else hardclock_cpu(USERMODE(frame->sr)); } - +#ifdef TARGET_OCTEON + /* Run the FreeBSD display once a second */ + wheel_run += hz; + if(wheel_run >= (mips_timer_hz * hz)) { + wheel_run = 0; + octeon_led_run_wheel(); + } +#endif /* Fire statclock at stathz. */ cpu_ticks->stat_ticks += stathz; if (cpu_ticks->stat_ticks >= mips_timer_hz) { From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:53:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9018B16A406; Wed, 20 Feb 2008 18:53:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B85C16A403 for ; Wed, 20 Feb 2008 18:53:00 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 03A7B13C45D for ; Wed, 20 Feb 2008 18:53:00 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIqx3c082520 for ; Wed, 20 Feb 2008 18:52:59 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIqxhO082517 for perforce@freebsd.org; Wed, 20 Feb 2008 18:52:59 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:52:59 GMT Message-Id: <200802201852.m1KIqxhO082517@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135824 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:53:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135824 Change 135824 by rrs@rrs-mips2-jnpr on 2008/02/20 18:52:39 no wheel running here please. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#9 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/uart_dev_oct16550.c#9 (text+ko) ==== @@ -652,13 +652,6 @@ } } uart_unlock(sc->sc_hwmtx); - -#define OCTEON_VISUAL_UART 1 -#ifdef OCTEON_VISUAL_UART - if (ipend) - octeon_led_run_wheel(); -#endif - return ((sc->sc_leaving) ? 0 : ipend); } From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:54:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C0BF16A404; Wed, 20 Feb 2008 18:54:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08ACD16A400 for ; Wed, 20 Feb 2008 18:54:01 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E2E9A13C46A for ; Wed, 20 Feb 2008 18:54:00 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIs0pp082564 for ; Wed, 20 Feb 2008 18:54:00 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIs0p2082561 for perforce@freebsd.org; Wed, 20 Feb 2008 18:54:00 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:54:00 GMT Message-Id: <200802201854.m1KIs0p2082561@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135825 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:54:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=135825 Change 135825 by rrs@rrs-mips2-jnpr on 2008/02/20 18:53:41 no wheel running here either. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/dev/rgmii/octeon_rgmx.c#6 (text+ko) ==== @@ -936,11 +936,6 @@ /* Only allow work for our group */ prev_grp_mask = oct_read64(OCTEON_POW_CORE_GROUP_MASK(core_id)); oct_write64(OCTEON_POW_CORE_GROUP_MASK(core_id), OCTEON_POW_ALL_GROUPS_MASK); - - -#ifdef OCTEON_VISUAL_RGMX - octeon_led_run_wheel(); -#endif while (1) { if (pak_count++ > RGMX_MAX_PAK_RECEIVE) { @@ -955,9 +950,6 @@ */ break; } -#ifdef OCTEON_VISUAL_RGMX - octeon_led_run_wheel(); -#endif octeon_rgmx_rx_process_work(work, work->ipprt); } From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:55:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4E3C616A407; Wed, 20 Feb 2008 18:55:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF83D16A404 for ; Wed, 20 Feb 2008 18:55:02 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BC32113C455 for ; Wed, 20 Feb 2008 18:55:02 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIt2C7082648 for ; Wed, 20 Feb 2008 18:55:02 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIt2te082640 for perforce@freebsd.org; Wed, 20 Feb 2008 18:55:02 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 18:55:02 GMT Message-Id: <200802201855.m1KIt2te082640@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135826 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:55:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135826 Change 135826 by rrs@rrs-mips2-jnpr on 2008/02/20 18:54:58 purge bad debug print. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#8 (text+ko) ==== @@ -116,7 +116,6 @@ if (!clock_started) { mips_timer_hz = hz * 2; - printf("hz=%d mthz=%d\n", hz, mips_timer_hz); stathz = mips_timer_hz / 15; profhz = mips_timer_hz / 3; printf("cpu_initclocks(): stathz = 0x%x, profhz = 0x%x\n", From owner-p4-projects@FreeBSD.ORG Wed Feb 20 18:56:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CC6616A408; Wed, 20 Feb 2008 18:56:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 113E216A401 for ; Wed, 20 Feb 2008 18:56:04 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EBB7D13C44B for ; Wed, 20 Feb 2008 18:56:03 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KIu3tC082719 for ; Wed, 20 Feb 2008 18:56:03 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KIu30n082716 for perforce@freebsd.org; Wed, 20 Feb 2008 18:56:03 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 18:56:03 GMT Message-Id: <200802201856.m1KIu30n082716@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135827 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 18:56:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=135827 Change 135827 by sam@sam_ebb on 2008/02/20 18:56:03 er, let's get it right this time Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#33 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#33 (text+ko) ==== @@ -689,16 +689,15 @@ if (clone && sc->sc_hasbmask) { /* NB: we only do this if h/w supports multiple bssid */ - for (i = 0; i < 32; i++) + for (i = 0; i < 8; i++) if ((sc->sc_bssidmask & (1<sc_hwbssidmask[0] &= ~mac[0]; - } } else i = 0; sc->sc_bssidmask |= 1<sc_hwbssidmask[0] &= ~mac[0]; if (i == 0) sc->sc_nbssid0++; } @@ -707,12 +706,16 @@ reclaim_address(struct ath_softc *sc, const uint8_t mac[IEEE80211_ADDR_LEN]) { int i = mac[0] >> 2; + uint8_t mask; + if (i != 0 || --sc->sc_nbssid0 == 0) { sc->sc_bssidmask &= ~(1<sc_hwbssidmask[0] |= mac[0]; - /* put back U/L bit if any other vaps need it */ - if (sc->sc_bssidmask & ~1) - sc->sc_hwbssidmask[0] &= ~0x2; + /* recalculate bssid mask from remaining addresses */ + mask = 0xff; + for (i = 1; i < 8; i++) + if (sc->sc_bssidmask & (1<sc_hwbssidmask[0] |= mask; } } From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:00:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 07ABB16A401; Wed, 20 Feb 2008 19:00:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8A7816A40F for ; Wed, 20 Feb 2008 19:00:09 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 72D5C13C478 for ; Wed, 20 Feb 2008 19:00:09 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJ09k0082923 for ; Wed, 20 Feb 2008 19:00:09 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJ09te082894 for perforce@freebsd.org; Wed, 20 Feb 2008 19:00:09 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 19:00:09 GMT Message-Id: <200802201900.m1KJ09te082894@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135828 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:00:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=135828 Change 135828 by rrs@rrs-mips2-jnpr on 2008/02/20 19:00:01 kill another debug. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#22 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#22 (text+ko) ==== @@ -740,8 +740,6 @@ vm_offset_t va, sva; va = sva = *virt; - printf("pmap_map: enters virt:0x%x start:%x end:0x%x prot:0x%x\n", - *virt, start, end, prot); while (start < end) { pmap_kenter(va, start); va += PAGE_SIZE; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:10:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 607C016A46E; Wed, 20 Feb 2008 19:10:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25B6616A46B for ; Wed, 20 Feb 2008 19:10:20 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0C62B13C46B for ; Wed, 20 Feb 2008 19:10:20 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJAJNT084585 for ; Wed, 20 Feb 2008 19:10:19 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJAJqJ084582 for perforce@freebsd.org; Wed, 20 Feb 2008 19:10:19 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:10:19 GMT Message-Id: <200802201910.m1KJAJqJ084582@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:10:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=135829 Change 135829 by sam@sam_ebb on 2008/02/20 19:10:14 guard against someone bumping the # beacon buffers too high and leave an explanation why it's not a good idea Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#34 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#34 (text+ko) ==== @@ -84,6 +84,22 @@ #include #endif +/* + * ATH_BCBUF determines the number of vap's that can transmit + * beacons and also (currently) the number of vap's that can + * have unique mac addresses/bssid. When staggering beacons + * 4 is probably a good max as otherwise the beacons become + * very closely spaced and there is limited time for cab q traffic + * to go out. You can burst beacons instead but that is not good + * for stations in power save and at some point you really want + * another radio (and channel). + * + * The limit on the number of mac addresses is tied to our use of + * the U/L bit and tracking addresses in a byte; it would be + * worthwhile to allow more for applications like proxy sta. + */ +CTASSERT(ATH_BCBUF <= 8); + /* unaligned little endian access */ #define LE_READ_2(p) \ ((u_int16_t) \ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:28:51 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0BB4116A407; Wed, 20 Feb 2008 19:28:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F91616A403 for ; Wed, 20 Feb 2008 19:28:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 738FF13C4E1 for ; Wed, 20 Feb 2008 19:28:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJSo4x086463 for ; Wed, 20 Feb 2008 19:28:50 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJScq0086460 for perforce@freebsd.org; Wed, 20 Feb 2008 19:28:38 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:28:38 GMT Message-Id: <200802201928.m1KJScq0086460@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135830 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:28:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=135830 Change 135830 by sam@sam_ebb on 2008/02/20 19:28:15 IFC @ 135829 Affected files ... .. //depot/projects/vap/Makefile.inc1#5 integrate .. //depot/projects/vap/ObsoleteFiles.inc#5 integrate .. //depot/projects/vap/UPDATING#4 integrate .. //depot/projects/vap/bin/date/date.c#3 integrate .. //depot/projects/vap/bin/sh/mksyntax.c#3 integrate .. //depot/projects/vap/contrib/ncurses/FREEBSD-upgrade#4 integrate .. //depot/projects/vap/contrib/ncurses/FREEBSD-vendor#1 branch .. //depot/projects/vap/contrib/ncurses/MANIFEST#4 integrate .. //depot/projects/vap/contrib/ncurses/NEWS#4 integrate .. //depot/projects/vap/contrib/ncurses/dist.mk#4 integrate .. //depot/projects/vap/contrib/ncurses/form/frm_driver.c#4 integrate .. //depot/projects/vap/contrib/ncurses/include/curses.h.in#4 integrate .. //depot/projects/vap/contrib/ncurses/include/ncurses_defs#4 integrate .. //depot/projects/vap/contrib/ncurses/man/curs_clear.3x#3 integrate .. //depot/projects/vap/contrib/ncurses/man/curs_threads.3x#1 branch .. //depot/projects/vap/contrib/ncurses/man/man_db.renames#4 integrate .. //depot/projects/vap/contrib/ncurses/man/manlinks.sed#3 integrate .. //depot/projects/vap/contrib/ncurses/man/toe.1m#4 integrate .. //depot/projects/vap/contrib/ncurses/misc/terminfo.src#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/MKlib_gen.sh#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/MKunctrl.awk#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_addch.c#3 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_getch.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_insch.c#3 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_newterm.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_newwin.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_set_term.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_slk.c#3 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_slkclear.c#3 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/lib_slkinit.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/resizeterm.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/base/use_window.c#2 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/curses.priv.h#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/llib-lncursest#1 branch .. //depot/projects/vap/contrib/ncurses/ncurses/tinfo/lib_data.c#4 integrate .. //depot/projects/vap/contrib/ncurses/ncurses/tinfo/lib_setup.c#4 integrate .. //depot/projects/vap/contrib/ncurses/progs/infocmp.c#4 integrate .. //depot/projects/vap/contrib/ncurses/progs/toe.c#4 integrate .. //depot/projects/vap/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/vap/contrib/pf/man/pf.conf.5#3 integrate .. //depot/projects/vap/crypto/openssh/FREEBSD-Xlist#3 integrate .. //depot/projects/vap/crypto/openssh/FREEBSD-upgrade#3 integrate .. //depot/projects/vap/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/vap/etc/mail/access.sample#3 integrate .. //depot/projects/vap/etc/namedb/named.root#3 integrate .. //depot/projects/vap/etc/sendmail/freebsd.mc#3 integrate .. //depot/projects/vap/games/fortune/strfile/strfile.c#3 integrate .. //depot/projects/vap/gnu/usr.bin/man/man/man.c#3 integrate .. //depot/projects/vap/gnu/usr.bin/man/manpath/manpath.c#3 integrate .. //depot/projects/vap/include/pthread_np.h#5 integrate .. //depot/projects/vap/include/unistd.h#5 integrate .. //depot/projects/vap/lib/libarchive/archive_entry_strmode.c#2 integrate .. //depot/projects/vap/lib/libarchive/archive_platform.h#4 integrate .. //depot/projects/vap/lib/libarchive/archive_read_open_filename.c#3 integrate .. //depot/projects/vap/lib/libarchive/archive_read_support_compression_bzip2.c#3 integrate .. //depot/projects/vap/lib/libarchive/archive_read_support_compression_gzip.c#3 integrate .. //depot/projects/vap/lib/libarchive/archive_read_support_format_ar.c#4 integrate .. //depot/projects/vap/lib/libarchive/archive_read_support_format_iso9660.c#4 integrate .. //depot/projects/vap/lib/libarchive/archive_read_support_format_mtree.c#2 integrate .. //depot/projects/vap/lib/libarchive/archive_write_disk.c#5 integrate .. //depot/projects/vap/lib/libarchive/archive_write_open_filename.c#3 integrate .. //depot/projects/vap/lib/libarchive/config_freebsd.h#3 integrate .. //depot/projects/vap/lib/libarchive/test/main.c#4 integrate .. //depot/projects/vap/lib/libarchive/test/test.h#4 integrate .. //depot/projects/vap/lib/libc/db/test/btree.tests/main.c#3 integrate .. //depot/projects/vap/lib/libc/db/test/dbtest.c#3 integrate .. //depot/projects/vap/lib/libc/include/namespace.h#3 integrate .. //depot/projects/vap/lib/libc/include/un-namespace.h#3 integrate .. //depot/projects/vap/lib/libc/regex/grot/main.c#3 integrate .. //depot/projects/vap/lib/libc/resolv/res_comp.c#3 integrate .. //depot/projects/vap/lib/libc/stdlib/malloc.3#4 integrate .. //depot/projects/vap/lib/libc/stdlib/malloc.c#4 integrate .. //depot/projects/vap/lib/libc/sys/access.2#5 integrate .. //depot/projects/vap/lib/libc/sys/readlink.2#3 integrate .. //depot/projects/vap/lib/libdisk/disk.c#3 integrate .. //depot/projects/vap/lib/libelf/gelf_fsize.3#3 integrate .. //depot/projects/vap/lib/libfetch/common.c#4 integrate .. //depot/projects/vap/lib/libfetch/fetch.3#4 integrate .. //depot/projects/vap/lib/libfetch/ftp.c#5 integrate .. //depot/projects/vap/lib/libfetch/http.c#4 integrate .. //depot/projects/vap/lib/libkse/Makefile#3 integrate .. //depot/projects/vap/lib/libkse/kse.map#3 integrate .. //depot/projects/vap/lib/libkse/thread/thr_mutex.c#4 integrate .. //depot/projects/vap/lib/libmilter/Makefile#3 integrate .. //depot/projects/vap/lib/librpcsvc/Makefile#3 integrate .. //depot/projects/vap/lib/librpcsvc/xcrypt.c#3 integrate .. //depot/projects/vap/lib/libthr/Makefile#4 integrate .. //depot/projects/vap/lib/libthr/arch/amd64/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/arm/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/arm/include/pthread_md.h#3 integrate .. //depot/projects/vap/lib/libthr/arch/i386/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/ia64/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/powerpc/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/sparc64/Makefile.inc#3 integrate .. //depot/projects/vap/lib/libthr/arch/sparc64/include/pthread_md.h#3 integrate .. //depot/projects/vap/lib/libthr/pthread.map#5 integrate .. //depot/projects/vap/lib/libthr/thread/thr_mutex.c#5 integrate .. //depot/projects/vap/lib/msun/Makefile#5 integrate .. //depot/projects/vap/lib/msun/Symbol.map#5 integrate .. //depot/projects/vap/lib/msun/amd64/Makefile.inc#4 integrate .. //depot/projects/vap/lib/msun/amd64/e_remainder.S#1 branch .. //depot/projects/vap/lib/msun/amd64/e_remainderf.S#1 branch .. //depot/projects/vap/lib/msun/ld128/k_cosl.c#1 branch .. //depot/projects/vap/lib/msun/ld128/k_sinl.c#1 branch .. //depot/projects/vap/lib/msun/ld128/k_tanl.c#1 branch .. //depot/projects/vap/lib/msun/ld128/s_exp2l.c#2 integrate .. //depot/projects/vap/lib/msun/ld80/k_cosl.c#1 branch .. //depot/projects/vap/lib/msun/ld80/k_sinl.c#1 branch .. //depot/projects/vap/lib/msun/ld80/k_tanl.c#1 branch .. //depot/projects/vap/lib/msun/ld80/s_exp2l.c#2 integrate .. //depot/projects/vap/lib/msun/man/cos.3#3 integrate .. //depot/projects/vap/lib/msun/man/j0.3#3 integrate .. //depot/projects/vap/lib/msun/man/lgamma.3#3 integrate .. //depot/projects/vap/lib/msun/man/sin.3#3 integrate .. //depot/projects/vap/lib/msun/man/tan.3#3 integrate .. //depot/projects/vap/lib/msun/src/e_exp.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_expf.c#4 integrate .. //depot/projects/vap/lib/msun/src/e_hypot.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_hypotf.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_pow.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_powf.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_rem_pio2.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_rem_pio2f.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_remainder.c#3 integrate .. //depot/projects/vap/lib/msun/src/e_remainderf.c#3 integrate .. //depot/projects/vap/lib/msun/src/k_cos.c#4 integrate .. //depot/projects/vap/lib/msun/src/k_rem_pio2.c#4 integrate .. //depot/projects/vap/lib/msun/src/k_sin.c#3 integrate .. //depot/projects/vap/lib/msun/src/math.h#5 integrate .. //depot/projects/vap/lib/msun/src/math_private.h#5 integrate .. //depot/projects/vap/lib/msun/src/s_ceil.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_ceill.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_cos.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_cosl.c#1 branch .. //depot/projects/vap/lib/msun/src/s_exp2.c#4 integrate .. //depot/projects/vap/lib/msun/src/s_exp2f.c#5 integrate .. //depot/projects/vap/lib/msun/src/s_expm1.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_expm1f.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_floor.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_floorl.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_logb.c#4 integrate .. //depot/projects/vap/lib/msun/src/s_sin.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_sinl.c#1 branch .. //depot/projects/vap/lib/msun/src/s_tan.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_tanl.c#1 branch .. //depot/projects/vap/lib/msun/src/s_tgammaf.c#1 branch .. //depot/projects/vap/lib/msun/src/s_trunc.c#3 integrate .. //depot/projects/vap/lib/msun/src/s_truncl.c#3 integrate .. //depot/projects/vap/lib/ncurses/ncurses/Makefile#4 integrate .. //depot/projects/vap/lib/ncurses/ncurses/ncurses_cfg.h#4 integrate .. //depot/projects/vap/release/doc/en_US.ISO8859-1/relnotes/article.sgml#4 integrate .. //depot/projects/vap/release/fixit.profile#5 integrate .. //depot/projects/vap/sbin/geom/core/geom.8#3 integrate .. //depot/projects/vap/sbin/geom/core/geom.c#3 integrate .. //depot/projects/vap/sbin/gpt/gpt.8#3 integrate .. //depot/projects/vap/sbin/gpt/migrate.c#3 integrate .. //depot/projects/vap/sbin/gpt/show.c#3 integrate .. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#10 integrate .. //depot/projects/vap/sbin/ipfw/ipfw.8#3 integrate .. //depot/projects/vap/sbin/ipfw/ipfw2.c#5 integrate .. //depot/projects/vap/sbin/iscontrol/misc.c#3 integrate .. //depot/projects/vap/sbin/md5/md5.c#3 integrate .. //depot/projects/vap/sbin/mount/getmntopts.3#3 integrate .. //depot/projects/vap/sbin/mount/mount.c#4 integrate .. //depot/projects/vap/sbin/mount_nfs/mount_nfs.8#3 integrate .. //depot/projects/vap/sbin/mount_nfs/mount_nfs.c#3 integrate .. //depot/projects/vap/sbin/natd/natd.8#5 integrate .. //depot/projects/vap/sbin/sconfig/sconfig.c#3 integrate .. //depot/projects/vap/secure/usr.bin/bdes/bdes.c#3 integrate .. //depot/projects/vap/share/colldef/el_GR.ISO8859-7.src#3 integrate .. //depot/projects/vap/share/man/man4/Makefile#6 integrate .. //depot/projects/vap/share/man/man4/ciss.4#3 integrate .. //depot/projects/vap/share/man/man4/geom_linux_lvm.4#1 branch .. //depot/projects/vap/share/man/man4/hptrr.4#2 integrate .. //depot/projects/vap/share/man/man4/mxge.4#4 integrate .. //depot/projects/vap/share/man/man4/sk.4#3 integrate .. //depot/projects/vap/share/man/man5/fstab.5#4 integrate .. //depot/projects/vap/share/man/man9/Makefile#4 integrate .. //depot/projects/vap/share/man/man9/lock.9#5 integrate .. //depot/projects/vap/share/man/man9/pci.9#3 integrate .. //depot/projects/vap/share/misc/committers-src.dot#4 integrate .. //depot/projects/vap/share/mk/bsd.dep.mk#4 integrate .. //depot/projects/vap/sys/amd64/amd64/busdma_machdep.c#6 integrate .. //depot/projects/vap/sys/amd64/amd64/dump_machdep.c#6 integrate .. //depot/projects/vap/sys/amd64/amd64/minidump_machdep.c#4 integrate .. //depot/projects/vap/sys/amd64/conf/GENERIC#8 integrate .. //depot/projects/vap/sys/amd64/linux32/linux32_machdep.c#6 integrate .. //depot/projects/vap/sys/arm/arm/genassym.c#6 integrate .. //depot/projects/vap/sys/arm/arm/locore.S#6 integrate .. //depot/projects/vap/sys/arm/arm/swtch.S#6 integrate .. //depot/projects/vap/sys/arm/include/asmacros.h#7 integrate .. //depot/projects/vap/sys/arm/include/atomic.h#7 integrate .. //depot/projects/vap/sys/arm/include/sysarch.h#4 integrate .. //depot/projects/vap/sys/boot/Makefile#5 integrate .. //depot/projects/vap/sys/boot/ofw/libofw/ofw_console.c#5 integrate .. //depot/projects/vap/sys/boot/powerpc/ofw/Makefile#2 integrate .. //depot/projects/vap/sys/boot/powerpc/ofw/conf.c#2 integrate .. //depot/projects/vap/sys/boot/powerpc/uboot/Makefile#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/conf.c#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/help.uboot#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/ldscript.powerpc#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/metadata.c#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/start.S#1 branch .. //depot/projects/vap/sys/boot/powerpc/uboot/version#1 branch .. //depot/projects/vap/sys/boot/uboot/Makefile#1 branch .. //depot/projects/vap/sys/boot/uboot/common/Makefile.inc#1 branch .. //depot/projects/vap/sys/boot/uboot/common/main.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/Makefile#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/api_public.h#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/console.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/copy.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/devicename.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/disk.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/elf_freebsd.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/glue.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/libuboot.h#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/module.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/net.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/reboot.c#1 branch .. //depot/projects/vap/sys/boot/uboot/lib/time.c#1 branch .. //depot/projects/vap/sys/cam/cam_periph.c#6 integrate .. //depot/projects/vap/sys/compat/freebsd32/freebsd32_proto.h#8 integrate .. //depot/projects/vap/sys/compat/freebsd32/freebsd32_syscall.h#8 integrate .. //depot/projects/vap/sys/compat/freebsd32/freebsd32_syscalls.c#8 integrate .. //depot/projects/vap/sys/compat/freebsd32/freebsd32_sysent.c#8 integrate .. //depot/projects/vap/sys/compat/freebsd32/syscalls.master#8 integrate .. //depot/projects/vap/sys/conf/Makefile.arm#6 integrate .. //depot/projects/vap/sys/conf/NOTES#8 integrate .. //depot/projects/vap/sys/conf/files#16 integrate .. //depot/projects/vap/sys/conf/files.sparc64#7 integrate .. //depot/projects/vap/sys/conf/kern.post.mk#6 integrate .. //depot/projects/vap/sys/conf/options#10 integrate .. //depot/projects/vap/sys/dev/acpica/acpi_cpu.c#6 integrate .. //depot/projects/vap/sys/dev/acpica/acpi_thermal.c#7 integrate .. //depot/projects/vap/sys/dev/aic7xxx/aic79xx_osm.c#6 integrate .. //depot/projects/vap/sys/dev/amr/amrreg.h#7 integrate .. //depot/projects/vap/sys/dev/ciss/ciss.c#7 integrate .. //depot/projects/vap/sys/dev/coretemp/coretemp.c#4 integrate .. //depot/projects/vap/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/vap/sys/dev/hptrr/array.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/him.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/himfuncs.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/hptintf.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/hptrr_config.c#2 integrate .. //depot/projects/vap/sys/dev/hptrr/hptrr_config.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/hptrr_os_bsd.c#2 integrate .. //depot/projects/vap/sys/dev/hptrr/hptrr_osm_bsd.c#3 integrate .. //depot/projects/vap/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#2 integrate .. //depot/projects/vap/sys/dev/hptrr/ldm.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/list.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/os_bsd.h#2 integrate .. //depot/projects/vap/sys/dev/hptrr/osm.h#2 integrate .. //depot/projects/vap/sys/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/vap/sys/dev/mxge/if_mxge_var.h#4 integrate .. //depot/projects/vap/sys/dev/mxge/mxge_lro.c#4 integrate .. //depot/projects/vap/sys/dev/mxge/rss_eth_z8e.h#2 integrate .. //depot/projects/vap/sys/dev/mxge/rss_ethp_z8e.h#2 integrate .. //depot/projects/vap/sys/dev/sk/if_sk.c#4 integrate .. //depot/projects/vap/sys/dev/sk/if_skreg.h#3 integrate .. //depot/projects/vap/sys/dev/syscons/syscons.h#6 integrate .. //depot/projects/vap/sys/dev/ti/if_ti.c#4 integrate .. //depot/projects/vap/sys/dev/twe/twe.c#4 integrate .. //depot/projects/vap/sys/dev/usb/ehci.c#8 integrate .. //depot/projects/vap/sys/dev/usb/usbdi.c#6 integrate .. //depot/projects/vap/sys/fs/coda/TODO#3 integrate .. //depot/projects/vap/sys/fs/coda/cnode.h#4 integrate .. //depot/projects/vap/sys/fs/coda/coda_fbsd.c#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_io.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_kernel.h#3 delete .. //depot/projects/vap/sys/fs/coda/coda_namecache.c#3 delete .. //depot/projects/vap/sys/fs/coda/coda_namecache.h#4 delete .. //depot/projects/vap/sys/fs/coda/coda_opstats.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_pioctl.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_psdev.c#4 integrate .. //depot/projects/vap/sys/fs/coda/coda_psdev.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_subr.c#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_subr.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_venus.c#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_venus.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_vfsops.c#5 integrate .. //depot/projects/vap/sys/fs/coda/coda_vfsops.h#3 integrate .. //depot/projects/vap/sys/fs/coda/coda_vnops.c#5 integrate .. //depot/projects/vap/sys/fs/coda/coda_vnops.h#3 integrate .. //depot/projects/vap/sys/fs/ntfs/ntfs_subr.c#8 integrate .. //depot/projects/vap/sys/fs/nullfs/null_vfsops.c#7 integrate .. //depot/projects/vap/sys/geom/geom_disk.c#6 integrate .. //depot/projects/vap/sys/geom/linux_lvm/g_linux_lvm.c#1 branch .. //depot/projects/vap/sys/geom/linux_lvm/g_linux_lvm.h#1 branch .. //depot/projects/vap/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c#4 integrate .. //depot/projects/vap/sys/i386/i386/busdma_machdep.c#6 integrate .. //depot/projects/vap/sys/i386/i386/dump_machdep.c#6 integrate .. //depot/projects/vap/sys/i386/i386/geode.c#5 integrate .. //depot/projects/vap/sys/i386/i386/minidump_machdep.c#4 integrate .. //depot/projects/vap/sys/i386/linux/linux_machdep.c#6 integrate .. //depot/projects/vap/sys/ia64/conf/GENERIC#7 integrate .. //depot/projects/vap/sys/ia64/ia64/machdep.c#8 integrate .. //depot/projects/vap/sys/ia64/ia64/pmap.c#7 integrate .. //depot/projects/vap/sys/kern/init_sysent.c#8 integrate .. //depot/projects/vap/sys/kern/kern_descrip.c#8 integrate .. //depot/projects/vap/sys/kern/kern_exit.c#7 integrate .. //depot/projects/vap/sys/kern/kern_lock.c#8 integrate .. //depot/projects/vap/sys/kern/kern_mib.c#8 integrate .. //depot/projects/vap/sys/kern/kern_module.c#7 integrate .. //depot/projects/vap/sys/kern/kern_mutex.c#7 integrate .. //depot/projects/vap/sys/kern/kern_rwlock.c#5 integrate .. //depot/projects/vap/sys/kern/kern_tc.c#7 integrate .. //depot/projects/vap/sys/kern/kern_timeout.c#6 integrate .. //depot/projects/vap/sys/kern/subr_autoconf.c#5 integrate .. //depot/projects/vap/sys/kern/subr_lock.c#4 integrate .. //depot/projects/vap/sys/kern/subr_sleepqueue.c#7 integrate .. //depot/projects/vap/sys/kern/subr_turnstile.c#6 integrate .. //depot/projects/vap/sys/kern/syscalls.c#8 integrate .. //depot/projects/vap/sys/kern/syscalls.master#8 integrate .. //depot/projects/vap/sys/kern/systrace_args.c#5 integrate .. //depot/projects/vap/sys/kern/sysv_shm.c#6 integrate .. //depot/projects/vap/sys/kern/uipc_shm.c#3 integrate .. //depot/projects/vap/sys/kern/uipc_sockbuf.c#5 integrate .. //depot/projects/vap/sys/kern/uipc_socket.c#7 integrate .. //depot/projects/vap/sys/kern/uipc_syscalls.c#9 integrate .. //depot/projects/vap/sys/kern/vfs_bio.c#8 integrate .. //depot/projects/vap/sys/kern/vfs_default.c#8 integrate .. //depot/projects/vap/sys/kern/vfs_mount.c#8 integrate .. //depot/projects/vap/sys/kern/vfs_subr.c#8 integrate .. //depot/projects/vap/sys/kern/vfs_syscalls.c#7 integrate .. //depot/projects/vap/sys/modules/coda/Makefile#5 integrate .. //depot/projects/vap/sys/modules/coda5/Makefile#5 integrate .. //depot/projects/vap/sys/modules/geom/Makefile#5 integrate .. //depot/projects/vap/sys/modules/geom/geom_linux_lvm/Makefile#1 branch .. //depot/projects/vap/sys/net/route.c#6 integrate .. //depot/projects/vap/sys/netgraph/netflow/netflow.c#7 integrate .. //depot/projects/vap/sys/netgraph/ng_base.c#9 integrate .. //depot/projects/vap/sys/netgraph/ng_bpf.c#6 integrate .. //depot/projects/vap/sys/netgraph/ng_ppp.c#6 integrate .. //depot/projects/vap/sys/netgraph/ng_pppoe.c#8 integrate .. //depot/projects/vap/sys/netinet/in_rmx.c#5 integrate .. //depot/projects/vap/sys/netinet/ip_carp.c#5 integrate .. //depot/projects/vap/sys/netinet/ip_id.c#5 integrate .. //depot/projects/vap/sys/nfs4client/nfs4_vfsops.c#7 integrate .. //depot/projects/vap/sys/nfs4client/nfs4_vnops.c#8 integrate .. //depot/projects/vap/sys/nfsclient/nfs_bio.c#6 integrate .. //depot/projects/vap/sys/nfsclient/nfs_diskless.c#6 integrate .. //depot/projects/vap/sys/nfsclient/nfs_socket.c#7 integrate .. //depot/projects/vap/sys/nfsclient/nfs_subs.c#8 integrate .. //depot/projects/vap/sys/nfsclient/nfs_vfsops.c#7 integrate .. //depot/projects/vap/sys/nfsclient/nfs_vnops.c#8 integrate .. //depot/projects/vap/sys/nfsclient/nfsm_subs.h#5 integrate .. //depot/projects/vap/sys/nfsclient/nfsnode.h#6 integrate .. //depot/projects/vap/sys/powerpc/aim/machdep.c#2 integrate .. //depot/projects/vap/sys/powerpc/aim/ofw_machdep.c#2 integrate .. //depot/projects/vap/sys/powerpc/conf/GENERIC#7 integrate .. //depot/projects/vap/sys/powerpc/conf/NOTES#4 integrate .. //depot/projects/vap/sys/powerpc/include/intr_machdep.h#5 integrate .. //depot/projects/vap/sys/powerpc/include/openpicreg.h#3 integrate .. //depot/projects/vap/sys/powerpc/include/openpicvar.h#5 integrate .. //depot/projects/vap/sys/powerpc/powermac/hrowpic.c#5 integrate .. //depot/projects/vap/sys/powerpc/powermac/openpic_macio.c#5 integrate .. //depot/projects/vap/sys/powerpc/powerpc/intr_machdep.c#5 integrate .. //depot/projects/vap/sys/powerpc/powerpc/openpic.c#5 integrate .. //depot/projects/vap/sys/powerpc/powerpc/pic_if.m#5 integrate .. //depot/projects/vap/sys/powerpc/psim/openpic_iobus.c#5 integrate .. //depot/projects/vap/sys/sparc64/include/md_var.h#4 integrate .. //depot/projects/vap/sys/sparc64/sparc64/ata_machdep.c#1 branch .. //depot/projects/vap/sys/sys/buf.h#8 integrate .. //depot/projects/vap/sys/sys/conf.h#7 integrate .. //depot/projects/vap/sys/sys/ipc.h#3 integrate .. //depot/projects/vap/sys/sys/lock.h#6 integrate .. //depot/projects/vap/sys/sys/lockmgr.h#8 integrate .. //depot/projects/vap/sys/sys/module.h#5 integrate .. //depot/projects/vap/sys/sys/param.h#9 integrate .. //depot/projects/vap/sys/sys/priv.h#5 integrate .. //depot/projects/vap/sys/sys/proc.h#8 integrate .. //depot/projects/vap/sys/sys/rwlock.h#3 integrate .. //depot/projects/vap/sys/sys/shm.h#6 integrate .. //depot/projects/vap/sys/sys/socketvar.h#8 integrate .. //depot/projects/vap/sys/sys/syscall.h#8 integrate .. //depot/projects/vap/sys/sys/syscall.mk#8 integrate .. //depot/projects/vap/sys/sys/syscallsubr.h#7 integrate .. //depot/projects/vap/sys/sys/sysproto.h#8 integrate .. //depot/projects/vap/sys/sys/user.h#8 integrate .. //depot/projects/vap/sys/tools/embed_mfs.sh#1 branch .. //depot/projects/vap/sys/ufs/ffs/ffs_vnops.c#8 integrate .. //depot/projects/vap/tools/regression/fsx/fsx.c#3 integrate .. //depot/projects/vap/tools/regression/lib/msun/Makefile#5 integrate .. //depot/projects/vap/tools/regression/lib/msun/test-exponential.c#2 integrate .. //depot/projects/vap/tools/regression/lib/msun/test-trig.c#1 branch .. //depot/projects/vap/tools/regression/lib/msun/test-trig.t#1 branch .. //depot/projects/vap/tools/regression/netinet/ip_id_period/ip_id_period.py#1 branch .. //depot/projects/vap/tools/regression/pthread/mutex_islocked_np/Makefile#2 delete .. //depot/projects/vap/tools/regression/pthread/mutex_islocked_np/mutex_islocked_np.c#2 delete .. //depot/projects/vap/tools/regression/pthread/mutex_isowned_np/Makefile#1 branch .. //depot/projects/vap/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c#1 branch .. //depot/projects/vap/tools/regression/security/open_to_operation/Makefile#1 branch .. //depot/projects/vap/tools/regression/security/open_to_operation/open_to_operation.c#1 branch .. //depot/projects/vap/tools/tools/crypto/cryptostats.c#3 integrate .. //depot/projects/vap/tools/tools/crypto/cryptotest.c#3 integrate .. //depot/projects/vap/usr.bin/calendar/calendars/calendar.dutch#3 integrate .. //depot/projects/vap/usr.bin/calendar/calendars/calendar.freebsd#4 integrate .. //depot/projects/vap/usr.bin/gzip/znew#3 integrate .. //depot/projects/vap/usr.bin/kdump/Makefile#4 integrate .. //depot/projects/vap/usr.bin/logger/logger.c#3 integrate .. //depot/projects/vap/usr.bin/ministat/ministat.c#2 integrate .. //depot/projects/vap/usr.bin/ncplogin/ncplogin.c#3 integrate .. //depot/projects/vap/usr.bin/netstat/netstat.h#4 integrate .. //depot/projects/vap/usr.bin/netstat/route.c#4 integrate .. //depot/projects/vap/usr.bin/procstat/procstat.c#2 integrate .. //depot/projects/vap/usr.bin/procstat/procstat_basic.c#2 integrate .. //depot/projects/vap/usr.bin/procstat/procstat_files.c#3 integrate .. //depot/projects/vap/usr.bin/procstat/procstat_kstack.c#2 integrate .. //depot/projects/vap/usr.bin/procstat/procstat_threads.c#2 integrate .. //depot/projects/vap/usr.bin/procstat/procstat_vm.c#2 integrate .. //depot/projects/vap/usr.bin/quota/quota.c#3 integrate .. //depot/projects/vap/usr.bin/sed/compile.c#3 integrate .. //depot/projects/vap/usr.bin/sed/defs.h#3 integrate .. //depot/projects/vap/usr.bin/sed/main.c#3 integrate .. //depot/projects/vap/usr.bin/sed/process.c#3 integrate .. //depot/projects/vap/usr.bin/tar/write.c#3 integrate .. //depot/projects/vap/usr.bin/truss/Makefile#4 integrate .. //depot/projects/vap/usr.bin/uniq/uniq.c#3 integrate .. //depot/projects/vap/usr.sbin/bootparamd/Makefile#3 integrate .. //depot/projects/vap/usr.sbin/bootparamd/Makefile.inc#3 integrate .. //depot/projects/vap/usr.sbin/cdcontrol/cdcontrol.c#3 integrate .. //depot/projects/vap/usr.sbin/pkg_install/add/pkg_add.1#4 integrate .. //depot/projects/vap/usr.sbin/portsnap/phttpget/phttpget.c#3 integrate .. //depot/projects/vap/usr.sbin/powerd/powerd.c#3 integrate .. //depot/projects/vap/usr.sbin/rpcbind/rpcbind.c#3 integrate .. //depot/projects/vap/usr.sbin/timed/timed/timed.8#4 integrate .. //depot/projects/vap/usr.sbin/traceroute6/traceroute6.8#3 integrate .. //depot/projects/vap/usr.sbin/traceroute6/traceroute6.c#3 integrate .. //depot/projects/vap/usr.sbin/zic/zdump.c#3 integrate Differences ... ==== //depot/projects/vap/Makefile.inc1#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.596 2008/01/23 22:21:36 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.598 2008/02/05 15:41:58 des Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -313,8 +313,9 @@ .endif .else rm -rf ${WORLDTMP}/legacy/usr/include -# XXX - These two can depend on any header file. +# XXX - These three can depend on any header file. rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/ioctl.c + rm -f ${OBJTREE}${.CURDIR}/usr.bin/kdump/kdump_subr.c rm -f ${OBJTREE}${.CURDIR}/usr.bin/truss/ioctl.c .endif .for _dir in \ ==== //depot/projects/vap/ObsoleteFiles.inc#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.127 2008/01/26 20:23:25 brueffer Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.131 2008/02/20 11:28:28 thompsa Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20080220: geom_lvm rename to geom_linux_lvm +OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz # 20080126: oldcard.4 removal OLD_FILES+=usr/share/man/man4/card.4.gz OLD_FILES+=usr/share/man/man4/oldcard.4.gz @@ -3945,7 +3947,9 @@ .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz .endif +.if ${TARGET_ARCH} != "powerpc" && ${TARGET_ARCH} != "sparc64" OLD_FILES+=usr/share/man/man8/ofwdump.8.gz +.endif OLD_FILES+=usr/share/man/man8/mount_reiserfs.8.gz OLD_FILES+=usr/share/man/man9/VFS_START.9.gz OLD_FILES+=usr/share/man/man9/cpu_critical_exit.9.gz ==== //depot/projects/vap/UPDATING#4 (text+ko) ==== @@ -22,6 +22,20 @@ to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20080220: + The new geom_lvm(4) geom class has been renamed to geom_linux_lvm(4), + likewise the kernel option is now GEOM_LINUX_LVM. + +20080211: + The default NFS mount mode has changed from UDP to TCP for + increased reliability. If you rely on (insecurely) NFS + mounting across a firewall you may need to update your + firewall rules. + +20080208: + Belatedly note the addition of m_collapse for compacting + mbuf chains. + 20080126: The fts(3) structures have been changed to use adequate integer types for their members and so to be able to cope @@ -969,4 +983,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.517 2008/01/26 17:09:39 yar Exp $ +$FreeBSD: src/UPDATING,v 1.520 2008/02/20 07:50:12 thompsa Exp $ ==== //depot/projects/vap/bin/date/date.c#3 (text+ko) ==== @@ -40,7 +40,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.47 2005/01/10 08:39:21 imp Exp $"); +__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.48 2008/02/07 16:04:24 ru Exp $"); #include #include @@ -186,8 +186,10 @@ const char *dot, *t; int century; + lt = localtime(&tval); + lt->tm_isdst = -1; /* divine correct DST */ + if (fmt != NULL) { - lt = localtime(&tval); t = strptime(p, fmt, lt); if (t == NULL) { fprintf(stderr, "Failed conversion of ``%s''" @@ -208,8 +210,6 @@ badformat(); } - lt = localtime(&tval); - if (dot != NULL) { /* .ss */ dot++; /* *dot++ = '\0'; */ if (strlen(dot) != 2) @@ -264,9 +264,6 @@ } } - /* Let mktime() decide whether summer time is in effect. */ - lt->tm_isdst = -1; - /* convert broken-down time to GMT clock time */ if ((tval = mktime(lt)) == -1) errx(1, "nonexistent time"); ==== //depot/projects/vap/bin/sh/mksyntax.c#3 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.24 2005/08/13 15:47:13 stefanf Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.25 2008/02/18 20:01:33 marcel Exp $"); /* * This program creates syntax.h and syntax.c. @@ -139,10 +139,7 @@ /* Determine the characteristics of chars. */ c = -1; - if (c < 0) - sign = 1; - else - sign = 0; + sign = (c > 0) ? 0 : 1; for (nbits = 1 ; ; nbits++) { d = (1 << nbits) - 1; if (d == c) ==== //depot/projects/vap/contrib/ncurses/FREEBSD-upgrade#4 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/contrib/ncurses/FREEBSD-upgrade,v 1.2 2007/12/30 11:19:29 rafan Exp $ +$FreeBSD: src/contrib/ncurses/FREEBSD-upgrade,v 1.3 2008/02/11 13:42:45 rafan Exp $ ncurses @@ -18,6 +18,10 @@ src/contrib/ncurses NCURSES v5_6_20061217 The date in the tag can be obtained from contrib/ncurses/dist.mk. +If the version is a snapshot, + + cvs import -m 'Import ncurses 5.6-20080209 snapshot onto the vendor branch' \ + src/contrib/ncurses NCURSES v5_6_20080209 Remove files that are removed in this release in vendor branch (NCURSES) instead of HEAD. ==== //depot/projects/vap/contrib/ncurses/MANIFEST#4 (text+ko) ==== @@ -571,6 +571,7 @@ ./man/curs_termattrs.3x ./man/curs_termcap.3x ./man/curs_terminfo.3x +./man/curs_threads.3x ./man/curs_touch.3x ./man/curs_trace.3x ./man/curs_util.3x @@ -810,6 +811,7 @@ ./ncurses/curses.priv.h ./ncurses/fifo_defs.h ./ncurses/llib-lncurses +./ncurses/llib-lncursest ./ncurses/llib-lncursesw ./ncurses/modules ./ncurses/tinfo/MKcaptab.awk ==== //depot/projects/vap/contrib/ncurses/NEWS#4 (text+ko) ==== @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1188 2007/12/22 23:56:08 tom Exp $ +-- $Id: NEWS,v 1.1206 2008/02/09 23:49:39 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,54 @@ Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20080209 + + update test programs to build/work with various UNIX curses for + comparisons. This was to reinvestigate statement in X/Open curses + that insnstr and winsnstr perform wrapping. None of the Unix-branded + implementations do this, as noted in manpage (cf: 20040228). + +20080203 + + modify _nc_setupscreen() to set the legacy-coding value the same + for both narrow/wide models. It had been set only for wide model, + but is needed to make unctrl() work with locale in the narrow model. + + improve waddch() and winsch() handling of EILSEQ from mbrtowc() by + using unctrl() to display illegal bytes rather than trying to append + further bytes to make up a valid sequence (reported by Andrey A + Chernov). + + modify unctrl() to check codes in 128-255 range versus isprint(). + If they are not printable, and locale was set, use a "M-" or "~" + sequence. + +20080126 + + improve threading in test/worm.c (wrap refresh calls, and KEY_RESIZE + handling). Now it hangs in napms(), no matter whether nanosleep() + or poll() or select() are used on Linux. + +20080119 + + fixes to build with --disable-ext-funcs + + add manpage for use_window and use_screen. + + add set_tabsize() and set_escdelay() functions. + +20080112 + + remove recursive-mutex definitions, finish threading demo for worm.c + + remove a redundant adjustment of lines in resizeterm.c's + adjust_window() which caused occasional misadjustment of stdscr when + softkeys were used. + +20080105 + + several improvements to terminfo entries based on xterm #230 -TD + + modify MKlib_gen.sh to handle keyname/key_name prototypes, so the + "link_test" builds properly. + + fix for toe command-line options -u/-U to ensure filename is given. + + fix allocation-size for command-line parsing in infocmp from 20070728 + (report by Miroslav Lichvar) + + improve resizeterm() by moving ripped-off lines, and repainting the + soft-keys (report by Katarina Machalkova) + + add clarification in wclear's manpage noting that the screen will be + cleared even if a subwindow is cleared (prompted by Christer Enfors + question). + + change test/ncurses.c soft-key tests to work with KEY_RESIZE. + 20071222 + continue implementing support for threading demo by adding mutex for delwin(). ==== //depot/projects/vap/contrib/ncurses/dist.mk#4 (text+ko) ==== @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.620 2007/12/22 20:41:31 tom Exp $ +# $Id: dist.mk,v 1.629 2008/02/09 15:32:57 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 6 -NCURSES_PATCH = 20071222 +NCURSES_PATCH = 20080209 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) ==== //depot/projects/vap/contrib/ncurses/form/frm_driver.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.85 2007/11/24 21:32:53 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.86 2008/01/19 20:11:03 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -676,7 +676,7 @@ new_bp[new_buflen] = myZEROS; } -#if USE_WIDEC_SUPPORT +#if USE_WIDEC_SUPPORT && NCURSES_EXT_FUNCS if (wresize(field->working, 1, Buffer_Length(field) + 1) == ERR) result = FALSE; #endif ==== //depot/projects/vap/contrib/ncurses/include/curses.h.in#4 (text+ko) ==== @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,7 +32,7 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.181 2007/11/18 00:32:03 tom Exp $ */ +/* $Id: curses.h.in,v 1.183 2008/01/19 20:03:48 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -827,7 +827,6 @@ /* * These functions are extensions - not in X/Open Curses. */ -#undef NCURSES_EXT_FUNCS #if @NCURSES_EXT_FUNCS@ #undef NCURSES_EXT_FUNCS #define NCURSES_EXT_FUNCS @NCURSES_PATCH@ @@ -841,6 +840,8 @@ extern NCURSES_EXPORT(int) keyok (int, bool); extern NCURSES_EXPORT(int) resize_term (int, int); extern NCURSES_EXPORT(int) resizeterm (int, int); +extern NCURSES_EXPORT(int) set_escdelay (int); +extern NCURSES_EXPORT(int) set_tabsize (int); extern NCURSES_EXPORT(int) use_default_colors (void); extern NCURSES_EXPORT(int) use_extended_names (bool); extern NCURSES_EXPORT(int) use_legacy_coding (int); ==== //depot/projects/vap/contrib/ncurses/include/ncurses_defs#4 (text+ko) ==== @@ -1,6 +1,6 @@ -# $Id: ncurses_defs,v 1.35 2007/10/06 21:18:16 tom Exp $ +# $Id: ncurses_defs,v 1.38 2008/02/10 00:12:03 tom Exp $ ############################################################################## -# Copyright (c) 2000-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 2000-2007,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -46,6 +46,8 @@ HAVE_BSD_SIGNAL_H HAVE_BTOWC HAVE_BUILTIN_H +HAVE_CHGAT 1 +HAVE_COLOR_SET 1 HAVE_DIRENT_H HAVE_ERRNO HAVE_FCNTL_H @@ -58,6 +60,7 @@ HAVE_GETEUID HAVE_GETMAXX 1 HAVE_GETNSTR +HAVE_GETPARX 1 HAVE_GETOPT_H HAVE_GETTIMEOFDAY HAVE_GETTTYNAM ==== //depot/projects/vap/contrib/ncurses/man/curs_clear.3x#3 (text+ko) ==== @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998,2005 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_clear.3x,v 1.10 2005/10/01 19:34:43 tom Exp $ +.\" $Id: curs_clear.3x,v 1.11 2007/12/29 15:58:38 tom Exp $ .TH curs_clear 3X "" .na .hy 0 @@ -105,6 +105,12 @@ That fact is not documented in other implementations, and may not be true of implementations which were not derived from SVr4 source. +.PP +Not obvious from the description, +most implementations clear the screen after \fBwclear\fP +even for a subwindow or derived window. +If you do not want to clear the screen during the next \fBwrefresh\fP, +use \fBwerase\fP instead. .SH SEE ALSO \fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X) .\"# ==== //depot/projects/vap/contrib/ncurses/man/man_db.renames#4 (text+ko) ==== @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: man_db.renames,v 0.39 2007/04/07 23:06:31 tom Exp $ +# $Id: man_db.renames,v 0.40 2008/01/19 18:28:50 tom Exp $ # Manual-page renamings for the man_db program # # Files: @@ -84,6 +84,7 @@ curs_termattrs.3x termattrs.3ncurses curs_termcap.3x termcap.3ncurses curs_terminfo.3x terminfo.3ncurses +curs_threads.3x threads.3ncurses curs_touch.3x touch.3ncurses curs_trace.3x trace.3ncurses curs_util.3x util.3ncurses @@ -116,9 +117,9 @@ form_win.3x win.3form infocmp.1m infocmp.1 infotocap.1m infotocap.1 +key_defined.3x key_defined.3ncurses keybound.3x keybound.3ncurses keyok.3x keyok.3ncurses -key_defined.3x key_defined.3ncurses legacy_coding.3x legacy_coding.3ncurses menu.3x menu.3menu menu_attributes.3x attributes.3menu ==== //depot/projects/vap/contrib/ncurses/man/manlinks.sed#3 (text+ko) ==== @@ -1,6 +1,6 @@ -# $Id: manlinks.sed,v 1.12 2003/12/20 13:17:56 tom Exp $ +# $Id: manlinks.sed,v 1.13 2008/01/19 23:31:17 tom Exp $ ############################################################################## -# Copyright (c) 2000-2002,2003 Free Software Foundation, Inc. # +# Copyright (c) 2000-2003,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -35,6 +35,7 @@ /\.\\"/d /^\.br/d /^\.sp/d +/typedef/d s/^\.IX// s/\\f.//g s/[:,]/ /g ==== //depot/projects/vap/contrib/ncurses/man/toe.1m#4 (text+ko) ==== @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: toe.1m,v 1.20 2006/12/24 17:20:37 tom Exp $ +.\" $Id: toe.1m,v 1.21 2008/01/05 20:57:16 tom Exp $ .TH @TOE@ 1M "" .ds n 5 .ds d @TERMINFO@ @@ -37,10 +37,14 @@ .br .SH DESCRIPTION .PP -With no options, \fBtoe\fR lists all available terminal types by primary name -with descriptions. File arguments specify the directories to be scanned; if no -such arguments are given, your default terminfo directory is scanned. If you -also specify the \fB-h\fR option, a directory header will be issued as each +With no options, +\fBtoe\fR lists all available terminal types by primary name +with descriptions. +File arguments specify the directories to be scanned; if no +such arguments are given, +your default terminfo directory is scanned. +If you also specify the \fB-h\fR option, +a directory header will be issued as each directory is entered. .PP There are other options intended for use by terminfo file maintainers: @@ -50,16 +54,25 @@ rather than only the first one that it finds. .TP \fB-u\fR \fIfile\fR -says to issue a report on dependencies in the given file. This report condenses -the `use' relation: each line consists of the primary name of a terminal that -has use capabilities, followed by a colon, followed by the +says to write a report to the standard output, +listing dependencies in the given terminfo/termcap source file. +The report condenses the `use' relation: +each line consists of the primary name of a terminal that +has use capabilities, +followed by a colon, +followed by the whitespace-separated primary names of all terminals which occur in those use -capabilities, followed by a newline +capabilities, +followed by a newline .TP \fB-U\fR \fIfile\fR -says to issue a report on reverse dependencies in the given file. This report -reverses the `use' relation: each line consists of the primary name of a -terminal that occurs in use capabilities, followed by a colon, followed by the +says to write a report to the standard output, +listing reverse dependencies in the given terminfo/termcap source file. +The report reverses the `use' relation: +each line consists of the primary name of a +terminal that occurs in use capabilities, +followed by a colon, +followed by the whitespace-separated primary names of all terminals which depend on it, followed by a newline. .TP @@ -70,7 +83,8 @@ interpreted as for \fB@TIC@\fR(1M). .TP \fB-V\fR -reports the version of ncurses which was used in this program, and exits. +reports the version of ncurses which was used in this program, +and exits. .SH FILES .TP 5 \fB\*d/?/*\fR ==== //depot/projects/vap/contrib/ncurses/misc/terminfo.src#4 (text+ko) ==== @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.318 $ -# $Date: 2007/11/03 19:02:01 $ +# $Revision: 1.326 $ +# $Date: 2007/11/12 00:22:07 $ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:40:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D6E1E16A407; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C1C816A401 for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 67DDB13C4F5 for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJe2ZZ086975 for ; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJe29G086967 for perforce@freebsd.org; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:40:02 GMT Message-Id: <200802201940.m1KJe29G086967@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135831 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:40:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135831 Change 135831 by sam@sam_ebb on 2008/02/20 19:39:30 add __noinline Submitted by: bsdimp Affected files ... .. //depot/projects/vap/sys/sys/cdefs.h#7 edit Differences ... ==== //depot/projects/vap/sys/sys/cdefs.h#7 (text+ko) ==== @@ -241,6 +241,12 @@ #define __gnu89_inline #endif +#if __GNUC_PREREQ__(3, 1) +#define __noinline __attribute__ ((noinline)) +#else +#define __noinline +#endif + #if __GNUC_PREREQ__(3, 3) #define __nonnull(x) __attribute__((__nonnull__(x))) #else From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:40:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5BD4016A534; Wed, 20 Feb 2008 19:40:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B5216A405 for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 944B413C4F2 for ; Wed, 20 Feb 2008 19:40:02 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJe27b086981 for ; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJe2PU086978 for perforce@freebsd.org; Wed, 20 Feb 2008 19:40:02 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:40:02 GMT Message-Id: <200802201940.m1KJe2PU086978@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135832 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:40:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=135832 Change 135832 by sam@sam_ebb on 2008/02/20 19:39:45 use __noinline from cdefs.h Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#29 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#29 (text+ko) ==== @@ -58,12 +58,6 @@ #include #endif -#ifdef __GNUC__ -#define __noinline __attribute__ ((noinline)) -#else -#define __noinline -#endif - #include #include #include From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:44:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 66AE716A407; Wed, 20 Feb 2008 19:44:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2038C16A401 for ; Wed, 20 Feb 2008 19:44:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0880513C44B for ; Wed, 20 Feb 2008 19:44:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJi6JP087162 for ; Wed, 20 Feb 2008 19:44:06 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJi6iT087159 for perforce@freebsd.org; Wed, 20 Feb 2008 19:44:06 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:44:06 GMT Message-Id: <200802201944.m1KJi6iT087159@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135833 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:44:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=135833 Change 135833 by sam@sam_ebb on 2008/02/20 19:43:08 IFC Affected files ... .. //depot/projects/vap/sys/i386/conf/GENERIC#7 integrate Differences ... ==== //depot/projects/vap/sys/i386/conf/GENERIC#7 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.480 2008/01/07 21:40:10 jhb Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.481 2008/02/03 07:07:30 scottl Exp $ cpu I486_CPU cpu I586_CPU @@ -140,7 +140,6 @@ device dpt # DPT Smartcache III, IV - See NOTES for options device hptmv # Highpoint RocketRAID 182x device hptrr # Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx -device rr232x # Highpoint RocketRAID 232x device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:47:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4828B16A404; Wed, 20 Feb 2008 19:47:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B39D16A400 for ; Wed, 20 Feb 2008 19:47:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E7C4713C459 for ; Wed, 20 Feb 2008 19:47:10 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJlAsr087297 for ; Wed, 20 Feb 2008 19:47:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJlAmd087294 for perforce@freebsd.org; Wed, 20 Feb 2008 19:47:10 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:47:10 GMT Message-Id: <200802201947.m1KJlAmd087294@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135834 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:47:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135834 Change 135834 by sam@sam_ebb on 2008/02/20 19:46:32 IFC finally Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_power.h#5 integrate .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#8 integrate .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#4 integrate Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_power.h#5 (text+ko) ==== ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#8 (text+ko) ==== @@ -30,9 +30,7 @@ */ #include -#ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.19 2005/01/27 17:39:17 sam Exp $"); -#endif +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_regdomain.c,v 1.3 2007/09/17 03:48:32 sam Exp $"); /* * IEEE 802.11 regdomain support. @@ -276,7 +274,7 @@ } } ie->len = frm - ie->cc; - if (ie->len & 1) { /* pad to multiple of 2 */ + if (ie->len & 1) { /* Zero pad to multiple of 2 */ ie->len++; *frm++ = 0; } ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#4 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Wed Feb 20 19:48:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98AEF16A40A; Wed, 20 Feb 2008 19:48:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B2DC16A404 for ; Wed, 20 Feb 2008 19:48:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7CA13C45A for ; Wed, 20 Feb 2008 19:48:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KJmChc087340 for ; Wed, 20 Feb 2008 19:48:12 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KJmBfr087337 for perforce@freebsd.org; Wed, 20 Feb 2008 19:48:11 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 19:48:11 GMT Message-Id: <200802201948.m1KJmBfr087337@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135835 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 19:48:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135835 Change 135835 by sam@sam_ebb on 2008/02/20 19:47:27 IFC Affected files ... .. //depot/projects/vap/sys/netinet6/ah_core.c#3 delete .. //depot/projects/vap/tools/tools/ath/80211debug.c#4 delete .. //depot/projects/vap/tools/tools/ath/athdebug.c#2 delete .. //depot/projects/vap/tools/tools/ath/athstats.c#5 delete Differences ... From owner-p4-projects@FreeBSD.ORG Wed Feb 20 21:57:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5AE3E16A403; Wed, 20 Feb 2008 21:57:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0557316A402 for ; Wed, 20 Feb 2008 21:57:40 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E6D6213C44B for ; Wed, 20 Feb 2008 21:57:39 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KLvduH006096 for ; Wed, 20 Feb 2008 21:57:39 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KLvdZQ006093 for perforce@freebsd.org; Wed, 20 Feb 2008 21:57:39 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 21:57:39 GMT Message-Id: <200802202157.m1KLvdZQ006093@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135838 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 21:57:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135838 Change 135838 by rrs@rrs-mips2-jnpr on 2008/02/20 21:56:49 Add tick timer to run octeon LED panel every 1 second. Probably need to take this back out after we are more stable, for now it gives us a visual feedback that things are working. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#4 (text+ko) ==== @@ -191,6 +191,11 @@ return (0); } +#ifdef TARGET_OCTEON +int wheel_run = 0; +#define OCTEON_TICK_COUNT 100 +void octeon_led_run_wheel(void); +#endif /* * Device section of file below */ @@ -213,6 +218,14 @@ usermode = tf->sr & MIPS_SR_KSU_USER; pc = tf->pc; +#ifdef TARGET_OCTEON + /* Run the FreeBSD display once every N ticks */ + wheel_run++; + if(wheel_run >= OCTEON_TICK_COUNT) { + wheel_run = 0; + octeon_led_run_wheel(); + } +#endif if (clocks_running) { hardclock(usermode, pc); } From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:10:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89ABD16A404; Wed, 20 Feb 2008 22:10:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44C9116A400 for ; Wed, 20 Feb 2008 22:10:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3231613C447 for ; Wed, 20 Feb 2008 22:10:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMAskd007948 for ; Wed, 20 Feb 2008 22:10:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMArTv007945 for perforce@freebsd.org; Wed, 20 Feb 2008 22:10:53 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 22:10:53 GMT Message-Id: <200802202210.m1KMArTv007945@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135840 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:10:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=135840 Change 135840 by sam@sam_ebb on 2008/02/20 22:10:33 can't recurse on the node table lock; need to think about whether this is needed on freebsd Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#30 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#30 (text+ko) ==== @@ -1207,14 +1207,12 @@ mlmeop.reason = reason; /* NB: the broadcast address means do 'em all */ if (!IEEE80211_ADDR_EQ(mac, ic->ic_ifp->if_broadcastaddr)) { - IEEE80211_NODE_LOCK(&ic->ic_sta); ni = ieee80211_find_node(&ic->ic_sta, mac); if (ni != NULL) { domlme(&mlmeop, ni); ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(&ic->ic_sta); } else { ieee80211_iterate_nodes(&ic->ic_sta, domlme, &mlmeop); @@ -1250,7 +1248,6 @@ error = EINVAL; break; } - IEEE80211_NODE_LOCK(&ic->ic_sta); ni = ieee80211_find_vap_node(&ic->ic_sta, vap, mac); if (ni != NULL) { IEEE80211_NOTE(vap, @@ -1264,14 +1261,12 @@ ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(&ic->ic_sta); break; case IEEE80211_MLME_AUTH: if (vap->iv_opmode != IEEE80211_M_HOSTAP) { error = EINVAL; break; } - IEEE80211_NODE_LOCK(&ic->ic_sta); ni = ieee80211_find_vap_node(&ic->ic_sta, vap, mac); if (ni != NULL) { if (reason == IEEE80211_STATUS_SUCCESS) { @@ -1303,7 +1298,6 @@ ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(&ic->ic_sta); break; default: error = EINVAL; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:11:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3772816A406; Wed, 20 Feb 2008 22:11:58 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D855316A404 for ; Wed, 20 Feb 2008 22:11:57 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C447313C465 for ; Wed, 20 Feb 2008 22:11:57 +0000 (UTC) (envelope-from swise@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMBvCC008009 for ; Wed, 20 Feb 2008 22:11:57 GMT (envelope-from swise@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMBvtN008006 for perforce@freebsd.org; Wed, 20 Feb 2008 22:11:57 GMT (envelope-from swise@FreeBSD.org) Date: Wed, 20 Feb 2008 22:11:57 GMT Message-Id: <200802202211.m1KMBvtN008006@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to swise@FreeBSD.org using -f From: Steve Wise To: Perforce Change Reviews Cc: Subject: PERFORCE change 135841 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:11:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135841 Change 135841 by swise@swise:vic10:iwarp on 2008/02/20 22:11:49 Move socket creation into the rdma core: - rdma-cma owns socket creation and destruction for users of the rdma-cma API. If an app wants toe create its own socket and do streaming IO before migrating to rdma mode, then it must use the IWCM API directly. (this is TBD) - rdma-cma binds socket when appropriate via sobind() to unify the TCP port space. - iwcm interface changed to allow passing in the socket ptr when the iw_cm_id is created. - chelsio rdma driver changed to take the socket from the iw_cm_id and use it for rdma connection setup. Affected files ... .. //depot/projects/iwarp/sys/contrib/rdma/iw_cm.h#2 edit .. //depot/projects/iwarp/sys/contrib/rdma/rdma_cma.c#10 edit .. //depot/projects/iwarp/sys/contrib/rdma/rdma_iwcm.c#8 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#5 edit Differences ... ==== //depot/projects/iwarp/sys/contrib/rdma/iw_cm.h#2 (text+ko) ==== @@ -35,6 +35,9 @@ #include +#include +#include + struct iw_cm_id; enum iw_cm_event_type { @@ -62,6 +65,7 @@ void *private_data; u8 private_data_len; void* provider_data; + struct socket *so; }; /** @@ -97,6 +101,7 @@ /* Used by provider to add and remove refs on IW cm_id */ void (*add_ref)(struct iw_cm_id *); void (*rem_ref)(struct iw_cm_id *); + struct socket *so; }; struct iw_cm_conn_param { @@ -134,11 +139,13 @@ * iw_create_cm_id - Create an IW CM identifier. * * @device: The IB device on which to create the IW CM identier. + * @so: The socket to be used for establishing the rdma connection. * @event_handler: User callback invoked to report events associated with the * returned IW CM identifier. * @context: User specified context associated with the id. */ struct iw_cm_id *iw_create_cm_id(struct ib_device *device, + struct socket *so, iw_cm_handler cm_handler, void *context); /** ==== //depot/projects/iwarp/sys/contrib/rdma/rdma_cma.c#10 (text+ko) ==== @@ -125,6 +125,7 @@ struct rdma_cm_id id; struct rdma_bind_list *bind_list; + struct socket *so; TAILQ_ENTRY(rdma_id_private) node; LIST_ENTRY(rdma_id_private) list; /* listen_any_list or cma_dev.list */ LIST_HEAD(, rdma_id_private) listen_list; /* per-device listens */ @@ -408,7 +409,7 @@ id_priv = malloc(sizeof *id_priv, M_DEVBUF, M_WAITOK); if (!id_priv) - return ERR_PTR(ENOMEM); + return ERR_PTR(-ENOMEM); bzero(id_priv, sizeof *id_priv); id_priv->state = CMA_IDLE; @@ -841,6 +842,8 @@ free(bind_list, M_DEVBUF); } mtx_unlock(&lock); + if (id_priv->so) + soclose(id_priv->so); } #ifdef IB_SUPPORTED @@ -1362,6 +1365,7 @@ *sin = iw_event->local_addr; sin = (struct sockaddr_in *) &new_cm_id->route.addr.dst_addr; *sin = iw_event->remote_addr; + conn_id->so = cm_id->so; memset(&event, 0, sizeof event); event.event = RDMA_CM_EVENT_CONNECT_REQUEST; @@ -1417,9 +1421,8 @@ int ret; struct sockaddr_in *sin; - id_priv->cm_id.iw = iw_create_cm_id(id_priv->id.device, - iw_conn_req_handler, - id_priv); + id_priv->cm_id.iw = iw_create_cm_id(id_priv->id.device, id_priv->so, + iw_conn_req_handler, id_priv); if (IS_ERR(id_priv->cm_id.iw)) return PTR_ERR(id_priv->cm_id.iw); @@ -1462,6 +1465,7 @@ dev_id_priv->state = CMA_ADDR_BOUND; memcpy(&id->route.addr.src_addr, &id_priv->id.route.addr.src_addr, ip_addr_size(&id_priv->id.route.addr.src_addr)); + dev_id_priv->so = id_priv->so; /* XXX */ cma_attach_to_dev(dev_id_priv, cma_dev); LIST_INSERT_HEAD(&id_priv->listen_list, dev_id_priv, listen_entry); @@ -1492,6 +1496,7 @@ memset(&addr_in, 0, sizeof addr_in); addr_in.sin_family = af; + addr_in.sin_len = sizeof addr_in; return rdma_bind_addr(id, (struct sockaddr *) &addr_in); } @@ -2023,7 +2028,7 @@ if (cma_any_addr(&cur_id->id.route.addr.src_addr)) return (EADDRNOTAVAIL); - cur_sin = (struct sockaddr_in *) &cur_id->id.route.addr.src_addr; + cur_sin = (struct sockaddr_in *)&cur_id->id.route.addr.src_addr; if (sin->sin_addr.s_addr == cur_sin->sin_addr.s_addr) return (EADDRINUSE); } @@ -2032,6 +2037,31 @@ return 0; } +static int cma_get_tcp_port(struct rdma_id_private *id_priv) +{ + int ret; + struct socket *so; + + ret = socreate(AF_INET, &so, SOCK_STREAM, IPPROTO_TCP, + curthread->td_ucred, curthread); + if (ret) { + printf("%s socreate err %d\n", __FUNCTION__, ret); + return ret; + } + + ret = sobind(so, (struct sockaddr *)&id_priv->id.route.addr.src_addr, + curthread); + KASSERT(ret == 0, ("sobind failed err %d", ret)); + if (ret) { + printf("%s sobind err %d\n", __FUNCTION__, ret); + soclose(so); + return ret; + } + printf("%s created/bound id_priv %p socket %p\n", __FUNCTION__, id_priv, so); + id_priv->so = so; + return 0; +} + static int cma_get_port(struct rdma_id_private *id_priv) { struct idr *ps; @@ -2043,6 +2073,9 @@ break; case RDMA_PS_TCP: ps = &tcp_ps; + ret = cma_get_tcp_port(id_priv); /* Synch with native stack */ + if (ret) + return ret; break; case RDMA_PS_UDP: ps = &udp_ps; @@ -2315,7 +2348,8 @@ int ret; struct iw_cm_conn_param iw_param; - cm_id = iw_create_cm_id(id_priv->id.device, cma_iw_handler, id_priv); + cm_id = iw_create_cm_id(id_priv->id.device, id_priv->so, + cma_iw_handler, id_priv); if (IS_ERR(cm_id)) { ret = PTR_ERR(cm_id); goto out; ==== //depot/projects/iwarp/sys/contrib/rdma/rdma_iwcm.c#8 (text+ko) ==== @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -230,11 +231,13 @@ static int cm_event_handler(struct iw_cm_id *cm_id, struct iw_cm_event *event); struct iw_cm_id *iw_create_cm_id(struct ib_device *device, + struct socket *so, iw_cm_handler cm_handler, void *context) { struct iwcm_id_private *cm_id_priv; + KASSERT(so, ("iw_create_cm_id called with NULL socket!")); cm_id_priv = malloc(sizeof(*cm_id_priv), M_DEVBUF, M_WAITOK); if (!cm_id_priv) return ERR_PTR(ENOMEM); @@ -247,6 +250,7 @@ cm_id_priv->id.event_handler = cm_event_handler; cm_id_priv->id.add_ref = add_ref; cm_id_priv->id.rem_ref = rem_ref; + cm_id_priv->id.so = so; mtx_init(&cm_id_priv->lock, "cm_id_priv", NULL, MTX_DUPOK|MTX_SPIN); atomic_set(&cm_id_priv->refcount, 1); TAILQ_INIT(&cm_id_priv->work_list); @@ -667,6 +671,7 @@ mtx_unlock_spin(&listen_id_priv->lock); cm_id = iw_create_cm_id(listen_id_priv->id.device, + iw_event->so, listen_id_priv->id.cm_handler, listen_id_priv->id.context); /* If the cm_id could not be created, ignore the request */ ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#5 (text+ko) ==== @@ -345,7 +345,7 @@ epc->so->so_upcallarg = NULL; epc->so->so_rcv.sb_flags &= ~SB_UPCALL; SOCK_UNLOCK(epc->so); - soclose(epc->so); + soshutdown(epc->so, SHUT_WR|SHUT_RD); epc->so = NULL; } @@ -589,6 +589,7 @@ event.private_data_len = ep->plen; event.private_data = ep->mpa_pkt + sizeof(struct mpa_message); event.provider_data = ep; + event.so = ep->com.so; if (state_read(&ep->parent_ep->com) != DEAD) ep->parent_ep->com.cm_id->event_handler( ep->parent_ep->com.cm_id, @@ -1046,6 +1047,7 @@ } if (state != ABORTING) { + close_socket(&ep->com); state_set(&ep->com, DEAD); put_ep(&ep->com); } @@ -1284,23 +1286,16 @@ return err; } -static int create_sock(struct iwch_ep_common *epc) +static int init_sock(struct iwch_ep_common *epc) { int err; struct sockopt sopt; int on=1; - err = socreate(AF_INET, &epc->so, SOCK_STREAM, IPPROTO_TCP, - epc->thread->td_ucred, epc->thread); - if (err) - return err; epc->so->so_upcall = iwch_so_upcall; epc->so->so_upcallarg = epc; epc->so->so_rcv.sb_flags |= SB_UPCALL; epc->so->so_state |= SS_NBIO; - - PDBG("%s ep %p so %p state %s\n", __FUNCTION__, ep, ep->com.so, states[ep->com.state]); - sopt.sopt_dir = SOPT_SET; sopt.sopt_level = SOL_SOCKET; sopt.sopt_name = SO_NO_DDP; @@ -1345,7 +1340,8 @@ PDBG("%s qpn 0x%x qp %p cm_id %p\n", __FUNCTION__, conn_param->qpn, ep->com.qp, cm_id); - err = create_sock(&ep->com); + ep->com.so = cm_id->so; + err = init_sock(&ep->com); if (err) goto fail2; @@ -1378,14 +1374,6 @@ state_set(&ep->com, CONNECTING); ep->com.local_addr = cm_id->local_addr; ep->com.remote_addr = cm_id->remote_addr; - - if (!in_nullhost(ep->com.local_addr.sin_addr)) { - err = sobind(ep->com.so, (struct sockaddr *)&ep->com.local_addr, - ep->com.thread); - if (err) - goto fail3; - } - err = soconnect(ep->com.so, (struct sockaddr *)&ep->com.remote_addr, ep->com.thread); if (!err) @@ -1418,25 +1406,18 @@ ep->com.thread = curthread; state_set(&ep->com, LISTEN); - err = create_sock(&ep->com); + ep->com.so = cm_id->so; + err = init_sock(&ep->com); if (err) - goto fail1; + goto fail; - err = sobind(ep->com.so, (struct sockaddr *)&ep->com.local_addr, - ep->com.thread); - if (err) { - printf("sobind failed with errno %d\n", err); - goto fail2; - } - err = solisten(ep->com.so, ep->backlog, ep->com.thread); if (!err) { cm_id->provider_data = ep; goto out; } -fail2: close_socket(&ep->com); -fail1: +fail: cm_id->rem_ref(cm_id); put_ep(&ep->com); out: From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:23:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8FECF16A404; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5277C16A402 for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 276FD13C455 for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMNBw0009344 for ; Wed, 20 Feb 2008 22:23:11 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMNAc6009341 for perforce@freebsd.org; Wed, 20 Feb 2008 22:23:10 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:23:10 GMT Message-Id: <200802202223.m1KMNAc6009341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135842 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:23:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135842 Change 135842 by rrs@rrs-mips2-jnpr on 2008/02/20 22:22:18 integrate over the .c Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:23:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4F8116A536; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AE0E16A40A for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2B413C457 for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMNBA8009350 for ; Wed, 20 Feb 2008 22:23:11 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMNBpX009347 for perforce@freebsd.org; Wed, 20 Feb 2008 22:23:11 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:23:11 GMT Message-Id: <200802202223.m1KMNBpX009347@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135843 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:23:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135843 Change 135843 by rrs@rrs-mips2-jnpr on 2008/02/20 22:22:36 the drive id Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.h#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:23:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 30A3A16A5BA; Wed, 20 Feb 2008 22:23:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF51616A4D2 for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7779A13C459 for ; Wed, 20 Feb 2008 22:23:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMNBTk009356 for ; Wed, 20 Feb 2008 22:23:11 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMNBCv009353 for perforce@freebsd.org; Wed, 20 Feb 2008 22:23:11 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:23:11 GMT Message-Id: <200802202223.m1KMNBCv009353@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135844 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:23:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135844 Change 135844 by rrs@rrs-mips2-jnpr on 2008/02/20 22:22:50 and the last file. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/driveid.h#1 branch Differences ... From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:25:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF47316A405; Wed, 20 Feb 2008 22:25:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4C4216A403 for ; Wed, 20 Feb 2008 22:25:13 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A2CC813C455 for ; Wed, 20 Feb 2008 22:25:13 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMPDfS009463 for ; Wed, 20 Feb 2008 22:25:13 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMPDJc009460 for perforce@freebsd.org; Wed, 20 Feb 2008 22:25:13 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:25:13 GMT Message-Id: <200802202225.m1KMPDJc009460@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135845 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:25:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=135845 Change 135845 by rrs@rrs-mips2-jnpr on 2008/02/20 22:24:36 get rid of // and fix byteswap bug Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#2 (text+ko) ==== @@ -101,7 +101,7 @@ #define NR_TRIES 1000 #define SWAP_SHORT(x) ((x << 8) | (x >> 8)) #define SWAP_LONG(x) (((x << 24) & 0xFF000000) | ((x << 8) & 0x00FF0000) | \ - ((x >> 8) & 0x0000FF00) | ((x << 24) & 0x000000FF) ) + ((x >> 8) & 0x0000FF00) | ((x >> 24) & 0x000000FF) ) #define MODEL_STR_SIZE 40 @@ -238,7 +238,7 @@ uint16_t *ptr_16; uint8_t *ptr_8; -//#define OCTEON_VISUAL_CF_0 1 + /*#define OCTEON_VISUAL_CF_0 1*/ #ifdef OCTEON_VISUAL_CF_0 octeon_led_write_char(0, 'R'); #endif @@ -290,7 +290,7 @@ uint16_t *ptr_16; uint8_t *ptr_8; -//#define OCTEON_VISUAL_CF_1 1 + /*#define OCTEON_VISUAL_CF_1 1*/ #ifdef OCTEON_VISUAL_CF_1 octeon_led_write_char(1, 'W'); #endif @@ -392,7 +392,7 @@ cf_swap_ascii(drive_param.u.driveid.model, drive_param.model); - drive_param.sector_size = 512; //= SWAP_SHORT (drive_param.u.driveid.sector_bytes); + drive_param.sector_size = 512; /* SWAP_SHORT (drive_param.u.driveid.sector_bytes); */ drive_param.heads = SWAP_SHORT (drive_param.u.driveid.cur_heads); drive_param.tracks = SWAP_SHORT (drive_param.u.driveid.cur_cyls); drive_param.sec_track = SWAP_SHORT (drive_param.u.driveid.cur_sectors); @@ -461,7 +461,7 @@ { uint8_t status; -//#define OCTEON_VISUAL_CF_2 1 + /*#define OCTEON_VISUAL_CF_2 1*/ #ifdef OCTEON_VISUAL_CF_2 static int where0 = 0; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:26:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A0C916A405; Wed, 20 Feb 2008 22:26:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E29F716A400 for ; Wed, 20 Feb 2008 22:26:14 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CEE7113C447 for ; Wed, 20 Feb 2008 22:26:14 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMQE10009524 for ; Wed, 20 Feb 2008 22:26:14 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMQEDO009521 for perforce@freebsd.org; Wed, 20 Feb 2008 22:26:14 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:26:14 GMT Message-Id: <200802202226.m1KMQEDO009521@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135846 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:26:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=135846 Change 135846 by rrs@rrs-mips2-jnpr on 2008/02/20 22:26:14 s9 indent Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights +Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17,25 +17,25 @@ * Neither the name of Cavium Networks nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written - permission. + permission. -This Software, including technical data, may be subject to U.S. export -control laws, including the U.S. Export Administration Act and its -associated regulations, and may be subject to export or import -regulations in other countries. You warrant that You will comply -strictly in all respects with all such regulations and acknowledge that -you have the responsibility to obtain licenses to export, re-export or -import the Software. +This Software, including technical data, may be subject to U.S. export +control laws, including the U.S. Export Administration Act and its +associated regulations, and may be subject to export or import +regulations in other countries. You warrant that You will comply +strictly in all respects with all such regulations and acknowledge that +you have the responsibility to obtain licenses to export, re-export or +import the Software. -TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" -AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS -OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT -TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY -REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT -DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF -TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, -LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION -OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR +TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" +AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS +OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT +TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY +REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT +DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF +TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, +LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION +OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. */ @@ -106,8 +106,8 @@ /* Globals */ -int bus_width; -void *base_addr; +int bus_width; +void *base_addr; /* Device softc */ struct cf_priv { @@ -122,11 +122,11 @@ }; /* Device parameters */ -struct drive_param{ +struct drive_param { union { char buf[SECTOR_SIZE]; struct hd_driveid driveid; - } u; + } u; char model[MODEL_STR_SIZE]; uint32_t nr_sectors; @@ -135,48 +135,49 @@ uint16_t tracks; uint16_t sec_track; -} drive_param; +} drive_param; /* GEOM class implementation */ -static g_access_t cf_access; -static g_start_t cf_start; -static g_ioctl_t cf_ioctl; +static g_access_t cf_access; +static g_start_t cf_start; +static g_ioctl_t cf_ioctl; struct g_class g_cf_class = { - .name = "CF", - .version = G_VERSION, - .start = cf_start, - .access = cf_access, - .ioctl = cf_ioctl, + .name = "CF", + .version = G_VERSION, + .start = cf_start, + .access = cf_access, + .ioctl = cf_ioctl, }; /* Device methods */ -static int cf_probe(device_t); -static void cf_identify(driver_t *, device_t); -static int cf_attach(device_t); -static int cf_attach_geom(void *, int); +static int cf_probe(device_t); +static void cf_identify(driver_t *, device_t); +static int cf_attach(device_t); +static int cf_attach_geom(void *, int); /* ATA methods */ -static void cf_cmd_identify(void); -static void cf_cmd_write(uint32_t, uint32_t, void *); -static void cf_cmd_read(uint32_t, uint32_t, void *); -static void cf_wait_busy(void); -static void cf_send_cmd(uint32_t, uint8_t); -static void cf_attach_geom_proxy(void *arg, int flag); +static void cf_cmd_identify(void); +static void cf_cmd_write(uint32_t, uint32_t, void *); +static void cf_cmd_read(uint32_t, uint32_t, void *); +static void cf_wait_busy(void); +static void cf_send_cmd(uint32_t, uint8_t); +static void cf_attach_geom_proxy(void *arg, int flag); /* Miscelenous */ -static void cf_swap_ascii(unsigned char[], char[]); +static void cf_swap_ascii(unsigned char[], char[]); /* ------------------------------------------------------------------- * * cf_access() * * ------------------------------------------------------------------- */ -static int cf_access (struct g_provider *pp, int r, int w, int e) +static int +cf_access(struct g_provider *pp, int r, int w, int e) { pp->sectorsize = drive_param.sector_size; - pp->stripesize = drive_param.heads * drive_param.sec_track * drive_param.sector_size; - pp->mediasize = pp->stripesize * drive_param.tracks; + pp->stripesize = drive_param.heads * drive_param.sec_track * drive_param.sector_size; + pp->mediasize = pp->stripesize * drive_param.tracks; return (0); } @@ -185,33 +186,32 @@ /* ------------------------------------------------------------------- * * cf_start() * * ------------------------------------------------------------------- */ -static void cf_start (struct bio *bp) +static void +cf_start(struct bio *bp) { /* - * Handle actual I/O requests. The request is passed down through - * the bio struct. - */ + * Handle actual I/O requests. The request is passed down through + * the bio struct. + */ - if(bp->bio_cmd & BIO_GETATTR) { + if (bp->bio_cmd & BIO_GETATTR) { if (g_handleattr_int(bp, "GEOM::fwsectors", drive_param.sec_track)) - return; - if (g_handleattr_int(bp, "GEOM::fwheads", drive_param.heads)) - return; - g_io_deliver(bp, ENOIOCTL); - return; + return; + if (g_handleattr_int(bp, "GEOM::fwheads", drive_param.heads)) + return; + g_io_deliver(bp, ENOIOCTL); + return; } - if ((bp->bio_cmd & (BIO_READ | BIO_WRITE))) { if (bp->bio_cmd & BIO_READ) { cf_cmd_read(bp->bio_length / drive_param.sector_size, - bp->bio_offset / drive_param.sector_size, bp->bio_data); + bp->bio_offset / drive_param.sector_size, bp->bio_data); } else if (bp->bio_cmd & BIO_WRITE) { cf_cmd_write(bp->bio_length / drive_param.sector_size, - bp->bio_offset/drive_param.sector_size, bp->bio_data); + bp->bio_offset / drive_param.sector_size, bp->bio_data); } - bp->bio_resid = 0; bp->bio_completed = bp->bio_length; g_io_deliver(bp, 0); @@ -219,9 +219,10 @@ } -static int cf_ioctl (struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) +static int +cf_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) { - return (0); + return (0); } @@ -231,20 +232,21 @@ * * Read nr_sectors from the device starting from start_sector. */ -static void cf_cmd_read (uint32_t nr_sectors, uint32_t start_sector, void *buf) +static void +cf_cmd_read(uint32_t nr_sectors, uint32_t start_sector, void *buf) { unsigned long lba; uint32_t count; uint16_t *ptr_16; - uint8_t *ptr_8; + uint8_t *ptr_8; - /*#define OCTEON_VISUAL_CF_0 1*/ + /* #define OCTEON_VISUAL_CF_0 1 */ #ifdef OCTEON_VISUAL_CF_0 - octeon_led_write_char(0, 'R'); + octeon_led_write_char(0, 'R'); #endif - ptr_8 = (uint8_t*)buf; - ptr_16 = (uint16_t*)buf; - lba = start_sector; + ptr_8 = (uint8_t *) buf; + ptr_16 = (uint16_t *) buf; + lba = start_sector; while (nr_sectors--) { @@ -252,27 +254,32 @@ cf_send_cmd(lba, CMD_READ_SECTOR); if (bus_width == 8) { - volatile uint8_t *task_file = (volatile uint8_t*)base_addr; - volatile uint8_t dummy; + volatile uint8_t *task_file = (volatile uint8_t *)base_addr; + volatile uint8_t dummy; + for (count = 0; count < SECTOR_SIZE; count++) { *ptr_8++ = task_file[TF_DATA]; - if ((count & 0xf) == 0) dummy = task_file[TF_STATUS]; + if ((count & 0xf) == 0) + dummy = task_file[TF_STATUS]; } } else { - volatile uint16_t *task_file = (volatile uint16_t*)base_addr; - volatile uint16_t dummy; - for (count = 0; count < SECTOR_SIZE; count+=2) { + volatile uint16_t *task_file = (volatile uint16_t *)base_addr; + volatile uint16_t dummy; + + for (count = 0; count < SECTOR_SIZE; count += 2) { uint16_t temp; + temp = task_file[TF_DATA]; *ptr_16++ = SWAP_SHORT(temp); - if ((count & 0xf) == 0) dummy = task_file[TF_STATUS/2]; + if ((count & 0xf) == 0) + dummy = task_file[TF_STATUS / 2]; } - } + } - lba ++; + lba++; } #ifdef OCTEON_VISUAL_CF_0 - octeon_led_write_char(0, ' '); + octeon_led_write_char(0, ' '); #endif } @@ -283,20 +290,21 @@ * * Write nr_sectors to the device starting from start_sector. */ -static void cf_cmd_write (uint32_t nr_sectors, uint32_t start_sector, void *buf) +static void +cf_cmd_write(uint32_t nr_sectors, uint32_t start_sector, void *buf) { uint32_t lba; uint32_t count; uint16_t *ptr_16; - uint8_t *ptr_8; - - /*#define OCTEON_VISUAL_CF_1 1*/ + uint8_t *ptr_8; + + /* #define OCTEON_VISUAL_CF_1 1 */ #ifdef OCTEON_VISUAL_CF_1 - octeon_led_write_char(1, 'W'); + octeon_led_write_char(1, 'W'); #endif lba = start_sector; - ptr_8 = (uint8_t*)buf; - ptr_16 = (uint16_t*)buf; + ptr_8 = (uint8_t *) buf; + ptr_16 = (uint16_t *) buf; while (nr_sectors--) { @@ -304,29 +312,32 @@ if (bus_width == 8) { volatile uint8_t *task_file; - volatile uint8_t dummy; + volatile uint8_t dummy; - task_file = (volatile uint8_t *) base_addr; + task_file = (volatile uint8_t *)base_addr; for (count = 0; count < SECTOR_SIZE; count++) { - task_file[TF_DATA] = *ptr_8++; - if ((count & 0xf) == 0) dummy = task_file[TF_STATUS]; + task_file[TF_DATA] = *ptr_8++; + if ((count & 0xf) == 0) + dummy = task_file[TF_STATUS]; } } else { volatile uint16_t *task_file; - volatile uint16_t dummy; + volatile uint16_t dummy; - task_file = (volatile uint16_t *) base_addr; - for (count = 0; count < SECTOR_SIZE; count+=2) { + task_file = (volatile uint16_t *)base_addr; + for (count = 0; count < SECTOR_SIZE; count += 2) { uint16_t temp = *ptr_16++; - task_file[TF_DATA] = SWAP_SHORT(temp); - if ((count & 0xf) == 0) dummy = task_file[TF_STATUS/2]; + + task_file[TF_DATA] = SWAP_SHORT(temp); + if ((count & 0xf) == 0) + dummy = task_file[TF_STATUS / 2]; } - } + } - lba ++; + lba++; } #ifdef OCTEON_VISUAL_CF_1 - octeon_led_write_char(1, ' '); + octeon_led_write_char(1, ' '); #endif } @@ -335,68 +346,74 @@ * cf_cmd_identify() * * ------------------------------------------------------------------- * * - * Read parameters and other information from the drive and store + * Read parameters and other information from the drive and store * it in the drive_param structure * */ -static void cf_cmd_identify (void) +static void +cf_cmd_identify(void) { int count; uint8_t status; if (bus_width == 8) { - volatile uint8_t *task_file; + volatile uint8_t *task_file; - task_file = (volatile uint8_t *) base_addr; + task_file = (volatile uint8_t *)base_addr; while ((status = task_file[TF_STATUS]) & STATUS_BSY) { DELAY(WAIT_DELAY); - } + } - task_file[TF_SECTOR_COUNT] = 0; - task_file[TF_SECTOR_NUMBER] = 0; - task_file[TF_CYL_LSB] = 0; - task_file[TF_CYL_MSB] = 0; - task_file[TF_DRV_HEAD] = 0; - task_file[TF_COMMAND] = CMD_IDENTIFY; + task_file[TF_SECTOR_COUNT] = 0; + task_file[TF_SECTOR_NUMBER] = 0; + task_file[TF_CYL_LSB] = 0; + task_file[TF_CYL_MSB] = 0; + task_file[TF_DRV_HEAD] = 0; + task_file[TF_COMMAND] = CMD_IDENTIFY; cf_wait_busy(); - for (count = 0; count < SECTOR_SIZE; count++) - drive_param.u.buf[count] = task_file[TF_DATA]; + for (count = 0; count < SECTOR_SIZE; count++) + drive_param.u.buf[count] = task_file[TF_DATA]; } else { volatile uint16_t *task_file; - task_file = (volatile uint16_t *) base_addr; + task_file = (volatile uint16_t *)base_addr; - while ((status = (task_file[TF_STATUS/2]>>8)) & STATUS_BSY) { + while ((status = (task_file[TF_STATUS / 2] >> 8)) & STATUS_BSY) { DELAY(WAIT_DELAY); } - task_file[TF_SECTOR_COUNT/2] = 0; /* this includes TF_SECTOR_NUMBER */ - task_file[TF_CYL_LSB/2] = 0; /* this includes TF_CYL_MSB */ - task_file[TF_DRV_HEAD/2] = 0 | (CMD_IDENTIFY<<8); /* this includes TF_COMMAND */ + task_file[TF_SECTOR_COUNT / 2] = 0; /* this includes + * TF_SECTOR_NUMBER */ + task_file[TF_CYL_LSB / 2] = 0; /* this includes TF_CYL_MSB */ + task_file[TF_DRV_HEAD / 2] = 0 | (CMD_IDENTIFY << 8); /* this includes + * TF_COMMAND */ cf_wait_busy(); - for (count = 0; count < SECTOR_SIZE; count+=2) { + for (count = 0; count < SECTOR_SIZE; count += 2) { uint16_t temp; + temp = task_file[TF_DATA]; - + /* endianess will be swapped below */ - drive_param.u.buf[count] = (temp & 0xff); - drive_param.u.buf[count+1] = (temp & 0xff00)>>8; + drive_param.u.buf[count] = (temp & 0xff); + drive_param.u.buf[count + 1] = (temp & 0xff00) >> 8; } } cf_swap_ascii(drive_param.u.driveid.model, drive_param.model); - drive_param.sector_size = 512; /* SWAP_SHORT (drive_param.u.driveid.sector_bytes); */ - drive_param.heads = SWAP_SHORT (drive_param.u.driveid.cur_heads); - drive_param.tracks = SWAP_SHORT (drive_param.u.driveid.cur_cyls); - drive_param.sec_track = SWAP_SHORT (drive_param.u.driveid.cur_sectors); - drive_param.nr_sectors = SWAP_LONG (drive_param.u.driveid.lba_capacity); + drive_param.sector_size = 512; /* SWAP_SHORT + * (drive_param.u.driveid.sector_bytes) + * ; */ + drive_param.heads = SWAP_SHORT(drive_param.u.driveid.cur_heads); + drive_param.tracks = SWAP_SHORT(drive_param.u.driveid.cur_cyls); + drive_param.sec_track = SWAP_SHORT(drive_param.u.driveid.cur_sectors); + drive_param.nr_sectors = SWAP_LONG(drive_param.u.driveid.lba_capacity); } @@ -408,38 +425,39 @@ * Send command to read/write one sector specified by lba. * */ -static void cf_send_cmd (uint32_t lba, uint8_t cmd) +static void +cf_send_cmd(uint32_t lba, uint8_t cmd) { uint8_t status; if (bus_width == 8) { volatile uint8_t *task_file; - task_file = (volatile uint8_t *) base_addr; + task_file = (volatile uint8_t *)base_addr; - while ( (status = task_file[TF_STATUS]) & STATUS_BSY) { + while ((status = task_file[TF_STATUS]) & STATUS_BSY) { DELAY(WAIT_DELAY); } - task_file[TF_SECTOR_COUNT] = 1; + task_file[TF_SECTOR_COUNT] = 1; task_file[TF_SECTOR_NUMBER] = (lba & 0xff); - task_file[TF_CYL_LSB] = ((lba >> 8) & 0xff); - task_file[TF_CYL_MSB] = ((lba >> 16) & 0xff); - task_file[TF_DRV_HEAD] = ((lba >> 24) & 0xff) | 0xe0; - task_file[TF_COMMAND] = cmd; + task_file[TF_CYL_LSB] = ((lba >> 8) & 0xff); + task_file[TF_CYL_MSB] = ((lba >> 16) & 0xff); + task_file[TF_DRV_HEAD] = ((lba >> 24) & 0xff) | 0xe0; + task_file[TF_COMMAND] = cmd; } else { volatile uint16_t *task_file; - task_file = (volatile uint16_t *) base_addr; + task_file = (volatile uint16_t *)base_addr; - while ( (status = (task_file[TF_STATUS/2]>>8)) & STATUS_BSY) { + while ((status = (task_file[TF_STATUS / 2] >> 8)) & STATUS_BSY) { DELAY(WAIT_DELAY); } - task_file[TF_SECTOR_COUNT/2] = 1 | ((lba & 0xff) << 8); - task_file[TF_CYL_LSB/2] = ((lba >> 8) & 0xff) | (((lba >> 16) & 0xff) << 8); - task_file[TF_DRV_HEAD/2] = (((lba >> 24) & 0xff) | 0xe0) | (cmd << 8); + task_file[TF_SECTOR_COUNT / 2] = 1 | ((lba & 0xff) << 8); + task_file[TF_CYL_LSB / 2] = ((lba >> 8) & 0xff) | (((lba >> 16) & 0xff) << 8); + task_file[TF_DRV_HEAD / 2] = (((lba >> 24) & 0xff) | 0xe0) | (cmd << 8); } @@ -451,45 +469,48 @@ * ------------------------------------------------------------------- * * * Wait until the drive finishes a given command and data is - * ready to be transferred. This is done by repeatedly checking + * ready to be transferred. This is done by repeatedly checking * the BSY and DRQ bits of the status register. When the controller - * is ready for data transfer, it clears the BSY bit and sets the + * is ready for data transfer, it clears the BSY bit and sets the * DRQ bit. * */ -static void cf_wait_busy (void) +static void +cf_wait_busy(void) { uint8_t status; - /*#define OCTEON_VISUAL_CF_2 1*/ + /* #define OCTEON_VISUAL_CF_2 1 */ #ifdef OCTEON_VISUAL_CF_2 - static int where0 = 0; + static int where0 = 0; - octeon_led_run_wheel(&where0, 2); + octeon_led_run_wheel(&where0, 2); #endif if (bus_width == 8) { volatile uint8_t *task_file; + task_file = (volatile uint8_t *)base_addr; - status = task_file[TF_STATUS]; - while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ ) { + status = task_file[TF_STATUS]; + while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ) { DELAY(WAIT_DELAY); status = task_file[TF_STATUS]; } } else { volatile uint16_t *task_file; + task_file = (volatile uint16_t *)base_addr; - status = task_file[TF_STATUS/2]>>8; - while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ ) { + status = task_file[TF_STATUS / 2] >> 8; + while ((status & STATUS_BSY) == STATUS_BSY || (status & STATUS_DRQ) != STATUS_DRQ) { DELAY(WAIT_DELAY); - status = (uint8_t)(task_file[TF_STATUS/2]>>8); + status = (uint8_t) (task_file[TF_STATUS / 2] >> 8); } } #ifdef OCTEON_VISUAL_CF_2 - octeon_led_write_char(2, ' '); + octeon_led_write_char(2, ' '); #endif } @@ -497,18 +518,19 @@ * cf_swap_ascii() * * ------------------------------------------------------------------- * * - * The ascii string returned by the controller specifying - * the model of the drive is byte-swaped. This routine + * The ascii string returned by the controller specifying + * the model of the drive is byte-swaped. This routine * corrects the byte ordering. * */ -static void cf_swap_ascii (unsigned char str1[], char str2[]) +static void +cf_swap_ascii(unsigned char str1[], char str2[]) { int i; for (i = 0; i < MODEL_STR_SIZE; i++) { - str2[i] = str1[i^1]; - } + str2[i] = str1[i ^ 1]; + } } @@ -516,7 +538,8 @@ * cf_probe() * * ------------------------------------------------------------------- */ -static int cf_probe (device_t dev) +static int +cf_probe(device_t dev) { if (!octeon_board_real()) return ENXIO; @@ -534,56 +557,58 @@ * cf_identify() * * ------------------------------------------------------------------- * * - * Find the bootbus region for the CF to determine - * 16 or 8 bit and check to see if device is + * Find the bootbus region for the CF to determine + * 16 or 8 bit and check to see if device is * inserted. * */ -static void cf_identify (driver_t *drv, device_t parent) +static void +cf_identify(driver_t * drv, device_t parent) { uint8_t status; - int bus_region; + int bus_region; int count = 0; - octeon_mio_boot_reg_cfgx_t cfg; + octeon_mio_boot_reg_cfgx_t cfg; - if (!octeon_board_real()) return 1; + if (!octeon_board_real()) + return 1; - base_addr = (void *) OCTEON_PHYS2PTR(OCTEON_CF_COMMON_BASE_ADDR); + base_addr = (void *)OCTEON_PHYS2PTR(OCTEON_CF_COMMON_BASE_ADDR); - for (bus_region = 0; bus_region < 8; bus_region++) - { - cfg.word64 = oct_read64(OCTEON_MIO_BOOT_REG_CFGX(bus_region)); - if (cfg.bits.base == OCTEON_CF_COMMON_BASE_ADDR >> 16) - { - bus_width = (cfg.bits.width) ? 16: 8; - printf("Compact flash found in bootbus region %d (%d bit).\n", bus_region, bus_width); - break; - } - } + for (bus_region = 0; bus_region < 8; bus_region++) { + cfg.word64 = oct_read64(OCTEON_MIO_BOOT_REG_CFGX(bus_region)); + if (cfg.bits.base == OCTEON_CF_COMMON_BASE_ADDR >> 16) { + bus_width = (cfg.bits.width) ? 16 : 8; + printf("Compact flash found in bootbus region %d (%d bit).\n", bus_region, bus_width); + break; + } + } if (bus_width == 8) { volatile uint8_t *task_file; - task_file = (volatile uint8_t *) base_addr; + + task_file = (volatile uint8_t *)base_addr; /* Check if CF is inserted */ - while ( (status = task_file[TF_STATUS]) & STATUS_BSY){ - if ((count++) == NR_TRIES ) { + while ((status = task_file[TF_STATUS]) & STATUS_BSY) { + if ((count++) == NR_TRIES) { printf("Compact Flash not present\n"); return; - } + } DELAY(WAIT_DELAY); - } + } } else { volatile uint16_t *task_file; - task_file = (volatile uint16_t *) base_addr; + + task_file = (volatile uint16_t *)base_addr; /* Check if CF is inserted */ - while ( (status = (task_file[TF_STATUS/2]>>8)) & STATUS_BSY){ - if ((count++) == NR_TRIES ) { + while ((status = (task_file[TF_STATUS / 2] >> 8)) & STATUS_BSY) { + if ((count++) == NR_TRIES) { printf("Compact Flash not present\n"); return; - } + } DELAY(WAIT_DELAY); - } + } } BUS_ADD_CHILD(parent, 0, "cf", 0); @@ -594,25 +619,27 @@ * cf_attach_geom() * * ------------------------------------------------------------------- */ -static int cf_attach_geom (void *arg, int flag) +static int +cf_attach_geom(void *arg, int flag) { struct cf_priv *cf_priv; - cf_priv = (struct cf_priv *) arg; + cf_priv = (struct cf_priv *)arg; cf_priv->cf_geom = g_new_geomf(&g_cf_class, "cf%d", device_get_unit(cf_priv->dev)); cf_priv->cf_provider = g_new_providerf(cf_priv->cf_geom, cf_priv->cf_geom->name); cf_priv->cf_geom->softc = cf_priv; - g_error_provider(cf_priv->cf_provider, 0); + g_error_provider(cf_priv->cf_provider, 0); - return (0); + return (0); } /* ------------------------------------------------------------------- * * cf_attach_geom() * * ------------------------------------------------------------------- */ -static void cf_attach_geom_proxy (void *arg, int flag) +static void +cf_attach_geom_proxy(void *arg, int flag) { - cf_attach_geom(arg, flag); + cf_attach_geom(arg, flag); } @@ -621,11 +648,13 @@ * cf_attach() * * ------------------------------------------------------------------- */ -static int cf_attach (device_t dev) +static int +cf_attach(device_t dev) { struct cf_priv *cf_priv; - if (!octeon_board_real()) return ENXIO; + if (!octeon_board_real()) + return ENXIO; cf_priv = device_get_softc(dev); cf_priv->dev = dev; @@ -634,24 +663,24 @@ g_post_event(cf_attach_geom_proxy, cf_priv, M_WAITOK, NULL); bioq_init(&cf_priv->cf_bq); - return 0; + return 0; } static device_method_t cf_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, cf_probe), - DEVMETHOD(device_identify, cf_identify), - DEVMETHOD(device_attach, cf_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), + /* Device interface */ + DEVMETHOD(device_probe, cf_probe), + DEVMETHOD(device_identify, cf_identify), + DEVMETHOD(device_attach, cf_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + {0, 0} }; static driver_t cf_driver = { - "cf", - cf_methods, + "cf", + cf_methods, sizeof(struct cf_priv) }; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:27:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 715C816A406; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3600E16A402 for ; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 23C6F13C447 for ; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMRF5M009573 for ; Wed, 20 Feb 2008 22:27:15 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMRFjO009570 for perforce@freebsd.org; Wed, 20 Feb 2008 22:27:15 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:27:15 GMT Message-Id: <200802202227.m1KMRFjO009570@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135847 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:27:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135847 Change 135847 by rrs@rrs-mips2-jnpr on 2008/02/20 22:26:30 s9indent Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights +Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17,25 +17,25 @@ * Neither the name of Cavium Networks nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written - permission. + permission. -This Software, including technical data, may be subject to U.S. export -control laws, including the U.S. Export Administration Act and its -associated regulations, and may be subject to export or import -regulations in other countries. You warrant that You will comply -strictly in all respects with all such regulations and acknowledge that -you have the responsibility to obtain licenses to export, re-export or -import the Software. +This Software, including technical data, may be subject to U.S. export +control laws, including the U.S. Export Administration Act and its +associated regulations, and may be subject to export or import +regulations in other countries. You warrant that You will comply +strictly in all respects with all such regulations and acknowledge that +you have the responsibility to obtain licenses to export, re-export or +import the Software. -TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" -AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS -OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT -TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY -REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT -DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF -TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, -LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION -OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR +TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" +AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS +OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT +TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY +REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT +DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF +TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, +LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION +OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. */ @@ -56,23 +56,21 @@ #define OCTEON_MIO_BOOT_REG_CFGX(offset) (0x8001180000000000ull + ((offset) * 8)) -typedef union -{ - uint64_t word64; - struct - { - uint64_t reserved : 27; /**< Reserved */ - uint64_t sam : 1; /**< Region 0 SAM */ - uint64_t we_ext : 2; /**< Region 0 write enable count extension */ - uint64_t oe_ext : 2; /**< Region 0 output enable count extension */ - uint64_t en : 1; /**< Region 0 enable */ - uint64_t orbit : 1; /**< No function for region 0 */ - uint64_t ale : 1; /**< Region 0 ALE mode */ - uint64_t width : 1; /**< Region 0 bus width */ - uint64_t size : 12; /**< Region 0 size */ - uint64_t base : 16; /**< Region 0 base address */ - } bits; -} octeon_mio_boot_reg_cfgx_t; +typedef union { + uint64_t word64; + struct { + uint64_t reserved:27; /**< Reserved */ + uint64_t sam:1; /**< Region 0 SAM */ + uint64_t we_ext:2; /**< Region 0 write enable count extension */ + uint64_t oe_ext:2; /**< Region 0 output enable count extension */ + uint64_t en:1; /**< Region 0 enable */ + uint64_t orbit:1; /**< No function for region 0 */ + uint64_t ale:1; /**< Region 0 ALE mode */ + uint64_t width:1; /**< Region 0 bus width */ + uint64_t size:12; /**< Region 0 size */ + uint64_t base:16; /**< Region 0 base address */ + } bits; +} octeon_mio_boot_reg_cfgx_t; -#endif /* __OCTEON_EBT3000_H__ */ +#endif /* __OCTEON_EBT3000_H__ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:27:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E061A16A530; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AF7316A403 for ; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 479F813C44B for ; Wed, 20 Feb 2008 22:27:16 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMRGYv009580 for ; Wed, 20 Feb 2008 22:27:16 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMRGJ5009576 for perforce@freebsd.org; Wed, 20 Feb 2008 22:27:16 GMT (envelope-from rrs@cisco.com) Date: Wed, 20 Feb 2008 22:27:16 GMT Message-Id: <200802202227.m1KMRGJ5009576@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135848 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:27:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=135848 Change 135848 by rrs@rrs-mips2-jnpr on 2008/02/20 22:26:44 s9indent Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/driveid.h#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/driveid.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights +Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights reserved. Redistribution and use in source and binary forms, with or without @@ -17,25 +17,25 @@ * Neither the name of Cavium Networks nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written - permission. + permission. -This Software, including technical data, may be subject to U.S. export -control laws, including the U.S. Export Administration Act and its -associated regulations, and may be subject to export or import -regulations in other countries. You warrant that You will comply -strictly in all respects with all such regulations and acknowledge that -you have the responsibility to obtain licenses to export, re-export or -import the Software. +This Software, including technical data, may be subject to U.S. export +control laws, including the U.S. Export Administration Act and its +associated regulations, and may be subject to export or import +regulations in other countries. You warrant that You will comply +strictly in all respects with all such regulations and acknowledge that +you have the responsibility to obtain licenses to export, re-export or +import the Software. -TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" -AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS -OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT -TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY -REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT -DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF -TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, -LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION -OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR +TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" +AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS +OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT +TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY +REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT +DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF +TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, +LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION +OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. */ @@ -52,250 +52,173 @@ struct hd_driveid { - unsigned short config; /* lots of obsolete bit flags */ - unsigned short cyls; /* Obsolete, "physical" cyls */ - unsigned short reserved2; /* reserved (word 2) */ - unsigned short heads; /* Obsolete, "physical" heads */ - unsigned short track_bytes; /* unformatted bytes per track */ - unsigned short sector_bytes; /* unformatted bytes per sector */ - unsigned short sectors; /* Obsolete, "physical" sectors per track */ - unsigned short vendor0; /* vendor unique */ - unsigned short vendor1; /* vendor unique */ - unsigned short vendor2; /* Retired vendor unique */ - unsigned char serial_no[20]; /* 0 = not_specified */ - unsigned short buf_type; /* Retired */ - unsigned short buf_size; /* Retired, 512 byte increments - * 0 = not_specified - */ - unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ - unsigned char fw_rev[8]; /* 0 = not_specified */ - unsigned char model[40]; /* 0 = not_specified */ - unsigned char max_multsect; /* 0=not_implemented */ - unsigned char vendor3; /* vendor unique */ - unsigned short dword_io; /* 0=not_implemented; 1=implemented */ - unsigned char vendor4; /* vendor unique */ - unsigned char capability; /* (upper byte of word 49) - * 3: IORDYsup - * 2: IORDYsw - * 1: LBA - * 0: DMA - */ - unsigned short reserved50; /* reserved (word 50) */ - unsigned char vendor5; /* Obsolete, vendor unique */ - unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ - unsigned char vendor6; /* Obsolete, vendor unique */ - unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ - unsigned short field_valid; /* (word 53) - * 2: ultra_ok word 88 - * 1: eide_ok words 64-70 - * 0: cur_ok words 54-58 - */ - unsigned short cur_cyls; /* Obsolete, logical cylinders */ - unsigned short cur_heads; /* Obsolete, l heads */ - unsigned short cur_sectors; /* Obsolete, l sectors per track */ - unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ - unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ - unsigned char multsect; /* current multiple sector count */ - unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ - unsigned int lba_capacity; /* Obsolete, total number of sectors */ - unsigned short dma_1word; /* Obsolete, single-word dma info */ - unsigned short dma_mword; /* multiple-word dma info */ - unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ - unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ - unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ - unsigned short eide_pio; /* min cycle time (ns), no IORDY */ - unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ - unsigned short words69_70[2]; /* reserved words 69-70 - * future command overlap and queuing - */ - /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ - unsigned short words71_74[4]; /* reserved words 71-74 - * for IDENTIFY PACKET DEVICE command - */ - unsigned short queue_depth; /* (word 75) - * 15:5 reserved - * 4:0 Maximum queue depth -1 - */ - unsigned short words76_79[4]; /* reserved words 76-79 */ - unsigned short major_rev_num; /* (word 80) */ - unsigned short minor_rev_num; /* (word 81) */ - unsigned short command_set_1; /* (word 82) supported - * 15: Obsolete - * 14: NOP command - * 13: READ_BUFFER - * 12: WRITE_BUFFER - * 11: Obsolete - * 10: Host Protected Area - * 9: DEVICE Reset - * 8: SERVICE Interrupt - * 7: Release Interrupt - * 6: look-ahead - * 5: write cache - * 4: PACKET Command - * 3: Power Management Feature Set - * 2: Removable Feature Set - * 1: Security Feature Set - * 0: SMART Feature Set - */ - unsigned short command_set_2; /* (word 83) - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: FLUSH CACHE EXT - * 12: FLUSH CACHE - * 11: Device Configuration Overlay - * 10: 48-bit Address Feature Set - * 9: Automatic Acoustic Management - * 8: SET MAX security - * 7: reserved 1407DT PARTIES - * 6: SetF sub-command Power-Up - * 5: Power-Up in Standby Feature Set - * 4: Removable Media Notification - * 3: APM Feature Set - * 2: CFA Feature Set - * 1: READ/WRITE DMA QUEUED - * 0: Download MicroCode - */ - unsigned short cfsse; /* (word 84) - * cmd set-feature supported extensions - * 15: Shall be ZERO - * 14: Shall be ONE - * 13:6 reserved - * 5: General Purpose Logging - * 4: Streaming Feature Set - * 3: Media Card Pass Through - * 2: Media Serial Number Valid - * 1: SMART selt-test supported - * 0: SMART error logging - */ - unsigned short cfs_enable_1; /* (word 85) - * command set-feature enabled - * 15: Obsolete - * 14: NOP command - * 13: READ_BUFFER - * 12: WRITE_BUFFER - * 11: Obsolete - * 10: Host Protected Area - * 9: DEVICE Reset - * 8: SERVICE Interrupt - * 7: Release Interrupt - * 6: look-ahead - * 5: write cache - * 4: PACKET Command - * 3: Power Management Feature Set - * 2: Removable Feature Set - * 1: Security Feature Set - * 0: SMART Feature Set - */ - unsigned short cfs_enable_2; /* (word 86) - * command set-feature enabled - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: FLUSH CACHE EXT - * 12: FLUSH CACHE - * 11: Device Configuration Overlay - * 10: 48-bit Address Feature Set - * 9: Automatic Acoustic Management - * 8: SET MAX security - * 7: reserved 1407DT PARTIES - * 6: SetF sub-command Power-Up - * 5: Power-Up in Standby Feature Set - * 4: Removable Media Notification - * 3: APM Feature Set - * 2: CFA Feature Set - * 1: READ/WRITE DMA QUEUED - * 0: Download MicroCode - */ - unsigned short csf_default; /* (word 87) - * command set-feature default - * 15: Shall be ZERO - * 14: Shall be ONE - * 13:6 reserved - * 5: General Purpose Logging enabled - * 4: Valid CONFIGURE STREAM executed - * 3: Media Card Pass Through enabled - * 2: Media Serial Number Valid - * 1: SMART selt-test supported - * 0: SMART error logging - */ - unsigned short dma_ultra; /* (word 88) */ - unsigned short trseuc; /* time required for security erase */ - unsigned short trsEuc; /* time required for enhanced erase */ - unsigned short CurAPMvalues; /* current APM values */ - unsigned short mprc; /* master password revision code */ - unsigned short hw_config; /* hardware config (word 93) - * 15: Shall be ZERO - * 14: Shall be ONE - * 13: - * 12: - * 11: - * 10: - * 9: - * 8: - * 7: - * 6: - * 5: - * 4: - * 3: - * 2: - * 1: - * 0: Shall be ONE - */ - unsigned short acoustic; /* (word 94) - * 15:8 Vendor's recommended value - * 7:0 current value - */ - unsigned short msrqs; /* min stream request size */ - unsigned short sxfert; /* stream transfer time */ - unsigned short sal; /* stream access latency */ - unsigned int spg; /* stream performance granularity */ - unsigned long long lba_capacity_2;/* 48-bit total number of sectors */ - unsigned short words104_125[22];/* reserved words 104-125 */ - unsigned short last_lun; /* (word 126) */ - unsigned short word127; /* (word 127) Feature Set - * Removable Media Notification - * 15:2 reserved - * 1:0 00 = not supported - * 01 = supported - * 10 = reserved - * 11 = reserved - */ - unsigned short dlf; /* (word 128) - * device lock function - * 15:9 reserved - * 8 security level 1:max 0:high - * 7:6 reserved - * 5 enhanced erase - * 4 expire - * 3 frozen - * 2 locked - * 1 en/disabled - * 0 capability - */ - unsigned short csfo; /* (word 129) - * current set features options - * 15:4 reserved - * 3: auto reassign - * 2: reverting - * 1: read-look-ahead - * 0: write cache - */ - unsigned short words130_155[26];/* reserved vendor words 130-155 */ - unsigned short word156; /* reserved vendor word 156 */ - unsigned short words157_159[3];/* reserved vendor words 157-159 */ - unsigned short cfa_power; /* (word 160) CFA Power Mode - * 15 word 160 supported - * 14 reserved - * 13 - * 12 - * 11:0 - */ - unsigned short words161_175[15];/* Reserved for CFA */ - unsigned short words176_205[30];/* Current Media Serial Number */ - unsigned short words206_254[49];/* reserved words 206-254 */ - unsigned short integrity_word; /* (word 255) - * 15:8 Checksum - * 7:0 Signature - */ + unsigned short config; /* lots of obsolete bit flags */ + unsigned short cyls; /* Obsolete, "physical" cyls */ + unsigned short reserved2; /* reserved (word 2) */ + unsigned short heads; /* Obsolete, "physical" heads */ + unsigned short track_bytes; /* unformatted bytes per track */ + unsigned short sector_bytes; /* unformatted bytes per sector */ + unsigned short sectors; /* Obsolete, "physical" sectors per track */ + unsigned short vendor0; /* vendor unique */ + unsigned short vendor1; /* vendor unique */ + unsigned short vendor2; /* Retired vendor unique */ + unsigned char serial_no[20]; /* 0 = not_specified */ + unsigned short buf_type;/* Retired */ + unsigned short buf_size;/* Retired, 512 byte increments 0 = + * not_specified */ + unsigned short ecc_bytes; /* for r/w long cmds; 0 = + * not_specified */ + unsigned char fw_rev[8];/* 0 = not_specified */ + unsigned char model[40];/* 0 = not_specified */ + unsigned char max_multsect; /* 0=not_implemented */ + unsigned char vendor3; /* vendor unique */ + unsigned short dword_io;/* 0=not_implemented; 1=implemented */ + unsigned char vendor4; /* vendor unique */ + unsigned char capability; /* (upper byte of word 49) 3: + * IORDYsup 2: IORDYsw 1: LBA 0: + * DMA */ + unsigned short reserved50; /* reserved (word 50) */ + unsigned char vendor5; /* Obsolete, vendor unique */ + unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */ + unsigned char vendor6; /* Obsolete, vendor unique */ + unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */ + unsigned short field_valid; /* (word 53) 2: ultra_ok word + * 88 1: eide_ok words 64-70 + * 0: cur_ok words 54-58 */ + unsigned short cur_cyls;/* Obsolete, logical cylinders */ + unsigned short cur_heads; /* Obsolete, l heads */ + unsigned short cur_sectors; /* Obsolete, l sectors per track */ + unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */ + unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */ + unsigned char multsect; /* current multiple sector count */ + unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ + unsigned int lba_capacity; /* Obsolete, total number of sectors */ + unsigned short dma_1word; /* Obsolete, single-word dma info */ + unsigned short dma_mword; /* multiple-word dma info */ + unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ + unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ + unsigned short eide_dma_time; /* recommended mword dma cycle time + * (ns) */ + unsigned short eide_pio;/* min cycle time (ns), no IORDY */ + unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ + unsigned short words69_70[2]; /* reserved words 69-70 future command + * overlap and queuing */ + /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ + unsigned short words71_74[4]; /* reserved words 71-74 for IDENTIFY + * PACKET DEVICE command */ + unsigned short queue_depth; /* (word 75) 15:5 reserved 4:0 Maximum + * queue depth -1 */ + unsigned short words76_79[4]; /* reserved words 76-79 */ + unsigned short major_rev_num; /* (word 80) */ + unsigned short minor_rev_num; /* (word 81) */ + unsigned short command_set_1; /* (word 82) supported 15: Obsolete + * 14: NOP command 13: READ_BUFFER + * 12: WRITE_BUFFER 11: Obsolete 10: + * Host Protected Area 9: DEVICE + * Reset 8: SERVICE Interrupt 7: + * Release Interrupt 6: look-ahead 5: + * write cache 4: PACKET Command 3: + * Power Management Feature Set 2: + * Removable Feature Set 1: Security + * Feature Set 0: SMART Feature Set */ + unsigned short command_set_2; /* (word 83) 15: Shall be ZERO 14: + * Shall be ONE 13: FLUSH CACHE EXT + * 12: FLUSH CACHE 11: Device + * Configuration Overlay 10: 48-bit + * Address Feature Set 9: Automatic + * Acoustic Management 8: SET MAX + * security 7: reserved 1407DT + * PARTIES 6: SetF sub-command + * Power-Up 5: Power-Up in Standby + * Feature Set 4: Removable Media + * Notification 3: APM Feature Set 2: + * CFA Feature Set 1: READ/WRITE DMA + * QUEUED 0: Download MicroCode */ + unsigned short cfsse; /* (word 84) cmd set-feature supported + * extensions 15: Shall be ZERO 14: Shall be + * ONE 13:6 reserved 5: General Purpose + * Logging 4: Streaming Feature Set 3: Media + * Card Pass Through 2: Media Serial Number + * Valid 1: SMART selt-test supported 0: + * SMART error logging */ + unsigned short cfs_enable_1; /* (word 85) command set-feature + * enabled 15: Obsolete 14: NOP + * command 13: READ_BUFFER 12: + * WRITE_BUFFER 11: Obsolete 10: + * Host Protected Area 9: DEVICE + * Reset 8: SERVICE Interrupt 7: + * Release Interrupt 6: look-ahead 5: + * write cache 4: PACKET Command 3: + * Power Management Feature Set 2: + * Removable Feature Set 1: Security + * Feature Set 0: SMART Feature Set */ + unsigned short cfs_enable_2; /* (word 86) command set-feature + * enabled 15: Shall be ZERO 14: + * Shall be ONE 13: FLUSH CACHE EXT + * 12: FLUSH CACHE 11: Device + * Configuration Overlay 10: 48-bit + * Address Feature Set 9: Automatic + * Acoustic Management 8: SET MAX + * security 7: reserved 1407DT + * PARTIES 6: SetF sub-command + * Power-Up 5: Power-Up in Standby + * Feature Set 4: Removable Media + * Notification 3: APM Feature Set 2: + * CFA Feature Set 1: READ/WRITE DMA + * QUEUED 0: Download MicroCode */ + unsigned short csf_default; /* (word 87) command set-feature + * default 15: Shall be ZERO 14: + * Shall be ONE 13:6 reserved 5: + * General Purpose Logging enabled 4: + * Valid CONFIGURE STREAM executed 3: + * Media Card Pass Through enabled 2: + * Media Serial Number Valid 1: SMART + * selt-test supported 0: SMART error + * logging */ + unsigned short dma_ultra; /* (word 88) */ + unsigned short trseuc; /* time required for security erase */ + unsigned short trsEuc; /* time required for enhanced erase */ + unsigned short CurAPMvalues; /* current APM values */ + unsigned short mprc; /* master password revision code */ + unsigned short hw_config; /* hardware config (word 93) 15: + * Shall be ZERO 14: Shall be ONE 13: + * 12: 11: 10: 9: 8: 7: 6: 5: 4: 3: 2: + * 1: 0: Shall be ONE */ + unsigned short acoustic;/* (word 94) 15:8 Vendor's recommended value + * 7:0 current value */ + unsigned short msrqs; /* min stream request size */ + unsigned short sxfert; /* stream transfer time */ + unsigned short sal; /* stream access latency */ + unsigned int spg; /* stream performance granularity */ + unsigned long long lba_capacity_2; /* 48-bit total number of + * sectors */ + unsigned short words104_125[22]; /* reserved words 104-125 */ + unsigned short last_lun;/* (word 126) */ + unsigned short word127; /* (word 127) Feature Set Removable Media + * Notification 15:2 reserved 1:0 00 = not + * supported 01 = supported 10 = reserved 11 = + * reserved */ + unsigned short dlf; /* (word 128) device lock function 15:9 + * reserved 8 security level 1:max 0:high + * 7:6 reserved 5 enhanced erase 4 expire + * 3 frozen 2 locked 1 en/disabled 0 + * capability */ + unsigned short csfo; /* (word 129) current set features options + * 15:4 reserved 3: auto reassign 2: + * reverting 1: read-look-ahead 0: write + * cache */ + unsigned short words130_155[26]; /* reserved vendor words + * 130-155 */ + unsigned short word156; /* reserved vendor word 156 */ + unsigned short words157_159[3]; /* reserved vendor words 157-159 */ + unsigned short cfa_power; /* (word 160) CFA Power Mode 15 word + * 160 supported 14 reserved 13 12 + * 11:0 */ + unsigned short words161_175[15]; /* Reserved for CFA */ + unsigned short words176_205[30]; /* Current Media Serial Number */ + unsigned short words206_254[49]; /* reserved words 206-254 */ + unsigned short integrity_word; /* (word 255) 15:8 Checksum 7:0 + * Signature */ }; -#endif /* __DRIVEID_H__ */ +#endif /* __DRIVEID_H__ */ From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:42:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8CE4B16A40B; Wed, 20 Feb 2008 22:42:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A81E16A408 for ; Wed, 20 Feb 2008 22:42:33 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1024913C44B for ; Wed, 20 Feb 2008 22:42:33 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMgWk7010452 for ; Wed, 20 Feb 2008 22:42:32 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMgWcZ010449 for perforce@freebsd.org; Wed, 20 Feb 2008 22:42:32 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 22:42:32 GMT Message-Id: <200802202242.m1KMgWcZ010449@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135850 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:42:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135850 Change 135850 by sam@sam_ebb on 2008/02/20 22:41:58 check for DATAPAD in the right place Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#31 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#31 (text+ko) ==== @@ -879,7 +879,7 @@ /* * Honor driver DATAPAD requirement. */ - if (vap->iv_flags & IEEE80211_F_DATAPAD) + if (ic->ic_flags & IEEE80211_F_DATAPAD) hdrspace = roundup(hdrsize, sizeof(uint32_t)); else hdrspace = hdrsize; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:45:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02AE116A405; Wed, 20 Feb 2008 22:45:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBB1816A402 for ; Wed, 20 Feb 2008 22:45:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AA19213C45A for ; Wed, 20 Feb 2008 22:45:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMjZ4S010609 for ; Wed, 20 Feb 2008 22:45:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMjZGL010606 for perforce@freebsd.org; Wed, 20 Feb 2008 22:45:35 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 22:45:35 GMT Message-Id: <200802202245.m1KMjZGL010606@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135851 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:45:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135851 Change 135851 by sam@sam_ebb on 2008/02/20 22:44:45 turn off WME by default; net80211 enables it 'cuz we say we're capable; need to bring in support for h/w TKIP+s/w MIC so it's generally safe Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#35 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#35 (text+ko) ==== @@ -857,6 +857,9 @@ ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); ATH_LOCK(sc); + /* XXX turn off WME until we fix WME+TKIP for older chips */ + vap->iv_flags &= ~IEEE80211_F_WME; + /* h/w crypto support */ vap->iv_key_alloc = ath_key_alloc; vap->iv_key_delete = ath_key_delete; From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:46:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 473C716A407; Wed, 20 Feb 2008 22:46:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BEAF16A401 for ; Wed, 20 Feb 2008 22:46:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D64C313C4D1 for ; Wed, 20 Feb 2008 22:46:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMkaAg010656 for ; Wed, 20 Feb 2008 22:46:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMkaMM010653 for perforce@freebsd.org; Wed, 20 Feb 2008 22:46:36 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 22:46:36 GMT Message-Id: <200802202246.m1KMkaMM010653@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135852 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:46:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135852 Change 135852 by sam@sam_ebb on 2008/02/20 22:45:40 fix comment Affected files ... .. //depot/projects/vap/tools/tools/net80211/wlanstats/main.c#5 edit Differences ... ==== //depot/projects/vap/tools/tools/net80211/wlanstats/main.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ /* * wlanstats [-i interface] - * (default interface is ath0). + * (default interface is wlan0). */ #include From owner-p4-projects@FreeBSD.ORG Wed Feb 20 22:48:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9543616A400; Wed, 20 Feb 2008 22:48:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C19E16A404 for ; Wed, 20 Feb 2008 22:48:40 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E58FE13C46E for ; Wed, 20 Feb 2008 22:48:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1KMmdiw010719 for ; Wed, 20 Feb 2008 22:48:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1KMmdfw010716 for perforce@freebsd.org; Wed, 20 Feb 2008 22:48:39 GMT (envelope-from sam@freebsd.org) Date: Wed, 20 Feb 2008 22:48:39 GMT Message-Id: <200802202248.m1KMmdfw010716@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135853 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 22:48:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=135853 Change 135853 by sam@sam_ebb on 2008/02/20 22:47:44 fix make install Affected files ... .. //depot/projects/vap/tools/tools/net80211/wlanwds/Makefile#2 edit Differences ... ==== //depot/projects/vap/tools/tools/net80211/wlanwds/Makefile#2 (text+ko) ==== @@ -1,6 +1,7 @@ # $NetBSD$ PROG= wlanwds +BINDIR= /usr/local/bin NO_MAN= .include From owner-p4-projects@FreeBSD.ORG Thu Feb 21 00:25:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A83916A407; Thu, 21 Feb 2008 00:25:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBC5916A404 for ; Thu, 21 Feb 2008 00:25:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BBB6E13C442 for ; Thu, 21 Feb 2008 00:25:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L0PZWi019313 for ; Thu, 21 Feb 2008 00:25:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L0PZch019310 for perforce@freebsd.org; Thu, 21 Feb 2008 00:25:35 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 00:25:35 GMT Message-Id: <200802210025.m1L0PZch019310@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135858 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 00:25:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135858 Change 135858 by sam@sam_ebb on 2008/02/21 00:25:26 guard against being called prior to associate; probably should overhaul the api's but this stuff is too lame to waste time on Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_rssadapt.c#3 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_rssadapt.c#3 (text+ko) ==== @@ -215,13 +215,15 @@ } void -ieee80211_rssadapt_tx_complete(struct ieee80211_rssadapt_node *rn, +ieee80211_rssadapt_tx_complete(struct ieee80211_rssadapt_node *ra, int success, int pktlen, int rate, int rssi) { - if (success) - rssadapt_raise_rate(rn, pktlen, rate, rssi); - else - rssadapt_lower_rate(rn, pktlen, rate, rssi); + if (ra->ra_ni != NULL) { /* setup when associated */ + if (success) + rssadapt_raise_rate(ra, pktlen, rate, rssi); + else + rssadapt_lower_rate(ra, pktlen, rate, rssi); + } } /* From owner-p4-projects@FreeBSD.ORG Thu Feb 21 00:44:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C23D816A408; Thu, 21 Feb 2008 00:44:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8258416A402 for ; Thu, 21 Feb 2008 00:44:57 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 70D5B13C46A for ; Thu, 21 Feb 2008 00:44:57 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L0iviV020052 for ; Thu, 21 Feb 2008 00:44:57 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L0iviJ020049 for perforce@freebsd.org; Thu, 21 Feb 2008 00:44:57 GMT (envelope-from marcel@freebsd.org) Date: Thu, 21 Feb 2008 00:44:57 GMT Message-Id: <200802210044.m1L0iviJ020049@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135859 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 00:44:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135859 Change 135859 by marcel@marcel_xcllnt on 2008/02/21 00:43:57 Call the FPU emulator when we get an EXC_PGM. This makes a hard float work on E500. The overhead is about 4% utilization when running top(1). Reserve space for the FP registers on Book-E as well and account for the increased PCB size in locore.S In machdep.c, include opt_kstack_pages.h. Affected files ... .. //depot/projects/e500/sys/powerpc/booke/locore.S#4 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#9 edit .. //depot/projects/e500/sys/powerpc/booke/trap.c#3 edit .. //depot/projects/e500/sys/powerpc/include/pcb.h#3 edit Differences ... ==== //depot/projects/e500/sys/powerpc/booke/locore.S#4 (text+ko) ==== @@ -257,7 +257,7 @@ */ lis %r1, kstack0_space@ha addi %r1, %r1, kstack0_space@l - addi %r1, %r1, (16384 - 256) + addi %r1, %r1, (16384 - 512) /* * Intialise exception vector offsets ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#9 (text+ko) ==== @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD: src/sys/powerpc/powerpc/machdep.c,v 1.89.2.1 2005/08/08 07:02:12 grehan Exp $"); #include "opt_compat.h" +#include "opt_kstack_pages.h" #include #include ==== //depot/projects/e500/sys/powerpc/booke/trap.c#3 (text+ko) ==== @@ -34,6 +34,7 @@ #include __FBSDID("$FreeBSD: src/sys/powerpc/powerpc/trap.c,v 1.54.2.1 2005/08/08 07:02:12 grehan Exp $"); +#include "opt_fpu_emu.h" #include "opt_ktrace.h" #include @@ -74,6 +75,10 @@ #include #include +#ifdef FPU_EMU +#include +#endif + void trap(struct trapframe *); static void trap_fatal(struct trapframe *frame); @@ -179,9 +184,17 @@ case EXC_DEBUG: /* Single stepping */ mtspr(SPR_DBSR, mfspr(SPR_DBSR)); frame->srr1 &= ~PSL_DE; - /*FALLTHROUGH*/ - case EXC_PGM: /* GDB breakpoint */ + sig = SIGTRAP; + break; + + case EXC_PGM: /* Program exception */ +#ifdef FPU_EMU + sig = fpu_emulate(frame, + (struct fpreg *)&td->td_pcb->pcb_fpu); +#else + /* XXX SIGILL for non-trap instructions. */ sig = SIGTRAP; +#endif break; default: ==== //depot/projects/e500/sys/powerpc/include/pcb.h#3 (text+ko) ==== @@ -70,7 +70,6 @@ faultbuf *pcb_onfault; /* For use during copyin/copyout */ int pcb_flags; -#if defined(AIM) #define PCB_FPU 1 /* Process had FPU initialized */ struct fpu { double fpr[32]; @@ -78,7 +77,6 @@ } pcb_fpu; /* Floating point processor */ unsigned int pcb_fpcpu; /* which CPU had our FPU stuff. */ -#endif }; #ifdef _KERNEL From owner-p4-projects@FreeBSD.ORG Thu Feb 21 01:35:52 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D9D0D16A407; Thu, 21 Feb 2008 01:35:51 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ED8616A400 for ; Thu, 21 Feb 2008 01:35:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8F99613C442 for ; Thu, 21 Feb 2008 01:35:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L1ZpgZ033056 for ; Thu, 21 Feb 2008 01:35:51 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L1Zp5T033053 for perforce@freebsd.org; Thu, 21 Feb 2008 01:35:51 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 01:35:51 GMT Message-Id: <200802210135.m1L1Zp5T033053@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135862 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 01:35:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=135862 Change 135862 by sam@sam_ebb on 2008/02/21 01:35:15 o fix old references to ic_stats to count things per-vap o change SIOCG80211STATS to return the vap stats so wlanstats works again Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#12 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#16 edit .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#31 edit .. //depot/projects/vap/sys/net80211/ieee80211_output.c#32 edit .. //depot/projects/vap/sys/net80211/ieee80211_sta.c#6 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#12 (text+ko) ==== @@ -1651,7 +1651,7 @@ */ if ((ic->ic_flags & IEEE80211_F_SCAN) == 0 && subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP) { - ic->ic_stats.is_rx_mgtdiscard++; + vap->iv_stats.is_rx_mgtdiscard++; return; } /* NB: accept off-channel frames */ ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#16 (text+ko) ==== @@ -1714,7 +1714,7 @@ ieee80211_send_bar(struct ieee80211_node *ni, const struct ieee80211_tx_ampdu *tap) { -#define senderr(_x, _v) do { ic->ic_stats._v++; ret = _x; goto bad; } while (0) +#define senderr(_x, _v) do { vap->iv_stats._v++; ret = _x; goto bad; } while (0) #define ADDSHORT(frm, v) do { \ frm[0] = (v) & 0xff; \ frm[1] = (v) >> 8; \ @@ -1786,7 +1786,7 @@ ieee80211_send_action(struct ieee80211_node *ni, int category, int action, uint16_t args[4]) { -#define senderr(_x, _v) do { ic->ic_stats._v++; ret = _x; goto bad; } while (0) +#define senderr(_x, _v) do { vap->iv_stats._v++; ret = _x; goto bad; } while (0) #define ADDSHORT(frm, v) do { \ frm[0] = (v) & 0xff; \ frm[1] = (v) >> 8; \ ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#31 (text+ko) ==== @@ -3088,7 +3088,7 @@ break; case SIOCG80211STATS: ifr = (struct ifreq *)data; - copyout(&ic->ic_stats, ifr->ifr_data, sizeof (ic->ic_stats)); + copyout(&vap->iv_stats, ifr->ifr_data, sizeof (vap->iv_stats)); break; case SIOCSIFMTU: ifr = (struct ifreq *)data; ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#32 (text+ko) ==== @@ -1716,7 +1716,7 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg) { #define HTFLAGS (IEEE80211_NODE_HT | IEEE80211_NODE_HTCOMPAT) -#define senderr(_x, _v) do { ic->ic_stats._v++; ret = _x; goto bad; } while (0) +#define senderr(_x, _v) do { vap->iv_stats._v++; ret = _x; goto bad; } while (0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ieee80211_node *bss = vap->iv_bss; ==== //depot/projects/vap/sys/net80211/ieee80211_sta.c#6 (text+ko) ==== @@ -1204,7 +1204,7 @@ * Frames otherwise received are discarded. */ if (!((ic->ic_flags & IEEE80211_F_SCAN) || ni->ni_associd)) { - ic->ic_stats.is_rx_mgtdiscard++; + vap->iv_stats.is_rx_mgtdiscard++; return; } /* XXX probe response in sta mode when !scanning? */ From owner-p4-projects@FreeBSD.ORG Thu Feb 21 01:38:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 774D116A405; Thu, 21 Feb 2008 01:38:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 245F716A402 for ; Thu, 21 Feb 2008 01:38:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EC87513C43E for ; Thu, 21 Feb 2008 01:38:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L1cs5T033133 for ; Thu, 21 Feb 2008 01:38:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L1cs0e033130 for perforce@freebsd.org; Thu, 21 Feb 2008 01:38:54 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 01:38:54 GMT Message-Id: <200802210138.m1L1cs0e033130@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135863 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 01:38:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=135863 Change 135863 by sam@sam_ebb on 2008/02/21 01:38:20 mark reminder Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211.c#25 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211.c#25 (text+ko) ==== @@ -480,6 +480,7 @@ ether_ifdetach(ifp); IEEE80211_LOCK(ic); + /* XXX accumulate iv_stats in ic_stats? */ TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); ieee80211_syncflag_locked(ic, IEEE80211_F_WME); ieee80211_syncflag_locked(ic, IEEE80211_F_TURBOP); From owner-p4-projects@FreeBSD.ORG Thu Feb 21 02:24:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A88516A40A; Thu, 21 Feb 2008 02:24:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC2B116A407 for ; Thu, 21 Feb 2008 02:24:25 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DDB5913C46E for ; Thu, 21 Feb 2008 02:24:25 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L2OPMg036984 for ; Thu, 21 Feb 2008 02:24:25 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L2OPT1036981 for perforce@freebsd.org; Thu, 21 Feb 2008 02:24:25 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 21 Feb 2008 02:24:25 GMT Message-Id: <200802210224.m1L2OPT1036981@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135867 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 02:24:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=135867 Change 135867 by kmacy@kmacy:entropy:iwarp on 2008/02/21 02:23:32 bump rcv_nxt if we haven't received a FIN before Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#14 (text+ko) ==== @@ -2389,7 +2389,6 @@ struct tcpcb *tp = sototcpcb(so); struct toepcb *toep = tp->t_toe; int keep = 0; - DPRINTF("do_peer_fin state=%d\n", tp->t_state); #ifdef T3_TRACE @@ -2411,8 +2410,22 @@ return; } } - if (TCPS_HAVERCVDFIN(tp->t_state) == 0) + if (TCPS_HAVERCVDFIN(tp->t_state) == 0) { socantrcvmore(so); + /* + * If connection is half-synchronized + * (ie NEEDSYN flag on) then delay ACK, + * so it may be piggybacked when SYN is sent. + * Otherwise, since we received a FIN then no + * more input can be expected, send ACK now. + */ + if (tp->t_flags & TF_NEEDSYN) + tp->t_flags |= TF_DELACK; + else + tp->t_flags |= TF_ACKNOW; + tp->rcv_nxt++; + } + switch (tp->t_state) { case TCPS_SYN_RECEIVED: tp->t_starttime = ticks; @@ -3113,7 +3126,6 @@ to.to_mss = mss; to.to_wscale = wsf; to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); - INP_INFO_WLOCK(&tcbinfo); INP_LOCK(inp); syncache_offload_add(&inc, &to, &th, inp, &lso, &cxgb_toe_usrreqs, toep); @@ -3359,8 +3371,9 @@ tp->t_flags |= G_TCPOPT_TSTAMP(opt) ? TF_RCVD_TSTMP : 0; tp->t_flags |= G_TCPOPT_SACK(opt) ? TF_SACK_PERMIT : 0; tp->t_flags |= G_TCPOPT_WSCALE_OK(opt) ? TF_RCVD_SCALE : 0; - if (tp->t_flags & TF_RCVD_SCALE) - tp->rcv_scale = 0; + if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == + (TF_RCVD_SCALE|TF_REQ_SCALE)) + tp->rcv_scale = tp->request_r_scale; } /* From owner-p4-projects@FreeBSD.ORG Thu Feb 21 05:02:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2D96B16A408; Thu, 21 Feb 2008 05:02:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E44D216A401 for ; Thu, 21 Feb 2008 05:02:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF58813C45E for ; Thu, 21 Feb 2008 05:02:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L52AAX057902 for ; Thu, 21 Feb 2008 05:02:10 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L52AwK057899 for perforce@freebsd.org; Thu, 21 Feb 2008 05:02:10 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 21 Feb 2008 05:02:10 GMT Message-Id: <200802210502.m1L52AwK057899@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135870 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 05:02:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135870 Change 135870 by kmacy@kmacy:entropy:iwarp on 2008/02/21 05:01:40 add new line Affected files ... .. //depot/projects/iwarp/sys/i386/conf/GENERIC#9 edit Differences ... ==== //depot/projects/iwarp/sys/i386/conf/GENERIC#9 (text+ko) ==== @@ -274,4 +274,4 @@ options KTR_COMPILE=(KTR_SPARE2) options KTR_CPUMASK=0x7 options KTR_ENTRIES=65536 -options KTR_MASK=(KTR_SPARE2)+options KTR_MASK=(KTR_SPARE2) From owner-p4-projects@FreeBSD.ORG Thu Feb 21 05:34:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 37AED16A402; Thu, 21 Feb 2008 05:34:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C107D16A400 for ; Thu, 21 Feb 2008 05:34:44 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B58BB13C457 for ; Thu, 21 Feb 2008 05:34:44 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L5YiRn062498 for ; Thu, 21 Feb 2008 05:34:44 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L5Yi8P062495 for perforce@freebsd.org; Thu, 21 Feb 2008 05:34:44 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 05:34:44 GMT Message-Id: <200802210534.m1L5Yi8P062495@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135871 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 05:34:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135871 Change 135871 by sam@sam_ebb on 2008/02/21 05:34:11 correct inverted test Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#33 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#33 (text+ko) ==== @@ -840,7 +840,7 @@ key = ieee80211_crypto_getucastkey(vap, ni); else key = ieee80211_crypto_getmcastkey(vap, ni); - if (key == NULL && (m->m_flags & M_EAPOL)) { + if (key == NULL && (m->m_flags & M_EAPOL) == 0) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, eh.ether_dhost, "no default transmit key (%s) deftxkey %u", From owner-p4-projects@FreeBSD.ORG Thu Feb 21 05:59:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 957BC16A403; Thu, 21 Feb 2008 05:59:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37FFD16A400 for ; Thu, 21 Feb 2008 05:59:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C9E413C4D9 for ; Thu, 21 Feb 2008 05:59:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L5xBpJ064339 for ; Thu, 21 Feb 2008 05:59:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L5xBWH064336 for perforce@freebsd.org; Thu, 21 Feb 2008 05:59:11 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 05:59:11 GMT Message-Id: <200802210559.m1L5xBWH064336@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135872 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 05:59:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=135872 Change 135872 by sam@sam_ebb on 2008/02/21 05:58:45 Propagate private mbuf flags when inserting an mbuf during encap. Our private flags are not defined as part of M_COPYFLAGS so we lost M_EAPOL (and potentially other bits) and broke WPA. Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#34 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#34 (text+ko) ==== @@ -737,6 +737,7 @@ m_move_pkthdr(n, m); n->m_len = 0; /* NB: m_gethdr does not set */ n->m_data += needed_space; + n->m_flags |= m->m_flags & M_80211_TX; /* * Pull up Ethernet header to create the expected layout. * We could use m_pullup but that's overkill (i.e. we don't From owner-p4-projects@FreeBSD.ORG Thu Feb 21 06:24:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0426016A407; Thu, 21 Feb 2008 06:24:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C0116A405 for ; Thu, 21 Feb 2008 06:24:43 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 81A7A13C455 for ; Thu, 21 Feb 2008 06:24:43 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L6Ohjk067488 for ; Thu, 21 Feb 2008 06:24:43 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L6OffM067485 for perforce@freebsd.org; Thu, 21 Feb 2008 06:24:41 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 21 Feb 2008 06:24:41 GMT Message-Id: <200802210624.m1L6OffM067485@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135873 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 06:24:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=135873 Change 135873 by kmacy@kmacy:entropy:iwarp on 2008/02/21 06:24:19 set cpu mask for all 8 cpus Affected files ... .. //depot/projects/iwarp/sys/amd64/conf/GENERIC#12 edit Differences ... ==== //depot/projects/iwarp/sys/amd64/conf/GENERIC#12 (text+ko) ==== @@ -218,7 +218,7 @@ options KTR options KTR_COMPILE=(KTR_SPARE2) -options KTR_CPUMASK=0x7 +options KTR_CPUMASK=0xff options KTR_ENTRIES=65536 options KTR_MASK=(KTR_SPARE2) From owner-p4-projects@FreeBSD.ORG Thu Feb 21 06:25:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3069C16A406; Thu, 21 Feb 2008 06:25:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D15E916A400 for ; Thu, 21 Feb 2008 06:25:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C64E713C447 for ; Thu, 21 Feb 2008 06:25:44 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L6Pi2p067577 for ; Thu, 21 Feb 2008 06:25:44 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L6PiIh067574 for perforce@freebsd.org; Thu, 21 Feb 2008 06:25:44 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 21 Feb 2008 06:25:44 GMT Message-Id: <200802210625.m1L6PiIh067574@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135874 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 06:25:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=135874 Change 135874 by kmacy@kmacy:entropy:iwarp on 2008/02/21 06:24:47 calculate the number of descriptors correctly for an offload request Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#14 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/cxgb_sge.c#14 (text+ko) ==== @@ -1945,18 +1945,25 @@ calc_tx_descs_ofld(struct mbuf *m, unsigned int nsegs) { unsigned int flits, cnt = 0; + int ndescs; + if (m->m_len <= WR_LEN && nsegs == 0) + return (1); /* packet fits as immediate data */ - if (m->m_len <= WR_LEN) - return 1; /* packet fits as immediate data */ - if (m->m_flags & M_IOVEC) cnt = mtomv(m)->mv_count; + else + cnt = nsegs; /* headers */ - flits = ((uint8_t *)m->m_pkthdr.header - mtod(m, uint8_t *)) / 8; + flits = m->m_len / 8; + + ndescs = flits_to_desc(flits + sgl_len(cnt)); + + CTR4(KTR_CXGB, "flits=%d sgl_len=%d nsegs=%d ndescs=%d", + flits, sgl_len(cnt), nsegs, ndescs); - return flits_to_desc(flits + sgl_len(cnt)); + return (ndescs); } /** From owner-p4-projects@FreeBSD.ORG Thu Feb 21 06:28:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC5FC16A405; Thu, 21 Feb 2008 06:28:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787F616A403 for ; Thu, 21 Feb 2008 06:28:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7FF13C455 for ; Thu, 21 Feb 2008 06:28:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L6SmSe067675 for ; Thu, 21 Feb 2008 06:28:48 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L6SlJX067672 for perforce@freebsd.org; Thu, 21 Feb 2008 06:28:47 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 21 Feb 2008 06:28:47 GMT Message-Id: <200802210628.m1L6SlJX067672@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135875 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 06:28:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135875 Change 135875 by kmacy@kmacy:entropy:iwarp on 2008/02/21 06:28:01 - general cleanups - don't ktr log segments for immediate request - more connection shutdown cleanups Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#15 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#15 (text+ko) ==== @@ -64,6 +64,7 @@ #include #include #include +#include #include #include @@ -145,10 +146,6 @@ static inline void free_atid(struct t3cdev *cdev, unsigned int tid); static void handle_syncache_event(int event, void *arg); -#ifndef TCP_USRREQS_OVERLOAD -#define cxgb_tcp_drop tcp_drop -#endif - static inline void SBAPPEND(struct sockbuf *sb, struct mbuf *n) { @@ -412,7 +409,7 @@ toep->tp_wr_unacked += mbuf_wrs[count]; i = 0; - while (i < count) { + while (i < count && m_get_sgllen(m0)) { if ((count - i) >= 3) { CTR6(KTR_TOM, "t3_push_frames: pa=0x%zx len=%d pa=0x%zx len=%d pa=0x%zx len=%d", @@ -449,7 +446,6 @@ enqueue_wr(toep, m0); DPRINTF("sending offload tx with %d bytes in %d segments\n", bytes, count); - l2t_send(cdev, m0, toep->tp_l2t); } SOCKBUF_UNLOCK(&so->so_snd); @@ -1338,7 +1334,7 @@ t3_release_offload_resources(toep); if (tp) { INP_LOCK_ASSERT(tp->t_inpcb); - cxgb_tcp_drop(tp, errno); + tcp_drop(tp, errno); } #ifdef notyet @@ -1904,7 +1900,7 @@ rcv_nxt, tp->rcv_nxt)); m->m_len = m->m_pkthdr.len = rcv_nxt - tp->rcv_nxt; KASSERT(m->m_len > 0, ("%s m_len=%d", __FUNCTION__, m->m_len)); - CTR3(KTR_TOM, "rcv_nxt=0x%x tp->rcv_nxt=0x%x len=%d\n", + CTR3(KTR_TOM, "rcv_nxt=0x%x tp->rcv_nxt=0x%x len=%d", rcv_nxt, tp->rcv_nxt, m->m_pkthdr.len); #ifdef T3_TRACE @@ -2451,7 +2447,6 @@ tp = tcp_close(tp); } else { enter_timewait(so); - soisdisconnected(so); } break; default: @@ -2464,7 +2459,6 @@ INP_UNLOCK(tp->t_inpcb); DPRINTF("waking up waiters on %p rcv_notify=%d flags=0x%x\n", so, sb_notify(&so->so_rcv), so->so_rcv.sb_flags); - soisdisconnecting(so); #ifdef notyet /* Do not send POLL_HUP for half duplex close. */ @@ -2532,14 +2526,29 @@ tp = tcp_close(tp); break; case TCPS_FIN_WAIT_1: -#ifdef notyet - dst_confirm(sk->sk_dst_cache); -#endif - soisdisconnecting(so); - + /* + * If we can't receive any more + * data, then closing user can proceed. + * Starting the timer is contrary to the + * specification, but if we don't get a FIN + * we'll hang forever. + * + * XXXjl: + * we should release the tp also, and use a + * compressed state. + */ + if (so->so_rcv.sb_state & SBS_CANTRCVMORE) { + int timeout; + + soisdisconnected(so); + timeout = (tcp_fast_finwait2_recycle) ? + tcp_finwait2_timeout : tcp_maxidle; + tcp_timer_activate(tp, TT_2MSL, timeout); + } + tp->t_state = TCPS_FIN_WAIT_2; if ((so->so_options & SO_LINGER) && so->so_linger == 0 && (toep->tp_flags & TP_ABORT_SHUTDOWN) == 0) { - tp = cxgb_tcp_drop(tp, 0); + tp = tcp_drop(tp, 0); } break; @@ -3253,7 +3262,7 @@ newtoep->tp_ulp_mode = 0; } - CTR4(KTR_TOM, "ddp=%d rcv_wnd=%ld min_win=%d ulp_mode=%d\n", + CTR4(KTR_TOM, "ddp=%d rcv_wnd=%ld min_win=%d ulp_mode=%d", TOM_TUNABLE(tdev, ddp), tp->rcv_wnd, MIN_DDP_RCV_WIN, newtoep->tp_ulp_mode); set_arp_failure_handler(reply_mbuf, pass_accept_rpl_arp_failure); /* @@ -3413,6 +3422,8 @@ */ dst_confirm(sk->sk_dst_cache); #endif + soisconnected(so); + tp->t_starttime = ticks; tp->t_state = TCPS_ESTABLISHED; } @@ -3535,7 +3546,6 @@ make_established(so, ntohl(req->snd_isn), ntohs(req->tcp_opt)); INP_INFO_WUNLOCK(&tcbinfo); INP_UNLOCK(tp->t_inpcb); - soisconnected(so); CTR1(KTR_TOM, "do_pass_establish tid=%u", toep->tp_tid); cxgb_log_tcb(cdev->adapter, toep->tp_tid); @@ -3653,8 +3663,7 @@ sk->sk_write_space(sk); #endif - soisconnected(so); - toep->tp_state = tp->t_state = TCPS_ESTABLISHED; + toep->tp_state = tp->t_state; tcpstat.tcps_connects++; } @@ -3728,7 +3737,7 @@ while (credits) { struct mbuf *p = peek_wr(toep); CTR2(KTR_TOM, - "wr_ack: p->credits=%d p->bytes=%d\n", p->m_pkthdr.csum_data, p->m_pkthdr.len); + "wr_ack: p->credits=%d p->bytes=%d", p->m_pkthdr.csum_data, p->m_pkthdr.len); if (__predict_false(!p)) { log(LOG_ERR, "%u WR_ACK credits for TID %u with " From owner-p4-projects@FreeBSD.ORG Thu Feb 21 06:33:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0280A16A406; Thu, 21 Feb 2008 06:33:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC3C316A400 for ; Thu, 21 Feb 2008 06:33:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B097513C45D for ; Thu, 21 Feb 2008 06:33:56 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L6XuIV067942 for ; Thu, 21 Feb 2008 06:33:56 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L6Xufm067939 for perforce@freebsd.org; Thu, 21 Feb 2008 06:33:56 GMT (envelope-from marcel@freebsd.org) Date: Thu, 21 Feb 2008 06:33:56 GMT Message-Id: <200802210633.m1L6Xufm067939@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135876 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 06:33:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135876 Change 135876 by marcel@marcel_xcllnt on 2008/02/21 06:32:55 Re-sort. Affected files ... .. //depot/projects/e500/sys/conf/files.powerpc#18 edit Differences ... ==== //depot/projects/e500/sys/conf/files.powerpc#18 (text+ko) ==== @@ -87,6 +87,7 @@ powerpc/booke/swtch.S optional e500 powerpc/booke/trap.c optional e500 powerpc/booke/uio_machdep.c optional e500 +powerpc/booke/vm_machdep.c optional e500 powerpc/fpu/fpu_add.c optional fpu_emu powerpc/fpu/fpu_compare.c optional fpu_emu powerpc/fpu/fpu_div.c optional fpu_emu @@ -96,7 +97,6 @@ powerpc/fpu/fpu_mul.c optional fpu_emu powerpc/fpu/fpu_sqrt.c optional fpu_emu powerpc/fpu/fpu_subr.c optional fpu_emu -powerpc/booke/vm_machdep.c optional e500 powerpc/mpc85xx/nexus.c optional mpc85xx powerpc/mpc85xx/ocpbus.c optional mpc85xx powerpc/mpc85xx/opic.c optional mpc85xx From owner-p4-projects@FreeBSD.ORG Thu Feb 21 06:38:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3343916A40A; Thu, 21 Feb 2008 06:38:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAAF316A401 for ; Thu, 21 Feb 2008 06:38:11 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DD4E313C46B for ; Thu, 21 Feb 2008 06:38:11 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1L6cBXE068295 for ; Thu, 21 Feb 2008 06:38:11 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1L6cBoa068285 for perforce@freebsd.org; Thu, 21 Feb 2008 06:38:11 GMT (envelope-from marcel@freebsd.org) Date: Thu, 21 Feb 2008 06:38:11 GMT Message-Id: <200802210638.m1L6cBoa068285@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135877 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 06:38:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135877 Change 135877 by marcel@marcel_xcllnt on 2008/02/21 06:38:09 IFC @135869 Affected files ... .. //depot/projects/e500/ObsoleteFiles.inc#9 integrate .. //depot/projects/e500/UPDATING#8 integrate .. //depot/projects/e500/bin/sh/mksyntax.c#2 integrate .. //depot/projects/e500/contrib/traceroute/as.c#1 branch .. //depot/projects/e500/contrib/traceroute/as.h#1 branch .. //depot/projects/e500/contrib/traceroute/traceroute.8#2 integrate .. //depot/projects/e500/contrib/traceroute/traceroute.c#3 integrate .. //depot/projects/e500/games/fortune/strfile/strfile.c#2 integrate .. //depot/projects/e500/gnu/usr.bin/man/man/man.c#3 integrate .. //depot/projects/e500/gnu/usr.bin/man/manpath/manpath.c#2 integrate .. //depot/projects/e500/lib/libarchive/archive_entry_strmode.c#2 integrate .. //depot/projects/e500/lib/libarchive/archive_platform.h#4 integrate .. //depot/projects/e500/lib/libarchive/archive_read_open_filename.c#3 integrate .. //depot/projects/e500/lib/libarchive/archive_read_support_compression_bzip2.c#3 integrate .. //depot/projects/e500/lib/libarchive/archive_read_support_compression_gzip.c#3 integrate .. //depot/projects/e500/lib/libarchive/archive_read_support_format_ar.c#4 integrate .. //depot/projects/e500/lib/libarchive/archive_read_support_format_iso9660.c#4 integrate .. //depot/projects/e500/lib/libarchive/archive_read_support_format_mtree.c#2 integrate .. //depot/projects/e500/lib/libarchive/archive_write_disk.c#7 integrate .. //depot/projects/e500/lib/libarchive/archive_write_open_filename.c#2 integrate .. //depot/projects/e500/lib/libarchive/archive_write_set_compression_gzip.c#4 integrate .. //depot/projects/e500/lib/libarchive/config_freebsd.h#3 integrate .. //depot/projects/e500/lib/libarchive/test/main.c#5 integrate .. //depot/projects/e500/lib/libarchive/test/test.h#5 integrate .. //depot/projects/e500/lib/libc/db/test/btree.tests/main.c#2 integrate .. //depot/projects/e500/lib/libc/db/test/dbtest.c#2 integrate .. //depot/projects/e500/lib/libc/regex/grot/main.c#2 integrate .. //depot/projects/e500/lib/msun/Makefile#9 integrate .. //depot/projects/e500/lib/msun/Symbol.map#8 integrate .. //depot/projects/e500/lib/msun/ld80/k_tanl.c#2 integrate .. //depot/projects/e500/lib/msun/man/j0.3#2 integrate .. //depot/projects/e500/lib/msun/man/lgamma.3#2 integrate .. //depot/projects/e500/lib/msun/src/e_exp.c#3 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2.c#3 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2f.c#3 integrate .. //depot/projects/e500/lib/msun/src/k_cos.c#3 integrate .. //depot/projects/e500/lib/msun/src/k_sin.c#2 integrate .. //depot/projects/e500/lib/msun/src/math.h#5 integrate .. //depot/projects/e500/lib/msun/src/s_cos.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_sin.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_tan.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_tgammaf.c#1 branch .. //depot/projects/e500/release/Makefile#6 integrate .. //depot/projects/e500/sbin/ipfw/ipfw.8#6 integrate .. //depot/projects/e500/sbin/ipfw/ipfw2.c#8 integrate .. //depot/projects/e500/sbin/mount_nfs/mount_nfs.c#3 integrate .. //depot/projects/e500/sbin/sconfig/sconfig.c#2 integrate .. //depot/projects/e500/secure/usr.bin/bdes/bdes.c#2 integrate .. //depot/projects/e500/share/man/man4/Makefile#11 integrate .. //depot/projects/e500/share/man/man4/geom_linux_lvm.4#1 branch .. //depot/projects/e500/share/man/man4/geom_lvm.4#2 delete .. //depot/projects/e500/sys/amd64/conf/GENERIC#11 integrate .. //depot/projects/e500/sys/cam/scsi/scsi_ses.c#3 integrate .. //depot/projects/e500/sys/conf/NOTES#12 integrate .. //depot/projects/e500/sys/conf/files#13 integrate .. //depot/projects/e500/sys/conf/options#11 integrate .. //depot/projects/e500/sys/dev/ti/if_ti.c#4 integrate .. //depot/projects/e500/sys/fs/msdosfs/msdosfs_vfsops.c#7 integrate .. //depot/projects/e500/sys/geom/linux_lvm/g_linux_lvm.c#1 branch .. //depot/projects/e500/sys/geom/linux_lvm/g_linux_lvm.h#1 branch .. //depot/projects/e500/sys/geom/lvm/g_lvm.c#2 delete .. //depot/projects/e500/sys/geom/lvm/g_lvm.h#2 delete .. //depot/projects/e500/sys/kern/vfs_mount.c#8 integrate .. //depot/projects/e500/sys/modules/geom/Makefile#4 integrate .. //depot/projects/e500/sys/modules/geom/geom_linux_lvm/Makefile#1 branch .. //depot/projects/e500/sys/modules/geom/geom_lvm/Makefile#2 delete .. //depot/projects/e500/sys/nfsclient/nfs_vfsops.c#7 integrate .. //depot/projects/e500/tools/regression/fsx/fsx.c#3 integrate .. //depot/projects/e500/tools/regression/lib/msun/Makefile#5 integrate .. //depot/projects/e500/tools/regression/lib/msun/test-exponential.c#2 integrate .. //depot/projects/e500/tools/regression/lib/msun/test-trig.c#1 branch .. //depot/projects/e500/tools/regression/lib/msun/test-trig.t#1 branch .. //depot/projects/e500/usr.bin/calendar/calendars/calendar.dutch#3 integrate .. //depot/projects/e500/usr.bin/ncplogin/ncplogin.c#2 integrate .. //depot/projects/e500/usr.bin/quota/quota.c#2 integrate .. //depot/projects/e500/usr.bin/tar/write.c#3 integrate .. //depot/projects/e500/usr.sbin/cdcontrol/cdcontrol.c#2 integrate .. //depot/projects/e500/usr.sbin/powerd/powerd.c#3 integrate .. //depot/projects/e500/usr.sbin/syslogd/syslogd.c#3 integrate .. //depot/projects/e500/usr.sbin/traceroute/Makefile#2 integrate .. //depot/projects/e500/usr.sbin/zic/zdump.c#2 integrate Differences ... ==== //depot/projects/e500/ObsoleteFiles.inc#9 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.130 2008/02/06 19:45:25 delphij Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.131 2008/02/20 11:28:28 thompsa Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20080220: geom_lvm rename to geom_linux_lvm +OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz # 20080126: oldcard.4 removal OLD_FILES+=usr/share/man/man4/card.4.gz OLD_FILES+=usr/share/man/man4/oldcard.4.gz ==== //depot/projects/e500/UPDATING#8 (text+ko) ==== @@ -22,6 +22,10 @@ to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20080220: + The new geom_lvm(4) geom class has been renamed to geom_linux_lvm(4), + likewise the kernel option is now GEOM_LINUX_LVM. + 20080211: The default NFS mount mode has changed from UDP to TCP for increased reliability. If you rely on (insecurely) NFS @@ -979,4 +983,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.519 2008/02/11 23:23:20 kris Exp $ +$FreeBSD: src/UPDATING,v 1.520 2008/02/20 07:50:12 thompsa Exp $ ==== //depot/projects/e500/bin/sh/mksyntax.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.24 2005/08/13 15:47:13 stefanf Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.25 2008/02/18 20:01:33 marcel Exp $"); /* * This program creates syntax.h and syntax.c. @@ -139,10 +139,7 @@ /* Determine the characteristics of chars. */ c = -1; - if (c < 0) - sign = 1; - else - sign = 0; + sign = (c > 0) ? 0 : 1; for (nbits = 1 ; ; nbits++) { d = (1 << nbits) - 1; if (d == c) ==== //depot/projects/e500/contrib/traceroute/traceroute.8#2 (text+ko) ==== @@ -14,9 +14,9 @@ .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ -.\" $FreeBSD: src/contrib/traceroute/traceroute.8,v 1.16 2006/10/15 17:44:49 dwmalone Exp $ +.\" $FreeBSD: src/contrib/traceroute/traceroute.8,v 1.17 2008/02/20 23:29:52 rpaulo Exp $ .\" -.TH TRACEROUTE 8 "21 September 2000" +.TH TRACEROUTE 8 "19 February 2008" .UC 6 .SH NAME traceroute \- print the route packets take to network host @@ -24,7 +24,7 @@ .na .B traceroute [ -.B \-dDeFISnrvx +.B \-adDeFISnrvx ] [ .B \-f .I first_ttl @@ -71,6 +71,9 @@ .B \-w .I waittime ] [ +.B \-A +.I as_server +] [ .B \-z .I pausemsecs ] @@ -98,6 +101,13 @@ .PP Other options are: .TP +.B \-a +Turn on AS# lookups for each hop encountered. +.TP +.B -A +Turn on AS# lookups and use the given server instead of the +default. +.TP .B \-e Firewall evasion mode. Use fixed destination ports for UDP and TCP probes. @@ -443,3 +453,7 @@ router that's filtering packets), but this is not implemented yet. .PP Please send bug reports to traceroute@ee.lbl.gov. +.PP +The AS number capability reports information that may sometimes be +inaccurate due to discrepancies between the contents of the +routing database server and the current state of the Internet. ==== //depot/projects/e500/contrib/traceroute/traceroute.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ "@(#)$Id: traceroute.c,v 1.68 2000/12/14 08:04:33 leres Exp $ (LBL)"; #endif static const char rcsid[] = - "$FreeBSD: src/contrib/traceroute/traceroute.c,v 1.34 2007/07/01 12:08:05 gnn Exp $"; + "$FreeBSD: src/contrib/traceroute/traceroute.c,v 1.35 2008/02/20 23:29:52 rpaulo Exp $"; #endif /* @@ -263,6 +263,7 @@ #include "findsaddr.h" #include "ifaddrlist.h" +#include "as.h" #include "traceroute.h" /* Maximum number of gateways (include room for one noop) */ @@ -350,6 +351,9 @@ int verbose; int waittime = 5; /* time to wait for response (in seconds) */ int nflag; /* print addresses numerically */ +int as_path; /* print as numbers for each hop */ +char *as_server = NULL; +void *asn; #ifdef CANT_HACK_IPCKSUM int doipcksum = 0; /* don't calculate ip checksums by default */ #else @@ -535,9 +539,17 @@ prog = argv[0]; opterr = 0; - while ((op = getopt(argc, argv, "edDFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) + while ((op = getopt(argc, argv, "aA:edDFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) switch (op) { - + case 'a': + as_path = 1; + break; + + case 'A': + as_path = 1; + as_server = optarg; + break; + case 'd': options |= SO_DEBUG; break; @@ -913,6 +925,16 @@ exit (1); } + if (as_path) { + asn = as_setup(as_server); + if (asn == NULL) { + Fprintf(stderr, "%s: as_setup failed, AS# lookups" + " disabled\n", prog); + (void)fflush(stderr); + as_path = 0; + } + } + #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) errx(1, "%s", ipsec_strerror()); @@ -1118,6 +1140,8 @@ (unreachable > 0 && unreachable >= nprobes - 1)) break; } + if (as_path) + as_shutdown(asn); exit(0); } @@ -1458,6 +1482,9 @@ hlen = ip->ip_hl << 2; cc -= hlen; + if (as_path) + Printf(" [AS%d]", as_lookup(asn, &from->sin_addr)); + if (nflag) Printf(" %s", inet_ntoa(from->sin_addr)); else @@ -1764,8 +1791,8 @@ Fprintf(stderr, "Version %s\n", version); Fprintf(stderr, - "Usage: %s [-dDeFInrSvx] [-f first_ttl] [-g gateway] [-i iface]\n" + "Usage: %s [-adDeFInrSvx] [-f first_ttl] [-g gateway] [-i iface]\n" "\t[-m max_ttl] [-p port] [-P proto] [-q nqueries] [-s src_addr]\n" - "\t[-t tos] [-w waittime] [-z pausemsecs] host [packetlen]\n", prog); + "\t[-t tos] [-w waittime] [-A as_server] [-z pausemsecs] host [packetlen]\n", prog); exit(1); } ==== //depot/projects/e500/games/fortune/strfile/strfile.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/games/fortune/strfile/strfile.c,v 1.28 2005/02/17 18:06:37 ru Exp $"); +__FBSDID("$FreeBSD: src/games/fortune/strfile/strfile.c,v 1.29 2008/02/19 07:09:17 ru Exp $"); # include # include @@ -270,7 +270,7 @@ { int ch; - while ((ch = getopt(argc, argv, "Cc:iorsx")) != EOF) + while ((ch = getopt(argc, argv, "Cc:iorsx")) != -1) switch(ch) { case 'C': /* embedded comments */ Cflag++; ==== //depot/projects/e500/gnu/usr.bin/man/man/man.c#3 (text+ko) ==== @@ -16,7 +16,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/gnu/usr.bin/man/man/man.c,v 1.65 2007/09/25 21:41:22 edwin Exp $"; + "$FreeBSD: src/gnu/usr.bin/man/man/man.c,v 1.66 2008/02/19 07:09:17 ru Exp $"; #endif /* not lint */ #define MAN_MAIN @@ -324,7 +324,7 @@ extern void downcase (); extern char *manpath (); - while ((c = getopt (argc, argv, args)) != EOF) + while ((c = getopt (argc, argv, args)) != -1) { switch (c) { ==== //depot/projects/e500/gnu/usr.bin/man/manpath/manpath.c#2 (text+ko) ==== @@ -13,7 +13,7 @@ * The University of Texas at Austin * Austin, Texas 78712 * - * $FreeBSD: src/gnu/usr.bin/man/manpath/manpath.c,v 1.13 2002/10/27 02:12:52 kris Exp $ + * $FreeBSD: src/gnu/usr.bin/man/manpath/manpath.c,v 1.14 2008/02/19 07:09:18 ru Exp $ */ #define MANPATH_MAIN @@ -78,7 +78,7 @@ prognam = mkprogname (argv[0]); - while ((c = getopt (argc, argv, "dhLq?")) != EOF) + while ((c = getopt (argc, argv, "dhLq?")) != -1) { switch (c) { ==== //depot/projects/e500/lib/libarchive/archive_entry_strmode.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.1 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.2 2008/02/19 05:49:02 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -65,15 +65,15 @@ bp[i+1] = '-'; if (mode & S_ISUID) { - if (mode & S_IXUSR) bp[3] = 's'; + if (mode & 0100) bp[3] = 's'; else bp[3] = 'S'; } if (mode & S_ISGID) { - if (mode & S_IXGRP) bp[6] = 's'; + if (mode & 0010) bp[6] = 's'; else bp[6] = 'S'; } if (mode & S_ISVTX) { - if (mode & S_IXOTH) bp[9] = 't'; + if (mode & 0001) bp[9] = 't'; else bp[9] = 'T'; } if (archive_entry_acl_count(entry, ARCHIVE_ENTRY_ACL_TYPE_ACCESS)) ==== //depot/projects/e500/lib/libarchive/archive_platform.h#4 (text+ko) ==== @@ -22,7 +22,7 @@ * (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: src/lib/libarchive/archive_platform.h,v 1.28 2007/12/30 04:58:21 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_platform.h,v 1.29 2008/02/19 06:06:13 kientzle Exp $ */ /* @@ -36,7 +36,10 @@ #ifndef ARCHIVE_PLATFORM_H_INCLUDED #define ARCHIVE_PLATFORM_H_INCLUDED -#if defined(PLATFORM_CONFIG_H) +#ifdef _WIN32 +#include "config_windows.h" +#include "archive_windows.h" +#elif defined(PLATFORM_CONFIG_H) /* Use hand-built config.h in environments that need it. */ #include PLATFORM_CONFIG_H #elif defined(HAVE_CONFIG_H) ==== //depot/projects/e500/lib/libarchive/archive_read_open_filename.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_filename.c,v 1.20 2007/06/26 03:06:48 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_filename.c,v 1.21 2008/02/19 06:10:48 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -47,6 +47,10 @@ #include "archive.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct read_file_data { int fd; size_t block_size; @@ -113,7 +117,7 @@ return (ARCHIVE_FATAL); } if (mine->filename[0] != '\0') - mine->fd = open(mine->filename, O_RDONLY); + mine->fd = open(mine->filename, O_RDONLY | O_BINARY); else mine->fd = 0; /* Fake "open" for stdin. */ if (mine->fd < 0) { ==== //depot/projects/e500/lib/libarchive/archive_read_support_compression_bzip2.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_bzip2.c,v 1.16 2007/05/29 01:00:18 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_bzip2.c,v 1.17 2008/02/19 05:44:59 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -145,7 +145,7 @@ (void)buff; /* UNUSED */ (void)n; /* UNUSED */ - archive_set_error(a, -1, + archive_set_error(&a->archive, -1, "This version of libarchive was compiled without bzip2 support"); return (ARCHIVE_FATAL); } ==== //depot/projects/e500/lib/libarchive/archive_read_support_compression_gzip.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_gzip.c,v 1.15 2007/05/29 01:00:19 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_gzip.c,v 1.16 2008/02/19 05:44:59 kientzle Exp $"); #ifdef HAVE_ERRNO_H @@ -146,7 +146,7 @@ (void)buff; /* UNUSED */ (void)n; /* UNUSED */ - archive_set_error(a, -1, + archive_set_error(&a->archive, -1, "This version of libarchive was compiled without gzip support"); return (ARCHIVE_FATAL); } ==== //depot/projects/e500/lib/libarchive/archive_read_support_format_ar.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_ar.c,v 1.7 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_ar.c,v 1.8 2008/02/19 05:54:24 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -268,8 +268,7 @@ /* This must come before any call to _read_ahead. */ ar_parse_common_header(ar, entry, h); archive_entry_copy_pathname(entry, filename); - archive_entry_set_mode(entry, - S_IFREG | (archive_entry_mode(entry) & 0777)); + archive_entry_set_filetype(entry, AE_IFREG); /* Get the size of the filename table. */ number = ar_atol10(h + AR_size_offset, AR_size_size); if (number > SIZE_MAX) { @@ -375,8 +374,7 @@ /* Parse the time, owner, mode, size fields. */ r = ar_parse_common_header(ar, entry, h); /* Force the file type to a regular file. */ - archive_entry_set_mode(entry, - S_IFREG | (archive_entry_mode(entry) & 0777)); + archive_entry_set_filetype(entry, AE_IFREG); return (r); } ==== //depot/projects/e500/lib/libarchive/archive_read_support_format_iso9660.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_iso9660.c,v 1.24 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_iso9660.c,v 1.25 2008/02/19 06:02:01 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -1064,24 +1064,28 @@ if (t->tm_isdst) t->tm_hour -= 1; return (mktime(t)); /* Re-convert. */ -#else - /* - * If you don't have tm_gmtoff, let's try resetting the timezone - * (yecch!). - */ +#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV) && defined(HAVE_TZSET) + /* No timegm() and no tm_gmtoff, let's try forcing mktime() to UTC. */ time_t ret; char *tz; + /* Reset the timezone, remember the old one. */ tz = getenv("TZ"); setenv("TZ", "UTC 0", 1); tzset(); + ret = mktime(t); + + /* Restore the previous timezone. */ if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); return ret; +#else + /* We have no choice but to use localtime instead of UTC. */ + return (mktime(t)); #endif } ==== //depot/projects/e500/lib/libarchive/archive_read_support_format_mtree.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.1 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.2 2008/02/19 06:07:10 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -50,6 +50,10 @@ #include "archive_read_private.h" #include "archive_string.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct mtree_entry { struct mtree_entry *next; char *name; @@ -371,7 +375,8 @@ * the contents file on disk.) */ if (archive_strlen(&mtree->contents_name) > 0) { - mtree->fd = open(mtree->contents_name.s, O_RDONLY); + mtree->fd = open(mtree->contents_name.s, + O_RDONLY | O_BINARY); if (mtree->fd < 0) { archive_set_error(&a->archive, errno, "Can't open content=\"%s\"", @@ -380,7 +385,8 @@ } } else { /* If the specified path opens, use it. */ - mtree->fd = open(mtree->current_dir.s, O_RDONLY); + mtree->fd = open(mtree->current_dir.s, + O_RDONLY | O_BINARY); /* But don't fail if it's not there. */ } ==== //depot/projects/e500/lib/libarchive/archive_write_disk.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.21 2008/01/18 06:16:08 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.22 2008/02/19 05:39:35 kientzle Exp $"); #ifdef HAVE_SYS_TYPES_H #include @@ -45,6 +45,9 @@ #ifdef HAVE_SYS_TIME_H #include #endif +#ifdef HAVE_SYS_UTIME_H +#include +#endif #ifdef HAVE_EXT2FS_EXT2_FS_H #include /* for Linux file flags */ @@ -89,6 +92,10 @@ #include "archive_entry.h" #include "archive_private.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct fixup_entry { struct fixup_entry *next; mode_t mode; @@ -636,7 +643,9 @@ a->archive.vtable = archive_write_disk_vtable(); a->lookup_uid = trivial_lookup_uid; a->lookup_gid = trivial_lookup_gid; +#ifdef HAVE_GETEUID a->user_uid = geteuid(); +#endif /* HAVE_GETEUID */ if (archive_string_ensure(&a->path_safe, 512) == NULL) { free(a); return (NULL); @@ -667,7 +676,7 @@ return; /* Try to record our starting dir. */ - a->restore_pwd = open(".", O_RDONLY); + a->restore_pwd = open(".", O_RDONLY | O_BINARY); if (a->restore_pwd < 0) return; @@ -705,6 +714,14 @@ int ret = ARCHIVE_OK, en; if (a->flags & ARCHIVE_EXTRACT_UNLINK && !S_ISDIR(a->mode)) { + /* + * TODO: Fix this. Apparently, there are platforms + * that still allow root to hose the entire filesystem + * by unlinking a dir. The S_ISDIR() test above + * prevents us from using unlink() here if the new + * object is a dir, but that doesn't mean the old + * object isn't a dir. + */ if (unlink(a->name) == 0) { /* We removed it, we're done. */ } else if (errno == ENOENT) { @@ -851,7 +868,7 @@ * for hardlink entries. */ if (r == 0 && a->filesize > 0) { - a->fd = open(a->name, O_WRONLY | O_TRUNC); + a->fd = open(a->name, O_WRONLY | O_TRUNC | O_BINARY); if (a->fd < 0) r = errno; } @@ -876,24 +893,38 @@ */ mode = final_mode & 0777; - switch (a->mode & S_IFMT) { + switch (a->mode & AE_IFMT) { default: /* POSIX requires that we fall through here. */ /* FALLTHROUGH */ - case S_IFREG: + case AE_IFREG: a->fd = open(a->name, - O_WRONLY | O_CREAT | O_EXCL, mode); + O_WRONLY | O_CREAT | O_EXCL | O_BINARY, mode); r = (a->fd < 0); break; - case S_IFCHR: + case AE_IFCHR: +#ifdef HAVE_MKNOD + /* Note: we use AE_IFCHR for the case label, and + * S_IFCHR for the mknod() call. This is correct. */ r = mknod(a->name, mode | S_IFCHR, archive_entry_rdev(a->entry)); +#else + /* TODO: Find a better way to warn about our inability + * to restore a char device node. */ + return (EINVAL); +#endif /* HAVE_MKNOD */ break; - case S_IFBLK: + case AE_IFBLK: +#ifdef HAVE_MKNOD r = mknod(a->name, mode | S_IFBLK, archive_entry_rdev(a->entry)); +#else + /* TODO: Find a better way to warn about our inability + * to restore a block device node. */ + return (EINVAL); +#endif /* HAVE_MKNOD */ break; - case S_IFDIR: + case AE_IFDIR: mode = (mode | MINIMUM_DIR_MODE) & MAXIMUM_DIR_MODE; r = mkdir(a->name, mode); if (r == 0) { @@ -906,8 +937,14 @@ a->todo &= ~TODO_MODE; } break; - case S_IFIFO: + case AE_IFIFO: +#ifdef HAVE_MKFIFO r = mkfifo(a->name, mode); +#else + /* TODO: Find a better way to warn about our inability + * to restore a fifo. */ + return (EINVAL); +#endif /* HAVE_MKFIFO */ break; } @@ -1453,28 +1490,34 @@ } #ifdef HAVE_FCHOWN - if (a->fd >= 0 && fchown(a->fd, a->uid, a->gid) == 0) - goto success; + /* If we have an fd, we can avoid a race. */ + if (a->fd >= 0 && fchown(a->fd, a->uid, a->gid) == 0) { + /* We've set owner and know uid/gid are correct. */ + a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK); + return (ARCHIVE_OK); + } #endif + /* We prefer lchown() but will use chown() if that's all we have. */ + /* Of course, if we have neither, this will always fail. */ #ifdef HAVE_LCHOWN - if (lchown(a->name, a->uid, a->gid) == 0) - goto success; -#else - if (!S_ISLNK(a->mode) && chown(a->name, a->uid, a->gid) == 0) - goto success; + if (lchown(a->name, a->uid, a->gid) == 0) { + /* We've set owner and know uid/gid are correct. */ + a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK); + return (ARCHIVE_OK); + } +#elif HAVE_CHOWN + if (!S_ISLNK(a->mode) && chown(a->name, a->uid, a->gid) == 0) { + /* We've set owner and know uid/gid are correct. */ + a->todo &= ~(TODO_OWNER | TODO_SGID_CHECK | TODO_SUID_CHECK); + return (ARCHIVE_OK); + } #endif archive_set_error(&a->archive, errno, "Can't set user=%d/group=%d for %s", a->uid, a->gid, a->name); return (ARCHIVE_WARN); -success: - a->todo &= ~TODO_OWNER; - /* We know the user/group are correct now. */ - a->todo &= ~TODO_SGID_CHECK; - a->todo &= ~TODO_SUID_CHECK; - return (ARCHIVE_OK); } #ifdef HAVE_UTIMES @@ -1812,7 +1855,7 @@ /* If we weren't given an fd, open it ourselves. */ if (myfd < 0) - myfd = open(name, O_RDONLY|O_NONBLOCK); + myfd = open(name, O_RDONLY | O_NONBLOCK | O_BINARY); if (myfd < 0) return (ARCHIVE_OK); ==== //depot/projects/e500/lib/libarchive/archive_write_open_filename.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_filename.c,v 1.19 2007/01/09 08:05:56 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_filename.c,v 1.20 2008/02/19 05:46:58 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -47,6 +47,10 @@ #include "archive.h" +#ifndef O_BINARY +#define O_BINARY 0 +#endif + struct write_file_data { int fd; char filename[1]; @@ -95,7 +99,7 @@ struct stat st; mine = (struct write_file_data *)client_data; - flags = O_WRONLY | O_CREAT | O_TRUNC; + flags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY; /* * Open the file. ==== //depot/projects/e500/lib/libarchive/archive_write_set_compression_gzip.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ /* Don't compile this if we don't have zlib. */ #if HAVE_ZLIB_H -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_compression_gzip.c,v 1.15 2007/12/30 04:58:21 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_compression_gzip.c,v 1.16 2008/02/21 03:21:50 kientzle Exp $"); #ifdef HAVE_ERRNO_H #include @@ -106,6 +106,21 @@ return (ret); } + /* + * The next check is a temporary workaround until the gzip + * code can be overhauled some. The code should not require + * that compressed_buffer_size == bytes_per_block. Removing + * this assumption will allow us to compress larger chunks at + * a time, which should improve overall performance + * marginally. As a minor side-effect, such a cleanup would + * allow us to support truly arbitrary block sizes. + */ + if (a->bytes_per_block < 10) { + archive_set_error(&a->archive, EINVAL, + "GZip compressor requires a minimum 10 byte block size"); + return (ARCHIVE_FATAL); + } + state = (struct private_data *)malloc(sizeof(*state)); if (state == NULL) { archive_set_error(&a->archive, ENOMEM, @@ -114,6 +129,10 @@ } memset(state, 0, sizeof(*state)); + /* + * See comment above. We should set compressed_buffer_size to + * max(bytes_per_block, 65536), but the code can't handle that yet. + */ state->compressed_buffer_size = a->bytes_per_block; state->compressed = (unsigned char *)malloc(state->compressed_buffer_size); state->crc = crc32(0L, NULL, 0); ==== //depot/projects/e500/lib/libarchive/config_freebsd.h#3 (text+ko) ==== @@ -22,7 +22,7 @@ * (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: src/lib/libarchive/config_freebsd.h,v 1.5 2007/05/29 01:00:20 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/config_freebsd.h,v 1.6 2008/02/19 05:40:28 kientzle Exp $ */ /* FreeBSD 5.0 and later have ACL support. */ @@ -37,6 +37,7 @@ #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 +#define HAVE_CHOWN 1 #define HAVE_DECL_INT64_MAX 1 #define HAVE_DECL_INT64_MIN 1 #define HAVE_DECL_SIZE_MAX 1 @@ -53,6 +54,7 @@ #define HAVE_FCNTL_H 1 #define HAVE_FSEEKO 1 #define HAVE_FUTIMES 1 +#define HAVE_GETEUID 1 #define HAVE_GRP_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_LCHFLAGS 1 @@ -65,10 +67,12 @@ #define HAVE_MEMSET 1 #define HAVE_MKDIR 1 #define HAVE_MKFIFO 1 +#define HAVE_MKNOD 1 #define HAVE_POLL 1 #define HAVE_POLL_H 1 #define HAVE_PWD_H 1 #define HAVE_SELECT 1 +#define HAVE_SETENV 1 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRCHR 1 @@ -87,9 +91,12 @@ #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TYPES_H 1 +#undef HAVE_SYS_UTIME_H #define HAVE_SYS_WAIT_H 1 #define HAVE_TIMEGM 1 +#define HAVE_TZSET 1 #define HAVE_UNISTD_H 1 +#define HAVE_UNSETENV 1 #define HAVE_UTIME 1 #define HAVE_UTIMES 1 #define HAVE_UTIME_H 1 ==== //depot/projects/e500/lib/libarchive/test/main.c#5 (text+ko) ==== @@ -34,16 +34,13 @@ */ #define PROGRAM "LIBARCHIVE" -/* - * Various utility routines useful for test programs. - * Each test program is linked against this file. - */ #include +#include #include #include #include "test.h" -__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.9 2008/01/01 22:28:04 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.10 2008/02/19 05:52:30 kientzle Exp $"); /* * "list.h" is simply created by "grep DEFINE_TEST"; it has @@ -226,20 +223,21 @@ } /* Generic assert() just displays the failed condition. */ -void +int test_assert(const char *file, int line, int value, const char *condition, void *extra) { ++assertions; if (value) { msg[0] = '\0'; - return; + return (value); } failures ++; if (previous_failures(file, line)) - return; + return (value); fprintf(stderr, "%s:%d: Assertion failed\n", file, line); fprintf(stderr, " Condition: %s\n", condition); report_failure(extra); + return (value); } /* assertEqualInt() displays the values of the two integers. */ @@ -553,6 +551,8 @@ tests[i].name); exit(1); } + /* Explicitly reset the locale before each test. */ + setlocale(LC_ALL, "C"); /* Run the actual test. */ (*tests[i].func)(); /* Summarize the results of this test. */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Feb 21 09:42:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 34A6B16A406; Thu, 21 Feb 2008 09:42:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9842516A401; Thu, 21 Feb 2008 09:42:54 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id C0AB213C45A; Thu, 21 Feb 2008 09:42:53 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 81E1114363; Thu, 21 Feb 2008 10:51:29 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00482-04; Thu, 21 Feb 2008 10:51:28 +0100 (CET) Message-ID: <47BD4799.3000209@semihalf.com> Date: Thu, 21 Feb 2008 10:42:49 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Stanislav Sedov References: <200802181742.m1IHgrku061009@repoman.freebsd.org> <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> <47B9DBD8.3090100@semihalf.com> <20080218194743.GB73371@dracon.ht-systems.ru> In-Reply-To: <20080218194743.GB73371@dracon.ht-systems.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Rafal Jaworowski , Perforce Change Reviews , Marcel Moolenaar Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 09:42:55 -0000 Stanislav Sedov wrote: > On Mon, Feb 18, 2008 at 08:26:16PM +0100 Rafal Jaworowski mentioned: >> The reason I did not put the (c) originally is I wasn't sure how to do it >> properly and simply followed U-Boot's export.h direction. It is desirable that >> this header file be verbatim copy of U-Boot's since it describes the API >> interface, but their files need to be GPL, ours BSD. So I left this without >> one, as the export.h does in similar case. >> >> Any advice on such matter? Anyone else has the clue? >> > > I suppose, it'd be better to either ask Denk to release it in public domain, or > reimplement the header ourselves. It'd be not very difficult to keep it in sync > with u-boot by hand. > I wrote this file, and the main concern is about NOT having a separately maintained one, but just a copy from U-Boot reference file. I spoke with Wolfgang and he was kind of reluctant to the public domain route, but we agreed on dual-licensing (BSD/GPL) it. Rafal From owner-p4-projects@FreeBSD.ORG Thu Feb 21 09:57:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DB22D16A406; Thu, 21 Feb 2008 09:57:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F59B16A400; Thu, 21 Feb 2008 09:57:41 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9CA13C447; Thu, 21 Feb 2008 09:57:40 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1JS8BO-0004j8-H4; Thu, 21 Feb 2008 12:57:38 +0300 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id 6F3D17D1BFC; Thu, 21 Feb 2008 12:57:37 +0300 (MSK) Date: Thu, 21 Feb 2008 12:57:37 +0300 From: Stanislav Sedov To: Rafal Jaworowski Message-ID: <20080221095737.GF73371@dracon.ht-systems.ru> References: <200802181742.m1IHgrku061009@repoman.freebsd.org> <11B9D4C0-6B4B-4A3C-A1A3-95060785BEFF@mac.com> <47B9DBD8.3090100@semihalf.com> <20080218194743.GB73371@dracon.ht-systems.ru> <47BD4799.3000209@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47BD4799.3000209@semihalf.com> Organization: The FreeBSD Project X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI X-Mailer: carrier-pigeon X-Operating-System: FreeBSD quasar.ht-systems.ru 7.0-BETA2 FreeBSD 7.0-BETA2 Cc: Rafal Jaworowski , Perforce Change Reviews , Marcel Moolenaar Subject: Re: PERFORCE change 135666 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 09:57:42 -0000 On Thu, Feb 21, 2008 at 10:42:49AM +0100 Rafal Jaworowski mentioned: > Stanislav Sedov wrote: > > On Mon, Feb 18, 2008 at 08:26:16PM +0100 Rafal Jaworowski mentioned: > >> The reason I did not put the (c) originally is I wasn't sure how to do it > >> properly and simply followed U-Boot's export.h direction. It is desirable that > >> this header file be verbatim copy of U-Boot's since it describes the API > >> interface, but their files need to be GPL, ours BSD. So I left this without > >> one, as the export.h does in similar case. > >> > >> Any advice on such matter? Anyone else has the clue? > >> > > > > I suppose, it'd be better to either ask Denk to release it in public domain, or > > reimplement the header ourselves. It'd be not very difficult to keep it in sync > > with u-boot by hand. > > > > I wrote this file, and the main concern is about NOT having a separately > maintained one, but just a copy from U-Boot reference file. I spoke with > Wolfgang and he was kind of reluctant to the public domain route, but we > agreed on dual-licensing (BSD/GPL) it. > Good news! -- Stanislav Sedov ST4096-RIPE From owner-p4-projects@FreeBSD.ORG Thu Feb 21 11:52:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 805B516A406; Thu, 21 Feb 2008 11:52:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 232D616A403; Thu, 21 Feb 2008 11:52:48 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id D2D2E13C44B; Thu, 21 Feb 2008 11:52:47 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 94BA8143D0; Thu, 21 Feb 2008 13:01:24 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17631-06; Thu, 21 Feb 2008 13:01:23 +0100 (CET) Message-ID: <47BD660C.4080201@semihalf.com> Date: Thu, 21 Feb 2008 12:52:44 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802210044.m1L0iviJ020049@repoman.freebsd.org> In-Reply-To: <200802210044.m1L0iviJ020049@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Perforce Change Reviews Subject: Re: PERFORCE change 135859 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 11:52:48 -0000 Marcel Moolenaar wrote: > Change 135859 by marcel@marcel_xcllnt on 2008/02/21 00:43:57 > > Call the FPU emulator when we get an EXC_PGM. > This makes a hard float work on E500. The > overhead is about 4% utilization when > running top(1). > Reserve space for the FP registers on Book-E > as well and account for the increased PCB > size in locore.S > Great work, Marcel! I'm going to give the AIM world a go on the e500+FPU_EMU. Rafal From owner-p4-projects@FreeBSD.ORG Thu Feb 21 15:24:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02F4D16A405; Thu, 21 Feb 2008 15:24:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1ED316A402 for ; Thu, 21 Feb 2008 15:24:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 88FDC13C4DB for ; Thu, 21 Feb 2008 15:24:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LFOTEM041326 for ; Thu, 21 Feb 2008 15:24:29 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LFOTSx041323 for perforce@freebsd.org; Thu, 21 Feb 2008 15:24:29 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 15:24:29 GMT Message-Id: <200802211524.m1LFOTSx041323@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135891 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 15:24:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135891 Change 135891 by rrs@rrs-mips2-jnpr on 2008/02/21 15:23:32 align float to 8 byte to Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/frame.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/frame.h#5 (text+ko) ==== @@ -121,7 +121,7 @@ f_register_t f30; f_register_t f31; register_t fsr; - + register_t fdummy; /* * COP2 registers may need to be saved here based on the CPU, and those * might need to be per process, or even for the kernel, so we need From owner-p4-projects@FreeBSD.ORG Thu Feb 21 15:24:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A7B7316A4FF; Thu, 21 Feb 2008 15:24:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC18A16A403 for ; Thu, 21 Feb 2008 15:24:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B16F413C447 for ; Thu, 21 Feb 2008 15:24:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LFOT2V041332 for ; Thu, 21 Feb 2008 15:24:29 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LFOTA0041329 for perforce@freebsd.org; Thu, 21 Feb 2008 15:24:29 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 15:24:29 GMT Message-Id: <200802211524.m1LFOTA0041329@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135892 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 15:24:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135892 Change 135892 by rrs@rrs-mips2-jnpr on 2008/02/21 15:23:56 add dummys in float. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/include/regnum.h#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/include/regnum.h#5 (text+ko) ==== @@ -135,8 +135,9 @@ #define F30 (FPBASE+30) #define F31 (FPBASE+31) #define FSR (FPBASE+32) +#define FSR_DUMMY (FPBASE+33) /* For 8 byte alignment */ -#define NUMFPREGS 33 +#define NUMFPREGS 34 #define NREGS (NUMSAVEREGS + NUMFPREGS) From owner-p4-projects@FreeBSD.ORG Thu Feb 21 15:26:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B687016A411; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C0A16A401 for ; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5362213C469 for ; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LFQWXU041462 for ; Thu, 21 Feb 2008 15:26:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LFQWgu041459 for perforce@freebsd.org; Thu, 21 Feb 2008 15:26:32 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 15:26:32 GMT Message-Id: <200802211526.m1LFQWgu041459@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135893 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 15:26:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135893 Change 135893 by rrs@rrs-mips2-jnpr on 2008/02/21 15:25:40 fixes. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_ebt3000_cf.c#4 (text+ko) ==== @@ -70,8 +70,14 @@ #include #include -#include "octeon_ebt3000_cf.h" -#include "driveid.h" +#include +#include +/* Octeon specific includes with loads of in-lines */ +#include +#include + + + /* ATA Commands */ #define CMD_READ_SECTOR 0x20 @@ -572,7 +578,7 @@ if (!octeon_board_real()) - return 1; + return; base_addr = (void *)OCTEON_PHYS2PTR(OCTEON_CF_COMMON_BASE_ADDR); From owner-p4-projects@FreeBSD.ORG Thu Feb 21 15:26:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2BB4916A539; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EEFE16A40F for ; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7B63713C46A for ; Thu, 21 Feb 2008 15:26:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LFQWXU041468 for ; Thu, 21 Feb 2008 15:26:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LFQWql041465 for perforce@freebsd.org; Thu, 21 Feb 2008 15:26:32 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 15:26:32 GMT Message-Id: <200802211526.m1LFQWql041465@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135894 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 15:26:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135894 Change 135894 by rrs@rrs-mips2-jnpr on 2008/02/21 15:26:00 adds octeon_cf Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/files.octeon32#7 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/files.octeon32#7 (text+ko) ==== @@ -6,11 +6,10 @@ mips/mips32/octeon32/uart_bus_octeonusart.c optional uart mips/mips32/octeon32/uart_dev_oct16550.c optional uart mips/mips/tick.c standard -#mips/mips/mp_machdep.c optional smp mips/mips32/octeon32/octeon_machdep.c standard #mips/mips4k/octeon32/octeon_pci.c standard -#dev/flash/octeon_ebt3000_cf.c optional cf +mips/mips32/octeon32/octeon_ebt3000_cf.c optional octeon_cf dev/rgmii/octeon_fau.c optional rgmii dev/rgmii/octeon_fpa.c optional rgmii From owner-p4-projects@FreeBSD.ORG Thu Feb 21 16:44:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 621DB16A40D; Thu, 21 Feb 2008 16:44:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 272C616A407 for ; Thu, 21 Feb 2008 16:44:58 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 14FEE13C45D for ; Thu, 21 Feb 2008 16:44:58 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LGivBh048606 for ; Thu, 21 Feb 2008 16:44:57 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LGivwY048603 for perforce@freebsd.org; Thu, 21 Feb 2008 16:44:57 GMT (envelope-from csjp@freebsd.org) Date: Thu, 21 Feb 2008 16:44:57 GMT Message-Id: <200802211644.m1LGivwY048603@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135900 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 16:44:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=135900 Change 135900 by csjp@ibm01 on 2008/02/21 16:44:55 Fix bug while processing host XML attribute for extended header tokens. Submitted by: Martin Voros Affected files ... .. //depot/projects/trustedbsd/openbsm/HISTORY#64 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#51 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/HISTORY#64 (text+ko) ==== @@ -6,6 +6,9 @@ event there is an error writing the subject token. This was submitted by Diego Giagio. - Build support for Mac OS X 10.5.1 submitted by Eric Hall. +- Fix a bug which resulted in host XML attributes not being printed + while processing extended header tokens. This patch was submitted by + Martin Voros. OpenBSM 1.0 @@ -311,4 +314,4 @@ to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/HISTORY#63 $ +$P4: //depot/projects/trustedbsd/openbsm/HISTORY#64 $ ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#51 (text+ko) ==== @@ -32,7 +32,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#50 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#51 $ */ #include @@ -996,12 +996,10 @@ open_attr(fp, "modifier"); print_evmod(fp, tok->tt.hdr32_ex.e_mod, raw); close_attr(fp); - /* - * No attribute for additional types. - * + open_attr(fp, "host"); print_ip_ex_address(fp, tok->tt.hdr32_ex.ad_type, tok->tt.hdr32_ex.addr); - */ + close_attr(fp); open_attr(fp, "time"); print_sec32(fp, tok->tt.hdr32_ex.s, raw); close_attr(fp); @@ -1188,12 +1186,10 @@ open_attr(fp, "modifier"); print_evmod(fp, tok->tt.hdr64_ex.e_mod, raw); close_attr(fp); - /* - * No attribute for additional types. - * + open_attr(fp, "host"); print_ip_ex_address(fp, tok->tt.hdr64_ex.ad_type, tok->tt.hdr64_ex.addr); - */ + close_attr(fp); open_attr(fp, "time"); print_sec64(fp, tok->tt.hdr64_ex.s, raw); close_attr(fp); From owner-p4-projects@FreeBSD.ORG Thu Feb 21 17:10:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B07816A404; Thu, 21 Feb 2008 17:10:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603B316A400 for ; Thu, 21 Feb 2008 17:10:30 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4D63913C45E for ; Thu, 21 Feb 2008 17:10:30 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LHASIs060398 for ; Thu, 21 Feb 2008 17:10:28 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LHASs1060395 for perforce@freebsd.org; Thu, 21 Feb 2008 17:10:28 GMT (envelope-from sam@freebsd.org) Date: Thu, 21 Feb 2008 17:10:28 GMT Message-Id: <200802211710.m1LHASs1060395@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135902 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 17:10:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=135902 Change 135902 by sam@sam_ebb on 2008/02/21 17:10:27 send EAPOL frames w/ the mgmt rate Affected files ... .. //depot/projects/vap/sys/dev/ral/rt2560.c#14 edit .. //depot/projects/vap/sys/dev/ral/rt2661.c#11 edit Differences ... ==== //depot/projects/vap/sys/dev/ral/rt2560.c#14 (text) ==== @@ -1819,6 +1819,8 @@ tp = &vap->iv_txparms[ieee80211_chan2mode(ni->ni_chan)]; if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { rate = tp->mcastrate; + } else if (m0->m_flags & M_EAPOL) { + rate = tp->mgmtrate; } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = tp->ucastrate; } else { ==== //depot/projects/vap/sys/dev/ral/rt2661.c#11 (text) ==== @@ -1613,6 +1613,8 @@ tp = &vap->iv_txparms[ieee80211_chan2mode(ni->ni_chan)]; if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { rate = tp->mcastrate; + } else if (m0->m_flags & M_EAPOL) { + rate = tp->mgmtrate; } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = tp->ucastrate; } else { From owner-p4-projects@FreeBSD.ORG Thu Feb 21 22:37:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D4E616A40A; Thu, 21 Feb 2008 22:37:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D2EF16A407 for ; Thu, 21 Feb 2008 22:37:21 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 10E0E13C442 for ; Thu, 21 Feb 2008 22:37:21 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LMbKT8099126 for ; Thu, 21 Feb 2008 22:37:20 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LMbKUf099123 for perforce@freebsd.org; Thu, 21 Feb 2008 22:37:20 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 22:37:20 GMT Message-Id: <200802212237.m1LMbKUf099123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135918 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 22:37:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=135918 Change 135918 by rrs@rrs-mips2-jnpr on 2008/02/21 22:36:46 add cf Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs#13 (text+ko) ==== @@ -68,6 +68,7 @@ device mem device uart device rgmii +device octeon_cf #options VERBOSE_SYSINIT #options SMP @@ -79,8 +80,8 @@ # # Use the following for RFS in mem-device -options MD_ROOT -# options ROOTDEVNAME = \"ufs:md0\" -options MD_ROOT_SIZE = 25200 +#options MD_ROOT +#options ROOTDEVNAME = \"ufs:md0\" +#options MD_ROOT_SIZE = 25200 -options TARGET_EMULATOR +#options TARGET_EMULATOR From owner-p4-projects@FreeBSD.ORG Thu Feb 21 23:17:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6D7A916A40D; Thu, 21 Feb 2008 23:17:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F9B16A407 for ; Thu, 21 Feb 2008 23:17:07 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D93C13C469 for ; Thu, 21 Feb 2008 23:17:07 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LNH7Db002892 for ; Thu, 21 Feb 2008 23:17:07 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LNH62I002889 for perforce@freebsd.org; Thu, 21 Feb 2008 23:17:06 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 23:17:06 GMT Message-Id: <200802212317.m1LNH62I002889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135920 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 23:17:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=135920 Change 135920 by rrs@rrs-mips2-jnpr on 2008/02/21 23:16:32 cleanup style..and an adjustment to clock rate setting. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#15 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#15 (text+ko) ==== @@ -197,7 +197,7 @@ -static __inline u_int32_t +static __inline u_int32_t mips_rd_ebase(void) { int v0; @@ -208,7 +208,7 @@ return (v0); } -static __inline void +static __inline void mips_wr_ebase(u_int32_t a0) { __asm __volatile("mtc0 %[a0], $15, 1 ;" @@ -223,7 +223,7 @@ * Perform a board-level soft-reset. * Note that this is not emulated by gxemul. */ -void +void octeon_reset(void) { void (*reset_func) (void)= (void (*) (void))0x1fc00000; @@ -232,7 +232,7 @@ } -static inline uint32_t +static inline uint32_t octeon_disable_interrupts(void) { uint32_t status_bits; @@ -243,14 +243,14 @@ } -static inline void +static inline void octeon_set_interrupts(uint32_t status_bits) { mips_wr_status(status_bits); } -void +void octeon_led_write_char(int char_position, char val) { uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); @@ -263,7 +263,7 @@ oct_write8_x8(ptr, val); } -void +void octeon_led_write_char0(char val) { uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); @@ -274,7 +274,7 @@ oct_write8_x8(ptr, val); } -void +void octeon_led_write_hexchar(int char_position, char hexval) { uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); @@ -296,7 +296,7 @@ oct_write8_x8(ptr, char2); } -void +void octeon_led_write_string(const char *str) { uint64_t ptr = (OCTEON_CHAR_LED_BASE_ADDR | 0xf8); @@ -319,7 +319,7 @@ int prog_count = 0; -void +void octeon_led_run_wheel(void) { if (!octeon_board_real()) @@ -350,7 +350,7 @@ * Put out a single byte off of uart port. */ -void +void octeon_uart_write_byte(int uart_index, uint8_t ch) { uint64_t val, val2; @@ -368,7 +368,10 @@ } /* Write the byte */ - /*oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); */ + /* + * oct_write8(OCTEON_MIO_UART0_THR + (uart_index * 0x400), + * (uint64_t) ch); + */ oct_write64(OCTEON_MIO_UART0_THR + (uart_index * 0x400), (uint64_t) ch); /* Force Flush the IOBus */ @@ -376,7 +379,7 @@ } -void +void octeon_uart_write_byte0(uint8_t ch) { uint64_t val, val2; @@ -391,7 +394,7 @@ } /* Write the byte */ - /*oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); */ + /* oct_write8(OCTEON_MIO_UART0_THR, (uint64_t) ch); */ oct_write64(OCTEON_MIO_UART0_THR, (uint64_t) ch); /* Force Flush the IOBus */ @@ -402,7 +405,7 @@ * octeon_uart_write_string * */ -void +void octeon_uart_write_string(int uart_index, const char *str) { /* Just loop writing one byte at a time */ @@ -418,7 +421,7 @@ static char wstr[30]; -void +void octeon_led_write_hex(uint32_t wl) { char nbuf[80]; @@ -428,14 +431,14 @@ } -void +void octeon_uart_write_hex2(uint32_t wl, uint32_t wh) { sprintf(wstr, "0x%X-0x%X ", wh, wl); octeon_uart_write_string(0, wstr); } -void +void octeon_uart_write_hex(uint32_t wl) { sprintf(wstr, " 0x%X ", wl); @@ -445,7 +448,7 @@ /* * octeon_wait_uart_flush */ -void +void octeon_wait_uart_flush(int uart_index, uint8_t ch) { uint64_t val; @@ -474,18 +477,18 @@ * Does nothing. * Used to mark the point for simulator to begin tracing */ -void +void octeon_debug_symbol(void) { } -void +void octeon_ciu_stop_gtimer(int timer) { oct_write64(OCTEON_CIU_GENTIMER_ADDR(timer), 0ll); } -void +void octeon_ciu_start_gtimer(int timer, u_int one_shot, uint64_t time_cycles) { octeon_ciu_gentimer gentimer; @@ -501,7 +504,7 @@ * * Shutdown all CIU to IP2, IP3 mappings */ -void +void octeon_ciu_reset(void) { @@ -525,7 +528,7 @@ * * Disable interrupts in the CPU controller */ -void +void mips_disable_interrupt_controls(void) { /* @@ -539,7 +542,7 @@ /* * ciu_get_intr_sum_reg_addr */ -static uint64_t +static uint64_t ciu_get_intr_sum_reg_addr(int core_num, int intx, int enx) { uint64_t ciu_intr_sum_reg_addr; @@ -561,7 +564,7 @@ /* * ciu_get_intr_en_reg_addr */ -static uint64_t +static uint64_t ciu_get_intr_en_reg_addr(int core_num, int intx, int enx) { uint64_t ciu_intr_reg_addr; @@ -595,7 +598,7 @@ * 238 ---int1,en1 ip3 * */ -uint64_t +uint64_t ciu_get_en_reg_addr_new(int corenum, int intx, int enx, int ciu_ip) { uint64_t ciu_intr_reg_addr = OCTEON_CIU_ENABLE_BASE_ADDR; @@ -628,7 +631,8 @@ /* * ciu_get_int_summary */ -uint64_t ciu_get_int_summary(int core_num, int intx, int enx) +uint64_t +ciu_get_int_summary(int core_num, int intx, int enx) { uint64_t ciu_intr_sum_reg_addr; @@ -644,7 +648,7 @@ /* * ciu_clear_int_summary */ -void +void ciu_clear_int_summary(int core_num, int intx, int enx, uint64_t write_bits) { uint32_t cpu_status_bits; @@ -652,7 +656,8 @@ #ifdef DEBUG_CIU_SUM - uint64_t ciu_intr_sum_bits; + uint64_t ciu_intr_sum_bits; + #endif @@ -688,7 +693,7 @@ /* * ciu_disable_intr */ -void +void ciu_disable_intr(int core_num, int intx, int enx) { uint32_t cpu_status_bits; @@ -710,7 +715,7 @@ } void ciu_dump_interrutps_enabled(int core_num, int intx, int enx, int ciu_ip); -void +void ciu_dump_interrutps_enabled(int core_num, int intx, int enx, int ciu_ip) { @@ -740,7 +745,7 @@ /* * ciu_enable_interrupts */ -void +void ciu_enable_interrupts(int core_num, int intx, int enx, uint64_t set_these_interrupt_bits, int ciu_ip) { @@ -752,9 +757,8 @@ if (core_num == CIU_THIS_CORE) { core_num = octeon_get_core_num(); } - #ifdef DEBUG_CIU_EN - printf(" CIU: core %u enabling Intx %u Enx %u IP %d Bits: 0x%llX\n", + printf(" CIU: core %u enabling Intx %u Enx %u IP %d Bits: 0x%llX\n", core_num, intx, enx, ciu_ip, set_these_interrupt_bits); #endif @@ -932,8 +936,8 @@ uint32_t octeon_cpu_clock; uint64_t octeon_dram = 0; -uint32_t octeon_bd_ver = 0, octeon_cvmx_bd_ver = 0, octeon_board_rev_major, - octeon_board_rev_minor, octeon_board_type; +uint32_t octeon_bd_ver = 0, octeon_cvmx_bd_ver = 0, octeon_board_rev_major, octeon_board_rev_minor, + octeon_board_type; uint8_t octeon_mac_addr[6] = {0}; int octeon_core_mask, octeon_mac_addr_count; int octeon_chip_rev_major = 0, octeon_chip_rev_minor = 0, octeon_chip_type = 0; @@ -954,7 +958,7 @@ #define OCTEON_DRAM_MAX 3000 -int +int octeon_board_real(void) { if ((octeon_board_type == OCTEON_BOARD_TYPE_NONE) || @@ -965,7 +969,7 @@ return 1; } -static void +static void octeon_process_app_desc_ver_unknown(void) { printf(" Unknown Boot-Descriptor: Using Defaults\n"); @@ -987,7 +991,7 @@ octeon_mac_addr_count = 1; } -static int +static int octeon_process_app_desc_ver_6(void) { cvmx_desc_ptr = (cvmx_bootinfo_t *) ((long)app_desc_ptr->cvmx_desc_vaddr); @@ -1032,7 +1036,7 @@ return 0; } -static int +static int octeon_process_app_desc_ver_3_4_5(void) { @@ -1114,7 +1118,7 @@ #define CVMX_BOOTINFO_CFG_FLAG_PCI_HOST (1ull << 0) #define CVMX_BOOTINFO_CFG_FLAG_PCI_TARGET (1ull << 1) -int +int octeon_is_pci_host(void) { #if (CVMX_BOOTINFO_MIN_VER >= 2) @@ -1317,6 +1321,7 @@ __register_t a2 __unused, __register_t a3 __unused) { vm_offset_t kernend; + uint64_t platform_counter_freq; mips_platform_init(); @@ -1333,7 +1338,7 @@ printf(" Initialized memory: 0x%p to 0x%lX\n", &edata, ((long)&edata) + ((long)kernend - (long)(&edata))); mips_init(); - uint64_t platform_counter_freq = OCTEON_CLOCK_DEFAULT; + platform_counter_freq = (uint64_t) (octeon_get_clock_rate()); tick_init_params(platform_counter_freq, 0); } From owner-p4-projects@FreeBSD.ORG Thu Feb 21 23:18:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B640F16A406; Thu, 21 Feb 2008 23:18:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7523516A404 for ; Thu, 21 Feb 2008 23:18:08 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6130513C467 for ; Thu, 21 Feb 2008 23:18:08 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LNI8LL002951 for ; Thu, 21 Feb 2008 23:18:08 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LNI85Y002948 for perforce@freebsd.org; Thu, 21 Feb 2008 23:18:08 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 23:18:08 GMT Message-Id: <200802212318.m1LNI85Y002948@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135921 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 23:18:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=135921 Change 135921 by rrs@rrs-mips2-jnpr on 2008/02/21 23:18:05 single on into one.. not clock.c and tick.c Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#5 (text+ko) ==== @@ -49,19 +49,22 @@ #include #include -uint64_t counter_freq; -uint64_t counts_per_hz; -uint32_t counts_per_usec; -int counter_is_broken; -u_int counter_present; +uint64_t counter_freq; +uint64_t counts_per_hz; +uint32_t counts_per_usec; +int counter_is_broken=0; +u_int counter_present; +u_int32_t counter_upper = 0; +u_int32_t counter_lower_last = 0; +int clock_started = 0; /* * Device methods */ -static int clock_probe(device_t); -static void clock_identify(driver_t *, device_t); -static int clock_attach(device_t); -static unsigned counter_get_timecount(struct timecounter *tc); +static int clock_probe(device_t); +static void clock_identify(driver_t *, device_t); +static int clock_attach(device_t); +static unsigned counter_get_timecount(struct timecounter *tc); static struct timecounter counter_timecounter = { counter_get_timecount, /* get_timecount */ @@ -72,56 +75,80 @@ 800, /* quality (adjusted in code) */ }; -void tick_early_init (uint32_t clock_hz) +void tick_early_init(uint32_t); +void tick_init_params(uint64_t, int ); + +void +tick_early_init(uint32_t clock_hz) +{ + /* Cavium early init code */ + counter_freq = clock_hz; + counts_per_usec = (clock_hz / (1000 * 1000)); +} + +void +cpu_initclocks(void) { - /* Cavium early init code */ - counter_freq = clock_hz; - counts_per_usec = (clock_hz / (1000 * 1000)); + + if (!clock_started) { + tc_init(&counter_timecounter); + clock_started++; + } } + static uint64_t tick_ticker(void) { + uint64_t ret; + uint32_t ticktock; + + ticktock = mips_rd_count(); + critical_enter(); + if (ticktock < counter_lower_last) { + counter_upper++; + } + counter_lower_last = ticktock; + critical_exit(); - return ((uint64_t)mips_rd_count()); + ret = ((uint64_t) counter_upper << 32) | counter_lower_last; + return (ret); } + + void tick_init_params(uint64_t platform_counter_freq, int double_count) { - /* - * XXX: Do not use printf here: uart code 8250 may use DELAY so - * this function should be called before cninit. + /* + * XXX: Do not use printf here: uart code 8250 may use DELAY so this + * function should be called before cninit. */ counter_freq = platform_counter_freq; counts_per_hz = counter_freq / hz; counts_per_usec = counter_freq / (1 * 1000 * 1000); + counter_timecounter.tc_frequency = counter_freq; /* - * XXX: Some MIPS32 cores update the Count register - * only every two pipeline cycles. + * XXX: Some MIPS32 cores update the Count register only every two + * pipeline cycles. */ if (double_count != 0) { counts_per_hz /= 2; counts_per_usec /= 2; } - + printf("hz=%d counts_per_hz:%jd counts_per_usec:%d freq:%jd\n", + hz, + counts_per_hz, + counts_per_usec, + counter_freq + ); set_cputicker(tick_ticker, counter_freq, 1); } -void tick_init(void) -{ - - printf("MIPS32 clock: %ju Hz\n", (intmax_t)counter_freq); - if (counter_freq != 0 && !counter_is_broken) { - counter_timecounter.tc_frequency = counter_freq; - tc_init(&counter_timecounter); - } -} - static int sysctl_machdep_counter_freq(SYSCTL_HANDLER_ARGS) { @@ -140,7 +167,7 @@ } SYSCTL_PROC(_machdep, OID_AUTO, counter_freq, CTLTYPE_QUAD | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", ""); + 0, sizeof(u_int), sysctl_machdep_counter_freq, "IU", ""); static unsigned counter_get_timecount(struct timecounter *tc) @@ -149,8 +176,19 @@ return (mips_rd_count()); } -#ifdef __DUPLCATE_OUT_WARNER -/* fix me */ + +void +cpu_startprofclock(void) +{ + /* nothing to do */ +} + +void +cpu_stopprofclock(void) +{ + /* nothing to do */ +} + /* * Wait for about n microseconds (at least!). */ @@ -158,9 +196,10 @@ DELAY(int n) { uint32_t cur, last, delta, usecs; + /* - * This works by polling the timer and counting the - * number of microseconds that go by. + * This works by polling the timer and counting the number of + * microseconds that go by. */ last = mips_rd_count(); delta = usecs = 0; @@ -182,7 +221,7 @@ } } } -#endif + int sysbeep(int pitch, int period) @@ -193,8 +232,10 @@ #ifdef TARGET_OCTEON int wheel_run = 0; + #define OCTEON_TICK_COUNT 100 -void octeon_led_run_wheel(void); +void octeon_led_run_wheel(void); + #endif /* * Device section of file below @@ -202,14 +243,21 @@ static int clock_intr(void *arg) { - struct trapframe *tf; - register_t usermode, pc; + struct trapframe *tf; + register_t usermode, pc; + uint32_t ltick; /* * Set next clock edge. */ - mips_wr_compare(mips_rd_count() + counter_freq / hz); - + ltick = mips_rd_count(); + mips_wr_compare(ltick + counter_freq / hz); + critical_enter(); + if (ltick < counter_lower_last) { + counter_upper++; + counter_lower_last = ltick; + } + critical_exit(); /* * Magic. Setting up with an arg of NULL means we get passed tf. * XXX this comment and the code don't match. @@ -221,15 +269,14 @@ #ifdef TARGET_OCTEON /* Run the FreeBSD display once every N ticks */ wheel_run++; - if(wheel_run >= OCTEON_TICK_COUNT) { - wheel_run = 0; - octeon_led_run_wheel(); + if (wheel_run >= OCTEON_TICK_COUNT) { + wheel_run = 0; + octeon_led_run_wheel(); } -#endif +#endif if (clocks_running) { hardclock(usermode, pc); } - return (FILTER_HANDLED); } @@ -245,7 +292,7 @@ } static void -clock_identify(driver_t *drv, device_t parent) +clock_identify(driver_t * drv, device_t parent) { BUS_ADD_CHILD(parent, 0, "clock", 0); @@ -264,7 +311,6 @@ device_printf(dev, "failed to allocate irq\n"); return (ENXIO); } - error = bus_setup_intr(dev, irq, INTR_TYPE_CLK, clock_intr, NULL, NULL, NULL); @@ -272,20 +318,19 @@ device_printf(dev, "bus_setup_intr returned %d\n", error); return (error); } - - mips_wr_compare(mips_rd_count() + counter_freq/hz); + mips_wr_compare(mips_rd_count() + counter_freq / hz); return (0); } static device_method_t clock_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, clock_probe), - DEVMETHOD(device_identify, clock_identify), - DEVMETHOD(device_attach, clock_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_probe, clock_probe), + DEVMETHOD(device_identify, clock_identify), + DEVMETHOD(device_attach, clock_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + {0, 0} }; static driver_t clock_driver = { From owner-p4-projects@FreeBSD.ORG Thu Feb 21 23:19:10 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF9EA16A405; Thu, 21 Feb 2008 23:19:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BDC916A402 for ; Thu, 21 Feb 2008 23:19:10 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 685AF13C45E for ; Thu, 21 Feb 2008 23:19:10 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LNJAaT002985 for ; Thu, 21 Feb 2008 23:19:10 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LNJAqj002982 for perforce@freebsd.org; Thu, 21 Feb 2008 23:19:10 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 23:19:10 GMT Message-Id: <200802212319.m1LNJAqj002982@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135922 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 23:19:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=135922 Change 135922 by rrs@rrs-mips2-jnpr on 2008/02/21 23:18:46 get rid of wierd hacks Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#4 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#4 (text+ko) ==== @@ -134,14 +134,6 @@ intr = (cause & MIPS_INT_MASK) >> 8; cause &= ~MIPS_INT_MASK; mips_wr_cause(cause); - -#if 0 - if (intr & CR_INT_CLOCK) { - clockintr(intr, tf); - intr &= ~CR_INT_CLOCK; - } -#endif - while ((i = fls(intr)) != 0) { intr &= ~(1 << (i - 1)); switch (i) { @@ -162,11 +154,8 @@ if (!event || TAILQ_EMPTY(&event->ie_handlers)) { - if (i == 5) - clockintr(intr, tf); - else - printf("stray %s interrupt %d\n", - hard ? "hard" : "soft", i); + printf("stray %s interrupt %d\n", + hard ? "hard" : "soft", i); continue; } From owner-p4-projects@FreeBSD.ORG Thu Feb 21 23:20:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0086016A414; Thu, 21 Feb 2008 23:20:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8FB716A406 for ; Thu, 21 Feb 2008 23:20:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A552613C44B for ; Thu, 21 Feb 2008 23:20:11 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1LNKBd9003097 for ; Thu, 21 Feb 2008 23:20:11 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1LNKBqL003094 for perforce@freebsd.org; Thu, 21 Feb 2008 23:20:11 GMT (envelope-from rrs@cisco.com) Date: Thu, 21 Feb 2008 23:20:11 GMT Message-Id: <200802212320.m1LNKBqL003094@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135923 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 23:20:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135923 Change 135923 by rrs@rrs-mips2-jnpr on 2008/02/21 23:19:13 get rid of clock.c Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#13 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#13 (text+ko) ==== @@ -55,7 +55,7 @@ # Phase 4 # ---------------------------------------------------------------------- # -mips/mips/clock.c standard +#mips/mips/clock.c standard #mips/mips/queue.c standard # ---------------------------------------------------------------------- # Phase 5 @@ -81,7 +81,7 @@ mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard -# mips/mips/tick.c standard +mips/mips/tick.c standard mips/mips/uio_machdep.c standard geom/geom_bsd.c standard geom/geom_bsd_enc.c standard From owner-p4-projects@FreeBSD.ORG Fri Feb 22 00:29:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 20BB916A40B; Fri, 22 Feb 2008 00:29:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C174F16A407 for ; Fri, 22 Feb 2008 00:29:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AF79913C457 for ; Fri, 22 Feb 2008 00:29:24 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M0TOIX008029 for ; Fri, 22 Feb 2008 00:29:24 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M0TOZ4008026 for perforce@freebsd.org; Fri, 22 Feb 2008 00:29:24 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 00:29:24 GMT Message-Id: <200802220029.m1M0TOZ4008026@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135929 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 00:29:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=135929 Change 135929 by kmacy@kmacy:entropy:iwarp on 2008/02/22 00:28:30 we were treating the number of descriptors used as 0 when using TX_MAX_SEGS fix Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#16 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#16 (text+ko) ==== @@ -117,7 +117,7 @@ * in the skb and whether it has any payload in its main body. This maps the * length of the gather list represented by an skb into the # of necessary WRs. */ -static unsigned int mbuf_wrs[TX_MAX_SEGS] __read_mostly; +static unsigned int mbuf_wrs[TX_MAX_SEGS + 1] __read_mostly; /* * Max receive window supported by HW in bytes. Only a small part of it can @@ -358,10 +358,10 @@ KASSERT(!m0->m_next, ("bad append")); } else { while ((mbuf_wrs[count + 1] <= toep->tp_wr_avail) - && (tail != NULL) && (count < TX_MAX_SEGS)) { + && (tail != NULL) && (count < TX_MAX_SEGS-1)) { bytes += tail->m_len; + last = tail; count++; - last = tail; /* * technically an abuse to be using this for a VA * but less gross than defining my own structure @@ -371,7 +371,6 @@ segp->ds_len = tail->m_len; DPRINTF("count=%d wr_needed=%d ds_addr=%p ds_len=%d\n", count, mbuf_wrs[count], tail->m_data, tail->m_len); - segp++; tail = tail->m_next; } @@ -405,8 +404,6 @@ CTR3(KTR_TOM, "t3_push_frames: total_bytes=%d tp_m_last=%p snd_una=0x%08x", total_bytes, toep->tp_m_last, tp->snd_una); - toep->tp_wr_avail -= mbuf_wrs[count]; - toep->tp_wr_unacked += mbuf_wrs[count]; i = 0; while (i < count && m_get_sgllen(m0)) { @@ -434,6 +431,9 @@ */ m0->m_pkthdr.csum_data = mbuf_wrs[count]; m0->m_pkthdr.len = bytes; + toep->tp_wr_avail -= mbuf_wrs[count]; + toep->tp_wr_unacked += mbuf_wrs[count]; + if ((req_completion && toep->tp_wr_unacked == mbuf_wrs[count]) || toep->tp_wr_unacked >= toep->tp_wr_max / 2) { struct work_request_hdr *wr = cplhdr(m0); @@ -441,7 +441,9 @@ wr->wr_hi |= htonl(F_WR_COMPL); toep->tp_wr_unacked = 0; } - + KASSERT((m0->m_pkthdr.csum_data > 0) && + (m0->m_pkthdr.csum_data <= 4), ("bad credit count %d", + m0->m_pkthdr.csum_data)); m0->m_type = MT_DONTFREE; enqueue_wr(toep, m0); DPRINTF("sending offload tx with %d bytes in %d segments\n", @@ -3736,16 +3738,19 @@ while (credits) { struct mbuf *p = peek_wr(toep); - CTR2(KTR_TOM, - "wr_ack: p->credits=%d p->bytes=%d", p->m_pkthdr.csum_data, p->m_pkthdr.len); if (__predict_false(!p)) { log(LOG_ERR, "%u WR_ACK credits for TID %u with " - "nothing pending, state %u\n", - credits, toep->tp_tid, tp->t_state); + "nothing pending, state %u wr_avail=%u\n", + credits, toep->tp_tid, tp->t_state, toep->tp_wr_avail); break; } + CTR2(KTR_TOM, + "wr_ack: p->credits=%d p->bytes=%d", p->m_pkthdr.csum_data, p->m_pkthdr.len); + + KASSERT(p->m_pkthdr.csum_data != 0, ("empty request still on list")); if (__predict_false(credits < p->m_pkthdr.csum_data)) { + #if DEBUG_WR > 1 struct tx_data_wr *w = cplhdr(p); log(LOG_ERR, @@ -3763,7 +3768,9 @@ dequeue_wr(toep); credits -= p->m_pkthdr.csum_data; bytes += p->m_pkthdr.len; - DPRINTF("done with wr of %d bytes\n", p->m_pkthdr.len); + CTR3(KTR_TOM, + "wr_ack: done with wr of %d bytes remain credits=%d wr credits=%d", + p->m_pkthdr.len, credits, p->m_pkthdr.csum_data); m_free(p); } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 01:28:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8126916A406; Fri, 22 Feb 2008 01:28:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F43416A401 for ; Fri, 22 Feb 2008 01:28:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1DD13C468 for ; Fri, 22 Feb 2008 01:28:29 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M1SSwx021366 for ; Fri, 22 Feb 2008 01:28:28 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M1SSHp021363 for perforce@freebsd.org; Fri, 22 Feb 2008 01:28:28 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 01:28:28 GMT Message-Id: <200802220128.m1M1SSHp021363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135931 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 01:28:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=135931 Change 135931 by kmacy@pandemonium:kmacy:xen31 on 2008/02/22 01:27:36 flush any pending updates before creating a new page table mapping Affected files ... .. //depot/projects/xen31/sys/i386/xen/pmap.c#38 edit Differences ... ==== //depot/projects/xen31/sys/i386/xen/pmap.c#38 (text+ko) ==== @@ -957,6 +957,7 @@ mtx_lock(&PMAP2mutex); newpf = *pde & PG_FRAME; if ((*PMAP2 & PG_FRAME) != newpf) { + PT_UPDATES_FLUSH(); *PMAP2 = newpf | PG_V | PG_A | PG_M; pmap_invalidate_page(kernel_pmap, (vm_offset_t)PADDR2); } @@ -1014,6 +1015,7 @@ KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); newpf = *pde & PG_FRAME; if ((*PMAP1 & PG_FRAME) != newpf) { + PT_UPDATES_FLUSH(); *PMAP1 = newpf | PG_V | PG_A | PG_M; #ifdef SMP PMAP1cpu = PCPU_GET(cpuid); From owner-p4-projects@FreeBSD.ORG Fri Feb 22 01:53:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 27AEB16A401; Fri, 22 Feb 2008 01:53:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B8316A407 for ; Fri, 22 Feb 2008 01:53:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 813DF13C4D9 for ; Fri, 22 Feb 2008 01:53:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M1rtpL022305 for ; Fri, 22 Feb 2008 01:53:55 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M1rtrt022302 for perforce@freebsd.org; Fri, 22 Feb 2008 01:53:55 GMT (envelope-from marcel@freebsd.org) Date: Fri, 22 Feb 2008 01:53:55 GMT Message-Id: <200802220153.m1M1rtrt022302@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135932 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 01:53:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=135932 Change 135932 by marcel@marcel_jnpr on 2008/02/22 01:53:20 Add FPU_EMU and MPC85xx Affected files ... .. //depot/projects/e500/sys/powerpc/conf/NOTES#7 edit Differences ... ==== //depot/projects/e500/sys/powerpc/conf/NOTES#7 (text+ko) ==== @@ -13,6 +13,9 @@ cpu AIM cpu E500 +options FPU_EMU + +options MPC85xx options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator From owner-p4-projects@FreeBSD.ORG Fri Feb 22 02:05:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 20E6816A40A; Fri, 22 Feb 2008 02:05:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D926916A400 for ; Fri, 22 Feb 2008 02:05:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B144C13C478 for ; Fri, 22 Feb 2008 02:05:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M257GR023976 for ; Fri, 22 Feb 2008 02:05:07 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M257Lt023973 for perforce@freebsd.org; Fri, 22 Feb 2008 02:05:07 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 02:05:07 GMT Message-Id: <200802220205.m1M257Lt023973@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135933 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 02:05:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=135933 Change 135933 by sam@sam_ebb on 2008/02/22 02:04:51 use preferred syntax Submitted by: kan Affected files ... .. //depot/projects/vap/sys/sys/cdefs.h#8 edit Differences ... ==== //depot/projects/vap/sys/sys/cdefs.h#8 (text+ko) ==== @@ -242,7 +242,7 @@ #endif #if __GNUC_PREREQ__(3, 1) -#define __noinline __attribute__ ((noinline)) +#define __noinline __attribute__ ((__noinline__)) #else #define __noinline #endif From owner-p4-projects@FreeBSD.ORG Fri Feb 22 02:24:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F3B816A403; Fri, 22 Feb 2008 02:24:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D15B216A401 for ; Fri, 22 Feb 2008 02:24:07 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BF26313C442 for ; Fri, 22 Feb 2008 02:24:07 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M2O7Bx025567 for ; Fri, 22 Feb 2008 02:24:07 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M2N4KP025508 for perforce@freebsd.org; Fri, 22 Feb 2008 02:23:04 GMT (envelope-from marcel@freebsd.org) Date: Fri, 22 Feb 2008 02:23:04 GMT Message-Id: <200802220223.m1M2N4KP025508@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135934 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 02:24:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=135934 Change 135934 by marcel@marcel_xcllnt on 2008/02/22 02:23:01 IFC @135930 Affected files ... .. //depot/projects/tty/COPYRIGHT#6 integrate .. //depot/projects/tty/LOCKS#3 integrate .. //depot/projects/tty/MAINTAINERS#26 integrate .. //depot/projects/tty/Makefile#24 integrate .. //depot/projects/tty/Makefile.inc1#37 integrate .. //depot/projects/tty/ObsoleteFiles.inc#14 integrate .. //depot/projects/tty/UPDATING#39 integrate .. //depot/projects/tty/bin/cp/cp.c#10 integrate .. //depot/projects/tty/bin/date/date.c#6 integrate .. //depot/projects/tty/bin/mv/mv.c#8 integrate .. //depot/projects/tty/bin/sh/mksyntax.c#5 integrate .. //depot/projects/tty/contrib/amd/FREEBSD-Xlist#4 integrate .. //depot/projects/tty/contrib/amd/FREEBSD-upgrade#4 integrate .. //depot/projects/tty/contrib/binutils/libiberty/cp-demangle.c#3 integrate .. //depot/projects/tty/contrib/cvs/AUTHORS#3 integrate .. //depot/projects/tty/contrib/cvs/BUGS#4 integrate .. //depot/projects/tty/contrib/cvs/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/FAQ#3 integrate .. //depot/projects/tty/contrib/cvs/FREEBSD-Xlist#2 integrate .. //depot/projects/tty/contrib/cvs/FREEBSD-upgrade#3 integrate .. //depot/projects/tty/contrib/cvs/HACKING#3 integrate .. //depot/projects/tty/contrib/cvs/INSTALL#4 integrate .. //depot/projects/tty/contrib/cvs/Makefile.in#4 integrate .. //depot/projects/tty/contrib/cvs/NEWS#4 integrate .. //depot/projects/tty/contrib/cvs/README#3 integrate .. //depot/projects/tty/contrib/cvs/TESTS#3 integrate .. //depot/projects/tty/contrib/cvs/TODO#3 integrate .. //depot/projects/tty/contrib/cvs/acinclude.m4#4 integrate .. //depot/projects/tty/contrib/cvs/aclocal.m4#4 integrate .. //depot/projects/tty/contrib/cvs/config.h.in#4 integrate .. //depot/projects/tty/contrib/cvs/configure#4 integrate .. //depot/projects/tty/contrib/cvs/configure.in#4 integrate .. //depot/projects/tty/contrib/cvs/contrib/ChangeLog#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/Makefile.am#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/Makefile.in#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/README#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/clmerge.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/cln_hist.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/commit_prep.in#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/cvs2vendor.sh#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/cvs_acls.html#1 branch .. //depot/projects/tty/contrib/cvs/contrib/cvs_acls.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/cvscheck.sh#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/debug_check_log.sh#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/descend.sh#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/log.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/log_accum.in#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/mfpipe.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/pvcs2rcs.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/rcs-to-cvs.sh#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/rcs2log.sh#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/rcs2sccs.sh#3 integrate .. //depot/projects/tty/contrib/cvs/contrib/rcslock.in#2 integrate .. //depot/projects/tty/contrib/cvs/contrib/sccs2rcs.in#3 integrate .. //depot/projects/tty/contrib/cvs/diff/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/diff/Makefile.am#3 integrate .. //depot/projects/tty/contrib/cvs/diff/Makefile.in#4 integrate .. //depot/projects/tty/contrib/cvs/doc/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/doc/Makefile.am#4 integrate .. //depot/projects/tty/contrib/cvs/doc/Makefile.in#4 integrate .. //depot/projects/tty/contrib/cvs/doc/cvs.1#2 integrate .. //depot/projects/tty/contrib/cvs/doc/cvs.man.footer#2 integrate .. //depot/projects/tty/contrib/cvs/doc/cvs.man.header#2 integrate .. //depot/projects/tty/contrib/cvs/doc/cvs.texinfo#4 integrate .. //depot/projects/tty/contrib/cvs/doc/cvsclient.texi#3 integrate .. //depot/projects/tty/contrib/cvs/doc/mkman.in#2 delete .. //depot/projects/tty/contrib/cvs/doc/mkman.pl#1 branch .. //depot/projects/tty/contrib/cvs/doc/stamp-1#4 integrate .. //depot/projects/tty/contrib/cvs/doc/stamp-vti#4 integrate .. //depot/projects/tty/contrib/cvs/doc/version-client.texi#4 integrate .. //depot/projects/tty/contrib/cvs/doc/version.texi#4 integrate .. //depot/projects/tty/contrib/cvs/lib/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/lib/Makefile.am#4 integrate .. //depot/projects/tty/contrib/cvs/lib/Makefile.in#4 integrate .. //depot/projects/tty/contrib/cvs/lib/fncase.c#3 integrate .. //depot/projects/tty/contrib/cvs/lib/getdate#1 branch .. //depot/projects/tty/contrib/cvs/lib/getpass.c#2 integrate .. //depot/projects/tty/contrib/cvs/lib/regex.c#3 integrate .. //depot/projects/tty/contrib/cvs/lib/system.h#4 integrate .. //depot/projects/tty/contrib/cvs/lib/test-getdate.sh#1 branch .. //depot/projects/tty/contrib/cvs/lib/xtime.h#2 integrate .. //depot/projects/tty/contrib/cvs/man/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/man/Makefile.am#4 integrate .. //depot/projects/tty/contrib/cvs/man/Makefile.in#4 integrate .. //depot/projects/tty/contrib/cvs/man/cvs.1#5 integrate .. //depot/projects/tty/contrib/cvs/src/ChangeLog#4 integrate .. //depot/projects/tty/contrib/cvs/src/Makefile.am#3 integrate .. //depot/projects/tty/contrib/cvs/src/Makefile.in#3 integrate .. //depot/projects/tty/contrib/cvs/src/add.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/admin.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/annotate.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/buffer.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/buffer.h#3 integrate .. //depot/projects/tty/contrib/cvs/src/checkin.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/checkout.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/classify.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/client.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/client.h#3 integrate .. //depot/projects/tty/contrib/cvs/src/commit.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/create_adm.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/cvs.h#4 integrate .. //depot/projects/tty/contrib/cvs/src/cvsrc.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/diff.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/edit.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/entries.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/expand_path.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/fileattr.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/filesubr.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/find_names.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/hardlink.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/hardlink.h#2 integrate .. //depot/projects/tty/contrib/cvs/src/hash.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/hash.h#3 integrate .. //depot/projects/tty/contrib/cvs/src/history.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/history.h#2 integrate .. //depot/projects/tty/contrib/cvs/src/ignore.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/import.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/lock.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/log.c#5 integrate .. //depot/projects/tty/contrib/cvs/src/login.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/logmsg.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/main.c#5 integrate .. //depot/projects/tty/contrib/cvs/src/mkmodules.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/modules.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/myndbm.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/myndbm.h#2 integrate .. //depot/projects/tty/contrib/cvs/src/no_diff.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/parseinfo.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/patch.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/rcs.c#5 integrate .. //depot/projects/tty/contrib/cvs/src/rcs.h#4 integrate .. //depot/projects/tty/contrib/cvs/src/rcscmds.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/recurse.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/release.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/remove.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/repos.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/root.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/root.h#3 integrate .. //depot/projects/tty/contrib/cvs/src/run.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/sanity.sh#4 integrate .. //depot/projects/tty/contrib/cvs/src/server.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/server.h#3 integrate .. //depot/projects/tty/contrib/cvs/src/stack.c#2 integrate .. //depot/projects/tty/contrib/cvs/src/stack.h#2 integrate .. //depot/projects/tty/contrib/cvs/src/status.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/subr.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/tag.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/update.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/vers_ts.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/version.c#2 integrate .. //depot/projects/tty/contrib/cvs/src/watch.c#3 integrate .. //depot/projects/tty/contrib/cvs/src/wrapper.c#4 integrate .. //depot/projects/tty/contrib/cvs/src/zlib.c#3 integrate .. //depot/projects/tty/contrib/cvs/tools/ChangeLog#3 integrate .. //depot/projects/tty/contrib/cvs/tools/Makefile.am#3 integrate .. //depot/projects/tty/contrib/cvs/tools/Makefile.in#3 integrate .. //depot/projects/tty/contrib/cvs/tools/README#2 integrate .. //depot/projects/tty/contrib/file/ChangeLog#5 integrate .. //depot/projects/tty/contrib/file/FREEBSD-upgrade#4 integrate .. //depot/projects/tty/contrib/file/Magdir/acorn#2 integrate .. //depot/projects/tty/contrib/file/Magdir/animation#6 integrate .. //depot/projects/tty/contrib/file/Magdir/apple#4 integrate .. //depot/projects/tty/contrib/file/Magdir/archive#7 integrate .. //depot/projects/tty/contrib/file/Magdir/audio#7 integrate .. //depot/projects/tty/contrib/file/Magdir/bFLT#2 delete .. //depot/projects/tty/contrib/file/Magdir/blender#2 integrate .. //depot/projects/tty/contrib/file/Magdir/chi#2 delete .. //depot/projects/tty/contrib/file/Magdir/commands#5 integrate .. //depot/projects/tty/contrib/file/Magdir/console#6 integrate .. //depot/projects/tty/contrib/file/Magdir/cvs#2 delete .. //depot/projects/tty/contrib/file/Magdir/database#5 integrate .. //depot/projects/tty/contrib/file/Magdir/efi#1 branch .. //depot/projects/tty/contrib/file/Magdir/elf#7 integrate .. //depot/projects/tty/contrib/file/Magdir/filesystems#7 integrate .. //depot/projects/tty/contrib/file/Magdir/fortran#1 branch .. //depot/projects/tty/contrib/file/Magdir/hdf#2 delete .. //depot/projects/tty/contrib/file/Magdir/impulse#2 delete .. //depot/projects/tty/contrib/file/Magdir/java#4 integrate .. //depot/projects/tty/contrib/file/Magdir/macintosh#5 integrate .. //depot/projects/tty/contrib/file/Magdir/msdos#7 integrate .. //depot/projects/tty/contrib/file/Magdir/pdf#2 integrate .. //depot/projects/tty/contrib/file/Magdir/sgi#4 integrate .. //depot/projects/tty/contrib/file/Magdir/wordperfect#2 delete .. //depot/projects/tty/contrib/file/Makefile.am#7 integrate .. //depot/projects/tty/contrib/file/Makefile.in#7 integrate .. //depot/projects/tty/contrib/file/acconfig.h#3 delete .. //depot/projects/tty/contrib/file/acinclude.m4#3 integrate .. //depot/projects/tty/contrib/file/aclocal.m4#6 integrate .. //depot/projects/tty/contrib/file/apprentice.c#7 integrate .. //depot/projects/tty/contrib/file/ascmagic.c#7 integrate .. //depot/projects/tty/contrib/file/compress.c#6 integrate .. //depot/projects/tty/contrib/file/config.h.in#7 integrate .. //depot/projects/tty/contrib/file/configure#7 integrate .. //depot/projects/tty/contrib/file/configure.in#7 integrate .. //depot/projects/tty/contrib/file/file.c#7 integrate .. //depot/projects/tty/contrib/file/file.h#7 integrate .. //depot/projects/tty/contrib/file/file.man#5 integrate .. //depot/projects/tty/contrib/file/file_opts.h#1 branch .. //depot/projects/tty/contrib/file/fsmagic.c#6 integrate .. //depot/projects/tty/contrib/file/funcs.c#5 integrate .. //depot/projects/tty/contrib/file/install-sh#4 integrate .. //depot/projects/tty/contrib/file/is_tar.c#5 integrate .. //depot/projects/tty/contrib/file/libmagic.man#3 integrate .. //depot/projects/tty/contrib/file/magic.c#5 integrate .. //depot/projects/tty/contrib/file/magic.h#4 integrate .. //depot/projects/tty/contrib/file/magic.man#5 integrate .. //depot/projects/tty/contrib/file/magic.mime#7 integrate .. //depot/projects/tty/contrib/file/missing#2 delete .. //depot/projects/tty/contrib/file/mkinstalldirs#4 integrate .. //depot/projects/tty/contrib/file/names.h#5 integrate .. //depot/projects/tty/contrib/file/patchlevel.h#7 integrate .. //depot/projects/tty/contrib/file/print.c#7 integrate .. //depot/projects/tty/contrib/file/readelf.c#7 integrate .. //depot/projects/tty/contrib/file/readelf.h#5 integrate .. //depot/projects/tty/contrib/file/softmagic.c#7 integrate .. //depot/projects/tty/contrib/file/stamp-h.in#2 delete .. //depot/projects/tty/contrib/gcc/fold-const.c#9 integrate .. //depot/projects/tty/contrib/gdb/FREEBSD-diffs#1 branch .. //depot/projects/tty/contrib/gdtoa/gdtoaimp.h#6 integrate .. //depot/projects/tty/contrib/gdtoa/hexnan.c#3 integrate .. //depot/projects/tty/contrib/gdtoa/strtod.c#5 integrate .. //depot/projects/tty/contrib/gdtoa/strtof.c#3 integrate .. //depot/projects/tty/contrib/gdtoa/strtorQ.c#3 integrate .. //depot/projects/tty/contrib/gdtoa/strtorx.c#3 integrate .. //depot/projects/tty/contrib/ncurses/FREEBSD-upgrade#2 integrate .. //depot/projects/tty/contrib/ncurses/FREEBSD-vendor#1 branch .. //depot/projects/tty/contrib/ncurses/INSTALL#3 integrate .. //depot/projects/tty/contrib/ncurses/MANIFEST#3 integrate .. //depot/projects/tty/contrib/ncurses/NEWS#3 integrate .. //depot/projects/tty/contrib/ncurses/TO-DO#3 integrate .. //depot/projects/tty/contrib/ncurses/aclocal.m4#3 integrate .. //depot/projects/tty/contrib/ncurses/config.guess#3 integrate .. //depot/projects/tty/contrib/ncurses/config.sub#3 integrate .. //depot/projects/tty/contrib/ncurses/configure#3 integrate .. //depot/projects/tty/contrib/ncurses/configure.in#3 integrate .. //depot/projects/tty/contrib/ncurses/dist.mk#3 integrate .. //depot/projects/tty/contrib/ncurses/doc/hackguide.doc#3 integrate .. //depot/projects/tty/contrib/ncurses/doc/html/ncurses-intro.html#3 integrate .. //depot/projects/tty/contrib/ncurses/doc/ncurses-intro.doc#3 integrate .. //depot/projects/tty/contrib/ncurses/form/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fld_def.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fld_dup.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fld_ftlink.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fld_link.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fld_newftyp.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/frm_def.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/frm_driver.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_alnum.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_alpha.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_enum.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_int.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_num.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/fty_regex.c#3 integrate .. //depot/projects/tty/contrib/ncurses/form/headers#2 integrate .. //depot/projects/tty/contrib/ncurses/form/modules#3 integrate .. //depot/projects/tty/contrib/ncurses/include/MKterm.h.awk.in#3 integrate .. //depot/projects/tty/contrib/ncurses/include/curses.h.in#3 integrate .. //depot/projects/tty/contrib/ncurses/include/curses.tail#3 integrate .. //depot/projects/tty/contrib/ncurses/include/curses.wide#3 integrate .. //depot/projects/tty/contrib/ncurses/include/headers#2 integrate .. //depot/projects/tty/contrib/ncurses/include/nc_alloc.h#3 integrate .. //depot/projects/tty/contrib/ncurses/include/ncurses_defs#3 integrate .. //depot/projects/tty/contrib/ncurses/include/ncurses_dll.h#3 integrate .. //depot/projects/tty/contrib/ncurses/include/tic.h#3 integrate .. //depot/projects/tty/contrib/ncurses/install-sh#3 integrate .. //depot/projects/tty/contrib/ncurses/man/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/man/captoinfo.1m#3 integrate .. //depot/projects/tty/contrib/ncurses/man/clear.1#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_add_wch.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_addch.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_attr.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_border.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_clear.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_deleteln.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_extend.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_getcchar.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_getyx.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_insstr.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_legacy.3x#1 branch .. //depot/projects/tty/contrib/ncurses/man/curs_mouse.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_opaque.3x#1 branch .. //depot/projects/tty/contrib/ncurses/man/curs_outopts.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_printw.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_scanw.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_scr_dump.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_slk.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_termattrs.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_termcap.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_terminfo.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_threads.3x#1 branch .. //depot/projects/tty/contrib/ncurses/man/curs_trace.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/curs_util.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/default_colors.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_driver.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_field_new.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_field_opts.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_field_validation.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_hook.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/form_opts.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/infocmp.1m#3 integrate .. //depot/projects/tty/contrib/ncurses/man/infotocap.1m#3 integrate .. //depot/projects/tty/contrib/ncurses/man/legacy_coding.3x#2 integrate .. //depot/projects/tty/contrib/ncurses/man/man_db.renames#3 integrate .. //depot/projects/tty/contrib/ncurses/man/manlinks.sed#3 integrate .. //depot/projects/tty/contrib/ncurses/man/menu_driver.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/menu_hook.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/menu_opts.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/mitem_opts.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/ncurses.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/panel.3x#3 integrate .. //depot/projects/tty/contrib/ncurses/man/term.5#3 integrate .. //depot/projects/tty/contrib/ncurses/man/term.7#3 integrate .. //depot/projects/tty/contrib/ncurses/man/terminfo.head#3 integrate .. //depot/projects/tty/contrib/ncurses/man/terminfo.tail#3 integrate .. //depot/projects/tty/contrib/ncurses/man/tic.1m#3 integrate .. //depot/projects/tty/contrib/ncurses/man/toe.1m#3 integrate .. //depot/projects/tty/contrib/ncurses/man/tput.1#3 integrate .. //depot/projects/tty/contrib/ncurses/man/tset.1#3 integrate .. //depot/projects/tty/contrib/ncurses/menu/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/menu/headers#2 integrate .. //depot/projects/tty/contrib/ncurses/menu/menu.h#3 integrate .. //depot/projects/tty/contrib/ncurses/menu/modules#3 integrate .. //depot/projects/tty/contrib/ncurses/misc/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/misc/ncurses-config.in#2 integrate .. //depot/projects/tty/contrib/ncurses/misc/shlib#3 integrate .. //depot/projects/tty/contrib/ncurses/misc/terminfo.src#3 integrate .. //depot/projects/tty/contrib/ncurses/mk-1st.awk#3 integrate .. //depot/projects/tty/contrib/ncurses/mk-hdr.awk#1 branch .. //depot/projects/tty/contrib/ncurses/mkdirs.sh#1 branch .. //depot/projects/tty/contrib/ncurses/mkinstalldirs#3 delete .. //depot/projects/tty/contrib/ncurses/ncurses/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/MKkeyname.awk#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/MKlib_gen.sh#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/MKunctrl.awk#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/define_key.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/key_defined.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/keyok.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_addch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_addstr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_color.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_delwin.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_freeall.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_getch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_initscr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_insch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_instr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_mouse.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_newterm.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_newwin.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_overlay.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_redrawln.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_refresh.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_restart.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_screen.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_set_term.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_slk.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_slkclear.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_slkinit.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_slkset.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_ungetch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/lib_window.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/memmove.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/resizeterm.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/safe_sprintf.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/tries.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/base/use_window.c#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/base/wresize.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/curses.priv.h#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/llib-lncurses#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/llib-lncursest#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/llib-lncursesw#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/modules#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/MKcaptab.awk#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/MKcaptab.sh#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/MKcodes.awk#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/MKnames.awk#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/access.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/add_tries.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/comp_error.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/comp_hash.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/comp_parse.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/db_iterator.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/entries.c#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/home_terminfo.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/init_keytry.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_acs.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_baudrate.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_data.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_options.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_raw.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_setup.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_termcap.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_tparm.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_tputs.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/make_keys.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/name_match.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/parse_entry.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/read_entry.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/setbuf.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/strings.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/trim_sgr0.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/use_screen.c#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/tinfo/write_entry.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_trace.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_traceatr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_tracebits.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_tracechr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_tracedmp.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/lib_tracemse.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/trace_buf.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/trace_tries.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/varargs.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/trace/visbuf.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/hardscroll.c#2 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/hashmap.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/lib_mvcur.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/lib_tstp.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/lib_twait.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/lib_vidattr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/tty/tty_update.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_cchar.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_get_wch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_in_wchnstr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_key_name.c#1 branch .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_unget_wch.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_vid_attr.c#3 integrate .. //depot/projects/tty/contrib/ncurses/ncurses/widechar/lib_wunctrl.c#3 integrate .. //depot/projects/tty/contrib/ncurses/panel/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/panel/headers#2 integrate .. //depot/projects/tty/contrib/ncurses/panel/modules#2 integrate .. //depot/projects/tty/contrib/ncurses/progs/Makefile.in#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/clear.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/dump_entry.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/infocmp.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/modules#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/progs.priv.h#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/tic.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/toe.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/tput.c#3 integrate .. //depot/projects/tty/contrib/ncurses/progs/tset.c#3 integrate .. //depot/projects/tty/contrib/ncurses/tack/COPYING#3 delete .. //depot/projects/tty/contrib/ncurses/tack/HISTORY#3 delete .. //depot/projects/tty/contrib/ncurses/tack/Makefile.in#3 delete .. //depot/projects/tty/contrib/ncurses/tack/README#2 delete .. //depot/projects/tty/contrib/ncurses/tack/ansi.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/charset.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/color.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/control.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/crum.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/edit.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/fun.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/init.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/menu.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/modes.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/modules#3 delete .. //depot/projects/tty/contrib/ncurses/tack/output.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/pad.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/scan.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/sync.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/sysdep.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/tack.1#3 delete .. //depot/projects/tty/contrib/ncurses/tack/tack.c#3 delete .. //depot/projects/tty/contrib/ncurses/tack/tack.h#3 delete .. //depot/projects/tty/contrib/openpam/CREDITS#6 integrate .. //depot/projects/tty/contrib/openpam/FREEBSD-vendor#1 branch .. //depot/projects/tty/contrib/openpam/HISTORY#8 integrate .. //depot/projects/tty/contrib/openpam/INSTALL#4 integrate .. //depot/projects/tty/contrib/openpam/LICENSE#3 integrate .. //depot/projects/tty/contrib/openpam/MANIFEST#6 delete .. //depot/projects/tty/contrib/openpam/Makefile.am#4 integrate .. //depot/projects/tty/contrib/openpam/Makefile.in#5 integrate .. //depot/projects/tty/contrib/openpam/README#4 integrate .. //depot/projects/tty/contrib/openpam/RELNOTES#8 integrate .. //depot/projects/tty/contrib/openpam/aclocal.m4#4 integrate .. //depot/projects/tty/contrib/openpam/autogen.sh#3 integrate .. //depot/projects/tty/contrib/openpam/bin/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/bin/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/bin/su/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/bin/su/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/bin/su/su.c#3 integrate .. //depot/projects/tty/contrib/openpam/compile#1 branch .. //depot/projects/tty/contrib/openpam/config.h.in#3 integrate .. //depot/projects/tty/contrib/openpam/configure#5 integrate .. //depot/projects/tty/contrib/openpam/configure.ac#2 integrate .. //depot/projects/tty/contrib/openpam/configure.in#3 delete .. //depot/projects/tty/contrib/openpam/depcomp#3 integrate .. //depot/projects/tty/contrib/openpam/doc/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/doc/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/doc/man/Makefile.am#4 integrate .. //depot/projects/tty/contrib/openpam/doc/man/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam.man#4 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_borrow_cred.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_free_data.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_free_envlist.3#3 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_get_option.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_log.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_nullconv.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_readline.3#6 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_restore_cred.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_set_option.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/openpam_ttyconv.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam.conf.5#2 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam.man#5 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_acct_mgmt.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_authenticate.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_chauthtok.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_close_session.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_conv.3#5 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_end.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_error.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_get_authtok.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_get_data.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_get_item.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_get_user.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_getenv.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_getenvlist.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_info.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_open_session.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_prompt.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_putenv.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_set_data.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_set_item.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_setcred.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_setenv.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_acct_mgmt.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_authenticate.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_chauthtok.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_close_session.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_open_session.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_sm_setcred.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_start.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_strerror.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_verror.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_vinfo.3#8 integrate .. //depot/projects/tty/contrib/openpam/doc/man/pam_vprompt.3#8 integrate .. //depot/projects/tty/contrib/openpam/include/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/include/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/include/security/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/include/security/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/include/security/openpam.h#6 integrate .. //depot/projects/tty/contrib/openpam/include/security/openpam_attr.h#1 branch .. //depot/projects/tty/contrib/openpam/include/security/openpam_version.h#8 integrate .. //depot/projects/tty/contrib/openpam/include/security/pam_appl.h#5 integrate .. //depot/projects/tty/contrib/openpam/include/security/pam_constants.h#4 integrate .. //depot/projects/tty/contrib/openpam/include/security/pam_modules.h#3 integrate .. //depot/projects/tty/contrib/openpam/include/security/pam_types.h#4 integrate .. //depot/projects/tty/contrib/openpam/install-sh#3 integrate .. //depot/projects/tty/contrib/openpam/lib/Makefile.am#4 integrate .. //depot/projects/tty/contrib/openpam/lib/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_borrow_cred.c#7 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_configure.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_dispatch.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_dynamic.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_findenv.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_free_data.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_free_envlist.c#2 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_get_option.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_impl.h#7 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_load.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_log.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_nullconv.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_readline.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_restore_cred.c#7 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_set_option.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_static.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/openpam_ttyconv.c#8 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_acct_mgmt.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_authenticate.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_authenticate_secondary.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_chauthtok.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_close_session.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_end.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_error.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_authtok.c#7 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_data.c#6 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_item.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_mapped_authtok.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_mapped_username.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_get_user.c#7 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_getenv.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_getenvlist.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_info.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_open_session.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_prompt.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_putenv.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_set_data.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_set_item.c#5 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_set_mapped_authtok.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_set_mapped_username.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_setcred.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_setenv.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_acct_mgmt.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_authenticate.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_authenticate_secondary.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_chauthtok.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_close_session.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_get_mapped_authtok.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_get_mapped_username.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_open_session.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_set_mapped_authtok.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_set_mapped_username.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_sm_setcred.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_start.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_strerror.c#4 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_verror.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_vinfo.c#3 integrate .. //depot/projects/tty/contrib/openpam/lib/pam_vprompt.c#5 integrate .. //depot/projects/tty/contrib/openpam/ltconfig#2 delete .. //depot/projects/tty/contrib/openpam/ltmain.sh#5 integrate .. //depot/projects/tty/contrib/openpam/misc/gendoc.pl#6 integrate .. //depot/projects/tty/contrib/openpam/missing#3 integrate .. //depot/projects/tty/contrib/openpam/mkinstalldirs#2 delete .. //depot/projects/tty/contrib/openpam/modules/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/modules/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_deny/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_deny/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_deny/pam_deny.c#5 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_permit/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_permit/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_permit/pam_permit.c#4 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_unix/Makefile.am#3 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_unix/Makefile.in#4 integrate .. //depot/projects/tty/contrib/openpam/modules/pam_unix/pam_unix.c#4 integrate .. //depot/projects/tty/contrib/openpam/stamp-h.in#3 delete .. //depot/projects/tty/contrib/pf/man/pf.conf.5#10 integrate .. //depot/projects/tty/contrib/top/display.c#3 integrate .. //depot/projects/tty/contrib/top/layout.h#2 integrate .. //depot/projects/tty/contrib/top/machine.h#6 integrate .. //depot/projects/tty/contrib/top/top.c#10 integrate .. //depot/projects/tty/contrib/top/top.h#4 integrate .. //depot/projects/tty/contrib/traceroute/as.c#1 branch .. //depot/projects/tty/contrib/traceroute/as.h#1 branch .. //depot/projects/tty/contrib/traceroute/traceroute.8#6 integrate .. //depot/projects/tty/contrib/traceroute/traceroute.c#10 integrate .. //depot/projects/tty/crypto/openssh/FREEBSD-Xlist#3 integrate .. //depot/projects/tty/crypto/openssh/FREEBSD-upgrade#8 integrate .. //depot/projects/tty/crypto/openssh/FREEBSD-vendor#1 branch .. //depot/projects/tty/crypto/openssl/crypto/engine/eng_cryptodev.c#2 integrate .. //depot/projects/tty/etc/defaults/periodic.conf#14 integrate .. //depot/projects/tty/etc/defaults/rc.conf#28 integrate .. //depot/projects/tty/etc/devd.conf#22 integrate .. //depot/projects/tty/etc/mail/access.sample#2 integrate .. //depot/projects/tty/etc/namedb/named.conf#7 integrate .. //depot/projects/tty/etc/namedb/named.root#5 integrate .. //depot/projects/tty/etc/netstart#8 integrate .. //depot/projects/tty/etc/periodic/daily/460.status-mail-rejects#4 integrate .. //depot/projects/tty/etc/periodic/security/100.chksetuid#4 integrate .. //depot/projects/tty/etc/rc#10 integrate .. //depot/projects/tty/etc/rc.d/dhclient#12 integrate .. //depot/projects/tty/etc/rc.d/hostid#3 integrate .. //depot/projects/tty/etc/rc.d/ipfw#11 integrate .. //depot/projects/tty/etc/rc.d/jail#15 integrate .. //depot/projects/tty/etc/rc.d/kerberos#7 integrate .. //depot/projects/tty/etc/rc.d/ldconfig#11 integrate .. //depot/projects/tty/etc/rc.d/mountcritremote#10 integrate .. //depot/projects/tty/etc/rc.d/netif#13 integrate .. //depot/projects/tty/etc/rc.d/ppp#6 integrate .. //depot/projects/tty/etc/rc.firewall#6 integrate .. //depot/projects/tty/etc/rc.firewall6#8 integrate .. //depot/projects/tty/etc/rc.subr#20 integrate .. //depot/projects/tty/etc/sendmail/freebsd.mc#10 integrate .. //depot/projects/tty/games/fortune/datfiles/fortunes#32 integrate .. //depot/projects/tty/games/fortune/datfiles/fortunes-o.real#7 integrate .. //depot/projects/tty/games/fortune/datfiles/gerrold.limerick#2 integrate .. //depot/projects/tty/games/fortune/datfiles/limerick#9 integrate .. //depot/projects/tty/games/fortune/strfile/strfile.c#7 integrate .. //depot/projects/tty/gnu/lib/csu/Makefile#9 integrate .. //depot/projects/tty/gnu/usr.bin/Makefile#13 integrate .. //depot/projects/tty/gnu/usr.bin/binutils/ar/Makefile#5 integrate .. //depot/projects/tty/gnu/usr.bin/binutils/ranlib/Makefile#6 integrate .. //depot/projects/tty/gnu/usr.bin/cvs/Makefile#3 integrate .. //depot/projects/tty/gnu/usr.bin/cvs/contrib/Makefile#3 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/Makefile#4 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/kgdb.h#7 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/kld.c#1 branch .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/kthr.c#7 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/main.c#7 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/trgt.c#6 integrate .. //depot/projects/tty/gnu/usr.bin/gdb/kgdb/trgt_i386.c#6 integrate .. //depot/projects/tty/gnu/usr.bin/man/man/man.c#5 integrate .. //depot/projects/tty/gnu/usr.bin/man/manpath/manpath.c#2 integrate .. //depot/projects/tty/include/complex.h#4 integrate .. //depot/projects/tty/include/fts.h#4 integrate .. //depot/projects/tty/include/nsswitch.h#4 integrate .. //depot/projects/tty/include/pthread_np.h#4 integrate .. //depot/projects/tty/include/unistd.h#10 integrate .. //depot/projects/tty/lib/Makefile#27 integrate .. //depot/projects/tty/lib/libarchive/Makefile#16 integrate .. //depot/projects/tty/lib/libarchive/archive.h.in#12 integrate .. //depot/projects/tty/lib/libarchive/archive_endian.h#1 branch .. //depot/projects/tty/lib/libarchive/archive_entry.c#13 integrate .. //depot/projects/tty/lib/libarchive/archive_entry.h#11 integrate .. //depot/projects/tty/lib/libarchive/archive_entry_link_resolver.c#1 branch .. //depot/projects/tty/lib/libarchive/archive_entry_private.h#2 integrate .. //depot/projects/tty/lib/libarchive/archive_entry_strmode.c#1 branch .. //depot/projects/tty/lib/libarchive/archive_platform.h#12 integrate .. //depot/projects/tty/lib/libarchive/archive_read.c#11 integrate .. //depot/projects/tty/lib/libarchive/archive_read_extract.c#13 integrate .. //depot/projects/tty/lib/libarchive/archive_read_open_filename.c#3 integrate .. //depot/projects/tty/lib/libarchive/archive_read_private.h#3 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_compression_bzip2.c#8 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_compression_gzip.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_compression_none.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_all.c#4 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_ar.c#3 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_cpio.c#9 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_iso9660.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_mtree.c#1 branch .. //depot/projects/tty/lib/libarchive/archive_read_support_format_tar.c#14 integrate .. //depot/projects/tty/lib/libarchive/archive_read_support_format_zip.c#8 integrate .. //depot/projects/tty/lib/libarchive/archive_util.c#8 integrate .. //depot/projects/tty/lib/libarchive/archive_write_disk.c#6 integrate .. //depot/projects/tty/lib/libarchive/archive_write_open_filename.c#2 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_compression_bzip2.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_compression_gzip.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_compression_none.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_format_ar.c#3 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_format_cpio.c#7 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_format_cpio_newc.c#3 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_format_pax.c#11 integrate .. //depot/projects/tty/lib/libarchive/archive_write_set_format_ustar.c#8 integrate .. //depot/projects/tty/lib/libarchive/config_freebsd.h#3 integrate .. //depot/projects/tty/lib/libarchive/cpio.5#1 branch .. //depot/projects/tty/lib/libarchive/filter_fork.c#2 integrate .. //depot/projects/tty/lib/libarchive/libarchive-formats.5#11 integrate .. //depot/projects/tty/lib/libarchive/libarchive_internals.3#2 integrate .. //depot/projects/tty/lib/libarchive/test/Makefile#4 integrate .. //depot/projects/tty/lib/libarchive/test/README#3 integrate .. //depot/projects/tty/lib/libarchive/test/main.c#4 integrate .. //depot/projects/tty/lib/libarchive/test/read_open_memory.c#2 integrate .. //depot/projects/tty/lib/libarchive/test/test.h#4 integrate .. //depot/projects/tty/lib/libarchive/test/test_compat_gtar.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_compat_gtar_1.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_compat_tar_hardlink.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_compat_zip.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_compat_zip_1.zip.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_empty_write.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_entry_strmode.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_cpio_odc.c#2 integrate .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse.c#2 integrate .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_isorr_bz2.c#3 integrate .. //depot/projects/tty/lib/libarchive/test/test_read_format_mtree.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_read_format_tar.c#3 integrate .. //depot/projects/tty/lib/libarchive/test/test_read_format_zip.c#3 integrate .. //depot/projects/tty/lib/libarchive/test/test_read_pax_truncated.c#2 integrate .. //depot/projects/tty/lib/libarchive/test/test_tar_filenames.c#4 integrate .. //depot/projects/tty/lib/libarchive/test/test_tar_large.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_write_disk.c#5 integrate .. //depot/projects/tty/lib/libarchive/test/test_write_disk_hardlink.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_write_disk_perms.c#4 integrate .. //depot/projects/tty/lib/libarchive/test/test_write_format_cpio.c#3 integrate .. //depot/projects/tty/lib/libarchive/test/test_write_format_cpio_newc.c#1 branch .. //depot/projects/tty/lib/libarchive/test/test_write_format_cpio_odc.c#1 branch .. //depot/projects/tty/lib/libc/Versions.def#3 integrate .. //depot/projects/tty/lib/libc/amd64/Symbol.map#4 integrate .. //depot/projects/tty/lib/libc/amd64/_fpmath.h#5 integrate .. //depot/projects/tty/lib/libc/amd64/gd_qnan.h#2 integrate .. //depot/projects/tty/lib/libc/arm/gd_qnan.h#2 integrate .. //depot/projects/tty/lib/libc/db/test/btree.tests/main.c#3 integrate .. //depot/projects/tty/lib/libc/db/test/dbtest.c#3 integrate .. //depot/projects/tty/lib/libc/gdtoa/Symbol.map#4 integrate .. //depot/projects/tty/lib/libc/gen/Makefile.inc#19 integrate .. //depot/projects/tty/lib/libc/gen/Symbol.map#6 integrate .. //depot/projects/tty/lib/libc/gen/feature_present.3#1 branch .. //depot/projects/tty/lib/libc/gen/feature_present.c#1 branch .. //depot/projects/tty/lib/libc/gen/fts-compat.c#2 integrate .. //depot/projects/tty/lib/libc/gen/fts-compat.h#2 integrate .. //depot/projects/tty/lib/libc/gen/fts.3#7 integrate .. //depot/projects/tty/lib/libc/gen/fts.c#5 integrate .. //depot/projects/tty/lib/libc/gen/getgrent.c#7 integrate .. //depot/projects/tty/lib/libc/gen/getgrouplist.c#5 integrate .. //depot/projects/tty/lib/libc/gen/getttyent.c#5 integrate .. //depot/projects/tty/lib/libc/gen/posixshm.c#2 delete .. //depot/projects/tty/lib/libc/gen/sem_open.3#3 integrate .. //depot/projects/tty/lib/libc/gen/shm_open.3#4 delete .. //depot/projects/tty/lib/libc/i386/Symbol.map#5 integrate .. //depot/projects/tty/lib/libc/i386/_fpmath.h#5 integrate .. //depot/projects/tty/lib/libc/i386/gd_qnan.h#2 integrate .. //depot/projects/tty/lib/libc/ia64/Symbol.map#5 integrate .. //depot/projects/tty/lib/libc/ia64/_fpmath.h#6 integrate .. //depot/projects/tty/lib/libc/ia64/gd_qnan.h#2 integrate .. //depot/projects/tty/lib/libc/include/namespace.h#6 integrate .. //depot/projects/tty/lib/libc/include/un-namespace.h#6 integrate .. //depot/projects/tty/lib/libc/inet/inet_network.c#4 integrate .. //depot/projects/tty/lib/libc/locale/Makefile.inc#11 integrate .. //depot/projects/tty/lib/libc/locale/ascii.c#1 branch .. //depot/projects/tty/lib/libc/locale/localeconv.c#3 integrate .. //depot/projects/tty/lib/libc/locale/mblocal.h#6 integrate .. //depot/projects/tty/lib/libc/locale/setrunelocale.c#11 integrate .. //depot/projects/tty/lib/libc/net/getaddrinfo.c#18 integrate .. //depot/projects/tty/lib/libc/net/nsdispatch.c#7 integrate .. //depot/projects/tty/lib/libc/regex/grot/main.c#2 integrate .. //depot/projects/tty/lib/libc/resolv/res_comp.c#4 integrate .. //depot/projects/tty/lib/libc/sparc64/Symbol.map#4 integrate .. //depot/projects/tty/lib/libc/sparc64/_fpmath.h#5 integrate .. //depot/projects/tty/lib/libc/sparc64/gd_qnan.h#2 integrate .. //depot/projects/tty/lib/libc/stdio/Symbol.map#3 integrate .. //depot/projects/tty/lib/libc/stdio/vfwprintf.c#11 integrate .. //depot/projects/tty/lib/libc/stdlib/grantpt.c#6 integrate .. //depot/projects/tty/lib/libc/stdlib/heapsort.c#3 integrate .. //depot/projects/tty/lib/libc/stdlib/malloc.3#11 integrate .. //depot/projects/tty/lib/libc/stdlib/malloc.c#21 integrate .. //depot/projects/tty/lib/libc/stdlib/qsort.c#3 integrate .. //depot/projects/tty/lib/libc/stdlib/rand.c#5 integrate .. //depot/projects/tty/lib/libc/stdlib/strtod.3#6 integrate .. //depot/projects/tty/lib/libc/stdtime/localtime.c#5 integrate .. //depot/projects/tty/lib/libc/string/strtok.3#3 integrate .. //depot/projects/tty/lib/libc/string/strtok.c#2 integrate .. //depot/projects/tty/lib/libc/string/wcstok.c#3 integrate .. //depot/projects/tty/lib/libc/sys/Makefile.inc#15 integrate .. //depot/projects/tty/lib/libc/sys/access.2#4 integrate .. //depot/projects/tty/lib/libc/sys/extattr_get_file.2#8 integrate .. //depot/projects/tty/lib/libc/sys/flock.2#6 integrate .. //depot/projects/tty/lib/libc/sys/mq_close.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_getattr.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_notify.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_open.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_receive.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_send.2#4 integrate .. //depot/projects/tty/lib/libc/sys/mq_setattr.2#4 integrate .. //depot/projects/tty/lib/libc/sys/readlink.2#3 integrate .. //depot/projects/tty/lib/libc/sys/select.2#7 integrate .. //depot/projects/tty/lib/libc/sys/sendfile.2#11 integrate .. //depot/projects/tty/lib/libc/sys/shm_open.2#1 branch .. //depot/projects/tty/lib/libdevstat/devstat.h#4 integrate .. //depot/projects/tty/lib/libdisk/disk.c#10 integrate .. //depot/projects/tty/lib/libelf/gelf_fsize.3#2 integrate .. //depot/projects/tty/lib/libfetch/Makefile#13 integrate .. //depot/projects/tty/lib/libfetch/common.c#7 integrate .. //depot/projects/tty/lib/libfetch/common.h#4 integrate .. //depot/projects/tty/lib/libfetch/fetch.3#12 integrate .. //depot/projects/tty/lib/libfetch/fetch.c#4 integrate .. //depot/projects/tty/lib/libfetch/file.c#4 integrate .. //depot/projects/tty/lib/libfetch/ftp.c#11 integrate .. //depot/projects/tty/lib/libfetch/http.c#11 integrate .. //depot/projects/tty/lib/libkse/Makefile#2 integrate .. //depot/projects/tty/lib/libkse/kse.map#2 integrate .. //depot/projects/tty/lib/libkse/sys/lock.c#2 integrate .. //depot/projects/tty/lib/libkse/sys/thr_error.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_accept.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_aio_suspend.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_atfork.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_destroy.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_get_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getdetachstate.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getguardsize.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getinheritsched.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getschedparam.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getschedpolicy.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getscope.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getstack.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getstackaddr.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_getstacksize.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_init.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setcreatesuspend_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setdetachstate.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setguardsize.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setinheritsched.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setschedparam.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setschedpolicy.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setscope.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setstack.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setstackaddr.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_attr_setstacksize.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_barrier.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_barrierattr.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_cancel.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_clean.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_close.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_concurrency.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_cond.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_condattr_destroy.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_condattr_init.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_connect.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_creat.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_create.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_detach.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_equal.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_execve.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_exit.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_fcntl.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_fork.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_fsync.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_getprio.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_getschedparam.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_info.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_init.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_join.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_kill.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_main_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mattr_init.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mattr_kind_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_msync.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_multi_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mutex.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mutex_prioceiling.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mutex_protocol.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_mutexattr_destroy.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_nanosleep.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_once.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_open.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_pause.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_poll.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_private.h#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_pselect.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_pspinlock.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_raise.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_read.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_readv.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_resume_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_rwlock.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_rwlockattr.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_select.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_self.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sem.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_setprio.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_setschedparam.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigaction.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigaltstack.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigmask.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigpending.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigprocmask.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigsuspend.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sigwait.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_single_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_sleep.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_spec.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_spinlock.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_suspend_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_switch_np.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_symbols.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_system.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_tcdrain.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_vfork.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_wait.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_wait4.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_waitpid.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_write.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_writev.c#2 integrate .. //depot/projects/tty/lib/libkse/thread/thr_yield.c#2 integrate .. //depot/projects/tty/lib/libkvm/kvm.c#10 integrate .. //depot/projects/tty/lib/libkvm/kvm_file.c#4 integrate .. //depot/projects/tty/lib/libmagic/config.h#5 integrate .. //depot/projects/tty/lib/libmilter/Makefile#7 integrate .. //depot/projects/tty/lib/libpam/libpam/Makefile#11 integrate .. //depot/projects/tty/lib/libpam/modules/pam_krb5/pam_krb5.c#8 integrate .. //depot/projects/tty/lib/libpam/modules/pam_ssh/pam_ssh.c#7 integrate .. //depot/projects/tty/lib/libpam/modules/pam_unix/pam_unix.c#9 integrate .. //depot/projects/tty/lib/libpmc/pmc.3#9 integrate .. //depot/projects/tty/lib/librpcsvc/Makefile#5 integrate .. //depot/projects/tty/lib/librpcsvc/xcrypt.c#3 integrate .. //depot/projects/tty/lib/libstand/bzipfs.c#4 integrate .. //depot/projects/tty/lib/libstand/gzipfs.c#3 integrate .. //depot/projects/tty/lib/libthr/Makefile#19 integrate .. //depot/projects/tty/lib/libthr/arch/amd64/Makefile.inc#3 integrate .. //depot/projects/tty/lib/libthr/arch/arm/Makefile.inc#2 integrate .. //depot/projects/tty/lib/libthr/arch/arm/include/pthread_md.h#4 integrate .. //depot/projects/tty/lib/libthr/arch/i386/Makefile.inc#3 integrate .. //depot/projects/tty/lib/libthr/arch/ia64/Makefile.inc#3 integrate .. //depot/projects/tty/lib/libthr/arch/powerpc/Makefile.inc#3 integrate .. //depot/projects/tty/lib/libthr/arch/sparc64/Makefile.inc#3 integrate .. //depot/projects/tty/lib/libthr/arch/sparc64/include/pthread_md.h#3 integrate .. //depot/projects/tty/lib/libthr/pthread.map#10 integrate .. //depot/projects/tty/lib/libthr/thread/thr_exit.c#11 integrate .. //depot/projects/tty/lib/libthr/thread/thr_mutex.c#17 integrate .. //depot/projects/tty/lib/libthr/thread/thr_private.h#18 integrate .. //depot/projects/tty/lib/libthr/thread/thr_sem.c#9 integrate .. //depot/projects/tty/lib/libthr/thread/thr_syscalls.c#11 integrate .. //depot/projects/tty/lib/libufs/Makefile#7 integrate .. //depot/projects/tty/lib/libufs/block.c#7 integrate .. //depot/projects/tty/lib/libufs/bread.3#4 integrate .. //depot/projects/tty/lib/libufs/libufs.h#5 integrate .. //depot/projects/tty/lib/libutil/pty.3#4 integrate .. //depot/projects/tty/lib/libutil/pty.c#7 integrate .. //depot/projects/tty/lib/msun/Makefile#13 integrate .. //depot/projects/tty/lib/msun/Symbol.map#4 integrate .. //depot/projects/tty/lib/msun/amd64/Makefile.inc#3 integrate .. //depot/projects/tty/lib/msun/amd64/e_remainder.S#1 branch .. //depot/projects/tty/lib/msun/amd64/e_remainderf.S#1 branch .. //depot/projects/tty/lib/msun/amd64/s_llrintl.S#1 branch .. //depot/projects/tty/lib/msun/amd64/s_logbl.S#1 branch .. //depot/projects/tty/lib/msun/amd64/s_lrintl.S#1 branch .. //depot/projects/tty/lib/msun/amd64/s_rintl.S#1 branch .. //depot/projects/tty/lib/msun/i387/Makefile.inc#4 integrate >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Feb 22 02:37:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4413616A481; Fri, 22 Feb 2008 02:37:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC4E416A4A1 for ; Fri, 22 Feb 2008 02:37:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BACB013C4CC for ; Fri, 22 Feb 2008 02:37:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M2bLtb026616 for ; Fri, 22 Feb 2008 02:37:21 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M2bL1j026613 for perforce@freebsd.org; Fri, 22 Feb 2008 02:37:21 GMT (envelope-from marcel@freebsd.org) Date: Fri, 22 Feb 2008 02:37:21 GMT Message-Id: <200802220237.m1M2bL1j026613@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135935 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 02:37:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=135935 Change 135935 by marcel@marcel_jnpr on 2008/02/22 02:36:54 Unify In this case the difference between Book E and AIM is just the name of the DAR/DEAR and DSISR/ESR registers. One can argue that this can be eliminated by using structure fields that match neither, but imply either. Euh... right... However, it's valuable to keep the fields the same as the register names, so in this case a simple union is enough to eliminate the #ifdefs. Affected files ... .. //depot/projects/e500/sys/powerpc/aim/machdep.c#8 edit .. //depot/projects/e500/sys/powerpc/aim/trap.c#7 edit .. //depot/projects/e500/sys/powerpc/aim/trap_subr.S#4 edit .. //depot/projects/e500/sys/powerpc/booke/interrupt.c#4 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#10 edit .. //depot/projects/e500/sys/powerpc/booke/trap.c#4 edit .. //depot/projects/e500/sys/powerpc/booke/trap_subr.S#4 edit .. //depot/projects/e500/sys/powerpc/include/frame.h#3 edit .. //depot/projects/e500/sys/powerpc/powerpc/db_trace.c#4 edit .. //depot/projects/e500/sys/powerpc/powerpc/genassym.c#4 edit Differences ... ==== //depot/projects/e500/sys/powerpc/aim/machdep.c#8 (text+ko) ==== @@ -519,13 +519,13 @@ */ sf.sf_si = ksi->ksi_info; sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ? - tf->dar : tf->srr0); + sf.sf_si.si_addr = (void *)((tf->exc == EXC_DSI) ? + tf->cpu.aim.dar : tf->srr0); } else { /* Old FreeBSD-style arguments. */ tf->fixreg[FIRSTARG+1] = code; tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->dar : tf->srr0; + tf->cpu.aim.dar : tf->srr0; } mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); ==== //depot/projects/e500/sys/powerpc/aim/trap.c#7 (text+ko) ==== @@ -292,7 +292,7 @@ trapname(vector)); switch (vector) { case EXC_DSI: - printf(" virtual address = 0x%x\n", frame->dar); + printf(" virtual address = 0x%x\n", frame->cpu.aim.dar); break; case EXC_ISI: printf(" virtual address = 0x%x\n", frame->srr0); @@ -510,8 +510,8 @@ eva = frame->srr0; ftype = VM_PROT_READ | VM_PROT_EXECUTE; } else { - eva = frame->dar; - if (frame->dsisr & DSISR_STORE) + eva = frame->cpu.aim.dar; + if (frame->cpu.aim.dsisr & DSISR_STORE) ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; @@ -643,12 +643,12 @@ int indicator, reg; double *fpr; - indicator = EXC_ALI_OPCODE_INDICATOR(frame->dsisr); + indicator = EXC_ALI_OPCODE_INDICATOR(frame->cpu.aim.dsisr); switch (indicator) { case EXC_ALI_LFD: case EXC_ALI_STFD: - reg = EXC_ALI_RST(frame->dsisr); + reg = EXC_ALI_RST(frame->cpu.aim.dsisr); fpr = &td->td_pcb->pcb_fpu.fpr[reg]; fputhread = PCPU_GET(fputhread); @@ -664,12 +664,12 @@ save_fpu(td); if (indicator == EXC_ALI_LFD) { - if (copyin((void *)frame->dar, fpr, + if (copyin((void *)frame->cpu.aim.dar, fpr, sizeof(double)) != 0) return -1; enable_fpu(td); } else { - if (copyout(fpr, (void *)frame->dar, + if (copyout(fpr, (void *)frame->cpu.aim.dar, sizeof(double)) != 0) return -1; } ==== //depot/projects/e500/sys/powerpc/aim/trap_subr.S#4 (text+ko) ==== @@ -151,8 +151,8 @@ stw %r3, FRAME_XER+8(1); /* save xer/ctr/exc */ \ stw %r4, FRAME_CTR+8(1); \ stw %r5, FRAME_EXC+8(1); \ - stw %r28,FRAME_DAR+8(1); \ - stw %r29,FRAME_DSISR+8(1); /* save dsisr/srr0/srr1 */ \ + stw %r28,FRAME_AIM_DAR+8(1); \ + stw %r29,FRAME_AIM_DSISR+8(1); /* save dsisr/srr0/srr1 */ \ stw %r30,FRAME_SRR0+8(1); \ stw %r31,FRAME_SRR1+8(1) ==== //depot/projects/e500/sys/powerpc/booke/interrupt.c#4 (text+ko) ==== @@ -82,8 +82,8 @@ printf(" exc = 0x%x\n", frame->exc); printf(" srr0 = 0x%08x\n", frame->srr0); printf(" srr1 = 0x%08x\n", frame->srr1); - printf(" dear = 0x%08x\n", frame->dear); - printf(" esr = 0x%08x\n", frame->esr); + printf(" dear = 0x%08x\n", frame->cpu.booke.dear); + printf(" esr = 0x%08x\n", frame->cpu.booke.esr); printf(" lr = 0x%08x\n", frame->lr); printf(" cr = 0x%08x\n", frame->cr); printf(" sp = 0x%08x\n", frame->fixreg[1]); ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#10 (text+ko) ==== @@ -871,12 +871,12 @@ sf.sf_si = ksi->ksi_info; sf.sf_si.si_signo = sig; sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ? - tf->dear : tf->srr0); + tf->cpu.booke.dear : tf->srr0); } else { /* Old FreeBSD-style arguments. */ tf->fixreg[FIRSTARG+1] = code; tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->dear : tf->srr0; + tf->cpu.booke.dear : tf->srr0; } mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); ==== //depot/projects/e500/sys/powerpc/booke/trap.c#4 (text+ko) ==== @@ -222,7 +222,7 @@ break; #ifdef KDB case EXC_PGM: - if (frame->esr & ESR_PTR) + if (frame->cpu.booke.esr & ESR_PTR) kdb_trap(EXC_PGM, 0, frame); return; #endif @@ -274,7 +274,7 @@ switch (vector) { case EXC_DTMISS: case EXC_DSI: - va = frame->dear; + va = frame->cpu.booke.dear; break; case EXC_ITMISS: @@ -499,8 +499,8 @@ ftype = VM_PROT_READ | VM_PROT_EXECUTE; } else { - eva = frame->dear; - if (frame->esr & ESR_ST) + eva = frame->cpu.booke.dear; + if (frame->cpu.booke.esr & ESR_ST) ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; ==== //depot/projects/e500/sys/powerpc/booke/trap_subr.S#4 (text+ko) ==== @@ -198,8 +198,8 @@ /* save DEAR, ESR */ \ lwz %r28, (savearea+CPUSAVE_DEAR)(%r2); \ lwz %r29, (savearea+CPUSAVE_ESR)(%r2); \ - stw %r28, FRAME_DEAR+8(1); \ - stw %r29, FRAME_ESR+8(1); \ + stw %r28, FRAME_BOOKE_DEAR+8(1); \ + stw %r29, FRAME_BOOKE_ESR+8(1); \ /* save XER, CTR, exc number */ \ mfxer %r3; \ mfctr %r4; \ ==== //depot/projects/e500/sys/powerpc/include/frame.h#3 (text+ko) ==== @@ -50,20 +50,25 @@ struct trapframe { register_t fixreg[32]; register_t lr; - int cr; - int xer; + int cr; + int xer; register_t ctr; register_t srr0; register_t srr1; -#if defined(AIM) - register_t dar; /* dar & dsisr are only filled on a DSI trap */ - int dsisr; -#elif defined(E500) - register_t dear; - register_t esr; -#endif - int exc; + int exc; + union { + struct { + /* dar & dsisr are only filled on a DSI trap */ + register_t dar; + int dsisr; + } aim; + struct { + register_t dear; + register_t esr; + } booke; + } cpu; }; + /* * This is to ensure alignment of the stackpointer */ ==== //depot/projects/e500/sys/powerpc/powerpc/db_trace.c#4 (text+ko) ==== @@ -92,12 +92,13 @@ { "ctr", DB_OFFSET(ctr), db_frame }, { "cr", DB_OFFSET(cr), db_frame }, { "xer", DB_OFFSET(xer), db_frame }, +#ifdef AIM + { "dar", DB_OFFSET(cpu.aim.dar), db_frame }, + { "dsisr", DB_OFFSET(cpu.aim.dsisr), db_frame }, +#endif #ifdef E500 - { "dear", DB_OFFSET(dear), db_frame }, - { "esr", DB_OFFSET(esr), db_frame }, -#else - { "dar", DB_OFFSET(dar), db_frame }, - { "dsisr", DB_OFFSET(dsisr), db_frame }, + { "dear", DB_OFFSET(cpu.booke.dear), db_frame }, + { "esr", DB_OFFSET(cpu.booke.esr), db_frame }, #endif }; struct db_variable *db_eregs = db_regs + sizeof (db_regs)/sizeof (db_regs[0]); @@ -199,24 +200,15 @@ db_printf("%s ", tf->srr1 & PSL_PR ? "user" : "kernel"); switch (tf->exc) { case EXC_DSI: -#ifdef E500 + /* XXX take advantage of the union. */ db_printf("DSI %s trap @ %#x by ", - tf->esr & DSISR_STORE ? "write" : "read", - tf->dear); -#else - db_printf("DSI %s trap @ %#x by ", - tf->dsisr & DSISR_STORE ? "write" : "read", - tf->dar); -#endif + (tf->cpu.aim.dsisr & DSISR_STORE) ? "write" + : "read", tf->cpu.aim.dar); goto print_trap; case EXC_ALI: -#ifdef E500 - db_printf("ALI trap @ %#x (ESR %#x) ", - tf->dear, tf->esr); -#else - db_printf("ALI trap @ %#x (DSISR %#x) ", - tf->dar, tf->dsisr); -#endif + /* XXX take advantage of the union. */ + db_printf("ALI trap @ %#x (xSR %#x) ", + tf->cpu.aim.dar, tf->cpu.aim.dsisr); goto print_trap; case EXC_ISI: trapstr = "ISI"; break; case EXC_PGM: trapstr = "PGM"; break; @@ -257,13 +249,8 @@ } db_printf("%-10s r1=%#x cr=%#x xer=%#x ctr=%#x", "", tf->fixreg[1], tf->cr, tf->xer, tf->ctr); -#ifdef E500 if (tf->exc == EXC_DSI) - db_printf(" esr=%#x", tf->esr); -#else - if (tf->exc == EXC_DSI) - db_printf(" dsisr=%#x", tf->dsisr); -#endif + db_printf(" sr=%#x", tf->cpu.aim.dsisr); db_printf("\n"); stackframe = (db_addr_t) tf->fixreg[1]; if (kernel_only && (tf->srr1 & PSL_PR)) ==== //depot/projects/e500/sys/powerpc/powerpc/genassym.c#4 (text+ko) ==== @@ -160,14 +160,11 @@ ASSYM(FRAME_XER, offsetof(struct trapframe, xer)); ASSYM(FRAME_SRR0, offsetof(struct trapframe, srr0)); ASSYM(FRAME_SRR1, offsetof(struct trapframe, srr1)); -#if defined(AIM) -ASSYM(FRAME_DAR, offsetof(struct trapframe, dar)); -ASSYM(FRAME_DSISR, offsetof(struct trapframe, dsisr)); -#elif defined(E500) -ASSYM(FRAME_DEAR, offsetof(struct trapframe, dear)); -ASSYM(FRAME_ESR, offsetof(struct trapframe, esr)); -#endif ASSYM(FRAME_EXC, offsetof(struct trapframe, exc)); +ASSYM(FRAME_AIM_DAR, offsetof(struct trapframe, cpu.aim.dar)); +ASSYM(FRAME_AIM_DSISR, offsetof(struct trapframe, cpu.aim.dsisr)); +ASSYM(FRAME_BOOKE_DEAR, offsetof(struct trapframe, cpu.booke.dear)); +ASSYM(FRAME_BOOKE_ESR, offsetof(struct trapframe, cpu.booke.esr)); ASSYM(CF_FUNC, offsetof(struct callframe, cf_func)); ASSYM(CF_ARG0, offsetof(struct callframe, cf_arg0)); From owner-p4-projects@FreeBSD.ORG Fri Feb 22 04:22:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6758616A402; Fri, 22 Feb 2008 04:22:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 120A616A401 for ; Fri, 22 Feb 2008 04:22:16 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0387913C458 for ; Fri, 22 Feb 2008 04:22:16 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M4MFWQ035033 for ; Fri, 22 Feb 2008 04:22:15 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M4MFI5035030 for perforce@freebsd.org; Fri, 22 Feb 2008 04:22:15 GMT (envelope-from marcel@freebsd.org) Date: Fri, 22 Feb 2008 04:22:15 GMT Message-Id: <200802220422.m1M4MFI5035030@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135937 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 04:22:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135937 Change 135937 by marcel@marcel_xcllnt on 2008/02/22 04:21:47 Unify Fork the conflicting HID0_TBEN into HID0_AIM_TBEN and HID0_BOOKE_TBEN. Renbame the e500-specific defines to include _BOOKE. None of these were actually used. Affected files ... .. //depot/projects/e500/sys/powerpc/include/hid.h#4 edit Differences ... ==== //depot/projects/e500/sys/powerpc/include/hid.h#4 (text+ko) ==== @@ -70,17 +70,11 @@ #define HID0_BHT 0x00000004 /* Enable branch history table */ #define HID0_NOPTI 0x00000001 /* No-op the dcbt(st) */ -#if defined(AIM) +#define HID0_AIM_TBEN 0x04000000 /* Time base enable (7450) */ -#define HID0_TBEN 0x04000000 /* Time base enable (7450) */ - -#elif defined(E500) - -#define HID0_TBEN 0x00004000 /* Time Base and decrementer enable */ -#define HID0_SEL_TBCLK 0x00002000 /* Selecte Time Base clock */ -#define HID0_EN_MAS7_UPDATE 0x00000080 /* Enable MAS7 update (e500v2 only) */ - -#endif +#define HID0_BOOKE_TBEN 0x00004000 /* Time Base and decr. enable */ +#define HID0_BOOKE_SEL_TBCLK 0x00002000 /* Select Time Base clock */ +#define HID0_BOOKE_MAS7UPDEN 0x00000080 /* Enable MAS7 update (e500v2) */ #define HID0_BITMASK \ "\20" \ From owner-p4-projects@FreeBSD.ORG Fri Feb 22 05:00:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A460116A40E; Fri, 22 Feb 2008 05:00:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2132416A402; Fri, 22 Feb 2008 05:00:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id DA90A13C465; Fri, 22 Feb 2008 05:00:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1M50PHS008513; Thu, 21 Feb 2008 22:00:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 21 Feb 2008 22:00:46 -0700 (MST) Message-Id: <20080221.220046.-1272479238.imp@bsdimp.com> To: rrs@freebsd.org From: "M. Warner Losh" In-Reply-To: <200802212319.m1LNJAqj002982@repoman.freebsd.org> References: <200802212319.m1LNJAqj002982@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 135922 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:00:44 -0000 In message: <200802212319.m1LNJAqj002982@repoman.freebsd.org> "Randall R. Stewart" writes: : http://perforce.freebsd.org/chv.cgi?CH=135922 : : Change 135922 by rrs@rrs-mips2-jnpr on 2008/02/21 23:18:46 : : get rid of wierd hacks : : Affected files ... : : .. //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#4 edit : : Differences ... : : ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#4 (text+ko) ==== : : @@ -134,14 +134,6 @@ : intr = (cause & MIPS_INT_MASK) >> 8; : cause &= ~MIPS_INT_MASK; : mips_wr_cause(cause); : - : -#if 0 : - if (intr & CR_INT_CLOCK) { : - clockintr(intr, tf); : - intr &= ~CR_INT_CLOCK; : - } : -#endif : - : while ((i = fls(intr)) != 0) { : intr &= ~(1 << (i - 1)); : switch (i) { : @@ -162,11 +154,8 @@ : : if (!event || TAILQ_EMPTY(&event->ie_handlers)) : { : - if (i == 5) : - clockintr(intr, tf); : - else : - printf("stray %s interrupt %d\n", : - hard ? "hard" : "soft", i); : + printf("stray %s interrupt %d\n", : + hard ? "hard" : "soft", i); : continue; : } : I think this is why our clock isn't ever ticking... Warner From owner-p4-projects@FreeBSD.ORG Fri Feb 22 05:11:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1506C16A409; Fri, 22 Feb 2008 05:11:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B310516A406 for ; Fri, 22 Feb 2008 05:11:11 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9FDEE13C46B for ; Fri, 22 Feb 2008 05:11:11 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M5BBMg047279 for ; Fri, 22 Feb 2008 05:11:11 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M5BBj2047263 for perforce@freebsd.org; Fri, 22 Feb 2008 05:11:11 GMT (envelope-from imp@freebsd.org) Date: Fri, 22 Feb 2008 05:11:11 GMT Message-Id: <200802220511.m1M5BBj2047263@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135938 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:11:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=135938 Change 135938 by imp@imp_lighthouse on 2008/02/22 05:10:12 we want clock.c, not tick.c. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#14 (text+ko) ==== @@ -55,7 +55,7 @@ # Phase 4 # ---------------------------------------------------------------------- # -#mips/mips/clock.c standard +mips/mips/clock.c standard #mips/mips/queue.c standard # ---------------------------------------------------------------------- # Phase 5 @@ -81,7 +81,6 @@ mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard -mips/mips/tick.c standard mips/mips/uio_machdep.c standard geom/geom_bsd.c standard geom/geom_bsd_enc.c standard From owner-p4-projects@FreeBSD.ORG Fri Feb 22 05:15:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7038216A404; Fri, 22 Feb 2008 05:15:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D3E816A403 for ; Fri, 22 Feb 2008 05:15:16 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1061E13C46E for ; Fri, 22 Feb 2008 05:15:16 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M5FFbo048272 for ; Fri, 22 Feb 2008 05:15:15 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M5FFAZ048269 for perforce@freebsd.org; Fri, 22 Feb 2008 05:15:15 GMT (envelope-from imp@freebsd.org) Date: Fri, 22 Feb 2008 05:15:15 GMT Message-Id: <200802220515.m1M5FFAZ048269@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135939 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:15:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=135939 Change 135939 by imp@imp_lighthouse on 2008/02/22 05:14:54 Reconnect clock interrupt. Maybe this isn't quite right, but we need to fix the root cause... Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#5 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#5 (text+ko) ==== @@ -154,8 +154,11 @@ if (!event || TAILQ_EMPTY(&event->ie_handlers)) { - printf("stray %s interrupt %d\n", - hard ? "hard" : "soft", i); + if (i == 5) + clockintr(intr, tf); + else + printf("stray %s interrupt %d\n", + hard ? "hard" : "soft", i); continue; } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 05:31:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A208C16A407; Fri, 22 Feb 2008 05:31:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6680816A405 for ; Fri, 22 Feb 2008 05:31:34 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5955E13C447 for ; Fri, 22 Feb 2008 05:31:34 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M5VYt8048934 for ; Fri, 22 Feb 2008 05:31:34 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M5VYfa048931 for perforce@freebsd.org; Fri, 22 Feb 2008 05:31:34 GMT (envelope-from marcel@freebsd.org) Date: Fri, 22 Feb 2008 05:31:34 GMT Message-Id: <200802220531.m1M5VYfa048931@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 135941 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:31:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=135941 Change 135941 by marcel@marcel_xcllnt on 2008/02/22 05:31:11 Unify Simply stop using an inline function and instead put the prototype in the header. The implementation has been moved to machdep.c. Affected files ... .. //depot/projects/e500/sys/powerpc/aim/machdep.c#9 edit .. //depot/projects/e500/sys/powerpc/booke/machdep.c#11 edit .. //depot/projects/e500/sys/powerpc/include/kdb.h#4 edit Differences ... ==== //depot/projects/e500/sys/powerpc/aim/machdep.c#9 (text+ko) ==== @@ -107,6 +107,7 @@ #include #include #include +#include #include #include #include @@ -897,6 +898,20 @@ return (0); } +void +kdb_cpu_clear_singlestep(void) +{ + + kdb_frame->srr1 &= ~PSL_SE; +} + +void +kdb_cpu_set_singlestep(void) +{ + + kdb_frame->srr1 |= PSL_SE; +} + /* * Initialise a struct pcpu. */ ==== //depot/projects/e500/sys/powerpc/booke/machdep.c#11 (text+ko) ==== @@ -119,6 +119,7 @@ #include #include +#include #include #include #include @@ -785,6 +786,26 @@ } void +kdb_cpu_clear_singlestep(void) +{ + register_t r; + + r = mfspr(SPR_DBCR0); + mtspr(SPR_DBCR0, r & ~DBCR0_IC); + kdb_frame->srr1 &= ~PSL_DE; +} + +void +kdb_cpu_set_singlestep(void) +{ + register_t r; + + r = mfspr(SPR_DBCR0); + mtspr(SPR_DBCR0, r | DBCR0_IC | DBCR0_IDM); + kdb_frame->srr1 |= PSL_DE; +} + +void sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { struct trapframe *tf; ==== //depot/projects/e500/sys/powerpc/include/kdb.h#4 (text+ko) ==== @@ -35,43 +35,13 @@ #include #include -static __inline void -kdb_cpu_clear_singlestep(void) -{ -#ifdef E500 - u_int value; - - value = mfspr(SPR_DBCR0); +void kdb_cpu_clear_singlestep(void); +void kdb_cpu_set_singlestep(void); - value &= ~DBCR0_IC; - mtspr(SPR_DBCR0, value); - kdb_frame->srr1 &= ~PSL_DE; -#else - kdb_frame->srr1 &= ~PSL_SE; -#endif -} - static __inline void -kdb_cpu_set_singlestep(void) +kdb_cpu_sync_icache(unsigned char *addr, size_t size) { -#ifdef E500 - u_int value; - u_int msr_value; - - value = mfspr(SPR_DBCR0); - value = value | DBCR0_IC | DBCR0_IDM; - mtspr(SPR_DBCR0, value); - - msr_value = mfmsr(); - kdb_frame->srr1 |= PSL_DE; -#else - kdb_frame->srr1 |= PSL_SE; -#endif -} -static __inline void -kdb_cpu_sync_icache(unsigned char *addr, size_t size) -{ __syncicache(addr, size); } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 05:55:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2A62716A406; Fri, 22 Feb 2008 05:55:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CADEA16A403 for ; Fri, 22 Feb 2008 05:55:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mx1.freebsd.org (Postfix) with ESMTP id A20F313C469 for ; Fri, 22 Feb 2008 05:55:02 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: by wf-out-1314.google.com with SMTP id 25so174907wfa.7 for ; Thu, 21 Feb 2008 21:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=JG8COn2kSQV1oMXfpW+T+pEH844VZYzUmlOexZWQp/g=; b=KL1pOfNDNkHj49XqKf+kXwD2xe+CiBwYUS5zeFQNo9bu28flndduc2xhG8brFxvxQ0omArgJRzTUijJntQvfEpsYkOZK0iHEihx3Axntc6IACa+jqvyF++fqFzwFAH01JSHWsUBM7WjpwTFFQiNteAWhSiM9cBQz39YtCG5ZBMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=ZL4z7k1EXasLxHohgK608eQtWxOrFzPwxSd+cOKKvq5i7I5J2/ed03pvfFO4F2x05Jg7lOaYO14Coyd+i83vVNXDVHSK/mPyHY9qcL9nH4gEjcpm61Wc+ETqzPLl4BGoVr5CLgU3wQgY0fFLHsBL70lrOHXzWfjTLAn3RsGXWoc= Received: by 10.142.154.20 with SMTP id b20mr2511631wfe.166.1203658019137; Thu, 21 Feb 2008 21:26:59 -0800 (PST) Received: from ?10.2.0.49? ( [67.96.45.122]) by mx.google.com with ESMTPS id 27sm1453151wff.8.2008.02.21.21.26.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Feb 2008 21:26:57 -0800 (PST) Message-Id: From: Garrett Cooper To: Warner Losh In-Reply-To: <200802220515.m1M5FFAZ048269@repoman.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Thu, 21 Feb 2008 21:28:08 -0800 References: <200802220515.m1M5FFAZ048269@repoman.freebsd.org> X-Mailer: Apple Mail (2.919.2) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 135939 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 05:55:03 -0000 On Feb 21, 2008, at 9:15 PM, Warner Losh wrote: > http://perforce.freebsd.org/chv.cgi?CH=135939 > > Change 135939 by imp@imp_lighthouse on 2008/02/22 05:14:54 > > Reconnect clock interrupt. Maybe this isn't quite right, but > we need to fix the root cause... > > Affected files ... > > .. //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#5 edit > > Differences ... > > ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#5 > (text+ko) ==== > > @@ -154,8 +154,11 @@ > > if (!event || TAILQ_EMPTY(&event->ie_handlers)) > { > - printf("stray %s interrupt %d\n", > - hard ? "hard" : "soft", i); > + if (i == 5) > + clockintr(intr, tf); > + else > + printf("stray %s interrupt %d\n", > + hard ? "hard" : "soft", i); > continue; > } MIPS clock not ticking...? -Garrett From owner-p4-projects@FreeBSD.ORG Fri Feb 22 08:22:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 357A316A404; Fri, 22 Feb 2008 08:22:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC8A916A400 for ; Fri, 22 Feb 2008 08:22:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0C2413C45E for ; Fri, 22 Feb 2008 08:22:48 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M8MmAo061887 for ; Fri, 22 Feb 2008 08:22:48 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M8Mmsm061884 for perforce@freebsd.org; Fri, 22 Feb 2008 08:22:48 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 08:22:48 GMT Message-Id: <200802220822.m1M8Mmsm061884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135946 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 08:22:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=135946 Change 135946 by kmacy@pandemonium:kmacy:xen31 on 2008/02/22 08:22:28 remove unneeded devices Affected files ... .. //depot/projects/xen31/sys/i386/conf/XEN#5 edit Differences ... ==== //depot/projects/xen31/sys/i386/conf/XEN#5 (text+ko) ==== @@ -79,35 +79,8 @@ #device cpufreq # native only # Bus support. -device eisa device pci -# Floppy drives -device fdc - -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering - -# SCSI Controllers -device ahc # AHA2940 and onboard AIC7xxx devices -options AHC_REG_PRETTY_PRINT # Print register bitfields in debug - # output. Adds ~128k to driver. -device ahd # AHA39320/29320 and onboard AIC79xx devices -options AHD_REG_PRETTY_PRINT # Print register bitfields in debug - # output. Adds ~215k to driver. -device hptiop # Highpoint RocketRaid 3xxx series -device isp # Qlogic family -#device ispfw # Firmware for QLogic HBAs- normally a module -device mpt # LSI-Logic MPT-Fusion -#device ncr # NCR/Symbios Logic - - # SCSI peripherals device scbus # SCSI bus (required for SCSI) device ch # SCSI media changers @@ -121,11 +94,8 @@ device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse - device kbdmux # keyboard multiplexer - #device vga # VGA video card driver - device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console @@ -137,23 +107,9 @@ # Add suspend/resume support for the i8254. #device pmtimer # native -# PCCARD (PCMCIA) support -# PCMCIA and cardbus bridge support -device cbb # cardbus (yenta) bridge -device pccard # PC Card (16-bit) bus -device cardbus # CardBus (32-bit) bus - # Serial (COM) ports device uart # Generic UART driver -# Parallel port -device ppc -device ppbus # Parallel port bus (required) -device lpt # Printer -device plip # TCP/IP over parallel -device ppi # Parallel port interface device -#device vpo # Requires scbus and da - # If you've got a "dumb" serial or parallel PCI card that is # supported by the puc(4) glue driver, uncomment the following # line to enable it (connects to sio, uart and/or ppc drivers): @@ -165,9 +121,6 @@ # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support -device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet -device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet # Pseudo devices. device loop # Network loopback @@ -192,3 +145,12 @@ nooption NATIVE nodevice atpic options MCLSHIFT=12 + +nodevice isa +nooption ISAPNP + +options KTR +options KTR_COMPILE=(KTR_VM|KTR_PMAP|KTR_TRAP) +options KTR_CPUMASK=0xff +options KTR_ENTRIES=8192 +options KTR_MASK=(KTR_VM|KTR_PMAP|KTR_TRAP) From owner-p4-projects@FreeBSD.ORG Fri Feb 22 08:23:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EDFE16A408; Fri, 22 Feb 2008 08:23:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2431B16A406 for ; Fri, 22 Feb 2008 08:23:50 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F422E13C46E for ; Fri, 22 Feb 2008 08:23:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1M8Nnge061984 for ; Fri, 22 Feb 2008 08:23:49 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1M8NnWL061981 for perforce@freebsd.org; Fri, 22 Feb 2008 08:23:49 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 08:23:49 GMT Message-Id: <200802220823.m1M8NnWL061981@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135947 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 08:23:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=135947 Change 135947 by kmacy@pandemonium:kmacy:xen31 on 2008/02/22 08:23:00 don't use wrpt for sf->kva Affected files ... .. //depot/projects/xen31/sys/i386/i386/vm_machdep.c#7 edit Differences ... ==== //depot/projects/xen31/sys/i386/i386/vm_machdep.c#7 (text+ko) ==== @@ -779,7 +779,7 @@ ptep = vtopte(sf->kva); opte = *ptep; #ifdef XEN - *ptep = xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag | PG_RW | PG_V; + PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag | PG_RW | PG_V); #else *ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V; #endif From owner-p4-projects@FreeBSD.ORG Fri Feb 22 12:34:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35C0516A408; Fri, 22 Feb 2008 12:34:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA1016A400 for ; Fri, 22 Feb 2008 12:34:18 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B2FF813C455 for ; Fri, 22 Feb 2008 12:34:18 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MCYIj8092853 for ; Fri, 22 Feb 2008 12:34:18 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MCYIAr092850 for perforce@freebsd.org; Fri, 22 Feb 2008 12:34:18 GMT (envelope-from raj@freebsd.org) Date: Fri, 22 Feb 2008 12:34:18 GMT Message-Id: <200802221234.m1MCYIAr092850@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 135954 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 12:34:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=135954 Change 135954 by raj@raj_mimi on 2008/02/22 12:33:37 Update licensing info on the U-Boot API header. Minor style fixes. Affected files ... .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#9 edit .. //depot/projects/e500/sys/boot/uboot/lib/api_public.h#5 edit Differences ... ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#9 (text+ko) ==== @@ -31,8 +31,8 @@ /* * Entry point to the loader that U-Boot passes control to. */ - .text - .globl _start + .text + .globl _start _start: /* Hint where to look for the API signature */ lis %r11, uboot_address@ha ==== //depot/projects/e500/sys/boot/uboot/lib/api_public.h#5 (text+ko) ==== @@ -1,6 +1,55 @@ -/* $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.1 2008/02/16 22:13:11 marcel Exp $ */ - /* + * (C) Copyright 2007-2008 Semihalf + * + * Written by: Rafal Jaworowski + * + * This file is dual licensed; you can use it under the terms of + * either the GPL, or the BSD license, at your option. + * + * I. GPL: + * + * This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * Alternatively, + * + * II. BSD license: + * + * 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: src/sys/boot/uboot/lib/api_public.h,v 1.1 2008/02/16 22:13:11 marcel Exp $ + * * This file needs to be kept in sync with U-Boot reference: * http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/api_public.h */ From owner-p4-projects@FreeBSD.ORG Fri Feb 22 12:46:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 07F4F16A477; Fri, 22 Feb 2008 12:46:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE80B16A405; Fri, 22 Feb 2008 12:46:05 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by mx1.freebsd.org (Postfix) with ESMTP id 7A78513C45A; Fri, 22 Feb 2008 12:46:05 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (unknown [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id DB47814331; Fri, 22 Feb 2008 13:54:47 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32682-05; Fri, 22 Feb 2008 13:54:46 +0100 (CET) Message-ID: <47BEC409.8020406@semihalf.com> Date: Fri, 22 Feb 2008 13:46:01 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Marcel Moolenaar References: <200802220422.m1M4MFI5035030@repoman.freebsd.org> In-Reply-To: <200802220422.m1M4MFI5035030@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Perforce Change Reviews Subject: Re: PERFORCE change 135937 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 12:46:06 -0000 Marcel Moolenaar wrote: > > Change 135937 by marcel@marcel_xcllnt on 2008/02/22 04:21:47 > > Unify > > Fork the conflicting HID0_TBEN into HID0_AIM_TBEN > and HID0_BOOKE_TBEN. Renbame the e500-specific > defines to include _BOOKE. > > None of these were actually used. > Just to clarify: HID regs (and their fields) are vendor-specific (Freescale) and not present on other Book-E compliant systems, for example, PPC440 do not have them, so I think those defines should rather keep reference to E500, 74XX and so on. We can straighten this out at some later stage: as we talked earlier, there's more areas (pmap to name the most important) that assume E500 and would not run on other Book-E variations OOTB right now. There's a bit of work involved to make this port more generic/layered, and I have it on my TODO list. Rafal From owner-p4-projects@FreeBSD.ORG Fri Feb 22 14:00:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1E6A516A404; Fri, 22 Feb 2008 14:00:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB81A16A400 for ; Fri, 22 Feb 2008 14:00:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9D51913C465 for ; Fri, 22 Feb 2008 14:00:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ME0TPd007936 for ; Fri, 22 Feb 2008 14:00:29 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ME0TB7007933 for perforce@freebsd.org; Fri, 22 Feb 2008 14:00:29 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 14:00:29 GMT Message-Id: <200802221400.m1ME0TB7007933@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135957 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 14:00:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=135957 Change 135957 by rrs@rrs-mips2-jnpr on 2008/02/22 14:00:09 Fix up ticks properly Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#6 (text+ko) ==== @@ -50,13 +50,25 @@ #include uint64_t counter_freq; -uint64_t counts_per_hz; -uint32_t counts_per_usec; -int counter_is_broken=0; -u_int counter_present; +uint64_t cycles_per_tick; +uint32_t cycles_per_usec; +uint32_t cycles_per_sec; +uint32_t cycles_per_hz; + u_int32_t counter_upper = 0; u_int32_t counter_lower_last = 0; -int clock_started = 0; +int tick_started = 0; + +struct clk_ticks { + u_long hard_ticks; + u_long stat_ticks; + u_long prof_ticks; + /* + * pad for cache line alignment of pcpu info + * cache-line-size - number of used bytes + */ + char pad[32-(3*sizeof (u_long))]; +} static pcpu_ticks[MAXCPU]; /* * Device methods @@ -83,16 +95,16 @@ { /* Cavium early init code */ counter_freq = clock_hz; - counts_per_usec = (clock_hz / (1000 * 1000)); + cycles_per_usec = (clock_hz / (1000 * 1000)); } void cpu_initclocks(void) { - if (!clock_started) { + if (!tick_started) { tc_init(&counter_timecounter); - clock_started++; + tick_started++; } } @@ -128,23 +140,33 @@ */ counter_freq = platform_counter_freq; - counts_per_hz = counter_freq / hz; - counts_per_usec = counter_freq / (1 * 1000 * 1000); + cycles_per_tick = counter_freq / 1000; + if(double_count) + cycles_per_tick *=2; + + cycles_per_hz = counter_freq / hz; + + cycles_per_usec = counter_freq / (1 * 1000 * 1000); + cycles_per_sec = counter_freq / (1 * 1000); + counter_timecounter.tc_frequency = counter_freq; /* * XXX: Some MIPS32 cores update the Count register only every two * pipeline cycles. */ if (double_count != 0) { - counts_per_hz /= 2; - counts_per_usec /= 2; + cycles_per_hz /= 2; + cycles_per_usec /= 2; + cycles_per_sec /= 2; } - printf("hz=%d counts_per_hz:%jd counts_per_usec:%d freq:%jd\n", + printf("hz=%d counts_per_hz:%jd counts_per_usec:%d freq:%jd cycles_per_hz:%d cycles_per_sec:%d\n", hz, - counts_per_hz, - counts_per_usec, - counter_freq + cycles_per_tick, + cycles_per_usec, + counter_freq, + cycles_per_hz, + cycles_per_sec ); set_cputicker(tick_ticker, counter_freq, 1); } @@ -209,15 +231,15 @@ /* Check to see if the timer has wrapped around. */ if (cur < last) - delta += (cur + (counts_per_hz - last)); + delta += (cur + (cycles_per_hz - last)); else delta += (cur - last); last = cur; - if (delta >= counts_per_usec) { - usecs += delta / counts_per_usec; - delta %= counts_per_usec; + if (delta >= cycles_per_usec) { + usecs += delta / cycles_per_usec; + delta %= cycles_per_usec; } } } @@ -233,7 +255,6 @@ #ifdef TARGET_OCTEON int wheel_run = 0; -#define OCTEON_TICK_COUNT 100 void octeon_led_run_wheel(void); #endif @@ -243,40 +264,62 @@ static int clock_intr(void *arg) { + struct clk_ticks *cpu_ticks; struct trapframe *tf; - register_t usermode, pc; uint32_t ltick; - + uint8_t a=0, b=0, c=0, d=0; /* * Set next clock edge. */ ltick = mips_rd_count(); mips_wr_compare(ltick + counter_freq / hz); + cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; critical_enter(); if (ltick < counter_lower_last) { counter_upper++; counter_lower_last = ltick; + a = 1; } - critical_exit(); /* * Magic. Setting up with an arg of NULL means we get passed tf. - * XXX this comment and the code don't match. */ - tf = arg; - usermode = tf->sr & MIPS_SR_KSU_USER; - pc = tf->pc; + tf = (struct trapframe *)arg; + + /* Fire hardclock at hz. */ + cpu_ticks->hard_ticks += cycles_per_tick; + if (cpu_ticks->hard_ticks >= cycles_per_hz) { + b = 1; + cpu_ticks->hard_ticks -= cycles_per_hz; + if (PCPU_GET(cpuid) == 0) + hardclock(USERMODE(tf->sr), tf->pc); + else + hardclock_cpu(USERMODE(tf->sr)); + } + /* Fire statclock at stathz. */ + cpu_ticks->stat_ticks += stathz; + if (cpu_ticks->stat_ticks >= cycles_per_hz) { + c = 1; + cpu_ticks->stat_ticks -= cycles_per_hz; + statclock(USERMODE(tf->sr)); + } + /* Fire profclock at profhz, but only when needed. */ + cpu_ticks->prof_ticks += profhz; + if (cpu_ticks->prof_ticks >= cycles_per_hz) { + d = 1; + cpu_ticks->prof_ticks -= cycles_per_hz; + if (profprocs != 0) + profclock(USERMODE(tf->sr), tf->pc); + } + critical_exit(); #ifdef TARGET_OCTEON - /* Run the FreeBSD display once every N ticks */ - wheel_run++; - if (wheel_run >= OCTEON_TICK_COUNT) { + /* Run the FreeBSD display once every hz ticks */ + wheel_run += cycles_per_tick; + if (wheel_run >= cycles_per_sec) { wheel_run = 0; octeon_led_run_wheel(); } #endif - if (clocks_running) { - hardclock(usermode, pc); - } return (FILTER_HANDLED); } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 14:01:32 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F6CD16A404; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5459416A400 for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4C02613C458 for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ME1Wv3008008 for ; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ME1WFR008004 for perforce@freebsd.org; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 14:01:32 GMT Message-Id: <200802221401.m1ME1WFR008004@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135958 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 14:01:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=135958 Change 135958 by rrs@rrs-mips2-jnpr on 2008/02/22 14:00:35 clean out seperate special non-called clockintr Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/intr_machdep.c#6 (text+ko) ==== @@ -154,12 +154,9 @@ if (!event || TAILQ_EMPTY(&event->ie_handlers)) { - if (i == 5) - clockintr(intr, tf); - else - printf("stray %s interrupt %d\n", - hard ? "hard" : "soft", i); - continue; + printf("stray %s interrupt %d\n", + hard ? "hard" : "soft", i); + continue; } /* Execute fast handlers. */ From owner-p4-projects@FreeBSD.ORG Fri Feb 22 14:01:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B85316A532; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9506B16A405 for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6D513C45E for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ME1W9k008015 for ; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ME1WnX008011 for perforce@freebsd.org; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 14:01:32 GMT Message-Id: <200802221401.m1ME1WnX008011@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135959 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 14:01:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135959 Change 135959 by rrs@rrs-mips2-jnpr on 2008/02/22 14:01:03 Force a proper phys location for the memory being grabbed Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/busdma_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/busdma_machdep.c#3 (text+ko) ==== @@ -434,8 +434,22 @@ * and handles multi-seg allocations. Nobody is doing * multi-seg allocations yet though. */ + vm_paddr_t maxphys; + if((uint32_t)dmat->lowaddr >= MIPS_KSEG0_LARGEST_PHYS) { + /* Note in the else case I just put in what was already + * being passed in dmat->lowaddr. I am not sure + * how this would have worked. Since lowaddr is in the + * max address postion. I would have thought that the + * caller would have wanted dmat->highaddr. That is + * presuming they are asking for physical addresses + * which is what contigmalloc takes. - RRS + */ + maxphys = MIPS_KSEG0_LARGEST_PHYS - 1; + } else { + maxphys = dmat->lowaddr; + } *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, + 0ul, maxphys, dmat->alignment? dmat->alignment : 1ul, dmat->boundary); } if (*vaddr == NULL) { From owner-p4-projects@FreeBSD.ORG Fri Feb 22 14:02:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2059116A404; Fri, 22 Feb 2008 14:02:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D97C816A401 for ; Fri, 22 Feb 2008 14:02:33 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B8E9613C455 for ; Fri, 22 Feb 2008 14:02:33 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ME2Xfm008041 for ; Fri, 22 Feb 2008 14:02:33 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ME2Xal008038 for perforce@freebsd.org; Fri, 22 Feb 2008 14:02:33 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 14:02:33 GMT Message-Id: <200802221402.m1ME2Xal008038@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 14:02:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135960 Change 135960 by rrs@rrs-mips2-jnpr on 2008/02/22 14:01:54 Clock.c is NOT needed. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#15 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#15 (text+ko) ==== @@ -55,7 +55,7 @@ # Phase 4 # ---------------------------------------------------------------------- # -mips/mips/clock.c standard +#mips/mips/clock.c standard #mips/mips/queue.c standard # ---------------------------------------------------------------------- # Phase 5 From owner-p4-projects@FreeBSD.ORG Fri Feb 22 16:51:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0A07516A40A; Fri, 22 Feb 2008 16:51:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91A0216A406 for ; Fri, 22 Feb 2008 16:51:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8A67513C46E for ; Fri, 22 Feb 2008 16:51:35 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MGpZ9w029956 for ; Fri, 22 Feb 2008 16:51:35 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MGpZ3Y029943 for perforce@freebsd.org; Fri, 22 Feb 2008 16:51:35 GMT (envelope-from imp@freebsd.org) Date: Fri, 22 Feb 2008 16:51:35 GMT Message-Id: <200802221651.m1MGpZ3Y029943@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135967 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 16:51:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135967 Change 135967 by imp@imp_lighthouse on 2008/02/22 16:50:58 Harmonize the tick init stuff to be the same on all platforms. Remove prototypes that should be in header files and move relevant ones there. Expand the early_init clock frequency to be 64 bits. This gets both octeon and malta compiling again. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/conf/files.mips#16 edit .. //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#8 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#7 edit .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#16 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/conf/files.mips#16 (text+ko) ==== @@ -55,7 +55,7 @@ # Phase 4 # ---------------------------------------------------------------------- # -#mips/mips/clock.c standard +mips/mips/tick.c standard #mips/mips/queue.c standard # ---------------------------------------------------------------------- # Phase 5 ==== //depot/projects/mips2-jnpr/src/sys/mips/include/clock.h#8 (text+ko) ==== @@ -28,6 +28,7 @@ */ #define MIPS_DEFAULT_HZ (100 * 1000 * 1000) +void mips_timer_early_init(uint64_t clock_hz); void mips_timer_init_params(uint64_t, int); int sysbeep(int pitch, int period); ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#7 (text+ko) ==== @@ -59,7 +59,8 @@ u_int32_t counter_lower_last = 0; int tick_started = 0; -struct clk_ticks { +struct clk_ticks +{ u_long hard_ticks; u_long stat_ticks; u_long prof_ticks; @@ -81,19 +82,16 @@ static struct timecounter counter_timecounter = { counter_get_timecount, /* get_timecount */ 0, /* no poll_pps */ - ~0u, /* counter_mask */ + 0xffffffffu, /* counter_mask */ 0, /* frequency */ "MIPS32", /* name */ 800, /* quality (adjusted in code) */ }; -void tick_early_init(uint32_t); -void tick_init_params(uint64_t, int ); - void -tick_early_init(uint32_t clock_hz) +mips_timer_early_init(uint64_t clock_hz) { - /* Cavium early init code */ + /* Initialize clock early so that we can use DELAY sooner */ counter_freq = clock_hz; cycles_per_usec = (clock_hz / (1000 * 1000)); } @@ -108,19 +106,22 @@ } } - - static uint64_t tick_ticker(void) { uint64_t ret; uint32_t ticktock; + /* + * XXX: MIPS64 platforms can read 64-bits of counter directly. + * Also: the tc code is supposed to cope with things wrapping + * from the time counter, so I'm not sure why all these hoops + * are even necessary. + */ ticktock = mips_rd_count(); critical_enter(); - if (ticktock < counter_lower_last) { + if (ticktock < counter_lower_last) counter_upper++; - } counter_lower_last = ticktock; critical_exit(); @@ -128,10 +129,8 @@ return (ret); } - - void -tick_init_params(uint64_t platform_counter_freq, int double_count) +mips_timer_init_params(uint64_t platform_counter_freq, int double_count) { /* @@ -139,21 +138,18 @@ * function should be called before cninit. */ counter_freq = platform_counter_freq; - cycles_per_tick = counter_freq / 1000; - if(double_count) - cycles_per_tick *=2; - + if (double_count) + cycles_per_tick *= 2; cycles_per_hz = counter_freq / hz; - cycles_per_usec = counter_freq / (1 * 1000 * 1000); - cycles_per_sec = counter_freq / (1 * 1000); - counter_timecounter.tc_frequency = counter_freq; /* * XXX: Some MIPS32 cores update the Count register only every two * pipeline cycles. + * XXX2: We can read this from the hardware register on some + * systems. Need to investigate. */ if (double_count != 0) { cycles_per_hz /= 2; ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#16 (text+ko) ==== @@ -1313,9 +1313,6 @@ } -void tick_early_init(uint32_t clock_hz); -void tick_init_params(uint64_t platform_counter_freq, int double_count); - void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) @@ -1328,17 +1325,16 @@ /* The boot loader clears the BSS and SBSS segments */ kernend = round_page((vm_offset_t)&end); - tick_early_init(OCTEON_CLOCK_DEFAULT); /* Quick Default. To avoid - * divide-by-0 Later we will - * get it from - * Bootloader/Rom-Mon */ - + /* + * Quick Default. To avoid divide-by-0 Later we will + * get it from Bootloader/Rom-Mon + */ + mips_timer_early_init(OCTEON_CLOCK_DEFAULT); cninit(); mips_boot_params_init(); printf(" Initialized memory: 0x%p to 0x%lX\n", &edata, ((long)&edata) + ((long)kernend - (long)(&edata))); mips_init(); platform_counter_freq = (uint64_t) (octeon_get_clock_rate()); - - tick_init_params(platform_counter_freq, 0); + mips_timer_init_params(platform_counter_freq, 0); } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 16:52:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A34316A406; Fri, 22 Feb 2008 16:52:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB65916A401 for ; Fri, 22 Feb 2008 16:52:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BC79813C457 for ; Fri, 22 Feb 2008 16:52:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MGqaDO029984 for ; Fri, 22 Feb 2008 16:52:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MGqamU029981 for perforce@freebsd.org; Fri, 22 Feb 2008 16:52:36 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 16:52:36 GMT Message-Id: <200802221652.m1MGqamU029981@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135968 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 16:52:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135968 Change 135968 by sam@sam_ebb on 2008/02/22 16:51:55 correct debug msg Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#13 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#13 (text+ko) ==== @@ -800,7 +800,7 @@ IEEE80211_NODE_STAT(ni, rx_mgmt); if (dir != IEEE80211_FC1_DIR_NODS) { IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, - wh, "data", "incorrect dir 0x%x", dir); + wh, "mgt", "incorrect dir 0x%x", dir); vap->iv_stats.is_rx_wrongdir++; goto err; } From owner-p4-projects@FreeBSD.ORG Fri Feb 22 16:55:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 55B7816A402; Fri, 22 Feb 2008 16:55:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 186DB16A400 for ; Fri, 22 Feb 2008 16:55:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ED4DE13C442 for ; Fri, 22 Feb 2008 16:55:40 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MGtevU030145 for ; Fri, 22 Feb 2008 16:55:40 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MGte1K030142 for perforce@freebsd.org; Fri, 22 Feb 2008 16:55:40 GMT (envelope-from imp@freebsd.org) Date: Fri, 22 Feb 2008 16:55:40 GMT Message-Id: <200802221655.m1MGte1K030142@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 135969 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 16:55:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=135969 Change 135969 by imp@imp_lighthouse on 2008/02/22 16:54:48 We're using tick.c, remove clock.c to avoid confusion. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#9 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Feb 22 16:56:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 68D7F16A412; Fri, 22 Feb 2008 16:56:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E3A216A403 for ; Fri, 22 Feb 2008 16:56:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2771013C4D9 for ; Fri, 22 Feb 2008 16:56:42 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MGufLP030183 for ; Fri, 22 Feb 2008 16:56:41 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MGufPv030180 for perforce@freebsd.org; Fri, 22 Feb 2008 16:56:41 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 16:56:41 GMT Message-Id: <200802221656.m1MGufPv030180@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135970 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 16:56:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=135970 Change 135970 by sam@sam_ebb on 2008/02/22 16:55:45 pull check for being in RUN state on processing AUTH packets up into the caller so it can be done early; this guards against responding w/ an error packet before the bss channel is setup Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#14 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#14 (text+ko) ==== @@ -892,6 +892,8 @@ { struct ieee80211vap *vap = ni->ni_vap; + KASSERT(vap->iv_state == IEEE80211_S_RUN, ("state %d", vap->iv_state)); + if (ni->ni_authmode == IEEE80211_AUTH_SHARED) { IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_AUTH, ni->ni_macaddr, "open auth", @@ -912,8 +914,7 @@ (seq + 1) | (IEEE80211_STATUS_ALG<<16)); return; } - if (vap->iv_state != IEEE80211_S_RUN || - seq != IEEE80211_AUTH_OPEN_REQUEST) { + if (seq != IEEE80211_AUTH_OPEN_REQUEST) { vap->iv_stats.is_rx_bad_auth++; return; } @@ -967,6 +968,8 @@ uint8_t *challenge; int allocbs, estatus; + KASSERT(vap->iv_state == IEEE80211_S_RUN, ("state %d", vap->iv_state)); + /* * NB: this can happen as we allow pre-shared key * authentication to be enabled w/o wep being turned @@ -1034,13 +1037,6 @@ default: break; } - if (vap->iv_state != IEEE80211_S_RUN) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_AUTH, - ni->ni_macaddr, "shared key auth", - "bad state %u", vap->iv_state); - estatus = IEEE80211_STATUS_ALG; /* XXX */ - goto bad; - } switch (seq) { case IEEE80211_AUTH_SHARED_REQUEST: if (ni == vap->iv_bss) { @@ -1843,6 +1839,11 @@ case IEEE80211_FC0_SUBTYPE_AUTH: { uint16_t algo, seq, status; + + if (vap->iv_state != IEEE80211_S_RUN) { + vap->iv_stats.is_rx_mgtdiscard++; + return; + } /* * auth frame format * [2] algorithm From owner-p4-projects@FreeBSD.ORG Fri Feb 22 17:00:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3503616A402; Fri, 22 Feb 2008 17:00:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2BFA16A407 for ; Fri, 22 Feb 2008 17:00:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A640813C457 for ; Fri, 22 Feb 2008 17:00:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MH0kFj030450 for ; Fri, 22 Feb 2008 17:00:46 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MH0keN030447 for perforce@freebsd.org; Fri, 22 Feb 2008 17:00:46 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 17:00:46 GMT Message-Id: <200802221700.m1MH0keN030447@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135971 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:00:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=135971 Change 135971 by sam@sam_ebb on 2008/02/22 17:00:03 pull check that SA is unicast to common mgt frame processing so all frames are checked Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#15 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#15 (text+ko) ==== @@ -811,6 +811,14 @@ vap->iv_stats.is_rx_tooshort++; goto out; } + if (IEEE80211_IS_MULTICAST(wh->i_addr2)) { + /* ensure return frames are unicast */ + IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, + wh, NULL, "source is multicast: %s", + ether_sprintf(wh->i_addr2)); + vap->iv_stats.is_rx_mgtdiscard++; /* XXX stat */ + goto out; + } #ifdef IEEE80211_DEBUG if ((ieee80211_msg_debug(vap) && doprint(vap, subtype)) || ieee80211_msg_dumppkts(vap)) { @@ -1742,11 +1750,6 @@ vap->iv_stats.is_rx_mgtdiscard++; return; } - if (IEEE80211_IS_MULTICAST(wh->i_addr2)) { - /* frame must be directed */ - vap->iv_stats.is_rx_mgtdiscard++; /* XXX stat */ - return; - } /* * prreq frame format From owner-p4-projects@FreeBSD.ORG Fri Feb 22 17:25:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 67AA216A40F; Fri, 22 Feb 2008 17:25:13 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C76716A40A for ; Fri, 22 Feb 2008 17:25:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0CCD213C459 for ; Fri, 22 Feb 2008 17:25:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MHPCSU033421 for ; Fri, 22 Feb 2008 17:25:12 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MHPCR2033418 for perforce@freebsd.org; Fri, 22 Feb 2008 17:25:12 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 17:25:12 GMT Message-Id: <200802221725.m1MHPCR2033418@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:25:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=135972 Change 135972 by sam@sam_ebb on 2008/02/22 17:24:37 o discard auth frames w/ a broadcast bssid o move [re]assoc req checks for bssid + authentication up to be before all the hard work Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#16 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#16 (text+ko) ==== @@ -1847,6 +1847,12 @@ vap->iv_stats.is_rx_mgtdiscard++; return; } + if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bss->ni_bssid)) { + IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, + wh, NULL, "%s", "wrong bssid"); + vap->iv_stats.is_rx_wrongbss++; /*XXX unique stat?*/ + return; + } /* * auth frame format * [2] algorithm @@ -1919,7 +1925,12 @@ vap->iv_stats.is_rx_mgtdiscard++; return; } - + if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bss->ni_bssid)) { + IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, + wh, NULL, "%s", "wrong bssid"); + vap->iv_stats.is_rx_assoc_bss++; + return; + } if (subtype == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) { reassoc = 1; resp = IEEE80211_FC0_SUBTYPE_REASSOC_RESP; @@ -1927,6 +1938,17 @@ reassoc = 0; resp = IEEE80211_FC0_SUBTYPE_ASSOC_RESP; } + if (ni == vap->iv_bss) { + IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, wh->i_addr2, + "deny %s request, sta not authenticated", + reassoc ? "reassoc" : "assoc"); + ieee80211_send_error(ni, wh->i_addr2, + IEEE80211_FC0_SUBTYPE_DEAUTH, + IEEE80211_REASON_ASSOC_NOT_AUTHED); + vap->iv_stats.is_rx_assoc_notauth++; + return; + } + /* * asreq frame format * [2] capability information @@ -1940,12 +1962,6 @@ * [tlv] Atheros capabilities */ IEEE80211_VERIFY_LENGTH(efrm - frm, (reassoc ? 10 : 4), return); - if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bss->ni_bssid)) { - IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, - wh, NULL, "%s", "wrong bssid"); - vap->iv_stats.is_rx_assoc_bss++; - return; - } capinfo = le16toh(*(uint16_t *)frm); frm += 2; lintval = le16toh(*(uint16_t *)frm); frm += 2; if (reassoc) @@ -1999,16 +2015,6 @@ return); /* XXX just NULL out? */ } - if (ni == vap->iv_bss) { - IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, wh->i_addr2, - "deny %s request, sta not authenticated", - reassoc ? "reassoc" : "assoc"); - ieee80211_send_error(ni, wh->i_addr2, - IEEE80211_FC0_SUBTYPE_DEAUTH, - IEEE80211_REASON_ASSOC_NOT_AUTHED); - vap->iv_stats.is_rx_assoc_notauth++; - return; - } if ((vap->iv_flags & IEEE80211_F_WPA) && !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo)) return; From owner-p4-projects@FreeBSD.ORG Fri Feb 22 17:43:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F030516A405; Fri, 22 Feb 2008 17:43:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BCAE16A404 for ; Fri, 22 Feb 2008 17:43:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 93CBA13C474 for ; Fri, 22 Feb 2008 17:43:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MHhWHX034294 for ; Fri, 22 Feb 2008 17:43:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MHhW1K034291 for perforce@freebsd.org; Fri, 22 Feb 2008 17:43:32 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 17:43:32 GMT Message-Id: <200802221743.m1MHhW1K034291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135976 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:43:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=135976 Change 135976 by rrs@rrs-mips2-jnpr on 2008/02/22 17:43:05 makes wheel float FreeBSD! across the display. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#17 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/octeon32/octeon_machdep.c#17 (text+ko) ==== @@ -315,28 +315,40 @@ } } -static char progress[8] = {'F', 'R', 'E', 'E', 'B', 'S', 'D', '!'}; +static char progress[15][8] = { + {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, /* 0 */ + {' ', ' ', ' ', ' ', ' ', ' ', ' ', 'F'}, /* 1 */ + {' ', ' ', ' ', ' ', ' ', ' ', 'F', 'r'}, /* 2 */ + {' ', ' ', ' ', ' ', ' ', 'F', 'r', 'e'}, /* 3 */ + {' ', ' ', ' ', ' ', 'F', 'r', 'e', 'e'}, /* 4 */ + {' ', ' ', ' ', 'F', 'r', 'e', 'e', 'B'}, /* 5 */ + {' ', ' ', 'F', 'r', 'e', 'e', 'B', 'S'}, /* 6 */ + {' ', 'F', 'r', 'e', 'e', 'B', 'S', 'D'}, /* 7 */ + {'r', 'e', 'e', 'B', 'S', 'D', '!', ' '}, /* 8 */ + {'e', 'e', 'B', 'S', 'D', '!', ' ', ' '}, /* 9 */ + {'e', 'B', 'S', 'D', '!', ' ', ' ', ' '}, /* 10 */ + {'B', 'S', 'D', '!', ' ', ' ', ' ', ' '}, /* 11 */ + {'S', 'D', '!', ' ', ' ', ' ', ' ', ' '}, /* 12 */ + {'D', '!', ' ', ' ', ' ', ' ', ' ', ' '}, /* 13 */ + {'!', '!', ' ', ' ', ' ', ' ', ' ', ' '} /* 14 */ +}; int prog_count = 0; void octeon_led_run_wheel(void) { - if (!octeon_board_real()) + int i; + if (!octeon_board_real()) return; - if (prog_count > 7) { - int i; - - /* blank display and reset */ - prog_count = 0; - for (i = 0; i < 8; i++) { - octeon_led_write_char(i, ' '); - } - } else { - octeon_led_write_char(prog_count, progress[prog_count]); - prog_count += 1; + if (prog_count > 14) { + prog_count = 0; + } + for (i = 0; i < 8; i++) { + octeon_led_write_char(i, progress[prog_count][i]); } + prog_count++; } #define LSR_DATAREADY 0x01 /* Data ready */ From owner-p4-projects@FreeBSD.ORG Fri Feb 22 17:44:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1709E16A408; Fri, 22 Feb 2008 17:44:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C72A916A406 for ; Fri, 22 Feb 2008 17:44:33 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C079313C442 for ; Fri, 22 Feb 2008 17:44:33 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MHiXfR034348 for ; Fri, 22 Feb 2008 17:44:33 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MHiXhb034345 for perforce@freebsd.org; Fri, 22 Feb 2008 17:44:33 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 17:44:33 GMT Message-Id: <200802221744.m1MHiXhb034345@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135977 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:44:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135977 Change 135977 by rrs@rrs-mips2-jnpr on 2008/02/22 17:44:23 tweaks to make the wheel run correctly and move things to uint64_t that should be. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#8 (text+ko) ==== @@ -51,9 +51,9 @@ uint64_t counter_freq; uint64_t cycles_per_tick; -uint32_t cycles_per_usec; -uint32_t cycles_per_sec; -uint32_t cycles_per_hz; +uint64_t cycles_per_usec; +uint64_t cycles_per_sec; +uint64_t cycles_per_hz; u_int32_t counter_upper = 0; u_int32_t counter_lower_last = 0; @@ -143,7 +143,8 @@ cycles_per_tick *= 2; cycles_per_hz = counter_freq / hz; cycles_per_usec = counter_freq / (1 * 1000 * 1000); - cycles_per_sec = counter_freq / (1 * 1000); + cycles_per_sec = counter_freq ; + counter_timecounter.tc_frequency = counter_freq; /* * XXX: Some MIPS32 cores update the Count register only every two @@ -156,7 +157,7 @@ cycles_per_usec /= 2; cycles_per_sec /= 2; } - printf("hz=%d counts_per_hz:%jd counts_per_usec:%d freq:%jd cycles_per_hz:%d cycles_per_sec:%d\n", + printf("hz=%d cyl_per_hz:%jd cyl_per_usec:%jd freq:%jd cyl_per_hz:%jd cyl_per_sec:%jd\n", hz, cycles_per_tick, cycles_per_usec, @@ -249,7 +250,7 @@ } #ifdef TARGET_OCTEON -int wheel_run = 0; +int64_t wheel_run = 0; void octeon_led_run_wheel(void); @@ -268,7 +269,7 @@ * Set next clock edge. */ ltick = mips_rd_count(); - mips_wr_compare(ltick + counter_freq / hz); + mips_wr_compare(ltick + cycles_per_tick); cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; critical_enter(); if (ltick < counter_lower_last) { From owner-p4-projects@FreeBSD.ORG Fri Feb 22 17:48:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FD9916A416; Fri, 22 Feb 2008 17:48:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C81E716A40B for ; Fri, 22 Feb 2008 17:48:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C023A13C4CE for ; Fri, 22 Feb 2008 17:48:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MHmdj9034523 for ; Fri, 22 Feb 2008 17:48:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MHmdJ8034520 for perforce@freebsd.org; Fri, 22 Feb 2008 17:48:39 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 17:48:39 GMT Message-Id: <200802221748.m1MHmdJ8034520@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135978 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:48:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135978 Change 135978 by sam@sam_ebb on 2008/02/22 17:47:37 Apply long-overdue overhaul of probe response handling in ap mode: o eliminate use of temporary node to send probe response; use the bss node for a reference and pass the destination mac address explicitly (instead of taking it from the node) o drop atheros ie processing; not clear it was ever useful (though possibly it was used to propagate the default wep key for shared key auth) o don't avg rssi for received probe request frames o don't do rate set negotiation; it was unnecessary o check for 11b client better (I think); could still be optimized and should probably move to common code so it can be shared between ap and adhoc code o add ieee80211_send_proberesp to send a probe response frame; need to think about best way to integrate this into the tx mgt path so drivers can override Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#7 edit .. //depot/projects/vap/sys/net80211/ieee80211_hostap.c#17 edit .. //depot/projects/vap/sys/net80211/ieee80211_output.c#35 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.h#14 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#7 (text+ko) ==== @@ -641,6 +641,23 @@ #undef SEQ_LEQ } +static int +is11bclient(const uint8_t *rates, const uint8_t *xrates) +{ + static const uint32_t brates = (1<<2*1)|(1<<2*2)|(1<<11)|(1<<2*11); + int i; + + /* NB: the 11b clients we care about will not have xrates */ + if (xrates != NULL || rates == NULL) + return 0; + for (i = 0; i < rates[1]; i++) { + int r = rates[2+i] & IEEE80211_RATE_VAL; + if (r > 2*11 || ((1<ni_ic; struct ieee80211_frame *wh; uint8_t *frm, *efrm, *sfrm; - uint8_t *ssid, *rates, *xrates, *ath; - int allocbs; - uint8_t rate; + uint8_t *ssid, *rates, *xrates; wh = mtod(m0, struct ieee80211_frame *); frm = (uint8_t *)&wh[1]; @@ -740,7 +755,7 @@ * [tlv] extended supported rates * [tlv] Atheros capabilities */ - ssid = rates = xrates = ath = NULL; + ssid = rates = xrates = NULL; sfrm = frm; while (efrm - frm > 1) { IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); @@ -754,10 +769,6 @@ case IEEE80211_ELEMID_XRATES: xrates = frm; break; - case IEEE80211_ELEMID_VENDOR: - if (isatherosoui(frm)) - ath = frm; - break; } frm += frm[1] + 2; } @@ -775,62 +786,17 @@ return; } - if (ni == vap->iv_bss) { - if (IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) - ; - else { - /* - * XXX Cannot tell if the sender is operating - * in ibss mode. But we need a new node to - * send the response so blindly add them to the - * neighbor table. - */ - ni = ieee80211_fakeup_adhoc_node(vap, - wh->i_addr2); - } - if (ni == NULL) - return; - allocbs = 1; - } else - allocbs = 0; /* XXX find a better class or define it's own */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, "%s", "recv probe req"); - IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); - ni->ni_rstamp = rstamp; - rate = ieee80211_setup_rates(ni, rates, xrates, - IEEE80211_F_DOSORT | IEEE80211_F_DOFRATE - | IEEE80211_F_DONEGO | IEEE80211_F_DODEL); - if (rate & IEEE80211_RATE_BASIC) { - IEEE80211_DISCARD(vap, IEEE80211_MSG_XRATE, - wh, NULL, "%s", "recv'd rate set invalid"); - } else { - /* - * Some legacy 11b clients cannot hack a complete - * probe response frame. When the request includes - * only a bare-bones rate set, communicate this to - * the transmit side through the "arg parameters". - * - * NB: using the max rate is a bit of a hack. - */ - IEEE80211_SEND_MGMT(ni, - IEEE80211_FC0_SUBTYPE_PROBE_RESP, - rate < 48 ? IEEE80211_SEND_LEGACY_11B : 0); - } - if (allocbs) { - /* - * Temporary node created just to send a - * response, reclaim immediately. - */ - ieee80211_free_node(ni); - } else if (ath != NULL) { - if (ieee80211_ies_init(&ni->ni_ies, sfrm, efrm-sfrm)) { - ieee80211_ies_setie(ni->ni_ies, ath_ie, - ath - sfrm); - ieee80211_parse_ath(ni, ni->ni_ies.ath_ie); - } else - ni->ni_ath_flags = 0; - } + /* + * Some legacy 11b clients cannot hack a complete + * probe response frame. When the request includes + * only a bare-bones rate set, communicate this to + * the transmit side. + */ + ieee80211_send_proberesp(vap, wh->i_addr2, + is11bclient(rates, xrates) ? IEEE80211_SEND_LEGACY_11B : 0); break; case IEEE80211_FC0_SUBTYPE_ACTION: { ==== //depot/projects/vap/sys/net80211/ieee80211_hostap.c#17 (text+ko) ==== @@ -1629,6 +1629,23 @@ IEEE80211_HTINFO_OPMODE_MIXED; } +static int +is11bclient(const uint8_t *rates, const uint8_t *xrates) +{ + static const uint32_t brates = (1<<2*1)|(1<<2*2)|(1<<11)|(1<<2*11); + int i; + + /* NB: the 11b clients we care about will not have xrates */ + if (xrates != NULL || rates == NULL) + return 0; + for (i = 0; i < rates[1]; i++) { + int r = rates[2+i] & IEEE80211_RATE_VAL; + if (r > 2*11 || ((1<iv_stats.is_rx_mgtdiscard++; return; } - /* * prreq frame format * [tlv] ssid * [tlv] supported rates * [tlv] extended supported rates - * [tlv] Atheros capabilities */ - ssid = rates = xrates = ath = NULL; + ssid = rates = xrates = NULL; sfrm = frm; while (efrm - frm > 1) { IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); @@ -1772,10 +1787,6 @@ case IEEE80211_ELEMID_XRATES: xrates = frm; break; - case IEEE80211_ELEMID_VENDOR: - if (isatherosoui(frm)) - ath = frm; - break; } frm += frm[1] + 2; } @@ -1793,51 +1804,17 @@ return; } - if (ni == vap->iv_bss) { - ni = ieee80211_tmp_node(vap, wh->i_addr2); - if (ni == NULL) - return; - allocbs = 1; - } else - allocbs = 0; /* XXX find a better class or define it's own */ IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, "%s", "recv probe req"); - IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); - ni->ni_rstamp = rstamp; - rate = ieee80211_setup_rates(ni, rates, xrates, - IEEE80211_F_DOSORT | IEEE80211_F_DOFRATE - | IEEE80211_F_DONEGO | IEEE80211_F_DODEL); - if (rate & IEEE80211_RATE_BASIC) { - IEEE80211_DISCARD(vap, IEEE80211_MSG_XRATE, - wh, NULL, "%s", "recv'd rate set invalid"); - } else { - /* - * Some legacy 11b clients cannot hack a complete - * probe response frame. When the request includes - * only a bare-bones rate set, communicate this to - * the transmit side through the "arg parameters". - * - * NB: using the max rate is a bit of a hack. - */ - IEEE80211_SEND_MGMT(ni, - IEEE80211_FC0_SUBTYPE_PROBE_RESP, - rate < 48 ? IEEE80211_SEND_LEGACY_11B : 0); - } - if (allocbs) { - /* - * Temporary node created just to send a - * response, reclaim immediately. - */ - ieee80211_free_node(ni); - } else if (ath != NULL) { - if (ieee80211_ies_init(&ni->ni_ies, sfrm, efrm-sfrm)) { - ieee80211_ies_setie(ni->ni_ies, ath_ie, - ath - sfrm); - ieee80211_parse_ath(ni, ni->ni_ies.ath_ie); - } else - ni->ni_ath_flags = 0; - } + /* + * Some legacy 11b clients cannot hack a complete + * probe response frame. When the request includes + * only a bare-bones rate set, communicate this to + * the transmit side. + */ + ieee80211_send_proberesp(vap, wh->i_addr2, + is11bclient(rates, xrates) ? IEEE80211_SEND_LEGACY_11B : 0); break; case IEEE80211_FC0_SUBTYPE_AUTH: { ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#35 (text+ko) ==== @@ -1721,7 +1721,6 @@ struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ieee80211_node *bss = vap->iv_bss; - const struct ieee80211_rateset *rs; struct mbuf *m; uint8_t *frm; uint16_t capinfo; @@ -1742,139 +1741,7 @@ ieee80211_ref_node(ni); switch (type) { - case IEEE80211_FC0_SUBTYPE_PROBE_RESP: - /* - * probe response frame format - * [8] time stamp - * [2] beacon interval - * [2] cabability information - * [tlv] ssid - * [tlv] supported rates - * [tlv] parameter set (FH/DS) - * [tlv] parameter set (IBSS) - * [tlv] country (optional) - * [tlv] RSN (optional) - * [3] power control (optional) - * [5] channel switch announcement (CSA) (optional) - * [tlv] extended rate phy (ERP) - * [tlv] extended supported rates - * [tlv] HT capabilities - * [tlv] HT information - * [tlv] WPA (optional) - * [tlv] WME (optional) - * [tlv] Vendor OUI HT capabilities (optional) - * [tlv] Vendor OUI HT information (optional) - * [tlv] Atheros capabilities - * [tlv] AppIE's (optional) - */ - m = ieee80211_getmgtframe(&frm, - ic->ic_headroom + sizeof(struct ieee80211_frame), - 8 - + sizeof(uint16_t) - + sizeof(uint16_t) - + 2 + IEEE80211_NWID_LEN - + 2 + IEEE80211_RATE_SIZE - + 7 /* max(7,3) */ - + sizeof(struct ieee80211_country_ie) - + sizeof(struct ieee80211_ie_wpa) - + 3 - + sizeof(struct ieee80211_csa_ie) - + 3 - + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) - + sizeof(struct ieee80211_ie_htcap) - + sizeof(struct ieee80211_ie_htinfo) - + sizeof(struct ieee80211_ie_wpa) - + sizeof(struct ieee80211_wme_param) - + 4 + sizeof(struct ieee80211_ie_htcap) - + 4 + sizeof(struct ieee80211_ie_htinfo) - + sizeof(struct ieee80211_ath_ie) - + (vap->iv_appie_proberesp != NULL ? - vap->iv_appie_proberesp->ie_len : 0) - ); - if (m == NULL) - senderr(ENOMEM, is_tx_nobuf); - - memset(frm, 0, 8); /* timestamp should be filled later */ - frm += 8; - *(uint16_t *)frm = htole16(bss->ni_intval); - frm += 2; - capinfo = getcapinfo(vap, bss->ni_chan); - *(uint16_t *)frm = htole16(capinfo); - frm += 2; - - frm = ieee80211_add_ssid(frm, bss->ni_essid, bss->ni_esslen); - rs = ieee80211_get_suprates(ic, bss->ni_chan); - frm = ieee80211_add_rates(frm, rs); - - if (IEEE80211_IS_CHAN_FHSS(bss->ni_chan)) { - *frm++ = IEEE80211_ELEMID_FHPARMS; - *frm++ = 5; - *frm++ = ni->ni_fhdwell & 0x00ff; - *frm++ = (ni->ni_fhdwell >> 8) & 0x00ff; - *frm++ = IEEE80211_FH_CHANSET( - ieee80211_chan2ieee(ic, bss->ni_chan)); - *frm++ = IEEE80211_FH_CHANPAT( - ieee80211_chan2ieee(ic, bss->ni_chan)); - *frm++ = ni->ni_fhindex; - } else { - *frm++ = IEEE80211_ELEMID_DSPARMS; - *frm++ = 1; - *frm++ = ieee80211_chan2ieee(ic, bss->ni_chan); - } - if (vap->iv_opmode == IEEE80211_M_IBSS) { - *frm++ = IEEE80211_ELEMID_IBSSPARMS; - *frm++ = 2; - *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ - } - if (vap->iv_flags & IEEE80211_F_DOTH) - frm = ieee80211_add_countryie(frm, ic); - if (vap->iv_flags & IEEE80211_F_WPA2) { - if (vap->iv_rsn_ie != NULL) - frm = add_ie(frm, vap->iv_rsn_ie); - /* XXX else complain? */ - } - if (vap->iv_flags & IEEE80211_F_DOTH) { - if (IEEE80211_IS_CHAN_5GHZ(bss->ni_chan)) - frm = ieee80211_add_powerconstraint(frm, vap); - if (ic->ic_flags & IEEE80211_F_CSAPENDING) - frm = ieee80211_add_csa(frm, vap); - } - if (IEEE80211_IS_CHAN_ANYG(bss->ni_chan)) - frm = ieee80211_add_erp(frm, ic); - frm = ieee80211_add_xrates(frm, rs); - /* - * NB: legacy 11b clients do not get certain ie's. - * The caller identifies such clients by passing - * a token in arg to us. Could expand this to be - * any legacy client for stuff like HT ie's. - */ - if (IEEE80211_IS_CHAN_HT(bss->ni_chan) && - arg != IEEE80211_SEND_LEGACY_11B) { - frm = ieee80211_add_htcap(frm, bss); - frm = ieee80211_add_htinfo(frm, bss); - } - if (vap->iv_flags & IEEE80211_F_WPA1) { - if (vap->iv_wpa_ie != NULL) - frm = add_ie(frm, vap->iv_wpa_ie); - /* XXX else complain? */ - } - if (vap->iv_flags & IEEE80211_F_WME) - frm = ieee80211_add_wme_param(frm, &ic->ic_wme); - if (IEEE80211_IS_CHAN_HT(bss->ni_chan) && - (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT) && - arg != IEEE80211_SEND_LEGACY_11B) { - frm = ieee80211_add_htcap_vendor(frm, bss); - frm = ieee80211_add_htinfo_vendor(frm, bss); - } - if (ni->ni_ies.ath_ie != NULL) - frm = ieee80211_add_ath(frm, ni->ni_ath_flags, - ni->ni_ath_defkeyix); - if (vap->iv_appie_proberesp != NULL) - frm = add_appie(frm, vap->iv_appie_proberesp); - m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); - break; - case IEEE80211_FC0_SUBTYPE_AUTH: status = arg >> 16; arg &= 0xffff; @@ -2169,6 +2036,195 @@ #undef HTFLAGS } +/* + * Send a probe response frame to the specified mac address. + * This does not go through the normal mgt frame api so we + * can specify the destination address and re-use the bss node + * for the sta reference. + */ +int +ieee80211_send_proberesp(struct ieee80211vap *vap, + const uint8_t da[IEEE80211_ADDR_LEN], int legacy) +{ + struct ieee80211_node *bss = vap->iv_bss; + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_frame *wh; + const struct ieee80211_rateset *rs; + struct mbuf *m; + uint16_t capinfo; + uint8_t *frm; + + if (vap->iv_state == IEEE80211_S_CAC) { + IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, bss, + "block %s frame in CAC state", "probe response"); + vap->iv_stats.is_tx_badstate++; + return EIO; /* XXX */ + } + + /* + * Hold a reference on the node so it doesn't go away until after + * the xmit is complete all the way in the driver. On error we + * will remove our reference. + */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, + "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", + __func__, __LINE__, + bss, ether_sprintf(bss->ni_macaddr), + ieee80211_node_refcnt(bss)+1); + ieee80211_ref_node(bss); + + /* + * probe response frame format + * [8] time stamp + * [2] beacon interval + * [2] cabability information + * [tlv] ssid + * [tlv] supported rates + * [tlv] parameter set (FH/DS) + * [tlv] parameter set (IBSS) + * [tlv] country (optional) + * [tlv] RSN (optional) + * [3] power control (optional) + * [5] channel switch announcement (CSA) (optional) + * [tlv] extended rate phy (ERP) + * [tlv] extended supported rates + * [tlv] HT capabilities + * [tlv] HT information + * [tlv] WPA (optional) + * [tlv] WME (optional) + * [tlv] Vendor OUI HT capabilities (optional) + * [tlv] Vendor OUI HT information (optional) + * [tlv] Atheros capabilities + * [tlv] AppIE's (optional) + */ + m = ieee80211_getmgtframe(&frm, + ic->ic_headroom + sizeof(struct ieee80211_frame), + 8 + + sizeof(uint16_t) + + sizeof(uint16_t) + + 2 + IEEE80211_NWID_LEN + + 2 + IEEE80211_RATE_SIZE + + 7 /* max(7,3) */ + + sizeof(struct ieee80211_country_ie) + + sizeof(struct ieee80211_ie_wpa) + + 3 + + sizeof(struct ieee80211_csa_ie) + + 3 + + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + + sizeof(struct ieee80211_ie_htcap) + + sizeof(struct ieee80211_ie_htinfo) + + sizeof(struct ieee80211_ie_wpa) + + sizeof(struct ieee80211_wme_param) + + 4 + sizeof(struct ieee80211_ie_htcap) + + 4 + sizeof(struct ieee80211_ie_htinfo) + + sizeof(struct ieee80211_ath_ie) + + (vap->iv_appie_proberesp != NULL ? + vap->iv_appie_proberesp->ie_len : 0) + ); + if (m == NULL) { + vap->iv_stats.is_tx_nobuf++; + ieee80211_free_node(bss); + return ENOMEM; + } + + memset(frm, 0, 8); /* timestamp should be filled later */ + frm += 8; + *(uint16_t *)frm = htole16(bss->ni_intval); + frm += 2; + capinfo = getcapinfo(vap, bss->ni_chan); + *(uint16_t *)frm = htole16(capinfo); + frm += 2; + + frm = ieee80211_add_ssid(frm, bss->ni_essid, bss->ni_esslen); + rs = ieee80211_get_suprates(ic, bss->ni_chan); + frm = ieee80211_add_rates(frm, rs); + + if (IEEE80211_IS_CHAN_FHSS(bss->ni_chan)) { + *frm++ = IEEE80211_ELEMID_FHPARMS; + *frm++ = 5; + *frm++ = bss->ni_fhdwell & 0x00ff; + *frm++ = (bss->ni_fhdwell >> 8) & 0x00ff; + *frm++ = IEEE80211_FH_CHANSET( + ieee80211_chan2ieee(ic, bss->ni_chan)); + *frm++ = IEEE80211_FH_CHANPAT( + ieee80211_chan2ieee(ic, bss->ni_chan)); + *frm++ = bss->ni_fhindex; + } else { + *frm++ = IEEE80211_ELEMID_DSPARMS; + *frm++ = 1; + *frm++ = ieee80211_chan2ieee(ic, bss->ni_chan); + } + + if (vap->iv_opmode == IEEE80211_M_IBSS) { + *frm++ = IEEE80211_ELEMID_IBSSPARMS; + *frm++ = 2; + *frm++ = 0; *frm++ = 0; /* TODO: ATIM window */ + } + if (vap->iv_flags & IEEE80211_F_DOTH) + frm = ieee80211_add_countryie(frm, ic); + if (vap->iv_flags & IEEE80211_F_WPA2) { + if (vap->iv_rsn_ie != NULL) + frm = add_ie(frm, vap->iv_rsn_ie); + /* XXX else complain? */ + } + if (vap->iv_flags & IEEE80211_F_DOTH) { + if (IEEE80211_IS_CHAN_5GHZ(bss->ni_chan)) + frm = ieee80211_add_powerconstraint(frm, vap); + if (ic->ic_flags & IEEE80211_F_CSAPENDING) + frm = ieee80211_add_csa(frm, vap); + } + if (IEEE80211_IS_CHAN_ANYG(bss->ni_chan)) + frm = ieee80211_add_erp(frm, ic); + frm = ieee80211_add_xrates(frm, rs); + /* + * NB: legacy 11b clients do not get certain ie's. + * The caller identifies such clients by passing + * a token in legacy to us. Could expand this to be + * any legacy client for stuff like HT ie's. + */ + if (IEEE80211_IS_CHAN_HT(bss->ni_chan) && + legacy != IEEE80211_SEND_LEGACY_11B) { + frm = ieee80211_add_htcap(frm, bss); + frm = ieee80211_add_htinfo(frm, bss); + } + if (vap->iv_flags & IEEE80211_F_WPA1) { + if (vap->iv_wpa_ie != NULL) + frm = add_ie(frm, vap->iv_wpa_ie); + /* XXX else complain? */ + } + if (vap->iv_flags & IEEE80211_F_WME) + frm = ieee80211_add_wme_param(frm, &ic->ic_wme); + if (IEEE80211_IS_CHAN_HT(bss->ni_chan) && + (vap->iv_flags_ext & IEEE80211_FEXT_HTCOMPAT) && + legacy != IEEE80211_SEND_LEGACY_11B) { + frm = ieee80211_add_htcap_vendor(frm, bss); + frm = ieee80211_add_htinfo_vendor(frm, bss); + } + if (bss->ni_ies.ath_ie != NULL && legacy != IEEE80211_SEND_LEGACY_11B) + frm = ieee80211_add_ath(frm, bss->ni_ath_flags, + bss->ni_ath_defkeyix); + if (vap->iv_appie_proberesp != NULL) + frm = add_appie(frm, vap->iv_appie_proberesp); + m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); + + M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT); + KASSERT(m != NULL, ("no room for header")); + + wh = mtod(m, struct ieee80211_frame *); + ieee80211_send_setup(bss, wh, + IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP, + vap->iv_myaddr, da, bss->ni_bssid); + /* XXX power management? */ + + IEEE80211_NODE_STAT(bss, tx_mgmt); + + IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, + wh->i_addr1, "send probe resp on channel %u", + ieee80211_chan2ieee(ic, ic->ic_curchan)); + + return ic->ic_raw_xmit(bss, m, NULL); +} + static void ieee80211_tx_mgt_timeout(void *arg) { ==== //depot/projects/vap/sys/net80211/ieee80211_proto.h#14 (text+ko) ==== @@ -89,6 +89,8 @@ const uint8_t da[IEEE80211_ADDR_LEN], const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t *ssid, size_t ssidlen); +int ieee80211_send_proberesp(struct ieee80211vap *, + const uint8_t da[IEEE80211_ADDR_LEN], int); struct mbuf *ieee80211_encap(struct ieee80211_node *, struct mbuf *); void ieee80211_reset_erp(struct ieee80211com *); From owner-p4-projects@FreeBSD.ORG Fri Feb 22 21:29:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 241D216A405; Fri, 22 Feb 2008 21:29:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C50E916A401 for ; Fri, 22 Feb 2008 21:28:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A70F413C448 for ; Fri, 22 Feb 2008 21:28:59 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MLSxFi064252 for ; Fri, 22 Feb 2008 21:28:59 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MLSxsv064249 for perforce@freebsd.org; Fri, 22 Feb 2008 21:28:59 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 21:28:59 GMT Message-Id: <200802222128.m1MLSxsv064249@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135985 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 21:29:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=135985 Change 135985 by kmacy@kmacy:entropy:iwarp on 2008/02/22 21:28:40 mark tcpcb as ESTABLISHED before calling soisconnected Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#17 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#17 (text+ko) ==== @@ -3424,9 +3424,9 @@ */ dst_confirm(sk->sk_dst_cache); #endif - soisconnected(so); tp->t_starttime = ticks; tp->t_state = TCPS_ESTABLISHED; + soisconnected(so); } static int From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:01:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 827F516A402; Fri, 22 Feb 2008 22:01:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E7A16A406 for ; Fri, 22 Feb 2008 22:01:34 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2C313C455 for ; Fri, 22 Feb 2008 22:01:34 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MM1YA9065837 for ; Fri, 22 Feb 2008 22:01:34 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MM1Ynh065834 for perforce@freebsd.org; Fri, 22 Feb 2008 22:01:34 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 22:01:34 GMT Message-Id: <200802222201.m1MM1Ynh065834@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135987 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:01:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=135987 Change 135987 by sam@sam_ebb on 2008/02/22 22:01:06 fix copyright; meant everything to be bsd-only Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_power.h#6 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_power.h#6 (text+ko) ==== @@ -10,12 +10,6 @@ * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:01:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C37D216A408; Fri, 22 Feb 2008 22:01:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84CB216A401 for ; Fri, 22 Feb 2008 22:01:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 61F7413C45A for ; Fri, 22 Feb 2008 22:01:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MM1Y3s065843 for ; Fri, 22 Feb 2008 22:01:34 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MM1YZZ065840 for perforce@freebsd.org; Fri, 22 Feb 2008 22:01:34 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 22:01:34 GMT Message-Id: <200802222201.m1MM1YZZ065840@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135988 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:01:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=135988 Change 135988 by sam@sam_ebb on 2008/02/22 22:01:17 purge dead comment Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#8 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_adhoc.c#8 (text+ko) ==== @@ -753,7 +753,6 @@ * [tlv] ssid * [tlv] supported rates * [tlv] extended supported rates - * [tlv] Atheros capabilities */ ssid = rates = xrates = NULL; sfrm = frm; From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:02:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 27D2416A406; Fri, 22 Feb 2008 22:02:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8E9016A401 for ; Fri, 22 Feb 2008 22:02:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C3A2813C45A for ; Fri, 22 Feb 2008 22:02:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MM2ZGA065910 for ; Fri, 22 Feb 2008 22:02:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MM2Zje065907 for perforce@freebsd.org; Fri, 22 Feb 2008 22:02:35 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 22:02:35 GMT Message-Id: <200802222202.m1MM2Zje065907@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135989 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:02:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=135989 Change 135989 by sam@sam_ebb on 2008/02/22 22:02:26 fix comments Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_proto.h#15 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_proto.h#15 (text+ko) ==== @@ -295,7 +295,7 @@ struct ieee80211_beacon_offsets *); /* - * Beacon frame updates are signaled through calls to ic_update_beacon + * Beacon frame updates are signaled through calls to iv_update_beacon * with one of the IEEE80211_BEACON_* tokens defined below. For devices * that construct beacon frames on the host this can trigger a rebuild * or defer the processing. For devices that offload beacon frame @@ -303,7 +303,7 @@ * array in the ieee80211_beacon_offsets structure is intended to record * deferred processing requirements; ieee80211_beacon_update uses the * state to optimize work. Since this structure is owned by the driver - * and not visible to the 802.11 layer drivers must supply an ic_update_beacon + * and not visible to the 802.11 layer drivers must supply an iv_update_beacon * callback that marks the flag bits and schedules (as necessary) an update. */ enum { From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:03:37 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 081FC16A408; Fri, 22 Feb 2008 22:03:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0A9816A400 for ; Fri, 22 Feb 2008 22:03:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA43913C458 for ; Fri, 22 Feb 2008 22:03:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MM3adw067146 for ; Fri, 22 Feb 2008 22:03:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MM3aOk067143 for perforce@freebsd.org; Fri, 22 Feb 2008 22:03:36 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 22:03:36 GMT Message-Id: <200802222203.m1MM3aOk067143@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135990 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:03:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=135990 Change 135990 by sam@sam_ebb on 2008/02/22 22:02:57 fix copyright to be bsd-only Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#9 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.c#9 (text+ko) ==== @@ -10,12 +10,6 @@ * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:03:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C58FA16A533; Fri, 22 Feb 2008 22:03:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E405216A406 for ; Fri, 22 Feb 2008 22:03:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DE8CC13C45B for ; Fri, 22 Feb 2008 22:03:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MM3aL9067152 for ; Fri, 22 Feb 2008 22:03:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MM3atp067149 for perforce@freebsd.org; Fri, 22 Feb 2008 22:03:36 GMT (envelope-from sam@freebsd.org) Date: Fri, 22 Feb 2008 22:03:36 GMT Message-Id: <200802222203.m1MM3atp067149@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 135991 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:03:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=135991 Change 135991 by sam@sam_ebb on 2008/02/22 22:03:17 another missed copyright Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#5 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_regdomain.h#5 (text+ko) ==== @@ -10,12 +10,6 @@ * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-p4-projects@FreeBSD.ORG Fri Feb 22 22:31:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D35516A408; Fri, 22 Feb 2008 22:31:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2060C16A405 for ; Fri, 22 Feb 2008 22:31:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 134F913C478 for ; Fri, 22 Feb 2008 22:31:07 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1MMV6jY069330 for ; Fri, 22 Feb 2008 22:31:06 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1MMV600069327 for perforce@freebsd.org; Fri, 22 Feb 2008 22:31:06 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 22 Feb 2008 22:31:06 GMT Message-Id: <200802222231.m1MMV600069327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 135995 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 22:31:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=135995 Change 135995 by kmacy@kmacy:entropy:iwarp on 2008/02/22 22:31:04 register listeners in the case where device is configured after the tom is loaded Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c#5 edit .. //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#9 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_listen.c#5 (text+ko) ==== @@ -180,7 +180,6 @@ return p; } -#if 0 /* * Given a pointer to a listening socket return its server TID by consulting * the socket->stid map. Returns -1 if the socket is not in the map. @@ -191,16 +190,15 @@ int stid = -1, bucket = listen_hashfn(so); struct listen_info *p; - spin_lock(&d->listen_lock); + mtx_lock(&d->listen_lock); for (p = d->listen_hash_tab[bucket]; p; p = p->next) - if (p->sk == sk) { + if (p->so == so) { stid = p->stid; break; } - spin_unlock(&d->listen_lock); + mtx_unlock(&d->listen_lock); return stid; } -#endif /* * Delete the listen_info structure for a listening socket. Returns the server @@ -244,6 +242,9 @@ if (!TOM_TUNABLE(dev, activated)) return; + if (listen_hash_find(d, so) != -1) + return; + CTR1(KTR_TOM, "start listen on port %u", ntohs(inp->inp_lport)); ctx = malloc(sizeof(*ctx), M_CXGB, M_NOWAIT|M_ZERO); ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/tom/cxgb_tom.c#9 (text+ko) ==== @@ -92,6 +92,8 @@ static struct mtx cxgb_list_lock; static int t3_toe_attach(struct toedev *dev, const struct offload_id *entry); +static void cxgb_register_listeners(void); + /* * Handlers for each CPL opcode */ @@ -262,6 +264,7 @@ /* Activate TCP offload device */ activate_offload(tdev); + cxgb_register_listeners(); return; out_free_all: @@ -443,8 +446,11 @@ t3_tom_init(void) { init_cpl_handlers(); - if (t3_init_cpl_io() < 0) + if (t3_init_cpl_io() < 0) { + log(LOG_ERR, + "Unable to initialize cpl io ops\n"); return -1; + } t3_init_socket_ops(); /* Register with the TOE device layer. */ @@ -467,7 +473,6 @@ /* Register to offloading devices */ t3c_tom_client.add = t3c_tom_add; cxgb_register_client(&t3c_tom_client); - cxgb_register_listeners(); return (0); } From owner-p4-projects@FreeBSD.ORG Sat Feb 23 00:06:47 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7D05D16A404; Sat, 23 Feb 2008 00:06:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4289016A400 for ; Sat, 23 Feb 2008 00:06:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5C213C4D5 for ; Sat, 23 Feb 2008 00:06:47 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N06lnO076316 for ; Sat, 23 Feb 2008 00:06:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N06lQ0076313 for perforce@freebsd.org; Sat, 23 Feb 2008 00:06:47 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 00:06:47 GMT Message-Id: <200802230006.m1N06lQ0076313@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135997 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 00:06:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=135997 Change 135997 by jb@jb_freebsd1 on 2008/02/23 00:06:24 Flesh out the printt() action. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#40 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#40 (text) ==== @@ -4509,14 +4509,15 @@ } case DIF_SUBR_TYPEREF: { - uintptr_t size = 3 * sizeof(uintptr_t); + uintptr_t size = 4 * sizeof(uintptr_t); uintptr_t *typeref = (uintptr_t *) P2ROUNDUP(mstate->dtms_scratch_ptr, sizeof(uintptr_t)); size_t scratch_size = ((uintptr_t) typeref - mstate->dtms_scratch_ptr) + size; - /* address, length, type */ + /* address, num_elements, type_str, type_len */ typeref[0] = tupregs[0].dttk_value; typeref[1] = tupregs[1].dttk_value; typeref[2] = tupregs[2].dttk_value; + typeref[3] = tupregs[3].dttk_value; regs[rd] = (uintptr_t) typeref; mstate->dtms_scratch_ptr += scratch_size; @@ -6067,30 +6068,53 @@ case DTRACEACT_PRINTT: { /* The DIF returns a 'typeref'. */ uintptr_t *typeref = (uintptr_t *)(uintptr_t) val; + char c = '\0' + 1; + size_t s; + + /* + * Get the type string length and round it + * up so that the data that follows is + * aligned for easy access. + */ + size_t typs = strlen((char *) typeref[2]) + 1; + typs = roundup(typs, sizeof(uintptr_t)); - /* Get the size from the typeref. */ - size = typeref[1]; + /* + *Get the size from the typeref using the + * number of elements and the type size. + */ + size = typeref[1] * typeref[3]; /* * Check if the size exceeds the allocated * buffer size. */ - if (size + sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) { + if (size + typs + 2 * sizeof(uintptr_t) > dp->dtdo_rtype.dtdt_size) { /* Flag a drop! */ *flags |= CPU_DTRACE_DROP; - continue; + } /* Store the size in the buffer first. */ DTRACE_STORE(uintptr_t, tomax, valoffs, size); + valoffs += sizeof(uintptr_t); - /* - * Offset the buffer address to the start - * of the data. - */ + /* Store the type size in the buffer. */ + DTRACE_STORE(uintptr_t, tomax, + valoffs, typeref[3]); valoffs += sizeof(uintptr_t); + val = typeref[2]; + + for (s = 0; s < typs; s++) { + if (c != '\0') + c = dtrace_load8(val++); + + DTRACE_STORE(uint8_t, tomax, + valoffs++, c); + } + /* * Reset to the memory address rather than * the typeref array, then let the BYREF From owner-p4-projects@FreeBSD.ORG Sat Feb 23 00:15:57 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2DFCA16A407; Sat, 23 Feb 2008 00:15:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E79DE16A405 for ; Sat, 23 Feb 2008 00:15:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E0FC113C457 for ; Sat, 23 Feb 2008 00:15:56 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N0Fu5e077507 for ; Sat, 23 Feb 2008 00:15:56 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N0FutH077504 for perforce@freebsd.org; Sat, 23 Feb 2008 00:15:56 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 00:15:56 GMT Message-Id: <200802230015.m1N0FutH077504@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135998 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 00:15:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=135998 Change 135998 by jb@jb_freebsd1 on 2008/02/23 00:15:15 For the time being, specify the string for the type description and the type size as parameters that must be coded. The hack is to munge them to mean what they would if they could be added as part of the parser code, but the parser code doesn't know how to add a couple of extra args on a function-specific basis. This is a design limitation that is difficult to code around (and one that I assume has prevented Sun's developers from coding this functionality). Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#26 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#26 (text) ==== @@ -399,7 +399,7 @@ { "trunc", DT_IDENT_ACTFUNC, 0, DT_ACT_TRUNC, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_func, "void(...)" }, { "typeref", DT_IDENT_FUNC, 0, DIF_SUBR_TYPEREF, DT_ATTR_STABCMN, DT_VERS_1_1, - &dt_idops_func, "uintptr_t *(void *, size_t)" }, + &dt_idops_func, "uintptr_t *(void *, size_t, string, size_t)" }, { "uaddr", DT_IDENT_ACTFUNC, 0, DT_ACT_UADDR, DT_ATTR_STABCMN, DT_VERS_1_2, &dt_idops_func, "_usymaddr(uintptr_t)" }, { "ucaller", DT_IDENT_SCALAR, 0, DIF_VAR_UCALLER, DT_ATTR_STABCMN, From owner-p4-projects@FreeBSD.ORG Sat Feb 23 00:17:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6DBA616A407; Sat, 23 Feb 2008 00:17:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD2216A415 for ; Sat, 23 Feb 2008 00:17:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 284F013C45D for ; Sat, 23 Feb 2008 00:17:59 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N0Hx4b077598 for ; Sat, 23 Feb 2008 00:17:59 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N0HxWv077595 for perforce@freebsd.org; Sat, 23 Feb 2008 00:17:59 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 00:17:59 GMT Message-Id: <200802230017.m1N0HxWv077595@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 135999 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 00:17:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=135999 Change 135999 by jb@jb_freebsd1 on 2008/02/23 00:17:24 Add a chyeck that the second arg to printt() is a typeref(). Ideally we'd just silently insert the typeref by munging the args passed to printt(), but the parser design pretty much limits that. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#11 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cc.c#11 (text) ==== @@ -994,10 +994,11 @@ "be a non-zero positive integral constant expression\n"); } - if (dt_node_is_pointer(addr) == 0) { + if (addr == NULL || addr->dn_kind != DT_NODE_FUNC || + addr->dn_ident != dt_idhash_lookup(dtp->dt_globals, "typeref")) { dnerror(addr, D_PRINTT_ADDR, "printt( ) argument #2 is incompatible with " - "prototype:\n\tprototype: pointer\n" + "prototype:\n\tprototype: typeref()\n" "\t argument: %s\n", dt_node_type_name(addr, n, sizeof (n))); } @@ -1007,7 +1008,15 @@ ap->dtad_kind = DTRACEACT_PRINTT; ap->dtad_difo->dtdo_rtype.dtdt_flags |= DIF_TF_BYREF; - ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value + sizeof(uintptr_t); + + /* + * Allow additional buffer space for the data size, type size, + * type string length and a stab in the dark (32 bytes) for the + * type string. The type string is part of the typeref() that + * this action references. + */ + ap->dtad_difo->dtdo_rtype.dtdt_size = size->dn_value + 3 * sizeof(uintptr_t) + 32; + } static void From owner-p4-projects@FreeBSD.ORG Sat Feb 23 00:21:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B21A116A409; Sat, 23 Feb 2008 00:21:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EC8816A407 for ; Sat, 23 Feb 2008 00:21:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5746D13C43E for ; Sat, 23 Feb 2008 00:21:04 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N0L4vO077779 for ; Sat, 23 Feb 2008 00:21:04 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N0L4Rt077771 for perforce@freebsd.org; Sat, 23 Feb 2008 00:21:04 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 00:21:04 GMT Message-Id: <200802230021.m1N0L4Rt077771@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 136000 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 00:21:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=136000 Change 136000 by jb@jb_freebsd1 on 2008/02/23 00:20:36 Add a hack to whip a couple of the dummy args to typeref() into shape by replacing the string with one containing the type string and the integer with the type size. Yes, this is a hack to get some functionality I really, really, want but the DTrace parser design doesn't really allow for. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#12 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#12 (text) ==== @@ -1339,6 +1339,31 @@ } static void +dt_cg_func_typeref(dt_node_t *dnp) +{ + dt_node_t *addr = dnp->dn_args; + dt_node_t *nelm = addr->dn_list; + dt_node_t *strp = nelm->dn_list; + dt_node_t *typs = strp->dn_list; + char buf[DT_TYPE_NAMELEN]; + + ctf_type_name(addr->dn_ctfp, addr->dn_type, buf, sizeof (buf)); + + /* + * XXX Hack alert! XXX + * The prototype has two dummy args that we munge to represent + * the type string and the type size. + * + * Yes, I hear your grumble, but it works for now. We'll come + * up with a more elegant implementation later. :-) + */ + free(strp->dn_string); + strp->dn_string = strdup(buf); + + typs->dn_value = ctf_type_size(addr->dn_ctfp, addr->dn_type); +} + +static void dt_cg_node(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp) { ctf_file_t *ctfp = dnp->dn_ctfp; @@ -1801,11 +1826,13 @@ dt_idkind_name(idp->di_kind), idp->di_name); } - if (idp->di_id == DIF_SUBR_TYPEREF) { - dt_node_t *size = dnp->dn_args; - char buf[64]; - ctf_type_name(size->dn_ctfp, size->dn_type, buf, sizeof (buf)); -printf("%s(%d); %s %s( ) '%s'<----- DIF_SUBR_TYPEREF\n",__func__,__LINE__,dt_idkind_name(idp->di_kind), idp->di_name,buf); + switch (idp->di_id) { + case DIF_SUBR_TYPEREF: + dt_cg_func_typeref(dnp); + break; + + default: + break; } dt_cg_arglist(dnp->dn_ident, dnp->dn_args, dlp, drp); From owner-p4-projects@FreeBSD.ORG Sat Feb 23 00:30:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 178DB16A405; Sat, 23 Feb 2008 00:30:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFDF316A401 for ; Sat, 23 Feb 2008 00:30:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C79C513C43E for ; Sat, 23 Feb 2008 00:30:14 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N0UE5s080640 for ; Sat, 23 Feb 2008 00:30:14 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N0UEE5080634 for perforce@freebsd.org; Sat, 23 Feb 2008 00:30:14 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 00:30:14 GMT Message-Id: <200802230030.m1N0UEE5080634@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 136001 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 00:30:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=136001 Change 136001 by jb@jb_freebsd1 on 2008/02/23 00:29:21 Consume the incoming printt() data. This is WIP. I need to consume the buffered data by printing it based on the member types obtained from the CTF data. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#14 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#14 (text) ==== @@ -810,6 +810,65 @@ nbytes, 50, quiet, 1)); } +int +dt_print_type(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr) +{ + dtrace_typeinfo_t dtt; + char *p; + int num = 0; + int quiet = (dtp->dt_options[DTRACEOPT_QUIET] != DTRACEOPT_UNSET); + + /* Get the total number of bytes of data buffered. */ + size_t nbytes = *((uintptr_t *) addr); + addr += sizeof(uintptr_t); + + /* + * Get the size of the type so that we can check that it matches + * the CTF data we look up and so that we can figure out how many + * type elements are buffered. + */ + size_t typs = *((uintptr_t *) addr); + addr += sizeof(uintptr_t); + + /* + * Point to the type string in the buffer. Get it's string + * length and round it up to become the offset to the start + * of the buffered type data which we would like to be aligned + * for easy access. + */ + char *strp = (char *) addr; + int offset = roundup(strlen(strp) + 1, sizeof(uintptr_t)); + + /* + * The type string might have a format such as 'int [20]'. + * Check if there is an array dimension present. + */ + if ((p = strchr(strp, '[')) != NULL) { + /* Strip off the array dimension. */ + *p++ = '\0'; + + for (; *p != '\0' && *p != ']'; p++) + num = num * 10 + *p - '0'; + } else + /* No array dimension, so default. */ + num = 1; + + /* Lookup the CTF type from the type string. */ + if (dtrace_lookup_by_type(dtp, DTRACE_OBJ_EVERY, strp, &dtt) < 0) + return (-1); + + /* Offset the buffer address to the start of the data... */ + addr += offset; + + /* + * XXX Here we need code to expand the type and print the data + * elements based on the member types. + */ + + /* XXX Just print the data for now. */ + return (dt_print_bytes(dtp, fp, addr, nbytes, 50, quiet, 1)); +} + static int dt_print_sym(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { @@ -1507,6 +1566,12 @@ goto nextrec; } + if (act == DTRACEACT_PRINTT) { + if (dt_print_type(dtp, fp, addr) < 0) + return (-1); + goto nextrec; + } + if (DTRACEACT_ISPRINTFLIKE(act)) { void *fmtdata; int (*func)(dtrace_hdl_t *, FILE *, void *, From owner-p4-projects@FreeBSD.ORG Sat Feb 23 01:40:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8179F16A405; Sat, 23 Feb 2008 01:40:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E47516A400 for ; Sat, 23 Feb 2008 01:40:29 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 207CE13C467 for ; Sat, 23 Feb 2008 01:40:29 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N1eToV095781 for ; Sat, 23 Feb 2008 01:40:29 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N1eSRQ095778 for perforce@freebsd.org; Sat, 23 Feb 2008 01:40:28 GMT (envelope-from sam@freebsd.org) Date: Sat, 23 Feb 2008 01:40:28 GMT Message-Id: <200802230140.m1N1eSRQ095778@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 136005 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 01:40:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=136005 Change 136005 by sam@sam_ebb on 2008/02/23 01:39:39 Update power save support: o change iv_set_tim to return an indication whether the TIM state changed for the station so drivers can easily tell if they need to push the change to their device o add iv_update_ps callback to notify drivers when the power occupancy of the BSS changed; useful for drivers that want to notify outboard devices when to buffer mcast frames and also should be used to flush any multicast frames being held for xmit at DTIM o call if_start on the vap when flushing frames from the ps q o reorder operations in ieee80211_node_pwrsave so when a station exits ps the beacon state is updated before the ps q is flushed; this is intended to guard against beacons going out with stale TIM state Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_power.c#10 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#30 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_power.c#10 (text+ko) ==== @@ -45,7 +45,8 @@ #include -static void ieee80211_set_tim(struct ieee80211_node *ni, int set); +static void ieee80211_update_ps(struct ieee80211vap *, int); +static int ieee80211_set_tim(struct ieee80211_node *, int); MALLOC_DEFINE(M_80211_POWER, "80211power", "802.11 power save state"); @@ -65,6 +66,7 @@ if (vap->iv_opmode == IEEE80211_M_HOSTAP || vap->iv_opmode == IEEE80211_M_IBSS) { /* NB: driver should override */ + vap->iv_update_ps = ieee80211_update_ps; vap->iv_set_tim = ieee80211_set_tim; } } @@ -155,14 +157,27 @@ } /* + * Handle a change in the PS station occupancy. + */ +static void +ieee80211_update_ps(struct ieee80211vap *vap, int nsta) +{ + + KASSERT(vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_IBSS, + ("operating mode %u", vap->iv_opmode)); +} + +/* * Indicate whether there are frames queued for a station in power-save mode. */ -static void +static int ieee80211_set_tim(struct ieee80211_node *ni, int set) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; uint16_t aid; + int changed; KASSERT(vap->iv_opmode == IEEE80211_M_HOSTAP || vap->iv_opmode == IEEE80211_M_IBSS, @@ -173,7 +188,8 @@ ("bogus aid %u, max %u", aid, vap->iv_max_aid)); IEEE80211_LOCK(ic); - if (set != (isset(vap->iv_tim_bitmap, aid) != 0)) { + changed = (set != (isset(vap->iv_tim_bitmap, aid) != 0)); + if (changed) { if (set) { setbit(vap->iv_tim_bitmap, aid); vap->iv_ps_pending++; @@ -185,6 +201,8 @@ vap->iv_update_beacon(vap, IEEE80211_BEACON_TIM); } IEEE80211_UNLOCK(ic); + + return changed; } /* @@ -263,9 +281,10 @@ IEEE80211_NODE_SAVEQ_UNLOCK(ni); if (mhead != NULL) { /* XXX need different driver interface */ - /* XXX bypasses q max */ + /* XXX bypasses q max and OACTIVE */ struct ifnet *ifp = ni->ni_vap->iv_ifp; IF_PREPEND_LIST(&ifp->if_snd, mhead, mtail, mcount); + if_start(ifp); } } @@ -276,26 +295,38 @@ ieee80211_node_pwrsave(struct ieee80211_node *ni, int enable) { struct ieee80211vap *vap = ni->ni_vap; + int update; + update = 0; if (enable) { - if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) + if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { vap->iv_ps_sta++; + update = 1; + } ni->ni_flags |= IEEE80211_NODE_PWR_MGT; IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "power save mode on, %u sta's in ps mode", vap->iv_ps_sta); - return; - } - if (ni->ni_flags & IEEE80211_NODE_PWR_MGT) - vap->iv_ps_sta--; - ni->ni_flags &= ~IEEE80211_NODE_PWR_MGT; - IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, - "power save mode off, %u sta's in ps mode", vap->iv_ps_sta); - /* XXX if no stations in ps mode, flush mc frames */ + if (update) + vap->iv_update_ps(vap, vap->iv_ps_sta); + } else { + if (ni->ni_flags & IEEE80211_NODE_PWR_MGT) { + vap->iv_ps_sta--; + update = 1; + } + ni->ni_flags &= ~IEEE80211_NODE_PWR_MGT; + IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, + "power save mode off, %u sta's in ps mode", vap->iv_ps_sta); - pwrsave_flushq(ni); - if (vap->iv_set_tim != NULL) - vap->iv_set_tim(ni, 0); + /* NB: order here is intentional so TIM is clear before flush */ + if (vap->iv_set_tim != NULL) + vap->iv_set_tim(ni, 0); + if (update) { + /* NB if no sta's in ps, driver should flush mc q */ + vap->iv_update_ps(vap, vap->iv_ps_sta); + } + pwrsave_flushq(ni); + } } /* ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#30 (text+ko) ==== @@ -343,7 +343,6 @@ uint8_t iv_dtim_period; /* DTIM period */ uint8_t iv_dtim_count; /* DTIM count from last bcn */ /* set/unset aid pwrsav state */ - void (*iv_set_tim)(struct ieee80211_node *, int); int iv_csa_count; /* count for doing CSA */ struct ieee80211_node *iv_bss; /* information for this node */ @@ -401,6 +400,9 @@ int (*iv_reset)(struct ieee80211vap *, u_long); /* [schedule] beacon frame update */ void (*iv_update_beacon)(struct ieee80211vap *, int); + /* power save handling */ + void (*iv_update_ps)(struct ieee80211vap *, int); + int (*iv_set_tim)(struct ieee80211_node *, int); /* state machine processing */ int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); From owner-p4-projects@FreeBSD.ORG Sat Feb 23 01:47:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 36B9E16A408; Sat, 23 Feb 2008 01:47:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D1516A400 for ; Sat, 23 Feb 2008 01:47:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C9C5213C448 for ; Sat, 23 Feb 2008 01:47:37 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1N1lbb4096014 for ; Sat, 23 Feb 2008 01:47:37 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1N1lbLT096011 for perforce@freebsd.org; Sat, 23 Feb 2008 01:47:37 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Feb 2008 01:47:37 GMT Message-Id: <200802230147.m1N1lbLT096011@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 136006 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 01:47:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=136006 Change 136006 by jb@jb_freebsd1 on 2008/02/23 01:46:57 We need to get the size of the type we're pointing to rather than the size of the pointer. Oops. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#13 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#13 (text) ==== @@ -1339,13 +1339,15 @@ } static void -dt_cg_func_typeref(dt_node_t *dnp) +dt_cg_func_typeref(dtrace_hdl_t *dtp, dt_node_t *dnp) { + dtrace_typeinfo_t dtt; dt_node_t *addr = dnp->dn_args; dt_node_t *nelm = addr->dn_list; dt_node_t *strp = nelm->dn_list; dt_node_t *typs = strp->dn_list; char buf[DT_TYPE_NAMELEN]; + char *p; ctf_type_name(addr->dn_ctfp, addr->dn_type, buf, sizeof (buf)); @@ -1358,9 +1360,16 @@ * up with a more elegant implementation later. :-) */ free(strp->dn_string); + + if ((p = strchr(buf, '*')) != NULL) + *p = '\0'; + strp->dn_string = strdup(buf); - typs->dn_value = ctf_type_size(addr->dn_ctfp, addr->dn_type); + if (dtrace_lookup_by_type(dtp, DTRACE_OBJ_EVERY, buf, &dtt) < 0) + return; + + typs->dn_value = ctf_type_size(dtt.dtt_ctfp, dtt.dtt_type); } static void @@ -1818,7 +1827,9 @@ } switch (dnp->dn_kind) { - case DT_NODE_FUNC: + case DT_NODE_FUNC: { + dtrace_hdl_t *dtp = yypcb->pcb_hdl; + if ((idp = dnp->dn_ident)->di_kind != DT_IDENT_FUNC) { dnerror(dnp, D_CG_EXPR, "%s %s( ) may not be " "called from a D expression (D program " @@ -1828,7 +1839,7 @@ switch (idp->di_id) { case DIF_SUBR_TYPEREF: - dt_cg_func_typeref(dnp); + dt_cg_func_typeref(dtp, dnp); break; default: @@ -1847,6 +1858,7 @@ dt_cg_node_alloc(DT_LBL_NONE, instr)); break; + } case DT_NODE_VAR: if (dnp->dn_ident->di_kind == DT_IDENT_XLSOU || From owner-p4-projects@FreeBSD.ORG Sat Feb 23 18:07:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7DEF916A406; Sat, 23 Feb 2008 18:07:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29FE016A404 for ; Sat, 23 Feb 2008 18:07:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2102A13C43E for ; Sat, 23 Feb 2008 18:07:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NI7LCl012604 for ; Sat, 23 Feb 2008 18:07:21 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NI7HQX012601 for perforce@freebsd.org; Sat, 23 Feb 2008 18:07:17 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 18:07:17 GMT Message-Id: <200802231807.m1NI7HQX012601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136019 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 18:07:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=136019 Change 136019 by marcel@marcel_cluster on 2008/02/23 18:06:30 IFC @136018 Affected files ... .. //depot/projects/e500/gnu/usr.bin/binutils/ar/Makefile#2 integrate .. //depot/projects/e500/gnu/usr.bin/binutils/ranlib/Makefile#2 integrate .. //depot/projects/e500/lib/libc/sys/mq_close.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_getattr.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_notify.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_open.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_receive.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_send.2#3 integrate .. //depot/projects/e500/lib/libc/sys/mq_setattr.2#3 integrate .. //depot/projects/e500/lib/msun/bsdsrc/b_exp.c#2 integrate .. //depot/projects/e500/lib/msun/bsdsrc/b_log.c#2 integrate .. //depot/projects/e500/lib/msun/bsdsrc/b_tgamma.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_acos.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_acosf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_acosh.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_acoshf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_asin.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_asinf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_atan2.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_atan2f.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_atanh.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_atanhf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_cosh.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_coshf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_exp.c#4 integrate .. //depot/projects/e500/lib/msun/src/e_expf.c#4 integrate .. //depot/projects/e500/lib/msun/src/e_fmod.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_fmodf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_gamma.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_gamma_r.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_gammaf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_gammaf_r.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_j0.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_j0f.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_j1.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_j1f.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_jn.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_jnf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_lgamma.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_lgamma_r.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_lgammaf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_lgammaf_r.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_log.c#3 integrate .. //depot/projects/e500/lib/msun/src/e_log10.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_log10f.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_logf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2.c#4 integrate .. //depot/projects/e500/lib/msun/src/e_rem_pio2f.c#4 integrate .. //depot/projects/e500/lib/msun/src/e_scalb.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_scalbf.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_sinh.c#2 integrate .. //depot/projects/e500/lib/msun/src/e_sinhf.c#2 integrate .. //depot/projects/e500/lib/msun/src/k_cosf.c#2 integrate .. //depot/projects/e500/lib/msun/src/k_sinf.c#2 integrate .. //depot/projects/e500/lib/msun/src/k_tan.c#2 integrate .. //depot/projects/e500/lib/msun/src/k_tanf.c#2 integrate .. //depot/projects/e500/lib/msun/src/math_private.h#5 integrate .. //depot/projects/e500/lib/msun/src/s_asinh.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_asinhf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_atan.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_atanf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_cbrt.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_cbrtf.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_ceilf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_copysign.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_copysignf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_cosf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_erf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_erff.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_exp2.c#4 integrate .. //depot/projects/e500/lib/msun/src/s_exp2f.c#4 integrate .. //depot/projects/e500/lib/msun/src/s_fabsf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_finite.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_finitef.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_floorf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_frexp.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_frexpf.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_ilogb.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_ilogbf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_ilogbl.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_logbf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_modff.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_nextafter.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_nextafterf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_nextafterl.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_nexttoward.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_nexttowardf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_rint.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_rintf.c#3 integrate .. //depot/projects/e500/lib/msun/src/s_rintl.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_significand.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_significandf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_sinf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_tanf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_tanh.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_tanhf.c#2 integrate .. //depot/projects/e500/lib/msun/src/s_trunc.c#3 integrate .. //depot/projects/e500/lib/msun/src/w_cabs.c#3 integrate .. //depot/projects/e500/sbin/ipfw/ipfw2.c#9 integrate .. //depot/projects/e500/share/man/man4/ip6.4#2 integrate .. //depot/projects/e500/share/mk/bsd.libnames.mk#4 integrate .. //depot/projects/e500/sys/boot/powerpc/ofw/Makefile#7 integrate .. //depot/projects/e500/sys/boot/uboot/common/main.c#8 integrate .. //depot/projects/e500/sys/boot/uboot/lib/Makefile#10 integrate .. //depot/projects/e500/sys/boot/uboot/lib/api_public.h#6 integrate .. //depot/projects/e500/sys/boot/uboot/lib/glue.c#7 integrate .. //depot/projects/e500/sys/boot/uboot/lib/glue.h#2 integrate .. //depot/projects/e500/sys/compat/linux/linux_misc.c#9 integrate .. //depot/projects/e500/sys/compat/linux/linux_misc.h#2 integrate .. //depot/projects/e500/sys/dev/bce/if_bce.c#6 integrate .. //depot/projects/e500/sys/dev/bce/if_bcefw.h#4 integrate .. //depot/projects/e500/sys/dev/bce/if_bcereg.h#5 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_ael1002.c#4 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_common.h#5 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_ctl_defs.h#4 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_firmware_exports.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_mc5.c#4 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_mv88e1xxx.c#3 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_regs.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_t3_cpl.h#6 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_t3_hw.c#5 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_tcb.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_version.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_vsc8211.c#4 integrate .. //depot/projects/e500/sys/dev/cxgb/common/cxgb_xgmac.c#5 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_adapter.h#8 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_ioctl.h#4 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_l2t.c#6 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_l2t.h#5 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_main.c#10 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_multiq.c#2 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_offload.c#5 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_osdep.h#8 integrate .. //depot/projects/e500/sys/dev/cxgb/cxgb_sge.c#9 integrate .. //depot/projects/e500/sys/dev/cxgb/sys/cxgb_support.c#3 integrate .. //depot/projects/e500/sys/dev/cxgb/sys/mbufq.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/sys/mvec.h#6 integrate .. //depot/projects/e500/sys/dev/cxgb/sys/uipc_mvec.c#5 integrate .. //depot/projects/e500/sys/dev/cxgb/t3cdev.h#3 integrate .. //depot/projects/e500/sys/dev/cxgb/t3fw-4.7.0.bin.gz.uu#2 delete .. //depot/projects/e500/sys/dev/cxgb/t3fw-5.0.0.bin.gz.uu#1 branch .. //depot/projects/e500/sys/dev/cxgb/ulp/toecore/cxgb_toedev.h#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#4 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#1 branch .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_defs.h#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_listen.c#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tcp_subr.c#2 delete .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tcp_usrreq.c#2 delete .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tom.c#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tom.h#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#2 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_vm.c#1 branch .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_vm.h#1 branch .. //depot/projects/e500/sys/dev/usb/umass.c#5 integrate .. //depot/projects/e500/sys/dev/usb/usbdevs#9 integrate .. //depot/projects/e500/sys/kern/kern_descrip.c#8 integrate .. //depot/projects/e500/sys/kern/kern_ktrace.c#7 integrate .. //depot/projects/e500/sys/kern/uipc_syscalls.c#8 integrate .. //depot/projects/e500/sys/kern/vfs_syscalls.c#8 integrate .. //depot/projects/e500/sys/modules/cxgb/cxgb/Makefile#5 integrate .. //depot/projects/e500/sys/modules/cxgb/tom/Makefile#3 integrate .. //depot/projects/e500/sys/modules/geom/geom_eli/Makefile#2 integrate .. //depot/projects/e500/sys/modules/hwpmc/Makefile#2 integrate .. //depot/projects/e500/sys/modules/sound/driver/emu10kx/Makefile#3 integrate .. //depot/projects/e500/sys/modules/zfs/Makefile#5 integrate .. //depot/projects/e500/sys/netinet/sctp_output.c#8 integrate .. //depot/projects/e500/sys/netinet/sctp_pcb.c#9 integrate .. //depot/projects/e500/sys/sys/ktrace.h#2 integrate .. //depot/projects/e500/sys/sys/param.h#10 integrate .. //depot/projects/e500/usr.bin/Makefile#6 integrate .. //depot/projects/e500/usr.bin/ar/Makefile#1 branch .. //depot/projects/e500/usr.bin/ar/ar.1#1 branch .. //depot/projects/e500/usr.bin/ar/ar.c#1 branch .. //depot/projects/e500/usr.bin/ar/ar.h#1 branch .. //depot/projects/e500/usr.bin/ar/read.c#1 branch .. //depot/projects/e500/usr.bin/ar/util.c#1 branch .. //depot/projects/e500/usr.bin/ar/write.c#1 branch .. //depot/projects/e500/usr.bin/find/extern.h#2 integrate .. //depot/projects/e500/usr.bin/find/find.1#2 integrate .. //depot/projects/e500/usr.bin/find/find.h#2 integrate .. //depot/projects/e500/usr.bin/find/function.c#2 integrate .. //depot/projects/e500/usr.bin/find/option.c#2 integrate .. //depot/projects/e500/usr.bin/kdump/kdump.1#2 integrate .. //depot/projects/e500/usr.bin/kdump/kdump.c#5 integrate .. //depot/projects/e500/usr.bin/kdump/mksubr#3 integrate .. //depot/projects/e500/usr.bin/ktrace/ktrace.1#2 integrate .. //depot/projects/e500/usr.bin/ktrace/ktrace.h#2 integrate .. //depot/projects/e500/usr.bin/ktrace/subr.c#2 integrate .. //depot/projects/e500/usr.sbin/pmcstat/Makefile#4 integrate .. //depot/projects/e500/usr.sbin/pw/pw.8#3 integrate .. //depot/projects/e500/usr.sbin/pw/pw.c#2 integrate .. //depot/projects/e500/usr.sbin/pw/pw_group.c#2 integrate .. //depot/projects/e500/usr.sbin/sa/db.c#3 integrate .. //depot/projects/e500/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8#3 integrate Differences ... ==== //depot/projects/e500/gnu/usr.bin/binutils/ar/Makefile#2 (text+ko) ==== @@ -1,10 +1,15 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.13 2004/12/21 09:59:40 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/ar/Makefile,v 1.16 2008/02/21 16:59:02 obrien Exp $ .include "../Makefile.inc0" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc +.if defined(WITH_BSDAR) +PROG= gnu-ar +#MAN= gnu-ar.1 +.else PROG= ar +.endif SRCS= ar.c not-ranlib.c CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils ==== //depot/projects/e500/gnu/usr.bin/binutils/ranlib/Makefile#2 (text+ko) ==== @@ -1,10 +1,15 @@ -# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.14 2004/12/21 09:59:41 ru Exp $ +# $FreeBSD: src/gnu/usr.bin/binutils/ranlib/Makefile,v 1.17 2008/02/21 16:59:02 obrien Exp $ .include "../Makefile.inc0" .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc +.if defined(WITH_BSDAR) +PROG= gnu-ranlib +#MAN= gnu-ranlib.1 +.else PROG= ranlib +.endif SRCS= ar.c is-ranlib.c CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils ==== //depot/projects/e500/lib/libc/sys/mq_close.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_close.2,v 1.4 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_close.2,v 1.5 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_CLOSE 2 @@ -83,3 +93,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_getattr.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_getattr.2,v 1.4 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_getattr.2,v 1.5 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_GETATTR 2 @@ -105,3 +115,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_notify.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_notify.2,v 1.8 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_notify.2,v 1.9 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_NOTIFY 2 @@ -129,3 +139,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_open.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_open.2,v 1.8 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_open.2,v 1.9 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_OPEN 2 @@ -301,3 +311,13 @@ it must begin with a slash .Pq Ql / and contain no other slash characters. +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_receive.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_receive.2,v 1.5 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_receive.2,v 1.6 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_RECEIVE 2 @@ -195,3 +205,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_send.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_send.2,v 1.4 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_send.2,v 1.5 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_SEND 2 @@ -214,3 +224,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/libc/sys/mq_setattr.2#3 (text+ko) ==== @@ -25,7 +25,17 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/mq_setattr.2,v 1.5 2007/06/18 01:50:03 davidxu Exp $ +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2003 Edition, Standard for Information +.\" Technology -- Portable Operating System Interface (POSIX), The Open +.\" Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +.\" Institute of Electrical and Electronics Engineers, Inc and The Open +.\" Group. In the event of any discrepancy between this version and the +.\" original IEEE and The Open Group Standard, the original IEEE and The +.\" Open Group Standard is the referee document. The original Standard can +.\" be obtained online at http://www.opengroup.org/unix/online.html . +.\" +.\" $FreeBSD: src/lib/libc/sys/mq_setattr.2,v 1.6 2008/02/21 19:16:57 philip Exp $ .\" .Dd November 29, 2005 .Dt MQ_SETATTR 2 @@ -101,3 +111,13 @@ .Tn POSIX message queues first appeared in .Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2003 Edition, Standard for Information +Technology -- Portable Operating System Interface (POSIX), The Open +Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the +Institute of Electrical and Electronics Engineers, Inc and The Open +Group. In the event of any discrepancy between this version and the +original IEEE and The Open Group Standard, the original IEEE and The +Open Group Standard is the referee document. The original Standard can +be obtained online at http://www.opengroup.org/unix/online.html . ==== //depot/projects/e500/lib/msun/bsdsrc/b_exp.c#2 (text+ko) ==== @@ -31,11 +31,9 @@ * SUCH DAMAGE. */ -#ifndef lint -static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 6/4/93"; -#endif /* not lint */ +/* @(#)exp.c 8.1 (Berkeley) 6/4/93 */ #include -__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_exp.c,v 1.7 2004/12/16 20:40:37 das Exp $"); +__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_exp.c,v 1.8 2008/02/22 02:26:51 das Exp $"); /* EXP(X) ==== //depot/projects/e500/lib/msun/bsdsrc/b_log.c#2 (text+ko) ==== @@ -31,11 +31,9 @@ * SUCH DAMAGE. */ -#ifndef lint -static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93"; -#endif /* not lint */ +/* @(#)log.c 8.2 (Berkeley) 11/30/93 */ #include -__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_log.c,v 1.8 2005/09/19 11:28:19 bde Exp $"); +__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_log.c,v 1.9 2008/02/22 02:26:51 das Exp $"); #include #include ==== //depot/projects/e500/lib/msun/bsdsrc/b_tgamma.c#2 (text+ko) ==== @@ -31,11 +31,9 @@ * SUCH DAMAGE. */ -#ifndef lint -static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93"; -#endif /* not lint */ +/* @(#)gamma.c 8.1 (Berkeley) 6/4/93 */ #include -__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_tgamma.c,v 1.9 2007/05/02 15:24:49 bde Exp $"); +__FBSDID("$FreeBSD: src/lib/msun/bsdsrc/b_tgamma.c,v 1.10 2008/02/22 02:26:51 das Exp $"); /* * This code by P. McIlroy, Oct 1992; ==== //depot/projects/e500/lib/msun/src/e_acos.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acos.c,v 1.10 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_acos.c,v 1.11 2008/02/22 02:30:34 das Exp $"); /* __ieee754_acos(x) * Method : ==== //depot/projects/e500/lib/msun/src/e_acosf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.8 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_acosh.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acosh.c,v 1.8 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_acosh.c,v 1.9 2008/02/22 02:30:34 das Exp $"); /* __ieee754_acosh(x) * Method : ==== //depot/projects/e500/lib/msun/src/e_acoshf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_acoshf.c,v 1.7 2002/05/28 17:03:12 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_acoshf.c,v 1.8 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_asin.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asin.c,v 1.11 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_asin.c,v 1.12 2008/02/22 02:30:34 das Exp $"); /* __ieee754_asin(x) * Method : ==== //depot/projects/e500/lib/msun/src/e_asinf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.9 2005/12/04 13:52:46 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.10 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_atan2.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2.c,v 1.10 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_atan2.c,v 1.11 2008/02/22 02:30:36 das Exp $"); /* __ieee754_atan2(y,x) * Method : ==== //depot/projects/e500/lib/msun/src/e_atan2f.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atan2f.c,v 1.7 2004/06/02 17:09:05 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_atan2f.c,v 1.8 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_atanh.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanh.c,v 1.7 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_atanh.c,v 1.8 2008/02/22 02:30:34 das Exp $"); /* __ieee754_atanh(x) * Method : ==== //depot/projects/e500/lib/msun/src/e_atanhf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_atanhf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_atanhf.c,v 1.7 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_cosh.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_cosh.c,v 1.8 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_cosh.c,v 1.9 2008/02/22 02:30:34 das Exp $"); /* __ieee754_cosh(x) * Method : ==== //depot/projects/e500/lib/msun/src/e_coshf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_coshf.c,v 1.7 2005/11/13 00:08:23 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_coshf.c,v 1.8 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_exp.c#4 (text+ko) ==== @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_exp.c,v 1.12 2008/02/17 21:53:19 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_exp.c,v 1.13 2008/02/22 02:30:34 das Exp $"); /* __ieee754_exp(x) * Returns the exponential of x. ==== //depot/projects/e500/lib/msun/src/e_expf.c#4 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_expf.c,v 1.13 2008/02/07 03:17:05 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_expf.c,v 1.14 2008/02/22 02:30:34 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_fmod.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmod.c,v 1.9 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_fmod.c,v 1.10 2008/02/22 02:30:34 das Exp $"); /* * __ieee754_fmod(x,y) ==== //depot/projects/e500/lib/msun/src/e_fmodf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_fmodf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_fmodf.c,v 1.7 2008/02/22 02:30:34 das Exp $"); /* * __ieee754_fmodf(x,y) ==== //depot/projects/e500/lib/msun/src/e_gamma.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.7 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.8 2008/02/22 02:30:34 das Exp $"); /* __ieee754_gamma(x) * Return the logarithm of the Gamma function of x. ==== //depot/projects/e500/lib/msun/src/e_gamma_r.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.7 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.8 2008/02/22 02:30:34 das Exp $"); /* __ieee754_gamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function ==== //depot/projects/e500/lib/msun/src/e_gammaf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.6 2002/05/28 17:03:12 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.7 2008/02/22 02:30:35 das Exp $"); /* __ieee754_gammaf(x) * Return the logarithm of the Gamma function of x. ==== //depot/projects/e500/lib/msun/src/e_gammaf_r.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.7 2002/05/28 18:15:03 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.8 2008/02/22 02:30:35 das Exp $"); /* __ieee754_gammaf_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function ==== //depot/projects/e500/lib/msun/src/e_j0.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0.c,v 1.8 2005/02/04 18:26:05 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_j0.c,v 1.9 2008/02/22 02:30:35 das Exp $"); /* __ieee754_j0(x), __ieee754_y0(x) * Bessel function of the first and second kinds of order zero. ==== //depot/projects/e500/lib/msun/src/e_j0f.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.7 2002/05/28 18:15:03 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_j0f.c,v 1.8 2008/02/22 02:30:35 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_j1.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1.c,v 1.8 2005/02/04 18:26:06 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_j1.c,v 1.9 2008/02/22 02:30:35 das Exp $"); /* __ieee754_j1(x), __ieee754_y1(x) * Bessel function of the first and second kinds of order zero. ==== //depot/projects/e500/lib/msun/src/e_j1f.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_j1f.c,v 1.8 2008/02/22 02:30:35 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_jn.c#2 (text+ko) ==== @@ -11,9 +11,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jn.c,v 1.9 2005/02/04 18:26:06 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_jn.c,v 1.10 2008/02/22 02:30:35 das Exp $"); /* * __ieee754_jn(n, x), __ieee754_yn(n, x) ==== //depot/projects/e500/lib/msun/src/e_jnf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_jnf.c,v 1.8 2002/05/28 18:15:04 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_jnf.c,v 1.9 2008/02/22 02:30:35 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_lgamma.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma.c,v 1.8 2005/02/04 18:26:06 das Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_lgamma.c,v 1.9 2008/02/22 02:30:35 das Exp $"); /* __ieee754_lgamma(x) * Return the logarithm of the Gamma function of x. ==== //depot/projects/e500/lib/msun/src/e_lgamma_r.c#2 (text+ko) ==== @@ -12,9 +12,8 @@ * */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgamma_r.c,v 1.9 2007/05/02 16:54:22 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_lgamma_r.c,v 1.10 2008/02/22 02:30:35 das Exp $"); /* __ieee754_lgamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function ==== //depot/projects/e500/lib/msun/src/e_lgammaf.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf.c,v 1.7 2002/05/28 18:15:04 alfred Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_lgammaf.c,v 1.8 2008/02/22 02:30:35 das Exp $"); /* __ieee754_lgammaf(x) * Return the logarithm of the Gamma function of x. ==== //depot/projects/e500/lib/msun/src/e_lgammaf_r.c#2 (text+ko) ==== @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD: src/lib/msun/src/e_lgammaf_r.c,v 1.10 2007/05/02 16:54:22 bde Exp $"; -#endif +#include +__FBSDID("$FreeBSD: src/lib/msun/src/e_lgammaf_r.c,v 1.11 2008/02/22 02:30:35 das Exp $"); #include "math.h" #include "math_private.h" ==== //depot/projects/e500/lib/msun/src/e_log.c#3 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sat Feb 23 18:14:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4B2416A403; Sat, 23 Feb 2008 18:14:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505F116A40B for ; Sat, 23 Feb 2008 18:14:32 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3231B13C465 for ; Sat, 23 Feb 2008 18:14:32 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NIEVvf013722 for ; Sat, 23 Feb 2008 18:14:31 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NIEVWd013718 for perforce@freebsd.org; Sat, 23 Feb 2008 18:14:31 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 18:14:31 GMT Message-Id: <200802231814.m1NIEVWd013718@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136021 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 18:14:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=136021 Change 136021 by marcel@marcel_cluster on 2008/02/23 18:13:50 Merge back from CVS (added $FreeBSD$)... Affected files ... .. //depot/projects/e500/sys/boot/uboot/lib/glue.h#3 edit Differences ... ==== //depot/projects/e500/sys/boot/uboot/lib/glue.h#3 (text+ko) ==== @@ -22,6 +22,8 @@ * 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: src/sys/boot/uboot/lib/glue.h,v 1.1 2008/02/23 17:56:17 marcel Exp $ */ /* From owner-p4-projects@FreeBSD.ORG Sat Feb 23 18:16:35 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEE0D16A408; Sat, 23 Feb 2008 18:16:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B429916A403 for ; Sat, 23 Feb 2008 18:16:34 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AD4C313C45A for ; Sat, 23 Feb 2008 18:16:34 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NIGYQF014018 for ; Sat, 23 Feb 2008 18:16:34 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NIGY3r014015 for perforce@freebsd.org; Sat, 23 Feb 2008 18:16:34 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 18:16:34 GMT Message-Id: <200802231816.m1NIGY3r014015@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136022 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 18:16:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=136022 Change 136022 by marcel@marcel_cluster on 2008/02/23 18:15:56 IFC @136020 Affected files ... .. //depot/projects/e500/sys/powerpc/include/bootinfo.h#5 integrate .. //depot/projects/e500/sys/powerpc/include/metadata.h#3 integrate Differences ... ==== //depot/projects/e500/sys/powerpc/include/bootinfo.h#5 (text+ko) ==== @@ -23,6 +23,8 @@ * 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: src/sys/powerpc/include/bootinfo.h,v 1.10 2008/02/23 18:01:45 marcel Exp $ */ #ifndef _MACHINE_BOOTINFO_H_ ==== //depot/projects/e500/sys/powerpc/include/metadata.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/powerpc/include/metadata.h,v 1.3 2005/01/07 02:29:19 imp Exp $ + * $FreeBSD: src/sys/powerpc/include/metadata.h,v 1.4 2008/02/23 18:01:45 marcel Exp $ */ #ifndef _MACHINE_METADATA_H_ From owner-p4-projects@FreeBSD.ORG Sat Feb 23 19:33:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98CD116A409; Sat, 23 Feb 2008 19:33:01 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D8B816A406 for ; Sat, 23 Feb 2008 19:33:01 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFA613C45D for ; Sat, 23 Feb 2008 19:33:01 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NJX1oP019708 for ; Sat, 23 Feb 2008 19:33:01 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NJX0La019686 for perforce@freebsd.org; Sat, 23 Feb 2008 19:33:00 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 19:33:00 GMT Message-Id: <200802231933.m1NJX0La019686@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136027 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 19:33:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=136027 Change 136027 by marcel@marcel_cluster on 2008/02/23 19:32:33 IFC @136026 Affected files ... .. //depot/projects/e500/sys/boot/common/bootstrap.h#3 integrate .. //depot/projects/e500/sys/boot/common/load_elf.c#3 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/conf.c#6 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#8 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/start.S#10 integrate Differences ... ==== //depot/projects/e500/sys/boot/common/bootstrap.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.44 2006/12/18 07:35:14 kmacy Exp $ + * $FreeBSD: src/sys/boot/common/bootstrap.h,v 1.45 2008/02/23 18:33:49 marcel Exp $ */ #include ==== //depot/projects/e500/sys/boot/common/load_elf.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.37 2006/11/02 17:52:43 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/load_elf.c,v 1.38 2008/02/23 18:33:50 marcel Exp $"); #include #include @@ -280,9 +280,9 @@ if (off & 0xf0000000u) { off = -(off & 0xf0000000u); /* - * FIXME allow for specifying the offset via loader env var - - * hard code 0x01000000 for the moment - needs to be on 16MB - * boundary! + * XXX the physical load address should not be hardcoded. Note + * that the Book-E kernel assumes that it's loaded at a 16MB + * boundary for now... */ off += 0x01000000; ehdr->e_entry += off; ==== //depot/projects/e500/sys/boot/powerpc/uboot/conf.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/conf.c,v 1.1 2008/02/16 22:40:55 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/conf.c,v 1.2 2008/02/23 18:36:13 marcel Exp $"); #include #include "bootstrap.h" ==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#8 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/metadata.c,v 1.1 2008/02/16 22:40:55 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/metadata.c,v 1.2 2008/02/23 19:08:25 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/boot/powerpc/uboot/start.S#10 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/powerpc/uboot/start.S,v 1.2 2008/02/17 20:38:22 marcel Exp $ + * $FreeBSD: src/sys/boot/powerpc/uboot/start.S,v 1.3 2008/02/23 18:42:53 marcel Exp $ */ #include From owner-p4-projects@FreeBSD.ORG Sat Feb 23 19:48:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 786D116A405; Sat, 23 Feb 2008 19:48:18 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0332F16A407 for ; Sat, 23 Feb 2008 19:48:18 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 00F0C13C45B for ; Sat, 23 Feb 2008 19:48:18 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NJmH8v020616 for ; Sat, 23 Feb 2008 19:48:17 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NJmHw2020612 for perforce@freebsd.org; Sat, 23 Feb 2008 19:48:17 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 19:48:17 GMT Message-Id: <200802231948.m1NJmHw2020612@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136031 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 19:48:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=136031 Change 136031 by marcel@marcel_cluster on 2008/02/23 19:48:01 IFC @136029 Affected files ... .. //depot/projects/e500/gnu/usr.bin/groff/tmac/mdoc.local#4 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#9 integrate Differences ... ==== //depot/projects/e500/gnu/usr.bin/groff/tmac/mdoc.local#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.62 2007/11/27 10:00:33 jkoshy Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.63 2008/02/23 19:27:54 ru Exp $ .\" .\" %beginstrip% . @@ -64,7 +64,7 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~7.0 +.ds doc-default-operating-system FreeBSD\~8.0 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 ==== //depot/projects/e500/sys/boot/powerpc/uboot/metadata.c#9 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/metadata.c,v 1.2 2008/02/23 19:08:25 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/powerpc/uboot/metadata.c,v 1.3 2008/02/23 19:43:29 marcel Exp $"); #include #include @@ -124,9 +124,10 @@ } /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) + for (i = 0; howto_names[i].ev != NULL; i++) { if (getenv(howto_names[i].ev) != NULL) howto |= howto_names[i].mask; + } if (!strcmp(getenv("console"), "comconsole")) howto |= RB_SERIAL; if (!strcmp(getenv("console"), "nullconsole")) @@ -180,45 +181,45 @@ * MOD_SIZE sizeof(size_t) module size * MOD_METADATA (variable) type-specific metadata */ -#define COPY32(v, a, c) { \ +#define COPY32(v, a, c) { \ u_int32_t x = (v); \ if (c) \ - archsw.arch_copyin(&x, a, sizeof(x)); \ + archsw.arch_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ } -#define MOD_STR(t, a, s, c) { \ +#define MOD_STR(t, a, s, c) { \ COPY32(t, a, c); \ COPY32(strlen(s) + 1, a, c) \ if (c) \ - archsw.arch_copyin(s, a, strlen(s) + 1);\ + archsw.arch_copyin(s, a, strlen(s) + 1);\ a += roundup(strlen(s) + 1, sizeof(u_long));\ } -#define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) -#define MOD_TYPE(a, s, c) MOD_STR(MODINFO_TYPE, a, s, c) -#define MOD_ARGS(a, s, c) MOD_STR(MODINFO_ARGS, a, s, c) +#define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) +#define MOD_TYPE(a, s, c) MOD_STR(MODINFO_TYPE, a, s, c) +#define MOD_ARGS(a, s, c) MOD_STR(MODINFO_ARGS, a, s, c) -#define MOD_VAR(t, a, s, c) { \ +#define MOD_VAR(t, a, s, c) { \ COPY32(t, a, c); \ COPY32(sizeof(s), a, c); \ if (c) \ - archsw.arch_copyin(&s, a, sizeof(s)); \ + archsw.arch_copyin(&s, a, sizeof(s)); \ a += roundup(sizeof(s), sizeof(u_long)); \ } -#define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) -#define MOD_SIZE(a, s, c) MOD_VAR(MODINFO_SIZE, a, s, c) +#define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) +#define MOD_SIZE(a, s, c) MOD_VAR(MODINFO_SIZE, a, s, c) -#define MOD_METADATA(a, mm, c) { \ +#define MOD_METADATA(a, mm, c) { \ COPY32(MODINFO_METADATA | mm->md_type, a, c);\ COPY32(mm->md_size, a, c); \ if (c) \ - archsw.arch_copyin(mm->md_data, a, mm->md_size);\ + archsw.arch_copyin(mm->md_data, a, mm->md_size);\ a += roundup(mm->md_size, sizeof(u_long)); \ } -#define MOD_END(a, c) { \ +#define MOD_END(a, c) { \ COPY32(MODINFO_END, a, c); \ COPY32(0, a, c); \ } @@ -234,15 +235,16 @@ /* start with the first module on the list, should be the kernel */ for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { - MOD_NAME(addr, fp->f_name, c); /* this field must come first */ + MOD_NAME(addr, fp->f_name, c); /* this field must be first */ MOD_TYPE(addr, fp->f_type, c); if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); MOD_ADDR(addr, fp->f_addr, c); MOD_SIZE(addr, fp->f_size, c); - for (md = fp->f_metadata; md != NULL; md = md->md_next) + for (md = fp->f_metadata; md != NULL; md = md->md_next) { if (!(md->md_type & MODINFOMD_NOCOPY)) MOD_METADATA(addr, md, c); + } } MOD_END(addr, c); return(addr); @@ -255,8 +257,8 @@ static int md_bootinfo(struct bootinfo **addr) { -#define TMP_MAX_ETH 8 -#define TMP_MAX_MR 8 +#define TMP_MAX_ETH 8 +#define TMP_MAX_MR 8 struct bootinfo *bi; struct bi_mem_region tmp_mr[TMP_MAX_MR]; struct bi_eth_addr tmp_eth[TMP_MAX_ETH]; @@ -273,11 +275,10 @@ /* * Handle mem regions (we only care about DRAM) */ - for (i = 0, mr_no = 0; i < si->mr_no; i++) + for (i = 0, mr_no = 0; i < si->mr_no; i++) { if (si->mr[i].flags == MR_ATTR_DRAM) { if (mr_no >= TMP_MAX_MR) { - printf("too many memory regions: %d\n", - mr_no); + printf("too many memory regions: %d\n", mr_no); break; } tmp_mr[mr_no].mem_base = si->mr[i].start; @@ -285,17 +286,18 @@ mr_no++; continue; } + } if (mr_no == 0) panic("can't retrieve RAM info"); size = (mr_no * sizeof(struct bi_mem_region) - sizeof(bi->bi_data)); - + /* * Handle Ethernet addresses: parse u-boot env for eth%daddr */ env = NULL; eth_no = 0; - while ((env = ub_env_enum(env)) != NULL) + while ((env = ub_env_enum(env)) != NULL) { if (strncmp(env, "eth", 3) == 0 && strncmp(env + (strlen(env) - 4), "addr", 4) == 0) { @@ -309,9 +311,10 @@ } eth_no++; } + } size += (eth_no * sizeof(struct bi_eth_addr)) + sizeof(struct bootinfo); - + /* * Once its whole size is calculated, allocate space for the bootinfo * and copy over the contents from temp containers. @@ -323,7 +326,7 @@ bcopy(tmp_mr, ptr, mr_no * sizeof(struct bi_mem_region)); ptr += mr_no * sizeof(struct bi_mem_region); bcopy(tmp_eth, ptr, eth_no * sizeof(struct bi_eth_addr)); - + bi->bi_mem_reg_no = mr_no; bi->bi_eth_addr_no = eth_no; bi->bi_version = BI_VERSION; @@ -332,7 +335,7 @@ bi->bi_bus_clk = si->clk_bus; *addr = bi; - + return (size); } @@ -361,7 +364,10 @@ int bisize; int i; - /* This metadata addreses must be converted for kernel after relocation */ + /* + * These metadata addreses must be converted for kernel after + * relocation. + */ uint32_t mdt[] = { MODINFOMD_SSYM, MODINFOMD_ESYM, MODINFOMD_KERNEND, MODINFOMD_ENVP }; @@ -369,9 +375,9 @@ howto = md_getboothowto(args); /* - * Allow the environment variable 'rootdev' to override the supplied device - * This should perhaps go to MI code and/or have $rootdev tested/set by - * MI code before launching the kernel. + * Allow the environment variable 'rootdev' to override the supplied + * device. This should perhaps go to MI code and/or have $rootdev + * tested/set by MI code before launching the kernel. */ rootdevname = getenv("rootdev"); if (rootdevname == NULL) @@ -381,9 +387,10 @@ /* find the last module in the chain */ addr = 0; - for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { if (addr < (xp->f_addr + xp->f_size)) addr = xp->f_addr + xp->f_size; + } /* pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); From owner-p4-projects@FreeBSD.ORG Sat Feb 23 19:54:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60FF616A409; Sat, 23 Feb 2008 19:54:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 261C816A404 for ; Sat, 23 Feb 2008 19:54:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 24B5113C461 for ; Sat, 23 Feb 2008 19:54:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NJsPhQ020950 for ; Sat, 23 Feb 2008 19:54:25 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NJsPQM020947 for perforce@freebsd.org; Sat, 23 Feb 2008 19:54:25 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 19:54:25 GMT Message-Id: <200802231954.m1NJsPQM020947@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136033 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 19:54:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=136033 Change 136033 by marcel@marcel_cluster on 2008/02/23 19:53:47 IFC @136032 Affected files ... .. //depot/projects/e500/sys/boot/powerpc/Makefile#6 integrate .. //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#9 integrate Differences ... ==== //depot/projects/e500/sys/boot/powerpc/Makefile#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/powerpc/Makefile,v 1.2 2007/12/17 22:19:44 marcel Exp $ +# $FreeBSD: src/sys/boot/powerpc/Makefile,v 1.3 2008/02/23 19:45:19 marcel Exp $ SUBDIR= ofw uboot ==== //depot/projects/e500/sys/boot/powerpc/uboot/Makefile#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/powerpc/uboot/Makefile,v 1.1 2008/02/16 22:40:55 marcel Exp $ +# $FreeBSD: src/sys/boot/powerpc/uboot/Makefile,v 1.2 2008/02/23 19:45:20 marcel Exp $ PROG= ubldr NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:11:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A09716A401; Sat, 23 Feb 2008 22:11:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB4C616A404 for ; Sat, 23 Feb 2008 22:11:48 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DF21713C448 for ; Sat, 23 Feb 2008 22:11:48 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMBm7Y041417 for ; Sat, 23 Feb 2008 22:11:48 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMBmOu041414 for perforce@freebsd.org; Sat, 23 Feb 2008 22:11:48 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 22:11:48 GMT Message-Id: <200802232211.m1NMBmOu041414@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136039 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:11:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=136039 Change 136039 by marcel@marcel_cluster on 2008/02/23 22:11:45 IFC @136037 Affected files ... .. //depot/projects/e500/sys/conf/files.powerpc#19 integrate .. //depot/projects/e500/sys/conf/options.powerpc#5 integrate .. //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tom.c#3 integrate .. //depot/projects/e500/sys/libkern/cmpdi2.c#2 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#3 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#5 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#3 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#3 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#2 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#4 integrate .. //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#4 integrate Differences ... ==== //depot/projects/e500/sys/conf/files.powerpc#19 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.72 2008/01/31 01:57:33 grehan Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.73 2008/02/23 20:16:38 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and ==== //depot/projects/e500/sys/conf/options.powerpc#5 (text+ko) ==== @@ -1,9 +1,11 @@ -# $FreeBSD: src/sys/conf/options.powerpc,v 1.10 2007/12/16 00:45:56 marcel Exp $ +# $FreeBSD: src/sys/conf/options.powerpc,v 1.11 2008/02/23 20:16:38 marcel Exp $ # Options specific to the powerpc platform kernels AIM opt_global.h E500 opt_global.h +FPU_EMU + GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h ==== //depot/projects/e500/sys/dev/cxgb/ulp/tom/cxgb_tom.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ ***************************************************************************/ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tom.c,v 1.3 2008/02/23 01:06:17 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tom.c,v 1.4 2008/02/23 21:18:13 kmacy Exp $"); #include #include @@ -284,7 +284,6 @@ { log(LOG_ERR, "%s: received bad CPL command %u\n", cdev->name, 0xFF & *mtod(m, unsigned int *)); - kdb_backtrace(); return (CPL_RET_BUF_DONE | CPL_RET_BAD_MSG); } ==== //depot/projects/e500/sys/libkern/cmpdi2.c#2 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#3 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#5 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#3 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#3 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#2 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#4 (text+ko) ==== ==== //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#4 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:16:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F78916A406; Sat, 23 Feb 2008 22:16:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0C0D16A400 for ; Sat, 23 Feb 2008 22:16:54 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ACB6B13C478 for ; Sat, 23 Feb 2008 22:16:54 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMGsa6042474 for ; Sat, 23 Feb 2008 22:16:54 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMGsUw042471 for perforce@freebsd.org; Sat, 23 Feb 2008 22:16:54 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 22:16:54 GMT Message-Id: <200802232216.m1NMGsUw042471@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136040 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:16:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=136040 Change 136040 by marcel@marcel_cluster on 2008/02/23 22:16:09 Fixup merge. Affected files ... .. //depot/projects/e500/sys/conf/options.powerpc#6 edit Differences ... ==== //depot/projects/e500/sys/conf/options.powerpc#6 (text+ko) ==== @@ -13,7 +13,6 @@ POWERMAC opt_platform.h PSIM MPC85xx -FPU_EMU SC_OFWFB opt_ofwfb.h From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:29:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E570116A406; Sat, 23 Feb 2008 22:29:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 921E416A400 for ; Sat, 23 Feb 2008 22:29:07 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 964EC13C465 for ; Sat, 23 Feb 2008 22:29:07 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMT7Zl044353 for ; Sat, 23 Feb 2008 22:29:07 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMT7Ur044350 for perforce@freebsd.org; Sat, 23 Feb 2008 22:29:07 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 22:29:07 GMT Message-Id: <200802232229.m1NMT7Ur044350@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136041 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:29:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=136041 Change 136041 by marcel@marcel_cluster on 2008/02/23 22:29:05 Resolve $FreeBSD$ fodder. Affected files ... .. //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#4 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#6 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#4 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#4 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#3 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#5 edit .. //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#5 edit Differences ... ==== //depot/projects/e500/sys/powerpc/fpu/fpu_add.c#5 (text+ko) ==== @@ -47,7 +47,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_add.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_arith.h#4 (text+ko) ==== @@ -1,4 +1,5 @@ /* $NetBSD: fpu_arith.h,v 1.4 2005/12/24 20:07:28 perry Exp $ */ +/* $FreeBSD: src/sys/powerpc/fpu/fpu_arith.h,v 1.1 2008/02/23 20:05:26 marcel Exp $ */ /* * Copyright (c) 1992, 1993 ==== //depot/projects/e500/sys/powerpc/fpu/fpu_compare.c#5 (text+ko) ==== @@ -48,7 +48,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_compare.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_div.c#5 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_div.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.c#6 (text+ko) ==== @@ -76,7 +76,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_emu.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include "opt_ddb.h" ==== //depot/projects/e500/sys/powerpc/fpu/fpu_emu.h#4 (text+ko) ==== @@ -1,4 +1,5 @@ /* $NetBSD: fpu_emu.h,v 1.3 2005/12/11 12:18:42 christos Exp $ */ +/* $FreeBSD: src/sys/powerpc/fpu/fpu_emu.h,v 1.1 2008/02/23 20:05:26 marcel Exp $ */ /* * Copyright (c) 1992, 1993 ==== //depot/projects/e500/sys/powerpc/fpu/fpu_explode.c#5 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_explode.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_extern.h#4 (text+ko) ==== @@ -1,4 +1,5 @@ /* $NetBSD: fpu_extern.h,v 1.3 2005/12/11 12:18:42 christos Exp $ */ +/* $FreeBSD: src/sys/powerpc/fpu/fpu_extern.h,v 1.1 2008/02/23 20:05:26 marcel Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. ==== //depot/projects/e500/sys/powerpc/fpu/fpu_implode.c#5 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_implode.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_instr.h#3 (text+ko) ==== @@ -1,4 +1,5 @@ /* $NetBSD: instr.h,v 1.4 2005/12/11 12:18:43 christos Exp $ */ +/* $FreeBSD: src/sys/powerpc/fpu/fpu_instr.h,v 1.1 2008/02/23 20:05:26 marcel Exp $ */ /* * Copyright (c) 1992, 1993 ==== //depot/projects/e500/sys/powerpc/fpu/fpu_mul.c#5 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_mul.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_sqrt.c#5 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_sqrt.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include ==== //depot/projects/e500/sys/powerpc/fpu/fpu_subr.c#5 (text+ko) ==== @@ -45,7 +45,7 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/powerpc/fpu/fpu_subr.c,v 1.1 2008/02/23 20:05:26 marcel Exp $"); #include #include From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:42:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7A57816A406; Sat, 23 Feb 2008 22:42:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 276BF16A404 for ; Sat, 23 Feb 2008 22:42:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2C38213C447 for ; Sat, 23 Feb 2008 22:42:21 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMgLMV045207 for ; Sat, 23 Feb 2008 22:42:21 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMgLck045204 for perforce@freebsd.org; Sat, 23 Feb 2008 22:42:21 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 22:42:21 GMT Message-Id: <200802232242.m1NMgLck045204@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136043 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:42:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=136043 Change 136043 by marcel@marcel_xcllnt on 2008/02/23 22:41:43 Resolve merge fodder. Affected files ... .. //depot/projects/e500/sys/libkern/cmpdi2.c#3 edit Differences ... ==== //depot/projects/e500/sys/libkern/cmpdi2.c#3 (text+ko) ==== @@ -32,12 +32,14 @@ */ #include -__FBSDID("$FreeBSD$"); +__FBSDID("$FreeBSD: src/sys/libkern/cmpdi2.c,v 1.8 2008/02/23 20:10:49 marcel Exp $"); #include /* * Return 0, 1, or 2 as a <, =, > b respectively. + * Both a and b are considered signed---which means only the high word is + * signed. */ int __cmpdi2(a, b) From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:44:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F096216A404; Sat, 23 Feb 2008 22:44:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B579716A403 for ; Sat, 23 Feb 2008 22:44:23 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BA76B13C448 for ; Sat, 23 Feb 2008 22:44:23 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMiNSn045402 for ; Sat, 23 Feb 2008 22:44:23 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMiN6W045399 for perforce@freebsd.org; Sat, 23 Feb 2008 22:44:23 GMT (envelope-from raj@freebsd.org) Date: Sat, 23 Feb 2008 22:44:23 GMT Message-Id: <200802232244.m1NMiN6W045399@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 136045 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:44:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=136045 Change 136045 by raj@raj_mimi on 2008/02/23 22:43:26 Fix style issues in OCP, other easthetics. Affected files ... .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#5 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#2 edit Differences ... ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#5 (text+ko) ==== @@ -80,29 +80,29 @@ * Bus interface definition */ static device_method_t ocpbus_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, ocpbus_probe), - DEVMETHOD(device_attach, ocpbus_attach), - DEVMETHOD(device_shutdown, ocpbus_shutdown), + /* Device interface */ + DEVMETHOD(device_probe, ocpbus_probe), + DEVMETHOD(device_attach, ocpbus_attach), + DEVMETHOD(device_shutdown, ocpbus_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, ocpbus_print_child), - DEVMETHOD(bus_read_ivar, ocpbus_read_ivar), - DEVMETHOD(bus_setup_intr, ocpbus_setup_intr), - DEVMETHOD(bus_teardown_intr, ocpbus_teardown_intr), + /* Bus interface */ + DEVMETHOD(bus_print_child, ocpbus_print_child), + DEVMETHOD(bus_read_ivar, ocpbus_read_ivar), + DEVMETHOD(bus_setup_intr, ocpbus_setup_intr), + DEVMETHOD(bus_teardown_intr, ocpbus_teardown_intr), - DEVMETHOD(bus_get_resource, ocpbus_get_resource), - DEVMETHOD(bus_alloc_resource, ocpbus_alloc_resource), - DEVMETHOD(bus_release_resource, ocpbus_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource, ocpbus_get_resource), + DEVMETHOD(bus_alloc_resource, ocpbus_alloc_resource), + DEVMETHOD(bus_release_resource, ocpbus_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - { 0, 0 } + { 0, 0 } }; static driver_t ocpbus_driver = { - "ocpbus", - ocpbus_methods, + "ocpbus", + ocpbus_methods, sizeof(struct ocpbus_softc) }; @@ -206,8 +206,7 @@ static int ocpbus_probe (device_t dev) { - - device_set_desc(dev, "on-chip peripheral bus"); + device_set_desc(dev, "On-Chip Peripherals bus"); return (BUS_PROBE_DEFAULT); } @@ -245,12 +244,13 @@ sc->sc_irq.rm_end = end; sc->sc_irq.rm_type = RMAN_ARRAY; sc->sc_irq.rm_descr = "Interrupt request lines"; - if (rman_init(&sc->sc_irq) || rman_manage_region(&sc->sc_irq, start, end)) + if (rman_init(&sc->sc_irq) || + rman_manage_region(&sc->sc_irq, start, end)) panic("ocpbus_attach IRQ rman"); /* Set up I/O mem rman */ sc->sc_mem.rm_type = RMAN_ARRAY; - sc->sc_mem.rm_descr = "OCPBus Device Memory"; + sc->sc_mem.rm_descr = "OCPBus Device Memory"; error = rman_init(&sc->sc_mem); if (error) { device_printf(dev, "rman_init() failed. error = %d\n", error); @@ -284,10 +284,9 @@ static int ocpbus_shutdown(device_t dev) { - return(0); + return(0); } - struct ocp_resource { int sr_devtype; int sr_unit; @@ -300,11 +299,11 @@ const struct ocp_resource mpc8555_resources[] = { {OCPBUS_DEVTYPE_PIC, 0, SYS_RES_MEMORY, 0, OCPE500_OPENPIC_OFF, OCPE500_OPENPIC_SIZE}, - + {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_MEMORY, 0, OCPE500_QUICC_OFF, OCPE500_QUICC_SIZE}, {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(30), 1}, - + {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_MEMORY, 0, OCPE500_TSEC0_OFF, OCPE500_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(13), 1}, @@ -325,14 +324,14 @@ {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 0, PIC_IRQ_INT(21), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 1, PIC_IRQ_INT(22), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 2, PIC_IRQ_INT(23), 1}, - + {OCPBUS_DEVTYPE_UART, 0, SYS_RES_MEMORY, 0, OCPE500_UART0_OFF, OCPE500_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, {OCPBUS_DEVTYPE_UART, 1, SYS_RES_MEMORY, 0, OCPE500_UART1_OFF, OCPE500_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, - + {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 0, OCPE500_PCI0_OFF, OCPE500_PCI_SIZE}, {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI0}, @@ -343,18 +342,18 @@ {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI1}, {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 0, OCPE500_PCI2_OFF, OCPE500_PCI_SIZE}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI2}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI2}, - + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCPE500_LBC_OFF, OCPE500_LBC_SIZE}, {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_LBC}, {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_MEMORY, 0, OCPE500_I2C0_OFF, - OCPE500_I2C_SIZE}, + OCPE500_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_MEMORY, 0, OCPE500_I2C1_OFF, - OCPE500_I2C_SIZE}, + OCPE500_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, {0} @@ -456,7 +455,7 @@ rman_set_bustag(rv, &bs_be_tag); rman_set_bushandle(rv, rman_get_start(rv)); - return (rv); + return (rv); } static int @@ -542,7 +541,6 @@ ocpbus_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - return (rman_release_resource(res)); } @@ -550,7 +548,7 @@ ocpbus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep) { - int error; + int error; if (res == NULL) panic("ocpbus_setup_intr: NULL irq resource!"); ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #ifndef _MACHINE_OCPE500_H_ #define _MACHINE_OCPE500_H_ - + /* * Local access registers. */ From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:44:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AFF9F16A532; Sat, 23 Feb 2008 22:44:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0A2416A405 for ; Sat, 23 Feb 2008 22:44:23 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DE50F13C44B for ; Sat, 23 Feb 2008 22:44:23 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMiNw7045408 for ; Sat, 23 Feb 2008 22:44:23 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMiNwn045405 for perforce@freebsd.org; Sat, 23 Feb 2008 22:44:23 GMT (envelope-from marcel@freebsd.org) Date: Sat, 23 Feb 2008 22:44:23 GMT Message-Id: <200802232244.m1NMiNwn045405@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 136046 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:44:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=136046 Change 136046 by marcel@marcel_cluster on 2008/02/23 22:43:31 IFC @136042 Affected files ... .. //depot/projects/e500/sys/powerpc/conf/NOTES#8 integrate Differences ... ==== //depot/projects/e500/sys/powerpc/conf/NOTES#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.12 2008/02/12 19:38:39 marcel Exp $ +# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.13 2008/02/23 22:32:16 marcel Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. From owner-p4-projects@FreeBSD.ORG Sat Feb 23 22:59:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 908B316A405; Sat, 23 Feb 2008 22:59:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CEA716A400 for ; Sat, 23 Feb 2008 22:59:46 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4295613C4EC for ; Sat, 23 Feb 2008 22:59:46 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NMxkNQ045969 for ; Sat, 23 Feb 2008 22:59:46 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NMxjgB045966 for perforce@freebsd.org; Sat, 23 Feb 2008 22:59:45 GMT (envelope-from raj@freebsd.org) Date: Sat, 23 Feb 2008 22:59:45 GMT Message-Id: <200802232259.m1NMxjgB045966@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 136047 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 22:59:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=136047 Change 136047 by raj@raj_mimi on 2008/02/23 22:58:50 On-chip devices are rather part of the SoC, not the CPU core: adjust naming accordingly. Affected files ... .. //depot/projects/e500/sys/powerpc/mpc85xx/lbc.c#2 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/lbc.h#2 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#6 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#3 edit .. //depot/projects/e500/sys/powerpc/mpc85xx/pci_ocp.c#3 edit Differences ... ==== //depot/projects/e500/sys/powerpc/mpc85xx/lbc.c#2 (text+ko) ==== @@ -95,36 +95,36 @@ * Bus interface definition */ static device_method_t lbc_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, lbc_probe), - DEVMETHOD(device_attach, lbc_attach), - DEVMETHOD(device_shutdown, lbc_shutdown), + /* Device interface */ + DEVMETHOD(device_probe, lbc_probe), + DEVMETHOD(device_attach, lbc_attach), + DEVMETHOD(device_shutdown, lbc_shutdown), - /* Bus interface */ + /* Bus interface */ #if 0 - DEVMETHOD(bus_print_child, lbc_print_child), + DEVMETHOD(bus_print_child, lbc_print_child), #endif - DEVMETHOD(bus_print_child, NULL), - DEVMETHOD(bus_read_ivar, lbc_read_ivar), - DEVMETHOD(bus_setup_intr, NULL), - DEVMETHOD(bus_teardown_intr, NULL), + DEVMETHOD(bus_print_child, NULL), + DEVMETHOD(bus_read_ivar, lbc_read_ivar), + DEVMETHOD(bus_setup_intr, NULL), + DEVMETHOD(bus_teardown_intr, NULL), - DEVMETHOD(bus_get_resource, NULL), - DEVMETHOD(bus_alloc_resource, lbc_alloc_resource), - DEVMETHOD(bus_release_resource, lbc_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource, NULL), + DEVMETHOD(bus_alloc_resource, lbc_alloc_resource), + DEVMETHOD(bus_release_resource, lbc_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), /* local bus CCSR access functions for child */ - DEVMETHOD(lb_write_reg, lbc_write_reg), - DEVMETHOD(lb_read_reg, lbc_read_reg), + DEVMETHOD(lb_write_reg, lbc_write_reg), + DEVMETHOD(lb_read_reg, lbc_read_reg), - { 0, 0 } + { 0, 0 } }; static driver_t lbc_driver = { - "lbc", - lbc_methods, + "lbc", + lbc_methods, sizeof (struct lbc_softc) }; @@ -160,22 +160,18 @@ uint32_t data = 0; switch (bytes) { - case 1: - data = bus_space_read_1(sc->lb_bst, sc->lb_bsh, offset); - - break; - case 2: - data = bus_space_read_2(sc->lb_bst, sc->lb_bsh, offset); - - break; - case 4: - data = bus_space_read_4(sc->lb_bst, sc->lb_bsh, offset); + case 1: + data = bus_space_read_1(sc->lb_bst, sc->lb_bsh, offset); + break; + case 2: + data = bus_space_read_2(sc->lb_bst, sc->lb_bsh, offset); + break; + case 4: + data = bus_space_read_4(sc->lb_bst, sc->lb_bsh, offset); + break; + } - break; - } - return (data); - } static device_t @@ -231,7 +227,7 @@ sc->lb_rid = 0; sc->lb_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->lb_rid, - RF_ACTIVE); + RF_ACTIVE); if (sc->lb_memr == NULL) return (ENXIO); @@ -246,21 +242,21 @@ /* Initialize the LBC registers */ /* Boot Flash */ - LB_WRITE_REG(dev,LBCE500_BR(0), 0xff801001, 4); - LB_WRITE_REG(dev,LBCE500_OR(0), 0xff801040, 4); + LB_WRITE_REG(dev,LBC85XX_BR(0), 0xff801001, 4); + LB_WRITE_REG(dev,LBC85XX_OR(0), 0xff801040, 4); /* SYSPLD */ - LB_WRITE_REG(dev,LBCE500_BR(1), 0xea001001, 4); - LB_WRITE_REG(dev,LBCE500_OR(1), 0xffff1040, 4); + LB_WRITE_REG(dev,LBC85XX_BR(1), 0xea001001, 4); + LB_WRITE_REG(dev,LBC85XX_OR(1), 0xffff1040, 4); #if 0 /* LCD */ - LB_WRITE_REG(dev,LBCE500_BR(2), 0xeb000801, 4); - LB_WRITE_REG(dev,LBCE500_OR(2), 0xffff1100, 4); + LB_WRITE_REG(dev,LBC85XX_BR(2), 0xeb000801, 4); + LB_WRITE_REG(dev,LBC85XX_OR(2), 0xffff1100, 4); #endif - LB_WRITE_REG(dev,LBCE500_LBCR, 0x00000000, 4); - LB_WRITE_REG(dev,LBCE500_LCRR, 0x00030008, 4); + LB_WRITE_REG(dev,LBC85XX_LBCR, 0x00000000, 4); + LB_WRITE_REG(dev,LBC85XX_LCRR, 0x00030008, 4); /* * The unit argument will serve as the bar number. Logic is @@ -277,7 +273,7 @@ rp = &sc->lbc_memregion; rp->rm_type = RMAN_ARRAY; - rp->rm_descr = "MPC8533 Localbus Device Memory"; + rp->rm_descr = "MPC8533 Localbus Device Memory"; /* Not sure below 2 lines are needed */ rp->rm_start = start; rp->rm_end = end; @@ -303,7 +299,7 @@ static int lbc_shutdown(device_t dev) { - return(0); + return(0); } /* @@ -312,7 +308,7 @@ */ static struct resource * lbc_alloc_resource (device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + u_long start, u_long end, u_long count, u_int flags) { struct lbc_softc *sc; struct resource *rv; @@ -338,8 +334,8 @@ #endif rman_set_bustag(rv, &bs_be_tag); rman_set_bushandle(rv, sc->lbc_iomem_va + - rman_get_start(rv) - rp->rm_start); - return (rv); + rman_get_start(rv) - rp->rm_start); + return (rv); } #if 0 @@ -422,8 +418,7 @@ static int lbc_release_resource (device_t dev, device_t child, int type, int rid, - struct resource *res) + struct resource *res) { - return (rman_release_resource(res)); } ==== //depot/projects/e500/sys/powerpc/mpc85xx/lbc.h#2 (text+ko) ==== @@ -36,37 +36,35 @@ #define LBC_DEVTYPE_LCD 1 #define LBC_DEVTYPE_FLASH 2 -#define LB_SDRAM_TYPE 0x01 -#define LB_GPCM_TYPE 0x02 -#define LB_UPM_TYPE 0x04 +#define LB_SDRAM_TYPE 0x01 +#define LB_GPCM_TYPE 0x02 +#define LB_UPM_TYPE 0x04 -#define LBCE500_START (0x5000) -#define LBCE500_SIZE 0x1000 -#define LBCE500_END (LBCE500_START + LBCE500_SIZE) - +#define LBC85XX_START (0x5000) +#define LBC85XX_SIZE 0x1000 +#define LBC85XX_END (LBC85XX_START + LBC85XX_SIZE) /* * Local access registers. */ -#define LBCE500_BR(n) (LBCE500_START + (8 * n)) /* Base Registers */ -#define LBCE500_OR(n) (LBCE500_START + 4 + (8 * n)) /* Options Registers */ +#define LBC85XX_BR(n) (LBC85XX_START + (8 * n)) /* Base Registers */ +#define LBC85XX_OR(n) (LBC85XX_START + 4 + (8 * n)) /* Options Registers */ -#define LBCE500_MAR (LBCE500_START + 0x68) -#define LBCE500_MAMR (LBCE500_START + 0x70) -#define LBCE500_MBMR (LBCE500_START + 0x74) -#define LBCE500_MCMR (LBCE500_START + 0x78) -#define LBCE500_MRTPR (LBCE500_START + 0x84) -#define LBCE500_MDR (LBCE500_START + 0x88) -#define LBCE500_LSDMR (LBCE500_START + 0x94) -#define LBCE500_LURT (LBCE500_START + 0xA0) -#define LBCE500_LSRT (LBCE500_START + 0xA4) -#define LBCE500_LTESR (LBCE500_START + 0xB0) -#define LBCE500_LTEDR (LBCE500_START + 0xB4) -#define LBCE500_LTEIR (LBCE500_START + 0xB8) -#define LBCE500_LTEATR (LBCE500_START + 0xBC) -#define LBCE500_LTEAR (LBCE500_START + 0xC0) -#define LBCE500_LBCR (LBCE500_START + 0xD0) -#define LBCE500_LCRR (LBCE500_START + 0xD4) - +#define LBC85XX_MAR (LBC85XX_START + 0x68) +#define LBC85XX_MAMR (LBC85XX_START + 0x70) +#define LBC85XX_MBMR (LBC85XX_START + 0x74) +#define LBC85XX_MCMR (LBC85XX_START + 0x78) +#define LBC85XX_MRTPR (LBC85XX_START + 0x84) +#define LBC85XX_MDR (LBC85XX_START + 0x88) +#define LBC85XX_LSDMR (LBC85XX_START + 0x94) +#define LBC85XX_LURT (LBC85XX_START + 0xA0) +#define LBC85XX_LSRT (LBC85XX_START + 0xA4) +#define LBC85XX_LTESR (LBC85XX_START + 0xB0) +#define LBC85XX_LTEDR (LBC85XX_START + 0xB4) +#define LBC85XX_LTEIR (LBC85XX_START + 0xB8) +#define LBC85XX_LTEATR (LBC85XX_START + 0xBC) +#define LBC85XX_LTEAR (LBC85XX_START + 0xC0) +#define LBC85XX_LBCR (LBC85XX_START + 0xD0) +#define LBC85XX_LCRR (LBC85XX_START + 0xD4) #endif /* _MACHINE_LOCALBUS_H */ ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.c#6 (text+ko) ==== @@ -138,15 +138,15 @@ switch (type) { case SYS_RES_MEMORY: switch (trgt) { - case OCPE500_TGTIF_PCI0: + case OCP85XX_TGTIF_PCI0: addr = 0x80000000; size = 0x10000000; break; - case OCPE500_TGTIF_PCI1: + case OCP85XX_TGTIF_PCI1: addr = 0x90000000; size = 0x10000000; break; - case OCPE500_TGTIF_PCI2: + case OCP85XX_TGTIF_PCI2: addr = 0xA0000000; size = 0x10000000; break; @@ -156,15 +156,15 @@ break; case SYS_RES_IOPORT: switch (trgt) { - case OCPE500_TGTIF_PCI0: + case OCP85XX_TGTIF_PCI0: addr = 0xff000000; size = 0x00010000; break; - case OCPE500_TGTIF_PCI1: + case OCP85XX_TGTIF_PCI1: addr = 0xff010000; size = 0x00010000; break; - case OCPE500_TGTIF_PCI2: + case OCP85XX_TGTIF_PCI2: addr = 0xff020000; size = 0x00010000; break; @@ -185,21 +185,21 @@ /* Check if already programmed. */ for (i = 0; i < 8; i++) { - if (sr == in32(OCPE500_LAWSR(i)) && - bar == in32(OCPE500_LAWBAR(i))) + if (sr == in32(OCP85XX_LAWSR(i)) && + bar == in32(OCP85XX_LAWBAR(i))) return (0); } /* Find an unused access window .*/ for (i = 0; i < 8; i++) { - if ((in32(OCPE500_LAWSR(i)) & 0x80000000) == 0) + if ((in32(OCP85XX_LAWSR(i)) & 0x80000000) == 0) break; } if (i == 8) return (ENOSPC); - out32(OCPE500_LAWBAR(i), bar); - out32(OCPE500_LAWSR(i), sr); + out32(OCP85XX_LAWBAR(i), bar); + out32(OCP85XX_LAWSR(i), sr); return (0); } @@ -267,16 +267,16 @@ /* Clear local access windows. */ for (i = 0; i < 8; i++) { - sr = in32(OCPE500_LAWSR(i)); + sr = in32(OCP85XX_LAWSR(i)); if ((sr & 0x80000000) == 0) continue; if ((sr & 0x00f00000) == 0x00f00000) continue; - out32(OCPE500_LAWSR(i), sr & 0x7fffffff); + out32(OCP85XX_LAWSR(i), sr & 0x7fffffff); } device_printf(dev, "PORDEVSR=%08x, PORDEVSR2=%08x\n", - in32(OCPE500_PORDEVSR), in32(OCPE500_PORDEVSR2)); + in32(OCP85XX_PORDEVSR), in32(OCP85XX_PORDEVSR2)); return (bus_generic_attach(dev)); } @@ -297,63 +297,63 @@ }; const struct ocp_resource mpc8555_resources[] = { - {OCPBUS_DEVTYPE_PIC, 0, SYS_RES_MEMORY, 0, OCPE500_OPENPIC_OFF, - OCPE500_OPENPIC_SIZE}, + {OCPBUS_DEVTYPE_PIC, 0, SYS_RES_MEMORY, 0, OCP85XX_OPENPIC_OFF, + OCP85XX_OPENPIC_SIZE}, - {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_MEMORY, 0, OCPE500_QUICC_OFF, - OCPE500_QUICC_SIZE}, + {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_MEMORY, 0, OCP85XX_QUICC_OFF, + OCP85XX_QUICC_SIZE}, {OCPBUS_DEVTYPE_QUICC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(30), 1}, - {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_MEMORY, 0, OCPE500_TSEC0_OFF, - OCPE500_TSEC_SIZE}, + {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_MEMORY, 0, OCP85XX_TSEC0_OFF, + OCP85XX_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(13), 1}, {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_IRQ, 1, PIC_IRQ_INT(14), 1}, {OCPBUS_DEVTYPE_TSEC, 0, SYS_RES_IRQ, 2, PIC_IRQ_INT(18), 1}, - {OCPBUS_DEVTYPE_TSEC, 1, SYS_RES_MEMORY, 0, OCPE500_TSEC1_OFF, - OCPE500_TSEC_SIZE}, + {OCPBUS_DEVTYPE_TSEC, 1, SYS_RES_MEMORY, 0, OCP85XX_TSEC1_OFF, + OCP85XX_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(19), 1}, {OCPBUS_DEVTYPE_TSEC, 1, SYS_RES_IRQ, 1, PIC_IRQ_INT(20), 1}, {OCPBUS_DEVTYPE_TSEC, 1, SYS_RES_IRQ, 2, PIC_IRQ_INT(24), 1}, - {OCPBUS_DEVTYPE_TSEC, 2, SYS_RES_MEMORY, 0, OCPE500_TSEC2_OFF, - OCPE500_TSEC_SIZE}, + {OCPBUS_DEVTYPE_TSEC, 2, SYS_RES_MEMORY, 0, OCP85XX_TSEC2_OFF, + OCP85XX_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 2, SYS_RES_IRQ, 0, PIC_IRQ_INT(15), 1}, {OCPBUS_DEVTYPE_TSEC, 2, SYS_RES_IRQ, 1, PIC_IRQ_INT(16), 1}, {OCPBUS_DEVTYPE_TSEC, 2, SYS_RES_IRQ, 2, PIC_IRQ_INT(17), 1}, - {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_MEMORY, 0, OCPE500_TSEC3_OFF, - OCPE500_TSEC_SIZE}, + {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_MEMORY, 0, OCP85XX_TSEC3_OFF, + OCP85XX_TSEC_SIZE}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 0, PIC_IRQ_INT(21), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 1, PIC_IRQ_INT(22), 1}, {OCPBUS_DEVTYPE_TSEC, 3, SYS_RES_IRQ, 2, PIC_IRQ_INT(23), 1}, - {OCPBUS_DEVTYPE_UART, 0, SYS_RES_MEMORY, 0, OCPE500_UART0_OFF, - OCPE500_UART_SIZE}, + {OCPBUS_DEVTYPE_UART, 0, SYS_RES_MEMORY, 0, OCP85XX_UART0_OFF, + OCP85XX_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, - {OCPBUS_DEVTYPE_UART, 1, SYS_RES_MEMORY, 0, OCPE500_UART1_OFF, - OCPE500_UART_SIZE}, + {OCPBUS_DEVTYPE_UART, 1, SYS_RES_MEMORY, 0, OCP85XX_UART1_OFF, + OCP85XX_UART_SIZE}, {OCPBUS_DEVTYPE_UART, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(26), 1}, - {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 0, OCPE500_PCI0_OFF, - OCPE500_PCI_SIZE}, - {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI0}, - {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI0}, - {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_MEMORY, 0, OCPE500_PCI1_OFF, - OCPE500_PCI_SIZE}, - {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI1}, - {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI1}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 0, OCPE500_PCI2_OFF, - OCPE500_PCI_SIZE}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_PCI2}, - {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCPE500_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 0, OCP85XX_PCI0_OFF, + OCP85XX_PCI_SIZE}, + {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI0}, + {OCPBUS_DEVTYPE_PCIB, 0, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI0}, + {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_MEMORY, 0, OCP85XX_PCI1_OFF, + OCP85XX_PCI_SIZE}, + {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI1}, + {OCPBUS_DEVTYPE_PCIB, 1, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI1}, + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 0, OCP85XX_PCI2_OFF, + OCP85XX_PCI_SIZE}, + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_PCI2}, + {OCPBUS_DEVTYPE_PCIB, 2, SYS_RES_IOPORT, 1, 0, OCP85XX_TGTIF_PCI2}, - {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCPE500_LBC_OFF, - OCPE500_LBC_SIZE}, - {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 1, 0, OCPE500_TGTIF_LBC}, + {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 0, OCP85XX_LBC_OFF, + OCP85XX_LBC_SIZE}, + {OCPBUS_DEVTYPE_LBC, 0, SYS_RES_MEMORY, 1, 0, OCP85XX_TGTIF_LBC}, - {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_MEMORY, 0, OCPE500_I2C0_OFF, - OCPE500_I2C_SIZE}, + {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_MEMORY, 0, OCP85XX_I2C0_OFF, + OCP85XX_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 0, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, - {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_MEMORY, 0, OCPE500_I2C1_OFF, - OCPE500_I2C_SIZE}, + {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_MEMORY, 0, OCP85XX_I2C1_OFF, + OCP85XX_I2C_SIZE}, {OCPBUS_DEVTYPE_I2C, 1, SYS_RES_IRQ, 0, PIC_IRQ_INT(27), 1}, {0} ==== //depot/projects/e500/sys/powerpc/mpc85xx/ocpbus.h#3 (text+ko) ==== @@ -25,51 +25,51 @@ * SUCH DAMAGE. * */ -#ifndef _MACHINE_OCPE500_H_ -#define _MACHINE_OCPE500_H_ +#ifndef _MACHINE_OCP85XX_H_ +#define _MACHINE_OCP85XX_H_ /* * Local access registers. */ -#define OCPE500_LAWBAR(n) (CCSRBAR_VA + 0xc08 + 0x20 * (n)) -#define OCPE500_LAWSR(n) (CCSRBAR_VA + 0xc10 + 0x20 * (n)) +#define OCP85XX_LAWBAR(n) (CCSRBAR_VA + 0xc08 + 0x20 * (n)) +#define OCP85XX_LAWSR(n) (CCSRBAR_VA + 0xc10 + 0x20 * (n)) /* * Power-On Reset configuration. */ -#define OCPE500_PORDEVSR (CCSRBAR_VA + 0xe000c) -#define OCPE500_PORDEVSR2 (CCSRBAR_VA + 0xe0014) +#define OCP85XX_PORDEVSR (CCSRBAR_VA + 0xe000c) +#define OCP85XX_PORDEVSR2 (CCSRBAR_VA + 0xe0014) /* * OCP Bus Definitions */ -#define OCPE500_I2C0_OFF 0x03000 -#define OCPE500_I2C1_OFF 0x03100 -#define OCPE500_I2C_SIZE 0x15 -#define OCPE500_UART0_OFF 0x04500 -#define OCPE500_UART1_OFF 0x04600 -#define OCPE500_UART_SIZE 0x10 -#define OCPE500_LBC_OFF 0x05000 -#define OCPE500_LBC_SIZE 0x1000 -#define OCPE500_PCI0_OFF 0x08000 -#define OCPE500_PCI1_OFF 0x09000 -#define OCPE500_PCI2_OFF 0x0A000 -#define OCPE500_PCI_SIZE 0x1000 -#define OCPE500_TSEC0_OFF 0x24000 -#define OCPE500_TSEC1_OFF 0x25000 -#define OCPE500_TSEC2_OFF 0x26000 -#define OCPE500_TSEC3_OFF 0x27000 -#define OCPE500_TSEC_SIZE 0x1000 -#define OCPE500_OPENPIC_OFF 0x40000 -#define OCPE500_OPENPIC_SIZE 0x200B4 -#define OCPE500_QUICC_OFF 0x80000 -#define OCPE500_QUICC_SIZE 0x20000 +#define OCP85XX_I2C0_OFF 0x03000 +#define OCP85XX_I2C1_OFF 0x03100 +#define OCP85XX_I2C_SIZE 0x15 +#define OCP85XX_UART0_OFF 0x04500 +#define OCP85XX_UART1_OFF 0x04600 +#define OCP85XX_UART_SIZE 0x10 +#define OCP85XX_LBC_OFF 0x05000 +#define OCP85XX_LBC_SIZE 0x1000 +#define OCP85XX_PCI0_OFF 0x08000 +#define OCP85XX_PCI1_OFF 0x09000 +#define OCP85XX_PCI2_OFF 0x0A000 +#define OCP85XX_PCI_SIZE 0x1000 +#define OCP85XX_TSEC0_OFF 0x24000 +#define OCP85XX_TSEC1_OFF 0x25000 +#define OCP85XX_TSEC2_OFF 0x26000 +#define OCP85XX_TSEC3_OFF 0x27000 +#define OCP85XX_TSEC_SIZE 0x1000 +#define OCP85XX_OPENPIC_OFF 0x40000 +#define OCP85XX_OPENPIC_SIZE 0x200B4 +#define OCP85XX_QUICC_OFF 0x80000 +#define OCP85XX_QUICC_SIZE 0x20000 -#define OCPE500_TGTIF_PCI0 0 -#define OCPE500_TGTIF_PCI1 1 -#define OCPE500_TGTIF_PCI2 2 -#define OCPE500_TGTIF_LBC 4 -#define OCPE500_TGTIF_RAM 15 +#define OCP85XX_TGTIF_PCI0 0 +#define OCP85XX_TGTIF_PCI1 1 +#define OCP85XX_TGTIF_PCI2 2 +#define OCP85XX_TGTIF_LBC 4 +#define OCP85XX_TGTIF_RAM 15 /* * PIC definitions @@ -81,4 +81,4 @@ #define PIC_IRQ_EXT(n) (PIC_IRQ_START + (n)) #define PIC_IRQ_INT(n) (PIC_IRQ_START + 16 + (n)) -#endif /* _MACHINE_OCPE500_H */ +#endif /* _MACHINE_OCP85XX_H */ ==== //depot/projects/e500/sys/powerpc/mpc85xx/pci_ocp.c#3 (text+ko) ==== @@ -568,7 +568,7 @@ KASSERT(wnd > 0, ("%s: inbound window 0 is invalid", __func__)); switch (tgt) { - case OCPE500_TGTIF_RAM: + case OCP85XX_TGTIF_RAM: attr = 0xa0f55000 | (ffsl(size) - 2); break; default: @@ -668,7 +668,7 @@ struct pci_ocp_softc *sc; uint32_t cfgreg; int error; - + sc = device_get_softc(dev); sc->sc_dev = dev; @@ -695,14 +695,14 @@ pci_ocp_inbound(sc, 1, -1, 0, 0, 0); pci_ocp_inbound(sc, 2, -1, 0, 0, 0); - pci_ocp_inbound(sc, 3, OCPE500_TGTIF_RAM, 0, 2U*1024U*1024U*1024U, 0); + pci_ocp_inbound(sc, 3, OCP85XX_TGTIF_RAM, 0, 2U*1024U*1024U*1024U, 0); sc->sc_busnr = pci_ocp_busnr; pci_ocp_init(sc, sc->sc_busnr); pci_ocp_busnr++; - device_add_child(dev, "pci", -1); - return (bus_generic_attach(dev)); + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); } static struct resource * @@ -750,7 +750,6 @@ pci_ocp_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - return (rman_release_resource(res)); } From owner-p4-projects@FreeBSD.ORG Sat Feb 23 23:42:31 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4751216A411; Sat, 23 Feb 2008 23:42:31 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF9BF16A404 for ; Sat, 23 Feb 2008 23:42:30 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D686613C45D for ; Sat, 23 Feb 2008 23:42:30 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1NNgUiq050044 for ; Sat, 23 Feb 2008 23:42:30 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1NNgUQq050041 for perforce@freebsd.org; Sat, 23 Feb 2008 23:42:30 GMT (envelope-from raj@freebsd.org) Date: Sat, 23 Feb 2008 23:42:30 GMT Message-Id: <200802232342.m1NNgUQq050041@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 136048 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2008 23:42:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=136048 Change 136048 by raj@raj_mimi on 2008/02/23 23:42:11 Another round of cleanups before the upcoming CVS merge. Affected files ... .. //depot/projects/e500/sys/dev/tsec/if_tsec.c#6 edit .. //depot/projects/e500/sys/dev/tsec/if_tsec.h#2 edit .. //depot/projects/e500/sys/dev/tsec/if_tsecreg.h#3 edit Differences ... ==== //depot/projects/e500/sys/dev/tsec/if_tsec.c#6 (text+ko) ==== @@ -75,59 +75,55 @@ #define PDEBUG(a) /* nop */ #endif -static int tsec_probe(device_t dev); -static int tsec_attach(device_t dev); -static int tsec_setup_intr(device_t dev, struct resource **ires, - void **ihand, int *irid, driver_intr_t handler, - const char *iname); -static void tsec_release_intr(device_t dev, struct resource *ires, - void *ihand, int irid, const char *iname); -static void tsec_free_dma(struct tsec_softc *sc); -static int tsec_detach(device_t dev); -static void tsec_shutdown(device_t dev); -static int tsec_suspend(device_t dev); /* XXX */ -static int tsec_resume(device_t dev); /* XXX */ +static int tsec_probe(device_t dev); +static int tsec_attach(device_t dev); +static int tsec_setup_intr(device_t dev, struct resource **ires, + void **ihand, int *irid, driver_intr_t handler, const char *iname); +static void tsec_release_intr(device_t dev, struct resource *ires, + void *ihand, int irid, const char *iname); +static void tsec_free_dma(struct tsec_softc *sc); +static int tsec_detach(device_t dev); +static void tsec_shutdown(device_t dev); +static int tsec_suspend(device_t dev); /* XXX */ +static int tsec_resume(device_t dev); /* XXX */ -static void tsec_init(void *xsc); -static void tsec_init_locked(struct tsec_softc *sc); -static void tsec_set_mac_address(struct tsec_softc *sc); -static void tsec_dma_ctl(struct tsec_softc *sc, int state); -static void tsec_intrs_ctl(struct tsec_softc *sc, int state); -static void tsec_reset_mac(struct tsec_softc *sc); +static void tsec_init(void *xsc); +static void tsec_init_locked(struct tsec_softc *sc); +static void tsec_set_mac_address(struct tsec_softc *sc); +static void tsec_dma_ctl(struct tsec_softc *sc, int state); +static void tsec_intrs_ctl(struct tsec_softc *sc, int state); +static void tsec_reset_mac(struct tsec_softc *sc); -static void tsec_watchdog(struct ifnet *ifp); -static void tsec_start(struct ifnet *ifp); -static void tsec_start_locked(struct ifnet *ifp); -static int tsec_encap(struct tsec_softc *sc, - struct mbuf *m_head); -static void tsec_setfilter(struct tsec_softc *sc); -static int tsec_ioctl(struct ifnet *ifp, u_long command, - caddr_t data); -static int tsec_ifmedia_upd(struct ifnet *ifp); -static void tsec_ifmedia_sts(struct ifnet *ifp, - struct ifmediareq *ifmr); -static int tsec_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, - struct mbuf **mbufp, uint32_t *paddr); -static void tsec_map_dma_addr(void *arg, bus_dma_segment_t *segs, - int nseg, int error); -static int tsec_alloc_dma_desc(device_t dev, bus_dma_tag_t *dtag, - bus_dmamap_t *dmap, bus_size_t dsize, - void **vaddr, void *raddr, - const char *dname); -static void tsec_free_dma_desc(bus_dma_tag_t dtag, bus_dmamap_t dmap, - void *vaddr); +static void tsec_watchdog(struct ifnet *ifp); +static void tsec_start(struct ifnet *ifp); +static void tsec_start_locked(struct ifnet *ifp); +static int tsec_encap(struct tsec_softc *sc, + struct mbuf *m_head); +static void tsec_setfilter(struct tsec_softc *sc); +static int tsec_ioctl(struct ifnet *ifp, u_long command, + caddr_t data); +static int tsec_ifmedia_upd(struct ifnet *ifp); +static void tsec_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr); +static int tsec_new_rxbuf(bus_dma_tag_t tag, bus_dmamap_t map, + struct mbuf **mbufp, uint32_t *paddr); +static void tsec_map_dma_addr(void *arg, bus_dma_segment_t *segs, + int nseg, int error); +static int tsec_alloc_dma_desc(device_t dev, bus_dma_tag_t *dtag, + bus_dmamap_t *dmap, bus_size_t dsize, void **vaddr, void *raddr, + const char *dname); +static void tsec_free_dma_desc(bus_dma_tag_t dtag, bus_dmamap_t dmap, + void *vaddr); -static void tsec_stop(struct tsec_softc *sc); +static void tsec_stop(struct tsec_softc *sc); -static void tsec_receive_intr(void *arg); -static void tsec_transmit_intr(void *arg); -static void tsec_error_intr(void *arg); +static void tsec_receive_intr(void *arg); +static void tsec_transmit_intr(void *arg); +static void tsec_error_intr(void *arg); -static void tsec_tick(void *arg); -static int tsec_miibus_readreg(device_t dev, int phy, int reg); -static void tsec_miibus_writereg(device_t dev, int phy, int reg, - int value); -static void tsec_miibus_statchg(device_t dev); +static void tsec_tick(void *arg); +static int tsec_miibus_readreg(device_t dev, int phy, int reg); +static void tsec_miibus_writereg(device_t dev, int phy, int reg, int value); +static void tsec_miibus_statchg(device_t dev); static struct tsec_softc *tsec0_sc = NULL; /* XXX ugly hack! */ @@ -164,7 +160,6 @@ MODULE_DEPEND(tsec, ether, 1, 1, 1); MODULE_DEPEND(tsec, miibus, 1, 1, 1); - static void tsec_get_hwaddr(struct tsec_softc *sc, uint8_t *addr) { @@ -230,11 +225,11 @@ /* Step 2: Initialize MACCFG2 */ TSEC_WRITE(sc, TSEC_REG_MACCFG2, - TSEC_MACCFG2_FULLDUPLEX | /* Full Duplex = 1 */ - TSEC_MACCFG2_PADCRC | /* PAD/CRC append */ - TSEC_MACCFG2_GMII | /* I/F Mode bit */ - TSEC_MACCFG2_PRECNT /* Preamble count = 7 */ - ); + TSEC_MACCFG2_FULLDUPLEX | /* Full Duplex = 1 */ + TSEC_MACCFG2_PADCRC | /* PAD/CRC append */ + TSEC_MACCFG2_GMII | /* I/F Mode bit */ + TSEC_MACCFG2_PRECNT /* Preamble count = 7 */ + ); /* Step 3: Initialize ECNTRL * While the documentation states that R100M is ignored if RPM is @@ -270,7 +265,8 @@ /* Step 8: Read MII Mgmt indicator register and check for Busy = 0 */ timeout = TSEC_READ_RETRY; - while (--timeout && (TSEC_READ(tsec0_sc, TSEC_REG_MIIMIND) & TSEC_MIIMIND_BUSY)) + while (--timeout && (TSEC_READ(tsec0_sc, TSEC_REG_MIIMIND) & + TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) { if_printf(ifp, "tsec_init_locked(): Mgmt busy timeout\n"); @@ -328,16 +324,16 @@ tx_desc[i].flags = ((i == TSEC_TX_NUM_DESC-1) ? TSEC_TXBD_W : 0); } bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_PREREAD | - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREWRITE); for (i = 0; i < TSEC_RX_NUM_DESC; i++) { rx_desc[i].bufptr = sc->rx_data[i].paddr; rx_desc[i].length = 0; rx_desc[i].flags = TSEC_RXBD_E | TSEC_RXBD_I | - ((i == TSEC_RX_NUM_DESC-1) ? TSEC_RXBD_W : 0); + ((i == TSEC_RX_NUM_DESC-1) ? TSEC_RXBD_W : 0); } bus_dmamap_sync(sc->tsec_rx_dtag, sc->tsec_rx_dmap, BUS_DMASYNC_PREREAD | - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREWRITE); /* Step 18: Initialize the maximum and minimum receive buffer length */ TSEC_WRITE(sc, TSEC_REG_MRBLR, TSEC_DEFAULT_MAX_RX_BUFFER_SIZE); @@ -387,8 +383,8 @@ TSEC_GLOBAL_LOCK_ASSERT(sc); KASSERT((ETHER_ADDR_LEN <= sizeof(macbuf)), - ("tsec_set_mac_address: (%d <= %d", - ETHER_ADDR_LEN, sizeof(macbuf))); + ("tsec_set_mac_address: (%d <= %d", + ETHER_ADDR_LEN, sizeof(macbuf))); macbufp = (char *)macbuf; curmac = (char *)IF_LLADDR(sc->tsec_ifp); @@ -430,14 +426,14 @@ case 1: /* Set write with response (WWR), wait (WOP) and snoop bits */ dma_flags |= (TSEC_DMACTRL_TDSEN | TSEC_DMACTRL_TBDSEN | - DMACTRL_WWR | DMACTRL_WOP); + DMACTRL_WWR | DMACTRL_WOP); /* Clear graceful stop bits */ dma_flags &= ~(TSEC_DMACTRL_GRS | TSEC_DMACTRL_GTS); break; default: device_printf(dev, "tsec_dma_ctl(): unknown state value: %d\n", - state); + state); } TSEC_WRITE(sc, TSEC_REG_DMACTRL, dma_flags); @@ -447,7 +443,7 @@ /* Wait for DMA stop */ timeout = TSEC_READ_RETRY; while (--timeout && (!(TSEC_READ(sc, TSEC_REG_IEVENT) & - (TSEC_IEVENT_GRSC | TSEC_IEVENT_GTSC)))) + (TSEC_IEVENT_GRSC | TSEC_IEVENT_GTSC)))) DELAY(TSEC_READ_DELAY); if (timeout == 0) @@ -476,22 +472,17 @@ TSEC_WRITE(sc, TSEC_REG_IMASK, 0); break; case 1: - TSEC_WRITE(sc, TSEC_REG_IMASK, - TSEC_IMASK_BREN | - TSEC_IMASK_RXCEN | - TSEC_IMASK_BSYEN | - TSEC_IMASK_EBERREN | - TSEC_IMASK_BTEN | - TSEC_IMASK_TXEEN | - TSEC_IMASK_TXBEN | - TSEC_IMASK_TXFEN | - TSEC_IMASK_XFUNEN | - TSEC_IMASK_RXFEN - ); + TSEC_WRITE(sc, TSEC_REG_IMASK, TSEC_IMASK_BREN | + TSEC_IMASK_RXCEN | TSEC_IMASK_BSYEN | + TSEC_IMASK_EBERREN | TSEC_IMASK_BTEN | + TSEC_IMASK_TXEEN | TSEC_IMASK_TXBEN | + TSEC_IMASK_TXFEN | TSEC_IMASK_XFUNEN | + TSEC_IMASK_RXFEN + ); break; default: device_printf(dev, "tsec_intrs_ctl(): unknown state value: %d\n", - state); + state); } } @@ -557,8 +548,8 @@ if (sc->tsec_link == 0) return; - bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_POSTREAD | - BUS_DMASYNC_POSTWRITE); + bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); for (;;) { /* Get packet from the queue */ @@ -578,8 +569,8 @@ queued++; BPF_MTAP(ifp, m0); } - bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_PREREAD | - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (queued) { /* Enable transmitter and watchdog timer */ @@ -612,7 +603,7 @@ /* Create mapping in DMA memory */ error = bus_dmamap_load_mbuf_sg(sc->tsec_tx_mtag, - *mapp, m0, segs, &nsegs, BUS_DMA_NOWAIT); + *mapp, m0, segs, &nsegs, BUS_DMA_NOWAIT); if (error != 0 || nsegs > TSEC_FREE_TX_DESC(sc) || nsegs <= 0) { bus_dmamap_unload(sc->tsec_tx_mtag, *mapp); TSEC_FREE_TX_MAP(sc, mapp); @@ -631,12 +622,12 @@ tx_desc->bufptr = segs[seg].ds_addr; tx_desc->flags = - (tx_desc->flags & TSEC_TXBD_W) /* wrap */ - | TSEC_TXBD_I /* interrupt */ - | TSEC_TXBD_R /* ready to send */ - | TSEC_TXBD_TC /* transmit the CRC sequence + (tx_desc->flags & TSEC_TXBD_W) | /* wrap */ + TSEC_TXBD_I | /* interrupt */ + TSEC_TXBD_R | /* ready to send */ + TSEC_TXBD_TC | /* transmit the CRC sequence * after the last data byte */ - | ((seg == nsegs-1) ? TSEC_TXBD_L : 0);/* last in frame */ + ((seg == nsegs-1) ? TSEC_TXBD_L : 0);/* last in frame */ } /* Save mbuf and DMA mapping for release at later stage */ @@ -680,7 +671,7 @@ if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((sc->tsec_if_flags ^ ifp->if_flags) & - IFF_PROMISC) + IFF_PROMISC) tsec_setfilter(sc); } else tsec_init_locked(sc); @@ -694,7 +685,7 @@ case SIOCGIFMEDIA: case SIOCSIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->tsec_mii->mii_media, - command); + command); break; default: error = ether_ioctl(ifp, command, data); @@ -760,7 +751,7 @@ } error = bus_dmamap_load_mbuf_sg(tag, map, new_mbuf, seg, &nsegs, - BUS_DMA_NOWAIT); + BUS_DMA_NOWAIT); KASSERT(nsegs == 1, ("Too many segments returned!")); if (nsegs != 1 || error) panic("tsec_new_rxbuf(): nsegs(%d), error(%d)", nsegs, error); @@ -797,21 +788,20 @@ static int tsec_alloc_dma_desc(device_t dev, bus_dma_tag_t *dtag, bus_dmamap_t *dmap, - bus_size_t dsize, void **vaddr, void *raddr, - const char *dname) + bus_size_t dsize, void **vaddr, void *raddr, const char *dname) { int error; /* Allocate a busdma tag and DMA safe memory for TX/RX descriptors. */ error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filtfunc, filtfuncarg */ - dsize, 1, /* maxsize, nsegments */ - dsize, 0, /* maxsegsz, flags */ - NULL, NULL, /* lockfunc, lockfuncarg */ - dtag); /* dmat */ + PAGE_SIZE, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + dsize, 1, /* maxsize, nsegments */ + dsize, 0, /* maxsegsz, flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + dtag); /* dmat */ if (error) { device_printf(dev, "failed to allocate busdma %s tag\n", dname); @@ -820,20 +810,20 @@ } error = bus_dmamem_alloc(*dtag, vaddr, BUS_DMA_NOWAIT | BUS_DMA_ZERO, - dmap); + dmap); if (error) { device_printf(dev, "failed to allocate %s DMA safe memory\n", - dname); + dname); bus_dma_tag_destroy(*dtag); (*vaddr) = NULL; return (ENXIO); } error = bus_dmamap_load(*dtag, *dmap, *vaddr, dsize, tsec_map_dma_addr, - raddr, BUS_DMA_NOWAIT); + raddr, BUS_DMA_NOWAIT); if (error) { device_printf(dev, "cannot get address of the %s descriptors\n", - dname); + dname); bus_dmamem_free(*dtag, *vaddr, *dmap); bus_dma_tag_destroy(*dtag); (*vaddr) = NULL; @@ -844,8 +834,7 @@ } static void -tsec_free_dma_desc(bus_dma_tag_t dtag, bus_dmamap_t dmap, - void *vaddr) +tsec_free_dma_desc(bus_dma_tag_t dtag, bus_dmamap_t dmap, void *vaddr) { if (vaddr == NULL) return; @@ -920,17 +909,17 @@ callout_init(&sc->tsec_tick_ch, 1); mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "TSEC TX lock", - MTX_DEF); + MTX_DEF); mtx_init(&sc->receive_lock, device_get_nameunit(dev), "TSEC RX lock", - MTX_DEF); + MTX_DEF); /* Reset all TSEC counters */ TSEC_TX_RX_COUNTERS_INIT(sc); - + /* Allocate IO memory for TSEC registers */ sc->sc_rrid = 0; sc->sc_rres = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->sc_rrid, - 0ul, ~0ul, TSEC_IO_SIZE, RF_ACTIVE); + 0ul, ~0ul, TSEC_IO_SIZE, RF_ACTIVE); if (sc->sc_rres == NULL) { device_printf(dev, "could not allocate IO memory range!\n"); tsec_detach(dev); @@ -950,8 +939,8 @@ /* Allocate a busdma tag and DMA safe memory for TX descriptors. */ error = tsec_alloc_dma_desc(dev, &sc->tsec_tx_dtag, &sc->tsec_tx_dmap, - sizeof(*sc->tsec_tx_vaddr) * TSEC_TX_NUM_DESC, - (void **)&sc->tsec_tx_vaddr, &sc->tsec_tx_raddr, "TX"); + sizeof(*sc->tsec_tx_vaddr) * TSEC_TX_NUM_DESC, + (void **)&sc->tsec_tx_vaddr, &sc->tsec_tx_raddr, "TX"); if (error) { tsec_detach(dev); return (ENXIO); @@ -959,8 +948,8 @@ /* Allocate a busdma tag and DMA safe memory for RX descriptors. */ error = tsec_alloc_dma_desc(dev, &sc->tsec_rx_dtag, &sc->tsec_rx_dmap, - sizeof(*sc->tsec_rx_vaddr) * TSEC_RX_NUM_DESC, - (void **)&sc->tsec_rx_vaddr, &sc->tsec_rx_raddr, "RX"); + sizeof(*sc->tsec_rx_vaddr) * TSEC_RX_NUM_DESC, + (void **)&sc->tsec_rx_vaddr, &sc->tsec_rx_raddr, "RX"); if (error) { tsec_detach(dev); return (ENXIO); @@ -968,15 +957,15 @@ /* Allocate a busdma tag for TX mbufs. */ error = bus_dma_tag_create(NULL, /* parent */ - TSEC_TXBUFFER_ALIGNMENT, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filtfunc, filtfuncarg */ - MCLBYTES * (TSEC_TX_NUM_DESC - 1),/* maxsize */ - TSEC_TX_NUM_DESC - 1, /* nsegments */ - MCLBYTES, 0, /* maxsegsz, flags */ - NULL, NULL, /* lockfunc, lockfuncarg */ - &sc->tsec_tx_mtag); /* dmat */ + TSEC_TXBUFFER_ALIGNMENT, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + MCLBYTES * (TSEC_TX_NUM_DESC - 1), /* maxsize */ + TSEC_TX_NUM_DESC - 1, /* nsegments */ + MCLBYTES, 0, /* maxsegsz, flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &sc->tsec_tx_mtag); /* dmat */ if (error) { device_printf(dev, "failed to allocate busdma tag(tx mbufs)\n"); tsec_detach(dev); @@ -985,15 +974,15 @@ /* Allocate a busdma tag for RX mbufs. */ error = bus_dma_tag_create(NULL, /* parent */ - TSEC_RXBUFFER_ALIGNMENT, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filtfunc, filtfuncarg */ - MCLBYTES, /* maxsize */ - 1, /* nsegments */ - MCLBYTES, 0, /* maxsegsz, flags */ - NULL, NULL, /* lockfunc, lockfuncarg */ - &sc->tsec_rx_mtag); /* dmat */ + TSEC_RXBUFFER_ALIGNMENT, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + MCLBYTES, /* maxsize */ + 1, /* nsegments */ + MCLBYTES, 0, /* maxsegsz, flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &sc->tsec_rx_mtag); /* dmat */ if (error) { device_printf(dev, "failed to allocate busdma tag(rx mbufs)\n"); tsec_detach(dev); @@ -1007,7 +996,7 @@ for (i = 0; i < TSEC_TX_NUM_DESC; i++) { map_pptr[i] = &map_ptr[i]; error = bus_dmamap_create(sc->tsec_tx_mtag, 0, - map_pptr[i]); + map_pptr[i]); if (error) { device_printf(dev, "failed to init TX ring\n"); tsec_detach(dev); @@ -1018,7 +1007,7 @@ /* Create RX busdma maps and zero mbuf handlers */ for (i = 0; i < TSEC_RX_NUM_DESC; i++) { error = bus_dmamap_create(sc->tsec_rx_mtag, 0, - &sc->rx_data[i].map); + &sc->rx_data[i].map); if (error) { device_printf(dev, "failed to init RX ring\n"); tsec_detach(dev); @@ -1030,10 +1019,10 @@ /* Create mbufs for RX buffers */ for (i = 0; i < TSEC_RX_NUM_DESC; i++) { error = tsec_new_rxbuf(sc->tsec_rx_mtag, sc->rx_data[i].map, - &sc->rx_data[i].mbuf, &sc->rx_data[i].paddr); + &sc->rx_data[i].mbuf, &sc->rx_data[i].paddr); if (error) { device_printf(dev, "can't load rx DMA map %d, error = " - "%d\n", i, error); + "%d\n", i, error); tsec_detach(dev); return (error); } @@ -1082,8 +1071,8 @@ /* Interrupts configuration (TX/RX/ERR) */ sc->sc_transmit_irid = OCP_TSEC_RID_TXIRQ; error = tsec_setup_intr(dev, &sc->sc_transmit_ires, - &sc->sc_transmit_ihand, &sc->sc_transmit_irid, - tsec_transmit_intr, "TX"); + &sc->sc_transmit_ihand, &sc->sc_transmit_irid, + tsec_transmit_intr, "TX"); if (error) { tsec_detach(dev); return (error); @@ -1091,8 +1080,8 @@ sc->sc_receive_irid = OCP_TSEC_RID_RXIRQ; error = tsec_setup_intr(dev, &sc->sc_receive_ires, - &sc->sc_receive_ihand, &sc->sc_receive_irid, - tsec_receive_intr, "RX"); + &sc->sc_receive_ihand, &sc->sc_receive_irid, + tsec_receive_intr, "RX"); if (error) { tsec_detach(dev); return (error); @@ -1100,8 +1089,8 @@ sc->sc_error_irid = OCP_TSEC_RID_ERRIRQ; error = tsec_setup_intr(dev, &sc->sc_error_ires, - &sc->sc_error_ihand, &sc->sc_error_irid, - tsec_error_intr, "ERR"); + &sc->sc_error_ihand, &sc->sc_error_irid, + tsec_error_intr, "ERR"); if (error) { tsec_detach(dev); return (error); @@ -1112,7 +1101,7 @@ static int tsec_setup_intr(device_t dev, struct resource **ires, void **ihand, int *irid, - driver_intr_t handler, const char *iname) + driver_intr_t handler, const char *iname) { struct tsec_softc *sc; int error; @@ -1125,7 +1114,7 @@ return (ENXIO); } error = bus_setup_intr(dev, *ires, INTR_TYPE_NET | INTR_MPSAFE, - NULL, handler, sc, ihand); + NULL, handler, sc, ihand); if (error) { device_printf(dev, "failed to set up %s IRQ\n", iname); if (bus_release_resource(dev, SYS_RES_IRQ, *irid, *ires)) @@ -1138,7 +1127,7 @@ static void tsec_release_intr(device_t dev, struct resource *ires, void *ihand, int irid, - const char *iname) + const char *iname) { int error; @@ -1148,12 +1137,12 @@ error = bus_teardown_intr(dev, ires, ihand); if (error) device_printf(dev, "bus_teardown_intr() failed for %s intr" - ", error %d\n", iname, error); + ", error %d\n", iname, error); error = bus_release_resource(dev, SYS_RES_IRQ, irid, ires); if (error) device_printf(dev, "bus_release_resource() failed for %s intr" - ", error %d\n", iname, error); + ", error %d\n", iname, error); } static void @@ -1165,7 +1154,7 @@ for (i = 0; i < TSEC_TX_NUM_DESC; i++) if (sc->tx_map_data[i] != NULL) bus_dmamap_destroy(sc->tsec_tx_mtag, - sc->tx_map_data[i]); + sc->tx_map_data[i]); /* Destroy tag for Tx mbufs */ bus_dma_tag_destroy(sc->tsec_tx_mtag); @@ -1174,7 +1163,7 @@ if (sc->rx_data[i].mbuf) { /* Unload buffer from DMA */ bus_dmamap_sync(sc->tsec_rx_mtag, sc->rx_data[i].map, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->tsec_rx_mtag, sc->rx_data[i].map); /* Free buffer */ @@ -1183,16 +1172,16 @@ /* Destroy map for this buffer */ if (sc->rx_data[i].map != NULL) bus_dmamap_destroy(sc->tsec_rx_mtag, - sc->rx_data[i].map); + sc->rx_data[i].map); } /* Destroy tag for Rx mbufs */ bus_dma_tag_destroy(sc->tsec_rx_mtag); /* Unload TX/RX descriptors */ tsec_free_dma_desc(sc->tsec_tx_dtag, sc->tsec_tx_dmap, - sc->tsec_tx_vaddr); + sc->tsec_tx_vaddr); tsec_free_dma_desc(sc->tsec_rx_dtag, sc->tsec_rx_dmap, - sc->tsec_rx_vaddr); + sc->tsec_rx_vaddr); } static int @@ -1212,11 +1201,11 @@ /* Stop and release all interrupts */ tsec_release_intr(dev, sc->sc_transmit_ires, sc->sc_transmit_ihand, - sc->sc_transmit_irid, "TX"); + sc->sc_transmit_irid, "TX"); tsec_release_intr(dev, sc->sc_receive_ires, sc->sc_receive_ihand, - sc->sc_receive_irid, "RX"); + sc->sc_receive_irid, "RX"); tsec_release_intr(dev, sc->sc_error_ires, sc->sc_error_ihand, - sc->sc_error_irid, "ERR"); + sc->sc_error_irid, "ERR"); /* Detach network interface */ if (sc->tsec_ifp) { @@ -1231,11 +1220,10 @@ /* Free IO memory handler */ if (sc->sc_rres) { error = bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_rrid, - sc->sc_rres); + sc->sc_rres); if (error) device_printf(dev, "bus_release_resource() failed for" - " IO memory, error %d\n", - error); + " IO memory, error %d\n", error); } /* Destroy locks */ @@ -1339,21 +1327,20 @@ TSEC_RECEIVE_LOCK(sc); bus_dmamap_sync(sc->tsec_rx_dtag, sc->tsec_rx_dmap, BUS_DMASYNC_POSTREAD | - BUS_DMASYNC_POSTWRITE); + BUS_DMASYNC_POSTWRITE); for (count = 0; /* count < TSEC_RX_NUM_DESC */; count++) { rx_desc = TSEC_GET_CUR_RX_DESC(sc); flags = rx_desc->flags; /* Check if there is anything to receive */ - if ((flags & TSEC_RXBD_E) || - (count >= TSEC_RX_NUM_DESC)) { + if ((flags & TSEC_RXBD_E) || (count >= TSEC_RX_NUM_DESC)) { /* * Avoid generating another interrupt */ if (flags & TSEC_RXBD_E) TSEC_WRITE(sc, TSEC_REG_IEVENT, - TSEC_IEVENT_RXB | TSEC_IEVENT_RXF); + TSEC_IEVENT_RXB | TSEC_IEVENT_RXF); /* * We didn't consume current descriptor and have to * return it to the queue @@ -1362,13 +1349,11 @@ break; } - if (flags & (TSEC_RXBD_LG | TSEC_RXBD_SH - | TSEC_RXBD_NO | TSEC_RXBD_CR - | TSEC_RXBD_OV | TSEC_RXBD_TR)) { - + if (flags & (TSEC_RXBD_LG | TSEC_RXBD_SH | TSEC_RXBD_NO | + TSEC_RXBD_CR | TSEC_RXBD_OV | TSEC_RXBD_TR)) { rx_desc->length = 0; - rx_desc->flags = (rx_desc->flags & ~TSEC_RXBD_ZEROONINIT) | - TSEC_RXBD_E | TSEC_RXBD_I; + rx_desc->flags = (rx_desc->flags & + ~TSEC_RXBD_ZEROONINIT) | TSEC_RXBD_E | TSEC_RXBD_I; continue; } @@ -1382,16 +1367,15 @@ m = rx_data[i].mbuf; if (tsec_new_rxbuf(sc->tsec_rx_mtag, rx_data[i].map, - &rx_data[i].mbuf, &rx_data[i].paddr)) { + &rx_data[i].mbuf, &rx_data[i].paddr)) { ifp->if_ierrors++; continue; } /* Attach new buffer to descriptor, and clear flags */ rx_desc->bufptr = rx_data[i].paddr; rx_desc->length = 0; - rx_desc->flags = - (rx_desc->flags & ~TSEC_RXBD_ZEROONINIT) | - TSEC_RXBD_E | TSEC_RXBD_I; + rx_desc->flags = (rx_desc->flags & ~TSEC_RXBD_ZEROONINIT) | + TSEC_RXBD_E | TSEC_RXBD_I; /* Prepare buffer for upper layers */ m->m_pkthdr.rcvif = ifp; @@ -1401,8 +1385,8 @@ rcv_mbufs[c1++] = m; } - bus_dmamap_sync(sc->tsec_rx_dtag, sc->tsec_rx_dmap, BUS_DMASYNC_PREREAD | - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->tsec_rx_dtag, sc->tsec_rx_dmap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); TSEC_RECEIVE_UNLOCK(sc); @@ -1439,7 +1423,7 @@ TSEC_WRITE(sc, TSEC_REG_MON_TNCL, 0); bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_POSTREAD | - BUS_DMASYNC_POSTWRITE); + BUS_DMASYNC_POSTWRITE); while (TSEC_CUR_DIFF_DIRTY_TX_DESC(sc)) { tx_desc = TSEC_GET_DIRTY_TX_DESC(sc); @@ -1466,15 +1450,15 @@ ifp->if_opackets++; send = 1; } - bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, BUS_DMASYNC_PREREAD | - BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (send) { - /* Now send anything that was pending */ + /* Now send anything that was pending */ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; tsec_start_locked(ifp); - /* Stop wathdog if all sent */ + /* Stop wathdog if all sent */ if (TSEC_EMPTYQ_TX_MBUF(sc)) ifp->if_timer = 0; } @@ -1497,14 +1481,13 @@ /* Clear events bits in hardware */ TSEC_WRITE(sc, TSEC_REG_IEVENT, TSEC_IEVENT_RXC | TSEC_IEVENT_BSY | - TSEC_IEVENT_EBERR | TSEC_IEVENT_MSRO | - TSEC_IEVENT_BABT | TSEC_IEVENT_TXC | - TSEC_IEVENT_TXE | TSEC_IEVENT_LC | - TSEC_IEVENT_CRL | TSEC_IEVENT_XFUN); + TSEC_IEVENT_EBERR | TSEC_IEVENT_MSRO | TSEC_IEVENT_BABT | + TSEC_IEVENT_TXC | TSEC_IEVENT_TXE | TSEC_IEVENT_LC | + TSEC_IEVENT_CRL | TSEC_IEVENT_XFUN); if (eflags & TSEC_IEVENT_EBERR) if_printf(ifp, "System bus error occurred during" - " a DMA transaction (flags: 0x%x)\n", eflags); + " a DMA transaction (flags: 0x%x)\n", eflags); /* Check transmitter errors */ if (eflags & TSEC_IEVENT_TXE) { @@ -1526,7 +1509,7 @@ /* Get data from RX buffers */ tsec_receive_intr(arg); - /* Make receiver again active */ + /* Make receiver again active */ TSEC_WRITE(sc, TSEC_REG_RSTAT, TSEC_RSTAT_QHLT); } if (eflags & TSEC_IEVENT_BABR) @@ -1573,7 +1556,7 @@ timeout = TSEC_READ_RETRY; while (--timeout && TSEC_READ(sc, TSEC_REG_MIIMIND) & - (TSEC_MIIMIND_NOTVALID | TSEC_MIIMIND_BUSY)) + (TSEC_MIIMIND_NOTVALID | TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) @@ -1583,8 +1566,7 @@ } static void -tsec_miibus_writereg(device_t dev, int phy, int reg, - int value) +tsec_miibus_writereg(device_t dev, int phy, int reg, int value) { struct tsec_softc *sc; uint32_t timeout; @@ -1645,8 +1627,8 @@ default: sc->tsec_link = 0; device_printf(dev, "Unknown speed (%d), link %s!\n", - IFM_SUBTYPE(mii->mii_media_active), - ((link) ? "up" : "down")); + IFM_SUBTYPE(mii->mii_media_active), + ((link) ? "up" : "down")); return; } TSEC_WRITE(sc, TSEC_REG_MACCFG2, tmp); ==== //depot/projects/e500/sys/dev/tsec/if_tsec.h#2 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (C) 2006, 2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2006-2007 Semihalf * All rights reserved. * + * Written by: Piotr Kruszynski + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -35,7 +37,7 @@ struct tsec_softc { /* XXX MII bus requires that struct ifnet is first!!! */ struct ifnet *tsec_ifp; - + struct mtx transmit_lock; /* transmitter lock */ struct mtx receive_lock; /* receiver lock */ @@ -99,7 +101,7 @@ uint32_t tx_map_used_get_cnt; uint32_t tx_map_used_put_cnt; bus_dmamap_t *tx_map_used_data[TSEC_TX_NUM_DESC]; - + /* mbufs in TX queue */ uint32_t tx_mbuf_used_get_cnt; uint32_t tx_mbuf_used_put_cnt; ==== //depot/projects/e500/sys/dev/tsec/if_tsecreg.h#3 (text+ko) ==== @@ -1,7 +1,9 @@ /*- - * Copyright (C) 2006, 2007 Semihalf, Piotr Kruszynski + * Copyright (C) 2006-2007 Semihalf * All rights reserved. * + * Written by: Piotr Kruszynski + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: