mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Minfei Huang <mnfhuang@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	pbonzini@redhat.com, akpm@linux-foundation.org, bp@suse.de
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Minfei Huang <mnfhuang@gmail.com>
Subject: [PATCH] x86/mm: Re-use the early_ioremap fixed area
Date: Wed, 29 Oct 2014 14:12:31 +0800	[thread overview]
Message-ID: <1414563151-7175-1-git-send-email-mnfhuang@gmail.com> (raw)

The FIXADDR_BOOT area is only used during boot for early_ioremap, and
it is unused when the ioremap is functional. vmalloc becomes available
after early boot so the FIXADDR_BOOT_START area is available for reuse.

The virtual address is more precious on i386, especially turning on the
high memory. So we can reuse the virtual address whichever we can.

The macros of FIXADDR_BOOT_START and FIXADDR_BOOT_SIZE donot use any
more.

Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
---
 arch/x86/include/asm/fixmap.h           | 2 --
 arch/x86/include/asm/highmem.h          | 4 +---
 arch/x86/include/asm/pgtable_32_types.h | 4 ++--
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index ffb1733..bf728e4 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -136,9 +136,7 @@ enum fixed_addresses {
 extern void reserve_top_address(unsigned long reserve);
 
 #define FIXADDR_SIZE	(__end_of_permanent_fixed_addresses << PAGE_SHIFT)
-#define FIXADDR_BOOT_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
 #define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
-#define FIXADDR_BOOT_START	(FIXADDR_TOP - FIXADDR_BOOT_SIZE)
 
 extern int fixmaps_set;
 
diff --git a/arch/x86/include/asm/highmem.h b/arch/x86/include/asm/highmem.h
index 302a323..49b7469 100644
--- a/arch/x86/include/asm/highmem.h
+++ b/arch/x86/include/asm/highmem.h
@@ -41,9 +41,7 @@ extern unsigned long highstart_pfn, highend_pfn;
  * FIXADDR_TOP
  * 			fixed_addresses
  * FIXADDR_START
- * 			temp fixed addresses
- * FIXADDR_BOOT_START
- * 			Persistent kmap area
+ *                     temp fixed addresses / Persistent kmap area
  * PKMAP_BASE
  * VMALLOC_END
  * 			Vmalloc area
diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h
index 2ac5fc8..9fb2f2b 100644
--- a/arch/x86/include/asm/pgtable_32_types.h
+++ b/arch/x86/include/asm/pgtable_32_types.h
@@ -37,13 +37,13 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
 #define LAST_PKMAP 1024
 #endif
 
-#define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1))	\
+#define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE * (LAST_PKMAP + 1))	\
 		    & PMD_MASK)
 
 #ifdef CONFIG_HIGHMEM
 # define VMALLOC_END	(PKMAP_BASE - 2 * PAGE_SIZE)
 #else
-# define VMALLOC_END	(FIXADDR_BOOT_START - 2 * PAGE_SIZE)
+# define VMALLOC_END	(FIXADDR_START - 2 * PAGE_SIZE)
 #endif
 
 #define MODULES_VADDR	VMALLOC_START
-- 
1.8.3.1


             reply	other threads:[~2014-10-29  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  6:12 Minfei Huang [this message]
2014-10-29  9:47 ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414563151-7175-1-git-send-email-mnfhuang@gmail.com \
    --to=mnfhuang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®