NetBSD Problem Report #57835
From www@netbsd.org Thu Jan 11 04:19:12 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 99F281A9238
for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Jan 2024 04:19:12 +0000 (UTC)
Message-Id: <20240111041841.B7E881A9239@mollari.NetBSD.org>
Date: Thu, 11 Jan 2024 04:18:41 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: x86 bus_dmamap_load_raw allegedly fails to respect maxsegsz
X-Send-Pr-Version: www-1.0
>Number: 57835
>Category: port-amd64
>Synopsis: x86 bus_dmamap_load_raw allegedly fails to respect maxsegsz
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 11 04:20:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current
>Organization:
The NetBSD Gemdation
>Environment:
>Description:
In i915_gem_stolen.c, I wrote this comment some years ago, presumably on the basis of some empirical drudgery:
/*
* XXX x86 bus_dmamap_load_raw fails to respect the maxsegsz we
* pass to bus_dmamap_create, so we have to create page-sized
* segments to begin with.
*/
https://nxr.netbsd.org/xref/src/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_stolen.c?r=1.5#540
I haven't looked recently at x86 bus_dmamap_load_raw, so I don't know if this is true or up-to-date.
We should either
(a) find the bug and fix it, or
(b) determine that x86 bus_dmamap_load_raw does respect maxsegsz after all and delete the comments and workarounds.
>How-To-Repeat:
code inspection
>Fix:
Yes, please!
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.