Re: [PATCH] atomic64: No need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

2016-09-10 Thread kbuild test robot
Hi Vineet,

[auto build test ERROR on arm64/for-next/core]
[cannot apply to linus/master linux/master v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Vineet-Gupta/atomic64-No-need-for-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE/20160909-013936
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 
for-next/core
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   lib/atomic64_test.c: In function 'test_atomic64':
>> lib/atomic64_test.c:217:2: error: implicit declaration of function 
>> 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
 BUG_ON(atomic64_dec_if_positive() != (onestwos - 1));
 ^
   cc1: some warnings being treated as errors

vim +/atomic64_dec_if_positive +217 lib/atomic64_test.c

86a89380 Luca Barbieri 2010-02-24  211  INIT(v0);
9efbcd59 Luca Barbieri 2010-03-01  212  BUG_ON(!atomic64_add_unless(, 
one, v1));
86a89380 Luca Barbieri 2010-02-24  213  r += one;
86a89380 Luca Barbieri 2010-02-24  214  BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  215  
86a89380 Luca Barbieri 2010-02-24  216  INIT(onestwos);
86a89380 Luca Barbieri 2010-02-24 @217  
BUG_ON(atomic64_dec_if_positive() != (onestwos - 1));
86a89380 Luca Barbieri 2010-02-24  218  r -= one;
86a89380 Luca Barbieri 2010-02-24  219  BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  220  

:: The code at line 217 was first introduced by commit
:: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for 
atomic64_t

:: TO: Luca Barbieri 
:: CC: H. Peter Anvin 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] atomic64: No need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

2016-09-10 Thread kbuild test robot
Hi Vineet,

[auto build test ERROR on arm64/for-next/core]
[cannot apply to linus/master linux/master v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Vineet-Gupta/atomic64-No-need-for-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE/20160909-013936
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git 
for-next/core
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64 

All errors (new ones prefixed by >>):

   lib/atomic64_test.c: In function 'test_atomic64':
>> lib/atomic64_test.c:217:2: error: implicit declaration of function 
>> 'atomic64_dec_if_positive' [-Werror=implicit-function-declaration]
 BUG_ON(atomic64_dec_if_positive() != (onestwos - 1));
 ^
   cc1: some warnings being treated as errors

vim +/atomic64_dec_if_positive +217 lib/atomic64_test.c

86a89380 Luca Barbieri 2010-02-24  211  INIT(v0);
9efbcd59 Luca Barbieri 2010-03-01  212  BUG_ON(!atomic64_add_unless(, 
one, v1));
86a89380 Luca Barbieri 2010-02-24  213  r += one;
86a89380 Luca Barbieri 2010-02-24  214  BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  215  
86a89380 Luca Barbieri 2010-02-24  216  INIT(onestwos);
86a89380 Luca Barbieri 2010-02-24 @217  
BUG_ON(atomic64_dec_if_positive() != (onestwos - 1));
86a89380 Luca Barbieri 2010-02-24  218  r -= one;
86a89380 Luca Barbieri 2010-02-24  219  BUG_ON(v.counter != r);
86a89380 Luca Barbieri 2010-02-24  220  

:: The code at line 217 was first introduced by commit
:: 86a8938078a8bb518c5376de493e348c7490d506 lib: Add self-test for 
atomic64_t

:: TO: Luca Barbieri 
:: CC: H. Peter Anvin 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] atomic64: No need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

2016-09-08 Thread Peter Zijlstra
On Thu, Sep 08, 2016 at 09:28:18AM -0700, Vineet Gupta wrote:
> This came to light when implementing native 64-bit atomics for ARCv2.
> 
> The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> to check whether atomic64_dec_if_positive() is available.
> It seems it was needed when not every arch defined it.
> However as of current code the Kconfig option seems needless
> 
> - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a
>   generic definition of API is present lib/atomic64.c
> - arches with native 64-bit atomics select it in arch/*/Kconfig and
>   define the API in their headers
> 
> So I see no point in keeping the Kconfig option
> 
> Compile tested for 2 representatives:
>  - blackfin (CONFIG_GENERIC_ATOMIC64)
>  - x86 (!CONFIG_GENERIC_ATOMIC64)
> 
> Also logistics wise it seemed simpler to just do this in 1 patch vs.
> splitting per arch - but I can break it up if maintainer feel that
> is better to avoid conflicts.

Works for me; you want me to take this, or do you need it for you ARCv2
patches?


Re: [PATCH] atomic64: No need for CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

2016-09-08 Thread Peter Zijlstra
On Thu, Sep 08, 2016 at 09:28:18AM -0700, Vineet Gupta wrote:
> This came to light when implementing native 64-bit atomics for ARCv2.
> 
> The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> to check whether atomic64_dec_if_positive() is available.
> It seems it was needed when not every arch defined it.
> However as of current code the Kconfig option seems needless
> 
> - for CONFIG_GENERIC_ATOMIC64 it is auto-enabled in lib/Kconfig and a
>   generic definition of API is present lib/atomic64.c
> - arches with native 64-bit atomics select it in arch/*/Kconfig and
>   define the API in their headers
> 
> So I see no point in keeping the Kconfig option
> 
> Compile tested for 2 representatives:
>  - blackfin (CONFIG_GENERIC_ATOMIC64)
>  - x86 (!CONFIG_GENERIC_ATOMIC64)
> 
> Also logistics wise it seemed simpler to just do this in 1 patch vs.
> splitting per arch - but I can break it up if maintainer feel that
> is better to avoid conflicts.

Works for me; you want me to take this, or do you need it for you ARCv2
patches?