diff mbox

[PULL,1/1] mips: fix broken fulong2e machine

Message ID 1429263996-928-2-git-send-email-leon.alrae@imgtec.com
State New
Headers show

Commit Message

Leon Alrae April 17, 2015, 9:46 a.m. UTC
After commit 5312bd8 the bonito_readl() and bonito_writel() have been
accessing incorrect addresses. Consequently QEMU is crashing when trying
to boot Linux kernel on fulong2e machine.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
 hw/pci-host/bonito.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Maydell April 17, 2015, 10:42 a.m. UTC | #1
On 17 April 2015 at 10:46, Leon Alrae <leon.alrae@imgtec.com> wrote:
> After commit 5312bd8 the bonito_readl() and bonito_writel() have been
> accessing incorrect addresses. Consequently QEMU is crashing when trying
> to boot Linux kernel on fulong2e machine.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>

This is Paolo's patch, right? (it has his signoff). It
should have him as the author as well, but you seem to have
lost that...

thanks
-- PMM
Leon Alrae April 17, 2015, 10:49 a.m. UTC | #2
On 17/04/2015 11:42, Peter Maydell wrote:
> On 17 April 2015 at 10:46, Leon Alrae <leon.alrae@imgtec.com> wrote:
>> After commit 5312bd8 the bonito_readl() and bonito_writel() have been
>> accessing incorrect addresses. Consequently QEMU is crashing when trying
>> to boot Linux kernel on fulong2e machine.
>>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
> 
> This is Paolo's patch, right? (it has his signoff). It
> should have him as the author as well, but you seem to have
> lost that...

Well, I asked Paolo if he wanted to send the patch, but he suggested to
send the pull request by myself and just put his Signed-off-by line.

Leon
Peter Maydell April 17, 2015, 10:58 a.m. UTC | #3
On 17 April 2015 at 11:49, Leon Alrae <leon.alrae@imgtec.com> wrote:
> On 17/04/2015 11:42, Peter Maydell wrote:
>> On 17 April 2015 at 10:46, Leon Alrae <leon.alrae@imgtec.com> wrote:
>>> After commit 5312bd8 the bonito_readl() and bonito_writel() have been
>>> accessing incorrect addresses. Consequently QEMU is crashing when trying
>>> to boot Linux kernel on fulong2e machine.
>>>
>>> Cc: qemu-stable@nongnu.org
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
>>
>> This is Paolo's patch, right? (it has his signoff). It
>> should have him as the author as well, but you seem to have
>> lost that...
>
> Well, I asked Paolo if he wanted to send the patch, but he suggested to
> send the pull request by myself and just put his Signed-off-by line.

It's fine for you to send the patch, but you need to send it with
a From line in the commit message from him, not you.

-- PMM
Leon Alrae April 17, 2015, 11:07 a.m. UTC | #4
On 17/04/2015 11:58, Peter Maydell wrote:
> On 17 April 2015 at 11:49, Leon Alrae <leon.alrae@imgtec.com> wrote:
>> On 17/04/2015 11:42, Peter Maydell wrote:
>>> On 17 April 2015 at 10:46, Leon Alrae <leon.alrae@imgtec.com> wrote:
>>>> After commit 5312bd8 the bonito_readl() and bonito_writel() have been
>>>> accessing incorrect addresses. Consequently QEMU is crashing when trying
>>>> to boot Linux kernel on fulong2e machine.
>>>>
>>>> Cc: qemu-stable@nongnu.org
>>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
>>>
>>> This is Paolo's patch, right? (it has his signoff). It
>>> should have him as the author as well, but you seem to have
>>> lost that...
>>
>> Well, I asked Paolo if he wanted to send the patch, but he suggested to
>> send the pull request by myself and just put his Signed-off-by line.
> 
> It's fine for you to send the patch, but you need to send it with
> a From line in the commit message from him, not you.

OK, I'll correct it. I'm hoping Paolo is happy with the commit message
as I presume he will be blamed if there are any typos there :)

Leon
diff mbox

Patch

diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 8bdd569..8134d0b 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -233,7 +233,7 @@  static void bonito_writel(void *opaque, hwaddr addr,
     uint32_t saddr;
     int reset = 0;
 
-    saddr = (addr - BONITO_REGBASE) >> 2;
+    saddr = addr >> 2;
 
     DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n", addr, val, saddr);
     switch (saddr) {
@@ -295,7 +295,7 @@  static uint64_t bonito_readl(void *opaque, hwaddr addr,
     PCIBonitoState *s = opaque;
     uint32_t saddr;
 
-    saddr = (addr - BONITO_REGBASE) >> 2;
+    saddr = addr >> 2;
 
     DPRINTF("bonito_readl "TARGET_FMT_plx"\n", addr);
     switch (saddr) {