* tools/liblockdep: Build failure
@ 2014-04-01 6:04 Eunbong Song
2014-04-01 8:02 ` Robin Hack
0 siblings, 1 reply; 7+ messages in thread
From: Eunbong Song @ 2014-04-01 6:04 UTC (permalink / raw)
To: ak, sasha.levin; +Cc: linux-kernel@vger.kernel.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1723 bytes --]
There is tools/liblockdep build failure.
I have been trying to find the cause and i found commit id 63f9a7fde715352e0769302527670542a664b981 is the casue.
Author: Andi Kleen <ak@linux.intel.com>
Date: Sat Feb 8 08:52:01 2014 +0100
asmlinkage: Make lockdep_sys_exit asmlinkage
lockdep_sys_exit can be called from assembler code, so make it
asmlinkage.
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1391845930-28580-5-git-send-email-ak@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 92b1bfc..7df9aa6 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -265,7 +265,7 @@ extern void lockdep_info(void);
extern void lockdep_reset(void);
extern void lockdep_reset_lock(struct lockdep_map *lock);
extern void lockdep_free_key_range(void *start, unsigned long size);
-extern void lockdep_sys_exit(void);
+extern asmlinkage void lockdep_sys_exit(void);
extern void lockdep_off(void);
extern void lockdep_on(void);
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index eb8a547..c8b6753 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4191,7 +4191,7 @@ void debug_show_held_locks(struct task_struct *task)
}
EXPORT_SYMBOL_GPL(debug_show_held_locks);
-void lockdep_sys_exit(void)
+asmlinkage void lockdep_sys_exit(void)
{
struct task_struct *curr = current;
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: tools/liblockdep: Build failure
2014-04-01 6:04 tools/liblockdep: Build failure Eunbong Song
@ 2014-04-01 8:02 ` Robin Hack
2014-04-01 8:11 ` Robin Hack
0 siblings, 1 reply; 7+ messages in thread
From: Robin Hack @ 2014-04-01 8:02 UTC (permalink / raw)
To: Eunbong Song; +Cc: ak, sasha.levin, linux-kernel@vger.kernel.org
Hi.
I have same issue.
I investigated output of gcc -E and I found that asmlinkage macro isn't
expanded as is expected.
$ grep asmlinkage common.o
asmlinkage extern void lockdep_sys_exit(void);
On Tue, Apr 01, 2014 at 06:04:35AM +0000, Eunbong Song wrote:
>
> There is tools/liblockdep build failure.
> I have been trying to find the cause and i found commit id 63f9a7fde715352e0769302527670542a664b981 is the casue.
>
> Author: Andi Kleen <ak@linux.intel.com>
> Date: Sat Feb 8 08:52:01 2014 +0100
>
> asmlinkage: Make lockdep_sys_exit asmlinkage
>
> lockdep_sys_exit can be called from assembler code, so make it
> asmlinkage.
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> Link: http://lkml.kernel.org/r/1391845930-28580-5-git-send-email-ak@linux.intel.com
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
>
> diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
> index 92b1bfc..7df9aa6 100644
> --- a/include/linux/lockdep.h
> +++ b/include/linux/lockdep.h
> @@ -265,7 +265,7 @@ extern void lockdep_info(void);
> extern void lockdep_reset(void);
> extern void lockdep_reset_lock(struct lockdep_map *lock);
> extern void lockdep_free_key_range(void *start, unsigned long size);
> -extern void lockdep_sys_exit(void);
> +extern asmlinkage void lockdep_sys_exit(void);
>
> extern void lockdep_off(void);
> extern void lockdep_on(void);
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index eb8a547..c8b6753 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -4191,7 +4191,7 @@ void debug_show_held_locks(struct task_struct *task)
> }
> EXPORT_SYMBOL_GPL(debug_show_held_locks);
>
> -void lockdep_sys_exit(void)
> +asmlinkage void lockdep_sys_exit(void)
> {
> struct task_struct *curr = current;
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: tools/liblockdep: Build failure
2014-04-01 8:02 ` Robin Hack
@ 2014-04-01 8:11 ` Robin Hack
2014-04-01 10:21 ` [PATCH] " Robin Hack
0 siblings, 1 reply; 7+ messages in thread
From: Robin Hack @ 2014-04-01 8:11 UTC (permalink / raw)
To: Eunbong Song; +Cc: ak, sasha.levin, linux-kernel@vger.kernel.org
More investigation reveals this:
(from common.o which is output of gcc -E)
# 1 "./uinclude/linux/linkage.h" 1
pwd is: linux/tools/lib/lockdep
$ cat ./uinclude/linux/linkage.h
/* empty file */
Have nice day
Robin Hack
On Tue, Apr 01, 2014 at 10:02:58AM +0200, Robin Hack wrote:
> Hi.
>
> I have same issue.
>
> I investigated output of gcc -E and I found that asmlinkage macro isn't
> expanded as is expected.
>
> $ grep asmlinkage common.o
> asmlinkage extern void lockdep_sys_exit(void);
>
> On Tue, Apr 01, 2014 at 06:04:35AM +0000, Eunbong Song wrote:
> >
> > There is tools/liblockdep build failure.
> > I have been trying to find the cause and i found commit id 63f9a7fde715352e0769302527670542a664b981 is the casue.
> >
> > Author: Andi Kleen <ak@linux.intel.com>
> > Date: Sat Feb 8 08:52:01 2014 +0100
> >
> > asmlinkage: Make lockdep_sys_exit asmlinkage
> >
> > lockdep_sys_exit can be called from assembler code, so make it
> > asmlinkage.
> >
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> > Link: http://lkml.kernel.org/r/1391845930-28580-5-git-send-email-ak@linux.intel.com
> > Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
> >
> > diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
> > index 92b1bfc..7df9aa6 100644
> > --- a/include/linux/lockdep.h
> > +++ b/include/linux/lockdep.h
> > @@ -265,7 +265,7 @@ extern void lockdep_info(void);
> > extern void lockdep_reset(void);
> > extern void lockdep_reset_lock(struct lockdep_map *lock);
> > extern void lockdep_free_key_range(void *start, unsigned long size);
> > -extern void lockdep_sys_exit(void);
> > +extern asmlinkage void lockdep_sys_exit(void);
> >
> > extern void lockdep_off(void);
> > extern void lockdep_on(void);
> > diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> > index eb8a547..c8b6753 100644
> > --- a/kernel/locking/lockdep.c
> > +++ b/kernel/locking/lockdep.c
> > @@ -4191,7 +4191,7 @@ void debug_show_held_locks(struct task_struct *task)
> > }
> > EXPORT_SYMBOL_GPL(debug_show_held_locks);
> >
> > -void lockdep_sys_exit(void)
> > +asmlinkage void lockdep_sys_exit(void)
> > {
> > struct task_struct *curr = current;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH] Re: tools/liblockdep: Build failure
2014-04-01 8:11 ` Robin Hack
@ 2014-04-01 10:21 ` Robin Hack
2014-04-01 10:34 ` Robin Hack
2014-04-01 15:34 ` Andi Kleen
0 siblings, 2 replies; 7+ messages in thread
From: Robin Hack @ 2014-04-01 10:21 UTC (permalink / raw)
To: Eunbong Song; +Cc: ak, sasha.levin, linux-kernel@vger.kernel.org
From: Robin Hack <rhack@redhat.com>
Copy asmlinkage macro to lockdep/uinclude/linux/linkage.h.
diff --git a/tools/lib/lockdep/uinclude/linux/linkage.h b/tools/lib/lockdep/uinclude/linux/linkage.h
index fab00ff..6799a5b 100644
--- a/tools/lib/lockdep/uinclude/linux/linkage.h
+++ b/tools/lib/lockdep/uinclude/linux/linkage.h
@@ -1,3 +1,19 @@
+#ifndef _LOCKDEP_ULINKAGE_H
+#define _LOCKDEP_ULINKAGE_H
-/* empty file */
+#if GCC_VERSION >= 40600
+/*
+ * Tell the optimizer that something else uses this function or variable.
+ */
+#define __visible __attribute__((externally_visible))
+#else
+#define __visible
+#endif
+#define CPP_ASMLINKAGE __visible
+
+#ifndef asmlinkage
+#define asmlinkage CPP_ASMLINKAGE
+#endif
+
+#endif
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Re: tools/liblockdep: Build failure
2014-04-01 10:21 ` [PATCH] " Robin Hack
@ 2014-04-01 10:34 ` Robin Hack
2014-04-01 15:34 ` Andi Kleen
1 sibling, 0 replies; 7+ messages in thread
From: Robin Hack @ 2014-04-01 10:34 UTC (permalink / raw)
To: ak, sasha.levin, linux-kernel@vger.kernel.org
Patch is wrong.
On Tue, Apr 01, 2014 at 12:21:59PM +0200, Robin Hack wrote:
> From: Robin Hack <rhack@redhat.com>
> Copy asmlinkage macro to lockdep/uinclude/linux/linkage.h.
>
> diff --git a/tools/lib/lockdep/uinclude/linux/linkage.h b/tools/lib/lockdep/uinclude/linux/linkage.h
> index fab00ff..6799a5b 100644
> --- a/tools/lib/lockdep/uinclude/linux/linkage.h
> +++ b/tools/lib/lockdep/uinclude/linux/linkage.h
> @@ -1,3 +1,19 @@
> +#ifndef _LOCKDEP_ULINKAGE_H
> +#define _LOCKDEP_ULINKAGE_H
>
> -/* empty file */
> +#if GCC_VERSION >= 40600
> +/*
> + * Tell the optimizer that something else uses this function or variable.
> + */
> +#define __visible __attribute__((externally_visible))
> +#else
> +#define __visible
> +#endif
>
> +#define CPP_ASMLINKAGE __visible
> +
> +#ifndef asmlinkage
> +#define asmlinkage CPP_ASMLINKAGE
> +#endif
> +
> +#endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Re: tools/liblockdep: Build failure
2014-04-01 10:21 ` [PATCH] " Robin Hack
2014-04-01 10:34 ` Robin Hack
@ 2014-04-01 15:34 ` Andi Kleen
2014-04-01 15:47 ` Sasha Levin
1 sibling, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2014-04-01 15:34 UTC (permalink / raw)
To: Robin Hack; +Cc: Eunbong Song, sasha.levin, linux-kernel@vger.kernel.org
On Tue, Apr 01, 2014 at 12:21:59PM +0200, Robin Hack wrote:
> From: Robin Hack <rhack@redhat.com>
> Copy asmlinkage macro to lockdep/uinclude/linux/linkage.h.
You can just do
#define asmlinkage
#define __visible
for this case. don't need all the ifdefs or the attribute in the
userspace build.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-01 15:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-01 6:04 tools/liblockdep: Build failure Eunbong Song
2014-04-01 8:02 ` Robin Hack
2014-04-01 8:11 ` Robin Hack
2014-04-01 10:21 ` [PATCH] " Robin Hack
2014-04-01 10:34 ` Robin Hack
2014-04-01 15:34 ` Andi Kleen
2014-04-01 15:47 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox