Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbcD2NmZ (ORCPT ); Fri, 29 Apr 2016 09:42:25 -0400 Received: from smtprelay0093.hostedemail.com ([216.40.44.93]:54052 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752950AbcD2NmW (ORCPT ); Fri, 29 Apr 2016 09:42:22 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3868:3871:4321:4470:5007:6261:6742:7903:10004:10400:10848:10967:11026:11232:11657:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13311:13357:13439:14181:14659:14721:21080:21433:21434:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: tub36_316abecd7335b X-Filterd-Recvd-Size: 2342 Date: Fri, 29 Apr 2016 09:42:18 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: Russell King , Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Ard Biesheuvel , Thomas Gleixner , Frederic Weisbecker , Mel Gorman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched/core: don't include asm/mmu_context from drivers Message-ID: <20160429094218.61b26849@gandalf.local.home> In-Reply-To: <1461919995-21001-1-git-send-email-arnd@arndb.de> References: <1461919995-21001-1-git-send-email-arnd@arndb.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 35 On Fri, 29 Apr 2016 10:52:32 +0200 Arnd Bergmann wrote: > This reverts the earlier fix attempt and works around the problem > by including both linux/mmu_context.h and asm/mmu_context.h from > kernel/sched/core.c. This is not a good solution but seems less > hacky than the alternatives. What about simply not compiling finish_arch_post_lock_switch() when building modules? (untested, not compiled or anything) Signed-off-by: Steven Rostedt --- diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index fa5b42d44985..3f22d1b6bac8 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h @@ -66,6 +66,7 @@ static inline void check_and_switch_context(struct mm_struct *mm, cpu_switch_mm(mm->pgd, mm); } +#ifndef MODULE #define finish_arch_post_lock_switch \ finish_arch_post_lock_switch static inline void finish_arch_post_lock_switch(void) @@ -87,6 +88,7 @@ static inline void finish_arch_post_lock_switch(void) preempt_enable_no_resched(); } } +#endif /* !MODULE */ #endif /* CONFIG_MMU */