Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits) uio: make uio_info's name and version const UIO: Documentation for UIO ioport info handling UIO: Pass information about ioports to userspace (V2) UIO: uio_pdrv_genirq: allow custom irq_flags UIO: use pci_ioremap_bar() in drivers/uio arm: struct device - replace bus_id with dev_name(), dev_set_name() libata: struct device - replace bus_id with dev_name(), dev_set_name() avr: struct device - replace bus_id with dev_name(), dev_set_name() block: struct device - replace bus_id with dev_name(), dev_set_name() chris: struct device - replace bus_id with dev_name(), dev_set_name() dmi: struct device - replace bus_id with dev_name(), dev_set_name() gadget: struct device - replace bus_id with dev_name(), dev_set_name() gpio: struct device - replace bus_id with dev_name(), dev_set_name() gpu: struct device - replace bus_id with dev_name(), dev_set_name() hwmon: struct device - replace bus_id with dev_name(), dev_set_name() i2o: struct device - replace bus_id with dev_name(), dev_set_name() IA64: struct device - replace bus_id with dev_name(), dev_set_name() i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name() infiniband: struct device - replace bus_id with dev_name(), dev_set_name() ISDN: struct device - replace bus_id with dev_name(), dev_set_name() ...
This commit is contained in:
@@ -277,40 +277,34 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
|
||||
dynamic_enabled = DYNAMIC_ENABLED_NONE;
|
||||
}
|
||||
err = 0;
|
||||
} else {
|
||||
if (elem) {
|
||||
if (value && (elem->enable == 0)) {
|
||||
dynamic_printk_enabled |=
|
||||
(1LL << elem->hash1);
|
||||
dynamic_printk_enabled2 |=
|
||||
(1LL << elem->hash2);
|
||||
elem->enable = 1;
|
||||
num_enabled++;
|
||||
dynamic_enabled = DYNAMIC_ENABLED_SOME;
|
||||
err = 0;
|
||||
printk(KERN_DEBUG
|
||||
"debugging enabled for module %s\n",
|
||||
elem->name);
|
||||
} else if (!value && (elem->enable == 1)) {
|
||||
elem->enable = 0;
|
||||
num_enabled--;
|
||||
if (disabled_hash(elem->hash1, true))
|
||||
dynamic_printk_enabled &=
|
||||
} else if (elem) {
|
||||
if (value && (elem->enable == 0)) {
|
||||
dynamic_printk_enabled |= (1LL << elem->hash1);
|
||||
dynamic_printk_enabled2 |= (1LL << elem->hash2);
|
||||
elem->enable = 1;
|
||||
num_enabled++;
|
||||
dynamic_enabled = DYNAMIC_ENABLED_SOME;
|
||||
err = 0;
|
||||
printk(KERN_DEBUG
|
||||
"debugging enabled for module %s\n",
|
||||
elem->name);
|
||||
} else if (!value && (elem->enable == 1)) {
|
||||
elem->enable = 0;
|
||||
num_enabled--;
|
||||
if (disabled_hash(elem->hash1, true))
|
||||
dynamic_printk_enabled &=
|
||||
~(1LL << elem->hash1);
|
||||
if (disabled_hash(elem->hash2, false))
|
||||
dynamic_printk_enabled2 &=
|
||||
if (disabled_hash(elem->hash2, false))
|
||||
dynamic_printk_enabled2 &=
|
||||
~(1LL << elem->hash2);
|
||||
if (num_enabled)
|
||||
dynamic_enabled =
|
||||
DYNAMIC_ENABLED_SOME;
|
||||
else
|
||||
dynamic_enabled =
|
||||
DYNAMIC_ENABLED_NONE;
|
||||
err = 0;
|
||||
printk(KERN_DEBUG
|
||||
"debugging disabled for module "
|
||||
"%s\n", elem->name);
|
||||
}
|
||||
if (num_enabled)
|
||||
dynamic_enabled = DYNAMIC_ENABLED_SOME;
|
||||
else
|
||||
dynamic_enabled = DYNAMIC_ENABLED_NONE;
|
||||
err = 0;
|
||||
printk(KERN_DEBUG
|
||||
"debugging disabled for module %s\n",
|
||||
elem->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
43
lib/klist.c
43
lib/klist.c
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <linux/klist.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
/*
|
||||
* Use the lowest bit of n_klist to mark deleted nodes and exclude
|
||||
@@ -108,7 +109,6 @@ static void add_tail(struct klist *k, struct klist_node *n)
|
||||
static void klist_node_init(struct klist *k, struct klist_node *n)
|
||||
{
|
||||
INIT_LIST_HEAD(&n->n_node);
|
||||
init_completion(&n->n_removed);
|
||||
kref_init(&n->n_ref);
|
||||
knode_set_klist(n, k);
|
||||
if (k->get)
|
||||
@@ -171,13 +171,34 @@ void klist_add_before(struct klist_node *n, struct klist_node *pos)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(klist_add_before);
|
||||
|
||||
struct klist_waiter {
|
||||
struct list_head list;
|
||||
struct klist_node *node;
|
||||
struct task_struct *process;
|
||||
int woken;
|
||||
};
|
||||
|
||||
static DEFINE_SPINLOCK(klist_remove_lock);
|
||||
static LIST_HEAD(klist_remove_waiters);
|
||||
|
||||
static void klist_release(struct kref *kref)
|
||||
{
|
||||
struct klist_waiter *waiter, *tmp;
|
||||
struct klist_node *n = container_of(kref, struct klist_node, n_ref);
|
||||
|
||||
WARN_ON(!knode_dead(n));
|
||||
list_del(&n->n_node);
|
||||
complete(&n->n_removed);
|
||||
spin_lock(&klist_remove_lock);
|
||||
list_for_each_entry_safe(waiter, tmp, &klist_remove_waiters, list) {
|
||||
if (waiter->node != n)
|
||||
continue;
|
||||
|
||||
waiter->woken = 1;
|
||||
mb();
|
||||
wake_up_process(waiter->process);
|
||||
list_del(&waiter->list);
|
||||
}
|
||||
spin_unlock(&klist_remove_lock);
|
||||
knode_set_klist(n, NULL);
|
||||
}
|
||||
|
||||
@@ -217,8 +238,24 @@ EXPORT_SYMBOL_GPL(klist_del);
|
||||
*/
|
||||
void klist_remove(struct klist_node *n)
|
||||
{
|
||||
struct klist_waiter waiter;
|
||||
|
||||
waiter.node = n;
|
||||
waiter.process = current;
|
||||
waiter.woken = 0;
|
||||
spin_lock(&klist_remove_lock);
|
||||
list_add(&waiter.list, &klist_remove_waiters);
|
||||
spin_unlock(&klist_remove_lock);
|
||||
|
||||
klist_del(n);
|
||||
wait_for_completion(&n->n_removed);
|
||||
|
||||
for (;;) {
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
if (waiter.woken)
|
||||
break;
|
||||
schedule();
|
||||
}
|
||||
__set_current_state(TASK_RUNNING);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(klist_remove);
|
||||
|
||||
|
@@ -165,7 +165,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
||||
/* keys passed in from the caller */
|
||||
if (envp_ext) {
|
||||
for (i = 0; envp_ext[i]; i++) {
|
||||
retval = add_uevent_var(env, envp_ext[i]);
|
||||
retval = add_uevent_var(env, "%s", envp_ext[i]);
|
||||
if (retval)
|
||||
goto exit;
|
||||
}
|
||||
@@ -225,8 +225,10 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
||||
}
|
||||
|
||||
NETLINK_CB(skb).dst_group = 1;
|
||||
netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL);
|
||||
}
|
||||
retval = netlink_broadcast(uevent_sock, skb, 0, 1,
|
||||
GFP_KERNEL);
|
||||
} else
|
||||
retval = -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -647,7 +647,7 @@ swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
|
||||
* the damage, or panic when the transfer is too big.
|
||||
*/
|
||||
printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
|
||||
"device %s\n", size, dev ? dev->bus_id : "?");
|
||||
"device %s\n", size, dev ? dev_name(dev) : "?");
|
||||
|
||||
if (size > io_tlb_overflow && do_panic) {
|
||||
if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL)
|
||||
|
Reference in New Issue
Block a user