From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnTcg-0008Gi-6l for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnTcX-0004aO-T9 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:46:48 -0400 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]:35036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnTcX-0004aE-OI for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:46:41 -0400 Received: by mail-it0-x241.google.com with SMTP id e20so1353672itc.2 for ; Fri, 23 Sep 2016 09:46:41 -0700 (PDT) Sender: Richard Henderson References: <1474615909-17069-1-git-send-email-pbonzini@redhat.com> <1474615909-17069-2-git-send-email-pbonzini@redhat.com> From: Richard Henderson Message-ID: Date: Fri, 23 Sep 2016 09:46:37 -0700 MIME-Version: 1.0 In-Reply-To: <1474615909-17069-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 01/16] cpus: pass CPUState to run_on_cpu helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: serge.fdrv@gmail.com, cota@braap.org, alex.bennee@linaro.org, sergey.fedorov@linaro.org On 09/23/2016 12:31 AM, Paolo Bonzini wrote: > From: Alex Bennée > > CPUState is a fairly common pointer to pass to these helpers. This means > if you need other arguments for the async_run_on_cpu case you end up > having to do a g_malloc to stuff additional data into the routine. For > the current users this isn't a massive deal but for MTTCG this gets > cumbersome when the only other parameter is often an address. > > This adds the typedef run_on_cpu_func for helper functions which has an > explicit CPUState * passed as the first parameter. All the users of > run_on_cpu and async_run_on_cpu have had their helpers updated to use > CPUState where available. > > Signed-off-by: Alex Bennée > [Sergey Fedorov: > - eliminate more CPUState in user data; > - remove unnecessary user data passing; > - fix target-s390x/kvm.c and target-s390x/misc_helper.c] > Signed-off-by: Sergey Fedorov > Acked-by: David Gibson (ppc parts) > Reviewed-by: Christian Borntraeger (s390 parts) > Signed-off-by: Alex Bennée > Message-Id: <1470158864-17651-3-git-send-email-alex.bennee@linaro.org> > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Richard Henderson r~