From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org, Jyri Sarha <jyri.sarha@iki.fi>
Subject: Re: [PATCH 12/21] drm/tilcdc: Allow build without __iowmb()
Date: Wed, 10 Apr 2024 18:25:17 +0300 [thread overview]
Message-ID: <ZhavXcFrgzw5UApH@intel.com> (raw)
In-Reply-To: <b944eacf-e284-42ad-aeb6-e7aeb1aa01c1@ideasonboard.com>
On Wed, Apr 10, 2024 at 12:06:29PM +0300, Tomi Valkeinen wrote:
> On 08/04/2024 20:04, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > __iowmb() isn't available on most architectures. Make
> > its use optional so that the driver can be built on
> > other architectures with COMPILE_TEST=y.
> >
> > Cc: Jyri Sarha <jyri.sarha@iki.fi>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> > index f90e2dc3457c..44e4ada30fba 100644
> > --- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> > +++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h
> > @@ -125,7 +125,9 @@ static inline void tilcdc_write64(struct drm_device *dev, u32 reg, u64 data)
> > #if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
> > iowrite64(data, addr);
> > #else
> > +#ifdef __iowmb
> > __iowmb();
> > +#endif
> > /* This compiles to strd (=64-bit write) on ARM7 */
> > *(volatile u64 __force *)addr = __cpu_to_le64(data);
> > #endif
>
> As the memory barrier is an important part there, would it be better to
> ifdef based on COMPILE_TEST, to make it clear why it's being done?
I can do that if you prefer.
I suppose the real question is why iowrite64() doesn't work
if a hand rolled version does work?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-04-10 15:25 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 17:04 [PATCH 00/21] drm: Increase COMPILE_TEST=y coverage Ville Syrjala
2024-04-08 17:04 ` [PATCH 01/21] drm/armada: Fix printk arguments Ville Syrjala
2024-04-08 17:04 ` [PATCH 02/21] drm/armada: Fix armada_debugfs_crtc_reg_write() return type Ville Syrjala
2024-04-08 17:04 ` [PATCH 03/21] drm/armada: Allow build with COMPILE_TEST=y Ville Syrjala
2024-04-08 17:04 ` [PATCH 04/21] drm/imx/dcss: Fix 64bit divisions Ville Syrjala
2024-04-08 17:04 ` [PATCH 05/21] drm/imx/dcss: Allow build with COMPILE_TEST=y Ville Syrjala
2024-04-08 17:04 ` [PATCH 06/21] drm/sti: Include linux/io.h for devm_ioremap() Ville Syrjala
2024-05-27 15:28 ` Alain Volmat
2024-04-08 17:04 ` [PATCH 07/21] drm/sti: Allow build with COMPILE_TEST=y Ville Syrjala
2024-05-27 15:29 ` Alain Volmat
2024-05-28 19:45 ` Ville Syrjälä
2024-04-08 17:04 ` [PATCH 08/21] drm/hisilicon/kirin: Include linux/io.h for readl()/writel() Ville Syrjala
2024-04-08 17:08 ` John Stultz
2024-04-08 17:04 ` [PATCH 09/21] drm/hisilicon/kirin: Fix 64bit divisions Ville Syrjala
2024-04-08 17:09 ` John Stultz
2024-04-08 17:04 ` [PATCH 10/21] drm/hisilicon/kirin: Fix MASK(32) on 32bit architectures Ville Syrjala
2024-04-08 17:09 ` John Stultz
2024-04-08 17:04 ` [PATCH 11/21] drm/hisilicon/kirin: Allow build with COMPILE_TEST=y Ville Syrjala
2024-04-08 17:11 ` John Stultz
2024-04-08 17:04 ` [PATCH 12/21] drm/tilcdc: Allow build without __iowmb() Ville Syrjala
2024-04-10 9:06 ` Tomi Valkeinen
2024-04-10 15:25 ` Ville Syrjälä [this message]
2024-04-10 15:47 ` Tomi Valkeinen
2024-04-10 17:04 ` Ville Syrjälä
2024-04-10 17:12 ` Tomi Valkeinen
2024-04-11 13:40 ` jyri.sarha
2024-04-08 17:04 ` [PATCH 13/21] drm/tilcdc: Allow build with COMPILE_TEST=y Ville Syrjala
2024-04-10 9:06 ` Tomi Valkeinen
2024-04-08 17:04 ` [PATCH 14/21] drm/omap: Open code phys_to_page() Ville Syrjala
2024-04-10 9:14 ` Tomi Valkeinen
2024-04-08 17:04 ` [PATCH 15/21] drm/omap: Allow build with COMPILE_TEST=y Ville Syrjala
2024-04-08 17:12 ` Ville Syrjälä
2024-04-10 9:15 ` Tomi Valkeinen
2024-04-08 17:04 ` [PATCH 16/21] drm/atmel-hlcdc: " Ville Syrjala
2024-04-09 16:55 ` Sam Ravnborg
2024-04-08 17:04 ` [PATCH 17/21] drm/fsl-dcu: " Ville Syrjala
2024-04-08 17:04 ` [PATCH 18/21] drm/mediatek: " Ville Syrjala
2024-04-08 17:04 ` [PATCH 19/21] drm/meson: " Ville Syrjala
2024-04-08 17:04 ` Ville Syrjala
2024-04-08 17:23 ` Martin Blumenstingl
2024-04-08 17:23 ` Martin Blumenstingl
2024-04-08 17:04 ` [PATCH 20/21] drm/rcar-du: " Ville Syrjala
2024-04-09 7:26 ` Geert Uytterhoeven
2024-04-10 22:36 ` Laurent Pinchart
2024-04-08 17:04 ` [PATCH 21/21] drm/stm: " Ville Syrjala
2024-04-10 12:15 ` Raphael Gallais-Pou
2024-04-10 6:07 ` [PATCH 12/21] drm/tilcdc: Allow build without __iowmb() sarha
2024-04-10 6:07 ` [PATCH 13/21] drm/tilcdc: Allow build with COMPILE_TEST=y sarha
2024-05-08 19:40 ` [PATCH 00/21] drm: Increase COMPILE_TEST=y coverage Ville Syrjälä
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=ZhavXcFrgzw5UApH@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jyri.sarha@iki.fi \
--cc=tomi.valkeinen@ideasonboard.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.