diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-17 12:20:26 -0400 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-17 12:20:26 -0400 |
commit | 651dab4264e4ba0e563f5ff56f748127246e9065 (patch) | |
tree | 016630974bdcb00fe529b673f96d389e0fd6dc94 /arch/alpha/kernel | |
parent | 40b8606253552109815786e5d4b0de98782d31f5 (diff) | |
parent | 2e532d68a2b3e2aa6b19731501222069735c741c (diff) |
Merge commit 'linus/master' into merge-linus
Conflicts:
arch/x86/kvm/i8254.c
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r-- | arch/alpha/kernel/pci_iommu.c | 17 | ||||
-rw-r--r-- | arch/alpha/kernel/smp.c | 4 |
2 files changed, 9 insertions, 12 deletions
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 | ||
44 | static inline long | ||
45 | calc_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 83df541650fc..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> |
@@ -149,6 +150,9 @@ smp_callin(void) | |||
149 | atomic_inc(&init_mm.mm_count); | 150 | atomic_inc(&init_mm.mm_count); |
150 | current->active_mm = &init_mm; | 151 | current->active_mm = &init_mm; |
151 | 152 | ||
153 | /* inform the notifiers about the new cpu */ | ||
154 | notify_cpu_starting(cpuid); | ||
155 | |||
152 | /* Must have completely accurate bogos. */ | 156 | /* Must have completely accurate bogos. */ |
153 | local_irq_enable(); | 157 | local_irq_enable(); |
154 | 158 | ||