* [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch
@ 2008-05-21 1:38 Andrew Liu
2008-05-21 3:11 ` Kumar Gala
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Liu @ 2008-05-21 1:38 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
[POWERPC]: Uniformly use memstart_addr as the start address of RAM
The variable: memstart_addr whose initial value is got from dts file
is used as the start address of physical memory in PowerPC ARCH,
although it is used in functions: mapin_ram(pgtable_32.c) and
cam_mapin_ram(fsl_booke_mmu.c), however, in function: mmu_mapin_ram
(ppc_mmu_32.c), use 0 as the start address of physical memory, so
it is necessary to unify them: in mmu_mapin_ram, use memstart_addr
as the start address of physical memory, instead of 0.
Signed-off-by: Andrew Liu <shengping.liu@windriver•com>
---
b/arch/powerpc/mm/ppc_mmu_32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index cef9f15..f133c6e 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -98,7 +98,7 @@ unsigned long __init mmu_mapin_ram(void)
break;
}
- setbat(2, KERNELBASE, 0, bl, _PAGE_RAM);
+ setbat(2, KERNELBASE, memstart_addr, bl, _PAGE_RAM);
done = (unsigned long)bat_addrs[2].limit - KERNELBASE + 1;
if ((done < tot) && !bat_addrs[3].limit) {
/* use BAT3 to cover a bit more */
@@ -106,7 +106,7 @@ unsigned long __init mmu_mapin_ram(void)
for (bl = 128<<10; bl < max_size; bl <<= 1)
if (bl * 2 > tot)
break;
- setbat(3, KERNELBASE+done, done, bl, _PAGE_RAM);
+ setbat(3, KERNELBASE+done, memstart_addr+done, bl, _PAGE_RAM);
done = (unsigned long)bat_addrs[3].limit - KERNELBASE + 1;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch
2008-05-21 1:38 [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch Andrew Liu
@ 2008-05-21 3:11 ` Kumar Gala
2008-05-21 2:22 ` Andrew Liu
0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2008-05-21 3:11 UTC (permalink / raw)
To: Andrew Liu; +Cc: linuxppc-dev, paulus
On May 20, 2008, at 8:38 PM, Andrew Liu wrote:
> [POWERPC]: Uniformly use memstart_addr as the start address of RAM
>
> The variable: memstart_addr whose initial value is got from dts file
> is used as the start address of physical memory in PowerPC ARCH,
> although it is used in functions: mapin_ram(pgtable_32.c) and
> cam_mapin_ram(fsl_booke_mmu.c), however, in function: mmu_mapin_ram
> (ppc_mmu_32.c), use 0 as the start address of physical memory, so
> it is necessary to unify them: in mmu_mapin_ram, use memstart_addr
> as the start address of physical memory, instead of 0.
>
> Signed-off-by: Andrew Liu <shengping.liu@windriver•com>
> ---
Do you have a case where this is non-zero for ppc_mmu_32? I left
these alone because I wasn't aware of one (or if its reasonable).
- k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch
2008-05-21 3:11 ` Kumar Gala
@ 2008-05-21 2:22 ` Andrew Liu
2008-05-21 4:14 ` Paul Mackerras
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Liu @ 2008-05-21 2:22 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, paulus
Kumar Gala wrote:
>
> On May 20, 2008, at 8:38 PM, Andrew Liu wrote:
>
>> [POWERPC]: Uniformly use memstart_addr as the start address of RAM
>>
>> The variable: memstart_addr whose initial value is got from dts file
>> is used as the start address of physical memory in PowerPC ARCH,
>> although it is used in functions: mapin_ram(pgtable_32.c) and
>> cam_mapin_ram(fsl_booke_mmu.c), however, in function: mmu_mapin_ram
>> (ppc_mmu_32.c), use 0 as the start address of physical memory, so
>> it is necessary to unify them: in mmu_mapin_ram, use memstart_addr
>> as the start address of physical memory, instead of 0.
>>
>> Signed-off-by: Andrew Liu <shengping.liu@windriver•com>
>> ---
>
> Do you have a case where this is non-zero for ppc_mmu_32? I left these
> alone because I wasn't aware of one (or if its reasonable).
>
No.
I submitted this patch just because in ppc branch, PPC_MEMSTART is used as
the start address of physical memory uniformly, however, in powerpc branch,
use memstart_addr and 0, although, almost for all boards which are in powerpc,
they are equal, from the aspect of code consistency, I think it is necessary to
unify them.
You know we can't make sure in future the start address of all incoming
boards' RAM is 0, especially, in AMP system, different cpu uses the different RAM area,
definitely, the start address of some is not 0.
BRs,
Andrew
> - k
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch
2008-05-21 2:22 ` Andrew Liu
@ 2008-05-21 4:14 ` Paul Mackerras
0 siblings, 0 replies; 4+ messages in thread
From: Paul Mackerras @ 2008-05-21 4:14 UTC (permalink / raw)
To: Andrew Liu; +Cc: linuxppc-dev
Andrew Liu writes:
> You know we can't make sure in future the start address of all incoming
> boards' RAM is 0, especially, in AMP system, different cpu uses the different RAM area,
> definitely, the start address of some is not 0.
Any processor that uses ppc_mmu_32.c will have interrupt vectors in
the 0 - 0x3000 region of memory and hence *must* have RAM starting at
zero. In other words, that file is only used for "classic" 32-bit
PowerPC processors, not for anything based on Book E or Power
architecture v2.04 or later.
Paul.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-21 4:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 1:38 [PATCH] [POWERPC] Uniformly use memstart_addr variable as the start address of physical memory in powerpc branch Andrew Liu
2008-05-21 3:11 ` Kumar Gala
2008-05-21 2:22 ` Andrew Liu
2008-05-21 4:14 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox