qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 4/4] vga: compile cirrus_vga in hwlib
Date: Sun, 16 Oct 2011 19:09:52 +0200	[thread overview]
Message-ID: <4E9B0FE0.8090208@redhat.com> (raw)
In-Reply-To: <CAAu8pHvcbjVJ3JgAT6JoLvrq5XXFYGm=JoQ0KBqVYbqEDuteLg@mail.gmail.com>

On 10/16/2011 06:51 PM, Blue Swirl wrote:
> Remove target dependencies and compile Cirrus VGA in hwlib.
>
>
> +#define CIRRUS_PAGE_SIZE 4096
> +#define CIRRUS_PAGE_MASK (CIRRUS_PAGE_SIZE - 1)

This is inverted from TARGET_PAGE_MASK.

> +
>  #define BLTUNSAFE(s) \
>      ( \
>          ( /* check dst is within bounds */ \
> @@ -618,7 +621,7 @@ static void
> cirrus_invalidate_region(CirrusVGAState * s, int off_begin,
>      for (y = 0; y < lines; y++) {
>  	off_cur = off_begin;
>  	off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask;
> -	off_cur &= TARGET_PAGE_MASK;
> +        off_cur &= CIRRUS_PAGE_MASK;
>          memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - off_cur);
>  	off_begin += off_pitch;
>      }

You can just drop this masking (and CIRRUS_PAGE_SIZE), provided that
cpu_physical_memory_range_set_dirty() accepts unaligned addresses.

-- 
error compiling committee.c: too many arguments to function

      reply	other threads:[~2011-10-16 17:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 16:51 [Qemu-devel] [PATCH v2 4/4] vga: compile cirrus_vga in hwlib Blue Swirl
2011-10-16 17:09 ` Avi Kivity [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=4E9B0FE0.8090208@redhat.com \
    --to=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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).