public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] x86: Forward declate gd_t
Date: Mon, 30 Apr 2012 04:23:49 +0200	[thread overview]
Message-ID: <201204300423.49647.marex@denx.de> (raw)
In-Reply-To: <1335700823-15144-3-git-send-email-graeme.russ@gmail.com>

Dear Graeme Russ,

> So it can be used as a type in struct global_data and remove an ugly
> typecast
> 
> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
> ---
>  arch/x86/cpu/cpu.c                 |    2 +-
>  arch/x86/include/asm/global_data.h |    4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
> index e9bb0d7..67de6bc 100644
> --- a/arch/x86/cpu/cpu.c
> +++ b/arch/x86/cpu/cpu.c
> @@ -92,7 +92,7 @@ static void load_gdt(const u64 *boot_gdt, u16
> num_entries)
> 
>  void init_gd(gd_t *id, u64 *gdt_addr)
>  {
> -	id->gd_addr = (ulong)id;
> +	id->gd_addr = id;
>  	setup_gdt(id, gdt_addr);
>  }
> 
> diff --git a/arch/x86/include/asm/global_data.h
> b/arch/x86/include/asm/global_data.h index 908a02c..8a8896e 100644
> --- a/arch/x86/include/asm/global_data.h
> +++ b/arch/x86/include/asm/global_data.h
> @@ -35,9 +35,11 @@
> 
>  #ifndef __ASSEMBLY__
> 
> +typedef struct global_data gd_t;
> +
>  typedef	struct global_data {
>  	/* NOTE: gd_addr MUST be first member of struct global_data! */
> -	unsigned long	gd_addr;	/* Location of Global Data */
> +	gd_t		*gd_addr;	/* Location of Global Data */
>  	bd_t		*bd;
>  	unsigned long	flags;
>  	unsigned long	baudrate;

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

  reply	other threads:[~2012-04-30  2:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29 12:00 [U-Boot] [PATCH 0/5] Various x86 patches Graeme Russ
2012-04-29 12:00 ` [U-Boot] [PATCH 1/5] x86: Fix compilation on 64-built built machines Graeme Russ
2012-11-28  1:35   ` Simon Glass
2012-04-29 12:00 ` [U-Boot] [PATCH 2/5] x86: Forward declate gd_t Graeme Russ
2012-04-30  2:23   ` Marek Vasut [this message]
2012-11-28  1:28     ` Simon Glass
2012-11-28  1:29       ` Marek Vasut
2012-11-28  1:31         ` Simon Glass
2012-11-28  1:35           ` Marek Vasut
2012-11-28  1:37             ` Graeme Russ
2012-11-28  1:44               ` Marek Vasut
2012-04-29 12:00 ` [U-Boot] [PATCH 3/5] x86: Put global data on the stack Graeme Russ
2012-11-28  1:17   ` Simon Glass
2012-04-29 12:00 ` [U-Boot] [PATCH 4/5] x86: Remove duplicate PCI init Graeme Russ
2012-11-28  1:15   ` Simon Glass
2012-04-29 12:00 ` [U-Boot] [PATCH 5/5] x86: Add ilog2 to bitops Graeme Russ
2012-11-28  1:32   ` Simon Glass
2012-04-29 12:25 ` [U-Boot] [PATCH 0/5] Various x86 patches Andy Pont
     [not found] ` <4f9d32e6.810c320a.69b0.01ddSMTPIN_ADDED@mx.google.com>
2012-04-29 12:31   ` Graeme Russ
2012-11-28  1:13     ` Simon Glass

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=201204300423.49647.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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