From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z75Vp-00005M-AM for qemu-devel@nongnu.org; Mon, 22 Jun 2015 13:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z75Vm-0000Kf-4o for qemu-devel@nongnu.org; Mon, 22 Jun 2015 13:28:01 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51765 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z75Vl-0000KX-Us for qemu-devel@nongnu.org; Mon, 22 Jun 2015 13:27:58 -0400 Message-ID: <5588459C.9070103@suse.de> Date: Mon, 22 Jun 2015 19:27:56 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 1/4] qom: cpu: Add wrapper to the set-pc hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, edgar.iglesias@gmail.com, Peter Crosthwaite Hi, Just "cpu: " please, compare git-log. Am 16.06.2015 um 07:46 schrieb Peter Crosthwaite: > Add a wrapper around the CPUClass::set_pc hook. Accepts an error > pointer to report the case where the hook is not set. >=20 > Signed-off-by: Peter Crosthwaite > --- > include/qom/cpu.h | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) >=20 > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > index 7db310e..97d4edf 100644 > --- a/include/qom/cpu.h > +++ b/include/qom/cpu.h > @@ -600,6 +600,27 @@ static inline void cpu_unaligned_access(CPUState *= cpu, vaddr addr, > #endif > =20 > /** > + * cpu_set_pc: > + * @cpu: The CPU to set the program counter for. > + * @addr: Program counter value. > + * @errp: Error pointer to populate in case of error. > + * > + * Set the program counter for a CPU. If there is no available impleme= ntation > + * an error is raised. > + */ > + Please drop the white line here for consistency. > +static inline void cpu_set_pc(CPUState *cpu, vaddr addr, Error **errp) > +{ > + CPUClass *cc =3D CPU_GET_CLASS(cpu); > + > + if (cc->set_pc) { > + cc->set_pc(cpu, addr); > + } else { > + error_setg(errp, "CPU does not implement set PC"); > + } > +} > + > +/** > * cpu_reset_interrupt: > * @cpu: The CPU to clear the interrupt on. > * @mask: The interrupt mask to clear. Otherwise, modulo Peter M.'s comment, looks okay. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)