From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/8] asm-generic: io.h: remove wrong use of IOMEM
Date: Mon, 1 Feb 2021 09:59:45 +0100 [thread overview]
Message-ID: <7de5ac0a-4e14-3f8c-12fc-f640e5ac6298@pengutronix.de> (raw)
In-Reply-To: <20210201085758.GM19583@pengutronix.de>
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@pengutronix.de>
>> ---
>> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-02-01 8:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 16:11 [PATCH 1/8] commands: usbgadget: remove deprecated s option from help text Ahmad Fatoum
2021-01-29 16:11 ` [PATCH 2/8] asm-generic: define fallback memcpy and memset for device I/O Ahmad Fatoum
2021-02-02 19:03 ` Sascha Hauer
2021-02-02 19:41 ` Ahmad Fatoum
2021-02-04 10:12 ` Sascha Hauer
2021-01-29 16:11 ` [PATCH 3/8] ARM: <asm/io.h>: define macros for I/O memcpy/memset Ahmad Fatoum
2021-01-29 16:11 ` [PATCH 4/8] asm-generic: io.h: remove wrong use of IOMEM Ahmad Fatoum
2021-02-01 8:57 ` Sascha Hauer
2021-02-01 8:59 ` Ahmad Fatoum [this message]
2021-01-29 16:11 ` [PATCH 5/8] ppc: <asm/io.h>: remove duplicate definition Ahmad Fatoum
2021-01-29 16:11 ` [PATCH 6/8] printk: port over Linux print_hex_dump_bytes/print_hex_dump_debug Ahmad Fatoum
2021-01-29 16:11 ` [PATCH 7/8] usb: add fallback ->detect method for USB host drivers Ahmad Fatoum
2021-01-29 16:11 ` [PATCH 8/8] usb: host: ehci: remove duplicated usb_host_detect() calls Ahmad Fatoum
2021-02-01 9:07 ` [PATCH 1/8] commands: usbgadget: remove deprecated s option from help text Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7de5ac0a-4e14-3f8c-12fc-f640e5ac6298@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sha@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox