From: "Michel Dänzer" <michel@daenzer.net>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] agp/uninorth: Fix oops caused by flushing too much
Date: Tue, 08 Jun 2010 08:48:11 +0200 [thread overview]
Message-ID: <1275979691.3246.177.camel@thor.local> (raw)
In-Reply-To: <20100602053308.GA24509@drongo>
On Mit, 2010-06-02 at 15:33 +1000, Paul Mackerras wrote:=20
> This fixes a sporadic oops at boot on G5 Power Macs. The table_end
> variable has the address of the last byte of the table. Adding on
> PAGE_SIZE means we flush too much, and if the page after the table
> is not mapped for any reason, the kernel will oops. Instead we add
> on 1 because flush_dcache_range() interprets its second argument as
> the first byte past the range to be flushed.
>=20
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Michel D=C3=A4nzer <michel@daenzer.net>
Tested-by: Michel D=C3=A4nzer <michel@daenzer.net>
Thanks for the good catch, Paul.
> ---
>=20
> diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-=
agp.c
> index 6f48931..9aaa0eb 100644
> --- a/drivers/char/agp/uninorth-agp.c
> +++ b/drivers/char/agp/uninorth-agp.c
> @@ -413,7 +413,7 @@ static int uninorth_create_gatt_table(struct agp_brid=
ge_data *bridge)
> bridge->gatt_table_real =3D (u32 *) table;
> /* Need to clear out any dirty data still sitting in caches */
> flush_dcache_range((unsigned long)table,
> - (unsigned long)(table_end + PAGE_SIZE));
> + (unsigned long)table_end + 1);
> bridge->gatt_table =3D vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NC=
G);
> =20
> if (bridge->gatt_table =3D=3D NULL)
--=20
Earthling Michel D=C3=A4nzer | http://www.vmware.c=
om
Libre software enthusiast | Debian, X and DRI developer
prev parent reply other threads:[~2010-06-08 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 5:33 [PATCH] agp/uninorth: Fix oops caused by flushing too much Paul Mackerras
2010-06-08 6:48 ` Michel Dänzer [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=1275979691.3246.177.camel@thor.local \
--to=michel@daenzer.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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 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.