Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933569AbdCHDcU (ORCPT ); Tue, 7 Mar 2017 22:32:20 -0500 Received: from mx0a-00010702.pphosted.com ([148.163.156.75]:47116 "EHLO mx0b-00010702.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933331AbdCHDcQ (ORCPT ); Tue, 7 Mar 2017 22:32:16 -0500 From: Julia Cartwright To: , CC: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Steven Rostedt , Dan Murphy Subject: [PATCH RT 8/9] lockdep: Fix compilation error for !CONFIG_MODULES and Date: Tue, 7 Mar 2017 16:32:58 -0600 Message-ID: <02585c573c60d028365b49b158190d260b40553d.1488919535.git.julia@ni.com> X-Mailer: git-send-email 2.11.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-07_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703070176 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-07_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=30 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=30 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703070176 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2019 Lines: 64 4.1.38-rt46-rc1 stable review patch. If you have any objection to the inclusion of this patch, let me know. --- 8< --- 8< --- 8< --- From: Dan Murphy When CONFIG_MODULES is not set then it fails to compile in lockdep: |kernel/locking/lockdep.c: In function 'look_up_lock_class': |kernel/locking/lockdep.c:684:12: error: implicit declaration of function | '__is_module_percpu_address' [-Werror=implicit-function-declaration] If CONFIG_MODULES is set but CONFIG_SMP is not, then it compiles but fails link at the end: |kernel/locking/lockdep.c:684: undefined reference to `__is_module_percpu_address' |kernel/built-in.o:(.debug_addr+0x1e674): undefined reference to `__is_module_percpu_address' This patch adds the function for both cases. Signed-off-by: Dan Murphy [bigeasy: merge the two patches from Dan into one, adapt changelog] Signed-off-by: Sebastian Andrzej Siewior (cherry picked from commit a88182f3f1818407d738e832650085110cae1f29) Signed-off-by: Julia Cartwright --- include/linux/module.h | 5 +++++ kernel/module.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h index af9a771a9346..2fd71ecdd63a 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -539,6 +539,11 @@ static inline bool is_module_percpu_address(unsigned long addr) return false; } +static inline bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) +{ + return false; +} + static inline bool is_module_text_address(unsigned long addr) { return false; diff --git a/kernel/module.c b/kernel/module.c index b4ebb2fd4849..a7ac858fd1a1 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -599,6 +599,11 @@ bool is_module_percpu_address(unsigned long addr) return false; } +bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr) +{ + return false; +} + #endif /* CONFIG_SMP */ #define MODINFO_ATTR(field) \ -- 2.11.1