Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-29 Thread Andy Shevchenko
On Tue, 2018-01-23 at 10:32 +0200, Andy Shevchenko wrote: > On Mon, 2018-01-22 at 16:46 -0800, h...@zytor.com wrote: > > On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" > > wrote: > > > On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > > > >

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-29 Thread Andy Shevchenko
On Tue, 2018-01-23 at 10:32 +0200, Andy Shevchenko wrote: > On Mon, 2018-01-22 at 16:46 -0800, h...@zytor.com wrote: > > On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" > > wrote: > > > On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > > > > +build_mmio_read(readq, "q", unsigned long

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-23 Thread Andy Shevchenko
On Mon, 2018-01-22 at 16:46 -0800, h...@zytor.com wrote: > On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" com> wrote: > > On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > > > +build_mmio_read(readq, "q", unsigned long long, "=r", :"memory") > > >

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-23 Thread Andy Shevchenko
On Mon, 2018-01-22 at 16:46 -0800, h...@zytor.com wrote: > On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" com> wrote: > > On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > > > +build_mmio_read(readq, "q", unsigned long long, "=r", :"memory") > > > +build_mmio_read(__readq, "q",

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-22 Thread hpa
On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" wrote: >On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: >> Since non atomic readq() and writeq() were added some of the drivers >> would like to use it in a manner of: >> >>  #include >> ... >>  pr_debug("Debug

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-22 Thread hpa
On January 22, 2018 4:32:14 PM PST, "Mehta, Sohil" wrote: >On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: >> Since non atomic readq() and writeq() were added some of the drivers >> would like to use it in a manner of: >> >>  #include >> ... >>  pr_debug("Debug value of some

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-22 Thread Mehta, Sohil
On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > Since non atomic readq() and writeq() were added some of the drivers > would like to use it in a manner of: > >  #include > ... >  pr_debug("Debug value of some register: %016llx\n", readq(addr)); > > However, lo_hi_readq() always

Re: [PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-22 Thread Mehta, Sohil
On Fri, 2018-01-19 at 16:33 +0200, Andy Shevchenko wrote: > Since non atomic readq() and writeq() were added some of the drivers > would like to use it in a manner of: > >  #include > ... >  pr_debug("Debug value of some register: %016llx\n", readq(addr)); > > However, lo_hi_readq() always

[PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-19 Thread Andy Shevchenko
Since non atomic readq() and writeq() were added some of the drivers would like to use it in a manner of: #include ... pr_debug("Debug value of some register: %016llx\n", readq(addr)); However, lo_hi_readq() always returns __u64 data, while readq() on x86_64 defines it as unsigned long. and

[PATCH v1] x86/io: Define readq()/writeq() to use 64-bit type

2018-01-19 Thread Andy Shevchenko
Since non atomic readq() and writeq() were added some of the drivers would like to use it in a manner of: #include ... pr_debug("Debug value of some register: %016llx\n", readq(addr)); However, lo_hi_readq() always returns __u64 data, while readq() on x86_64 defines it as unsigned long. and