Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp808143ybj; Thu, 7 May 2020 08:06:12 -0700 (PDT) X-Google-Smtp-Source: APiQypKi1GzcuogPj3uS9HZKwkXxva57yBWPAVUX+0kI7r4kv52PTo0qPTESG9lIYZhhCOhxnATJ X-Received: by 2002:a17:906:34c8:: with SMTP id h8mr2189590ejb.321.1588863971796; Thu, 07 May 2020 08:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588863971; cv=none; d=google.com; s=arc-20160816; b=u7BHSG/FIOUBtRsq4zWDlKyK8UczkrocYk2TI4hjwF+0A/mg6Aj/cyx516ypFY1Klt pKo2LolPF3zoBrOeDM0DrAUVxVz9lXWHyd3GfsKfnfMc4dWSaL/0kDqbDmiISK5OrbQZ v0pF/Lb692XM3Dsh4gG6l0ZGgKr+8WHHL0V1a0XfM0b4FkXlyk3wiyhsda/DDG1EXyIv kztuZigMqjON0NElhaow1GXdFvBhZ7ngyRZ5RQ2HqckX/k7ZcKj6tblpD/j2Zx66i7z+ +CyJPWDtIDi1iv0st8Q4aBjZlnwEkxLTHCwvp2Lhby6t6aes8rMw1y9oWbmlzwS4Vj6P K72A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=LFOSvvty2Pi71j0mpzfE7qZWFHt57VbfqZH/zY7dtxA=; b=HjHXNU2MPqZsBxefj1ZRsMvDhmde17IV8Zlz6pOoadpo35a+E4Bdx9Fq/ofWM9iZcp Sr20fZTtUj7UcagBlJvOsTFwEHBEZIDdQs1DfcarjYn3RwryEyRs+alveCU2gEPZtl3a jbZZ8mVajuFSTqPeYiy9vx9s/AN3CTX2WKB9gx25gbfXFBXT+dgakNbN9fhg+PS9B0em jIKHJd6D2EFyPYir/5xBCeInCxDO3W+DH5cBNbvHPJhSlELKAe0f4Y18RN4LGORx5yfQ /oKVkauAYdF8NQflle8Ah8ee/RUWynf6EYLBOTQbKltryU9KC2i1kihWbU6LCCFeJoMx tyLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p63si3279292edb.61.2020.05.07.08.05.48; Thu, 07 May 2020 08:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728198AbgEGPBD (ORCPT + 99 others); Thu, 7 May 2020 11:01:03 -0400 Received: from mga18.intel.com ([134.134.136.126]:12712 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727795AbgEGPAS (ORCPT ); Thu, 7 May 2020 11:00:18 -0400 IronPort-SDR: BG00Yl8QQ6hfiIS/Eee9iaCStGpUyQ8kGrg+8kqyaZR+djpFWW7C3l6Np8rkUT1ns2tbWDOlpU +p3DZBA6CDXw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 08:00:17 -0700 IronPort-SDR: GyT9A+G3FXRtWFWcmfwMN9FcbsbQcr5tTAtKkC/v34jELwmSILAhr9zv8Dit3jxz9xzUuFqhJm A8YMoD3TSAdQ== X-IronPort-AV: E=Sophos;i="5.73,364,1583222400"; d="scan'208";a="278623726" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2020 08:00:15 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Andrew Morton Cc: Ira Weiny , Christoph Hellwig , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Chris Zankel , Max Filippov , Dan Williams , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, dri-devel@lists.freedesktop.org, Christian Koenig , Al Viro Subject: [PATCH V3 08/15] arch/kmap: Ensure kmap_prot visibility Date: Thu, 7 May 2020 07:59:56 -0700 Message-Id: <20200507150004.1423069-9-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507150004.1423069-1-ira.weiny@intel.com> References: <20200507150004.1423069-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ira Weiny We want to support kmap_atomic_prot() on all architectures and it makes sense to define kmap_atomic() to use the default kmap_prot. So we ensure all arch's have a globally available kmap_prot either as a define or exported symbol. Reviewed-by: Christoph Hellwig Signed-off-by: Ira Weiny --- arch/microblaze/include/asm/highmem.h | 2 +- arch/microblaze/mm/init.c | 3 --- arch/powerpc/include/asm/highmem.h | 2 +- arch/powerpc/mm/mem.c | 3 --- arch/sparc/mm/highmem.c | 1 + 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/microblaze/include/asm/highmem.h b/arch/microblaze/include/asm/highmem.h index c3cbda90391d..90d96239152f 100644 --- a/arch/microblaze/include/asm/highmem.h +++ b/arch/microblaze/include/asm/highmem.h @@ -25,8 +25,8 @@ #include #include +#define kmap_prot PAGE_KERNEL extern pte_t *kmap_pte; -extern pgprot_t kmap_prot; extern pte_t *pkmap_page_table; /* diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 1ffbfa96b9b8..a467686c13af 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -49,8 +49,6 @@ unsigned long lowmem_size; #ifdef CONFIG_HIGHMEM pte_t *kmap_pte; EXPORT_SYMBOL(kmap_pte); -pgprot_t kmap_prot; -EXPORT_SYMBOL(kmap_prot); static inline pte_t *virt_to_kpte(unsigned long vaddr) { @@ -68,7 +66,6 @@ static void __init highmem_init(void) pkmap_page_table = virt_to_kpte(PKMAP_BASE); kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN)); - kmap_prot = PAGE_KERNEL; } static void highmem_setup(void) diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h index 373a470df205..ee5de974c5ef 100644 --- a/arch/powerpc/include/asm/highmem.h +++ b/arch/powerpc/include/asm/highmem.h @@ -29,8 +29,8 @@ #include #include +#define kmap_prot PAGE_KERNEL extern pte_t *kmap_pte; -extern pgprot_t kmap_prot; extern pte_t *pkmap_page_table; /* diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 041ed7cfd341..3f642b058731 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -64,8 +64,6 @@ bool init_mem_is_free; #ifdef CONFIG_HIGHMEM pte_t *kmap_pte; EXPORT_SYMBOL(kmap_pte); -pgprot_t kmap_prot; -EXPORT_SYMBOL(kmap_prot); #endif pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, @@ -245,7 +243,6 @@ void __init paging_init(void) pkmap_page_table = virt_to_kpte(PKMAP_BASE); kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN)); - kmap_prot = PAGE_KERNEL; #endif /* CONFIG_HIGHMEM */ printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%llx\n", diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c index 469786bc430f..9f06d75e88e1 100644 --- a/arch/sparc/mm/highmem.c +++ b/arch/sparc/mm/highmem.c @@ -33,6 +33,7 @@ #include pgprot_t kmap_prot; +EXPORT_SYMBOL(kmap_prot); static pte_t *kmap_pte; -- 2.25.1