* [PATCH] arm64: add <asm/asm-prototypes.h>
@ 2018-12-12 12:22 Mark Rutland
2018-12-12 13:14 ` Will Deacon
2018-12-12 13:15 ` Robin Murphy
0 siblings, 2 replies; 5+ messages in thread
From: Mark Rutland @ 2018-12-12 12:22 UTC (permalink / raw)
To: will.deacon, linux-arm-kernel; +Cc: Mark Rutland
While we can export symbols from assembly files, CONFIG_MODVERIONS requires C
declarations of anyhting that's exported.
Let's account for this as other architectures do by placing these declarations
in <asm/asm-prototypes.h>, which kbuild will automatically use to generate
modversion information for assembly files.
Since we already define most prototypes in existing headers, we simply need to
include those headers in <asm/asm-prototypes.h>, and don't need to duplicate
these.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
arch/arm64/include/asm/asm-prototypes.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 arch/arm64/include/asm/asm-prototypes.h
Hi Will,
I believe this covers all assembly exports for an arm64 allmodconfig. My laptop
is rather slow at building all of that, so I can't confirm just yet, but I
thought it was better to send this out in the mean time (or in case you can
verify that locally).
Mark.
diff --git a/arch/arm64/include/asm/asm-prototypes.h b/arch/arm64/include/asm/asm-prototypes.h
new file mode 100644
index 000000000000..597434ea857d
--- /dev/null
+++ b/arch/arm64/include/asm/asm-prototypes.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_PROTOTYPES_H
+#define __ASM_PROTOTYPES_H
+/*
+ * CONFIG_MODEVERIONS requires a C declaration to generate the appropriate CRC
+ * for each symbol. Since commit:
+ *
+ * 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
+ *
+ * ... kbuild will automatically pick these up from <asm/asm-prototypes.h> and
+ * feed this to genksyms when building assembly files.
+ */
+#include <linux/arm-smccc.h>
+
+#include <asm/ftrace.h>
+#include <asm/string.h>
+#include <asm/uaccess.h>
+
+#include <asm-generic/asm-prototypes.h>
+
+long long __ashlti3(long long a, int b);
+long long __ashrti3(long long a, int b);
+long long __lshrti3(long long a, int b);
+
+#endif /* __ASM_PROTOTYPES_H */
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: add <asm/asm-prototypes.h>
2018-12-12 12:22 [PATCH] arm64: add <asm/asm-prototypes.h> Mark Rutland
@ 2018-12-12 13:14 ` Will Deacon
2018-12-12 13:15 ` Robin Murphy
1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2018-12-12 13:14 UTC (permalink / raw)
To: Mark Rutland; +Cc: linux-arm-kernel
On Wed, Dec 12, 2018 at 12:22:19PM +0000, Mark Rutland wrote:
> While we can export symbols from assembly files, CONFIG_MODVERIONS requires C
> declarations of anyhting that's exported.
>
> Let's account for this as other architectures do by placing these declarations
> in <asm/asm-prototypes.h>, which kbuild will automatically use to generate
> modversion information for assembly files.
>
> Since we already define most prototypes in existing headers, we simply need to
> include those headers in <asm/asm-prototypes.h>, and don't need to duplicate
> these.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/include/asm/asm-prototypes.h | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 arch/arm64/include/asm/asm-prototypes.h
>
> Hi Will,
>
> I believe this covers all assembly exports for an arm64 allmodconfig. My laptop
> is rather slow at building all of that, so I can't confirm just yet, but I
> thought it was better to send this out in the mean time (or in case you can
> verify that locally).
Thanks, this fixes the allmodconfig build issues for me. I'll try to push it
out later today.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: add <asm/asm-prototypes.h>
2018-12-12 12:22 [PATCH] arm64: add <asm/asm-prototypes.h> Mark Rutland
2018-12-12 13:14 ` Will Deacon
@ 2018-12-12 13:15 ` Robin Murphy
2018-12-12 13:29 ` Mark Rutland
1 sibling, 1 reply; 5+ messages in thread
From: Robin Murphy @ 2018-12-12 13:15 UTC (permalink / raw)
To: Mark Rutland, will.deacon, linux-arm-kernel
On 12/12/2018 12:22, Mark Rutland wrote:
> While we can export symbols from assembly files, CONFIG_MODVERIONS requires C
> declarations of anyhting that's exported.
>
> Let's account for this as other architectures do by placing these declarations
> in <asm/asm-prototypes.h>, which kbuild will automatically use to generate
> modversion information for assembly files.
>
> Since we already define most prototypes in existing headers, we simply need to
> include those headers in <asm/asm-prototypes.h>, and don't need to duplicate
> these.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/include/asm/asm-prototypes.h | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 arch/arm64/include/asm/asm-prototypes.h
>
> Hi Will,
>
> I believe this covers all assembly exports for an arm64 allmodconfig. My laptop
> is rather slow at building all of that, so I can't confirm just yet, but I
> thought it was better to send this out in the mean time (or in case you can
> verify that locally).
>
> Mark.
>
> diff --git a/arch/arm64/include/asm/asm-prototypes.h b/arch/arm64/include/asm/asm-prototypes.h
> new file mode 100644
> index 000000000000..597434ea857d
> --- /dev/null
> +++ b/arch/arm64/include/asm/asm-prototypes.h
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __ASM_PROTOTYPES_H
> +#define __ASM_PROTOTYPES_H
> +/*
> + * CONFIG_MODEVERIONS requires a C declaration to generate the appropriate CRC
> + * for each symbol. Since commit:
> + *
> + * 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
> + *
> + * ... kbuild will automatically pick these up from <asm/asm-prototypes.h> and
> + * feed this to genksyms when building assembly files.
> + */
> +#include <linux/arm-smccc.h>
> +
> +#include <asm/ftrace.h>
> +#include <asm/string.h>
This is virtually identical to what I came up with in parallel, except I
had <asm/page.h> here instead - I guess this still manages to pick up
clear_page and copy_page transitively (and mine got lucky for memcmp and
friends), but I guess it would be safer to explicitly add that as well.
With that change,
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
> +#include <asm/uaccess.h>
> +
> +#include <asm-generic/asm-prototypes.h>
> +
> +long long __ashlti3(long long a, int b);
> +long long __ashrti3(long long a, int b);
> +long long __lshrti3(long long a, int b);
> +
> +#endif /* __ASM_PROTOTYPES_H */
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: add <asm/asm-prototypes.h>
2018-12-12 13:15 ` Robin Murphy
@ 2018-12-12 13:29 ` Mark Rutland
2018-12-12 13:33 ` Will Deacon
0 siblings, 1 reply; 5+ messages in thread
From: Mark Rutland @ 2018-12-12 13:29 UTC (permalink / raw)
To: Robin Murphy; +Cc: will.deacon, linux-arm-kernel
On Wed, Dec 12, 2018 at 01:15:15PM +0000, Robin Murphy wrote:
> On 12/12/2018 12:22, Mark Rutland wrote:
> > While we can export symbols from assembly files, CONFIG_MODVERIONS requires C
> > declarations of anyhting that's exported.
> >
> > Let's account for this as other architectures do by placing these declarations
> > in <asm/asm-prototypes.h>, which kbuild will automatically use to generate
> > modversion information for assembly files.
> >
> > Since we already define most prototypes in existing headers, we simply need to
> > include those headers in <asm/asm-prototypes.h>, and don't need to duplicate
> > these.
> >
> > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> > ---
> > arch/arm64/include/asm/asm-prototypes.h | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> > create mode 100644 arch/arm64/include/asm/asm-prototypes.h
> >
> > Hi Will,
> >
> > I believe this covers all assembly exports for an arm64 allmodconfig. My laptop
> > is rather slow at building all of that, so I can't confirm just yet, but I
> > thought it was better to send this out in the mean time (or in case you can
> > verify that locally).
> >
> > Mark.
> >
> > diff --git a/arch/arm64/include/asm/asm-prototypes.h b/arch/arm64/include/asm/asm-prototypes.h
> > new file mode 100644
> > index 000000000000..597434ea857d
> > --- /dev/null
> > +++ b/arch/arm64/include/asm/asm-prototypes.h
> > @@ -0,0 +1,25 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#ifndef __ASM_PROTOTYPES_H
> > +#define __ASM_PROTOTYPES_H
> > +/*
> > + * CONFIG_MODEVERIONS requires a C declaration to generate the appropriate CRC
> > + * for each symbol. Since commit:
> > + *
> > + * 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
> > + *
> > + * ... kbuild will automatically pick these up from <asm/asm-prototypes.h> and
> > + * feed this to genksyms when building assembly files.
> > + */
> > +#include <linux/arm-smccc.h>
> > +
> > +#include <asm/ftrace.h>
> > +#include <asm/string.h>
>
> This is virtually identical to what I came up with in parallel, except I had
> <asm/page.h> here instead - I guess this still manages to pick up clear_page
> and copy_page transitively (and mine got lucky for memcmp and friends), but
> I guess it would be safer to explicitly add that as well.
Whoops, yes.
Will, are you happy to fold that in?
> With that change,
>
> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Thanks!
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: add <asm/asm-prototypes.h>
2018-12-12 13:29 ` Mark Rutland
@ 2018-12-12 13:33 ` Will Deacon
0 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2018-12-12 13:33 UTC (permalink / raw)
To: Mark Rutland; +Cc: Robin Murphy, linux-arm-kernel
On Wed, Dec 12, 2018 at 01:29:52PM +0000, Mark Rutland wrote:
> On Wed, Dec 12, 2018 at 01:15:15PM +0000, Robin Murphy wrote:
> > On 12/12/2018 12:22, Mark Rutland wrote:
> > > While we can export symbols from assembly files, CONFIG_MODVERIONS requires C
> > > declarations of anyhting that's exported.
> > >
> > > Let's account for this as other architectures do by placing these declarations
> > > in <asm/asm-prototypes.h>, which kbuild will automatically use to generate
> > > modversion information for assembly files.
> > >
> > > Since we already define most prototypes in existing headers, we simply need to
> > > include those headers in <asm/asm-prototypes.h>, and don't need to duplicate
> > > these.
> > >
> > > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> > > Cc: Will Deacon <will.deacon@arm.com>
> > > ---
> > > arch/arm64/include/asm/asm-prototypes.h | 25 +++++++++++++++++++++++++
> > > 1 file changed, 25 insertions(+)
> > > create mode 100644 arch/arm64/include/asm/asm-prototypes.h
> > >
> > > Hi Will,
> > >
> > > I believe this covers all assembly exports for an arm64 allmodconfig. My laptop
> > > is rather slow at building all of that, so I can't confirm just yet, but I
> > > thought it was better to send this out in the mean time (or in case you can
> > > verify that locally).
> > >
> > > Mark.
> > >
> > > diff --git a/arch/arm64/include/asm/asm-prototypes.h b/arch/arm64/include/asm/asm-prototypes.h
> > > new file mode 100644
> > > index 000000000000..597434ea857d
> > > --- /dev/null
> > > +++ b/arch/arm64/include/asm/asm-prototypes.h
> > > @@ -0,0 +1,25 @@
> > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > +#ifndef __ASM_PROTOTYPES_H
> > > +#define __ASM_PROTOTYPES_H
> > > +/*
> > > + * CONFIG_MODEVERIONS requires a C declaration to generate the appropriate CRC
> > > + * for each symbol. Since commit:
> > > + *
> > > + * 4efca4ed05cbdfd1 ("kbuild: modversions for EXPORT_SYMBOL() for asm")
> > > + *
> > > + * ... kbuild will automatically pick these up from <asm/asm-prototypes.h> and
> > > + * feed this to genksyms when building assembly files.
> > > + */
> > > +#include <linux/arm-smccc.h>
> > > +
> > > +#include <asm/ftrace.h>
> > > +#include <asm/string.h>
> >
> > This is virtually identical to what I came up with in parallel, except I had
> > <asm/page.h> here instead - I guess this still manages to pick up clear_page
> > and copy_page transitively (and mine got lucky for memcmp and friends), but
> > I guess it would be safer to explicitly add that as well.
>
> Whoops, yes.
>
> Will, are you happy to fold that in?
Sure, no problem.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-12 13:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-12 12:22 [PATCH] arm64: add <asm/asm-prototypes.h> Mark Rutland
2018-12-12 13:14 ` Will Deacon
2018-12-12 13:15 ` Robin Murphy
2018-12-12 13:29 ` Mark Rutland
2018-12-12 13:33 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox