[LU-6079] missing NR_CPUS definition in socklnd Created: 03/Jan/15  Updated: 12/Jan/15  Resolved: 12/Jan/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Trivial
Reporter: Alex Zhuravlev Assignee: Alex Zhuravlev
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 16912

 Description   

the problem was introduced with commit Id10683e95277791f9c99492907369a608b28a1fb: LU-2675 lnet: remove lnet/include/lnet/linux/



 Comments   
Comment by Gerrit Updater [ 03/Jan/15 ]

Alex Zhuravlev (alexey.zhuravlev@intel.com) uploaded a new patch: http://review.whamcloud.com/13229
Subject: LU-6079 lnet: add missing include to define NR_CPUS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3bcf43ec63538d158ca33dcde139910866249554

Comment by Andreas Dilger [ 05/Jan/15 ]

What is the specific need for this patch? It isn't causing problems on any of the kernels that we are currently building.

Comment by Alex Zhuravlev [ 05/Jan/15 ]

CC [M] /work/lustre/head3/lnet/klnds/socklnd/socklnd.o
In file included from /work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:11:0,
from /work/lustre/head3/lnet/klnds/socklnd/socklnd.h:34,
from /work/lustre/head3/lnet/klnds/socklnd/socklnd.c:44:
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq_vectors.h:171:7: error: "NR_CPUS" is not defined [-Werror=undef]
In file included from /work/lustre/head3/lnet/klnds/socklnd/socklnd.h:34:0,
from /work/lustre/head3/lnet/klnds/socklnd/socklnd.c:44:
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:38:1: error: unknown type name 'bool'
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:38:45: error: 'struct pt_regs' declared inside parameter list [-Werror]
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:38:45: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:40:35: error: 'struct pt_regs' declared inside parameter list [-Werror]
/work/lustre/linux-2.6.32-431.el6/arch/x86/include/asm/irq.h:43:37: error: expected ')' before numeric constant
cc1: all warnings being treated as errors

gcc version 4.7.2 (GCC)

Comment by Andreas Dilger [ 06/Jan/15 ]

It seems the core probkem is that we are including <asm/irq.h> instead of the proper <linux/*.h> header.

Comment by Alex Zhuravlev [ 06/Jan/15 ]

right, it actually builds fine with no <asm/irq.h>. the updated patch has been pushed to gerrit.

Comment by Gerrit Updater [ 09/Jan/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13229/
Subject: LU-6079 lnet: remove asm/irq.h include
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e19162ca0dbfb261c69c2f63bb3ecb67a337eb27

Comment by Peter Jones [ 12/Jan/15 ]

Landed for 2.7

Generated at Sat Feb 10 01:57:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.