From owner-freebsd-ia64@FreeBSD.ORG Mon Apr 12 11:07:02 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 A5D0A1065740 for ; Mon, 12 Apr 2010 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 71E9C8FC20 for ; Mon, 12 Apr 2010 11:07: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 o3CB72mn042460 for ; Mon, 12 Apr 2010 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3CB71nh042458 for freebsd-ia64@FreeBSD.org; Mon, 12 Apr 2010 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Apr 2010 11:07:01 GMT Message-Id: <201004121107.o3CB71nh042458@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, 12 Apr 2010 11:07:02 -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/113102 ia64 [MCA] Multiple records can have the same sequence numb 1 problem total. From owner-freebsd-ia64@FreeBSD.ORG Mon Apr 12 21:43:22 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 775C21065673 for ; Mon, 12 Apr 2010 21:43:22 +0000 (UTC) (envelope-from invitation@mydailyflogmail.com) Received: from vmta12.mydailyflogmail.com (vmta12.mydailyflogmail.com [74.86.160.119]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE3D8FC15 for ; Mon, 12 Apr 2010 21:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=k1; d=mydailyflogmail.com; h=Date:To:From:Subject:Message-ID:Reply-to:Sender:MIME-Version:Content-Transfer-Encoding:Content-Type; i=invitation@mydailyflogmail.com; bh=KxHQ4W0leIZO6sWiYeHx8Z2Lcrc=; b=k8yXpLek4cW59LTSv42VU9nRVzmVN+2HZkebrgVbrSKJbwNNkaRT+Xy/oeO6v1AQHgU6jDSlBVTU Jc1URORYRSqLbBDW8uUa9g1K2VXKes5ee/0p+49/WCbc3juWpDwwH+XDpz5z7X3xip79cZM6Uxi9 Z4seBNmpE6sdbQNKBaI= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=k1; d=mydailyflogmail.com; b=uk1RnxkD9XZXVcpyW97BJPHzK3RaVeIVVWlucLYRLLE4KQtoyZeub4QggtOB1Ysc2ea6uZ5HaVMP AdChdywVOmmUPoTzHX04QsSAbY6S1i2uv9hnqVKpXiPwr7e5gpVWn8umCQcftcB87fIoenC2FLDO cYOvwtbteR/5ADmwxK8=; Received: from localhost (127.0.0.1) by vmta12.mydailyflogmail.com (PowerMTA(TM) v3.5r4) id hoe9vk0q1rc9 for ; Mon, 12 Apr 2010 16:42:07 -0500 (envelope-from ) Date: Mon, 12 Apr 2010 16:42:07 -0500 To: freebsd-ia64@freebsd.org From: vijai rangan Message-ID: X-Priority: 3 X-Mailer: PHPMailer (phpmailer.codeworxtech.com) [version 2.1] Sender: vijai rangan MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" Subject: 1 new photo on MyDailyFlog! X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vijai rangan List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2010 21:43:22 -0000 Hi! I would like you to come and see my latest photos on MyDailyFlog. Check out: http://www.mydailyflog.com/go/invite_register/fashionfab/60753864&stc=71 Thanks! vijai rangan ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ To unsubscribe of this type of email from MyDailyFlog in the future, please click below: http://www.mydailyflog.com/un/freebsd-ia64@freebsd.org&md5=85b6b4823cc64644&bl=16 Please do not reply directly to this email. Questions? Contact us - http://www.mydailyflog.com/go/contact_us MyDailyFlog, Refriendz Ltd. PO BOX 1184, Luton, Bedfordshire, LU1 9AT. From owner-freebsd-ia64@FreeBSD.ORG Tue Apr 13 03:17:53 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 36051106566B; Tue, 13 Apr 2010 03:17:53 +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 076A78FC21; Tue, 13 Apr 2010 03:17:52 +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 o3D3HqJl009281; Mon, 12 Apr 2010 23:17:52 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.3/Submit) id o3D3HqsZ009276; Tue, 13 Apr 2010 03:17:52 GMT (envelope-from tinderbox@freebsd.org) Date: Tue, 13 Apr 2010 03:17:52 GMT Message-Id: <201004130317.o3D3HqsZ009276@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: Tue, 13 Apr 2010 03:17:53 -0000 TB --- 2010-04-13 01:39:41 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2010-04-13 01:39:41 - starting HEAD tinderbox run for ia64/ia64 TB --- 2010-04-13 01:39:41 - cleaning the object tree TB --- 2010-04-13 01:40:03 - cvsupping the source tree TB --- 2010-04-13 01:40:03 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/ia64/ia64/supfile TB --- 2010-04-13 01:40:26 - building world TB --- 2010-04-13 01:40:26 - MAKEOBJDIRPREFIX=/obj TB --- 2010-04-13 01:40:26 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-04-13 01:40:26 - TARGET=ia64 TB --- 2010-04-13 01:40:26 - TARGET_ARCH=ia64 TB --- 2010-04-13 01:40:26 - TZ=UTC TB --- 2010-04-13 01:40:26 - __MAKE_CONF=/dev/null TB --- 2010-04-13 01:40:26 - cd /src TB --- 2010-04-13 01:40:26 - /usr/bin/make -B buildworld >>> World build started on Tue Apr 13 01:40:28 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 Tue Apr 13 02:57:28 UTC 2010 TB --- 2010-04-13 02:57:28 - generating LINT kernel config TB --- 2010-04-13 02:57:28 - cd /src/sys/ia64/conf TB --- 2010-04-13 02:57:28 - /usr/bin/make -B LINT TB --- 2010-04-13 02:57:28 - building LINT kernel TB --- 2010-04-13 02:57:28 - MAKEOBJDIRPREFIX=/obj TB --- 2010-04-13 02:57:28 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2010-04-13 02:57:28 - TARGET=ia64 TB --- 2010-04-13 02:57:28 - TARGET_ARCH=ia64 TB --- 2010-04-13 02:57:28 - TZ=UTC TB --- 2010-04-13 02:57:28 - __MAKE_CONF=/dev/null TB --- 2010-04-13 02:57:28 - cd /src TB --- 2010-04-13 02:57:28 - /usr/bin/make -B buildkernel KERNCONF=LINT >>> Kernel build for LINT started on Tue Apr 13 02:57:28 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 [...] ===> geom/geom_sched (all) ===> geom/geom_sched/gs_sched (all) cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/ia64/src/sys/LINT/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=15000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -I/obj/ia64/src/sys/LINT -fno-builtin -ffixed-r13 -mfixed-range=f32-f127 -fpic -ffreestanding -std=iso9899:1999 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sched.c cc1: warnings being treated as errors /src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sched.c: In function 'g_sched_issuer_pid': /src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sched.c:759: warning: implicit declaration of function 'g_sched_issuer' /src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sched.c:759: warning: nested extern declaration of 'g_sched_issuer' /src/sys/modules/geom/geom_sched/gs_sched/../../../../geom/sched/g_sched.c:759: warning: initialization makes pointer from integer without a cast *** Error code 1 Stop in /src/sys/modules/geom/geom_sched/gs_sched. *** Error code 1 Stop in /src/sys/modules/geom/geom_sched. *** Error code 1 Stop in /src/sys/modules/geom. *** Error code 1 Stop in /src/sys/modules. *** Error code 1 Stop in /obj/ia64/src/sys/LINT. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2010-04-13 03:17:52 - WARNING: /usr/bin/make returned exit code 1 TB --- 2010-04-13 03:17:52 - ERROR: failed to build lint kernel TB --- 2010-04-13 03:17:52 - 4751.38 user 674.40 system 5890.77 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-ia64-ia64.full From owner-freebsd-ia64@FreeBSD.ORG Tue Apr 13 22:29:57 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 7C0C41065670; Tue, 13 Apr 2010 22:29:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 54AD68FC26; Tue, 13 Apr 2010 22:29: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 o3DMTvA5006202; Tue, 13 Apr 2010 22:29:57 GMT (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3DMTvka006198; Tue, 13 Apr 2010 22:29:57 GMT (envelope-from marcel) Date: Tue, 13 Apr 2010 22:29:57 GMT Message-Id: <201004132229.o3DMTvka006198@freefall.freebsd.org> To: marcel@FreeBSD.org, marcel@FreeBSD.org, freebsd-ia64@FreeBSD.org From: marcel@FreeBSD.org Cc: Subject: Re: ia64/113102: [MCA] Multiple records can have the same sequence number 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: Tue, 13 Apr 2010 22:29:57 -0000 Synopsis: [MCA] Multiple records can have the same sequence number State-Changed-From-To: open->closed State-Changed-By: marcel State-Changed-When: Tue Apr 13 22:29:32 UTC 2010 State-Changed-Why: Resolved in 9-CURRENT. http://www.freebsd.org/cgi/query-pr.cgi?pr=113102 From owner-freebsd-ia64@FreeBSD.ORG Tue Apr 13 22:30:06 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 CAAFE106564A for ; Tue, 13 Apr 2010 22:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A08E48FC20 for ; Tue, 13 Apr 2010 22:30:06 +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 o3DMU6fe006384 for ; Tue, 13 Apr 2010 22:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3DMU6sw006379; Tue, 13 Apr 2010 22:30:06 GMT (envelope-from gnats) Date: Tue, 13 Apr 2010 22:30:06 GMT Message-Id: <201004132230.o3DMU6sw006379@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: ia64/113102: 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: Tue, 13 Apr 2010 22:30:07 -0000 The following reply was made to PR ia64/113102; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: ia64/113102: commit references a PR Date: Tue, 13 Apr 2010 22:20:22 +0000 (UTC) Author: marcel Date: Tue Apr 13 22:20:12 2010 New Revision: 206570 URL: http://svn.freebsd.org/changeset/base/206570 Log: Populate the sysctl tree with any MCA records we collected. The sequence number is used as the name of a sysctl node, under which we add the MCA records using the CPU id as the leaf name. Add the hw.mca.inject sysctl to provide a way to inject MC errors and trigger machine checks. PR: ia64/113102 Modified: head/sys/ia64/ia64/mca.c head/sys/ia64/include/mca.h Modified: head/sys/ia64/ia64/mca.c ============================================================================== --- head/sys/ia64/ia64/mca.c Tue Apr 13 21:32:06 2010 (r206569) +++ head/sys/ia64/ia64/mca.c Tue Apr 13 22:20:12 2010 (r206570) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Marcel Moolenaar + * Copyright (c) 2002-2010 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -44,19 +45,19 @@ MALLOC_DEFINE(M_MCA, "MCA", "Machine Che struct mca_info { STAILQ_ENTRY(mca_info) mi_link; - char mi_name[32]; + u_long mi_seqnr; + u_int mi_cpuid; size_t mi_recsz; char mi_record[0]; }; -static STAILQ_HEAD(, mca_info) mca_records = - STAILQ_HEAD_INITIALIZER(mca_records); +STAILQ_HEAD(mca_info_list, mca_info); -int64_t mca_info_size[SAL_INFO_TYPES]; -vm_offset_t mca_info_block; -struct mtx mca_info_block_lock; +static int64_t mca_info_size[SAL_INFO_TYPES]; +static vm_offset_t mca_info_block; +static struct mtx mca_info_block_lock; -SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, 0, "MCA container"); +SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RW, NULL, "MCA container"); static int mca_count; /* Number of records stored. */ static int mca_first; /* First (lowest) record ID. */ @@ -69,6 +70,32 @@ SYSCTL_INT(_hw_mca, OID_AUTO, first, CTL SYSCTL_INT(_hw_mca, OID_AUTO, last, CTLFLAG_RD, &mca_last, 0, "Last record id"); +static struct mtx mca_sysctl_lock; + +static int +mca_sysctl_inject(SYSCTL_HANDLER_ARGS) +{ + struct ia64_pal_result res; + u_int val; + int error; + + val = 0; + error = sysctl_wire_old_buffer(req, sizeof(u_int)); + if (!error) + error = sysctl_handle_int(oidp, &val, 0, req); + + if (error != 0 || req->newptr == NULL) + return (error); + + /* For example: val=137 causes a fatal CPU error. */ + res = ia64_call_pal_stacked(PAL_MC_ERROR_INJECT, val, 0, 0); + printf("%s: %#lx, %#lx, %#lx, %#lx\n", __func__, res.pal_status, + res.pal_result[0], res.pal_result[1], res.pal_result[2]); + return (0); +} +SYSCTL_PROC(_hw_mca, OID_AUTO, inject, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + mca_sysctl_inject, "I", "set to trigger a MCA"); + static int mca_sysctl_handler(SYSCTL_HANDLER_ARGS) { @@ -85,27 +112,8 @@ mca_sysctl_handler(SYSCTL_HANDLER_ARGS) return (error); } -void -ia64_mca_populate(void) -{ - struct mca_info *rec; - - mtx_lock_spin(&mca_info_block_lock); - while (!STAILQ_EMPTY(&mca_records)) { - rec = STAILQ_FIRST(&mca_records); - STAILQ_REMOVE_HEAD(&mca_records, mi_link); - mtx_unlock_spin(&mca_info_block_lock); - (void)SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), - OID_AUTO, rec->mi_name, CTLTYPE_OPAQUE | CTLFLAG_RD, - rec->mi_record, rec->mi_recsz, mca_sysctl_handler, "S,MCA", - "Error record"); - mtx_lock_spin(&mca_info_block_lock); - } - mtx_unlock_spin(&mca_info_block_lock); -} - -void -ia64_mca_save_state(int type) +static void +ia64_mca_collect_state(int type, struct mca_info_list *reclst) { struct ia64_sal_result result; struct mca_record_header *hdr; @@ -123,13 +131,13 @@ ia64_mca_save_state(int type) if (mca_info_block == 0) return; - mtx_lock_spin(&mca_info_block_lock); while (1) { + mtx_lock_spin(&mca_info_block_lock); result = ia64_sal_entry(SAL_GET_STATE_INFO, type, 0, mca_info_block, 0, 0, 0, 0); if (result.sal_status < 0) { mtx_unlock_spin(&mca_info_block_lock); - return; + break; } hdr = (struct mca_record_header *)mca_info_block; @@ -142,9 +150,10 @@ ia64_mca_save_state(int type) M_NOWAIT | M_ZERO); if (rec == NULL) /* XXX: Not sure what to do. */ - return; + break; - sprintf(rec->mi_name, "%lld", (long long)seqnr); + rec->mi_seqnr = seqnr; + rec->mi_cpuid = PCPU_GET(cpuid); mtx_lock_spin(&mca_info_block_lock); @@ -163,7 +172,6 @@ ia64_mca_save_state(int type) if (seqnr != hdr->rh_seqnr) { mtx_unlock_spin(&mca_info_block_lock); free(rec, M_MCA); - mtx_lock_spin(&mca_info_block_lock); continue; } } @@ -171,23 +179,51 @@ ia64_mca_save_state(int type) rec->mi_recsz = recsz; bcopy((char*)mca_info_block, rec->mi_record, recsz); - if (mca_count > 0) { - if (seqnr < mca_first) - mca_first = seqnr; - else if (seqnr > mca_last) - mca_last = seqnr; - } else - mca_first = mca_last = seqnr; - - mca_count++; - STAILQ_INSERT_TAIL(&mca_records, rec, mi_link); - /* * Clear the state so that we get any other records when * they exist. */ result = ia64_sal_entry(SAL_CLEAR_STATE_INFO, type, 0, 0, 0, 0, 0, 0); + + mtx_unlock_spin(&mca_info_block_lock); + + STAILQ_INSERT_TAIL(reclst, rec, mi_link); + } +} + +void +ia64_mca_save_state(int type) +{ + char name[64]; + struct mca_info_list reclst = STAILQ_HEAD_INITIALIZER(reclst); + struct mca_info *rec; + struct sysctl_oid *oid; + + ia64_mca_collect_state(type, &reclst); + + STAILQ_FOREACH(rec, &reclst, mi_link) { + sprintf(name, "%lu", rec->mi_seqnr); + oid = SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), + OID_AUTO, name, CTLFLAG_RW, NULL, name); + if (oid == NULL) + continue; + + mtx_lock(&mca_sysctl_lock); + if (mca_count > 0) { + if (rec->mi_seqnr < mca_first) + mca_first = rec->mi_seqnr; + else if (rec->mi_seqnr > mca_last) + mca_last = rec->mi_seqnr; + } else + mca_first = mca_last = rec->mi_seqnr; + mca_count++; + mtx_unlock(&mca_sysctl_lock); + + sprintf(name, "%u", rec->mi_cpuid); + SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(oid), rec->mi_cpuid, + name, CTLTYPE_OPAQUE | CTLFLAG_RD, rec->mi_record, + rec->mi_recsz, mca_sysctl_handler, "S,MCA", "MCA record"); } } @@ -237,7 +273,14 @@ ia64_mca_init(void) * should be rare. On top of that, performance is not an issue when * dealing with machine checks... */ - mtx_init(&mca_info_block_lock, "MCA spin lock", NULL, MTX_SPIN); + mtx_init(&mca_info_block_lock, "MCA info lock", NULL, MTX_SPIN); + + /* + * Serialize sysctl operations with a sleep lock. Note that this + * implies that we update the sysctl tree in a context that allows + * sleeping. + */ + mtx_init(&mca_sysctl_lock, "MCA sysctl lock", NULL, MTX_DEF); /* * Get and save any processor and platfom error records. Note that in Modified: head/sys/ia64/include/mca.h ============================================================================== --- head/sys/ia64/include/mca.h Tue Apr 13 21:32:06 2010 (r206569) +++ head/sys/ia64/include/mca.h Tue Apr 13 22:20:12 2010 (r206570) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Marcel Moolenaar + * Copyright (c) 2002-2010 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -240,7 +240,6 @@ struct mca_pcidev_reg { #ifdef _KERNEL void ia64_mca_init(void); -void ia64_mca_populate(void); void ia64_mca_save_state(int); #endif /* _KERNEL */ _______________________________________________ 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 Tue Apr 13 22:30:09 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 9E8961065679 for ; Tue, 13 Apr 2010 22:30:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E7748FC2A for ; Tue, 13 Apr 2010 22:30:09 +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 o3DMU97D006556 for ; Tue, 13 Apr 2010 22:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3DMU979006553; Tue, 13 Apr 2010 22:30:09 GMT (envelope-from gnats) Date: Tue, 13 Apr 2010 22:30:09 GMT Message-Id: <201004132230.o3DMU979006553@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: ia64/113102: 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: Tue, 13 Apr 2010 22:30:09 -0000 The following reply was made to PR ia64/113102; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: ia64/113102: commit references a PR Date: Tue, 13 Apr 2010 22:27:52 +0000 (UTC) Author: marcel Date: Tue Apr 13 22:27:39 2010 New Revision: 206571 URL: http://svn.freebsd.org/changeset/base/206571 Log: The sequence number is now a node under which the MCA records are hung by CPU id. When showing the MCA record, print the MIB as a comment. PR: ia64/113102 Modified: head/sbin/mca/mca.c Modified: head/sbin/mca/mca.c ============================================================================== --- head/sbin/mca/mca.c Tue Apr 13 22:20:12 2010 (r206570) +++ head/sbin/mca/mca.c Tue Apr 13 22:27:39 2010 (r206571) @@ -53,10 +53,12 @@ __FBSDID("$FreeBSD$"); #define BCD(x) ((x >> 4) * 10 + (x & 15)) +#define HW_MCA_MAX_CPUID 255 + static char hw_mca_count[] = "hw.mca.count"; static char hw_mca_first[] = "hw.mca.first"; static char hw_mca_last[] = "hw.mca.last"; -static char hw_mca_recid[] = "hw.mca.%d"; +static char hw_mca_recid[] = "hw.mca.%lu.%u"; static char default_dumpfile[] = "/var/log/mca.log"; @@ -372,10 +374,13 @@ show_section(struct mca_section_header * } static void -show(char *data) +show(char *data, const char *mib) { size_t reclen, seclen; + if (mib != NULL) + printf("\n", mib); + printf("\n"); reclen = show_header((void*)data) - sizeof(struct mca_record_header); data += sizeof(struct mca_record_header); @@ -402,7 +407,7 @@ showall(char *buf, size_t buflen) if (buflen < reclen) return; - show(buf); + show(buf, NULL); buf += reclen; buflen -= reclen; @@ -442,7 +447,7 @@ main(int argc, char **argv) char *buf; size_t len; int ch, error, fd; - int count, first, last; + int count, first, last, cpuid; while ((ch = getopt(argc, argv, "df:")) != -1) { switch(ch) { @@ -481,12 +486,19 @@ main(int argc, char **argv) if (error) err(1, hw_mca_last); + cpuid = 0; while (count && first <= last) { - sprintf(mib, hw_mca_recid, first); - len = 0; - error = sysctlbyname(mib, NULL, &len, NULL, 0); - if (error == ENOENT) { + do { + sprintf(mib, hw_mca_recid, first, cpuid); + len = 0; + error = sysctlbyname(mib, NULL, &len, NULL, 0); + if (error != ENOENT) + break; + cpuid++; + } while (cpuid <= HW_MCA_MAX_CPUID); + if (error == ENOENT && cpuid > HW_MCA_MAX_CPUID) { first++; + cpuid = 0; continue; } if (error) @@ -503,11 +515,15 @@ main(int argc, char **argv) if (fl_dump) dump(buf); else - show(buf); + show(buf, mib); free(buf); - first++; count--; + if (cpuid == HW_MCA_MAX_CPUID) { + first++; + cpuid = 0; + } else + cpuid++; } } else { fd = open(file, O_RDONLY); _______________________________________________ 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 Apr 17 23:20:01 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 DB39D1065675 for ; Sat, 17 Apr 2010 23:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B5C738FC20 for ; Sat, 17 Apr 2010 23:20:01 +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 o3HNK1OI017224 for ; Sat, 17 Apr 2010 23: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 o3HNK1Of017223; Sat, 17 Apr 2010 23:20:01 GMT (envelope-from gnats) Resent-Date: Sat, 17 Apr 2010 23:20:01 GMT Resent-Message-Id: <201004172320.o3HNK1Of017223@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, reoreelv Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFE2106564A for ; Sat, 17 Apr 2010 23:12:19 +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 01E6A8FC1C for ; Sat, 17 Apr 2010 23:12:19 +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 o3HNCInP086795 for ; Sat, 17 Apr 2010 23:12:18 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o3HNCISc086794; Sat, 17 Apr 2010 23:12:18 GMT (envelope-from nobody) Message-Id: <201004172312.o3HNCISc086794@www.freebsd.org> Date: Sat, 17 Apr 2010 23:12:18 GMT From: reoreelv To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ia64/145791: reoreelv 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, 17 Apr 2010 23:20:01 -0000 >Number: 145791 >Category: ia64 >Synopsis: reoreelv >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-ia64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 17 23:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: reoreelv >Release: reoreelv >Organization: reoreelv >Environment: reoreelv >Description: elryagsd http://wpajkbdu.com ielsqfjv qbfonnoc [URL=http://zfefccoj.com]kxqahxbi[/URL] zwvvhwzd >How-To-Repeat: reoreelv >Fix: reoreelv >Release-Note: >Audit-Trail: >Unformatted: