Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3473414imc; Wed, 13 Mar 2019 20:10:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd5SQxPLLdn9VMhPuRLwLJcxCUVPbusa+isRMT25fMHxYcX3Z8Bk3m2ErMgiylRhB1OdLp X-Received: by 2002:a17:902:5e3:: with SMTP id f90mr44307231plf.141.1552533030154; Wed, 13 Mar 2019 20:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552533030; cv=none; d=google.com; s=arc-20160816; b=hOh4RSEBVYgLh6A0ziEyuhSsO1qwWijzE0Pmn8cDoifkyWUcx5xOzxqFNNMR5KTz0X H/RObEKVZHO9QkhBZWl+119XjRAMWk8yFoVJFoss72JksWBqtVhmAA41MfFytKDczano 5AKyNEI0f0fxziaMOkTYcw6YAVIgKJNJGuX6PrgZhb9byFby/6NH7gGUcQpVx/51YXOp ni9SpYm/xjzJ1tP/SiqAYgPY2nCExvR1MqzOr3wXET0q+Q5QGyNKA/CI6jKakiwr+icW s16gx/yKzK+HT0oun9RwIDVPyw2VePTr0lzNNByQgkbj1RRlTt4cJWPc32m7nN9wib+5 Z43A== 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 :mime-version:user-agent:organization:references:in-reply-to:date:cc :to:from:subject; bh=+8XaV5A/DDzUc9ZnE44ZmfEnapHzBo1I1BlswcckdhY=; b=l0vpFLScE7Sds2QkziPVe2kDfIuB+ZTIhe14fiiA5LQXQOiQ2c/dX0vA36dsvDGH9u sAs/2/I+LwlHg9RH3X/JPU0jn/hBrF3TvsAaziLW0qkWN6dMNX5QbpDK7w502RBZcXoD CdJ0GMrjBeksPPBEUQrm5GrfhiDNOLZGPsLT2+0ns0/QNUWc7EgJ+VYxNHdBmAVMH+Og n2dZE9mGjQn3EZnsEHDY0qKRCEirihVcNNfGCgaxuIAiHRLTFJd0T/gg4iemXSGV6Z3p UHOgylujHwg8SI8slcu3NJ/i/w6qkElzuB8MZhRsIdZ5WZbjzhQtr6uEEoEKmmskD71X Jbhg== 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 f9si11372748pgi.76.2019.03.13.20.10.00; Wed, 13 Mar 2019 20:10:30 -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 S1726656AbfCNDJc (ORCPT + 99 others); Wed, 13 Mar 2019 23:09:32 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35614 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfCNDJc (ORCPT ); Wed, 13 Mar 2019 23:09:32 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2E39FeQ111776 for ; Wed, 13 Mar 2019 23:09:31 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2r78u8dbmr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 13 Mar 2019 23:09:30 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 14 Mar 2019 03:09:28 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 14 Mar 2019 03:09:24 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2E39NKx26935382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Mar 2019 03:09:24 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE9FC4C04A; Thu, 14 Mar 2019 03:09:23 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C5E34C046; Thu, 14 Mar 2019 03:09:23 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 14 Mar 2019 03:09:23 +0000 (GMT) Received: from adsilva.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 39986A00E2; Thu, 14 Mar 2019 14:09:22 +1100 (AEDT) Subject: Re: [PATCH 1/1] arch/powerpc: Rework local_paca to avoid LTO warnings From: "Alastair D'Silva" To: Daniel Axtens Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Mahesh Salgaonkar , "Naveen N. Rao" , Christophe Leroy , Michal Hocko , Andrew Morton , Mike Rapoport , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Thu, 14 Mar 2019 14:09:22 +1100 In-Reply-To: <87ef7atjnk.fsf@dja-thinkpad.axtens.net> References: <20190313034208.13134-1-alastair@au1.ibm.com> <87ef7atjnk.fsf@dja-thinkpad.axtens.net> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19031403-0008-0000-0000-000002CD0BE3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031403-0009-0000-0000-000022390C35 Message-Id: <07a2633c1264db39d2ef91d6824c319f57027c26.camel@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-14_01:,, 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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903140019 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-03-14 at 10:54 +1100, Daniel Axtens wrote: > "Alastair D'Silva" writes: > > > From: Alastair D'Silva > > > > When building an LTO kernel, the existing code generates warnings: > > ./arch/powerpc/include/asm/paca.h:37:30: warning: register of > > ‘local_paca’ used for multiple global register variables > > register struct paca_struct *local_paca asm("r13"); > > ^ > > ./arch/powerpc/include/asm/paca.h:37:30: note: conflicts with > > ‘local_paca’ > > > > This patch reworks local_paca into an inline getter & setter > > function, > > which addresses the warning. > > > > Generated ASM from this patch is broadly similar (addresses have > > changed and the compiler uses different GPRs in some places). > > Ditto to Christophe's comment; I'd love to know how to build this so > I > can actually see the differences. Perhaps you could bundle up all the > required changes and send it as a patch series with a cover letter > explaining this? The differences are visible in a normal build, but if you want to play with LTO, see my comments to Christophe. > > > +static inline struct paca_struct *get_paca_no_preempt_check(void) > > +{ > > + register struct paca_struct *paca asm("r13"); > > + return paca; > > +} > > Isn't the convention to have the { on the same line as the function, > or > am I horrible mis-remembering things? > You are :) > Should these functions be __always_inline? > Yes, they should, I'll add that to V3. -- Alastair D'Silva Open Source Developer Linux Technology Centre, IBM Australia mob: 0423 762 819