From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 0/3] Add __ioread32_copy() and use it Date: Tue, 15 Sep 2015 19:50:31 -0700 Message-ID: <20150915195031.0a1756a2.akpm@linux-foundation.org> References: <1442346089-32077-1-git-send-email-sboyd@codeaurora.org> <20150915155815.5a41a8dc537610ab44d8d3dc@linux-foundation.org> <20150916023219.GD1747@two.firstfloor.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60807 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbbIPCtd (ORCPT ); Tue, 15 Sep 2015 22:49:33 -0400 In-Reply-To: <20150916023219.GD1747@two.firstfloor.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Andi Kleen Cc: Stephen Boyd , Andy Gross , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-soc@vger.kernel.org, linux-mips@linux-mips.org, Hauke Mehrtens , Paul Walmsley , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , Bjorn Andersson On Wed, 16 Sep 2015 04:32:19 +0200 Andi Kleen wrote: > > __iowrite32_copy() is marked __visible. I don't actually know what > > that does and Andi's d47d5c8194579bc changelog (which sucks the big > > one) didn't explain it. Apparently it has something to do with being > > implemented in assembly, but zillions of functions are implemented in > > assembly, so why are only two functions marked this way? Anyway, > > __ioread32_copy() is implemented in C so I guess __visible isn't needed > > there. > > __visible is needed for C functions that are called from assembler. > Otherwise the compiler may optimize them away. Under what circumstances will the compiler (or linker?) do this? LTO enabled?