From owner-freebsd-arm@FreeBSD.ORG Fri Mar 20 15:12:45 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A5967D8 for ; Fri, 20 Mar 2015 15:12:45 +0000 (UTC) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 676ABA57 for ; Fri, 20 Mar 2015 15:12:44 +0000 (UTC) Received: by pdbni2 with SMTP id ni2so111436358pdb.1 for ; Fri, 20 Mar 2015 08:12:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=6mQ2xas3NStDKvnACq0V8GqZ8jcczTJa+Bek81o8CEQ=; b=QAz9NSMVzn3wXvBBgmWb3kbEZMEcfsiS4GDk+ukiY0VdwKkfQSg0+qMBwQ712apM5Z AoAuaSG9Rx/jlusgSSpiUAuuBro7Qv3MoAhh1U0Ofl5+EnVzSYlh7V8Ue6Xz7aAC2QzG e02l5f7PS6L8tjw/qjbOiZbPp19jIeQRBZaTBULjMfHAGZyo4mz8nzGUD2+IXk/03DrB c6SK/am+NDuri5Q32QAC8FjFQC+LeyZ+dlCUWZFihzw5Q7vTTClAfGvowYEWCDyOq/ww 5Ojnzq7XQ/syeEeM5oQkUSQ3rfWg9dMpkhpgeZjTz5AuEP67DpBbm5qjmy666q0r+n7O bguQ== X-Gm-Message-State: ALoCoQnNoQEw5VZ3c8+uVygj3lNKHZAPsKpxkr0Y4hH0W4zraMOhzdBE+OiGQZ1WU+cttMYW3C1Q X-Received: by 10.66.159.193 with SMTP id xe1mr6626880pab.48.1426864358546; Fri, 20 Mar 2015 08:12:38 -0700 (PDT) Received: from [10.64.25.47] ([69.53.236.236]) by mx.google.com with ESMTPSA id ms7sm8697517pdb.8.2015.03.20.08.12.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Mar 2015 08:12:37 -0700 (PDT) Sender: Warner Losh Subject: Re: current meaning of BUS_DMA_COHERENT Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_438268ED-D8F0-45D2-B8B5-AEA9310DBD4C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <1426861647.24655.12.camel@freebsd.org> Date: Fri, 20 Mar 2015 09:12:31 -0600 Message-Id: <16E52DDC-D2DC-4878-9C43-451278AE7B4E@bsdimp.com> References: <201503200535.t2K5ZQdo011380@jwlab.FEITH.COM> <1426861647.24655.12.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2070.6) Cc: John Wehle , freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2015 15:12:45 -0000 --Apple-Mail=_438268ED-D8F0-45D2-B8B5-AEA9310DBD4C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 20, 2015, at 8:27 AM, Ian Lepore wrote: > What we really need is a new type of busdma memory = (BUS_DMA_DESCRIPTOR) > and a special sync call to use in conjunction with it that takes an > offset and length, and the sync is a single operation, no pre/post > stuff. Then you could sync each descriptor immediately before reading > and writing it, which would translate to a single cacheline flush > instead of a loop that does all the lines in the whole ring. We don=E2=80=99t need a special type of memory for this. NetBSD = doesn=E2=80=99t have that. Instead it implements a range on the sync operation. We could = easily just do that. We already have flags to disable bouncing, which is also required for interacting with descriptor rings. I=E2=80=99m curious where you need to do both a pre read and a post read = before you read the ring. Why is that needed? Warner --Apple-Mail=_438268ED-D8F0-45D2-B8B5-AEA9310DBD4C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVDDjfAAoJEGwc0Sh9sBEAOYYQAMGJkE7Z1TORmVl7PB9M9KrQ xLyer2ylXsUknzQZe6HSboH5tlhcyV2odr9QFLHwXlXlniWDL9bNp5KJeQeqZtch 7dlvC+fbwzroaEOkO/eKdQD6cEnIvaNfDRqI0HNhpd7YkK/WJLxTQzkimhlJoln5 28w+QB8p0P+fkvDroOWZyrwISrecAiisj3SPGDfmOcss7Afdij4doNSFglsmqhhA z9Lsq+hfXFF0IDqjq1kzK/cqUxcxpllEwANZFoLQ5uC3DY4h83Swg7gC+qYfbZJM GfY1/QjbTQKHcPoWuV52PO63wY2TWabD73DACmxhlVRFaNrCdp+fe84MZxCTlz41 EhJDJ3eJKgQJj9K8N84HEVP2WKtnEnTFsnJnRVTERANrEdWUMV0CA8qX+iA+wwcb Z9AJkKMZr7vwtFfKjpkdAOuFTbfnXs/2c8ejKCyOtiCKU2AOWWRm+LxIxlFk8DVh NAC+6N8vmm9XYRZObGGET4eU9JDqhx2kLeQN7efzEW2bJ8/7wxZTe5rlYhLZDBKa Vjt7ajunIvlnmcTvcSsTo/zUJJ5qqE4g6qxo5gno/c/5nrVLLUxiI6CIPCFLXRNS ak3o6IBSwgVLo1MexaRAPqBqDdVdYLVIaPJjsYzOuQNzxTpDU5G0Y6yfLfOk3j6U c8Gq01CqPxiVM6G7fR0+ =TQA+ -----END PGP SIGNATURE----- --Apple-Mail=_438268ED-D8F0-45D2-B8B5-AEA9310DBD4C--