From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: andrzej zaborowski <balrogg@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix console_write_ch on 64-bit big-endian hosts
Date: Wed, 02 Jun 2010 15:32:12 -0500 [thread overview]
Message-ID: <4C06BFCC.6050303@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTineMzEVSmN7OCuDwkTg_tMdcDNfmCWyV2BwLgNs@mail.gmail.com>
On 06/02/2010 02:31 PM, andrzej zaborowski wrote:
> Hi,
>
> On 2 June 2010 20:58, Anthony Liguori<aliguori@us.ibm.com> wrote:
>
>> Currently, console_ch_t is defined as an unsigned long. However, immediately
>> after it's definition, we treat it as a uint32_t *. This will work on a little
>> endian system because of the way bits are layed out but will fail miserably
>> on big endian hosts.
>>
> It seems that what this really tries to do is like *dest =
> leul_to_cpu(v) from bswap.h? (Or cpu_to_leul.. quite difficult to wrap
> my head around it..)
>
Yeah, I think it possibly should be a leul_to_cpu with the function
signature changed to take an unsigned long.
But one thing I'm very confused about is why console_ch_t is an unsigned
long vs. a uint32..
Regards,
Anthony Liguori
> Cheers
>
next prev parent reply other threads:[~2010-06-02 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 18:58 [Qemu-devel] [PATCH] Fix console_write_ch on 64-bit big-endian hosts Anthony Liguori
2010-06-02 19:31 ` andrzej zaborowski
2010-06-02 20:32 ` Anthony Liguori [this message]
2010-06-02 20:58 ` andrzej zaborowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C06BFCC.6050303@linux.vnet.ibm.com \
--to=aliguori@linux.vnet.ibm.com \
--cc=balrogg@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.