From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755576AbcAYGV2 (ORCPT ); Mon, 25 Jan 2016 01:21:28 -0500 Received: from e28smtp02.in.ibm.com ([125.16.236.2]:36377 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755404AbcAYGVQ (ORCPT ); Mon, 25 Jan 2016 01:21:16 -0500 X-IBM-Helo: d28relay04.in.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Message-ID: <56A5BED1.9070704@linux.vnet.ibm.com> Date: Mon, 25 Jan 2016 11:51:05 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Michael Ellerman , Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org CC: Paul Mackerras , linux-kernel@vger.kernel.org Subject: Re: [kernel] powerpc: Make vmalloc_to_phys() public References: <20160125054603.5D55B140326@ozlabs.org> In-Reply-To: <20160125054603.5D55B140326@ozlabs.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 16012506-0005-0000-0000-00000A0BE0B0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/2016 11:16 AM, Michael Ellerman wrote: > On Thu, 2016-21-01 at 07:35:08 UTC, Alexey Kardashevskiy wrote: >> > This makes vmalloc_to_phys() public as there will be another user >> > (in-kernel VFIO acceleration) for it soon. >> > >> > As a part of future little optimization, this changes the helper to call >> > vmalloc_to_pfn() instead of vmalloc_to_page() as the size of the >> > struct page may not be power-of-two aligned which will make gcc use >> > multiply instructions instead of shifts. > You should also mention why you need to export it, presumably because whatever > new user you have in mind can be built as a module. Unless the change specifically mentions about the use case, there are a tons of static helper functions which can be exported to public for module usage. Ideally this change should be part of the series which actually needs the helper function to be available in public not a stand alone one.