Re: amd64/186291: Compilation fail when device pst in kernel config on amd64.

2014-02-06 Thread John Baldwin
On Friday, January 31, 2014 2:00:27 am Ivan Chetyrkin wrote:
 
 Number: 186291
 Category:   amd64
 Synopsis:   Compilation fail when device pst in kernel config on 
amd64.
 Confidential:   no
 Severity:   non-critical
 Priority:   low
 Responsible:freebsd-amd64
 State:  open
 Quarter:
 Keywords:   
 Date-Required:
 Class:  sw-bug
 Submitter-Id:   current-users
 Arrival-Date:   Fri Jan 31 07:10:00 UTC 2014
 Closed-Date:
 Last-Modified:
 Originator: Ivan Chetyrkin
 Release:10.0-STABLE
 Organization:
 Environment:
 FreeBSD v64.devel.local 10.0-STABLE FreeBSD 10.0-STABLE #0: Thu Jan 30 
21:31:03 UTC 2014 root@v64.devel.local:/usr/obj/usr/src/sys/VBOX64  amd64
 Description:
 When trying to compile my own kernel with device pst in configuration 
file, process fail with message:
 
 cc  -c -O2 -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -
Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-
include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-
error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I. -
I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -
D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-
pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-
red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -
ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/pst/pst-iop.c
 /usr/src/sys/dev/pst/pst-iop.c:197:3: error: cast to 'void (*)(struct 
iop_softc *, u_int32_t, struct i2o_single_reply *)' from smaller integer type 
'u_int32_t' (aka 'unsigned int')
   [-Werror,-Wint-to-pointer-cast]
 ((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply 
*))
  ^
 /usr/src/sys/dev/pst/pst-iop.c:419:9: error: cast to 'struct iop_request *' 
from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Werror,-Wint-to-
pointer-cast]
 (struct iop_request *)reply-transaction_context;
 ^
 2 errors generated.
 
 As we see from /usr/src/sys/dev/pst/pst-iop.h, initiator_context and 
transaction_context fields of driver message struct are declared as u_int32_t, 
which doesn't match pointer size on 64-bit processor.
 How-To-Repeat:
 On amd64 machine include
 device pst
 in your config file and try compile kernel.
 Fix:
 The controller is very old hardware and one of fix may be exclude it from 
available devices on amd64 platform.

Yes, this driver is not supported on amd64.  Do you need it to work?  You 
would need to implement a cookie hash table of some sort to map transaction 
context IDs to request pointers.  If you do not need it, we should probably
disable it on amd64 as no one else has asked about it.

-- 
John Baldwin
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org


Re: amd64/186291: Compilation fail when device pst in kernel config on amd64.

2014-02-06 Thread John Baldwin
The following reply was made to PR amd64/186291; it has been noted by GNATS.

From: John Baldwin j...@freebsd.org
To: freebsd-amd64@freebsd.org
Cc: Ivan Chetyrkin fr...@inbox.ru,
 freebsd-gnats-sub...@freebsd.org
Subject: Re: amd64/186291: Compilation fail when device pst in kernel config 
on amd64.
Date: Thu, 6 Feb 2014 13:22:52 -0500

 On Friday, January 31, 2014 2:00:27 am Ivan Chetyrkin wrote:
  
  Number: 186291
  Category:   amd64
  Synopsis:   Compilation fail when device pst in kernel config on 
 amd64.
  Confidential:   no
  Severity:   non-critical
  Priority:   low
  Responsible:freebsd-amd64
  State:  open
  Quarter:
  Keywords:   
  Date-Required:
  Class:  sw-bug
  Submitter-Id:   current-users
  Arrival-Date:   Fri Jan 31 07:10:00 UTC 2014
  Closed-Date:
  Last-Modified:
  Originator: Ivan Chetyrkin
  Release:10.0-STABLE
  Organization:
  Environment:
  FreeBSD v64.devel.local 10.0-STABLE FreeBSD 10.0-STABLE #0: Thu Jan 30 
 21:31:03 UTC 2014 root@v64.devel.local:/usr/obj/usr/src/sys/VBOX64  amd64
  Description:
  When trying to compile my own kernel with device pst in configuration 
 file, process fail with message:
  
  cc  -c -O2 -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -
 Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -
 Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-
 include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-
 error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I. -
 I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -
 D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-
 pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-
 red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -
 ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/pst/pst-iop.c
  /usr/src/sys/dev/pst/pst-iop.c:197:3: error: cast to 'void (*)(struct 
 iop_softc *, u_int32_t, struct i2o_single_reply *)' from smaller integer type 
 'u_int32_t' (aka 'unsigned int')
[-Werror,-Wint-to-pointer-cast]
  ((void (*)(struct iop_softc *, u_int32_t, struct i2o_single_reply 
 *))
   ^
  /usr/src/sys/dev/pst/pst-iop.c:419:9: error: cast to 'struct iop_request *' 
 from smaller integer type 'u_int32_t' (aka 'unsigned int') [-Werror,-Wint-to-
 pointer-cast]
  (struct iop_request *)reply-transaction_context;
  ^
  2 errors generated.
  
  As we see from /usr/src/sys/dev/pst/pst-iop.h, initiator_context and 
 transaction_context fields of driver message struct are declared as u_int32_t, 
 which doesn't match pointer size on 64-bit processor.
  How-To-Repeat:
  On amd64 machine include
  device pst
  in your config file and try compile kernel.
  Fix:
  The controller is very old hardware and one of fix may be exclude it from 
 available devices on amd64 platform.
 
 Yes, this driver is not supported on amd64.  Do you need it to work?  You 
 would need to implement a cookie hash table of some sort to map transaction 
 context IDs to request pointers.  If you do not need it, we should probably
 disable it on amd64 as no one else has asked about it.
 
 -- 
 John Baldwin
___
freebsd-amd64@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to freebsd-amd64-unsubscr...@freebsd.org