From owner-svn-src-stable-6@FreeBSD.ORG Mon Feb 9 22:22:10 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16D5D1065706; Mon, 9 Feb 2009 22:22:10 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 034868FC31; Mon, 9 Feb 2009 22:22:10 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n19MM9X8073321; Mon, 9 Feb 2009 22:22:09 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n19MM9lA073320; Mon, 9 Feb 2009 22:22:09 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <200902092222.n19MM9lA073320@svn.freebsd.org> From: Olivier Houchard Date: Mon, 9 Feb 2009 22:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188421 - stable/6/sys/arm/arm X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 22:22:11 -0000 Author: cognet Date: Mon Feb 9 22:22:09 2009 New Revision: 188421 URL: http://svn.freebsd.org/changeset/base/188421 Log: MFC r188112 r188112 | cognet | 2009-02-04 02:14:06 +0100 (Wed, 04 Feb 2009) | 8 lines Erm... Report the buffer as being bounced even when it's the entire buffer, or we would end up invalidating the cache line for what we just copied... Modified: stable/6/sys/arm/arm/busdma_machdep.c Modified: stable/6/sys/arm/arm/busdma_machdep.c ============================================================================== --- stable/6/sys/arm/arm/busdma_machdep.c Mon Feb 9 22:21:38 2009 (r188420) +++ stable/6/sys/arm/arm/busdma_machdep.c Mon Feb 9 22:22:09 2009 (r188421) @@ -1146,7 +1146,7 @@ _bus_dma_buf_is_in_bp(bus_dmamap_t map, STAILQ_FOREACH(bpage, &map->bpages, links) { if ((vm_offset_t)buf >= bpage->datavaddr && - (vm_offset_t)buf + len < bpage->datavaddr + + (vm_offset_t)buf + len <= bpage->datavaddr + bpage->datacount) return (1); } From owner-svn-src-stable-6@FreeBSD.ORG Mon Feb 9 23:23:00 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 740EA10656DA; Mon, 9 Feb 2009 23:23:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60F088FC1B; Mon, 9 Feb 2009 23:23:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n19NN0O7074634; Mon, 9 Feb 2009 23:23:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n19NN0QL074633; Mon, 9 Feb 2009 23:23:00 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200902092323.n19NN0QL074633@svn.freebsd.org> From: Robert Watson Date: Mon, 9 Feb 2009 23:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188425 - stable/6/sys/kern X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 23:23:02 -0000 Author: rwatson Date: Mon Feb 9 23:23:00 2009 New Revision: 188425 URL: http://svn.freebsd.org/changeset/base/188425 Log: In unp_connect(), don't unlock the global UNIX domain socket lock when UNP_CONNECTING is set, as the caller will do that. (Due to significantly different locking in 7.0 and later, this fix applies only to stable/7). PR: kern/128974 Submitted by: Larry Baird Modified: stable/6/sys/kern/uipc_usrreq.c Modified: stable/6/sys/kern/uipc_usrreq.c ============================================================================== --- stable/6/sys/kern/uipc_usrreq.c Mon Feb 9 22:59:22 2009 (r188424) +++ stable/6/sys/kern/uipc_usrreq.c Mon Feb 9 23:23:00 2009 (r188425) @@ -1027,10 +1027,8 @@ unp_connect(struct socket *so, struct so if (len <= 0) return (EINVAL); strlcpy(buf, soun->sun_path, len + 1); - if (unp->unp_flags & UNP_CONNECTING) { - UNP_UNLOCK(); + if (unp->unp_flags & UNP_CONNECTING) return (EALREADY); - } unp->unp_flags |= UNP_CONNECTING; UNP_UNLOCK(); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); From owner-svn-src-stable-6@FreeBSD.ORG Tue Feb 10 11:36:38 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3F26106564A; Tue, 10 Feb 2009 11:36:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AEB008FC2C; Tue, 10 Feb 2009 11:36:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 4EEA846B42; Tue, 10 Feb 2009 06:36:38 -0500 (EST) Date: Tue, 10 Feb 2009 11:36:38 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org In-Reply-To: <200902092323.n19NN0QL074633@svn.freebsd.org> Message-ID: References: <200902092323.n19NN0QL074633@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r188425 - stable/6/sys/kern X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 11:36:41 -0000 On Mon, 9 Feb 2009, Robert Watson wrote: > Author: rwatson > Date: Mon Feb 9 23:23:00 2009 > New Revision: 188425 > URL: http://svn.freebsd.org/changeset/base/188425 > > Log: > In unp_connect(), don't unlock the global UNIX domain socket lock when > UNP_CONNECTING is set, as the caller will do that. > > (Due to significantly different locking in 7.0 and later, this fix > applies only to stable/7). This should have read "stable/6" -- the bug in question isn't present in the finer-grained UNIX domain socket locking introduced in the 7.x series. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-stable-6@FreeBSD.ORG Thu Feb 12 14:49:21 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB5B106568A; Thu, 12 Feb 2009 14:49:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9CE8FC14; Thu, 12 Feb 2009 14:49:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1CEnKup058701; Thu, 12 Feb 2009 14:49:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1CEnKFK058700; Thu, 12 Feb 2009 14:49:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200902121449.n1CEnKFK058700@svn.freebsd.org> From: John Baldwin Date: Thu, 12 Feb 2009 14:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188517 - in stable/6/sys: . boot/i386/libi386 contrib/pf dev/cxgb X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 14:49:24 -0000 Author: jhb Date: Thu Feb 12 14:49:20 2009 New Revision: 188517 URL: http://svn.freebsd.org/changeset/base/188517 Log: MFC: Use CPUID to see if the current CPU supports long mode when attemping to boot an amd64 kernel. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/bootinfo64.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- stable/6/sys/boot/i386/libi386/bootinfo64.c Thu Feb 12 14:44:15 2009 (r188516) +++ stable/6/sys/boot/i386/libi386/bootinfo64.c Thu Feb 12 14:49:20 2009 (r188517) @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" @@ -124,7 +127,45 @@ bi_copymodules64(vm_offset_t addr) } /* - * Load the information expected by an i386 kernel. + * Check to see if this CPU supports long mode. + */ +static int +bi_checkcpu(void) +{ + char *cpu_vendor; + int vendor[3]; + int eflags, regs[4]; + + /* Check for presence of "cpuid". */ + eflags = read_eflags(); + write_eflags(eflags ^ PSL_ID); + if (!((eflags ^ read_eflags()) & PSL_ID)) + return (0); + + /* Fetch the vendor string. */ + do_cpuid(0, regs); + vendor[0] = regs[1]; + vendor[1] = regs[3]; + vendor[2] = regs[2]; + cpu_vendor = (char *)vendor; + + /* Check for vendors that support AMD features. */ + if (strncmp(cpu_vendor, "GenuineIntel", 12) != 0 && + strncmp(cpu_vendor, "AuthenticAMD", 12) != 0) + return (0); + + /* Has to support AMD features. */ + do_cpuid(0x80000000, regs); + if (!(regs[0] >= 0x80000001)) + return (0); + + /* Check for long mode. */ + do_cpuid(0x80000001, regs); + return (regs[3] & AMDID_LM); +} + +/* + * Load the information expected by an amd64 kernel. * * - The 'boothowto' argument is constructed * - The 'bootdev' argument is constructed @@ -147,6 +188,11 @@ bi_load64(char *args, vm_offset_t *modul char *kernelname; const char *kernelpath; + if (!bi_checkcpu()) { + printf("CPU doesn't support long mode\n"); + return (EINVAL); + } + howto = bi_getboothowto(args); /* From owner-svn-src-stable-6@FreeBSD.ORG Thu Feb 12 15:26:29 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555A91065674; Thu, 12 Feb 2009 15:26:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 467AE8FC1A; Thu, 12 Feb 2009 15:26:28 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1CFQSTs059497; Thu, 12 Feb 2009 15:26:28 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1CFQS2M059496; Thu, 12 Feb 2009 15:26:28 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <200902121526.n1CFQS2M059496@svn.freebsd.org> From: Olivier Houchard Date: Thu, 12 Feb 2009 15:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188519 - stable/6/sys/dev/sound/pci X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 15:26:30 -0000 Author: cognet Date: Thu Feb 12 15:26:27 2009 New Revision: 188519 URL: http://svn.freebsd.org/changeset/base/188519 Log: MFC: r188424 | cognet | 2009-02-09 23:59:22 +0100 (Mon, 09 Feb 2009) | 6 lines Hmm... "base? base : 0" and "base" should be equivalent. Modified: stable/6/sys/dev/sound/pci/ds1.c Modified: stable/6/sys/dev/sound/pci/ds1.c ============================================================================== --- stable/6/sys/dev/sound/pci/ds1.c Thu Feb 12 15:26:00 2009 (r188518) +++ stable/6/sys/dev/sound/pci/ds1.c Thu Feb 12 15:26:27 2009 (r188519) @@ -396,7 +396,7 @@ ds_initpbank(volatile struct pbank *pb, pb->Format |= b16? 0 : 0x80000000; pb->Format |= (stereo && (ch == 2 || ch == 4))? 0x00000001 : 0; pb->LoopDefault = 0; - pb->PgBase = base? base : 0; + pb->PgBase = base; pb->PgLoop = 0; pb->PgLoopEnd = len >> ss; pb->PgLoopFrac = 0;