All of lore.kernel.org
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions
Date: Fri, 08 Nov 2013 10:53:12 -0800	[thread overview]
Message-ID: <527D3318.2050003@codeaurora.org> (raw)
In-Reply-To: <20131108165223.GL16735@n2100.arm.linux.org.uk>

On 11/08/13 08:52, Russell King - ARM Linux wrote:
> On Fri, Nov 08, 2013 at 10:58:42AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 11:20 Thu 07 Nov     , Stephen Boyd wrote:
>>> @@ -381,6 +384,13 @@ static void __init cpuid_init_hwcaps(void)
>>>  		elf_hwcap |= HWCAP_IDIVT;
>>>  	}
>>>  
>>> +#ifdef CONFIG_THUMB2_KERNEL
>> if (IS_ENABLED(CONFIG_THUMB2_KERNEL) && elf_hwcap & HWCAP_IDIVT)
>>> +	if (elf_hwcap & HWCAP_IDIVT)
>>> +#else
>>> +	if (elf_hwcap & HWCAP_IDIVA)
>>> +#endif
> Take another look, and you'll see the change that you're suggesting is
> wrong.  Instead, the following may be a more reasonable suggestion as
> a suitable replacement:
>
> 	if (elf_hwcap & (IS_ENABLED(CONFIG_THUMB2_KERNEL) ?
> 				HWCAP_IDIVT : HWCAP_IDIVA))

I can use IS_ENABLED() but I'd prefer a local variable to make it
simpler in the conditional.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@codeaurora.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions
Date: Fri, 08 Nov 2013 10:53:12 -0800	[thread overview]
Message-ID: <527D3318.2050003@codeaurora.org> (raw)
In-Reply-To: <20131108165223.GL16735@n2100.arm.linux.org.uk>

On 11/08/13 08:52, Russell King - ARM Linux wrote:
> On Fri, Nov 08, 2013 at 10:58:42AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 11:20 Thu 07 Nov     , Stephen Boyd wrote:
>>> @@ -381,6 +384,13 @@ static void __init cpuid_init_hwcaps(void)
>>>  		elf_hwcap |= HWCAP_IDIVT;
>>>  	}
>>>  
>>> +#ifdef CONFIG_THUMB2_KERNEL
>> if (IS_ENABLED(CONFIG_THUMB2_KERNEL) && elf_hwcap & HWCAP_IDIVT)
>>> +	if (elf_hwcap & HWCAP_IDIVT)
>>> +#else
>>> +	if (elf_hwcap & HWCAP_IDIVA)
>>> +#endif
> Take another look, and you'll see the change that you're suggesting is
> wrong.  Instead, the following may be a more reasonable suggestion as
> a suitable replacement:
>
> 	if (elf_hwcap & (IS_ENABLED(CONFIG_THUMB2_KERNEL) ?
> 				HWCAP_IDIVT : HWCAP_IDIVA))

I can use IS_ENABLED() but I'd prefer a local variable to make it
simpler in the conditional.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation


  reply	other threads:[~2013-11-08 18:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 19:20 [PATCH] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Stephen Boyd
2013-11-07 19:20 ` Stephen Boyd
2013-11-08  1:34 ` Rob Herring
2013-11-08  1:34   ` Rob Herring
2013-11-08 11:50   ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08 11:50     ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08 16:54     ` Russell King - ARM Linux
2013-11-08 16:54       ` Russell King - ARM Linux
2013-11-08 18:51       ` Stephen Boyd
2013-11-08 18:51         ` Stephen Boyd
2013-11-08  9:58 ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08  9:58   ` Jean-Christophe PLAGNIOL-VILLARD
2013-11-08 16:52   ` Russell King - ARM Linux
2013-11-08 16:52     ` Russell King - ARM Linux
2013-11-08 18:53     ` Stephen Boyd [this message]
2013-11-08 18:53       ` Stephen Boyd
2013-11-08 16:48 ` Christopher Covington
2013-11-08 16:48   ` Christopher Covington
2013-11-08 18:51   ` Stephen Boyd
2013-11-08 18:51     ` Stephen Boyd
2013-11-08 17:02 ` Måns Rullgård
2013-11-08 17:02   ` Måns Rullgård
2013-11-08 19:04   ` Stephen Boyd
2013-11-08 19:04     ` Stephen Boyd

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=527D3318.2050003@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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.