From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RP3n8-0005K8-Tr for qemu-devel@nongnu.org; Fri, 11 Nov 2011 21:58:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RP3n7-0006Ih-TP for qemu-devel@nongnu.org; Fri, 11 Nov 2011 21:58:02 -0500 Received: from e4.ny.us.ibm.com ([32.97.182.144]:37234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RP3n7-0006IX-Qq for qemu-devel@nongnu.org; Fri, 11 Nov 2011 21:58:01 -0500 Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 Nov 2011 21:57:59 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAC2vuJs315014 for ; Fri, 11 Nov 2011 21:57:56 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAC2vuoT014247 for ; Sat, 12 Nov 2011 00:57:56 -0200 Message-ID: <4EBDE0B2.4030907@us.ibm.com> Date: Fri, 11 Nov 2011 20:57:54 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1320672345-5776-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/omap_gpio: Fix infinite recursion when doing 8/16 bit reads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On 11/11/2011 06:38 PM, Peter Maydell wrote: > Anthony -- you've committed a bunch of later patches but not this one: > did you miss it? Most likely an over zealous delete on my part. I'll requeue. Regards, Anthony Liguori > > thanks > -- PMM > > On 7 November 2011 13:25, Peter Maydell wrote: >> Fix a long-standing bug which meant that any attempt to do an >> 8 or 16 bit read from the OMAP GPIO module would cause qemu to >> crash due to an infinite recursion. >> >> Signed-off-by: Peter Maydell >> --- >> This has actually been in the code since the original OMAP2 support >> was added in 2008; we've never noticed before because the kernel happened >> to always do 32 bit accesses... >> Long term we should fix this by conversion to MemoryRegion; this is >> the minimally invasive fix for 1.0. >> >> hw/omap_gpio.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/hw/omap_gpio.c b/hw/omap_gpio.c >> index d775df6..d630748 100644 >> --- a/hw/omap_gpio.c >> +++ b/hw/omap_gpio.c >> @@ -510,7 +510,7 @@ static void omap2_gpio_module_write(void *opaque, target_phys_addr_t addr, >> >> static uint32_t omap2_gpio_module_readp(void *opaque, target_phys_addr_t addr) >> { >> - return omap2_gpio_module_readp(opaque, addr)>> ((addr& 3)<< 3); >> + return omap2_gpio_module_read(opaque, addr& ~3)>> ((addr& 3)<< 3); >> } >> >> static void omap2_gpio_module_writep(void *opaque, target_phys_addr_t addr, >> -- >> 1.7.4.1 > >