From: Scott Wood <scottwood@freescale.com>
To: Kevin Hao <haokexin@gmail.com>
Cc: linuxppc <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v2 4/8] powerpc/fsl_booke: set the tlb entry for the kernel address in AS1
Date: Fri, 26 Jul 2013 18:37:10 -0500 [thread overview]
Message-ID: <1374881830.30721.38@snotra> (raw)
In-Reply-To: <1372942454-25191-5-git-send-email-haokexin@gmail.com> (from haokexin@gmail.com on Thu Jul 4 07:54:10 2013)
On 07/04/2013 07:54:10 AM, Kevin Hao wrote:
> We use the tlb1 entries to map low mem to the kernel space. In the
> current code, it assumes that the first tlb entry would cover the
> kernel image. But this is not true for some special cases, such as
> when we run a relocatable kernel above the 256M or set
> CONFIG_KERNEL_START above 256M. So we choose to switch to address
> space 1 before setting these tlb entries.
If you're doing this, then I see even less reason to use such a large =20
boot TLB1 entry.
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> ---
> A new patch in v2.
>=20
> arch/powerpc/kernel/head_fsl_booke.S | 81 =20
> ++++++++++++++++++++++++++++++++++++
> arch/powerpc/mm/fsl_booke_mmu.c | 2 +
> arch/powerpc/mm/mmu_decl.h | 2 +
> 3 files changed, 85 insertions(+)
>=20
> diff --git a/arch/powerpc/kernel/head_fsl_booke.S =20
> b/arch/powerpc/kernel/head_fsl_booke.S
> index 134064d..0cbfe95 100644
> --- a/arch/powerpc/kernel/head_fsl_booke.S
> +++ b/arch/powerpc/kernel/head_fsl_booke.S
> @@ -1172,6 +1172,87 @@ __secondary_hold_acknowledge:
> #endif
>=20
> /*
> + * Create a tbl entry
s/tbl/tlb/
> diff --git a/arch/powerpc/mm/fsl_booke_mmu.c =20
> b/arch/powerpc/mm/fsl_booke_mmu.c
> index 5fe271c..8f60ef8 100644
> --- a/arch/powerpc/mm/fsl_booke_mmu.c
> +++ b/arch/powerpc/mm/fsl_booke_mmu.c
> @@ -222,7 +222,9 @@ void __init adjust_total_lowmem(void)
> /* adjust lowmem size to __max_low_memory */
> ram =3D min((phys_addr_t)__max_low_memory, =20
> (phys_addr_t)total_lowmem);
>=20
> + i =3D switch_to_as1();
> __max_low_memory =3D map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM);
> + restore_to_as0(i);
Wouldn't it be simpler to just run out of AS1 from the end of =20
fsl_booke_entry_mapping.S, similar to what U-Boot does? With ESEL =20
being changed to something non-conflicting, of course.
-Scott=
next prev parent reply other threads:[~2013-07-26 23:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 12:54 [PATCH v2 0/8] powerpc: enable the relocatable support for fsl booke 32bit kernel Kevin Hao
2013-07-04 12:54 ` [PATCH v2 1/8] powerpc/fsl_booke: protect the access to MAS7 with MMU_FTR_BIG_PHYS Kevin Hao
2013-07-26 23:14 ` Scott Wood
2013-08-04 0:30 ` Kevin Hao
2013-07-04 12:54 ` [PATCH v2 2/8] powerpc/fsl_booke: introduce get_phys_addr function Kevin Hao
2013-07-04 12:54 ` [PATCH v2 3/8] powerpc: enable the relocatable support for the fsl booke 32bit kernel Kevin Hao
2013-07-26 23:28 ` Scott Wood
2013-08-04 0:38 ` Kevin Hao
2013-07-04 12:54 ` [PATCH v2 4/8] powerpc/fsl_booke: set the tlb entry for the kernel address in AS1 Kevin Hao
2013-07-26 23:37 ` Scott Wood [this message]
2013-08-04 0:42 ` Kevin Hao
2013-07-04 12:54 ` [PATCH v2 5/8] memblock: introduce the memblock_reinit function Kevin Hao
2013-07-04 12:54 ` [PATCH v2 6/8] powerpc: introduce early_get_first_memblock_info Kevin Hao
2013-07-27 0:18 ` Scott Wood
2013-08-04 0:45 ` Kevin Hao
2013-08-05 23:59 ` Scott Wood
2013-08-06 1:21 ` Kevin Hao
2013-07-04 12:54 ` [PATCH v2 7/8] powerpc/fsl_booke: make sure PAGE_OFFSET map to memstart_addr for relocatable kernel Kevin Hao
2013-07-27 0:17 ` Scott Wood
2013-08-04 0:50 ` Kevin Hao
2013-08-06 0:10 ` Scott Wood
2013-08-06 1:23 ` Kevin Hao
2013-08-06 0:14 ` Scott Wood
2013-08-06 1:45 ` Kevin Hao
2013-07-04 12:54 ` [PATCH v2 8/8] powerpc/fsl_booke: enable the relocatable for the kdump kernel Kevin Hao
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=1374881830.30721.38@snotra \
--to=scottwood@freescale.com \
--cc=haokexin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.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).