From: Stefani Seibold <stefani@seibold.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
ak@linux.intel.com, aarcange@redhat.com, john.stultz@linaro.org,
luto@amacapital.net, xemul@parallels.com, gorcunov@openvz.org,
andriy.shevchenko@linux.intel.com,
Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com
Subject: Re: [PATCH v16 0/10] Add 32 bit VDSO time function support
Date: Sat, 15 Feb 2014 15:33:21 +0100 [thread overview]
Message-ID: <1392474801.1585.8.camel@wall-e.seibold.net> (raw)
In-Reply-To: <52FE9993.8060109@zytor.com>
Am Freitag, den 14.02.2014, 14:32 -0800 schrieb H. Peter Anvin:
> I still get build errors.
>
Oops, i did it again...
> i386 allyesconfig, i386 allmodconfig as well as a more basic i386
> configuration:
>
> arch/x86/vdso/vdso32-int80.so.dbg: undefined symbols found
> make[4]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
>
The problem is the call of vget_cycles() in function vread_tsc().
vget_cycles() will access cpu_has_tsc which is a macro which access
boot_cpu_data, which is not available in a VDSO.
But i think it is save to replace the call by __native_read_tsc() and
skip the test of cpu_has_tsc, because vread_tsc() will be only invoked
when gtod->vclock_mode == VCLOCK_TSC. Since the kernel will set this
when the TSC is the current clock, the CPU must have a TSC.
There was also a issue with arch/x86/tools/relocs.c, the __vvar_page
must be outside the #if ELF_BITS == 64
So i tested it now with
make distclean
make ARCH=i386 allyesconfig
And it compiles a kernel without an error.
> x86-64 allyesconfig and x86-64 allmodconfig:
>
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:128:4: warning:
> symbol 'hpet_page' was not declared
> . Should it be static?
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:134:33:
> warning: incorrect type in argument 1 (diff
> erent address spaces)
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:134:33:
> expected void const volatile [noderef] <
> asn:2>*addr
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:134:33:
> got unsigned char [toplevel] *
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:294:13:
> warning: symbol '__vdso_clock_gettime' was
> not declared. Should it be static?
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:322:13:
> warning: symbol '__vdso_gettimeofday' was n
> ot declared. Should it be static?
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/../vclock_gettime.c:343:16:
> warning: symbol '__vdso_time' was not decla
> red. Should it be static?
> CC arch/x86/vdso/vdso32/vclock_gettime.o
> /home/hpa/kernel/distwork/arch/x86/vdso/vdso32/vclock_gettime.c:1:0:
> sorry, unimplemented: -mfentry isn’t supported fo
> r 32-bit in combination with -fpic
> #define BUILD_VDSO32
> ^
> make[4]: *** [arch/x86/vdso/vdso32/vclock_gettime.o] Error 1
> make[3]: *** [arch/x86/vdso] Error 2
> make[3]: *** Waiting for unfinished jobs....
>
> This is after I removed the incorrect "generated/" filename prefix in
> patch 9.
>
make distclean
make allyesconfig
Compiles without an error.
Why is the
#include <generated/asm/unistd_32_ia32.h>
incorrect?
The bit kernel syscall function numbers are needed in case build a 32
bit VDSO for a 64 bit kernel.
A quick "find . -name \*.c | xargs grep 'generated/'" in the kernel
sources showed up 38 includes of a generated header.
If it is incorrect to include a generated header why therefore are
generated? Only to waste disc space?
- Stefani
next prev parent reply other threads:[~2014-02-15 14:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 8:52 [PATCH v16 0/10] Add 32 bit VDSO time function support Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 01/10] Make vsyscall_gtod_data handling x86 generic Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 02/10] Add new func _install_special_mapping() to mmap.c Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 03/10] revamp vclock_gettime.c Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 04/10] vclock_gettime.c __vdso_clock_gettime cleanup Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 05/10] replace VVAR(vsyscall_gtod_data) by gtod macro Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 06/10] cleanup __vdso_gettimeofday Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 07/10] introduce VVAR marco for vdso32 Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 08/10] Add 32 bit VDSO time support for 32 bit kernel Stefani Seibold
2014-02-14 8:52 ` [PATCH v16 09/10] Add 32 bit VDSO time support for 64 " Stefani Seibold
2014-02-14 20:17 ` [PATCH v16 0/10] Add 32 bit VDSO time function support Andi Kleen
2014-02-14 22:32 ` H. Peter Anvin
2014-02-15 14:33 ` Stefani Seibold [this message]
2014-02-15 18:42 ` H. Peter Anvin
2014-02-14 22:40 ` Andy Lutomirski
2014-02-15 2:48 ` Greg KH
2014-02-15 15:05 ` Stefani Seibold
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=1392474801.1585.8.camel@wall-e.seibold.net \
--to=stefani@seibold.net \
--cc=Andreas.Brief@rohde-schwarz.com \
--cc=Martin.Runge@rohde-schwarz.com \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gorcunov@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xemul@parallels.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 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.