From: Zhaoxiu Zeng
Signed-off-by: Zhaoxiu Zeng
---
arch/x86/include/asm/arch_parity.h | 60 ++
arch/x86/include/asm/bitops.h | 4 ++-
2 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644
From: Zhaoxiu Zeng
Signed-off-by: Zhaoxiu Zeng
---
arch/x86/include/asm/arch_parity.h | 60 ++
arch/x86/include/asm/bitops.h | 4 ++-
2 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 arch/x86/include/asm/arch_parity.h
diff --git
On Mon, May 16, 2016 at 12:22:05PM -0700, H. Peter Anvin wrote:
> On May 16, 2016 10:06:08 AM PDT, Peter Zijlstra wrote:
> >blergh; GCC does indeed make a mess of that. It looks we'll need the
> >cc-output stuff for this in order for GCC to generates sane code for
> >that
On Mon, May 16, 2016 at 12:22:05PM -0700, H. Peter Anvin wrote:
> On May 16, 2016 10:06:08 AM PDT, Peter Zijlstra wrote:
> >blergh; GCC does indeed make a mess of that. It looks we'll need the
> >cc-output stuff for this in order for GCC to generates sane code for
> >that :/
>
> For what it's
On May 16, 2016 10:06:08 AM PDT, Peter Zijlstra wrote:
>On Mon, May 16, 2016 at 11:49:05PM +0800, Zhaoxiu Zeng wrote:
>> On 2016/5/11 17:31, Peter Zijlstra wrote:
>> > Please use the GEN_*_RMWcc() stuff to avoid the setpo where
>possible.
>>
>> Setpo is better.
>> In most
On May 16, 2016 10:06:08 AM PDT, Peter Zijlstra wrote:
>On Mon, May 16, 2016 at 11:49:05PM +0800, Zhaoxiu Zeng wrote:
>> On 2016/5/11 17:31, Peter Zijlstra wrote:
>> > Please use the GEN_*_RMWcc() stuff to avoid the setpo where
>possible.
>>
>> Setpo is better.
>> In most cases, we need to store
On May 11, 2016 2:31:39 AM PDT, Peter Zijlstra wrote:
>On Wed, May 11, 2016 at 05:16:38PM +0800, zengzhao...@163.com wrote:
>
>> +static inline unsigned int __arch_parity4(unsigned int w)
>> +{
>> +unsigned int res = 0;
>> +
>> +asm("test $0xf, %1; setpo %b0"
>> +
On May 11, 2016 2:31:39 AM PDT, Peter Zijlstra wrote:
>On Wed, May 11, 2016 at 05:16:38PM +0800, zengzhao...@163.com wrote:
>
>> +static inline unsigned int __arch_parity4(unsigned int w)
>> +{
>> +unsigned int res = 0;
>> +
>> +asm("test $0xf, %1; setpo %b0"
>> +: "+q" (res)
On Mon, May 16, 2016 at 11:49:05PM +0800, Zhaoxiu Zeng wrote:
> On 2016/5/11 17:31, Peter Zijlstra wrote:
> > Please use the GEN_*_RMWcc() stuff to avoid the setpo where possible.
>
> Setpo is better.
> In most cases, we need to store the parity, or compare it with other
> variables.
>
> For
On Mon, May 16, 2016 at 11:49:05PM +0800, Zhaoxiu Zeng wrote:
> On 2016/5/11 17:31, Peter Zijlstra wrote:
> > Please use the GEN_*_RMWcc() stuff to avoid the setpo where possible.
>
> Setpo is better.
> In most cases, we need to store the parity, or compare it with other
> variables.
>
> For
On 2016/5/11 17:31, Peter Zijlstra wrote:
> Please use the GEN_*_RMWcc() stuff to avoid the setpo where possible.
Setpo is better.
In most cases, we need to store the parity, or compare it with other variables.
For example, in drivers/net/ethernet/broadcom/tg3.c,
static int
On 2016/5/11 17:31, Peter Zijlstra wrote:
> Please use the GEN_*_RMWcc() stuff to avoid the setpo where possible.
Setpo is better.
In most cases, we need to store the parity, or compare it with other variables.
For example, in drivers/net/ethernet/broadcom/tg3.c,
static int
On Wed, May 11, 2016 at 11:31:39AM +0200, Peter Zijlstra wrote:
> How many bytes does that end up being? Should we make it a call?
Those should call __arch_hweight* anyway - no need for the duplication
at all.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
On Wed, May 11, 2016 at 11:31:39AM +0200, Peter Zijlstra wrote:
> How many bytes does that end up being? Should we make it a call?
Those should call __arch_hweight* anyway - no need for the duplication
at all.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
On Wed, May 11, 2016 at 05:16:38PM +0800, zengzhao...@163.com wrote:
> +static inline unsigned int __arch_parity4(unsigned int w)
> +{
> + unsigned int res = 0;
> +
> + asm("test $0xf, %1; setpo %b0"
> + : "+q" (res)
> + : "r" (w)
> + : "cc");
> +
> +
On Wed, May 11, 2016 at 05:16:38PM +0800, zengzhao...@163.com wrote:
> +static inline unsigned int __arch_parity4(unsigned int w)
> +{
> + unsigned int res = 0;
> +
> + asm("test $0xf, %1; setpo %b0"
> + : "+q" (res)
> + : "r" (w)
> + : "cc");
> +
> +
From: Zhaoxiu Zeng
Use alternatives, lifted from arch_hweight
Signed-off-by: Zhaoxiu Zeng
---
arch/x86/include/asm/arch_hweight.h | 5 ++
arch/x86/include/asm/arch_parity.h | 117
From: Zhaoxiu Zeng
Use alternatives, lifted from arch_hweight
Signed-off-by: Zhaoxiu Zeng
---
arch/x86/include/asm/arch_hweight.h | 5 ++
arch/x86/include/asm/arch_parity.h | 117
arch/x86/include/asm/bitops.h | 4 +-
3 files changed, 125
18 matches
Mail list logo