aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-01-03 10:58:53 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-03 10:58:53 -0500
commita18ceba7b40e24a9da87249bd74f16ea5abd6894 (patch)
tree5ce615d345e720ddabf95c46fb62287ee763ad4e /lib
parentMerge branch 'master' (diff)
parentLinux v2.6.15 (diff)
downloadlinux-dev-a18ceba7b40e24a9da87249bd74f16ea5abd6894.tar.xz
linux-dev-a18ceba7b40e24a9da87249bd74f16ea5abd6894.zip
Merge branch 'master'
Diffstat (limited to 'lib')
-rw-r--r--lib/spinlock_debug.c18
-rw-r--r--lib/swiotlb.c5
2 files changed, 13 insertions, 10 deletions
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index 906ad101eab3..dcd4be9bd4e5 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -20,7 +20,8 @@ static void spin_bug(spinlock_t *lock, const char *msg)
if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
owner = lock->owner;
printk("BUG: spinlock %s on CPU#%d, %s/%d\n",
- msg, smp_processor_id(), current->comm, current->pid);
+ msg, raw_smp_processor_id(),
+ current->comm, current->pid);
printk(" lock: %p, .magic: %08x, .owner: %s/%d, .owner_cpu: %d\n",
lock, lock->magic,
owner ? owner->comm : "<none>",
@@ -78,8 +79,8 @@ static void __spin_lock_debug(spinlock_t *lock)
if (print_once) {
print_once = 0;
printk("BUG: spinlock lockup on CPU#%d, %s/%d, %p\n",
- smp_processor_id(), current->comm, current->pid,
- lock);
+ raw_smp_processor_id(), current->comm,
+ current->pid, lock);
dump_stack();
}
}
@@ -120,7 +121,8 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
if (xchg(&print_once, 0)) {
printk("BUG: rwlock %s on CPU#%d, %s/%d, %p\n", msg,
- smp_processor_id(), current->comm, current->pid, lock);
+ raw_smp_processor_id(), current->comm,
+ current->pid, lock);
dump_stack();
#ifdef CONFIG_SMP
/*
@@ -148,8 +150,8 @@ static void __read_lock_debug(rwlock_t *lock)
if (print_once) {
print_once = 0;
printk("BUG: read-lock lockup on CPU#%d, %s/%d, %p\n",
- smp_processor_id(), current->comm, current->pid,
- lock);
+ raw_smp_processor_id(), current->comm,
+ current->pid, lock);
dump_stack();
}
}
@@ -220,8 +222,8 @@ static void __write_lock_debug(rwlock_t *lock)
if (print_once) {
print_once = 0;
printk("BUG: write-lock lockup on CPU#%d, %s/%d, %p\n",
- smp_processor_id(), current->comm, current->pid,
- lock);
+ raw_smp_processor_id(), current->comm,
+ current->pid, lock);
dump_stack();
}
}
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 57216f3544ca..1ff8dcebf7c6 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -704,8 +704,9 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
addr = SG_ENT_VIRT_ADDRESS(sg);
dev_addr = virt_to_phys(addr);
if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
- sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir));
- if (!sg->dma_address) {
+ void *map = map_single(hwdev, addr, sg->length, dir);
+ sg->dma_address = virt_to_bus(map);
+ if (!map) {
/* Don't panic here, we expect map_sg users
to do proper error handling. */
swiotlb_full(hwdev, sg->length, dir, 0);