Received: by 10.192.165.148 with SMTP id m20csp3329191imm; Mon, 7 May 2018 10:20:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoxgugLz4BluPvgTPHIY78BeZbcVR6ReWHTxehe2a06udzISrNTmkhkR6wEHl+g/padWHM+ X-Received: by 2002:a6b:d312:: with SMTP id s18-v6mr36723254iob.284.1525713641459; Mon, 07 May 2018 10:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525713641; cv=none; d=google.com; s=arc-20160816; b=0RQ29G9RCxeDwJF7UiRscog88Rudq3ru0JX5HHw+C704DgwIWkRLpTL73RNrM580wm Vnr2UkKKnISmD7eSxg7geFpwdjX7a24nHajIHY6eYajbRuyLcMdo1naNsnA3OoSC1LvS t4sMq0HEzIVnlyV8tm5RuQgyCJ204APf83h2LcbfWeL1powZXtWVgg0TCuQYJvJ/kGiw DObUmEbLnK3ANO7Zy5TzeRx3doxgvWggR2J0Gx/rWdcf4RcnaTsEIXCw+rBVQvnVUwTR bRxktqYfQR7pwFUVco1mydnXymZ8gm4ms+EP0u9vPJjTRKWz93p1v0QMmYoQfvn+lDWv 0fNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=c7D2eg2IGbfK8dR/9w5updnMQhkx5dpMxghed3+XGf8=; b=YvDqEpuULK+um2kI1Puu/0a5+TVsyyz0cVUob5q8tsCrFKOg8WN1Ygtn16EJzT+WjD iAp6YFJdutKSamFZwm+Nrco9YEx6G+ZSW3vvZ9lx7Z3fFNXkk8qntZtJsHCKhAWAbtey 2cs6Bl6/ksbk0Juoz7i8mXFdqlVl2vNVwBfPVUrGOd9jTqnG9YdzNafQb1e86IRIznuZ wRQTegtt37lvMf39VJIOpmj1dKcVuU+HlWyxftiGvub4qYoHX/YS7NLbbXz1CqFVYf2c Y4r/GU4/83sxIiaCuwGbB0GmC6xVY8WnFFFKhUdXbhJarA8bH7w5uyVNqnR/KbebCIQA jGwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si7738457itf.84.2018.05.07.10.20.27; Mon, 07 May 2018 10:20:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbeEGRUF (ORCPT + 99 others); Mon, 7 May 2018 13:20:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52770 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624AbeEGRUD (ORCPT ); Mon, 7 May 2018 13:20:03 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47HJQb1019878 for ; Mon, 7 May 2018 13:20:03 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htqdv2jte-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 13:20:03 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 18:20:00 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 18:19:57 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47HJu5F14876954; Mon, 7 May 2018 17:19:56 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92A1C4C040; Mon, 7 May 2018 18:11:58 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CABA04C04E; Mon, 7 May 2018 18:11:56 +0100 (BST) Received: from [9.167.245.55] (unknown [9.167.245.55]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 18:11:56 +0100 (BST) Subject: Re: [PATCH v2 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation To: "Alastair D'Silva" , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, mikey@neuling.org, vaibhav@linux.vnet.ibm.com, aneesh.kumar@linux.vnet.ibm.com, malat@debian.org, felix@linux.vnet.ibm.com, pombredanne@nexb.com, sukadev@linux.vnet.ibm.com, npiggin@gmail.com, gregkh@linuxfoundation.org, arnd@arndb.de, andrew.donnellan@au1.ibm.com, fbarrat@linux.vnet.ibm.com, corbet@lwn.net, "Alastair D'Silva" References: <20180417020950.21446-1-alastair@au1.ibm.com> <20180418010810.30937-1-alastair@au1.ibm.com> <20180418010810.30937-3-alastair@au1.ibm.com> From: Frederic Barrat Date: Mon, 7 May 2018 19:19:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180418010810.30937-3-alastair@au1.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18050717-0020-0000-0000-0000041A0B20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050717-0021-0000-0000-000042AF3FB8 Message-Id: <772d6e5d-54c2-0512-b8e6-21d12d8c44cc@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-07_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070174 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 18/04/2018 à 03:08, Alastair D'Silva a écrit : > From: Alastair D'Silva > > Switch the use of TIDR on it's CPU feature, rather than assuming it > is available based on architecture. > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Frederic Barrat > arch/powerpc/kernel/process.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c > index 1237f13fed51..3b00da47699b 100644 > --- a/arch/powerpc/kernel/process.c > +++ b/arch/powerpc/kernel/process.c > @@ -1154,7 +1154,7 @@ static inline void restore_sprs(struct thread_struct *old_thread, > mtspr(SPRN_TAR, new_thread->tar); > } > > - if (cpu_has_feature(CPU_FTR_ARCH_300) && > + if (cpu_has_feature(CPU_FTR_P9_TIDR) && > old_thread->tidr != new_thread->tidr) > mtspr(SPRN_TIDR, new_thread->tidr); > #endif > @@ -1570,7 +1570,7 @@ void clear_thread_tidr(struct task_struct *t) > if (!t->thread.tidr) > return; > > - if (!cpu_has_feature(CPU_FTR_ARCH_300)) { > + if (!cpu_has_feature(CPU_FTR_P9_TIDR)) { > WARN_ON_ONCE(1); > return; > } > @@ -1593,7 +1593,7 @@ int set_thread_tidr(struct task_struct *t) > { > int rc; > > - if (!cpu_has_feature(CPU_FTR_ARCH_300)) > + if (!cpu_has_feature(CPU_FTR_P9_TIDR)) > return -EINVAL; > > if (t != current) >