linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Dave Airlie <airlied@redhat.com>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.sf.net
Subject: Re: [PATCH] vt_buffer: drop console buffer copying optimisations
Date: Tue, 24 Feb 2015 17:49:15 +0100	[thread overview]
Message-ID: <20150224164914.GA6683@amd> (raw)
In-Reply-To: <1422504685-7864-1-git-send-email-airlied@redhat.com>

On Thu 2015-01-29 14:11:25, Dave Airlie wrote:
> These two copy to/from VGA memory, however on the Silicon
> Motion SMI750 VGA card on a 64-bit system cause console corruption.
> 
> This is due to the hw being buggy and not handling a 64-bit transaction
> correctly.
> 
> We could try and create a 32-bit version of these routines,
> but I'm not sure the optimisation is worth much today.
> 
> Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1132826
> 
> Tested-by: Huawei engineering.
> Signed-off-by: Dave Airlie <airlied@redhat.com>

Actually... are you sure this is right fix?

IOW can gcc do the optimalization behind your back and still break the
buggy card?
								Pavel

> diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h
> index 057db7d..f38c10b 100644
> --- a/include/linux/vt_buffer.h
> +++ b/include/linux/vt_buffer.h
> @@ -21,10 +21,6 @@
>  #ifndef VT_BUF_HAVE_RW
>  #define scr_writew(val, addr) (*(addr) = (val))
>  #define scr_readw(addr) (*(addr))
> -#define scr_memcpyw(d, s, c) memcpy(d, s, c)
> -#define scr_memmovew(d, s, c) memmove(d, s, c)
> -#define VT_BUF_HAVE_MEMCPYW
> -#define VT_BUF_HAVE_MEMMOVEW
>  #endif
>  
>  #ifndef VT_BUF_HAVE_MEMSETW

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      parent reply	other threads:[~2015-02-24 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29  4:11 [PATCH] vt_buffer: drop console buffer copying optimisations Dave Airlie
2015-01-29 12:06 ` Peter Hurley
2015-01-29 23:40 ` Linus Torvalds
2015-01-29 23:57   ` Greg Kroah-Hartman
2015-01-30  0:03     ` Linus Torvalds
2015-01-30  0:14       ` Dave Airlie
2015-02-03 15:54   ` One Thousand Gnomes
2015-02-05  9:01     ` Geert Uytterhoeven
2015-02-05 11:35       ` One Thousand Gnomes
2015-02-09 10:35         ` Daniel Stone
2015-02-09 10:49           ` Geert Uytterhoeven
2015-02-09 11:00             ` Daniel Stone
2015-02-09 20:17               ` One Thousand Gnomes
2015-02-24 16:49 ` Pavel Machek [this message]

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=20150224164914.GA6683@amd \
    --to=pavel@ucw.cz \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.sf.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).