Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756138AbcJNIRL (ORCPT ); Fri, 14 Oct 2016 04:17:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38542 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752463AbcJNIQq (ORCPT ); Fri, 14 Oct 2016 04:16:46 -0400 Date: Fri, 14 Oct 2016 10:16:38 +0200 From: Heiko Carstens To: Mark Rutland Cc: Andy Lutomirski , Peter Zijlstra , Linus Torvalds , Ingo Molnar , "H . Peter Anvin" , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Schwidefsky Subject: Re: [PATCH 2/3] sched/preempt: include asm/current.h References: <20161013115712.29517-1-heiko.carstens@de.ibm.com> <20161013115712.29517-3-heiko.carstens@de.ibm.com> <20161013232556.GA24167@remoulade> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161013232556.GA24167@remoulade> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101408-0040-0000-0000-000002EE365D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101408-0041-0000-0000-00001D7683C5 Message-Id: <20161014081638.GA4047@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-14_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound 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-1609300000 definitions=main-1610140144 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1349 Lines: 28 On Fri, Oct 14, 2016 at 12:25:56AM +0100, Mark Rutland wrote: > Hi, > > On Thu, Oct 13, 2016 at 01:57:11PM +0200, Heiko Carstens wrote: > > The generic preempt code needs to include . Otherwise > > compilation fails if THREAD_INFO_IN_TASK is selected and the generic > > preempt code is used: > > > > ./include/linux/thread_info.h:17:54: error: 'current' undeclared (first use in this function) > > #define current_thread_info() ((struct thread_info *)current) > > I don't think this is the right fix. Users of current_thread_info() should only > have to include , as already does. > > I have a patch [1] which has include the > THREAD_INFO_IN_TASK case (while avoiding circular includes over > and in the !THREAD_INFO_IN_TASK case). I added that include initially to too, but was afraid of include dependency hell. So I tried the minimal version, and it worked. However with the ifdef within your patch you make sure that nothing breaks by accident; so I think your version is better. > I was planning on posting an updated series with that come -rc1. That could/should also go into 4.9, so architectures could independently convert to THREAD_INFO_IN_TASK for the next merge window.