lkml.org 
[lkml]   [2003]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: i386 pgd_index() doesn't parenthesize its arg
PAE's pte_none() and pte_pfn() evaluate their arguments twice;
analogous fixes have been made to other things; c.f. pgtable.h's long
list of one-line inlines with parentheses still around their args.


===== include/asm-i386/pgtable-3level.h 1.8 vs edited =====
--- 1.8/include/asm-i386/pgtable-3level.h Fri Jul 26 06:23:51 2002
+++ edited/include/asm-i386/pgtable-3level.h Thu Jan 16 21:59:08 2003
@@ -89,8 +89,8 @@
}

#define pte_page(x) pfn_to_page(pte_pfn(x))
-#define pte_none(x) (!(x).pte_low && !(x).pte_high)
-#define pte_pfn(x) (((x).pte_low >> PAGE_SHIFT) | ((x).pte_high << (32 - PAGE_SHIFT)))
+static inline int pte_none(pte_t pte) { return !pte.pte_low && !pte.pte_high; }
+static inline unsigned long pte_pfn(pte_t pte) { return (pte.pte_low >> PAGE_SHIFT) | (pte.pte_high << (32 - PAGE_SHIFT)); }

static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.022 / U:2.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site