linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: junxiao.bi@windriver.com (Bi Junxiao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] ARM: fix be8 support for phys/virt address conversion
Date: Mon, 21 Nov 2011 13:44:25 +0800	[thread overview]
Message-ID: <4EC9E539.9060801@windriver.com> (raw)
In-Reply-To: <1321322785-2981-1-git-send-email-junxiao.bi@windriver.com>

Hi Russell,

Would you please help to review this patch series?

Great thanks.

on 11/15/2011 10:06 AM Junxiao Bi wrote:
> phys_to_virt() and virt_to_phys() is implemented by one assembler instruction,
> add/sub an offset between the physical and virtual address. For some arm machines
> with CONFIG_ARM_PATCH_PHYS_VIRT defined, this offset is unknown at compile time,
> it is calculated dynamically at run time and then patched to the add/sub instruction.
> To support BE8 mode, firstly we need to convert the instruntion to big-endian after
> loading it from the memory, and then modify its offset field, at last convert it to
> little-endian and write it back to the memory.
>
> Signed-off-by: Junxiao Bi<junxiao.bi@windriver.com>
> ---
>   arch/arm/kernel/head.S |   12 ++++++++++++
>   1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 566c54c..838fb0c 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -522,8 +522,14 @@ __fixup_a_pv_table:
>   	b	2f
>   1:	add     r7, r3
>   	ldrh	ip, [r7, #2]
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> +	rev16	ip, ip
> +#endif
>   	and	ip, 0x8f00
>   	orr	ip, r6	@ mask in offset bits 31-24
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> +	rev16	ip, ip
> +#endif
>   	strh	ip, [r7, #2]
>   2:	cmp	r4, r5
>   	ldrcc	r7, [r4], #4	@ use branch for delay slot
> @@ -532,8 +538,14 @@ __fixup_a_pv_table:
>   #else
>   	b	2f
>   1:	ldr	ip, [r7, r3]
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> +	rev	ip, ip
> +#endif
>   	bic	ip, ip, #0x000000ff
>   	orr	ip, ip, r6	@ mask in offset bits 31-24
> +#ifdef CONFIG_CPU_ENDIAN_BE8
> +	rev	ip, ip
> +#endif
>   	str	ip, [r7, r3]
>   2:	cmp	r4, r5
>   	ldrcc	r7, [r4], #4	@ use branch for delay slot
>    

  parent reply	other threads:[~2011-11-21  5:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  2:06 [PATCH 1/6] ARM: fix be8 support for phys/virt address conversion Junxiao Bi
2011-11-15  2:06 ` [PATCH 2/6] ARM: gic: fix big endian support Junxiao Bi
2011-11-21 19:11   ` Nicolas Pitre
2011-11-22  1:47     ` Bi Junxiao
2011-11-22  4:10       ` Nicolas Pitre
2011-11-22  5:22         ` Bi Junxiao
2011-11-22 10:33       ` Dave Martin
2011-11-23  2:32         ` Bi Junxiao
2011-11-15  2:06 ` [PATCH 3/6] ARM: early_printk: pl01x: " Junxiao Bi
2011-11-15  2:06 ` [PATCH 4/6] ARM: add big endian support for peripheral access Junxiao Bi
2011-11-15  2:06 ` [PATCH 5/6] ARM: Atomic64: fix 64bit ops in BE mode Junxiao Bi
2011-11-21 19:24   ` Nicolas Pitre
2011-11-15  2:06 ` [PATCH 6/6] ARM: support kernel modules in BE8 mode Junxiao Bi
2011-11-21 19:29   ` Nicolas Pitre
2011-11-22  1:32     ` Bi Junxiao
2011-11-22  4:17       ` Nicolas Pitre
2011-11-22  5:27         ` Bi Junxiao
2011-11-22 10:47       ` Dave Martin
2011-11-23  3:30         ` Bi Junxiao
2011-11-21  5:44 ` Bi Junxiao [this message]
2011-11-21 18:32 ` [PATCH 1/6] ARM: fix be8 support for phys/virt address conversion Nicolas Pitre
  -- strict thread matches above, loose matches on Subject: below --
2011-12-08 10:07 [V2][PATCH 0/6]ARM: fix BE8 mode support Junxiao Bi
2011-12-08 10:07 ` [PATCH 1/6] ARM: fix be8 support for phys/virt address conversion Junxiao Bi

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=4EC9E539.9060801@windriver.com \
    --to=junxiao.bi@windriver.com \
    --cc=linux-arm-kernel@lists.infradead.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).