Re: [PATCH V7 2/9] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3

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

 



Create arch/mips/include/asm/mach-malta/mmzone.h and put this line in it?
#define pa_to_nid(addr) 0

Huacai

On Thu, Jun 29, 2017 at 1:46 PM, James Hogan <james.hogan@xxxxxxxxxx> wrote:
> On 29 June 2017 02:33:28 BST, Huacai Chen <chenhc@xxxxxxxxxx> wrote:
>>Hi, James,
>>
>>Is it suitable to add this line in arch/mips/include/asm/mmzone.h?
>>#define pa_to_nid(addr) 0
>
> It was basically malta_defconfig.
>
> OTOH when i tried including asm/mmzone.h, that tries including <mmzone.h> which it can't find.
>
> Cheers
> Jamee
>
>>
>>Huacai
>>
>>On Wed, Jun 28, 2017 at 10:30 PM, James Hogan <james.hogan@xxxxxxxxxx>
>>wrote:
>>> Hi Huacai,
>>>
>>> On Thu, Jun 22, 2017 at 11:06:49PM +0800, Huacai Chen wrote:
>>>> @@ -839,9 +860,12 @@ static void r4k_dma_cache_wback_inv(unsigned
>>long addr, unsigned long size)
>>>>
>>>>       preempt_disable();
>>>>       if (cpu_has_inclusive_pcaches) {
>>>> -             if (size >= scache_size)
>>>> -                     r4k_blast_scache();
>>>> -             else
>>>> +             if (size >= scache_size) {
>>>> +                     if (current_cpu_type() != CPU_LOONGSON3)
>>>> +                             r4k_blast_scache();
>>>> +                     else
>>>> +
>>r4k_blast_scache_node(pa_to_nid(addr));
>>>> +             } else
>>>>                       blast_scache_range(addr, addr + size);
>>>>               preempt_enable();
>>>>               __sync();
>>>> @@ -872,9 +896,12 @@ static void r4k_dma_cache_inv(unsigned long
>>addr, unsigned long size)
>>>>
>>>>       preempt_disable();
>>>>       if (cpu_has_inclusive_pcaches) {
>>>> -             if (size >= scache_size)
>>>> -                     r4k_blast_scache();
>>>> -             else {
>>>> +             if (size >= scache_size) {
>>>> +                     if (current_cpu_type() != CPU_LOONGSON3)
>>>> +                             r4k_blast_scache();
>>>> +                     else
>>>> +
>>r4k_blast_scache_node(pa_to_nid(addr));
>>>
>>> malta_defconfig now fails to build:
>>>
>>> arch/mips/mm/c-r4k.c: In function ‘r4k_dma_cache_wback_inv’:
>>> arch/mips/mm/c-r4k.c:867:5: error: implicit declaration of function
>>‘pa_to_nid’ [-Werror=implicit-function-declaration]
>>>      r4k_blast_scache_node(pa_to_nid(addr));
>>>      ^
>>>
>>> Cheers
>>> James
>
>
> --
> James Hogan
>




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

  Powered by Linux