From patchwork Fri Sep 12 20:17:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 37363 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A827206A5 for ; Fri, 12 Sep 2014 20:17:42 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id p10sf777433wes.1 for ; Fri, 12 Sep 2014 13:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=vMMPmOf9am0MUT00qoXAVq6qwngfGag0JXQrEHzWU6Q=; b=C8LY7Z9bmbPjtBXWXPUtTeEhnFI3fDhz4K2KRhKZvCjypy5FSpcSp3HaTxIQ6SP2/2 3nV+xRiXQlVAMCzFnh+3RPRIWhkPAFApibNevtGLJ81pZJbeuimftrJ3c9CRlS07MTHw A26Z4zdG24esbnqHfjSbSCYgpiYCmaSqZkTgj+oeEhIZACUFPw1hcHwlzeP433kLnxCS EAAugpirEU4IkQ/UF904TOcLODkcfnHMrenl+IraigShkMG5dzDIOwiYZse/2Px7n+7g Nk6tL2VIsgmWgPTzfFUXrz11f56arQL2b4zkVny5CE7QdUsqzDCjQWb641bvZnAa/XSk gpHA== X-Gm-Message-State: ALoCoQk88FRKNmCj2R47I4TYhku2dHd3NF+lFUlKSl9sGhGT3miwCqXdDRP2jykhaSTsR2TylUF5 X-Received: by 10.194.100.3 with SMTP id eu3mr2597893wjb.6.1410553061078; Fri, 12 Sep 2014 13:17:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.133 with SMTP id q5ls211525laj.80.gmail; Fri, 12 Sep 2014 13:17:40 -0700 (PDT) X-Received: by 10.152.4.39 with SMTP id h7mr11515224lah.49.1410553060893; Fri, 12 Sep 2014 13:17:40 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx.google.com with ESMTPS id mv1si2911368lbb.101.2014.09.12.13.17.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 13:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id z11so1536176lbi.21 for ; Fri, 12 Sep 2014 13:17:40 -0700 (PDT) X-Received: by 10.152.22.137 with SMTP id d9mr11485356laf.29.1410553060468; Fri, 12 Sep 2014 13:17:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.141.42 with SMTP id rl10csp801757lbb; Fri, 12 Sep 2014 13:17:39 -0700 (PDT) X-Received: by 10.68.57.142 with SMTP id i14mr14224000pbq.64.1410553058933; Fri, 12 Sep 2014 13:17:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kk4si9845352pbc.163.2014.09.12.13.17.38 for ; Fri, 12 Sep 2014 13:17:38 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbaILURe (ORCPT + 27 others); Fri, 12 Sep 2014 16:17:34 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:46236 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbaILURd (ORCPT ); Fri, 12 Sep 2014 16:17:33 -0400 Received: by mail-wg0-f46.google.com with SMTP id n12so1202551wgh.17 for ; Fri, 12 Sep 2014 13:17:29 -0700 (PDT) X-Received: by 10.194.61.99 with SMTP id o3mr13862626wjr.103.1410553047908; Fri, 12 Sep 2014 13:17:27 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id ny6sm1749257wic.22.2014.09.12.13.17.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 13:17:27 -0700 (PDT) From: Ard Biesheuvel To: kvm@vger.kernel.org, pbonzini@redhat.com, christoffer.dall@linaro.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, ralf@linux-mips.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, akpm@linux-foundation.org Cc: Ard Biesheuvel Subject: [PATCH] mm: export symbol dependencies of is_zero_pfn() Date: Fri, 12 Sep 2014 22:17:23 +0200 Message-Id: <1410553043-575-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In order to make the static inline function is_zero_pfn() callable by modules, export its symbol dependencies 'zero_pfn' and (for s390 and mips) 'zero_page_mask'. We need this for KVM, as CONFIG_KVM is a tristate for all supported architectures except ARM and arm64, and testing a pfn whether it refers to the zero page is required to correctly distinguish the zero page from other special RAM ranges that may also have the PG_reserved bit set, but need to be treated as MMIO memory. Signed-off-by: Ard Biesheuvel --- arch/mips/mm/init.c | 1 + arch/s390/mm/init.c | 1 + mm/memory.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 571aab064936..f42e35e42790 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -53,6 +53,7 @@ */ unsigned long empty_zero_page, zero_page_mask; EXPORT_SYMBOL_GPL(empty_zero_page); +EXPORT_SYMBOL(zero_page_mask); /* * Not static inline because used by IP27 special magic initialization code diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 0c1073ed1e84..c7235e01fd67 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); unsigned long empty_zero_page, zero_page_mask; EXPORT_SYMBOL(empty_zero_page); +EXPORT_SYMBOL(zero_page_mask); static void __init setup_zero_pages(void) { diff --git a/mm/memory.c b/mm/memory.c index adeac306610f..d17f1bcd2a91 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps); unsigned long zero_pfn __read_mostly; unsigned long highest_memmap_pfn __read_mostly; +EXPORT_SYMBOL(zero_pfn); + /* * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init() */