grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: powerpc/emu build failure
Date: Wed, 24 Nov 2010 14:38:22 +0100	[thread overview]
Message-ID: <4CED154E.2020800@gmail.com> (raw)
In-Reply-To: <20101124120849.GA10958@riva.ucam.org>


[-- Attachment #1.1: Type: text/plain, Size: 900 bytes --]

On 11/24/2010 01:08 PM, Colin Watson wrote:
> On Tue, Nov 23, 2010 at 04:21:14PM +0000, Colin Watson wrote:
>   
>> It seems to me that we should probably include the emu implementation of
>> grub_arch_sync_caches in the kernel when building for the emu platform.
>> Does this patch look sane?
>>
>> 2010-11-23  Colin Watson  <cjwatson@ubuntu.com>
>>
>> 	* grub-core/Makefile.core.def (kernel): Add kern/emu/cache.S for emu
>> 	platforms.
>> 	(grub-emu-lite): Remove kern/emu/cache.S.
>>     
> I went ahead and committed this; Manoel Rebelo Abranches seemed keen on
> IRC, and it certainly doesn't break anything on x86 since the object is
> essentially empty there.
>
>   
Could you try the attached patch as a replacement for yours? Not that
your patch doesn't solve the problem but it's more annoying for maintenance.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: endian.diff --]
[-- Type: text/x-diff; name="endian.diff", Size: 2009 bytes --]

=== modified file 'include/grub/gpt_partition.h'
--- include/grub/gpt_partition.h	2009-04-19 20:38:46 +0000
+++ include/grub/gpt_partition.h	2010-11-23 17:33:09 +0000
@@ -36,7 +36,7 @@
   }
 
 #define GRUB_GPT_PARTITION_TYPE_BIOS_BOOT \
-  { grub_cpu_to_le32 (0x21686148), grub_cpu_to_le16 (0x6449), grub_cpu_to_le16 (0x6e6f), \
+  { grub_cpu_to_le32_compile_time (0x21686148), grub_cpu_to_le16_compile_time (0x6449), grub_cpu_to_le16_compile_time (0x6e6f), \
     { 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
   }
 

=== modified file 'include/grub/types.h'
--- include/grub/types.h	2010-10-26 10:29:12 +0000
+++ include/grub/types.h	2010-11-23 17:32:43 +0000
@@ -146,6 +146,9 @@
    (grub_uint16_t) ((_x << 8) | (_x >> 8)); \
 })
 
+#define grub_swap_bytes16_compile_time(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8))
+#define grub_swap_bytes32_compile_time(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000) >> 24))
+
 #if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3)
 static inline grub_uint32_t grub_swap_bytes32(grub_uint32_t x)
 {
@@ -193,6 +196,8 @@
 # define grub_be_to_cpu16(x)	((grub_uint16_t) (x))
 # define grub_be_to_cpu32(x)	((grub_uint32_t) (x))
 # define grub_be_to_cpu64(x)	((grub_uint64_t) (x))
+# define grub_cpu_to_le32_compile_time(x)	grub_swap_bytes32_compile_time(x)
+# define grub_cpu_to_le16_compile_time(x)	grub_swap_bytes16_compile_time(x)
 #else /* ! WORDS_BIGENDIAN */
 # define grub_cpu_to_le16(x)	((grub_uint16_t) (x))
 # define grub_cpu_to_le32(x)	((grub_uint32_t) (x))
@@ -206,6 +211,8 @@
 # define grub_be_to_cpu16(x)	grub_swap_bytes16(x)
 # define grub_be_to_cpu32(x)	grub_swap_bytes32(x)
 # define grub_be_to_cpu64(x)	grub_swap_bytes64(x)
+# define grub_cpu_to_le16_compile_time(x)	((grub_uint16_t) (x))
+# define grub_cpu_to_le32_compile_time(x)	((grub_uint32_t) (x))
 #endif /* ! WORDS_BIGENDIAN */
 
 #endif /* ! GRUB_TYPES_HEADER */


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2010-11-24 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 16:21 powerpc/emu build failure Colin Watson
2010-11-24 12:08 ` Colin Watson
2010-11-24 13:38   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-11-24 14:09     ` Colin Watson

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=4CED154E.2020800@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).