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
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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to