aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-25 12:42:19 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-25 12:42:19 -0500
commitaf95598744a83506063b411d81c4f819bf774f62 (patch)
treee0ad781a5c7718bb40f0b0f4cd47ada937f21d7b /include
parent4ad5bd25683ae3a913efb7d5afb7ddf2b2ef09db (diff)
parent9a94c5793a7b44720f19ebb71b636bc9c31b44d8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/iommu.h2
-rw-r--r--include/asm-powerpc/page_64.h17
-rw-r--r--include/asm-powerpc/tce.h2
3 files changed, 13 insertions, 8 deletions
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h
index 6a35e6570c..f89f060508 100644
--- a/include/asm-powerpc/iommu.h
+++ b/include/asm-powerpc/iommu.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
3 * Rewrite, cleanup: 3 * Rewrite, cleanup:
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 58a3dd9a79..6642c01250 100644
--- a/include/asm-powerpc/page_64.h
+++ b/include/asm-powerpc/page_64.h
@@ -103,8 +103,9 @@ extern unsigned int HPAGE_SHIFT;
103#define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) 103#define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT)
104#define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) 104#define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT)
105 105
106#define LOW_ESID_MASK(addr, len) (((1U << (GET_ESID(addr+len-1)+1)) \ 106#define LOW_ESID_MASK(addr, len) \
107 - (1U << GET_ESID(addr))) & 0xffff) 107 (((1U << (GET_ESID(min((addr)+(len)-1, 0x100000000UL))+1)) \
108 - (1U << GET_ESID(min((addr), 0x100000000UL)))) & 0xffff)
108#define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ 109#define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \
109 - (1U << GET_HTLB_AREA(addr))) & 0xffff) 110 - (1U << GET_HTLB_AREA(addr))) & 0xffff)
110 111
@@ -113,17 +114,21 @@ extern unsigned int HPAGE_SHIFT;
113#define ARCH_HAS_SETCLEAR_HUGE_PTE 114#define ARCH_HAS_SETCLEAR_HUGE_PTE
114 115
115#define touches_hugepage_low_range(mm, addr, len) \ 116#define touches_hugepage_low_range(mm, addr, len) \
116 (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas) 117 (((addr) < 0x100000000UL) \
118 && (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas))
117#define touches_hugepage_high_range(mm, addr, len) \ 119#define touches_hugepage_high_range(mm, addr, len) \
118 (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas) 120 ((((addr) + (len)) > 0x100000000UL) \
121 && (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas))
119 122
120#define __within_hugepage_low_range(addr, len, segmask) \ 123#define __within_hugepage_low_range(addr, len, segmask) \
121 ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)) 124 ( (((addr)+(len)) <= 0x100000000UL) \
125 && ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)))
122#define within_hugepage_low_range(addr, len) \ 126#define within_hugepage_low_range(addr, len) \
123 __within_hugepage_low_range((addr), (len), \ 127 __within_hugepage_low_range((addr), (len), \
124 current->mm->context.low_htlb_areas) 128 current->mm->context.low_htlb_areas)
125#define __within_hugepage_high_range(addr, len, zonemask) \ 129#define __within_hugepage_high_range(addr, len, zonemask) \
126 ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)) 130 ( ((addr) >= 0x100000000UL) \
131 && ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)))
127#define within_hugepage_high_range(addr, len) \ 132#define within_hugepage_high_range(addr, len) \
128 __within_hugepage_high_range((addr), (len), \ 133 __within_hugepage_high_range((addr), (len), \
129 current->mm->context.high_htlb_areas) 134 current->mm->context.high_htlb_areas)
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h
index d099d5200f..980a094fd5 100644
--- a/include/asm-powerpc/tce.h
+++ b/include/asm-powerpc/tce.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation 2 * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
3 * Rewrite, cleanup: 3 * Rewrite, cleanup:
4 * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation 4 * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by