Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   s390x: fix vtop for 1M pages (http://www.linux-archive.org/crash-utility/656454-s390x-fix-vtop-1m-pages.html)

Petr Tesarik 04-16-2012 08:31 AM

s390x: fix vtop for 1M pages
 
Hi Michael,

I'm not a z/Series guru, but it seems to me that the address should not be
returned directly, but rather assigned to the phys_addr output parameter.

Petr Tesarik
SUSE Linux
--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Michael Holzheu 04-16-2012 11:41 AM

s390x: fix vtop for 1M pages
 
Hi Petr,

On Mon, 2012-04-16 at 10:31 +0200, Petr Tesarik wrote:
> Hi Michael,
>
> I'm not a z/Series guru, but it seems to me that the address should not be
> returned directly, but rather assigned to the phys_addr output parameter.

The fix looks good, thanks! Dave could you please add the patch to the
next release?

Michael

> Petr Tesarik
> SUSE Linux
> differences between files attachment
> (s390x-fix-vtop-for-1M-pages.patch)
> Subject: [PATCH] s390x: fix vtop for 1M pages
>
> It seems to me that the address should not be returned directly,
> but rather assigned to the phys_addr output parameter.
>
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
>
> ---
> s390x.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> --- a/s390x.c
> +++ b/s390x.c
> @@ -614,9 +614,11 @@ int s390x_vtop(ulong table, ulong vaddr,
> }
>
> /* Check if this is a large page. */
> - if (entry & 0x400ULL)
> + if (entry & 0x400ULL) {
> /* Add the 1MB page offset and return the final value. */
> - return table + (vaddr & 0xfffffULL);
> + *phys_addr = table + (vaddr & 0xfffffULL);
> + return TRUE;
> + }
>
> /* Get the page table entry */
> entry = _kl_pg_table_deref_s390x(vaddr, entry & ~0x7ffULL);


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Dave Anderson 04-16-2012 03:03 PM

s390x: fix vtop for 1M pages
 
----- Original Message -----
> Hi Petr,
>
> On Mon, 2012-04-16 at 10:31 +0200, Petr Tesarik wrote:
> > Hi Michael,
> >
> > I'm not a z/Series guru, but it seems to me that the address should not be
> > returned directly, but rather assigned to the phys_addr output parameter.
>
> The fix looks good, thanks! Dave could you please add the patch to the
> next release?
>
> Michael

Queued for crash-6.0.6.

Thanks,
Dave


> > Petr Tesarik
> > SUSE Linux
> > differences between files attachment
> > (s390x-fix-vtop-for-1M-pages.patch)
> > Subject: [PATCH] s390x: fix vtop for 1M pages
> >
> > It seems to me that the address should not be returned directly,
> > but rather assigned to the phys_addr output parameter.
> >
> > Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
> >
> > ---
> > s390x.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > --- a/s390x.c
> > +++ b/s390x.c
> > @@ -614,9 +614,11 @@ int s390x_vtop(ulong table, ulong vaddr,
> > }
> >
> > /* Check if this is a large page. */
> > - if (entry & 0x400ULL)
> > + if (entry & 0x400ULL) {
> > /* Add the 1MB page offset and return the final value. */
> > - return table + (vaddr & 0xfffffULL);
> > + *phys_addr = table + (vaddr & 0xfffffULL);
> > + return TRUE;
> > + }
> >
> > /* Get the page table entry */
> > entry = _kl_pg_table_deref_s390x(vaddr, entry & ~0x7ffULL);
>
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 07:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.