[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0850eb0213de9da88544ff7fae72dc6d06d2b441.1453239349.git.luto@kernel.org>
Date: Tue, 19 Jan 2016 13:38:59 -0800
From: Andy Lutomirski <luto@...nel.org>
To: x86@...nel.org
Cc: Arjan van de Ven <arjan@...ux.intel.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org,
Stephen Smalley <sds@...ho.nsa.gov>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>, hpa@...or.com,
Mike Galbraith <efault@....de>,
Peter Zijlstra <peterz@...radead.org>,
Pavel Machek <pavel@....cz>, Andy Lutomirski <luto@...nel.org>
Subject: [PATCH v2 2/2] x86/mm: Make kmap_prot into a #define
The value (once we initialize it) is a foregone conclusion. Make it
a #define to save a tiny amount of text and data size and to make it
more comprehensible.
Signed-off-by: Andy Lutomirski <luto@...nel.org>
---
arch/x86/include/asm/fixmap.h | 2 +-
arch/x86/mm/init_32.c | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index 32c60a02ec80..ce941b7e7900 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -142,7 +142,7 @@ extern void reserve_top_address(unsigned long reserve);
extern int fixmaps_set;
extern pte_t *kmap_pte;
-extern pgprot_t kmap_prot;
+#define kmap_prot PAGE_KERNEL
extern pte_t *pkmap_page_table;
void __native_set_fixmap(enum fixed_addresses idx, pte_t pte);
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index cb4ef3de61f9..a4bb1c7ab65e 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -388,7 +388,6 @@ repeat:
}
pte_t *kmap_pte;
-pgprot_t kmap_prot;
static inline pte_t *kmap_get_fixmap_pte(unsigned long vaddr)
{
@@ -405,8 +404,6 @@ static void __init kmap_init(void)
*/
kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN);
kmap_pte = kmap_get_fixmap_pte(kmap_vstart);
-
- kmap_prot = PAGE_KERNEL;
}
#ifdef CONFIG_HIGHMEM
--
2.5.0
Powered by blists - more mailing lists