From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T11LP-0004MM-Ad for qemu-devel@nongnu.org; Mon, 13 Aug 2012 16:34:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T11LM-0001k4-0J for qemu-devel@nongnu.org; Mon, 13 Aug 2012 16:34:34 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:37707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T11LL-0001jt-QW for qemu-devel@nongnu.org; Mon, 13 Aug 2012 16:34:31 -0400 Message-ID: <502964D3.4070800@codesourcery.com> Date: Mon, 13 Aug 2012 15:34:27 -0500 From: Meador Inge MIME-Version: 1.0 References: <1344871919-31559-1-git-send-email-peter.maydell@linaro.org> <1344871919-31559-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1344871919-31559-2-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/10] hw/armv7m_nvic: Fix incorrect default for num-irqs property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , Anthony Liguori , qemu-devel@nongnu.org, Paul Brook On 08/13/2012 10:31 AM, Peter Maydell wrote: > Fix an incorrect default value for the num-irqs property (we were > attempting to override it from the default set by the parent class > but not succeeding, which meant that the lm3s6965evb model would > assert on startup attempting to wire up nonexistent irq lines). > Instead of trying to override the parent's Property array, we > define an instance_init function which runs after default setup > but before user property setting and can just fix up the default > value in the gic_state struct. > > Reported-by: Peter Crosthwaite > Tested-by: Peter Crosthwaite > Signed-off-by: Peter Maydell I noticed this assertion recently as well while hacking on some Cortex-M3 stuff: qemu-system-arm: /home/meadori/Code/src/qemu/hw/qdev.c:310: qdev_get_gpio_in: Assertion `n >= 0 && n < dev->num_gpio_in' failed. Aborted (core dumped) I just tried out your patch and it fixes the issue I was seeing. Tested-by: Meador Inge -- Meador Inge CodeSourcery / Mentor Embedded http://www.mentor.com/embedded-software