aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/alpha/include/asm/a.out.h2
-rw-r--r--arch/alpha/kernel/pci_iommu.c17
-rw-r--r--arch/alpha/kernel/smp.c1
4 files changed, 8 insertions, 15 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index ee35226c44e9..a0f642b6a4b9 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -222,8 +222,7 @@ config ALPHA_MIATA
222 bool "Miata" 222 bool "Miata"
223 help 223 help
224 The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a, 224 The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a,
225 or 600au). There is an Installation HOWTO for this hardware at 225 or 600au).
226 <http://eijk.homelinux.org/~stefan/miata.html>.
227 226
228config ALPHA_MIKASA 227config ALPHA_MIKASA
229 bool "Mikasa" 228 bool "Mikasa"
diff --git a/arch/alpha/include/asm/a.out.h b/arch/alpha/include/asm/a.out.h
index 02ce8473870a..acdc681231cb 100644
--- a/arch/alpha/include/asm/a.out.h
+++ b/arch/alpha/include/asm/a.out.h
@@ -95,7 +95,7 @@ struct exec
95 Worse, we have to notice the start address before swapping to use 95 Worse, we have to notice the start address before swapping to use
96 /sbin/loader, which of course is _not_ a TASO application. */ 96 /sbin/loader, which of course is _not_ a TASO application. */
97#define SET_AOUT_PERSONALITY(BFPM, EX) \ 97#define SET_AOUT_PERSONALITY(BFPM, EX) \
98 set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \ 98 set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \
99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) 99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
100 100
101#endif /* __KERNEL__ */ 101#endif /* __KERNEL__ */
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 2179c602032a..b9094da05d7a 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -41,13 +41,6 @@ mk_iommu_pte(unsigned long paddr)
41 return (paddr >> (PAGE_SHIFT-1)) | 1; 41 return (paddr >> (PAGE_SHIFT-1)) | 1;
42} 42}
43 43
44static inline long
45calc_npages(long bytes)
46{
47 return (bytes + PAGE_SIZE - 1) >> PAGE_SHIFT;
48}
49
50
51/* Return the minimum of MAX or the first power of two larger 44/* Return the minimum of MAX or the first power of two larger
52 than main memory. */ 45 than main memory. */
53 46
@@ -287,7 +280,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
287 if (!arena || arena->dma_base + arena->size - 1 > max_dma) 280 if (!arena || arena->dma_base + arena->size - 1 > max_dma)
288 arena = hose->sg_isa; 281 arena = hose->sg_isa;
289 282
290 npages = calc_npages((paddr & ~PAGE_MASK) + size); 283 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
291 284
292 /* Force allocation to 64KB boundary for ISA bridges. */ 285 /* Force allocation to 64KB boundary for ISA bridges. */
293 if (pdev && pdev == isa_bridge) 286 if (pdev && pdev == isa_bridge)
@@ -387,7 +380,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
387 BUG(); 380 BUG();
388 } 381 }
389 382
390 npages = calc_npages((dma_addr & ~PAGE_MASK) + size); 383 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
391 384
392 spin_lock_irqsave(&arena->lock, flags); 385 spin_lock_irqsave(&arena->lock, flags);
393 386
@@ -580,7 +573,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
580 contiguous. */ 573 contiguous. */
581 574
582 paddr &= ~PAGE_MASK; 575 paddr &= ~PAGE_MASK;
583 npages = calc_npages(paddr + size); 576 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
584 dma_ofs = iommu_arena_alloc(dev, arena, npages, 0); 577 dma_ofs = iommu_arena_alloc(dev, arena, npages, 0);
585 if (dma_ofs < 0) { 578 if (dma_ofs < 0) {
586 /* If we attempted a direct map above but failed, die. */ 579 /* If we attempted a direct map above but failed, die. */
@@ -616,7 +609,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
616 sg++; 609 sg++;
617 } 610 }
618 611
619 npages = calc_npages((paddr & ~PAGE_MASK) + size); 612 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
620 613
621 paddr &= PAGE_MASK; 614 paddr &= PAGE_MASK;
622 for (i = 0; i < npages; ++i, paddr += PAGE_SIZE) 615 for (i = 0; i < npages; ++i, paddr += PAGE_SIZE)
@@ -775,7 +768,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
775 DBGA(" (%ld) sg [%lx,%lx]\n", 768 DBGA(" (%ld) sg [%lx,%lx]\n",
776 sg - end + nents, addr, size); 769 sg - end + nents, addr, size);
777 770
778 npages = calc_npages((addr & ~PAGE_MASK) + size); 771 npages = iommu_num_pages(addr, size, PAGE_SIZE);
779 ofs = (addr - arena->dma_base) >> PAGE_SHIFT; 772 ofs = (addr - arena->dma_base) >> PAGE_SHIFT;
780 iommu_arena_free(arena, ofs, npages); 773 iommu_arena_free(arena, ofs, npages);
781 774
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 06b6fdab639f..e657c45d91d2 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -27,6 +27,7 @@
27#include <linux/cache.h> 27#include <linux/cache.h>
28#include <linux/profile.h> 28#include <linux/profile.h>
29#include <linux/bitops.h> 29#include <linux/bitops.h>
30#include <linux/cpu.h>
30 31
31#include <asm/hwrpb.h> 32#include <asm/hwrpb.h>
32#include <asm/ptrace.h> 33#include <asm/ptrace.h>