diff options
| -rw-r--r-- | arch/powerpc/Makefile | 16 | ||||
| -rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/platforms/iseries/iommu.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/dart.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/u3_iommu.c | 4 | ||||
| -rw-r--r-- | include/asm-powerpc/iommu.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/page_64.h | 17 | ||||
| -rw-r--r-- | include/asm-powerpc/tce.h | 2 |
9 files changed, 29 insertions, 20 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 98f67c78d1bd..a13eb575f834 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
| @@ -61,15 +61,17 @@ endif | |||
| 61 | LDFLAGS_vmlinux := -Bstatic | 61 | LDFLAGS_vmlinux := -Bstatic |
| 62 | 62 | ||
| 63 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 63 | # The -Iarch/$(ARCH)/include is temporary while we are merging |
| 64 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | 64 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include |
| 65 | AFLAGS += -Iarch/$(ARCH) | 65 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
| 66 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe | ||
| 67 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 66 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
| 68 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple | 67 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
| 69 | CFLAGS += $(CFLAGS-y) | 68 | CPPFLAGS += $(CPPFLAGS-y) |
| 69 | AFLAGS += $(AFLAGS-y) | ||
| 70 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | ||
| 70 | CPP = $(CC) -E $(CFLAGS) | 71 | CPP = $(CC) -E $(CFLAGS) |
| 71 | # Temporary hack until we have migrated to asm-powerpc | 72 | # Temporary hack until we have migrated to asm-powerpc |
| 72 | LINUXINCLUDE += -Iarch/$(ARCH)/include | 73 | LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include |
| 74 | LINUXINCLUDE += $(LINUXINCLUDE-y) | ||
| 73 | 75 | ||
| 74 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 76 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ |
| 75 | 77 | ||
| @@ -173,11 +175,13 @@ archclean: | |||
| 173 | 175 | ||
| 174 | archprepare: checkbin | 176 | archprepare: checkbin |
| 175 | 177 | ||
| 178 | ifeq ($(CONFIG_PPC32),y) | ||
| 176 | # Temporary hack until we have migrated to asm-powerpc | 179 | # Temporary hack until we have migrated to asm-powerpc |
| 177 | include/asm: arch/$(ARCH)/include/asm | 180 | include/asm: arch/$(ARCH)/include/asm |
| 178 | arch/$(ARCH)/include/asm: FORCE | 181 | arch/$(ARCH)/include/asm: FORCE |
| 179 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi | 182 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi |
| 180 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm | 183 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm |
| 184 | endif | ||
| 181 | 185 | ||
| 182 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 186 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
| 183 | # to stdout and these checks are run even on install targets. | 187 | # to stdout and these checks are run even on install targets. |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index f867bba893ca..6bc9dbad7dea 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
| @@ -295,7 +295,7 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
| 295 | if (addr < 0x100000000UL) | 295 | if (addr < 0x100000000UL) |
| 296 | err = open_low_hpage_areas(current->mm, | 296 | err = open_low_hpage_areas(current->mm, |
| 297 | LOW_ESID_MASK(addr, len)); | 297 | LOW_ESID_MASK(addr, len)); |
| 298 | if ((addr + len) >= 0x100000000UL) | 298 | if ((addr + len) > 0x100000000UL) |
| 299 | err = open_high_hpage_areas(current->mm, | 299 | err = open_high_hpage_areas(current->mm, |
| 300 | HTLB_AREA_MASK(addr, len)); | 300 | HTLB_AREA_MASK(addr, len)); |
| 301 | if (err) { | 301 | if (err) { |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bf081b345820..2b54eeb2c899 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 6 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
| 7 | * | 7 | * |
| 8 | * Dynamic DMA mapping support, iSeries-specific parts. | 8 | * Dynamic DMA mapping support, iSeries-specific parts. |
| 9 | * | 9 | * |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 97ba5214417f..c78f2b290a73 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * Rewrite, cleanup: | 6 | * Rewrite, cleanup: |
| 7 | * | 7 | * |
| 8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
| 9 | * | 9 | * |
| 10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. | 10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. |
| 11 | * | 11 | * |
diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h index ea8f0d9eed8a..33ed9ed7fc1e 100644 --- a/arch/powerpc/sysdev/dart.h +++ b/arch/powerpc/sysdev/dart.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 2 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index f32baf7f4693..5c1a26a6d00c 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/powerpc/sysdev/u3_iommu.c | 2 | * arch/powerpc/sysdev/u3_iommu.c |
| 3 | * | 3 | * |
| 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 | * Based on pSeries_iommu.c: | 6 | * Based on pSeries_iommu.c: |
| 7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
| 8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
| 9 | * | 9 | * |
| 10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. | 10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. |
| 11 | * | 11 | * |
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 6a35e6570ccd..f89f06050893 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 58a3dd9a79ec..6642c0125001 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 d099d5200f9b..980a094fd5a7 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 |
