16 Apr 2012 13:41
Re: Subject: [PATCH] s390x: fix vtop for 1M pages
Michael Holzheu <holzheu <at> linux.vnet.ibm.com>
2012-04-16 11:41:45 GMT
2012-04-16 11:41:45 GMT
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 <at> suse.cz>
>
> ---
> s390x.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> --- a/s390x.c
> +++ b/s390x.c
> <at> <at> -614,9 +614,11 <at> <at> 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);
RSS Feed