Re: [PATCH 4/8] asm-generic: io.h: remove wrong use of IOMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 01.02.21 09:57, Sascha Hauer wrote:
> On Fri, Jan 29, 2021 at 05:11:12PM +0100, Ahmad Fatoum wrote:
>> addr is already __iomem, but we need to force strip that away to use it
>> as normal pointer. Define __io_virt like Linux does and use it.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
>> ---
>>  include/asm-generic/io.h | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
>> index 150a97645b6b..a4b0dc4b4337 100644
>> --- a/include/asm-generic/io.h
>> +++ b/include/asm-generic/io.h
>> @@ -425,6 +425,8 @@ static inline void iowrite64be(u64 value, volatile void __iomem *addr)
>>  #define IOMEM(addr)	((void __force __iomem *)(addr))
>>  #endif
>>  
>> +#define __io_virt(x) ((void __force *)(x))
>> +
>>  #ifndef memset_io
>>  #define memset_io memset_io
>>  /**
>> @@ -438,7 +440,7 @@ static inline void iowrite64be(u64 value, volatile void __iomem *addr)
>>  static inline void memset_io(volatile void __iomem *addr, int value,
>>  			     size_t size)
>>  {
>> -	memset(IOMEM(addr), value, size);
>> +	memset(__io_virt(addr), value, size);
>>  }
> 
> Why did you add it differently than Linux in the first place?
> Should this be merged into 2/8?

Yes, please squash. I somehow thought I had added this earlier :D

Thanks,
Ahmad

> 
> Sascha
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux