Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621268 > unrolled thread
| Started by | Sean Paul <seanpaul@chromium.org> |
|---|---|
| First post | 2017-04-11 15:40 +0200 |
| Last post | 2017-04-11 17:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] drm/udl: Fix unaligned memory access in udl_render_hline Sean Paul <seanpaul@chromium.org> - 2017-04-11 15:40 +0200
Re: [PATCH] drm/udl: Fix unaligned memory access in udl_render_hline Jonathan Neuschäfer <j.neuschaefer@gmx.net> - 2017-04-11 17:40 +0200
| From | Sean Paul <seanpaul@chromium.org> |
|---|---|
| Date | 2017-04-11 15:40 +0200 |
| Subject | Re: [PATCH] drm/udl: Fix unaligned memory access in udl_render_hline |
| Message-ID | <tv4bv-7C6-13@gated-at.bofh.it> |
On Fri, Apr 07, 2017 at 10:02:29PM +0200, Jonathan Neuschäfer wrote: > On SPARC, the udl driver filled my kernel log with these messages: > > [186668.910612] Kernel unaligned access at TPC[76609c] udl_render_hline+0x13c/0x3a0 > > Use put_unaligned_be16 to avoid them. On x86 this results in the same > code, but on SPARC the compiler emits two single-byte stores. > Pushed to drm-misc-fixes with Dave's IRC Ack. Thanks, Sean > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> > --- > drivers/gpu/drm/udl/udl_transfer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/udl/udl_transfer.c b/drivers/gpu/drm/udl/udl_transfer.c > index 917dcb978c2c..0c87b1ac6b68 100644 > --- a/drivers/gpu/drm/udl/udl_transfer.c > +++ b/drivers/gpu/drm/udl/udl_transfer.c > @@ -14,6 +14,7 @@ > #include <linux/slab.h> > #include <linux/fb.h> > #include <linux/prefetch.h> > +#include <asm/unaligned.h> > > #include <drm/drmP.h> > #include "udl_drv.h" > @@ -163,7 +164,7 @@ static void udl_compress_hline16( > const u8 *const start = pixel; > const uint16_t repeating_pixel_val16 = pixel_val16; > > - *(uint16_t *)cmd = cpu_to_be16(pixel_val16); > + put_unaligned_be16(pixel_val16, cmd); > > cmd += 2; > pixel += bpp; > -- > 2.11.0 -- Sean Paul, Software Engineer, Google / Chromium OS
[toc] | [next] | [standalone]
| From | Jonathan Neuschäfer <j.neuschaefer@gmx.net> |
|---|---|
| Date | 2017-04-11 17:40 +0200 |
| Message-ID | <tv63E-nH-15@gated-at.bofh.it> |
| In reply to | #1621268 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Apr 11, 2017 at 09:30:53AM -0400, Sean Paul wrote: > On Fri, Apr 07, 2017 at 10:02:29PM +0200, Jonathan Neuschäfer wrote: > > On SPARC, the udl driver filled my kernel log with these messages: > > > > [186668.910612] Kernel unaligned access at TPC[76609c] udl_render_hline+0x13c/0x3a0 > > > > Use put_unaligned_be16 to avoid them. On x86 this results in the same > > code, but on SPARC the compiler emits two single-byte stores. > > > > Pushed to drm-misc-fixes with Dave's IRC Ack. > > Thanks, > > Sean Thanks as well :-) Jonathan
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web