mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	chenhc@lemote.com, jiaxun.yang@flygoat.com,
	tsbogend@alpha.franken.de, linux-mips@vger.kernel.org
Subject: Re: include/linux/sched/topology.h:237:9: error: implicit declaration of function 'cpu_logical_map'
Date: Mon, 17 Aug 2020 14:18:05 +0100	[thread overview]
Message-ID: <84239ee9-3f87-b254-29ad-ec8cc12d0190@arm.com> (raw)
In-Reply-To: <1bc8f16a-004b-0352-6675-2c1edeeb9823@arm.com>


Adding on CC MIPS list and maintainers.

On 8/17/20 10:03 AM, Lukasz Luba wrote:
> 
> 
> On 8/16/20 11:43 PM, kernel test robot wrote:
>> Hi Lukasz,
>>
>> FYI, the error/warning still remains.
>>
>> tree:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
>> commit: 1bc138c622959979eb547be2d3bbc6442a5c80b0 PM / EM: add support 
>> for other devices than CPUs in Energy Model
>> date:   8 weeks ago
>> config: mips-randconfig-r001-20200817 (attached as .config)
>> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
>> ab9fc8bae805c785066779e76e7846aabad5609e)
>> reproduce (this is a W=1 build):
>>          wget 
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross 
>> -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # install mips cross compiling tool for clang build
>>          # apt-get install binutils-mips-linux-gnu
>>          git checkout 1bc138c622959979eb547be2d3bbc6442a5c80b0
>>          # save the attached .config to linux build tree
>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 
>> ARCH=mips
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     arch/mips/include/asm/sync.h:147:34: note: expanded from macro 
>> '__SYNC_loongson3_war'
>>     # define __SYNC_loongson3_war   (1 << 31)
>>                                        ^
>>     In file included from arch/mips/kernel/asm-offsets.c:12:
>>     In file included from include/linux/compat.h:10:
>>     In file included from include/linux/time.h:74:
>>     In file included from include/linux/time32.h:13:
>>     In file included from include/linux/timex.h:65:
>>     In file included from arch/mips/include/asm/timex.h:19:
>>     In file included from arch/mips/include/asm/cpu-type.h:12:
>>     In file included from include/linux/smp.h:15:
>>     include/linux/llist.h:222:9: warning: converting the result of 
>> '<<' to a boolean always evaluates to true 
>> [-Wtautological-constant-compare]
>>             return xchg(&head->first, NULL);
>>                    ^
>>     arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 
>> 'xchg'
>>             if 
>> (!__SYNC_loongson3_war)                                      \
>>                  ^
>>     arch/mips/include/asm/sync.h:147:34: note: expanded from macro 
>> '__SYNC_loongson3_war'
>>     # define __SYNC_loongson3_war   (1 << 31)
>>                                        ^
>>     In file included from arch/mips/kernel/asm-offsets.c:12:
>>     In file included from include/linux/compat.h:15:
>>     In file included from include/linux/socket.h:8:
>>     In file included from include/linux/uio.h:10:
>>     In file included from include/crypto/hash.h:11:
>>     In file included from include/linux/crypto.h:19:
>>     In file included from include/linux/slab.h:15:
>>     In file included from include/linux/gfp.h:9:
>>     include/linux/topology.h:119:9: error: implicit declaration of 
>> function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
>>             return cpu_to_node(raw_smp_processor_id());
>>                    ^
>>     arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: 
>> expanded from macro 'cpu_to_node'
>>     #define cpu_to_node(cpu)        (cpu_logical_map(cpu) >> 2)
> 
> 
> It looks like the energy_model.h causes this include on mips then some
> header is missing (probably smp.h from mips/asm).
> I will try to reproduce it and propose a fix.

I was wrong, the energy_model.h does not cause this issue. The issue is
already present in v5.8-rc2 (where there is no this EM commit).

I have reproduced in v5.8-rc2 with the .config from original email.
When I've fix this error:
"error: implicit declaration of function 'cpu_logical_map'"
new one showed up:
./include/linux/topology.h:210:9: error: use of undeclared identifier 
'__node_cpumask'
         return cpumask_of_node(cpu_to_node(cpu));

                ^
another showed up:
./arch/mips/include/asm/mach-loongson64/topology.h:12:33: note: expanded 
from macro 'cpumask_of_node'
#define cpumask_of_node(node)   (&__node_cpumask[node])

Then after a fix, the next one:
In file included from ./include/net/checksum.h:22:
./arch/mips/include/asm/checksum.h:195:9: error: unsupported inline asm: 
input with type 'unsigned long' matching output with type '__wsum' (aka 
'unsigned int')
         : "0" ((__force unsigned long)daddr),


Thomas, Jiaxun, Huacai are you aware of these issues? Maybe just this
randconfig triggers some awkward configuration?

Regards,
Lukasz


  reply	other threads:[~2020-08-17 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 22:43 kernel test robot
2020-08-17  9:03 ` Lukasz Luba
2020-08-17 13:18   ` Lukasz Luba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-03  2:58 kernel test robot
2020-08-19 18:13 kernel test robot
2020-08-04 17:54 kernel test robot

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=84239ee9-3f87-b254-29ad-ec8cc12d0190@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=chenhc@lemote.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=tsbogend@alpha.franken.de \
    /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

all inboxes | Powered by JetHome®