From owner-freebsd-ia64@FreeBSD.ORG Tue Jun 10 02:27:47 2003 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE93B37B415 for ; Tue, 10 Jun 2003 02:27:44 -0700 (PDT) Received: from plim.fujitsu-siemens.com (plim.fujitsu-siemens.com [217.115.66.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5385543FBD for ; Tue, 10 Jun 2003 02:27:41 -0700 (PDT) (envelope-from alan.robinson@fujitsu-siemens.com) Received: from trulli.pdb.fsc.net (this.is.a.RFC1918.address [172.25.96.53] (may be forged))h5A9ReF28081; Tue, 10 Jun 2003 11:27:40 +0200 Received: from athen.mch.fsc.net (backbay.mch.fsc.net [172.25.94.188]) by trulli.pdb.fsc.net (8.11.6/8.11.6) with ESMTP id h5A9Rbg25697; Tue, 10 Jun 2003 11:27:37 +0200 Received: from sanpedro.mch.fsc.net (sanpedro [172.25.95.234]) by athen.mch.fsc.net (8.11.6/8.11.6) with ESMTP id h5A9RZI08655; Tue, 10 Jun 2003 11:27:35 +0200 (MDT) Received: (from robin@localhost) by sanpedro.mch.fsc.net (8.9.3p2/8.9.3/Debian 8.9.3-21) id LAA20227; Tue, 10 Jun 2003 11:27:35 +0200 From: Alan Robinson Date: Tue, 10 Jun 2003 11:27:35 +0200 To: Marcel Moolenaar Message-ID: <20030610112735.A20041@fujitsu-siemens.com> References: <20030606183130.A19592@fujitsu-siemens.com> <20030606182015.GC569@dhcp01.pn.xcllnt.net> <20030610105306.A18863@fujitsu-siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030610105306.A18863@fujitsu-siemens.com>; 10:53:06AM +0200 X-sent-by-me: robin@sanpedro cc: freebsd-ia64@freebsd.org Subject: Re: DDB and SMP causes Unaligned Reference X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Alan.Robinson@fujitsu-siemens.com List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2003 09:27:47 -0000 On Tue, Jun 10, 2003 at 10:53:06AM +0200, Alan Robinson wrote: > On Fri, Jun 06, 2003 at 11:20:15AM -0700, Marcel Moolenaar wrote: > > > > We don't set pc_pcb on ia64. The line above should read: > > savectx(curthread->td_pcb); > > > Tried it. > > > > Try it and let me know if it works. I'll commit it then. > > > Works. > Works. > (It still causes the strange double entry into DDB) > > It would also be a good idea to remove the unneeded pc_pcb line with its > incorrect comment from src/sys/ia64/include/pcpu.h > I deleted the pc_pcb line from src/sys/ia64/include/pcpu.h and much to my surprise got a compile error in src/sys/ia64/ia64/machdep.c where the function cpu_pcpu_init does indeed set pc_pcb: void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { KASSERT(size >= sizeof(struct pcpu) + sizeof(struct pcb), ("%s: too small an allocation for pcpu", __func__)); pcpu->pc_pcb = (void*)(pcpu+1); } so much for it not being set!. It is set, just the alignment of struct pcb is wrong. Is your suggested (and working) change > > savectx(curthread->td_pcb); still correct ? Alan