public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: gorcunov@gmail.com
To: mingo@redhat.com
Cc: tglx@linutronix.de, hpa@zytor.com, gorcunov@gmail.com,
	linux-kernel@vger.kernel.org
Subject: [patch 4/4] x86: relocate_kernel - use predefined macroses for page attributes
Date: Sun, 23 Mar 2008 00:00:09 +0300	[thread overview]
Message-ID: <20080322210311.454621432@gmail.com> (raw)
In-Reply-To: 20080322210005.117475478@gmail.com

[-- Attachment #1: x86-page-attr --]
[-- Type: text/plain, Size: 1591 bytes --]

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/relocate_kernel_32.S
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/relocate_kernel_32.S	2008-03-22 22:22:16.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/relocate_kernel_32.S	2008-03-22 22:22:17.000000000 +0300
@@ -10,14 +10,15 @@
 #include <asm/page.h>
 #include <asm/kexec.h>
 #include <asm/processor-flags.h>
+#include <asm/pgtable.h>
 
 /*
  * Must be relocatable PIC code callable as a C function
  */
 
 #define PTR(x) (x << 2)
-#define PAGE_ATTR 0x63 /* _PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY */
-#define PAE_PGD_ATTR 0x01 /* _PAGE_PRESENT */
+#define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define PAE_PGD_ATTR (_PAGE_PRESENT)
 
 	.text
 	.align PAGE_SIZE
Index: linux-2.6.git/arch/x86/kernel/relocate_kernel_64.S
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/relocate_kernel_64.S	2008-03-22 22:22:16.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/relocate_kernel_64.S	2008-03-22 22:22:17.000000000 +0300
@@ -10,13 +10,14 @@
 #include <asm/page.h>
 #include <asm/kexec.h>
 #include <asm/processor-flags.h>
+#include <asm/pgtable.h>
 
 /*
  * Must be relocatable PIC code callable as a C function
  */
 
 #define PTR(x) (x << 3)
-#define PAGE_ATTR 0x63 /* _PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY */
+#define PAGE_ATTR (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
 
 	.text
 	.align PAGE_SIZE

-- 

  parent reply	other threads:[~2008-03-22 21:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22 21:00 [patch 0/4] x86 - relocate_kernel cleanup gorcunov
2008-03-22 21:00 ` [patch 1/4] x86: relocate_kernel_32.S - clear register in more elegant way gorcunov
2008-03-22 21:00 ` [patch 2/4] x86: relocate_kernel - use PAGE_SIZE instead of numeric constant gorcunov
2008-03-22 21:00 ` [patch 3/4] x86: relocate_kernel - use predefined macroses for processor state gorcunov
2008-03-22 21:00 ` gorcunov [this message]
2008-03-22 21:14 ` [patch 0/4] x86 - relocate_kernel cleanup H. Peter Anvin
2008-03-22 21:18   ` H. Peter Anvin
2008-03-22 21:38     ` Cyrill Gorcunov
2008-03-23 11:10     ` Cyrill Gorcunov
2008-03-25 15:57       ` Ingo Molnar
2008-03-25 17:34         ` Cyrill Gorcunov
2008-03-25 15:59 ` Ingo Molnar

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=20080322210311.454621432@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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