linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@suse.de>,
	Hugh Dickins <hugh@veritas.com>,
	Linux Memory Management <linux-mm@kvack.org>
Subject: [PATCH 1/11] parentheses to x86-64 macro
Date: Wed, 22 Dec 2004 20:52:48 +1100	[thread overview]
Message-ID: <41C943F0.4090006@yahoo.com.au> (raw)
In-Reply-To: <41C94361.6070909@yahoo.com.au>

[-- Attachment #1: Type: text/plain, Size: 97 bytes --]

1/11

Not strictly a 4level patch, but a warning was spat at me at one
stage during my travels.


[-- Attachment #2: x86-64-fix-macro.patch --]
[-- Type: text/plain, Size: 893 bytes --]



Add parentheses to x86-64's pgd_index's arguments

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>


---

 linux-2.6-npiggin/include/asm-x86_64/pgtable.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN include/asm-x86_64/pgtable.h~x86-64-fix-macro include/asm-x86_64/pgtable.h
--- linux-2.6/include/asm-x86_64/pgtable.h~x86-64-fix-macro	2004-12-22 20:29:41.000000000 +1100
+++ linux-2.6-npiggin/include/asm-x86_64/pgtable.h	2004-12-22 20:35:55.000000000 +1100
@@ -311,7 +311,7 @@ static inline int pmd_large(pmd_t pte) {
 
 /* PGD - Level3 access */
 /* to find an entry in a page-table-directory. */
-#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
 static inline pgd_t *__pgd_offset_k(pgd_t *pgd, unsigned long address)
 { 
 	return pgd + pgd_index(address);

_

  reply	other threads:[~2004-12-22  9:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-22  9:50 [PATCH 0/11] alternate 4-level page tables patches (take 2) Nick Piggin
2004-12-22  9:52 ` Nick Piggin [this message]
2004-12-22  9:53   ` [PATCH 2/11] generic 3-level nopmd folding header Nick Piggin
2004-12-22  9:54     ` [PATCH 3/11] convert i386 to generic nopmd header Nick Piggin
2004-12-22  9:54       ` [PATCH 4/11] split copy_page_range Nick Piggin
2004-12-22  9:55         ` [PATCH 5/11] replace clear_page_tables with clear_page_range Nick Piggin
2004-12-22  9:56           ` [PATCH 6/11] introduce 4-level nopud folding header Nick Piggin
2004-12-22  9:57             ` [PATCH 7/11] convert Linux to 4-level page tables Nick Piggin
2004-12-22  9:59               ` [PATCH 8/11] introduce fallback header Nick Piggin
2004-12-22 10:00                 ` [PATCH 9/11] convert i386 to generic nopud header Nick Piggin
2004-12-22 10:00                   ` [PATCH 10/11] convert ia64 " Nick Piggin
2004-12-22 10:01                     ` [PATCH 11/11] convert x86_64 to 4 level page tables Nick Piggin
2004-12-22 10:18 ` [PATCH 0/11] alternate 4-level page tables patches (take 2) Andi Kleen

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=41C943F0.4090006@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@osdl.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