All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: mikey@neuling.org
Subject: Re: [V2] powerpc/signal: Add helper function to fetch quad word aligned pointer
Date: Tue, 21 Jul 2015 10:34:08 +0530	[thread overview]
Message-ID: <55ADD2C8.1060003@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150721013754.0C58A140DDA@ozlabs.org>

On 07/21/2015 07:07 AM, Michael Ellerman wrote:
> On Mon, 2015-20-07 at 02:58:43 UTC, Anshuman Khandual wrote:
>> This patch adds one helper function 'sigcontext_vmx_regs' which computes
>> quad word aligned pointer for 'vmx_reserve' array element in sigcontext
>> structure making the code more readable.
>>
>> diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
>> index c7c24d2..bb9c939 100644
>> --- a/arch/powerpc/kernel/signal_64.c
>> +++ b/arch/powerpc/kernel/signal_64.c
>> @@ -74,6 +74,16 @@ static const char fmt64[] = KERN_INFO \
>>  	"%s[%d]: bad frame in %s: %016lx nip %016lx lr %016lx\n";
>>  
>>  /*
>> + * This computes quad word aligned pointer for 'vmx_reserve' array element
>> + * which is used primarily in assigning to the preceding pointer 'v_regs'
>> + * in sigcontext structure.
> 
> How about:
> 
>   * This computes a quad word aligned pointer inside the vmx_reserve array
>   * element. For historical reasons sigcontext might not be quad word aligned,
>   * but the location we write the VMX regs to must be. See the comment in
>   * sigcontext for more detail.

Yeah, its way better. Thanks !

> 
> 
>> + */
>> +static elf_vrreg_t __user *sigcontext_vmx_regs(struct sigcontext __user *sc)
>> +{
>> +	return (elf_vrreg_t __user *) (((unsigned long)sc->vmx_reserve + 15) & ~0xful);
>> +}
> 
> This doesn't build for ppc64e_defconfig:

This time, I did build test for some of the configs but not the entire
comprehensive list. Sorry, missed this one though, will take care next
time around.

> 
>   arch/powerpc/kernel/signal_64.c:82:28: error: 'sigcontext_vmx_regs' defined but not used [-Werror=unused-function]
>    static elf_vrreg_t __user *sigcontext_vmx_regs(struct sigcontext __user *sc)
>                             ^
> 
> For now I'll just #ifdef it.
> 
> Please do a test build of ppc64e_defconfig in future.

  reply	other threads:[~2015-07-21  5:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20  2:58 [PATCH V2] powerpc/signal: Add helper function to fetch quad word aligned pointer Anshuman Khandual
2015-07-21  1:37 ` [V2] " Michael Ellerman
2015-07-21  5:04   ` Anshuman Khandual [this message]
2015-07-22  9:44 ` Michael Ellerman

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=55ADD2C8.1060003@linux.vnet.ibm.com \
    --to=khandual@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    /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.