All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/mpc85xx: Temporary fix for spin table backward compatibility
Date: Fri, 26 Oct 2012 18:34:52 -0500	[thread overview]
Message-ID: <1351294492.23094.11@snotra> (raw)
In-Reply-To: <1351289129-32544-1-git-send-email-yorksun@freescale.com> (from yorksun@freescale.com on Fri Oct 26 17:05:29 2012)

On 10/26/2012 05:05:29 PM, York Sun wrote:
> diff --git a/arch/powerpc/cpu/mpc85xx/release.S  
> b/arch/powerpc/cpu/mpc85xx/release.S
> index 4ba44a9..b68272b 100644
> --- a/arch/powerpc/cpu/mpc85xx/release.S
> +++ b/arch/powerpc/cpu/mpc85xx/release.S
> @@ -351,6 +351,13 @@ __secondary_reset_vector:
>  	.align L1_CACHE_SHIFT
>  	.global __second_half_boot_page
>  __second_half_boot_page:
> +#ifdef CONFIG_PPC_SPINTABLE_COMPATIBLE
> +	lis r3,(spin_table_compat - __second_half_boot_page)@h
> +	ori r3,r3,(spin_table_compat - __second_half_boot_page)@l
> +	add r3,r3,r11 /* r11 has the address of __second_half_boot_page  
> */
> +	lwz r14,0(r3)
> +#endif

Please tab after the mnemonic.

>  #define EPAPR_MAGIC		0x45504150
>  #define ENTRY_ADDR_UPPER	0
>  #define ENTRY_ADDR_LOWER	4
> @@ -383,7 +390,24 @@ __second_half_boot_page:
>  	stw	r8,ENTRY_ADDR_LOWER(r10)
> 
>  	/* spin waiting for addr */
> -3:	lwz	r4,ENTRY_ADDR_LOWER(r10)
> +3:
> +/*
> + * To comply with ePAPR 1.1, the spin table has been moved to  
> cache-enabled
> + * memory. Old OS may not work with this change. A patch is waiting  
> to be
> + * accepted for Linux kernel. Other OS needs similar fix to spin  
> table.
> + * For OSes with old spin table code, we can enable this temporary  
> fix by
> + * setting environmental variable "spin_table_compat". For new OSes,  
> set
> + * "spin_table_compat=no". After all OSes are fixed, we can remove  
> this macro
> + * and related code. For now, it is enabled by default.
> + */

Let's be realistic -- s/all OSes are fixed/Linux is fixed/

> +
> +#ifdef CONFIG_PPC_SPINTABLE_COMPATIBLE
> +	.align L1_CACHE_SHIFT
> +	.global spin_table_compat
> +spin_table_compat:
> +	.long 1
> +#endif

Tab after .long

> +
>  __spin_table_end:
>  	.space 4096 - (__spin_table_end - __spin_table)
> diff --git a/arch/powerpc/include/asm/config_mpc85xx.h  
> b/arch/powerpc/include/asm/config_mpc85xx.h
> index 03baaee..29833bb 100644
> --- a/arch/powerpc/include/asm/config_mpc85xx.h
> +++ b/arch/powerpc/include/asm/config_mpc85xx.h
> @@ -27,6 +27,13 @@
>  #error "Do not define CONFIG_SYS_CCSRBAR_DEFAULT in the board header  
> file."
>  #endif
> 
> +/*
> + * This macro should be removed when we no longer care about  
> backwards
> + * compatibility with older operating systems. Cacheable spin table  
> support
> + * will be added in Linux 3.8.
> + */
> +#define CONFIG_PPC_SPINTABLE_COMPATIBLE

Put the crystal ball away -- we don't know it will be in 3.8 (though
hopefully it will be).  We just know it won't make it any sooner than
that (unless Kumar can push it as a bug fix, which seems unlikely).

-Scott

      reply	other threads:[~2012-10-26 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26 22:05 [U-Boot] [PATCH] powerpc/mpc85xx: Temporary fix for spin table backward compatibility York Sun
2012-10-26 23:34 ` Scott Wood [this message]

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=1351294492.23094.11@snotra \
    --to=scottwood@freescale.com \
    --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 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.