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: Sun, 17 May 2020 19:39:44 +0800 [thread overview]
Message-ID: <2982d83e-bcf2-2515-bcd2-b80bd1f20223@xen0n.name> (raw)
In-Reply-To: <20200517083754.GB3939@alpha.franken.de>
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.
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. Plus all the PRId matching logic have to be duplicated if the
code is to be moved to the loongson64/ sub-directory. I didn't find any
other platform that does this, so I just extended the probing code.
Other way is to treat the whole CPUCFG thing just like the r2-to-r6-emul
thing, which means moving all the logic to kernel/ sub-directory. But
I'd rather not do this, for reasons explained in the cover letter.
>
> Thomas.
>
next prev parent reply other threads:[~2020-05-17 11:39 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 [this message]
2020-05-17 15:17 ` Thomas Bogendoerfer
2020-05-18 2:44 ` WANG Xuerui
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=2982d83e-bcf2-2515-bcd2-b80bd1f20223@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).