* access memory mapped registers
From: Muaddi, Cecilia @ 2003-01-09 22:00 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
This is probably one of those silly questions again, and I seem to be having
a lot of them lately.
I will like to access some memory mapped registers through user space
applications.
Do i just use the "mmap" function calls to map the physical memory to my
user space?
My BR/OR registers are set up properly to handle the addresses, but do i
need to configure
the kernel for those memory regions?
The address I am looking at is at physical location 0x60000000 and
0x40000000. My RAM space is mapped to
virtual address starting at 0xc0000000 (where the RAM's physical address is
from 0x0 - 0x00ffffff)
THank you very much for your help
Cecilia
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply
* remove usage of __MOD_XXX_USAGE_COUNT and derivatives
From: Anders Fugmann @ 2003-01-09 21:52 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Hi.
Attached is a trivial patch the converts the usage of the macros
__MOD_INC_USAGE_COUNT and __MOD_DEC_USAGE_COUNT to try_modules_get and
module_put.
Conversion enables module unloading on 2.5 kernels.
The patch is against 2.5.55. I have only tested ipv4 functionality, and
I see no reason that ipv6 shound not work also.
Please examine the patch, and if ok I will send it to Linus for kernel
inclusion (Unless someone on the list is the preferred person to do so -
maybe Harald Welte?).
Regards
Anders Fugmann
[-- Attachment #2: netfilter-2.5.diff --]
[-- Type: text/plain, Size: 23150 bytes --]
diff -r -u linux-2.5.55/net/ipv4/netfilter/arp_tables.c linux-2.5.55-new/net/ipv4/netfilter/arp_tables.c
--- linux-2.5.55/net/ipv4/netfilter/arp_tables.c 2003-01-09 05:04:22.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/arp_tables.c 2003-01-09 22:23:43.000000000 +0100
@@ -539,8 +539,7 @@
duprintf("check_entry: `%s' not found\n", t->u.user.name);
goto out;
}
- if (target->me)
- __MOD_INC_USE_COUNT(target->me);
+ try_module_get(target->me);
t->u.kernel.target = target;
up(&arpt_mutex);
@@ -554,8 +553,7 @@
t->u.target_size
- sizeof(*t),
e->comefrom)) {
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
duprintf("arp_tables: check failed for `%s'.\n",
t->u.kernel.target->name);
ret = -EINVAL;
@@ -622,8 +620,7 @@
if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->data,
t->u.target_size - sizeof(*t));
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
return 0;
}
@@ -918,12 +915,12 @@
/* Update module usage count based on number of rules */
duprintf("do_replace: oldnum=%u, initnum=%u, newnum=%u\n",
oldinfo->number, oldinfo->initial_entries, newinfo->number);
- if (t->me && (oldinfo->number <= oldinfo->initial_entries) &&
+ if ((oldinfo->number <= oldinfo->initial_entries) &&
(newinfo->number > oldinfo->initial_entries))
- __MOD_INC_USE_COUNT(t->me);
- else if (t->me && (oldinfo->number > oldinfo->initial_entries) &&
+ try_module_get(t->me);
+ else if ((oldinfo->number > oldinfo->initial_entries) &&
(newinfo->number <= oldinfo->initial_entries))
- __MOD_DEC_USE_COUNT(t->me);
+ module_put(t->me);
/* Get the old counters. */
get_counters(oldinfo, counters);
@@ -1110,17 +1107,17 @@
{
int ret;
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
ret = down_interruptible(&arpt_mutex);
if (ret != 0) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
if (!list_named_insert(&arpt_target, target)) {
duprintf("arpt_register_target: `%s' already in list!\n",
target->name);
ret = -EINVAL;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
up(&arpt_mutex);
return ret;
@@ -1131,7 +1128,7 @@
down(&arpt_mutex);
LIST_DELETE(&arpt_target, target);
up(&arpt_mutex);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
int arpt_register_table(struct arpt_table *table)
@@ -1141,12 +1138,12 @@
static struct arpt_table_info bootstrap
= { 0, 0, 0, { 0 }, { 0 }, { } };
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
newinfo = vmalloc(sizeof(struct arpt_table_info)
+ SMP_ALIGN(table->table->size) * NR_CPUS);
if (!newinfo) {
ret = -ENOMEM;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
memcpy(newinfo->entries, table->table->entries, table->table->size);
@@ -1159,14 +1156,14 @@
duprintf("arpt_register_table: translate table gives %d\n", ret);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
ret = down_interruptible(&arpt_mutex);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
@@ -1196,7 +1193,7 @@
free_unlock:
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
goto unlock;
}
@@ -1210,7 +1207,7 @@
ARPT_ENTRY_ITERATE(table->private->entries, table->private->size,
cleanup_entry, NULL);
vfree(table->private);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
/* The built-in targets: standard (NULL) and error. */
diff -r -u linux-2.5.55/net/ipv4/netfilter/ip_conntrack_core.c linux-2.5.55-new/net/ipv4/netfilter/ip_conntrack_core.c
--- linux-2.5.55/net/ipv4/netfilter/ip_conntrack_core.c 2003-01-09 05:03:49.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ip_conntrack_core.c 2003-01-09 22:23:43.000000000 +0100
@@ -1126,7 +1126,7 @@
int ip_conntrack_helper_register(struct ip_conntrack_helper *me)
{
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
WRITE_LOCK(&ip_conntrack_lock);
list_prepend(&helpers, me);
@@ -1165,7 +1165,7 @@
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
/* Refresh conntrack for this many jiffies. */
diff -r -u linux-2.5.55/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.5.55-new/net/ipv4/netfilter/ip_conntrack_standalone.c
--- linux-2.5.55/net/ipv4/netfilter/ip_conntrack_standalone.c 2003-01-09 05:04:13.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ip_conntrack_standalone.c 2003-01-09 22:23:43.000000000 +0100
@@ -310,7 +310,7 @@
}
list_prepend(&protocol_list, proto);
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
out:
WRITE_UNLOCK(&ip_conntrack_lock);
@@ -333,7 +333,7 @@
/* Remove all contrack entries for this protocol */
ip_ct_selective_cleanup(kill_proto, &proto->proto);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
static int __init init(void)
diff -r -u linux-2.5.55/net/ipv4/netfilter/ip_nat_helper.c linux-2.5.55-new/net/ipv4/netfilter/ip_nat_helper.c
--- linux-2.5.55/net/ipv4/netfilter/ip_nat_helper.c 2003-01-09 05:03:55.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ip_nat_helper.c 2003-01-09 22:28:37.000000000 +0100
@@ -368,10 +368,9 @@
if (me->me && !(me->flags & IP_NAT_HELPER_F_STANDALONE)) {
struct ip_conntrack_helper *ct_helper;
- if ((ct_helper = ip_ct_find_helper(&me->tuple))
- && ct_helper->me) {
- __MOD_INC_USE_COUNT(ct_helper->me);
- } else {
+ if (!(ct_helper = ip_ct_find_helper(&me->tuple)) ||
+ (!(try_module_get(ct_helper->me))))
+ {
/* We are a NAT helper for protocol X. If we need
* respective conntrack helper for protoccol X, compute
* conntrack helper name and try to load module */
@@ -387,11 +386,9 @@
tmp += 6;
sprintf(name, "ip_conntrack%s", tmp);
#ifdef CONFIG_KMOD
- if (!request_module(name)
- && (ct_helper = ip_ct_find_helper(&me->tuple))
- && ct_helper->me) {
- __MOD_INC_USE_COUNT(ct_helper->me);
- } else {
+ if (request_module(name)
+ || (!(ct_helper = ip_ct_find_helper(&me->tuple)))
+ || (!try_module_get(ct_helper->me))) {
printk("unable to load module %s\n", name);
return -EBUSY;
}
@@ -408,7 +405,8 @@
ret = -EBUSY;
else {
list_prepend(&helpers, me);
- MOD_INC_USE_COUNT;
+
+ try_module_get(THIS_MODULE);
}
WRITE_UNLOCK(&ip_nat_lock);
@@ -453,22 +451,17 @@
ip_ct_selective_cleanup(kill_helper, me);
if (found)
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
/* If we are no standalone NAT helper, we need to decrement usage count
* on our conntrack helper */
if (me->me && !(me->flags & IP_NAT_HELPER_F_STANDALONE)) {
struct ip_conntrack_helper *ct_helper;
- if ((ct_helper = ip_ct_find_helper(&me->tuple))
- && ct_helper->me) {
- __MOD_DEC_USE_COUNT(ct_helper->me);
- }
-#ifdef CONFIG_MODULES
- else
- printk("%s: unable to decrement usage count"
- " of conntrack helper %s\n",
- __FUNCTION__, me->me->name);
-#endif
+ if ((ct_helper = ip_ct_find_helper(&me->tuple)))
+ if (!try_module_get(ct_helper->me))
+ printk("%s: unable to decrement usage count"
+ " of conntrack helper %s\n",
+ __FUNCTION__, me->me->name);
}
}
diff -r -u linux-2.5.55/net/ipv4/netfilter/ip_nat_standalone.c linux-2.5.55-new/net/ipv4/netfilter/ip_nat_standalone.c
--- linux-2.5.55/net/ipv4/netfilter/ip_nat_standalone.c 2003-01-09 05:04:22.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ip_nat_standalone.c 2003-01-09 22:23:43.000000000 +0100
@@ -255,7 +255,7 @@
}
list_prepend(&protos, proto);
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
out:
WRITE_UNLOCK(&ip_nat_lock);
@@ -273,7 +273,7 @@
br_write_lock_bh(BR_NETPROTO_LOCK);
br_write_unlock_bh(BR_NETPROTO_LOCK);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
static int init_or_cleanup(int init)
@@ -314,13 +314,11 @@
goto cleanup_localoutops;
}
#endif
- if (ip_conntrack_module)
- __MOD_INC_USE_COUNT(ip_conntrack_module);
+ try_module_get(ip_conntrack_module);
return ret;
cleanup:
- if (ip_conntrack_module)
- __MOD_DEC_USE_COUNT(ip_conntrack_module);
+ module_put(ip_conntrack_module);
#ifdef CONFIG_IP_NF_NAT_LOCAL
nf_unregister_hook(&ip_nat_local_in_ops);
cleanup_localoutops:
diff -r -u linux-2.5.55/net/ipv4/netfilter/ip_tables.c linux-2.5.55-new/net/ipv4/netfilter/ip_tables.c
--- linux-2.5.55/net/ipv4/netfilter/ip_tables.c 2003-01-09 05:03:58.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ip_tables.c 2003-01-09 22:23:43.000000000 +0100
@@ -599,8 +599,7 @@
m->u.kernel.match->destroy(m->data,
m->u.match_size - sizeof(*m));
- if (m->u.kernel.match->me)
- __MOD_DEC_USE_COUNT(m->u.kernel.match->me);
+ module_put(m->u.kernel.match->me);
return 0;
}
@@ -650,8 +649,7 @@
duprintf("check_match: `%s' not found\n", m->u.user.name);
return ret;
}
- if (match->me)
- __MOD_INC_USE_COUNT(match->me);
+ try_module_get(match->me);
m->u.kernel.match = match;
up(&ipt_mutex);
@@ -659,8 +657,7 @@
&& !m->u.kernel.match->checkentry(name, ip, m->data,
m->u.match_size - sizeof(*m),
hookmask)) {
- if (m->u.kernel.match->me)
- __MOD_DEC_USE_COUNT(m->u.kernel.match->me);
+ module_put(m->u.kernel.match->me);
duprintf("ip_tables: check failed for `%s'.\n",
m->u.kernel.match->name);
return -EINVAL;
@@ -697,8 +694,7 @@
duprintf("check_entry: `%s' not found\n", t->u.user.name);
goto cleanup_matches;
}
- if (target->me)
- __MOD_INC_USE_COUNT(target->me);
+ try_module_get(target->me);
t->u.kernel.target = target;
up(&ipt_mutex);
@@ -712,8 +708,7 @@
t->u.target_size
- sizeof(*t),
e->comefrom)) {
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
duprintf("ip_tables: check failed for `%s'.\n",
t->u.kernel.target->name);
ret = -EINVAL;
@@ -785,8 +780,7 @@
if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->data,
t->u.target_size - sizeof(*t));
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
return 0;
}
@@ -1115,12 +1109,12 @@
/* Update module usage count based on number of rules */
duprintf("do_replace: oldnum=%u, initnum=%u, newnum=%u\n",
oldinfo->number, oldinfo->initial_entries, newinfo->number);
- if (t->me && (oldinfo->number <= oldinfo->initial_entries) &&
+ if ((oldinfo->number <= oldinfo->initial_entries) &&
(newinfo->number > oldinfo->initial_entries))
- __MOD_INC_USE_COUNT(t->me);
- else if (t->me && (oldinfo->number > oldinfo->initial_entries) &&
+ try_module_get(t->me);
+ else if ((oldinfo->number > oldinfo->initial_entries) &&
(newinfo->number <= oldinfo->initial_entries))
- __MOD_DEC_USE_COUNT(t->me);
+ module_put(t->me);
/* Get the old counters. */
get_counters(oldinfo, counters);
@@ -1319,17 +1313,17 @@
{
int ret;
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
ret = down_interruptible(&ipt_mutex);
if (ret != 0) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
if (!list_named_insert(&ipt_target, target)) {
duprintf("ipt_register_target: `%s' already in list!\n",
target->name);
ret = -EINVAL;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
up(&ipt_mutex);
return ret;
@@ -1341,7 +1335,7 @@
down(&ipt_mutex);
LIST_DELETE(&ipt_target, target);
up(&ipt_mutex);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
int
@@ -1349,16 +1343,16 @@
{
int ret;
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
ret = down_interruptible(&ipt_mutex);
if (ret != 0) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
if (!list_named_insert(&ipt_match, match)) {
duprintf("ipt_register_match: `%s' already in list!\n",
match->name);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
ret = -EINVAL;
}
up(&ipt_mutex);
@@ -1372,7 +1366,7 @@
down(&ipt_mutex);
LIST_DELETE(&ipt_match, match);
up(&ipt_mutex);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
int ipt_register_table(struct ipt_table *table)
@@ -1382,12 +1376,12 @@
static struct ipt_table_info bootstrap
= { 0, 0, 0, { 0 }, { 0 }, { } };
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
newinfo = vmalloc(sizeof(struct ipt_table_info)
+ SMP_ALIGN(table->table->size) * NR_CPUS);
if (!newinfo) {
ret = -ENOMEM;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
memcpy(newinfo->entries, table->table->entries, table->table->size);
@@ -1399,14 +1393,14 @@
table->table->underflow);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
ret = down_interruptible(&ipt_mutex);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
@@ -1436,7 +1430,7 @@
free_unlock:
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
goto unlock;
}
@@ -1450,7 +1444,7 @@
IPT_ENTRY_ITERATE(table->private->entries, table->private->size,
cleanup_entry, NULL);
vfree(table->private);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
/* Returns 1 if the port is matched by the range, 0 otherwise */
diff -r -u linux-2.5.55/net/ipv4/netfilter/ipchains_core.c linux-2.5.55-new/net/ipv4/netfilter/ipchains_core.c
--- linux-2.5.55/net/ipv4/netfilter/ipchains_core.c 2003-01-09 05:04:24.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ipchains_core.c 2003-01-09 22:23:43.000000000 +0100
@@ -839,7 +839,7 @@
i->branch->refcount--;
kfree(i);
i = tmp;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
return 0;
}
@@ -886,7 +886,7 @@
if (rule->branch) rule->branch->refcount++;
append_successful:
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
return 0;
}
@@ -917,7 +917,7 @@
f->next = frwl;
insert_successful:
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
return 0;
}
@@ -952,7 +952,7 @@
kfree(tmp);
}
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return 0;
}
@@ -1059,7 +1059,7 @@
else
chainptr->chain = ftmp->next;
kfree(ftmp);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
break;
}
@@ -1101,7 +1101,7 @@
tmp->next = tmp2->next;
kfree(tmp2);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return 0;
}
@@ -1154,7 +1154,7 @@
* user defined chain *
* and therefore can be
* deleted */
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
return 0;
}
diff -r -u linux-2.5.55/net/ipv4/netfilter/ipfwadm_core.c linux-2.5.55-new/net/ipv4/netfilter/ipfwadm_core.c
--- linux-2.5.55/net/ipv4/netfilter/ipfwadm_core.c 2003-01-09 05:04:12.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ipfwadm_core.c 2003-01-09 22:23:43.000000000 +0100
@@ -705,7 +705,7 @@
ftmp = *chainptr;
*chainptr = ftmp->fw_next;
kfree(ftmp);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
WRITE_UNLOCK(&ip_fw_lock);
}
@@ -746,7 +746,7 @@
ftmp->fw_next = *chainptr;
*chainptr=ftmp;
WRITE_UNLOCK(&ip_fw_lock);
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
return(0);
}
@@ -794,7 +794,7 @@
else
*chainptr=ftmp;
WRITE_UNLOCK(&ip_fw_lock);
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
return(0);
}
@@ -867,7 +867,7 @@
}
WRITE_UNLOCK(&ip_fw_lock);
if (was_found) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return 0;
} else
return(EINVAL);
diff -r -u linux-2.5.55/net/ipv4/netfilter/ipt_conntrack.c linux-2.5.55-new/net/ipv4/netfilter/ipt_conntrack.c
--- linux-2.5.55/net/ipv4/netfilter/ipt_conntrack.c 2003-01-09 05:04:25.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ipt_conntrack.c 2003-01-09 22:23:43.000000000 +0100
@@ -106,16 +106,14 @@
static int __init init(void)
{
/* NULL if ip_conntrack not a module */
- if (ip_conntrack_module)
- __MOD_INC_USE_COUNT(ip_conntrack_module);
+ try_module_get(ip_conntrack_module);
return ipt_register_match(&conntrack_match);
}
static void __exit fini(void)
{
ipt_unregister_match(&conntrack_match);
- if (ip_conntrack_module)
- __MOD_DEC_USE_COUNT(ip_conntrack_module);
+ module_put(ip_conntrack_module);
}
module_init(init);
diff -r -u linux-2.5.55/net/ipv4/netfilter/ipt_helper.c linux-2.5.55-new/net/ipv4/netfilter/ipt_helper.c
--- linux-2.5.55/net/ipv4/netfilter/ipt_helper.c 2003-01-09 05:04:20.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ipt_helper.c 2003-01-09 22:23:43.000000000 +0100
@@ -95,16 +95,14 @@
static int __init init(void)
{
/* NULL if ip_conntrack not a module */
- if (ip_conntrack_module)
- __MOD_INC_USE_COUNT(ip_conntrack_module);
+ try_module_get(ip_conntrack_module);
return ipt_register_match(&helper_match);
}
static void __exit fini(void)
{
ipt_unregister_match(&helper_match);
- if (ip_conntrack_module)
- __MOD_DEC_USE_COUNT(ip_conntrack_module);
+ module_put(ip_conntrack_module);
}
module_init(init);
diff -r -u linux-2.5.55/net/ipv4/netfilter/ipt_state.c linux-2.5.55-new/net/ipv4/netfilter/ipt_state.c
--- linux-2.5.55/net/ipv4/netfilter/ipt_state.c 2003-01-09 05:04:27.000000000 +0100
+++ linux-2.5.55-new/net/ipv4/netfilter/ipt_state.c 2003-01-09 22:23:43.000000000 +0100
@@ -47,16 +47,14 @@
static int __init init(void)
{
/* NULL if ip_conntrack not a module */
- if (ip_conntrack_module)
- __MOD_INC_USE_COUNT(ip_conntrack_module);
+ try_module_get(ip_conntrack_module);
return ipt_register_match(&state_match);
}
static void __exit fini(void)
{
ipt_unregister_match(&state_match);
- if (ip_conntrack_module)
- __MOD_DEC_USE_COUNT(ip_conntrack_module);
+ module_put(ip_conntrack_module);
}
module_init(init);
diff -r -u linux-2.5.55/net/ipv6/netfilter/ip6_tables.c linux-2.5.55-new/net/ipv6/netfilter/ip6_tables.c
--- linux-2.5.55/net/ipv6/netfilter/ip6_tables.c 2003-01-09 05:04:24.000000000 +0100
+++ linux-2.5.55-new/net/ipv6/netfilter/ip6_tables.c 2003-01-09 22:23:43.000000000 +0100
@@ -672,8 +672,7 @@
m->u.kernel.match->destroy(m->data,
m->u.match_size - sizeof(*m));
- if (m->u.kernel.match->me)
- __MOD_DEC_USE_COUNT(m->u.kernel.match->me);
+ module_put(m->u.kernel.match->me);
return 0;
}
@@ -723,8 +722,7 @@
// duprintf("check_match: `%s' not found\n", m->u.name);
return ret;
}
- if (match->me)
- __MOD_INC_USE_COUNT(match->me);
+ try_module_get(match->me);
m->u.kernel.match = match;
up(&ip6t_mutex);
@@ -732,8 +730,7 @@
&& !m->u.kernel.match->checkentry(name, ipv6, m->data,
m->u.match_size - sizeof(*m),
hookmask)) {
- if (m->u.kernel.match->me)
- __MOD_DEC_USE_COUNT(m->u.kernel.match->me);
+ module_put(m->u.kernel.match->me);
duprintf("ip_tables: check failed for `%s'.\n",
m->u.kernel.match->name);
return -EINVAL;
@@ -770,8 +767,7 @@
duprintf("check_entry: `%s' not found\n", t->u.user.name);
goto cleanup_matches;
}
- if (target->me)
- __MOD_INC_USE_COUNT(target->me);
+ try_module_get(target->me);
t->u.kernel.target = target;
up(&ip6t_mutex);
@@ -785,8 +781,7 @@
t->u.target_size
- sizeof(*t),
e->comefrom)) {
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
duprintf("ip_tables: check failed for `%s'.\n",
t->u.kernel.target->name);
ret = -EINVAL;
@@ -858,8 +853,7 @@
if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->data,
t->u.target_size - sizeof(*t));
- if (t->u.kernel.target->me)
- __MOD_DEC_USE_COUNT(t->u.kernel.target->me);
+ module_put(t->u.kernel.target->me);
return 0;
}
@@ -1184,12 +1178,12 @@
/* Update module usage count based on number of rules */
duprintf("do_replace: oldnum=%u, initnum=%u, newnum=%u\n",
oldinfo->number, oldinfo->initial_entries, newinfo->number);
- if (t->me && (oldinfo->number <= oldinfo->initial_entries) &&
+ if ((oldinfo->number <= oldinfo->initial_entries) &&
(newinfo->number > oldinfo->initial_entries))
- __MOD_INC_USE_COUNT(t->me);
- else if (t->me && (oldinfo->number > oldinfo->initial_entries) &&
+ try_module_get(t->me);
+ else if ((oldinfo->number > oldinfo->initial_entries) &&
(newinfo->number <= oldinfo->initial_entries))
- __MOD_DEC_USE_COUNT(t->me);
+ module_put(t->me);
/* Get the old counters. */
get_counters(oldinfo, counters);
@@ -1388,17 +1382,17 @@
{
int ret;
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
ret = down_interruptible(&ip6t_mutex);
if (ret != 0) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
if (!list_named_insert(&ip6t_target, target)) {
duprintf("ip6t_register_target: `%s' already in list!\n",
target->name);
ret = -EINVAL;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
up(&ip6t_mutex);
return ret;
@@ -1410,7 +1404,7 @@
down(&ip6t_mutex);
LIST_DELETE(&ip6t_target, target);
up(&ip6t_mutex);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
int
@@ -1418,16 +1412,16 @@
{
int ret;
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
ret = down_interruptible(&ip6t_mutex);
if (ret != 0) {
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
if (!list_named_insert(&ip6t_match, match)) {
duprintf("ip6t_register_match: `%s' already in list!\n",
match->name);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
ret = -EINVAL;
}
up(&ip6t_mutex);
@@ -1441,7 +1435,7 @@
down(&ip6t_mutex);
LIST_DELETE(&ip6t_match, match);
up(&ip6t_mutex);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
int ip6t_register_table(struct ip6t_table *table)
@@ -1451,12 +1445,12 @@
static struct ip6t_table_info bootstrap
= { 0, 0, 0, { 0 }, { 0 }, { }, { } };
- MOD_INC_USE_COUNT;
+ try_module_get(THIS_MODULE);
newinfo = vmalloc(sizeof(struct ip6t_table_info)
+ SMP_ALIGN(table->table->size) * NR_CPUS);
if (!newinfo) {
ret = -ENOMEM;
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
memcpy(newinfo->entries, table->table->entries, table->table->size);
@@ -1468,14 +1462,14 @@
table->table->underflow);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
ret = down_interruptible(&ip6t_mutex);
if (ret != 0) {
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
return ret;
}
@@ -1505,7 +1499,7 @@
free_unlock:
vfree(newinfo);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
goto unlock;
}
@@ -1519,7 +1513,7 @@
IP6T_ENTRY_ITERATE(table->private->entries, table->private->size,
cleanup_entry, NULL);
vfree(table->private);
- MOD_DEC_USE_COUNT;
+ module_put(THIS_MODULE);
}
/* Returns 1 if the port is matched by the range, 0 otherwise */
^ permalink raw reply
* Re: NFS as a Cluster File System.
From: Lars Marowsky-Bree @ 2003-01-09 21:50 UTC (permalink / raw)
To: Lorn Kay, nfs, linux-ha
In-Reply-To: <F112Sbh29cM3oryKFRJ0001248d@hotmail.com>
On 2003-01-09T19:39:50,
Lorn Kay <lorn_kay@hotmail.com> said:
> Is NFS a viable CFS? (I'm cross posting this due to a discussion on the the
> linux-ha list recently.)
NFS might be a viable system for making content available in a cluster, given
a highly available NFS sever (not that easy to do right, actually) and
provided that the bandwidth and latency is good enough for you; file locking
might also be a problem.
However, it is NOT a "CFS", which people commonly use to refer to a filesystem
which is distributed and usually shares the same storage system connected to
all nodes.
I believe there might be a confusion of words here ;-)
Sincerely,
Lars Marowsky-Brée <lmb@suse.de>
--
Principal Squirrel
SuSE Labs - Research & Development, SuSE Linux AG
"If anything can go wrong, it will." "Chance favors the prepared (mind)."
-- Capt. Edward A. Murphy -- Louis Pasteur
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply
* [PATCH] kallsyms prints wrong symbol names
From: Petr Vandrovec @ 2003-01-09 21:58 UTC (permalink / raw)
To: torvalds; +Cc: ak, linux-kernel
Hi Linus,
Since stem compression arrived to kallsyms table, we are printing
name of symbol BEFORE one we want to print (and empty string for
first symbol) because of we return buffer with copy of last name
we skipped instead of 'name' variable as we did before. So one more
pass through loop is required.
Without this patch my stack traces were really strange...
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
--- linux-2.5.55/kernel/kallsyms.c 2003-01-09 22:47:40.000000000 +0100
+++ linux-2.5.55/kernel/kallsyms.c 2003-01-09 22:38:01.000000000 +0100
@@ -46,7 +46,7 @@
}
/* Grab name */
- for (i = 0; i < best; i++) {
+ for (i = 0; i < best + 1; i++) {
unsigned prefix = *name++;
strncpy(namebuf + prefix, name, 127 - prefix);
name += strlen(name) + 1;
^ permalink raw reply
* Re: detecting hyperthreading in linux 2.4.19
From: Jason Lunz @ 2003-01-09 21:57 UTC (permalink / raw)
To: linux-kernel
In-Reply-To: <200301091337.04957.jamesclv@us.ibm.com>
jamesclv@us.ibm.com said:
> I don't know of any way to do this in userland. The whole point is
> that the sibling processors are supposed to look like real ones.
That's unfortunately not always true. I'm writing a program that will
run on a system that will be doing high-load routing. Testing has shown
that we get better performance when binding each NIC's interrupts to a
separate physical processor using /proc/irq/*/smp_affinity (especially
when all the interrupts would hit the first CPU, another problem i've
yet to address). That only works for real processors, though, not
HT siblings.
I'm writing a program to run on machines of unknown (by me)
configuration, that will spread out the NIC interrupts appropriately.
So userspace needs to know the difference, at least until interrupts can
be automatically distributed by the kernel in a satisfactory way.
Jason
^ permalink raw reply
* RE: [2.5] IRQ distribution in the 2.5.52 kernel
From: Kamble, Nitin A @ 2003-01-09 19:52 UTC (permalink / raw)
To: Andrew Theurer, linux-kernel, mbligh
Cc: Saxena, Sunil, Mallick, Asit K, Nakajima, Jun
Hi Andrew,
Your benchmark results are very impressive. Thanks for trying it out.
I have some thoughts after seeing the results.
> Nitin,
>
> I got a chance to run the NetBench benchmark with your patch on
2.5.54-
> mjb2
> kernel. NetBench measures SMB/CIFS performance by using several SMB
> clients
> (in this case 44 Windows 2000 systems), sending SMB requests to a
Linux
> server running Samba 2.2.3a+sendfile. Result is in throughput, Mbps.
> Generally the network traffic on the server is 60% recv, 40% tx.
>
> I believe we have very similar systems. Mine is a 4 x 1.6 GHz, 1 MB
L3 P4
> Xeon with 4 GB DDR memory (3.2 GB/sec I believe). The chipset is
> "Summit".
> I also have more than one Intel e1000 adapters.
>
> I decided to run a few configurations, first with just one adapter,
with
> and
> without HT support in the kernel (acpi=off), then add another adapter
and
> test again with/without HT.
>
> Here are the results:
>
> 4P, no HT, 1 x e1000, no kirq: 1214 Mbps, 4% idle
> 4P, no HT, 1 x e1000, kirq: 1223 Mbps, 4% idle,
+0.74%
[NK] It is surprising to see single e1000 is giving bandwidth more than
1Gbps. What can be the reason for this extra bandwidth? ... Maybe
compression is happening somewhere.
>
> I suppose we didn't see much of an improvement here because we never
run
> into
> the situation where more than one interrupt with a high rate is routed
to
> a
> single CPU on irq_balance.
>
> 4P, HT, 1 x e1000, no kirq: 1214 Mbps, 25% idle
> 4P, HT, 1 x e1000, kirq: 1220 Mbps, 30% idle,
+0.49%
>
> Again, not much of a difference just yet, but lots of idle time. We
may
> have
> reached the limit at which one logical CPU can process interrupts for
an
> e1000 adapter. There are other things I can probably do to help this,
> like
> int delay, and NAPI, which I will get to eventually.
>
> 4P, HT, 2 x e1000, no kirq: 1269 Mbps, 23% idle
> 4P, HT, 2 x e1000, kirq: 1329 Mbps, 18% idle
+4.7%
[NK] It can be a case that throughput is getting limited by the network
infrastructure or total load of clients. If we know the theoretical
desired maximum throughput then we will get a better idea about the
bottleneck. It would be interesting to see the results, after adding one
more e1000 card to the server.
>
> OK, almost 5% better!
[NK] It's a pretty good number!
Probably has to do with a couple of things; the
> fact
> that your code does not route two different interrupts to the same
> core/different logical cpus (quite obvious by looking at
> /proc/interrupts),
> and that more than one interrupt does not go to the same cpu if
possible.
> I
> suspect irq_balance did some of those [bad] things some of the time,
and
> we
> observed a bottleneck in int processing that was lower than with kirq.
>
> I don't think all of the idle time is because of a int processing
> bottleneck.
> I'm just not sure what it is yet :) Hopefully something will become
> obvious
> to me...
>
> Overall I like the way it works, and I believe it can be tweaked to
work
> with
> NUMA when necessary.
[NK] I also believe so.
I hope to have access to a specweb system on a NUMA
> box
> soon, so we can verify that.
>
> -Andrew Theurer
[NK]
Thanks & regards,
Nitin
^ permalink raw reply
* Re: clipping
From: Geert Uytterhoeven @ 2003-01-09 21:46 UTC (permalink / raw)
To: James Simmons; +Cc: Antonino Daplas, Linux Frame Buffer Device Development
In-Reply-To: <Pine.LNX.4.44.0301092122450.5660-100000@phoenix.infradead.org>
On Thu, 9 Jan 2003, James Simmons wrote:
> > So perhaps, a function something like this:
> >
> > void fb_clip(struct fb_fillrect *region, struct fb_fillrect *clip);
> >
> > This should not be difficult to implement, and I'll code it if everyone
> > agrees.
>
> I thought about this. Originally I did have this function but removed it.
> WHat do you think Geert?
Yes, that's OK.
But I was most concerned about fb_ops.fb_imageblit(), since clipping impacts
fb_image.data as well. IIRC, all (most?) current clipping implementations
modify fb_image.{dx,dy,width,height} only, without updating fb_image.data.
> > The other option (which I don't like) is just to check the passed
> > fb_var_screeninfo in the put_var ioctl against the current console
> > window size. But this is not foolproof as we will not be sure of the
> > resulting window size _after_ the fb_set_var() call.
>
> Yuck!!! The other way is better.
Well, in between the calls to fb_ops.fb_check_var() and fb_ops.set_par() you
can still perform that check. But it's indeed ugly.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply
* Re: detecting hyperthreading in linux 2.4.19
From: John Bradford @ 2003-01-09 21:54 UTC (permalink / raw)
To: jamesclv; +Cc: lunz, linux-kernel
In-Reply-To: <200301091337.04957.jamesclv@us.ibm.com>
> > Is there a way for a userspace program running on linux 2.4.19 to tell
> > the difference between a single hyperthreaded xeon P4 with HT enabled
> > and a dual hyperthreaded xeon P4 with HT disabled? The /proc/cpuinfos
> > for the two cases are indistinguishable.
>
> I don't know of any way to do this in userland. The whole point is that the
> sibling processors are supposed to look like real ones.
>
> You _could_ try running two processes simultaneously in tight spin loops for
> 100 million cycles and comparing the amount of real time consumed. That
> would be rather unreliable and kludgey though.
If /proc/interrupts shows a processor is handling interrupts then it
is definitely a 'real' one. If it isn't handling interrupts, it may
or may not be a 'real' one. That's another unreliable and kludgey way
to tell the difference :-).
John.
^ permalink raw reply
* acpi_button misses some static's
From: Pavel Machek @ 2003-01-09 21:52 UTC (permalink / raw)
To: Rusty trivial patch monkey Russell, kernel list
Hi!
This adds them, please apply.
Pavel
--- clean/drivers/acpi/button.c 2002-12-25 23:59:15.000000000 +0100
+++ linux-swsusp/drivers/acpi/button.c 2003-01-06 00:11:23.000000000 +0100
@@ -68,8 +68,8 @@
MODULE_LICENSE("GPL");
-int acpi_button_add (struct acpi_device *device);
-int acpi_button_remove (struct acpi_device *device, int type);
+static int acpi_button_add (struct acpi_device *device);
+static int acpi_button_remove (struct acpi_device *device, int type);
static int acpi_button_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_button_driver = {
@@ -236,7 +236,7 @@
}
-int
+static int
acpi_button_add (
struct acpi_device *device)
{
@@ -386,7 +386,7 @@
}
-int
+static int
acpi_button_remove (struct acpi_device *device, int type)
{
acpi_status status = 0;
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Drain local pages to make swsusp work
From: Pavel Machek @ 2003-01-09 21:51 UTC (permalink / raw)
To: Rusty trivial patch monkey Russell, kernel list, torvalds
Hi!
With local pages present, swsusp's accounting goes wrong and you get
nice BUG(). This fixes it, please apply.
Pavel
--- clean/kernel/suspend.c 2002-12-18 22:21:13.000000000 +0100
+++ linux-swsusp/kernel/suspend.c 2002-12-23 18:58:51.000000000 +0100
@@ -680,6 +680,8 @@
struct sysinfo i;
unsigned int nr_needed_pages = 0;
+ drain_local_pages();
+
pagedir_nosave = NULL;
printk( "/critical section: Counting pages to copy" );
nr_copy_pages = count_and_copy_data_pages(NULL);
@@ -714,6 +716,7 @@
nr_copy_pages_check = nr_copy_pages;
pagedir_order_check = pagedir_order;
+ drain_local_pages(); /* During allocating of suspend pagedir, new cold pages may appear. Kill them */
if (nr_copy_pages != count_and_copy_data_pages(pagedir_nosave)) /* copy */
BUG();
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
^ permalink raw reply
* Re: DMA timeouts on Promise 20267 IDE card
From: Ross Biro @ 2003-01-09 21:52 UTC (permalink / raw)
To: James Curbo; +Cc: linux-kernel
In-Reply-To: <20030109204350.GA413@carthage>
James Curbo wrote:
>[please cc: me as I am not subscribed to lkml]
>
>I've recently started getting errors like this (this example is from
>2.4.20-pre3-ac2):
>
>Jan 9 14:20:48 carthage kernel: hda: dma_timer_expiry: dma status ==
>0x61
>Jan 9 14:20:48 carthage kernel: hdc: dma_timer_expiry: dma status ==
>0x21
>
>
I believe the low bit set in the dma_status means that the DMA transfer
is still in progress. Since the timer has expired, that means it's been
in progress for 10 seconds. Odds are the drive has stopped responding.
Since it's a Western Digital drive, it probably needs to be powercycled
to come back.
I don't think this is a problem with the controller card, but I could be
wrong.
Ross
^ permalink raw reply
* Re: NFS as a Cluster File System.
From: Alan Robertson @ 2003-01-09 21:29 UTC (permalink / raw)
To: Lorn Kay; +Cc: nfs, linux-ha
In-Reply-To: <F112Sbh29cM3oryKFRJ0001248d@hotmail.com>
Lorn Kay wrote:
>
> Is NFS a viable CFS? (I'm cross posting this due to a discussion on the
> the linux-ha list recently.)
>
> NFS has a bad reputation probably due to (at least) the following:
>
> It has been used in networking environments where different server
> hardware configurations (NICS, drivers, etc.) running different
> operating systems have connected to each other (in many-to-many
> configurations).
>
> It “grew up” on networks that were perhaps unstable, or immature
> (“Someone’s kicked the token ring coax cable laying on the floor again”)
> long before switches were common place, and the network was loaded down
> with all kinds of network traffic.
>
> It wasn’t understood very well. Since the default mount options
> worked, system administrators often didn’t fully understand the
> ramifications of their NFS client mount option choices.
>
> It relied on UDP, which is susceptible to huge retransmission
> efforts on noisy or lossy networks.
>
> NFS was used over many-hop WAN connections.
>
> NFS servers were often used for many other tasks, not just NFS.
>
>
> A cluster configuration, however, offers several advantages over the
> typical NFS configuration:
>
> All NFS clients (the cluster nodes) run the same operating system
> (Linux).
>
> All clients run the same version of NFS and the kernel.
>
> All clients use the same network tuned configuration.
>
> A physical network can be dedicated to NFS. (Using a high quality
> switch, with short data-center-only cable runs.)
>
> All clients connect to one NFS server.
>
> The NFS server is a high-quality dedicated machine (Net App, EMC, etc.)
>
> Only one mount point need be used with one set of mount options.
>
> Linux clients can use TCP instead of UDP.
>
> Except for the vagaries of the load placed on the cluster nodes, this
> sounds like a test lab environment. If NFS can’t work in this
> environment where will it ever work?
NFS V3 and before have problems with "cache coherency". That is, the
different nodes in the cluster are not guaranteed to see the same contents.
I think this is supposed to be fixed in v4.
--
Alan Robertson <alanr@unix.sh>
"Openness is the foundation and preservative of friendship.... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply
* Re: [2.5.54][PATCH] SB16 convertation to new PnP layer.
From: Ruslan U. Zakirov @ 2003-01-09 21:39 UTC (permalink / raw)
To: Adam Belay; +Cc: greg, linux-kernel
In-Reply-To: <20030109152654.GC17701@neo.rr.com>
On Thu, 9 Jan 2003, Adam Belay wrote:
> On Thu, Jan 09, 2003 at 06:35:12PM +0300, Ruslan U. Zakirov wrote:
> > 1) As I've understood we need to free all reserved resources when
> > remove function called, am I right?
>
> Yes, all resources must be freed or the device will not work if it is
> attached to the driver a second time. This is becuase the driver will
> think the device is busy when actually the resources were just never
> freed from the previous session. Also the resources must be freed to
> safetly disable the device.
Here I have strange behavior under 2.5.55 vanilla with my patch.
rmmod snd_*
OK, and it understandable for me. We just unload KO(->remove was called)
and didn't free resources(remove is empty now).
modprobe snd_sbawe isapnp=0 (I've got legacy card)
This cause an oops not error(logical behavior as I think because
resources busy), but module loads anyway and sound works.
I must reinstall binutils to install ksymoops, i'll do it tomorow after my
exam.
>
>
> > 2) Who decide card is accessible at some time or not?
>
> This is determined by both the pnp layer and the driver model. Becuase a
> card is a group of devices the individual devices must also not be matched
> to more than one driver. PnP Card Services have a few bugs in this area,
> all of which have been resolved in the patch I released last week. Greg,
> could you please forward that to Linus.
I've this patch and going to try write remove function.
> > 3) And the last, where is the place of ISA not PnP cards in the device
> > lists? As I think, they are fit with PnP bus, but their resources
> > static(not configurable) or it's just lays under ALSA, apears in
> > /proc/asound only and ALSA internals?
>
> Currently the pnp layer does not support legacy non PnP devices. I plan
> to add support for them soon. This support should achieve two objectives.
> 1.) Reserve resources used by the legacy devices
> a.) if the resources match an existing pnp devices, bind to that
> device
> b.) if they conflict but do not match exactly return an error
> c.) otherwise reserve the resources and prevent pnp devices from
> using them.
> 2.) Represent these legacy devices in sysfs. Maybe the current legacy dir
> could be used or I may have to create "pnp_legacy". Needs more research.
OK. Waiting for new changes.
^ permalink raw reply
* Re: detecting hyperthreading in linux 2.4.19
From: James Cleverdon @ 2003-01-09 21:37 UTC (permalink / raw)
To: Jason Lunz, linux-kernel
In-Reply-To: <slrnb1rlct.g2c.lunz@stoli.localnet>
On Thursday 09 January 2003 12:02 pm, Jason Lunz wrote:
> Is there a way for a userspace program running on linux 2.4.19 to tell
> the difference between a single hyperthreaded xeon P4 with HT enabled
> and a dual hyperthreaded xeon P4 with HT disabled? The /proc/cpuinfos
> for the two cases are indistinguishable.
>
> Jason
>
> -
In the kernel that's no problem:
A) If the BIOS writers followed Intel's guidelines, just look at the physical
APIC IDs. HT siblings have odd IDs, the real ones have even.
B) Check the siblings table built up at boot time and used by the scheduler.
I don't know of any way to do this in userland. The whole point is that the
sibling processors are supposed to look like real ones.
You _could_ try running two processes simultaneously in tight spin loops for
100 million cycles and comparing the amount of real time consumed. That
would be rather unreliable and kludgey though.
--
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot com
^ permalink raw reply
* Re: [Linux-fbdev-devel] [PATCH][FBDEV]: fb_putcs() and fb_setfont() methods
From: James Simmons @ 2003-01-09 21:25 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Antonino Daplas, Petr Vandrovec, Linux Fbdev development list,
Linux Kernel List, davidm
In-Reply-To: <Pine.GSO.4.21.0301092153150.8130-100000@vervain.sonytel.be>
> > This I have no problem with. I'm willing to accept this. As long as data
> > from the console layer is not touched. As for loadtiles one thing I like
> > to address is memory allocation. It probable is good idea to do things
> > like place the tile data in buffers allocated by pci_alloc_consistent.
> > The other fear is it will only support so many tiles.
>
> I think it's best to let the driver allocate it. That way the driver can put it
> where it's best suited. pci_alloc_consistent() is meant for PCI only.
Sorry about the confusiing. I was meaning things like pci_alloc_consistent
of course would be handled for each driver that needed it.
^ permalink raw reply
* Re: clipping
From: James Simmons @ 2003-01-09 21:24 UTC (permalink / raw)
To: Antonino Daplas; +Cc: Geert Uytterhoeven, Linux Frame Buffer Device Development
In-Reply-To: <1042043066.982.118.camel@localhost.localdomain>
> So perhaps, a function something like this:
>
> void fb_clip(struct fb_fillrect *region, struct fb_fillrect *clip);
>
> This should not be difficult to implement, and I'll code it if everyone
> agrees.
I thought about this. Originally I did have this function but removed it.
WHat do you think Geert?
> The other option (which I don't like) is just to check the passed
> fb_var_screeninfo in the put_var ioctl against the current console
> window size. But this is not foolproof as we will not be sure of the
> resulting window size _after_ the fb_set_var() call.
Yuck!!! The other way is better.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply
* [Linux-ia64] Re: Re: disabling nics using boot options.
From: Roy Dragseth @ 2003-01-09 21:23 UTC (permalink / raw)
To: linux-ia64
In-Reply-To: <marc-linux-ia64-105590709805661@msgid-missing>
On Thursday 09 January 2003 21:48, Bill Nottingham wrote:
> Are there any error messages from the driver?
I find this in /var/log/messages
Jan 9 20:09:51 compute-1-1 kernel: Error seeking in /dev/kmem
Jan 9 20:09:51 compute-1-1 kernel: Symbol #tg3, value 001bc000
Jan 9 20:09:51 compute-1-1 kernel: Error adding kernel module table entry.
and this in dmesg:
tg3.c:v0.99 (Jun 11, 2002)
PCI: Found IRQ 56 for device 20:02.0
divert: allocating divert_blk for eth1
eth1: Tigon3 [partno(BCM95700A6) rev 0105 PHY(5701)] (PCI:66MHz:64-bit)
10/100/1
000BaseT Ethernet 00:30:6e:38:99:07
PCI: Found IRQ 65 for device 80:01.0
divert: allocating divert_blk for eth2
eth2: Tigon3 [partno(A6825-60101) rev 0105 PHY(5701)] (PCI:66MHz:64-bit)
10/100/
1000BaseT Ethernet 00:30:6e:2b:cc:05
eth2: Link is up at 1000 Mbps, full duplex.
eth2: Flow control is off for TX and off for RX.
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (FF) [SLPF]
eth2: Link is up at 1000 Mbps, full duplex.
eth2: Flow control is off for TX and off for RX.
I don't really know if these are real error messages.
r.
--
The Computer Center, University of Tromsø, N-9037 TROMSØ, Norway.
phone:+47 77 64 41 07, fax:+47 77 64 41 00
Roy Dragseth, High Performance Computing System Administrator
Direct call: +47 77 64 62 56. email: royd@cc.uit.no
^ permalink raw reply
* Re: [Linux-fbdev-devel] [PATCH][FBDEV]: fb_putcs() and fb_setfont() methods
From: James Simmons @ 2003-01-09 21:25 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Antonino Daplas, Petr Vandrovec, Linux Fbdev development list,
Linux Kernel List, davidm
In-Reply-To: <Pine.GSO.4.21.0301092153150.8130-100000@vervain.sonytel.be>
> > This I have no problem with. I'm willing to accept this. As long as data
> > from the console layer is not touched. As for loadtiles one thing I like
> > to address is memory allocation. It probable is good idea to do things
> > like place the tile data in buffers allocated by pci_alloc_consistent.
> > The other fear is it will only support so many tiles.
>
> I think it's best to let the driver allocate it. That way the driver can put it
> where it's best suited. pci_alloc_consistent() is meant for PCI only.
Sorry about the confusiing. I was meaning things like pci_alloc_consistent
of course would be handled for each driver that needed it.
^ permalink raw reply
* Re: nfs client using autofs v4
From: Ion Badulescu @ 2003-01-09 21:11 UTC (permalink / raw)
To: Scott Mcdermott; +Cc: devnull, linuxmanagers, NFS
In-Reply-To: <20030109204805.GA1042@questra.com>
On Thu, 9 Jan 2003, Scott Mcdermott wrote:
> is there a way at runtime to detect if the client (running mount(8))
> supports a TCP mount? This would have to be tested first before trying
> to reach a server.
Only heuristically, based on the kernel version, and even that doesn't
take into consideration the possibility that v3 support was not compiled
into the kernel.
So amd tries a v3 mount (if the server supports it), and if that fails
with EINVAL then it retries the mount as v2/UDP. It's not ideal, but it
works.
Ion
--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply
* Can't build sound drivers as modules (2.5.55)
From: Stephen Hemminger @ 2003-01-09 21:19 UTC (permalink / raw)
To: Kernel Mailing List
When I try to install with sound as a configured module:
WARNING: /lib/modules/2.5.55/kernel/sound/soundcore.ko needs unknown
symbol
errno
This is new in 2.5.55, not sure where the missing bogus definition is.
It looks like soundcore.ko contains sound_firmware.o which is seems to
be more of an application than a driver (open/close)...
--
Stephen Hemminger <shemminger@osdl.org>
Open Source Devlopment Lab
^ permalink raw reply
* Re: clipping
From: James Simmons @ 2003-01-09 21:09 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Antonino Daplas, Linux Frame Buffer Device Development
In-Reply-To: <Pine.GSO.4.21.0301081053400.21171-100000@vervain.sonytel.be>
> > > What happens if you resize the VT to such a large size that columns*fontwidth >
> > > xres_virtual or rows*fontheight > yres_virtual? I guess clipping prevents a
> > > crash there?
> >
> > Correct. Actually fbcon_resize checks to make sure the user doesn't do
> > something stupid like this. So we might not needed. Hm.
>
> And what if you use fbset to reduce the resolution below what's needed to
> accomodate the current console size?
I haven't fixed that issue yet. One the last close of /dev/fb the tty
should be set back to its original state before /dev/fb was first open.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply
* [NFS] [PATCH] missing export of hash_mem (2.5.55)
From: Stephen Hemminger @ 2003-01-09 21:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Kernel Mailing List, nfs
Can't build nfs server as a module because of missing export of hash_mem
diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
--- a/net/sunrpc/sunrpc_syms.c Thu Jan 9 13:07:34 2003
+++ b/net/sunrpc/sunrpc_syms.c Thu Jan 9 13:07:34 2003
@@ -104,6 +104,7 @@
EXPORT_SYMBOL(qword_get);
EXPORT_SYMBOL(svcauth_unix_purge);
EXPORT_SYMBOL(unix_domain_find);
+EXPORT_SYMBOL(hash_mem);
/* Generic XDR */
EXPORT_SYMBOL(xdr_encode_array);
^ permalink raw reply
* Re: "Mother" == "computer-illiterate"
From: Randy.Dunlap @ 2003-01-09 21:11 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: linux-kernel
In-Reply-To: <200301092112.h09LCxpQ010633@turing-police.cc.vt.edu>
On Thu, 9 Jan 2003 Valdis.Kletnieks@vt.edu wrote:
| On Thu, 09 Jan 2003 12:46:30 PST, "Randy.Dunlap" said:
| > (ugh, COBOL)
|
| Go back and research the alternatives available at the time.
True.
| Then ask yourself which you'd prefer to do maintenance programming on.
I've done several years of COBOL (/me hides).
I'm familiar with its strengths in the right environment.
--
~Randy
^ permalink raw reply
* Re: "Mother" == "computer-illiterate"
From: Valdis.Kletnieks @ 2003-01-09 21:12 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel
In-Reply-To: <Pine.LNX.4.33L2.0301091245540.9978-100000@dragon.pdx.osdl.net>
[-- Attachment #1: Type: text/plain, Size: 206 bytes --]
On Thu, 09 Jan 2003 12:46:30 PST, "Randy.Dunlap" said:
> (ugh, COBOL)
Go back and research the alternatives available at the time.
Then ask yourself which you'd prefer to do maintenance programming on.
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply
* Re: PMS messaging program: where?
From: Jacques Chion @ 2003-01-09 21:04 UTC (permalink / raw)
To: Tim Neu; +Cc: linux-hams
In-Reply-To: <20030109193304.M8545@tneu.visi.com>
Le Jan 9, Tim Neu écrivait
>
> The linux ax25 faq refers to a packet radio mail program called "pms". I
> can't seem to find this program anywhere! I installed the debian package by
> the same name - but that doesn't seem to be anything related to packet radio.
> (It's some sort of python library)
>
.............................
>
> Does this program still exist, or is it superceeded by something else?
>
> Thanks in advance.
Hello,
you can find that program in ax25-utils-2.1.42.a-3 package.
Best 73
------
Jacques.Chion@wanadoo.fr f6cwo
Quelques HOWTO en français http://perso.wanadoo.fr/jacques.chion/
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.