linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: WANG Xuerui <kernel@xen0n.name>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhc@lemote.com>,
	Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: Re: [PATCH v2 RESEND 4/4] MIPS: emulate CPUCFG instruction on older Loongson64 cores
Date: Mon, 18 May 2020 10:44:33 +0800	[thread overview]
Message-ID: <574fa5af-709d-1f52-af8e-7af815a4ab7e@xen0n.name> (raw)
In-Reply-To: <20200517151735.GA8048@alpha.franken.de>

On 2020/5/17 23:17, Thomas Bogendoerfer wrote:

> On Sun, May 17, 2020 at 07:39:44PM +0800, WANG Xuerui wrote:
>> On 5/17/20 4:37 PM, Thomas Bogendoerfer wrote:
>>
>>> On Sun, May 03, 2020 at 06:50:13PM +0800, WANG Xuerui wrote:
>>>> +#endif
>>>> +
>>>> +#endif /* _ASM_MACH_LOONGSON64_CPUCFG_EMUL_H_ */
>>>> diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
>>>> index ca2e6f1af4fe..907e31ff562f 100644
>>>> --- a/arch/mips/kernel/cpu-probe.c
>>>> +++ b/arch/mips/kernel/cpu-probe.c
>>>> @@ -28,6 +28,8 @@
>>>>   #include <asm/spram.h>
>>>>   #include <linux/uaccess.h>
>>>> +#include <asm/mach-loongson64/cpucfg-emul.h>
>>>> +
>>> this doesn't fly:
>>>
>>> In file included from /local/tbogendoerfer/korg/linux/arch/mips/kernel/cpu-probe.c:31:0:
>>> /local/tbogendoerfer/korg/linux/arch/mips/include/asm/mach-loongson64/cpucfg-emul.h:7:27: fatal error: loongson_regs.h: No such file or directory
>>>   #include <loongson_regs.h>
>>>                             ^
>>> compilation terminated.
>>>
>>> Is there a chance to put this code in a loongsoon specific file ?
>> Oops... I'll rebase tonight to fix this. Might be caused by the build system
>> changes merged in the meantime.
> just to make it clear, the failing config is a RALINK config, but looking
> at the failure probaly everything but loongson64 fails.
Thanks for the clarification; I've found out the mistake last night. The 
include of loongson_regs.h needs to go inside the config guard to 
prevent inclusion on other platforms where the include path is not set 
up for it.
>> As for the logic separation, I'm 100% in agreement with this, but I don't
>> know of any way to invoke mach-specific bits from inside cpu-probe.
> implement your code in a new/fitting file, provide a header file,
> which has prototypes for this functions if CONFIG_xxx option is enabled
> or empty stubs, if not. Then call these functions from cpu-probe.c.

Sure. I'll move these into cpucfg-emul.c to minimize intrusion to 
cpu-probe.c.

I'll send v3 later today (in my timezone) after I go home.

And thanks for your instruction!

> Thomas.
>

  reply	other threads:[~2020-05-18  2:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 13:38 [PATCH 0/4] CPUCFG emulation on older Loongson64 cores WANG Xuerui
2020-05-02 13:38 ` [PATCH 1/4] MIPS: Loongson64: fix typos in loongson_regs.h WANG Xuerui
2020-05-02 13:38 ` [PATCH 2/4] MIPS: Loongson64: define offsets and known revisions for some CPUCFG features WANG Xuerui
2020-05-02 13:38 ` [PATCH 3/4] MIPS: define more Loongson CP0.Config6 and CP0.Diag feature bits WANG Xuerui
2020-05-02 13:38 ` [PATCH 4/4] MIPS: emulate CPUCFG instruction on older Loongson64 cores WANG Xuerui
2020-05-02 13:59   ` Jiaxun Yang
2020-05-03  6:31   ` Huacai Chen
2020-05-03  7:58     ` Wang Xuerui
2020-05-03  8:25       ` Jiaxun Yang
2020-05-03 10:33 ` [PATCH v2 0/4] CPUCFG emulation " WANG Xuerui
2020-05-16 11:29   ` WANG Xuerui
2020-05-17  8:38     ` Thomas Bogendoerfer
2020-05-03 10:33 ` [PATCH v2 1/4] MIPS: Loongson64: fix typos in loongson_regs.h WANG Xuerui
2020-05-03 10:33 ` [PATCH v2 2/4] MIPS: Loongson64: define offsets and known revisions for some CPUCFG features WANG Xuerui
2020-05-03 10:33 ` [PATCH v2 3/4] MIPS: define more Loongson CP0.Config6 and CP0.Diag feature bits WANG Xuerui
2020-05-03 10:33 ` [PATCH v2 4/4] MIPS: emulate CPUCFG instruction on older Loongson64 cores WANG Xuerui
2020-05-03 10:50   ` [PATCH v2 RESEND " WANG Xuerui
2020-05-03 15:50     ` Jiaxun Yang
2020-05-04  5:25       ` WANG Xuerui
2020-05-04  6:58         ` Jiaxun Yang
2020-05-17  8:37     ` Thomas Bogendoerfer
2020-05-17 11:39       ` WANG Xuerui
2020-05-17 15:17         ` Thomas Bogendoerfer
2020-05-18  2:44           ` WANG Xuerui [this message]
2020-05-19 14:33             ` WANG Xuerui

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=574fa5af-709d-1f52-af8e-7af815a4ab7e@xen0n.name \
    --to=kernel@xen0n.name \
    --cc=chenhc@lemote.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).