From owner-freebsd-ia64@FreeBSD.ORG Mon Jun 7 11:06:57 2010 Return-Path: Delivered-To: freebsd-ia64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5508A1065674 for ; Mon, 7 Jun 2010 11:06:57 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 24FBE8FC23 for ; Mon, 7 Jun 2010 11:06:57 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o57B6vRK008669 for ; Mon, 7 Jun 2010 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o57B6uuB008667 for freebsd-ia64@FreeBSD.org; Mon, 7 Jun 2010 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Jun 2010 11:06:56 GMT Message-Id: <201006071106.o57B6uuB008667@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ia64@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-ia64@FreeBSD.org X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 11:06:57 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ia64/147502 ia64 [ia64][busdma] bounce buffering does not work reliably o ia64/147501 ia64 [ia64] options PREEMPTION causes instability 2 problems total. From owner-freebsd-ia64@FreeBSD.ORG Thu Jun 10 18:20:05 2010 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A8E10656BD for ; Thu, 10 Jun 2010 18:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 01B598FC14 for ; Thu, 10 Jun 2010 18:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5AIK12W033766 for ; Thu, 10 Jun 2010 18:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5AIK1uG033765; Thu, 10 Jun 2010 18:20:01 GMT (envelope-from gnats) Resent-Date: Thu, 10 Jun 2010 18:20:01 GMT Resent-Message-Id: <201006101820.o5AIK1uG033765@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ia64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcel Moolenaar Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59AB2106567C for ; Thu, 10 Jun 2010 18:10:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 301478FC08 for ; Thu, 10 Jun 2010 18:10:46 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5AIAk4v044938 for ; Thu, 10 Jun 2010 18:10:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o5AIAj29044928; Thu, 10 Jun 2010 18:10:45 GMT (envelope-from nobody) Message-Id: <201006101810.o5AIAj29044928@www.freebsd.org> Date: Thu, 10 Jun 2010 18:10:45 GMT From: Marcel Moolenaar To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ia64/147772: [ia64] ptc_g causes MCA on McKinley & Madison CPUs X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 18:20:06 -0000 >Number: 147772 >Category: ia64 >Synopsis: [ia64] ptc_g causes MCA on McKinley & Madison CPUs >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ia64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 10 18:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Marcel Moolenaar >Release: 9-CURRENT >Organization: >Environment: FreeBSD pluto2.freebsd.org 9.0-CURRENT FreeBSD 9.0-CURRENT #19 r208970M: Thu Jun 10 04:12:20 UTC 2010 marcel@pluto2.freebsd.org:/usr/obj/tank/usr/src/sys/PLUTO2 ia64 >Description: Background: The code following the exception_save_restart and exception_restore_restart labels run with psr.ic disabled. A TLB miss after will trigger a Nested Data TLB Fault. The code has been designed so that a TLB miss, when happens, will happen in the first bundle after these labels and the Nested Data TLB Fault handler will know how to insert the TLB and restart the bundle. The underlying assumption is that when the TLB is in the translation cache, the entire sequence will complete without a TLB miss until either psr.ic can be enabled or the rfi instruction is executed. The only TLB that we need is the one for the kernel stack so that we can read or write the trapframe. Problem: The ptc.g operation for the Mckinley and Madison processors has the side-effect of purging more than the requested translation. While this is not a problem in general, it invalidates the assumption made for exception_save_restart and exception_restore_restart in SMP configurations. Since the ptc.g purges the translation caches of all CPUs in the coherency domain, a ptc.g executed on one CPU can cause a purge on another CPU that is currently running the critical code sequences following the exception_save_restart and exception_restore_restart. While the purge address is never the translation relating to the trapframe that is being read or written, the behaviour of McKInley and Madison processors in purging more than the requested translation can result in an unexpected TLB miss. This then results in the mishandling of the Nested Data TLB Fault, which typically results in a machine check. This problem is not observed on a Montecito processor. The problem was also never observed on Merced, FWIW. >How-To-Repeat: Run pho's stress2 test on McKinley or Madison with SMP enabled. >Fix: There are 2 possible fixes: 1. serialize ptc.g with respect to exception_save_restart and exception_restore_restart so that never execute ptc.g on one processor while some other processor is running the critical sequence. 2. replace the use of ptc.g with an IPI mechanism and have all CPUs execute ptc.l locally. This guarantees that no purge will be visible to any CPU when executing the critical sequence. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-ia64@FreeBSD.ORG Thu Jun 10 23:11:29 2010 Return-Path: Delivered-To: ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AAFD1065673; Thu, 10 Jun 2010 23:11:29 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 14A988FC0A; Thu, 10 Jun 2010 23:11:28 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o5ANBSsO006534; Thu, 10 Jun 2010 19:11:28 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o5ANBREn006529; Thu, 10 Jun 2010 23:11:27 GMT (envelope-from tinderbox@freebsd.org) Date: Thu, 10 Jun 2010 23:11:27 GMT Message-Id: <201006102311.o5ANBREn006529@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on ia64/ia64 X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2010 23:11:29 -0000 TB --- 2010-06-10 21:35:24 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-06-10 21:35:24 - starting HEAD tinderbox run for ia64/ia64 TB --- 2010-06-10 21:35:24 - cleaning the object tree TB --- 2010-06-10 21:35:45 - cvsupping the source tree TB --- 2010-06-10 21:35:45 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/ia64/ia64/supfile TB --- 2010-06-10 21:36:22 - building world TB --- 2010-06-10 21:36:22 - MAKEOBJDIRPREFIX=/obj TB --- 2010-06-10 21:36:22 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-06-10 21:36:22 - TARGET=ia64 TB --- 2010-06-10 21:36:22 - TARGET_ARCH=ia64 TB --- 2010-06-10 21:36:22 - TZ=UTC TB --- 2010-06-10 21:36:22 - __MAKE_CONF=/dev/null TB --- 2010-06-10 21:36:22 - cd /src TB --- 2010-06-10 21:36:22 - /usr/bin/make -B buildworld >>> World build started on Thu Jun 10 21:36:23 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything >>> World build completed on Thu Jun 10 22:58:23 UTC 2010 TB --- 2010-06-10 22:58:23 - generating LINT kernel config TB --- 2010-06-10 22:58:23 - cd /src/sys/ia64/conf TB --- 2010-06-10 22:58:23 - /usr/bin/make -B LINT TB --- 2010-06-10 22:58:23 - building LINT kernel TB --- 2010-06-10 22:58:23 - MAKEOBJDIRPREFIX=/obj TB --- 2010-06-10 22:58:23 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-06-10 22:58:23 - TARGET=ia64 TB --- 2010-06-10 22:58:23 - TARGET_ARCH=ia64 TB --- 2010-06-10 22:58:23 - TZ=UTC TB --- 2010-06-10 22:58:23 - __MAKE_CONF=/dev/null TB --- 2010-06-10 22:58:23 - cd /src TB --- 2010-06-10 22:58:23 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Thu Jun 10 22:58:24 UTC 2010 >>> stage 1: configuring the kernel >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3.1: making dependencies >>> stage 3.2: building everything [...] cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_radiotap.c cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_ratectl.c cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_regdomain.c cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_scan.c cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_scan_sta.c cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/ia64/libuwx/src -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-builtin -mconstant-gp -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -Werror /src/sys/net80211/ieee80211_sta.c /src/sys/net80211/ieee80211_sta.c: In function 'sta_input': /src/sys/net80211/ieee80211_sta.c:587: error: expected ')' before '!' token *** Error code 1 Stop in /obj/ia64/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-06-10 23:11:27 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-06-10 23:11:27 - ERROR: failed to build lint kernel TB --- 2010-06-10 23:11:27 - 4527.59 user 703.51 system 5763.39 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-ia64-ia64.full From owner-freebsd-ia64@FreeBSD.ORG Fri Jun 11 03:04:50 2010 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C7B61065677; Fri, 11 Jun 2010 03:04:50 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 64ADC8FC21; Fri, 11 Jun 2010 03:04:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5B34ovP091271; Fri, 11 Jun 2010 03:04:50 GMT (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5B34oRb091267; Fri, 11 Jun 2010 03:04:50 GMT (envelope-from marcel) Date: Fri, 11 Jun 2010 03:04:50 GMT Message-Id: <201006110304.o5B34oRb091267@freefall.freebsd.org> To: marcel@FreeBSD.org, marcel@FreeBSD.org, freebsd-ia64@FreeBSD.org From: marcel@FreeBSD.org Cc: Subject: Re: ia64/147502: [ia64][busdma] bounce buffering does not work reliably X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 03:04:50 -0000 Synopsis: [ia64][busdma] bounce buffering does not work reliably State-Changed-From-To: open->closed State-Changed-By: marcel State-Changed-When: Fri Jun 11 03:04:13 UTC 2010 State-Changed-Why: Fix committed. http://www.freebsd.org/cgi/query-pr.cgi?pr=147502 From owner-freebsd-ia64@FreeBSD.ORG Fri Jun 11 03:10:03 2010 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E26F9106564A for ; Fri, 11 Jun 2010 03:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B908E8FC15 for ; Fri, 11 Jun 2010 03:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5B3A3Be091395 for ; Fri, 11 Jun 2010 03:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5B3A35W091389; Fri, 11 Jun 2010 03:10:03 GMT (envelope-from gnats) Date: Fri, 11 Jun 2010 03:10:03 GMT Message-Id: <201006110310.o5B3A35W091389@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: ia64/147502: commit references a PR X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 03:10:04 -0000 The following reply was made to PR ia64/147502; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: ia64/147502: commit references a PR Date: Fri, 11 Jun 2010 03:00:44 +0000 (UTC) Author: marcel Date: Fri Jun 11 03:00:32 2010 New Revision: 209026 URL: http://svn.freebsd.org/changeset/base/209026 Log: Bump MAX_BPAGES from 256 to 1024. It seems that a few drivers, bge(4) in particular, do not handle deferred DMA map load operations at all. Any error, and especially EINPROGRESS, is treated as a hard error and typically abort the current operation. The fact that the busdma code queues the load operation for when resources (i.e. bounce buffers in this particular case) are available makes this especially problematic. Bounce buffering, unlike what the PR synopsis would suggest, works fine. While on the subject, properly implement swi_vm(). PR: 147502 MFC after: 1 week Modified: head/sys/ia64/ia64/busdma_machdep.c head/sys/ia64/ia64/vm_machdep.c head/sys/ia64/include/md_var.h Modified: head/sys/ia64/ia64/busdma_machdep.c ============================================================================== --- head/sys/ia64/ia64/busdma_machdep.c Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/ia64/busdma_machdep.c Fri Jun 11 03:00:32 2010 (r209026) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#define MAX_BPAGES 256 +#define MAX_BPAGES 1024 struct bus_dma_tag { bus_dma_tag_t parent; @@ -77,7 +77,7 @@ struct bounce_page { STAILQ_ENTRY(bounce_page) links; }; -int busdma_swi_pending; +u_int busdma_swi_pending; static struct mtx bounce_lock; static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; Modified: head/sys/ia64/ia64/vm_machdep.c ============================================================================== --- head/sys/ia64/ia64/vm_machdep.c Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/ia64/vm_machdep.c Fri Jun 11 03:00:32 2010 (r209026) @@ -378,9 +378,8 @@ sf_buf_free(struct sf_buf *sf) */ void swi_vm(void *dummy) -{ -#if 0 +{ + if (busdma_swi_pending != 0) busdma_swi(); -#endif } Modified: head/sys/ia64/include/md_var.h ============================================================================== --- head/sys/ia64/include/md_var.h Fri Jun 11 02:50:53 2010 (r209025) +++ head/sys/ia64/include/md_var.h Fri Jun 11 03:00:32 2010 (r209026) @@ -75,6 +75,7 @@ struct ia64_init_return { extern uint64_t ia64_lapic_addr; extern long Maxmem; +extern u_int busdma_swi_pending; void busdma_swi(void); int copyout_regstack(struct thread *, uint64_t *, uint64_t *); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-ia64@FreeBSD.ORG Sat Jun 12 01:46:45 2010 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E4CF1065679; Sat, 12 Jun 2010 01:46:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 66B578FC08; Sat, 12 Jun 2010 01:46:44 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5C1kiDb079424; Sat, 12 Jun 2010 01:46:44 GMT (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5C1ki0W079420; Sat, 12 Jun 2010 01:46:44 GMT (envelope-from marcel) Date: Sat, 12 Jun 2010 01:46:44 GMT Message-Id: <201006120146.o5C1ki0W079420@freefall.freebsd.org> To: marcel@FreeBSD.org, marcel@FreeBSD.org, freebsd-ia64@FreeBSD.org From: marcel@FreeBSD.org Cc: Subject: Re: ia64/147772: [ia64] ptc_g causes MCA on McKinley & Madison CPUs X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 01:46:45 -0000 Synopsis: [ia64] ptc_g causes MCA on McKinley & Madison CPUs State-Changed-From-To: open->closed State-Changed-By: marcel State-Changed-When: Sat Jun 12 01:46:20 UTC 2010 State-Changed-Why: Fix committed. http://www.freebsd.org/cgi/query-pr.cgi?pr=147772 From owner-freebsd-ia64@FreeBSD.ORG Sat Jun 12 01:50:05 2010 Return-Path: Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C0C106566B for ; Sat, 12 Jun 2010 01:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B9C828FC08 for ; Sat, 12 Jun 2010 01:50:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5C1o5jK079569 for ; Sat, 12 Jun 2010 01:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5C1o5D8079562; Sat, 12 Jun 2010 01:50:05 GMT (envelope-from gnats) Date: Sat, 12 Jun 2010 01:50:05 GMT Message-Id: <201006120150.o5C1o5D8079562@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: ia64/147772: commit references a PR X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 01:50:06 -0000 The following reply was made to PR ia64/147772; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: ia64/147772: commit references a PR Date: Sat, 12 Jun 2010 01:45:44 +0000 (UTC) Author: marcel Date: Sat Jun 12 01:45:29 2010 New Revision: 209085 URL: http://svn.freebsd.org/changeset/base/209085 Log: The ptc.g operation for the Mckinley and Madison processors has the side-effect of purging more than the requested translation. While this is not a problem in general, it invalidates the assumption made during constructing the trapframe on entry into the kernel in SMP configurations. The assumption is that only the first store to the stack will possibly cause a TLB miss. Since the ptc.g purges the translation caches of all CPUs in the coherency domain, a ptc.g executed on one CPU can cause a purge on another CPU that is currently running the critical code that saves the state to the trapframe. This can cause an unexpected TLB miss and with interrupt collection disabled this means an unexpected data nested TLB fault. A data nested TLB fault will not save any context, nor provide a way for software to determine what caused the TLB miss nor where it occured. Careful construction of the kernel entry and exit code allows us to handle a TLB miss in precisely orchastrated points and thereby avoiding the need to wire the kernel stack, but the unexpected TLB miss caused by the ptc.g instructution resulted in an unrecoverable condition and resulting in machine checks. The solution to this problem is to synchronize the kernel entry on all CPUs with the use of the ptc.g instruction on a single CPU by implementing a bare-bones readers-writer lock that allows N readers (= N CPUs entering the kernel) and 1 writer (= execution of the ptc.g instruction on some CPU). This solution wins over a rendez-vous approach by not interrupting CPUs with an IPI. This problem has not been observed on the Montecito. PR: ia64/147772 MFC after: 6 days Modified: head/sys/ia64/ia64/exception.S head/sys/ia64/ia64/pmap.c Modified: head/sys/ia64/ia64/exception.S ============================================================================== --- head/sys/ia64/ia64/exception.S Sat Jun 12 00:28:53 2010 (r209084) +++ head/sys/ia64/ia64/exception.S Sat Jun 12 01:45:29 2010 (r209085) @@ -170,6 +170,27 @@ ENTRY_NOPROFILE(exception_save, 0) * r30,r31=trapframe pointers * p14,p15=memory stack switch */ + + /* PTC.G enter non-exclusive */ + mov r24 = ar.ccv + movl r25 = pmap_ptc_g_sem + ;; +.ptc_g_0: + ld8.acq r26 = [r25] + ;; + tbit.nz p12, p0 = r26, 63 +(p12) br.cond.spnt.few .ptc_g_0 + ;; + mov ar.ccv = r26 + adds r27 = 1, r26 + ;; + cmpxchg8.rel r27 = [r25], r27, ar.ccv + ;; + cmp.ne p12, p0 = r26, r27 +(p12) br.cond.spnt.few .ptc_g_0 + ;; + mov ar.ccv = r24 + exception_save_restart: { .mmi st8 [r30]=r19,16 // length @@ -407,6 +428,23 @@ exception_save_restart: movl gp=__gp ;; } + + /* PTC.G leave non-exclusive */ + srlz.d + movl r25 = pmap_ptc_g_sem + ;; +.ptc_g_1: + ld8.acq r26 = [r25] + ;; + mov ar.ccv = r26 + adds r27 = -1, r26 + ;; + cmpxchg8.rel r27 = [r25], r27, ar.ccv + ;; + cmp.ne p12, p0 = r26, r27 +(p12) br.cond.spnt.few .ptc_g_1 + ;; + { .mib srlz.d nop 0 Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Sat Jun 12 00:28:53 2010 (r209084) +++ head/sys/ia64/ia64/pmap.c Sat Jun 12 01:45:29 2010 (r209085) @@ -182,7 +182,8 @@ static uint64_t pmap_ptc_e_count1 = 3; static uint64_t pmap_ptc_e_count2 = 2; static uint64_t pmap_ptc_e_stride1 = 0x2000; static uint64_t pmap_ptc_e_stride2 = 0x100000000; -struct mtx pmap_ptcmutex; + +volatile u_long pmap_ptc_g_sem; /* * Data for the RID allocator @@ -340,7 +341,6 @@ pmap_bootstrap() pmap_ptc_e_count2, pmap_ptc_e_stride1, pmap_ptc_e_stride2); - mtx_init(&pmap_ptcmutex, "Global PTC lock", NULL, MTX_SPIN); /* * Setup RIDs. RIDs 0..7 are reserved for the kernel. @@ -540,7 +540,8 @@ pmap_invalidate_page(vm_offset_t va) { struct ia64_lpte *pte; struct pcpu *pc; - uint64_t tag; + uint64_t tag, sem; + register_t is; u_int vhpt_ofs; critical_enter(); @@ -550,10 +551,32 @@ pmap_invalidate_page(vm_offset_t va) pte = (struct ia64_lpte *)(pc->pc_md.vhpt + vhpt_ofs); atomic_cmpset_64(&pte->tag, tag, 1UL << 63); } - critical_exit(); - mtx_lock_spin(&pmap_ptcmutex); + + /* PTC.G enter exclusive */ + is = intr_disable(); + + /* Atomically assert writer after all writers have gone. */ + do { + /* Wait until there's no more writer. */ + do { + sem = atomic_load_acq_long(&pmap_ptc_g_sem); + tag = sem | (1ul << 63); + } while (sem == tag); + } while (!atomic_cmpset_rel_long(&pmap_ptc_g_sem, sem, tag)); + + /* Wait until all readers are gone. */ + tag = (1ul << 63); + do { + sem = atomic_load_acq_long(&pmap_ptc_g_sem); + } while (sem != tag); + ia64_ptc_ga(va, PAGE_SHIFT << 2); - mtx_unlock_spin(&pmap_ptcmutex); + + /* PTC.G leave exclusive */ + atomic_store_rel_long(&pmap_ptc_g_sem, 0); + + intr_restore(is); + critical_exit(); } static void _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-ia64@FreeBSD.ORG Sat Jun 12 09:09:52 2010 Return-Path: Delivered-To: ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 040F21065678; Sat, 12 Jun 2010 09:09:52 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id AB0778FC0C; Sat, 12 Jun 2010 09:09:51 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o5C99o4x023435; Sat, 12 Jun 2010 05:09:50 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o5C99o6H023431; Sat, 12 Jun 2010 09:09:50 GMT (envelope-from tinderbox@freebsd.org) Date: Sat, 12 Jun 2010 09:09:50 GMT Message-Id: <201006120909.o5C99o6H023431@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on ia64/ia64 X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 09:09:52 -0000 TB --- 2010-06-12 07:47:44 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-06-12 07:47:44 - starting HEAD tinderbox run for ia64/ia64 TB --- 2010-06-12 07:47:44 - cleaning the object tree TB --- 2010-06-12 07:48:05 - cvsupping the source tree TB --- 2010-06-12 07:48:05 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/ia64/ia64/supfile TB --- 2010-06-12 07:48:54 - building world TB --- 2010-06-12 07:48:54 - MAKEOBJDIRPREFIX=/obj TB --- 2010-06-12 07:48:54 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-06-12 07:48:54 - TARGET=ia64 TB --- 2010-06-12 07:48:54 - TARGET_ARCH=ia64 TB --- 2010-06-12 07:48:54 - TZ=UTC TB --- 2010-06-12 07:48:54 - __MAKE_CONF=/dev/null TB --- 2010-06-12 07:48:54 - cd /src TB --- 2010-06-12 07:48:54 - /usr/bin/make -B buildworld >>> World build started on Sat Jun 12 07:48:54 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/command.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/config.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/devices.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/dhcp.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/disks.c cc1: warnings being treated as errors /src/usr.sbin/sysinstall/disks.c: In function 'diskPartitionWrite': /src/usr.sbin/sysinstall/disks.c:877: warning: unused variable 'boot1' *** Error code 1 Stop in /src/usr.sbin/sysinstall. *** Error code 1 Stop in /src/usr.sbin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-06-12 09:09:50 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-06-12 09:09:50 - ERROR: failed to build world TB --- 2010-06-12 09:09:50 - 3829.16 user 618.84 system 4926.38 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-ia64-ia64.full From owner-freebsd-ia64@FreeBSD.ORG Sat Jun 12 20:02:20 2010 Return-Path: Delivered-To: ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 661851065672; Sat, 12 Jun 2010 20:02:20 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 1CA208FC15; Sat, 12 Jun 2010 20:02:19 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.3) with ESMTP id o5CK2JYu038556; Sat, 12 Jun 2010 16:02:19 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o5CK2JZW038553; Sat, 12 Jun 2010 20:02:19 GMT (envelope-from tinderbox@freebsd.org) Date: Sat, 12 Jun 2010 20:02:19 GMT Message-Id: <201006122002.o5CK2JZW038553@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on ia64/ia64 X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 20:02:20 -0000 TB --- 2010-06-12 18:41:25 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-06-12 18:41:25 - starting HEAD tinderbox run for ia64/ia64 TB --- 2010-06-12 18:41:25 - cleaning the object tree TB --- 2010-06-12 18:41:38 - cvsupping the source tree TB --- 2010-06-12 18:41:38 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/ia64/ia64/supfile TB --- 2010-06-12 18:42:02 - building world TB --- 2010-06-12 18:42:02 - MAKEOBJDIRPREFIX=/obj TB --- 2010-06-12 18:42:02 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-06-12 18:42:02 - TARGET=ia64 TB --- 2010-06-12 18:42:02 - TARGET_ARCH=ia64 TB --- 2010-06-12 18:42:02 - TZ=UTC TB --- 2010-06-12 18:42:02 - __MAKE_CONF=/dev/null TB --- 2010-06-12 18:42:02 - cd /src TB --- 2010-06-12 18:42:02 - /usr/bin/make -B buildworld >>> World build started on Sat Jun 12 18:42:04 UTC 2010 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/command.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/config.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/devices.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/dhcp.c cc -O2 -pipe -DUSE_GZIP=1 -fno-strict-aliasing -I/src/usr.sbin/sysinstall/../../gnu/lib/libdialog -I. -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/sysinstall/disks.c cc1: warnings being treated as errors /src/usr.sbin/sysinstall/disks.c: In function 'diskPartitionWrite': /src/usr.sbin/sysinstall/disks.c:877: warning: unused variable 'boot1' *** Error code 1 Stop in /src/usr.sbin/sysinstall. *** Error code 1 Stop in /src/usr.sbin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-06-12 20:02:19 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-06-12 20:02:19 - ERROR: failed to build world TB --- 2010-06-12 20:02:19 - 3821.70 user 611.36 system 4853.29 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-ia64-ia64.full