Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933477AbcCIR0k (ORCPT ); Wed, 9 Mar 2016 12:26:40 -0500 Received: from verein.lst.de ([213.95.11.211]:49228 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751786AbcCIR0b (ORCPT ); Wed, 9 Mar 2016 12:26:31 -0500 Date: Wed, 9 Mar 2016 18:26:29 +0100 From: Torsten Duwe To: Petr Mladek Cc: jeyu@redhat.com, jkosina@suse.cz, jikos@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, kamalesh@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org, live-patching@vger.kernel.org, mbenes@suse.cz Subject: Re: [v5][PATCH] livepatch/ppc: Enable livepatching on powerpc Message-ID: <20160309172629.GB27913@lst.de> References: <1457422437-3357-1-git-send-email-bsingharora@gmail.com> <20160308104552.GA16502@lst.de> <56DED903.2000209@gmail.com> <20160308153435.GA23804@lst.de> <20160309161025.GN10940@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160309161025.GN10940@pathway.suse.cz> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 535 Lines: 13 On Wed, Mar 09, 2016 at 05:10:25PM +0100, Petr Mladek wrote: > On Tue 2016-03-08 16:34:35, Torsten Duwe wrote: > > /* compile using "-ffixed-r14"! */ > > register unsigned long pass_TOC asm("r14"); > > BTW: Is this reentrant, please? I mean, is it possible to use this > hack for two functions? Could the functions call each other? Yes, it is. pass_TOC isn't really a global variable. It only lives between the caller and the real function's return. With this notation the task can easily be shifted to any other register. Torsten