[U-Boot] [PATCH] 85xx: Introduce determine_mp_bootpg() helper.
Kumar Gala
galak at kernel.crashing.org
Wed Apr 1 17:59:58 CEST 2009
On Apr 1, 2009, at 10:52 AM, Becky Bruce wrote:
>> @@ -203,13 +206,7 @@ void setup_mp(void)
>> {
>> extern ulong __secondary_start_page;
>> ulong fixup = (ulong)&__secondary_start_page;
>> - u32 bootpg;
>> -
>> - /* if we have 4G or more of memory, put the boot page at 4Gb-4k */
>> - if ((u64)gd->ram_size > 0xfffff000)
>> - bootpg = 0xfffff000;
>> - else
>> - bootpg = gd->ram_size - 4096;
>> + u32 bootpg = determine_mp_bootpg();
>>
>> memcpy((void *)bootpg, (void *)fixup, 4096);
>
> Same somments apply about defining BOOTPG_ALIGN as in the other
> patch. And is there a PAGE_SIZE or something somewhere? We're
> using 4096 which is a bit stupid. I know, you didn't introduce that
> code, but it seems easy to clean it up now. If you don't want to
> bother, let me know and I'll post a follow-on.
As I said on the 86xx patch, when someone re-factors the code an adds
spin table support for 86xx than we should deal with this.
>> flush_cache(bootpg, 4096);
>> diff --git a/cpu/mpc85xx/mp.h b/cpu/mpc85xx/mp.h
>> index b06707f..71423ef 100644
>> --- a/cpu/mpc85xx/mp.h
>> +++ b/cpu/mpc85xx/mp.h
>> @@ -5,7 +5,7 @@ ulong get_spin_addr(void);
>> void setup_mp(void);
>> u32 get_my_id(void);
>> void cpu_mp_lmb_reserve(struct lmb *lmb);
>> -u32 determine_bootpg(void);
>> +u32 determine_mp_bootpg(void);
>
> This hunk is bogus - the previous change should never have been there.
fixed.
- k
More information about the U-Boot
mailing list