NetBSD Problem Report #43473

From www@NetBSD.org  Mon Jun 14 21:04:39 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 41E1D63B8CE
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 14 Jun 2010 21:04:39 +0000 (UTC)
Message-Id: <20100614210439.0F20F63B11D@www.NetBSD.org>
Date: Mon, 14 Jun 2010 21:04:39 +0000 (UTC)
From: sainio@t-online.de
Reply-To: sainio@t-online.de
To: gnats-bugs@NetBSD.org
Subject: panic: extent_alloc_subregion: bad boundary
X-Send-Pr-Version: www-1.0

>Number:         43473
>Category:       port-hpcmips
>Synopsis:       panic: extent_alloc_subregion: bad boundary
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 14 21:05:00 +0000 2010
>Closed-Date:    Fri Nov 26 22:08:55 +0000 2010
>Last-Modified:  Fri Nov 26 22:08:55 +0000 2010
>Originator:     Risto Sainio
>Release:        NetBSD 5.0.2_PATCH
>Organization:
>Environment:
NetBSD rsa02.rsa.org 5.0.2_PATCH NetBSD 5.0.2_PATCH (TX3922_rsa) #22: Sat Jun 12 01:50:35 CEST 2010  root@vrsa89:/usr/objdir_current/sys/arch/hpcmips/compile/TX3922_rsa hpcmips

