From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbcA0DTN (ORCPT ); Tue, 26 Jan 2016 22:19:13 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33749 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbcA0DTK (ORCPT ); Tue, 26 Jan 2016 22:19:10 -0500 Subject: Re: [kernel] powerpc: Make vmalloc_to_phys() public To: Paul Mackerras , Michael Ellerman References: <1453361708-19422-1-git-send-email-aik@ozlabs.ru> <20160125054603.5D55B140326@ozlabs.org> <20160125100609.GA24295@fergus.ozlabs.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Alexey Kardashevskiy Message-ID: <56A83728.4090601@ozlabs.ru> Date: Wed, 27 Jan 2016 14:19:04 +1100 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160125100609.GA24295@fergus.ozlabs.ibm.com> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/2016 09:06 PM, Paul Mackerras wrote: > On Mon, Jan 25, 2016 at 04:46:03PM +1100, 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. > > If I remember correctly, it's the *existing* user in hv-24x7.c that > needs the export. No, CONFIG_HV_PERF_CTRS (which controls hv-24x7.c) is "bool" so today hv-24x7.c cannot compile as a module. This exports the vmalloc_to_phys() symbol as a new user is going to be KVM which can compile as a module. -- Alexey