From 1ace90c11a486cc6ec20d57ff0fd05319b17cd1b Mon Sep 17 00:00:00 2001 From: Patrick Caulfield Date: Fri, 11 Nov 2005 12:04:28 -0800 Subject: [PATCH] --- yaml --- r: 13901 b: refs/heads/master c: 9eb5c94ef217d61d974f384b29b7298490b0a4d9 h: refs/heads/master i: 13899: 3135e929c5441e308d8ca22601be59dd46b20d4a v: v3 --- [refs] | 2 +- trunk/arch/sparc64/kernel/setup.c | 19 ++++--------------- trunk/arch/sparc64/kernel/smp.c | 1 + trunk/net/decnet/af_decnet.c | 14 +++++++------- 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index 6e1d3174b3df..49267372fd00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4d45cbacb8488ae3172065e4fca608079492231b +refs/heads/master: 9eb5c94ef217d61d974f384b29b7298490b0a4d9 diff --git a/trunk/arch/sparc64/kernel/setup.c b/trunk/arch/sparc64/kernel/setup.c index 48180531562f..bf1849dd9c49 100644 --- a/trunk/arch/sparc64/kernel/setup.c +++ b/trunk/arch/sparc64/kernel/setup.c @@ -587,8 +587,6 @@ extern void mmu_info(struct seq_file *); unsigned int dcache_parity_tl1_occurred; unsigned int icache_parity_tl1_occurred; -static int ncpus_probed; - static int show_cpuinfo(struct seq_file *m, void *__unused) { seq_printf(m, @@ -597,8 +595,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) "promlib\t\t: Version 3 Revision %d\n" "prom\t\t: %d.%d.%d\n" "type\t\t: sun4u\n" - "ncpus probed\t: %d\n" - "ncpus active\t: %d\n" + "ncpus probed\t: %ld\n" + "ncpus active\t: %ld\n" "D$ parity tl1\t: %u\n" "I$ parity tl1\t: %u\n" #ifndef CONFIG_SMP @@ -612,8 +610,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) prom_prev >> 16, (prom_prev >> 8) & 0xff, prom_prev & 0xff, - ncpus_probed, - num_online_cpus(), + (long)num_possible_cpus(), + (long)num_online_cpus(), dcache_parity_tl1_occurred, icache_parity_tl1_occurred #ifndef CONFIG_SMP @@ -679,15 +677,6 @@ static int __init topology_init(void) int i, err; err = -ENOMEM; - - /* Count the number of physically present processors in - * the machine, even on uniprocessor, so that /proc/cpuinfo - * output is consistent with 2.4.x - */ - ncpus_probed = 0; - while (!cpu_find_by_instance(ncpus_probed, NULL, NULL)) - ncpus_probed++; - for (i = 0; i < NR_CPUS; i++) { if (cpu_possible(i)) { struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL); diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c index 6efc03df51c3..797a65493fb8 100644 --- a/trunk/arch/sparc64/kernel/smp.c +++ b/trunk/arch/sparc64/kernel/smp.c @@ -39,6 +39,7 @@ #include #include +extern int linux_num_cpus; extern void calibrate_delay(void); /* Please don't make this stuff initdata!!! --DaveM */ diff --git a/trunk/net/decnet/af_decnet.c b/trunk/net/decnet/af_decnet.c index 3f25cadccddd..f89e55f814d9 100644 --- a/trunk/net/decnet/af_decnet.c +++ b/trunk/net/decnet/af_decnet.c @@ -1664,17 +1664,15 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, goto out; } - rv = dn_check_state(sk, NULL, 0, &timeo, flags); - if (rv) - goto out; - if (sk->sk_shutdown & RCV_SHUTDOWN) { - if (!(flags & MSG_NOSIGNAL)) - send_sig(SIGPIPE, current, 0); - rv = -EPIPE; + rv = 0; goto out; } + rv = dn_check_state(sk, NULL, 0, &timeo, flags); + if (rv) + goto out; + if (flags & ~(MSG_PEEK|MSG_OOB|MSG_WAITALL|MSG_DONTWAIT|MSG_NOSIGNAL)) { rv = -EOPNOTSUPP; goto out; @@ -1928,6 +1926,8 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, if (sk->sk_shutdown & SEND_SHUTDOWN) { err = -EPIPE; + if (!(flags & MSG_NOSIGNAL)) + send_sig(SIGPIPE, current, 0); goto out_err; }