From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVMo7-0004hd-OQ for qemu-devel@nongnu.org; Fri, 18 May 2012 09:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVMo5-0003Zq-UU for qemu-devel@nongnu.org; Fri, 18 May 2012 09:01:23 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38026 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVMo5-0003Zf-Om for qemu-devel@nongnu.org; Fri, 18 May 2012 09:01:21 -0400 Message-ID: <4FB6481B.1070603@suse.de> Date: Fri, 18 May 2012 15:01:15 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1335978732-32559-1-git-send-email-peter.maydell@linaro.org> <1335978732-32559-3-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1335978732-32559-3-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/9] hw/arm_gic: Remove the special casing of NCPU for the NVIC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: patches@linaro.org, qemu-devel@nongnu.org, Paul Brook Am 02.05.2012 19:12, schrieb Peter Maydell: > Drop the special casing of NCPU=3D1 for the NVIC. This slightly > increases the amount of memory used by its state structure, > but removes some ifdeffery and means we can safely move the > GIC state into a common subclass structure. >=20 > Signed-off-by: Peter Maydell > --- > hw/arm_gic.c | 23 +++-------------------- > hw/armv7m_nvic.c | 5 ++--- > 2 files changed, 5 insertions(+), 23 deletions(-) >=20 > diff --git a/hw/arm_gic.c b/hw/arm_gic.c > index 17b2eba..2d8ceb8 100644 > --- a/hw/arm_gic.c > +++ b/hw/arm_gic.c [...] > @@ -131,11 +123,9 @@ typedef struct gic_state > =20 > static inline int gic_get_current_cpu(gic_state *s) > { > -#if NCPU > 1 > if (s->num_cpu > 1) { > return cpu_single_env->cpu_index; > } > -#endif > return 0; > } Why special-case the num_cpu =3D=3D 1 case? Is cpu_single_env not availab= le in all cases? Otherwise looks good. /-F --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg