From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932102AbbCLOn6 (ORCPT ); Thu, 12 Mar 2015 10:43:58 -0400 Received: from blu004-omc3s30.hotmail.com ([65.55.116.105]:60866 "EHLO BLU004-OMC3S30.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513AbbCLOnz (ORCPT ); Thu, 12 Mar 2015 10:43:55 -0400 X-TMN: [V7xtLjLU2ci4bfoCsA7A51vCgs4ZRqe0] X-Originating-Email: [dave.anglin@bell.net] Message-ID: Date: Thu, 12 Mar 2015 10:43:51 -0400 From: John David Anglin User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: James Bottomley , Scott Wood CC: trivial@kernel.org, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org Subject: Re: [PATCH 14/22] parisc: %pF is only for function pointers References: <1426130037-17956-1-git-send-email-scottwood@freescale.com> <1426130037-17956-14-git-send-email-scottwood@freescale.com> <1426162282.2146.77.camel@HansenPartnership.com> In-Reply-To: <1426162282.2146.77.camel@HansenPartnership.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Mar 2015 14:43:53.0734 (UTC) FILETIME=[F6359A60:01D05CD2] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015-03-12 8:11 AM, James Bottomley wrote: > On Wed, 2015-03-11 at 22:13 -0500, Scott Wood wrote: >> Use %pS for actual addresses, otherwise you'll get bad output >> on arches like ppc64 where %pF expects a function descriptor. Even on >> other architectures, refrain from setting a bad example that people >> copy. > Are you sure about this? Parisc64 is a function description > architecture. There may be a misunderstanding about what > __builtin_return_address(0) is supposed to return, but I'm certain the > person who added the code thought it returned a function pointer, which > on parisc64 would be a descriptor. __builtin_return_address(0) returns the return address in the calling procedure ignoring import/export stubs. There are no function descriptors for return addresses. Thus, it can't return a function pointer. There are no function descriptors in 32-bit parisc when the -mfast-indirect-calls compiler option is used. This option used to be used for 64-bit kernel builds but this broke when the -mfast-indirect-calls was fixed for user space (gcl uses it). I worked a bit on trying to eliminate function descriptors from the 64-bit kernel for performance but I don't have a working change. Dave -- John David Anglin dave.anglin@bell.net