Re: [PATCH V2 1/2] MIPS: BCM63XX: Add SMP support to prom.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergei,

On Tue, Jun 18, 2013 at 1:48 PM, Sergei Shtylyov
<sergei.shtylyov@xxxxxxxxxxxxxxxxxx> wrote:
> Hello.
>
>
> On 18-06-2013 13:34, Jonas Gorski wrote:
>
>> From: Kevin Cernekee <cernekee@xxxxxxxxx>
>
>
>> This involves two changes to the BSP code:
>
>
>> 1) register_smp_ops() for BMIPS SMP
>
>
>> 2) The CPU1 boot vector on some of the BCM63xx platforms conflicts with
>> the special interrupt vector (IV).  Move it to 0x8000_0380 at boot time,
>> to resolve the conflict.
>
>
>> Signed-off-by: Kevin Cernekee <cernekee@xxxxxxxxx>
>> [jogo@xxxxxxxxxxx: moved SMP ops registration into ifdef guard,
>>   changed ifdef guards to if (IS_ENABLED())]
>> Signed-off-by: Jonas Gorski <jogo@xxxxxxxxxxx>
>> ---
>> V1 -> V2:
>>   * changed ifdef guards to if (IS_ENABLED())
>
>
>>   arch/mips/bcm63xx/prom.c |   41
>> +++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 41 insertions(+)
>
>
>> diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/prom.c
>> index fd69808..33ddc78 100644
>> --- a/arch/mips/bcm63xx/prom.c
>> +++ b/arch/mips/bcm63xx/prom.c
>
> [...]
>
>> @@ -52,6 +56,43 @@ void __init prom_init(void)
>>
>>         /* do low level board init */
>>         board_prom_init();
>> +
>> +       if (IS_ENABLED(CONFIG_CPU_BMIPS4350) && IS_ENABLED(CONFIG_SMP)) {
>> +               /* set up SMP */
>> +               register_smp_ops(&bmips_smp_ops);
>> +
>> +               /*
>> +                * BCM6328 might not have its second CPU enabled, while
>> BCM6358
>> +                * needs special handling for its shared TLB, so disable
>> SMP
>> +                * for now.
>> +                */
>> +               if (BCMCPU_IS_6328()) {
>> +                       bmips_smp_enabled = 0;
>> +               } else if (BCMCPU_IS_6358()) {
>> +                       bmips_smp_enabled = 0;
>> +               }
>
>
>     Doesn't scripts/checkpatch.pl complain here? You should not use {} on
> the single statement branches.

I left the braces intentionally there because Patch 2 adds code to the
first branch, so I would have to add them in the next patch anyway.
This way the changes of Patch 2 stays smaller and easier to review
(and are limited to actual code changes).


Jonas


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux