diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-27 08:30:07 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-27 08:30:07 -0400 |
commit | efda9452046bdd707b23a85b7846ec33548f84f1 (patch) | |
tree | f08c915049ea1829ba115cd41a0ba28ddf184e07 /arch/ppc64 | |
parent | b01f2cc1c37ac3d5ca313c90370a586dffe5aca9 (diff) | |
parent | 36676bcbf9f6bcbea9d06e67ee8d04eacde54952 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/iommu.c | 7 | ||||
-rw-r--r-- | arch/ppc64/kernel/setup.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c index 8316426ccaf6..845eebd1e28d 100644 --- a/arch/ppc64/kernel/iommu.c +++ b/arch/ppc64/kernel/iommu.c | |||
@@ -242,7 +242,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
242 | dma_addr_t dma_next = 0, dma_addr; | 242 | dma_addr_t dma_next = 0, dma_addr; |
243 | unsigned long flags; | 243 | unsigned long flags; |
244 | struct scatterlist *s, *outs, *segstart; | 244 | struct scatterlist *s, *outs, *segstart; |
245 | int outcount; | 245 | int outcount, incount; |
246 | unsigned long handle; | 246 | unsigned long handle; |
247 | 247 | ||
248 | BUG_ON(direction == DMA_NONE); | 248 | BUG_ON(direction == DMA_NONE); |
@@ -252,6 +252,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
252 | 252 | ||
253 | outs = s = segstart = &sglist[0]; | 253 | outs = s = segstart = &sglist[0]; |
254 | outcount = 1; | 254 | outcount = 1; |
255 | incount = nelems; | ||
255 | handle = 0; | 256 | handle = 0; |
256 | 257 | ||
257 | /* Init first segment length for backout at failure */ | 258 | /* Init first segment length for backout at failure */ |
@@ -338,10 +339,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
338 | 339 | ||
339 | DBG("mapped %d elements:\n", outcount); | 340 | DBG("mapped %d elements:\n", outcount); |
340 | 341 | ||
341 | /* For the sake of iommu_free_sg, we clear out the length in the | 342 | /* For the sake of iommu_unmap_sg, we clear out the length in the |
342 | * next entry of the sglist if we didn't fill the list completely | 343 | * next entry of the sglist if we didn't fill the list completely |
343 | */ | 344 | */ |
344 | if (outcount < nelems) { | 345 | if (outcount < incount) { |
345 | outs++; | 346 | outs++; |
346 | outs->dma_address = DMA_ERROR_CODE; | 347 | outs->dma_address = DMA_ERROR_CODE; |
347 | outs->dma_length = 0; | 348 | outs->dma_length = 0; |
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 687e85595208..e9c24d2dbd91 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -706,6 +706,8 @@ void machine_power_off(void) | |||
706 | local_irq_disable(); | 706 | local_irq_disable(); |
707 | while (1) ; | 707 | while (1) ; |
708 | } | 708 | } |
709 | /* Used by the G5 thermal driver */ | ||
710 | EXPORT_SYMBOL_GPL(machine_power_off); | ||
709 | 711 | ||
710 | void machine_halt(void) | 712 | void machine_halt(void) |
711 | { | 713 | { |