在 2014/8/15 21:58, Peter Zijlstra 写道:
> On Fri, Aug 15, 2014 at 08:49:16PM +0800, Zhaoxiu Zeng wrote:
>> Because some architectures (alpha, armv6, etc.) don't provide hardware
>> division,
>> the mod operation is slow! Binary GCD algorithm uses simple arithmetic
>> operations,
>> it replaces divi
在 2015/12/7 19:08, Ohad Ben-Cohen 写道:
> Hi,
>
> On Sun, Dec 6, 2015 at 12:33 PM, Zhaoxiu Zeng wrote:
>>
>> From: Zeng Zhaoxiu
>>
>> Signed-off-by: Zeng Zhaoxiu
>
> Please explain why do you think we should make this change.
is_power_of_2 is simple, and faster than "hweightN(x) == 1" on most
On 2016/3/24 16:38, Denys Vlasenko wrote:
> On 03/24/2016 04:03 AM, Zhaoxiu Zeng wrote:
>> +/*
>> + * Type invariant interface to the compile time constant parity functions.
>> + */
>> +#define PARITY(w)PARITY64((u64)w)
>
> Can result in incorrect expansion of w. Should be PARITY64((u64)(w))
>
From: Zeng Zhaoxiu
Use the generic version.
Signed-off-by: Zeng Zhaoxiu
---
arch/arc/include/asm/bitops.h | 1 +
arch/arm/include/asm/bitops.h | 1 +
arch/arm64/include/asm/bitops.h| 1 +
arch/c6x/include/asm/bitops.h | 1 +
arch/cris/include/asm/bitops.h | 1 +
arch/frv
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/alpha/include/asm/bitops.h | 27 +++
1 file changed, 27 insertions(+)
diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h
index 4bdfbd4..95a43fa 100644
--- a/arch/alpha/include/asm/bitops
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/avr32/include/asm/bitops.h | 32
1 file changed, 32 insertions(+)
diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h
index 910d537..80d7005 100644
--- a/arch/avr32/include/asm/b
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/blackfin/include/asm/bitops.h | 31 +++
1 file changed, 31 insertions(+)
diff --git a/arch/blackfin/include/asm/bitops.h
b/arch/blackfin/include/asm/bitops.h
index b298b65..81b078a 100644
--- a/arch/blackfin/i
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/ia64/include/asm/bitops.h | 16
1 file changed, 16 insertions(+)
diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index 71e8145..de13d89 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/i
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/mips/include/asm/arch_parity.h | 44 +
arch/mips/include/asm/bitops.h | 3 +++
2 files changed, 47 insertions(+)
create mode 100644 arch/mips/include/asm/arch_parity.h
diff --git a/arch/mips/incl
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/tile/include/asm/bitops.h | 26 ++
1 file changed, 26 insertions(+)
diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h
index 20caa34..370d007 100644
--- a/arch/tile/include/asm/bitops.h
++
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/powerpc/include/asm/bitops.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/powerpc/include/asm/bitops.h
b/arch/powerpc/include/asm/bitops.h
index 59abc62..90ee0f2 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/sparc/include/asm/bitops_32.h | 1 +
arch/sparc/include/asm/bitops_64.h | 13 +
2 files changed, 14 insertions(+)
diff --git a/arch/sparc/include/asm/bitops_32.h
b/arch/sparc/include/asm/bitops_32.h
index 600ed1d..8c41896 10
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/x86/include/asm/bitops.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 7766d1c..d3210c0 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/inclu
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
net/sunrpc/auth_gss/gss_krb5_keys.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_krb5_keys.c
b/net/sunrpc/auth_gss/gss_krb5_keys.c
index 8701331..c41b389 100644
--- a/net/sunrpc/auth_gss/gss_
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
arch/mips/mm/cerr-sb1.c | 67 +
1 file changed, 17 insertions(+), 50 deletions(-)
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c
index ee5c1ff..2e7d660 100644
--- a/arch/mips/mm/c
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
lib/bch.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/lib/bch.c b/lib/bch.c
index bc89dfe4..6c6e8d4 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -278,18 +278,6 @@ static inline int deg(unsigned int poly)
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/media/platform/vivid/vivid-vbi-gen.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/media/platform/vivid/vivid-vbi-gen.c
b/drivers/media/platform/vivid/vivid-vbi-gen.c
index a2159de..d5ba0fc 100644
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/media/i2c/saa7115.c | 17 ++---
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index d2a1ce2..4c22df8 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/d
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/joystick/grip_mp.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c
index 573191d..3e29eb1 100644
--- a/drivers/input/joystick
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/joystick/sidewinder.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/input/joystick/sidewinder.c
b/drivers/input/joystick/sidewinder.c
index 4a95b22..7ea486e 100644
--- a/dri
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/serio/ams_delta_serio.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/input/serio/ams_delta_serio.c
b/drivers/input/serio/ams_delta_serio.c
index 45887e3..85459b3 100644
--- a/drivers/input/s
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/scsi/isci/phy.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index cb87b2e..0b87ff4 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isc
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/mtd/ssfdc.c | 20 ++--
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index daf82ba..b4d9144 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -182,24
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/mtd/inftlcore.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index b66b541..29567bb 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftl
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/crypto/qat/qat_common/qat_hal.c | 32 ++--
1 file changed, 10 insertions(+), 22 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/qat_hal.c
b/drivers/crypto/qat/qat_common/qat_hal.c
index 1e480f1..318
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/mtd/sm_ftl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index b096f8b..2244588 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -136,7 +136,7 @@ sta
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/net/ethernet/sun/niu.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 9cc4564..8c344ef 100644
--- a/drivers/net/ethernet/sun/niu.c
+++
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/serio/pcips2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
index e862c6e..a51e7f0 100644
--- a/drivers/input/serio/pcips2.c
+++ b/drivers/input/se
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/serio/saps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/serio/saps2.c b/drivers/input/serio/saps2.c
index b3e6889..324b193 100644
--- a/drivers/input/serio/saps2.c
+++ b/driv
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/iio/gyro/adxrs450.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
index a330d42..f1f19fc20 100644
--- a/drivers/iio/gyro/adxrs450.c
+++ b/drivers/ii
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/tty/serial/max3100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 5c4c280..a0cc84a 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/seri
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/input/mouse/elantech.c | 10 +++---
drivers/input/mouse/elantech.h | 1 -
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 78f93cf..778b5d1 100644
From: Zeng Zhaoxiu
Signed-off-by: Zeng Zhaoxiu
---
drivers/net/ethernet/broadcom/tg3.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c
b/drivers/net/ethernet/broadcom/tg3.c
index 3010080..802a429 100644
--- a/drivers/net/ethernet/bro
On 2016/3/27 6:08, Martin Kepplinger wrote:
> We do.
>
> Am 24. März 2016 23:28:15 MEZ, schrieb Andrew Morton
> :
>> On Thu, 24 Mar 2016 09:38:21 +0100 Denys Vlasenko
>> wrote:
>>
>>> On 03/24/2016 04:03 AM, Zhaoxiu Zeng wrote:
+/*
+ * Type invariant interface to the compile time const
On 2016/3/27 20:44, Sam Ravnborg wrote:
> Hi Zeng.
>
> Looking through the arch specific implementations of __arch_parity().
> Some architectures uses #defines, other uses inline static functions.
>
> Any particular reason that you select one approach over the other
> in the different cases?
>
>
35 matches
Mail list logo