Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513318 > unrolled thread
| Started by | Michal Marek <mmarek@suse.com> |
|---|---|
| First post | 2016-11-01 16:50 +0100 |
| Last post | 2016-11-02 13:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [GIT PULL] kbuild changes for v4.9-rc1 Michal Marek <mmarek@suse.com> - 2016-11-01 16:50 +0100
Re: [GIT PULL] kbuild changes for v4.9-rc1 Adam Borowski <kilobyte@angband.pl> - 2016-11-02 13:20 +0100
[PATCH] kbuild: provide include/asm/asm-prototypes.h for x86 Adam Borowski <kilobyte@angband.pl> - 2016-11-02 13:20 +0100
| From | Michal Marek <mmarek@suse.com> |
|---|---|
| Date | 2016-11-01 16:50 +0100 |
| Subject | Re: [GIT PULL] kbuild changes for v4.9-rc1 |
| Message-ID | <syJu2-26a-19@gated-at.bofh.it> |
On 2016-10-18 03:34, Nicholas Piggin wrote: > Hi Adam, > > Thanks, this is looking good. powerpc will be able to use the generic > header. > > On Tue, 18 Oct 2016 02:16:26 +0200 > Adam Borowski <kilobyte@angband.pl> wrote: > >> On Mon, Oct 17, 2016 at 02:22:34PM +0200, Mathieu OTHACEHE wrote: >>>> +#include <asm/uaccess.h> >>>> +#include <asm/uaccess.h> >>> >>> Included twice. >> >> D'oh! >> >>>> +#include <asm/string.h> >>>> +#include <asm/page.h> >>>> +#include <asm/checksum.h> >>>> + >>>> +#include <asm-generic/asm-prototypes.h> >>>> + >>>> +#include <asm/page.h> >>>> +#include <asm/pgtable.h> >>>> +#include <asm/special_insns.h> >>>> +#include <asm/preempt.h> >>> >>> No <asm/arch_hweight.h> for __sw_hweight32 and __sw_hweight64 ? >> >> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h >> new file mode 100644 >> index 0000000..df13637 >> --- /dev/null >> +++ b/include/asm-generic/asm-prototypes.h >> @@ -0,0 +1,7 @@ >> +#include <linux/bitops.h> >> >> ... which has these. >> >> Alexey Dobriyan <adobriyan@gmail.com> wrote: >> } bitops.h is wrong header as well. >> } Why do you need bitops for bunch of function prototypes? >> >> Unless you guys prefer using low-level headers only, that is. > > Well you can't use asm/arch_hweight.h in a generic header of course. > I would suggest just including linux/ variants where practical for > the asm-generic/asm-prototypes.h header. > > We should probably just bring all these arch patches through the > kbuild tree. Adam, are you submitting a new version of your x86 asm-prototypes.h patch? Thanks, Michal
[toc] | [next] | [standalone]
| From | Adam Borowski <kilobyte@angband.pl> |
|---|---|
| Date | 2016-11-02 13:20 +0100 |
| Message-ID | <sz2Gl-6dd-3@gated-at.bofh.it> |
| In reply to | #1513318 |
On Tue, Nov 01, 2016 at 04:48:48PM +0100, Michal Marek wrote:
> > Adam Borowski <kilobyte@angband.pl> wrote:
> >
> >> On Mon, Oct 17, 2016 at 02:22:34PM +0200, Mathieu OTHACEHE wrote:
> >>>> +#include <asm/uaccess.h>
> >>>> +#include <asm/uaccess.h>
> >>>
> >>> Included twice.
> >>
> >> D'oh!
This appears to be the only thing to fix, right?
> >>>> +#include <asm/string.h>
> >>>> +#include <asm/page.h>
> >>>> +#include <asm/checksum.h>
> >>>> +
> >>>> +#include <asm-generic/asm-prototypes.h>
> >>>> +
> >>>> +#include <asm/page.h>
> >>>> +#include <asm/pgtable.h>
> >>>> +#include <asm/special_insns.h>
> >>>> +#include <asm/preempt.h>
> >>>
> >>> No <asm/arch_hweight.h> for __sw_hweight32 and __sw_hweight64 ?
> >>
> >> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
> >> new file mode 100644
> >> index 0000000..df13637
> >> --- /dev/null
> >> +++ b/include/asm-generic/asm-prototypes.h
> >> @@ -0,0 +1,7 @@
> >> +#include <linux/bitops.h>
> >>
> >> ... which has these.
> >>
> >> Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >> } bitops.h is wrong header as well.
> >> } Why do you need bitops for bunch of function prototypes?
> >>
> >> Unless you guys prefer using low-level headers only, that is.
> >
> > Well you can't use asm/arch_hweight.h in a generic header of course.
> > I would suggest just including linux/ variants where practical for
> > the asm-generic/asm-prototypes.h header.
> >
> > We should probably just bring all these arch patches through the
> > kbuild tree.
I believe inclusion of <linux/bitops.h> is the right thing to do, but if
not, the patch would also need:
extern unsigned int __sw_hweight8(unsigned int w);
extern unsigned int __sw_hweight16(unsigned int w);
extern unsigned int __sw_hweight32(unsigned int w);
extern unsigned long __sw_hweight64(__u64 w);
There's also the issue of mcount/__fentry__, but that's apparently already
dealt with in 5de0a8c, already in mainline.
> are you submitting a new version of your x86 asm-prototypes.h patch?
The update is trivial, but yeah, I can resubmit. If I'm wrong about where
__sw_hweight{8,16,32,64} should come from, please say so.
Meow!
--
A MAP07 (Dead Simple) raspberry tincture recipe: 0.5l 95% alcohol, 1kg
raspberries, 0.4kg sugar; put into a big jar for 1 month. Filter out and
throw away the fruits (can dump them into a cake, etc), let the drink age
at least 3-6 months.
[toc] | [prev] | [next] | [standalone]
| From | Adam Borowski <kilobyte@angband.pl> |
|---|---|
| Date | 2016-11-02 13:20 +0100 |
| Subject | [PATCH] kbuild: provide include/asm/asm-prototypes.h for x86 |
| Message-ID | <sz2Gm-6dd-17@gated-at.bofh.it> |
| In reply to | #1513816 |
Nicholas Piggin wrote: > Architectures will need to have an include/asm/asm-prototypes.h that > defines or #include<>s C-style prototypes for exported asm functions. > We can do an asm-generic version for the common ones like memset so > there's not a lot of pointless duplication there. Signed-off-by: Adam Borowski <kilobyte@angband.pl> --- arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++ include/asm-generic/asm-prototypes.h | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 arch/x86/include/asm/asm-prototypes.h create mode 100644 include/asm-generic/asm-prototypes.h diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h new file mode 100644 index 0000000..ae87224 --- /dev/null +++ b/arch/x86/include/asm/asm-prototypes.h @@ -0,0 +1,12 @@ +#include <asm/ftrace.h> +#include <asm/uaccess.h> +#include <asm/string.h> +#include <asm/page.h> +#include <asm/checksum.h> + +#include <asm-generic/asm-prototypes.h> + +#include <asm/page.h> +#include <asm/pgtable.h> +#include <asm/special_insns.h> +#include <asm/preempt.h> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h new file mode 100644 index 0000000..df13637 --- /dev/null +++ b/include/asm-generic/asm-prototypes.h @@ -0,0 +1,7 @@ +#include <linux/bitops.h> +extern void *__memset(void *, int, __kernel_size_t); +extern void *__memcpy(void *, const void *, __kernel_size_t); +extern void *__memmove(void *, const void *, __kernel_size_t); +extern void *memset(void *, int, __kernel_size_t); +extern void *memcpy(void *, const void *, __kernel_size_t); +extern void *memmove(void *, const void *, __kernel_size_t); -- 2.10.2
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web