>Description:
Booting TX3922-based system with ohci-driver enabled gives following:
ohci0 at plum0
ohci0: OHCI version 1.0
extent_alloc_subregion: extent `MCS0', size 0x40000, boundary 0x1000
panic: extent_alloc_subregion: bad boundary
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x4:        jr      ra
                bdslot: nop
db> bt
cpu_Debugger+4 (83fef000,1,5,0) ra 801e0b2c sz 0
panic+1fc (83fef000,45,5,2a) ra 801d8158 sz 48
extent_alloc_subregion1+6c (83fef000,c5308000,5,2a) ra 801d870c sz 72
extent_alloc_subregion+30 (83fef000,c5308000,5,2a) ra 802800ec sz 48
__bs_alloc+6c (83fef000,c5308000,5,2a) ra 80290c50 sz 64
__plumohci_dmamem_alloc+64 (83fef000,c5308000,5,2a) ra 802a6300 sz 72
usb_setup_reserve+74 (83fef000,c5308000,5,2a) ra 800d23bc sz 80
ohci_init+120 (83fef000,c5308000,5,2a) ra 80290e28 sz 72
plumohci_attach+104 (83fef000,c5308000,5,2a) ra 801d276c sz 40
config_attach_loc+1ac (83fef000,c5308000,5,2a) ra 801d27dc sz 48
config_attach+18 (83fef000,c5308000,5,8028da90) ra 8028db84 sz 32
plum_search+74 (83fef000,c5308000,5,8038d3f8) ra 801d1120 sz 56
mapply+38 (83fef000,c5308000,5,8038d3f8) ra 801d1334 sz 32
config_search_loc+13c (83fef000,c5308000,5,8038d3f8) ra 801d1384 sz 64
config_search_ia+14 (83fef000,c5308000,5,8028da90) ra 801d276c sz 32
config_attach_loc+1ac (83fef000,c5308000,5,8028da90) ra 801d27dc sz 48
config_attach+18 (83fef000,c5308000,5,80287778) ra 80287758 sz 32
txcsbus_search+130 (83fef000,c5308000,3,80287778) ra 801d1120 sz 120
mapply+38 (83fef000,c5308000,3,80287778) ra 801d1334 sz 32
config_search_loc+13c (83fef000,c5308000,3,80287778) ra 801d1384 sz 64
config_search_ia+14 (83fef000,c5308000,3,80287778) ra 801d276c sz 32
config_attach_loc+1ac (83fef000,c5308000,3,80287778) ra 801d28e4 sz 48


>How-To-Repeat:
booting the system...
>Fix:
Dunno, maybe we do not need boundary at all, but I fixed it conditionally in .../hpcmips/dev/plumohci.c in function __plumohci_dmamem_alloc:

        /*
         * Allocate buffer from V-RAM area.
        */

        if(size > OHCI_PAGE_SIZE) {
            error = bus_space_alloc(sc->sc.iot, PLUM_OHCI_SHMEMBASE,
                PLUM_OHCI_SHMEMBASE + PLUM_OHCI_SHMEMSIZE - 1,
                size, OHCI_PAGE_SIZE, size,  0,
                (bus_addr_t *)(void *)&caddr, &bsh);
        } else {
            error = bus_space_alloc(sc->sc.iot, PLUM_OHCI_SHMEMBASE,
                PLUM_OHCI_SHMEMBASE + PLUM_OHCI_SHMEMSIZE - 1,
                size, OHCI_PAGE_SIZE, OHCI_PAGE_SIZE, 0,
                (bus_addr_t *)(void *)&caddr, &bsh);
        }
        if (error)
                return (1);

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: port-hpcmips-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
        netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-hpcmips/43473: panic: extent_alloc_subregion: bad boundary
Date: Sat, 17 Jul 2010 01:17:28 +0900

 > >Fix:
 > Dunno, maybe we do not need boundary at all, but I fixed it
 > conditionally in .../hpcmips/dev/plumohci.c in function
 > __plumohci_dmamem_alloc:

 With a quick glance, it doesn't look there is any boundary restriction
 on plumohci. Could you try this one instead?

 Index: plumohci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/hpcmips/dev/plumohci.c,v
 retrieving revision 1.12
 diff -u -r1.12 plumohci.c
 --- plumohci.c	3 Apr 2008 17:04:40 -0000	1.12
 +++ plumohci.c	16 Jul 2010 16:15:02 -0000
 @@ -241,7 +241,7 @@
  	 */
  	error = bus_space_alloc(sc->sc.iot, PLUM_OHCI_SHMEMBASE,
  	    PLUM_OHCI_SHMEMBASE + PLUM_OHCI_SHMEMSIZE - 1,
 -	    size, OHCI_PAGE_SIZE, OHCI_PAGE_SIZE, 0,
 +	    size, OHCI_PAGE_SIZE, 0, 0,
  	    (bus_addr_t *)(void *)&caddr, &bsh);
  	if (error)
  		return (1);

 ---
 Izumi Tsutsui

State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 17 Jul 2010 01:24:42 +0900
State-Changed-Why:
Awaiting feedback.


From: Risto Sainio <sainio@t-online.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-hpcmips/43473: panic: extent_alloc_subregion: bad boundary
Date: Mon, 19 Jul 2010 18:45:08 +0200

 On Friday 16 July 2010, Izumi Tsutsui wrote:
 > The following reply was made to PR port-hpcmips/43473; it has been noted by
 > GNATS.
 >
 > From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
 > To: gnats-bugs@NetBSD.org
 > Cc: port-hpcmips-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
 >         netbsd-bugs@NetBSD.org, tsutsui@ceres.dti.ne.jp
 > Subject: Re: port-hpcmips/43473: panic: extent_alloc_subregion: bad
 > boundary Date: Sat, 17 Jul 2010 01:17:28 +0900
 >
 >  > >Fix:
 >  >
 >  > Dunno, maybe we do not need boundary at all, but I fixed it
 >  > conditionally in .../hpcmips/dev/plumohci.c in function
 >  > __plumohci_dmamem_alloc:
 >
 >  With a quick glance, it doesn't look there is any boundary restriction
 >  on plumohci. Could you try this one instead?
 >
 >  Index: plumohci.c
 >  ===================================================================
 >  RCS file: /cvsroot/src/sys/arch/hpcmips/dev/plumohci.c,v
 >  retrieving revision 1.12
 >  diff -u -r1.12 plumohci.c
 >  --- plumohci.c	3 Apr 2008 17:04:40 -0000	1.12
 >  +++ plumohci.c	16 Jul 2010 16:15:02 -0000
 >  @@ -241,7 +241,7 @@
 >   	 */
 >   	error = bus_space_alloc(sc->sc.iot, PLUM_OHCI_SHMEMBASE,
 >   	    PLUM_OHCI_SHMEMBASE + PLUM_OHCI_SHMEMSIZE - 1,
 >  -	    size, OHCI_PAGE_SIZE, OHCI_PAGE_SIZE, 0,
 >  +	    size, OHCI_PAGE_SIZE, 0, 0,
 >   	    (bus_addr_t *)(void *)&caddr, &bsh);
 >   	if (error)
 >   		return (1);
 >
 >  ---
 >  Izumi Tsutsui

 Hi

 Tested in 5.0.2 PATCH and seems to work

 Risto

From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43473 CVS commit: src/sys/arch/hpcmips/dev
Date: Tue, 20 Jul 2010 15:06:44 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Tue Jul 20 15:06:44 UTC 2010

 Modified Files:
 	src/sys/arch/hpcmips/dev: plumohci.c

 Log Message:
 Remove (possibly) unnecessary boundary arg from bus_space_alloc(9)
 for DMA shared memory. PR port-hpcmips/43473 by Risto Sainio.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpcmips/dev/plumohci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-hpcmips-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Wed, 21 Jul 2010 22:45:18 +0900
Responsible-Changed-Why:
I committed fix


State-Changed-From-To: feedback->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Wed, 21 Jul 2010 22:45:18 +0900
State-Changed-Why:
I'll send a pullup request later.


From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43473 CVS commit: [netbsd-5] src/sys/arch/hpcmips/dev
Date: Fri, 26 Nov 2010 17:14:02 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Fri Nov 26 17:14:01 UTC 2010

 Modified Files:
 	src/sys/arch/hpcmips/dev [netbsd-5]: plumohci.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1484):
 	sys/arch/hpcmips/dev/plumohci.c: revision 1.13
 Remove (possibly) unnecessary boundary arg from bus_space_alloc(9)
 for DMA shared memory. PR port-hpcmips/43473 by Risto Sainio.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.12.14.1 src/sys/arch/hpcmips/dev/plumohci.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 26 Nov 2010 22:08:55 +0000
State-Changed-Why:
Pullups completed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.