* [Xenomai-core] rtdm over x86_64
@ 2007-02-03 13:13 Paul
2007-02-03 15:08 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Paul @ 2007-02-03 13:13 UTC (permalink / raw)
To: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
Hi Jan
Just a small patch to get the ball rolling with an x86_64 support..
The attached resolves a compile time warning of:
kernel/xenomai/skins/rtdm/core.c: In function ‘_rtdm_ioctl’:
kernel/xenomai/skins/rtdm/core.c:408: warning: comparison is always false due
to limited range of data type
Regards, Paul.
[-- Attachment #2: rtdm_skin.patch --]
[-- Type: text/x-diff, Size: 1244 bytes --]
Index: include/rtdm/rtdm.h
===================================================================
--- include/rtdm/rtdm.h (revision 2105)
+++ include/rtdm/rtdm.h (working copy)
@@ -248,7 +248,7 @@ int _rtdm_open (rtdm_user_info_t *
int _rtdm_socket (rtdm_user_info_t *user_info, int protocol_family,
int socket_type, int protocol);
int _rtdm_close (rtdm_user_info_t *user_info, int fd, int forced);
-int _rtdm_ioctl (rtdm_user_info_t *user_info, int fd, int request, ...);
+int _rtdm_ioctl (rtdm_user_info_t *user_info, int fd, unsigned int request, ...);
ssize_t _rtdm_read (rtdm_user_info_t *user_info, int fd, void *buf,
size_t nbyte);
ssize_t _rtdm_write (rtdm_user_info_t *user_info, int fd, const void *buf,
Index: ksrc/skins/rtdm/core.c
===================================================================
--- ksrc/skins/rtdm/core.c (revision 2105)
+++ ksrc/skins/rtdm/core.c (working copy)
@@ -393,7 +393,7 @@ do {
} while (0)
-int _rtdm_ioctl(rtdm_user_info_t *user_info, int fd, int request, ...)
+int _rtdm_ioctl(rtdm_user_info_t *user_info, int fd, unsigned int request, ...)
{
va_list args;
void *arg;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] rtdm over x86_64
2007-02-03 13:13 [Xenomai-core] rtdm over x86_64 Paul
@ 2007-02-03 15:08 ` Jan Kiszka
2007-02-03 15:18 ` Jan Kiszka
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-02-03 15:08 UTC (permalink / raw)
To: Paul; +Cc: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
Paul wrote:
> Hi Jan
>
> Just a small patch to get the ball rolling with an x86_64 support..
>
> The attached resolves a compile time warning of:
>
> kernel/xenomai/skins/rtdm/core.c: In function ‘_rtdm_ioctl’:
> kernel/xenomai/skins/rtdm/core.c:408: warning: comparison is always false due
> to limited range of data type
>
Yeah, when looking at this issue with 64-bit glasses, this urgently
needs fixing (I wonder why ia64 didn't stumble yet?).
Your patch points in the right direction, but it needs a bit fine-tuning
and also has to include the ioctl handlers of drivers. I will work out a
fix and inform you. I'll have to rely on your test lab. :)
But first I need some build environment. A quick shot ended here when
trying to configure a patch and prepared 2.6.19 kernel:
# make ARCH=x86_64 CC="gcc -m64" oldconfig
...
init/Kconfig:572: can't open file "arch/x86_64/xenomai/Kconfig"
Anyone any idea? Is something missing, or is the prepare script broken?
Jan
PS: Once we have in-tree RTDM services and drivers running, are you
interested in a RTnet excursion over x64? I should be able to make this
compile, but for testing...
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] rtdm over x86_64
2007-02-03 15:08 ` Jan Kiszka
@ 2007-02-03 15:18 ` Jan Kiszka
2007-02-03 15:45 ` Philippe Gerum
2007-02-03 23:32 ` Paul
2 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-02-03 15:18 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
Jan Kiszka wrote:
> But first I need some build environment. A quick shot ended here when
> trying to configure a patch and prepared 2.6.19 kernel:
>
> # make ARCH=x86_64 CC="gcc -m64" oldconfig
> ...
> init/Kconfig:572: can't open file "arch/x86_64/xenomai/Kconfig"
>
> Anyone any idea? Is something missing, or is the prepare script broken?
Obviously a missing commit. Philippe?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] rtdm over x86_64
2007-02-03 15:08 ` Jan Kiszka
2007-02-03 15:18 ` Jan Kiszka
@ 2007-02-03 15:45 ` Philippe Gerum
2007-02-03 17:51 ` Jan Kiszka
2007-02-03 23:32 ` Paul
2 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2007-02-03 15:45 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
On Sat, 2007-02-03 at 16:08 +0100, Jan Kiszka wrote:
> But first I need some build environment. A quick shot ended here when
> trying to configure a patch and prepared 2.6.19 kernel:
>
> # make ARCH=x86_64 CC="gcc -m64" oldconfig
> ...
> init/Kconfig:572: can't open file "arch/x86_64/xenomai/Kconfig"
>
> Anyone any idea? Is something missing, or is the prepare script broken?
It's a bit early for building the x86_64 stack; you may want to fix the
compilation issues over ppc64 or ia64. I'm working on the missing x86_64
bits (task switching and a few other details) before even starting to
fix the build issues.
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] rtdm over x86_64
2007-02-03 15:45 ` Philippe Gerum
@ 2007-02-03 17:51 ` Jan Kiszka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2007-02-03 17:51 UTC (permalink / raw)
To: rpm; +Cc: xenomai-core
[-- Attachment #1.1: Type: text/plain, Size: 1207 bytes --]
Philippe Gerum wrote:
> On Sat, 2007-02-03 at 16:08 +0100, Jan Kiszka wrote:
>
>> But first I need some build environment. A quick shot ended here when
>> trying to configure a patch and prepared 2.6.19 kernel:
>>
>> # make ARCH=x86_64 CC="gcc -m64" oldconfig
>> ...
>> init/Kconfig:572: can't open file "arch/x86_64/xenomai/Kconfig"
>>
>> Anyone any idea? Is something missing, or is the prepare script broken?
>
> It's a bit early for building the x86_64 stack; you may want to fix the
> compilation issues over ppc64 or ia64. I'm working on the missing x86_64
> bits (task switching and a few other details) before even starting to
> fix the build issues.
>
OK, I'm just lacking cross-compilers for other 64-bit archs.
Anyway, here is a first patch for the signedness/width issue of RTDM
IOCTLs. It unfortunately slightly breaks the driver API, but it looks
like it's required for 64-bit support (no IOCTL based on _IOR or _IOWR
should be accepted ATM).
Whoever has a full 64-bit environment is welcome to build and run this
(e.g. using xeno_timerbench). Feedback welcome. Will then commit this
chunk. Meanwhile I'm going to meditate about what to do /wrt 2.3...
Jan
[-- Attachment #1.2: rtdm-ioctl64-fix.patch --]
[-- Type: text/plain, Size: 5364 bytes --]
Index: include/rtdm/rtdm_driver.h
===================================================================
--- include/rtdm/rtdm_driver.h (Revision 2106)
+++ include/rtdm/rtdm_driver.h (Arbeitskopie)
@@ -198,7 +198,7 @@ typedef
typedef
int (*rtdm_ioctl_handler_t) (struct rtdm_dev_context *context,
rtdm_user_info_t *user_info,
- int request,
+ unsigned int request,
void *arg);
/**
Index: ksrc/skins/rtdm/core.c
===================================================================
--- ksrc/skins/rtdm/core.c (Revision 2106)
+++ ksrc/skins/rtdm/core.c (Arbeitskopie)
@@ -403,9 +403,9 @@ int _rtdm_ioctl(rtdm_user_info_t *user_i
arg = va_arg(args, void *);
va_end(args);
- MAJOR_FUNCTION_WRAPPER_TH(ioctl, request, arg);
+ MAJOR_FUNCTION_WRAPPER_TH(ioctl, (unsigned int)request, arg);
- if (unlikely(ret < 0) && request == RTIOC_DEVICE_INFO) {
+ if (unlikely(ret < 0) && (unsigned int)request == RTIOC_DEVICE_INFO) {
struct rtdm_device *dev = context->device;
struct rtdm_device_info dev_info;
Index: ksrc/drivers/serial/16550A.c
===================================================================
--- ksrc/drivers/serial/16550A.c (Revision 2106)
+++ ksrc/drivers/serial/16550A.c (Arbeitskopie)
@@ -550,7 +550,8 @@ int rt_16550_close(struct rtdm_dev_conte
int rt_16550_ioctl(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request, void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
struct rt_16550_context *ctx;
int err = 0;
Index: ksrc/drivers/can/rtcan_raw.c
===================================================================
--- ksrc/drivers/can/rtcan_raw.c (Revision 2106)
+++ ksrc/drivers/can/rtcan_raw.c (Arbeitskopie)
@@ -412,7 +412,8 @@ static int rtcan_raw_setsockopt(struct r
int rtcan_raw_ioctl(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request, void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
int ret = 0;
Index: ksrc/drivers/testing/timerbench.c
===================================================================
--- ksrc/drivers/testing/timerbench.c (Revision 2106)
+++ ksrc/drivers/testing/timerbench.c (Arbeitskopie)
@@ -234,7 +234,8 @@ int rt_tmbench_close(struct rtdm_dev_con
int rt_tmbench_ioctl_nrt(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request, void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
struct rt_tmbench_context *ctx;
int err = 0;
@@ -413,7 +414,8 @@ int rt_tmbench_ioctl_nrt(struct rtdm_dev
int rt_tmbench_ioctl_rt(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request, void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
struct rt_tmbench_context *ctx;
int err = 0;
Index: ksrc/drivers/testing/switchtest.c
===================================================================
--- ksrc/drivers/testing/switchtest.c (Revision 2106)
+++ ksrc/drivers/testing/switchtest.c (Arbeitskopie)
@@ -389,7 +389,7 @@ static int rtswitch_close(struct rtdm_de
static int rtswitch_ioctl_nrt(struct rtdm_dev_context *context,
rtdm_user_info_t *user_info,
- int request,
+ unsigned int request,
void *arg)
{
rtswitch_context_t *ctx = (rtswitch_context_t *) context->dev_private;
@@ -492,7 +492,7 @@ static int rtswitch_ioctl_nrt(struct rtd
static int rtswitch_ioctl_rt(struct rtdm_dev_context *context,
rtdm_user_info_t *user_info,
- int request,
+ unsigned int request,
void *arg)
{
rtswitch_context_t *ctx = (rtswitch_context_t *) context->dev_private;
Index: ksrc/drivers/testing/irqbench.c
===================================================================
--- ksrc/drivers/testing/irqbench.c (Revision 2106)
+++ ksrc/drivers/testing/irqbench.c (Arbeitskopie)
@@ -237,8 +237,8 @@ static int rt_irqbench_close(struct rtdm
}
static int rt_irqbench_ioctl_nrt(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request,
- void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
struct rt_irqbench_context *ctx;
struct rttst_irqbench_config config_buf;
@@ -435,8 +435,8 @@ static int rt_irqbench_ioctl_nrt(struct
}
static int rt_irqbench_ioctl_rt(struct rtdm_dev_context *context,
- rtdm_user_info_t *user_info, int request,
- void *arg)
+ rtdm_user_info_t *user_info,
+ unsigned int request, void *arg)
{
struct rt_irqbench_context *ctx;
int err = 0;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] rtdm over x86_64
2007-02-03 15:08 ` Jan Kiszka
2007-02-03 15:18 ` Jan Kiszka
2007-02-03 15:45 ` Philippe Gerum
@ 2007-02-03 23:32 ` Paul
2 siblings, 0 replies; 6+ messages in thread
From: Paul @ 2007-02-03 23:32 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
On Saturday 03 February 2007 15:08, Jan Kiszka wrote:
> Yeah, when looking at this issue with 64-bit glasses, this urgently
> needs fixing (I wonder why ia64 didn't stumble yet?).
Perhaps different compiler and/or warning flags ?
Using gcc-4.1 at the moment..
> init/Kconfig:572: can't open file "arch/x86_64/xenomai/Kconfig"
>
> Anyone any idea? Is something missing, or is the prepare script broken?
I must admit, saw the first of the commits announced on
http://cia.navi.cx/stats/project/xenomai and butchered a tree to see what
else was needed.. I'll wait for Philippe to finish his commits before
preempting him again.
> PS: Once we have in-tree RTDM services and drivers running, are you
> interested in a RTnet excursion over x64? I should be able to make this
> compile, but for testing...
RTnet across a local net and/or a machine in your lab via the internet - Could
be fun :)
If you have some ready to run code, I can set aside an afternoon to run some
tests - Perhaps even set up an ssh session so that you can monitor the
results.
Regards, Paul.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-02-03 23:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-03 13:13 [Xenomai-core] rtdm over x86_64 Paul
2007-02-03 15:08 ` Jan Kiszka
2007-02-03 15:18 ` Jan Kiszka
2007-02-03 15:45 ` Philippe Gerum
2007-02-03 17:51 ` Jan Kiszka
2007-02-03 23:32 ` Paul
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.