From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSah-0005mR-0T for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShSaf-0000EB-73 for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:30 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:39868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShSaf-0000Dy-1A for qemu-devel@nongnu.org; Wed, 20 Jun 2012 17:37:29 -0400 Received: by pbbro12 with SMTP id ro12so1206081pbb.4 for ; Wed, 20 Jun 2012 14:37:27 -0700 (PDT) Message-ID: <4FE24294.70607@codemonkey.ws> Date: Wed, 20 Jun 2012 16:37:24 -0500 From: Anthony Liguori MIME-Version: 1.0 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> <1340227853.28143.172.camel@pasglop> In-Reply-To: <1340227853.28143.172.camel@pasglop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Benjamin Herrenschmidt Cc: qemu-devel@nongnu.org, David Gibson On 06/20/2012 04:30 PM, Benjamin Herrenschmidt wrote: > 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. I think it's better to just stick this with the other DMA helpers and not have a cpu_physical version. People shouldn't use that API directly so not having it there encourages people to look elsewhere. Regards, Anthony Liguori > > Cheers, > Ben. > >