<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8372</bug_id>
          
          <creation_ts>2015-09-22 12:39:48 +0000</creation_ts>
          <short_desc>linux-yocto-rt 4.1 kernel build fails for qemumips</short_desc>
          <delta_ts>2015-11-16 15:13:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Kernel</product>
          <component>linux-yocto</component>
          <version>1.9</version>
          <rep_platform>Other</rep_platform>
          <op_sys>mips</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Maxin B. John">maxin.john</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54436</commentid>
    <comment_count>0</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2015-09-22 12:39:48 +0000</bug_when>
    <thetext>linux-yocto-rt-4.1.6 build for &quot;qemumips&quot; fails with following error (master branch):

 | In file included from /home/maxin/poky/build/tmp/work-shared/qemumips/kernel-source/kernel/pid_namespace.c:11:0:
| /home/maxin/poky/build/tmp/work-shared/qemumips/kernel-source/include/linux/pid.h: In function &apos;get_pid&apos;:
| /home/maxin/poky/build/tmp/work-shared/qemumips/kernel-source/include/linux/pid.h:78:3: error: implicit declaration of function &apos;atomic_inc&apos; [-Werror=implicit-function-declaration]
|    atomic_inc(&amp;pid-&gt;count);
|    ^
|   GZIP    kernel/config_data.gz
|   CC      kernel/seccomp.o
|   CC      kernel/trace/trace_events_trigger.o
|   CC      kernel/relay.o
|   CC      drivers/md/dm-linear.o
|   CC      fs/btrfs/orphan.o
|   CC      drivers/md/dm-stripe.o
|   CC      kernel/utsname_sysctl.o
| cc1: some warnings being treated as errors
| /home/maxin/poky/build/tmp/work-shared/qemumips/kernel-source/scripts/Makefile.build:258: recipe for target &apos;kernel/pid_namespace.o&apos; failed

How to recreate the build error:

# git clone git://git.yoctoproject.org/poky
# cd poky
# source oe-init-build-env

edit these entries in the &quot;conf/local.conf&quot;
 1)  MACHINE ??= &quot;qemumips&quot;
 2)  PREFERRED_PROVIDER_virtual/kernel=&quot;linux-yocto-rt&quot;

# bitbake virtual/kernel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54437</commentid>
    <comment_count>1</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2015-09-22 12:43:27 +0000</bug_when>
    <thetext>This patch fixes the build error for qemumips and qemuarm. It might be a good idea to cherry pick this fix:

http://marc.info/?l=linux-rt-users&amp;m=143749706301597&amp;w=3



From: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;

This patch fixes build error:
  CC      kernel/pid_namespace.o
In file included from kernel/pid_namespace.c:11:0:
include/linux/pid.h: In function &apos;get_pid&apos;:
include/linux/pid.h:78:3: error: implicit declaration of function &apos;atomic_inc&apos; \
[-Werror=implicit-function-declaration]  atomic_inc(&amp;pid-&gt;count);
   ^
which happens when
 CONFIG_PROVE_LOCKING=n
 CONFIG_DEBUG_SPINLOCK=n
 CONFIG_DEBUG_MUTEXES=n
 CONFIG_DEBUG_LOCK_ALLOC=n

Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
---
 include/linux/pid.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pid.h b/include/linux/pid.h
index 23705a53..2cc64b7 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -2,6 +2,7 @@
 #define _LINUX_PID_H
 
 #include &lt;linux/rcupdate.h&gt;
+#include &lt;linux/atomic.h&gt;
 
 enum pid_type
 {
-- 
2.4.6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54632</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-09-24 15:38:58 +0000</bug_when>
    <thetext>This is already in place .. but there&apos;s an issue with the tree that
we are sorting out. It broke the builds for standard kernels, and now
I&apos;m seeing that it also hit the RT branches. 

Once I sort this out, these will work again.

(I&apos;ve been building, booting and running latency tests on the
qemu machines since 4.1 was introduced).

(In reply to comment #1)
&gt; This patch fixes the build error for qemumips and qemuarm. It might be a
&gt; good idea to cherry pick this fix:
&gt; 
&gt; http://marc.info/?l=linux-rt-users&amp;m=143749706301597&amp;w=3
&gt; 
&gt; 
&gt; 
&gt; From: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
&gt; 
&gt; This patch fixes build error:
&gt;   CC      kernel/pid_namespace.o
&gt; In file included from kernel/pid_namespace.c:11:0:
&gt; include/linux/pid.h: In function &apos;get_pid&apos;:
&gt; include/linux/pid.h:78:3: error: implicit declaration of function
&gt; &apos;atomic_inc&apos; \
&gt; [-Werror=implicit-function-declaration]  atomic_inc(&amp;pid-&gt;count);
&gt;    ^
&gt; which happens when
&gt;  CONFIG_PROVE_LOCKING=n
&gt;  CONFIG_DEBUG_SPINLOCK=n
&gt;  CONFIG_DEBUG_MUTEXES=n
&gt;  CONFIG_DEBUG_LOCK_ALLOC=n
&gt; 
&gt; Signed-off-by: Grygorii Strashko &lt;Grygorii.Strashko@linaro.org&gt;
&gt; ---
&gt;  include/linux/pid.h | 1 +
&gt;  1 file changed, 1 insertion(+)
&gt; 
&gt; diff --git a/include/linux/pid.h b/include/linux/pid.h
&gt; index 23705a53..2cc64b7 100644
&gt; --- a/include/linux/pid.h
&gt; +++ b/include/linux/pid.h
&gt; @@ -2,6 +2,7 @@
&gt;  #define _LINUX_PID_H
&gt;  
&gt;  #include &lt;linux/rcupdate.h&gt;
&gt; +#include &lt;linux/atomic.h&gt;
&gt;  
&gt;  enum pid_type
&gt;  {
&gt; -- 
&gt; 2.4.6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54883</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-10-01 14:46:17 +0000</bug_when>
    <thetext>Author: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Date:   Thu Sep 24 18:17:54 2015 -0400

    linux-yocto/4.1: rt update to 4.1.x-rt8
    
    The -rt build suffered the same breakage in master as the standard
    kernel builds: due to a bad git history merge, existing patches were
    dropped from branches.
    
    This meant that we were missing the -rt changes, which re-introduced
    some failures with linux-yocto-rt.
    
    With these SRCREV updates, we have the latest 4.1.x-rt and all
    architectures build.
    
    (From OE-Core rev: 96db930d8add6623168ec5e638769d5c0f348265)
    
    Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
    Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56493</commentid>
    <comment_count>4</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-16 15:13:07 +0000</bug_when>
    <thetext>Verified on master:
Build Configuration:
BB_VERSION        = &quot;1.28.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-14.04&quot;
TARGET_SYS        = &quot;mips-poky-linux&quot;
MACHINE           = &quot;qemumips&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.0&quot;
TUNE_FEATURES     = &quot;o32 bigendian fpu-hard mips32r2&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-yocto
meta-yocto-bsp    = &quot;master:fc45deac89ef63ca1c44e763c38ced7dfd72cbe1&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>