NetBSD Problem Report #28512

From www@netbsd.org  Thu Dec  2 16:17:52 2004
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 1D9F92525DA; Thu,  2 Dec 2004 16:17:52 +0000 (UTC)
Message-Id: <20041202161752.1D9F92525DA@narn.netbsd.org>
Date: Thu,  2 Dec 2004 16:17:52 +0000 (UTC)
From: nludban@terabeam.com
Reply-To: nludban@terabeam.com
To: gnats-bugs@netbsd.org
Subject: _bus_dmamap_sync using bus address
X-Send-Pr-Version: www-1.0

>Number:         28512
>Category:       port-powerpc
>Synopsis:       _bus_dmamap_sync using bus address
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-powerpc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 02 16:18:00 +0000 2004
>Closed-Date:    Thu Sep 07 19:13:56 +0000 2006
>Last-Modified:  Thu Sep 07 19:15:08 +0000 2006
>Originator:     Neil Ludban
>Release:        2.0RC3
>Organization:
>Environment:
powerpc (only affects bebox, ibmnws, mvmeppc, and prep?)
>Description:
The cache is flushed using the bus address where the phys address
is required.  Errors would be seen only on ports where address
translation is done between the bus and physical memory.

>How-To-Repeat:

>Fix:
Patch to arch/powerpc/powerpc/bus_dma.c (line numbers are approximate):

@@ -483,7 +483,7 @@
        __asm __volatile("eieio");
        for (; len > 0; ds++, offset = 0) {
                bus_size_t seglen = ds->ds_len - offset;
-               bus_addr_t addr = ds->ds_addr + offset;
+               bus_addr_t addr = BUS_MEM_TO_PHYS(t, ds->ds_addr) + offset;
                if (seglen > len)
                        seglen = len;
                len -= seglen;

>Release-Note:

>Audit-Trail:
From: Klaus Klein <kleink@mibh.de>
To: nludban@terabeam.com
Cc: gnats-bugs@netbsd.org
Subject: Re: port-powerpc/28512: _bus_dmamap_sync using bus address
Date: Thu, 2 Dec 2004 17:46:38 +0100

 This is a duplicate of port-powerpc/23801.


 - Klaus

State-Changed-From-To: open->closed
State-Changed-By: garbled@netbsd.org
State-Changed-When: Thu, 07 Sep 2006 19:13:56 +0000
State-Changed-Why:
Committed patch to -current.  Thank you for your report.


From: Tim Rightnour <garbled@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/28512 CVS commit: src/sys/arch/powerpc/powerpc
Date: Thu,  7 Sep 2006 19:13:12 +0000 (UTC)

 Module Name:	src
 Committed By:	garbled
 Date:		Thu Sep  7 19:13:12 UTC 2006

 Modified Files:
 	src/sys/arch/powerpc/powerpc: bus_dma.c

 Log Message:
 Apply the patch found in PR/28512 and PR/23801. Ok'd by a few people.
 From the PR:
 The cache is flushed using the bus address where the phys address
 is required.  Errors would be seen only on ports where address
 translation is done between the bus and physical memory.


 To generate a diff of this commit:
 cvs rdiff -r1.27 -r1.28 src/sys/arch/powerpc/powerpc/bus_dma.c

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

>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.