From: Akinobu Mita <akinobu.mita@gmail.com>
To: GuanXuetao <gxt@mprc.pku.edu.cn>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, greg@kroah.com
Subject: Re: [PATCH] unicore32: fix build error for find bitops
Date: Thu, 9 Jun 2011 23:05:10 +0900 [thread overview]
Message-ID: <BANLkTimWYjzxhQBH2A76D590KBfjKbguTA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikNC8uh-X_0iJZH3tYd_kf46W1Rwg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
2011/6/9 Akinobu Mita <akinobu.mita@gmail.com>:
> 2011/6/9 GuanXuetao <gxt@mprc.pku.edu.cn>:
>> From: Guan Xuetao <gxt@mprc.pku.edu.cn>
>>
>> Remove the __uc32_ prefix in find bitops functions.
>> see commit <19de85ef574c3a2182e3ccad9581805052f14946>
>> bitops: add #ifndef for each of find bitops
>>
>> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
>> Cc: Akinobu Mita <akinobu.mita@gmail.com>
>> ---
>> arch/unicore32/include/asm/bitops.h | 6 ------
>> arch/unicore32/kernel/ksyms.c | 4 ++--
>> arch/unicore32/lib/findbit.S | 14 ++++++++------
>> 3 files changed, 10 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/unicore32/include/asm/bitops.h b/arch/unicore32/include/asm/bitops.h
>> index 1628a63..a9653f0 100644
>> --- a/arch/unicore32/include/asm/bitops.h
>> +++ b/arch/unicore32/include/asm/bitops.h
>> @@ -13,12 +13,6 @@
>> #ifndef __UNICORE_BITOPS_H__
>> #define __UNICORE_BITOPS_H__
>>
>> -#define find_next_bit __uc32_find_next_bit
>> -#define find_next_zero_bit __uc32_find_next_zero_bit
>> -
>> -#define find_first_bit __uc32_find_first_bit
>> -#define find_first_zero_bit __uc32_find_first_zero_bit
>> -
>
> Is this patch really fix the build error?
>
> If these find_*_bit macros are removed, vmlinux will have multiple
> definisions of find_*_bit. Because lib/find_next_bit.c is built
> unconditionally after the commit 63e424c84429903c92a0f1e9654c31ccaf6694d0
> ("arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT}".
The attached patch hopefully fix the build error but it is untested
because I can't find crosstool for unicore32. So could you apply
this patch on top of your patch and check whether it fixes?
[-- Attachment #2: 0001-unicore32-fix-build-error-for-find-bitops.patch --]
[-- Type: text/x-diff, Size: 1695 bytes --]
From 133331e9314388e78619ed77cc62f6ad04233299 Mon Sep 17 00:00:00 2001
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Thu, 9 Jun 2011 22:28:37 +0900
Subject: [PATCH] unicore32: fix build error for find bitops
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
arch/unicore32/include/asm/bitops.h | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/arch/unicore32/include/asm/bitops.h b/arch/unicore32/include/asm/bitops.h
index a9653f0..fb8a29c 100644
--- a/arch/unicore32/include/asm/bitops.h
+++ b/arch/unicore32/include/asm/bitops.h
@@ -17,6 +17,7 @@
#define _ASM_GENERIC_BITOPS___FLS_H_
#define _ASM_GENERIC_BITOPS_FFS_H_
#define _ASM_GENERIC_BITOPS___FFS_H_
+#define _ASM_GENERIC_BITOPS_FIND_H_
/*
* On UNICORE, those functions can be implemented around
* the cntlz instruction for much better code efficiency.
@@ -36,6 +37,22 @@ static inline int fls(int x)
#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
#define __ffs(x) (ffs(x) - 1)
+extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
+ size, unsigned long offset);
+#define find_next_bit find_next_bit
+
+extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
+ long size, unsigned long offset);
+#define find_next_zero_bit find_next_zero_bit
+
+extern unsigned long find_first_bit(const unsigned long *addr,
+ unsigned long size);
+#define find_first_bit find_first_bit
+
+extern unsigned long find_first_zero_bit(const unsigned long *addr,
+ unsigned long size);
+#define find_first_zero_bit find_first_zero_bit
+
#include <asm-generic/bitops.h>
#endif /* __UNICORE_BITOPS_H__ */
--
1.7.4.4
next prev parent reply other threads:[~2011-06-09 14:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 11:09 [PATCH] unicore32: fix build error for find bitops GuanXuetao
2011-06-09 11:09 ` GuanXuetao
2011-06-09 11:32 ` Akinobu Mita
2011-06-09 14:05 ` Akinobu Mita [this message]
2011-06-10 3:16 ` Guan Xuetao
2011-06-10 4:22 ` Akinobu Mita
2011-06-13 8:57 ` Guan Xuetao
2011-06-13 8:57 ` Guan Xuetao
2011-06-13 9:33 ` Akinobu Mita
2011-06-13 10:22 ` Guan Xuetao
2011-06-13 11:32 ` Akinobu Mita
2011-06-10 3:13 ` Guan Xuetao
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=BANLkTimWYjzxhQBH2A76D590KBfjKbguTA@mail.gmail.com \
--to=akinobu.mita@gmail.com \
--cc=arnd@arndb.de \
--cc=greg@kroah.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox