All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: WANG Xuerui <kernel@xen0n.name>
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 17:17:35 +0200	[thread overview]
Message-ID: <20200517151735.GA8048@alpha.franken.de> (raw)
In-Reply-To: <2982d83e-bcf2-2515-bcd2-b80bd1f20223@xen0n.name>

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.

> 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.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2020-05-17 15:18 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 [this message]
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=20200517151735.GA8048@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=chenhc@lemote.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-mips@vger.kernel.org \
    --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 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.