lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] GenWQE PCI support, health monitoring and recovery
From
Date
Am Dienstag, den 03.12.2013, 06:30 -0800 schrieb Greg KH:
> On Tue, Dec 03, 2013 at 02:35:17PM +0100, Frank Haverkamp wrote:
> > > > +/* common struct for chip image exchange */
> > > > +struct chip_bitstream {
> > > > + uint8_t __user *pdata; /* pointer to image data */
> > > > + int size; /* size of image file */
> > >
> > > I think this fails the 32/64bit issue, right?
> >
> > Yes. I replaced those by something like
> > __u32 data_addr;
> > I hope that is fixing the 32/64bit issue.
>
> No, not at all, how are you going to put a 64bit userspace pointer in
> there?
>

Ohh, sorry __u64 of course:

/* common struct for chip image exchange */
struct genwqe_bitstream {
__u64 data_addr; /* pointer to image data */
__u32 size; /* size of image file */
__u32 crc; /* crc of this image */
__u8 partition; /* '0', '1', or 'v' */
__u64 target_addr; /* starting address in Flash */
__u8 uid; /* 1=host/x=dram */

__u64 slu_id; /* informational/sim: SluID */
__u64 app_id; /* informational/sim: AppID */

__u16 retc; /* returned from processing */
__u16 attn; /* attention code from
processing */
__u32 progress; /* progress code from processing
*/
};

and than I do in my userspace application:

load.data_addr = (unsigned long)buf;

Is that ok, or must I consider more?

Regards

Frank




\
 
 \ /
  Last update: 2013-12-03 16:21    [W:0.077 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site