From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSUS-0001m6-FO for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:31:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShSUQ-0006nd-21 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:31:04 -0400 Received: from gate.crashing.org ([63.228.1.57]:53101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSUP-0006nB-PA for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:31:01 -0400 Message-ID: <1340227853.28143.172.camel@pasglop> From: Benjamin Herrenschmidt Date: Thu, 21 Jun 2012 07:30:53 +1000 In-Reply-To: <4FE23D61.3030000@codemonkey.ws> References: <1340087992-2399-1-git-send-email-benh@kernel.crashing.org> <1340087992-2399-3-git-send-email-benh@kernel.crashing.org> <4FE23D61.3030000@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, David Gibson On Wed, 2012-06-20 at 16:15 -0500, Anthony Liguori wrote: > On 06/19/2012 01:39 AM, Benjamin Herrenschmidt wrote: > > From: David Gibson > > > > This patch adds cpu_physical_memory_set() function. This is equivalent to > > calling cpu_physical_memory_write() with a buffer filled with a character, > > ie, a memset of target memory. > > > > It uses a small temporary buffer on the stack. > > > > Signed-off-by: David Gibson > > Signed-off-by: Benjamin Herrenschmidt > > Why should this be in the core API? Shouldn't this be a helper on top of the > DMA API? This comes from the original patch which hand implemented the "set" by reproducing the logic inside cpu_physical_memory_rw(). I turned into a wrapper on top of the latter based on (your ?) previous reviews on this list. I don't care enough to argue to keep it if you want it gone, we do have a "clear" accessors in the PAPR vio dma accessors which is handy but I could implement it locally. Cheers, Ben.