linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/x86/events/intel/uncore_snbep.o: warning: objtool: snbep_uncore_msr_enable_event()+0x2e: function has unreachable instruction
@ 2016-07-20  1:25 kbuild test robot
       [not found] ` <37D7C6CF3E00A74B8858931C1DB2F07712C1ACAF@SHSMSX103.ccr.corp.intel.com>
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2016-07-20  1:25 UTC (permalink / raw)
  Cc: kbuild-all, linux-kernel, Ingo Molnar, Kan Liang, Peter Zijlstra (Intel)

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   47ef4ad2684d380dd6d596140fb79395115c3950
commit: 3b94a891667c30fb4624221497d77fc65d950345 perf/x86/intel/uncore: Remove SBOX support for Broadwell server
date:   7 weeks ago
config: x86_64-randconfig-s0-07191857 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        git checkout 3b94a891667c30fb4624221497d77fc65d950345
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> arch/x86/events/intel/uncore_snbep.o: warning: objtool: snbep_uncore_msr_enable_event()+0x2e: function has unreachable instruction

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 23892 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc-4.4] Re: arch/x86/events/intel/uncore_snbep.o: warning: objtool: snbep_uncore_msr_enable_event()+0x2e: function has unreachable instruction
       [not found] ` <37D7C6CF3E00A74B8858931C1DB2F07712C1ACAF@SHSMSX103.ccr.corp.intel.com>
@ 2016-07-21  4:45   ` Fengguang Wu
  0 siblings, 0 replies; 2+ messages in thread
From: Fengguang Wu @ 2016-07-21  4:45 UTC (permalink / raw)
  To: Liang, Kan; +Cc: LKML, Andy Lutomirski, gcc

On Thu, Jul 21, 2016 at 11:06:06AM +0800, Liang, Kan wrote:
>Hi Fengguang,
>
>I located the unreachable instruction which is ud2.
>
>This instruction will raise invalid opcode exception. So I think
>normally it should not be reached.  Also ud2 should be generated by
>compiler, not our codes.

It's great to know that!

>I have no idea how to fix it.
>Have you met similar issue before?
>Do you have any suggestions?

The warning shows up when we enabled gcc-4.4 for kernel build tests.
It emits this "function has unreachable instruction" warning for
~10000 kernel functions all over the places.

So it must be a toolchain specific problem.
Let's CC LKML and gcc lists for possible solutions.

>0000000000000e0f <snbep_uncore_msr_enable_event>:
>     e0f:       55                      push   %rbp
>     e10:       48 89 e5                mov    %rsp,%rbp
>     e13:       53                      push   %rbx
>     e14:       83 be 80 01 00 00 ff    cmpl   $0xffffffff,0x180(%rsi)
>     e1b:       48 89 f3                mov    %rsi,%rbx
>     e1e:       74 2b                   je     e4b <snbep_uncore_msr_enable_event+0x3c>
>     e20:       31 f6                   xor    %esi,%esi
>     e22:       e8 00 00 00 00          callq  e27 <snbep_uncore_msr_enable_event+0x18>
>     e27:       48 89 c2                mov    %rax,%rdx
>     e2a:       8b b3 78 01 00 00       mov    0x178(%rbx),%esi
>     e30:       48 c1 ea 20             shr    $0x20,%rdx
>     e34:       48 83 3d 00 00 00 00    cmpq   $0x0,0x0(%rip)        # e3c <snbep_uncore_msr_enable_event+0x2d>
>     e3b:       00
>     e3c:       75 02                   jne    e40 <snbep_uncore_msr_enable_event+0x31>
>     e3e:       0f 0b                   ud2
>     e40:       89 f7                   mov    %esi,%edi
>     e42:       89 c6                   mov    %eax,%esi
>     e44:       ff 14 25 00 00 00 00    callq  *0x0
>
>Thanks,
>Kan
>
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> master
>> head:   47ef4ad2684d380dd6d596140fb79395115c3950
>> commit: 3b94a891667c30fb4624221497d77fc65d950345
>> perf/x86/intel/uncore: Remove SBOX support for Broadwell server
>> date:   7 weeks ago
>> config: x86_64-randconfig-s0-07191857 (attached as .config)
>> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
>> reproduce:
>>         git checkout 3b94a891667c30fb4624221497d77fc65d950345
>>         # save the attached .config to linux build tree
>>         make ARCH=x86_64
>>
>> All warnings (new ones prefixed by >>):
>>
>> >> arch/x86/events/intel/uncore_snbep.o: warning: objtool:
>> snbep_uncore_msr_enable_event()+0x2e: function has unreachable
>> instruction
>>
>> ---
>> 0-DAY kernel test infrastructure                Open Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21  4:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20  1:25 arch/x86/events/intel/uncore_snbep.o: warning: objtool: snbep_uncore_msr_enable_event()+0x2e: function has unreachable instruction kbuild test robot
     [not found] ` <37D7C6CF3E00A74B8858931C1DB2F07712C1ACAF@SHSMSX103.ccr.corp.intel.com>
2016-07-21  4:45   ` [gcc-4.4] " Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).