From: Randy Dunlap <rdunlap@infradead.org>
To: kbuild test robot <fengguang.wu@intel.com>,
Ingo Molnar <mingo@kernel.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, tipbuild@zytor.com
Subject: Re: [tip:WIP.sched/core 19/22] arch/m68k/include/asm/switch_to.h:30:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
Date: Sun, 4 Mar 2018 10:13:22 -0800 [thread overview]
Message-ID: <8f2f3ce7-4ddf-096a-3a7b-4b52f7c99c73@infradead.org> (raw)
In-Reply-To: <201803041903.WlVM69or%fengguang.wu@intel.com>
On 03/04/2018 03:16 AM, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
> head: ffce6fffa0033fa54d1bac1c7494862b71316978
> commit: ecaf52c9ec5ad31395e5c06c01e293ebcf0e4350 [19/22] sched/headers: Simplify and clean up header usage in the scheduler
> config: m68k-sun3_defconfig (attached as .config)
> compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout ecaf52c9ec5ad31395e5c06c01e293ebcf0e4350
> # save the attached .config to linux build tree
> make.cross ARCH=m68k
>
> All errors (new ones prefixed by >>):
>
> In file included from kernel/sched/core.c:8:0:
>>> arch/m68k/include/asm/switch_to.h:30:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> asmlinkage void resume(void);
> ^~~~
another simple fix:
--- linux-next-20180302.orig/arch/m68k/include/asm/switch_to.h
+++ linux-next-20180302/arch/m68k/include/asm/switch_to.h
@@ -27,6 +27,9 @@
* Changed 96/09/19 by Andreas Schwab
* pass prev in a0, next in a1
*/
+
+#include <linux/linkage.h>
+
asmlinkage void resume(void);
#define switch_to(prev,next,last) do { \
register void *_prev __asm__ ("a0") = (prev); \
> vim +30 arch/m68k/include/asm/switch_to.h
>
> 803f69144 David Howells 2012-03-28 4
> 803f69144 David Howells 2012-03-28 5 /*
> 803f69144 David Howells 2012-03-28 6 * switch_to(n) should switch tasks to task ptr, first checking that
> 803f69144 David Howells 2012-03-28 7 * ptr isn't the current task, in which case it does nothing. This
> 803f69144 David Howells 2012-03-28 8 * also clears the TS-flag if the task we switched to has used the
> 803f69144 David Howells 2012-03-28 9 * math co-processor latest.
> 803f69144 David Howells 2012-03-28 10 */
> 803f69144 David Howells 2012-03-28 11 /*
> 803f69144 David Howells 2012-03-28 12 * switch_to() saves the extra registers, that are not saved
> 803f69144 David Howells 2012-03-28 13 * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and
> 803f69144 David Howells 2012-03-28 14 * a0-a1. Some of these are used by schedule() and its predecessors
> 803f69144 David Howells 2012-03-28 15 * and so we might get see unexpected behaviors when a task returns
> 803f69144 David Howells 2012-03-28 16 * with unexpected register values.
> 803f69144 David Howells 2012-03-28 17 *
> 803f69144 David Howells 2012-03-28 18 * syscall stores these registers itself and none of them are used
> 803f69144 David Howells 2012-03-28 19 * by syscall after the function in the syscall has been called.
> 803f69144 David Howells 2012-03-28 20 *
> 803f69144 David Howells 2012-03-28 21 * Beware that resume now expects *next to be in d1 and the offset of
> 803f69144 David Howells 2012-03-28 22 * tss to be in a1. This saves a few instructions as we no longer have
> 803f69144 David Howells 2012-03-28 23 * to push them onto the stack and read them back right after.
> 803f69144 David Howells 2012-03-28 24 *
> 803f69144 David Howells 2012-03-28 25 * 02/17/96 - Jes Sorensen (jds@kom.auc.dk)
> 803f69144 David Howells 2012-03-28 26 *
> 803f69144 David Howells 2012-03-28 27 * Changed 96/09/19 by Andreas Schwab
> 803f69144 David Howells 2012-03-28 28 * pass prev in a0, next in a1
> 803f69144 David Howells 2012-03-28 29 */
> 803f69144 David Howells 2012-03-28 @30 asmlinkage void resume(void);
> 803f69144 David Howells 2012-03-28 31 #define switch_to(prev,next,last) do { \
> 803f69144 David Howells 2012-03-28 32 register void *_prev __asm__ ("a0") = (prev); \
> 803f69144 David Howells 2012-03-28 33 register void *_next __asm__ ("a1") = (next); \
> 803f69144 David Howells 2012-03-28 34 register void *_last __asm__ ("d1"); \
> 803f69144 David Howells 2012-03-28 35 __asm__ __volatile__("jbsr resume" \
> 803f69144 David Howells 2012-03-28 36 : "=a" (_prev), "=a" (_next), "=d" (_last) \
> 803f69144 David Howells 2012-03-28 37 : "0" (_prev), "1" (_next) \
> 803f69144 David Howells 2012-03-28 38 : "d0", "d2", "d3", "d4", "d5"); \
> 803f69144 David Howells 2012-03-28 39 (last) = _last; \
> 803f69144 David Howells 2012-03-28 40 } while (0)
> 803f69144 David Howells 2012-03-28 41
>
> :::::: The code at line 30 was first introduced by commit
> :::::: 803f69144f0d48863c68f9d111b56849c7cef5bb Disintegrate asm/system.h for M68K
>
> :::::: TO: David Howells <dhowells@redhat.com>
> :::::: CC: David Howells <dhowells@redhat.com>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
--
~Randy
prev parent reply other threads:[~2018-03-04 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-04 11:16 kbuild test robot
2018-03-04 18:13 ` Randy Dunlap [this message]
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=8f2f3ce7-4ddf-096a-3a7b-4b52f7c99c73@infradead.org \
--to=rdunlap@infradead.org \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tipbuild@zytor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®