All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: linux-mips@linux-mips.org, Huacai Chen <chenhc@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@cavium.com>,
	Linux MIPS Mailing List <linux-mips@linux-mips.org>,
	Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH V7 2/9] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3
Date: Thu, 29 Jun 2017 06:46:13 +0100	[thread overview]
Message-ID: <64E99F82-4E2B-4D53-8750-FCE90F84A29B@imgtec.com> (raw)
In-Reply-To: <CAAhV-H7+0v0TE=V29DVYtEhxN2fUjVhh9MP9gNV96jzkq_1yrg@mail.gmail.com>

On 29 June 2017 02:33:28 BST, Huacai Chen <chenhc@lemote.com> 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@imgtec.com>
>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

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@imgtec.com>
To: linux-mips@linux-mips.org, Huacai Chen <chenhc@lemote.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@cavium.com>,
	Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH V7 2/9] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3
Date: Thu, 29 Jun 2017 06:46:13 +0100	[thread overview]
Message-ID: <64E99F82-4E2B-4D53-8750-FCE90F84A29B@imgtec.com> (raw)
Message-ID: <20170629054613.0Q29R_hBZpWQxeAkWD1r6PkX9hdn8Pzex9uLuRdlTHI@z> (raw)
In-Reply-To: <CAAhV-H7+0v0TE=V29DVYtEhxN2fUjVhh9MP9gNV96jzkq_1yrg@mail.gmail.com>

On 29 June 2017 02:33:28 BST, Huacai Chen <chenhc@lemote.com> 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@imgtec.com>
>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

  reply	other threads:[~2017-06-29  5:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 15:06 [PATCH V7 0/9] MIPS: Loongson: feature and performance improvements Huacai Chen
2017-06-22 15:06 ` [PATCH V7 1/9] MIPS: Loongson: Add Loongson-3A R3 basic support Huacai Chen
2017-06-22 15:06 ` [PATCH V7 2/9] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 Huacai Chen
2017-06-28 14:30   ` James Hogan
2017-06-28 14:30     ` James Hogan
2017-06-29  1:33     ` Huacai Chen
2017-06-29  5:46       ` James Hogan [this message]
2017-06-29  5:46         ` James Hogan
2017-06-29 10:07         ` Huacai Chen
2017-06-29 10:23         ` Joshua Kinard
2017-06-30  7:03           ` Huacai Chen
2017-06-22 15:06 ` [PATCH V7 3/9] MIPS: Loongson: Add NMI handler support Huacai Chen
2017-06-22 15:06 ` [PATCH V7 4/9] MIPS: Loongson-3: Support 4 packages in CPU Hwmon driver Huacai Chen
2017-06-22 15:06 ` [PATCH V7 5/9] MIPS: Loongson-3: IRQ balancing for PCI devices Huacai Chen
2017-06-22 15:06 ` [PATCH V7 6/9] MIPS: Loongson-3: support irq_set_affinity() in i8259 chip Huacai Chen
2017-06-22 15:06 ` [PATCH V7 7/9] MIPS: Loogson: Make enum loongson_cpu_type more clear Huacai Chen
2017-06-22 15:06 ` [PATCH V7 8/9] MIPS: Add __cpu_full_name[] to make CPU names more human-readable Huacai Chen
2017-06-23 15:15   ` James Hogan
2017-06-23 15:15     ` James Hogan
2017-06-23 17:11     ` Ralf Baechle
2017-06-24  8:50       ` Huacai Chen
2017-06-22 15:06 ` [PATCH V7 9/9] MIPS: Loongson: Introduce and use LOONGSON_LLSC_WAR Huacai Chen
2017-06-23 14:54   ` James Hogan
2017-06-23 14:54     ` James Hogan
2017-06-24  8:55     ` Huacai Chen
2017-06-24  9:02       ` James Hogan
2017-06-24  9:02         ` James Hogan
2017-06-24  9:23         ` Huacai Chen
2017-06-26  8:26           ` James Hogan
2017-06-26  9:38             ` Huacai Chen

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=64E99F82-4E2B-4D53-8750-FCE90F84A29B@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=Steven.Hill@cavium.com \
    --cc=chenhc@lemote.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.