From: Paul Mackerras <paulus@samba.org>
To: akpm@osdl.org
Cc: Nathan Lynch <nathanl@austin.ibm.com>,
anton@samba.org, torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] PPC64 show -1 for physical_id of non-present cpus
Date: Fri, 4 Feb 2005 21:02:18 +1100 [thread overview]
Message-ID: <16899.18474.882725.183584@cargo.ozlabs.ibm.com> (raw)
This patch is from Nathan Lynch <nathanl@austin.ibm.com>.
Make the physical_id cpu sysfs attribute on ppc64 show -1 instead of
65535 for non-present cpus.
Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
diff -puN arch/ppc64/kernel/sysfs.c~make-cpu-physical_id-signed arch/ppc64/kernel/sysfs.c
--- linux-2.6.11-rc2-mm1/arch/ppc64/kernel/sysfs.c~make-cpu-physical_id-signed 2005-01-27 15:03:16.000000000 -0600
+++ linux-2.6.11-rc2-mm1-nathanl/arch/ppc64/kernel/sysfs.c 2005-01-27 15:05:12.000000000 -0600
@@ -387,7 +387,7 @@ static ssize_t show_physical_id(struct s
{
struct cpu *cpu = container_of(dev, struct cpu, sysdev);
- return sprintf(buf, "%u\n", get_hard_smp_processor_id(cpu->sysdev.id));
+ return sprintf(buf, "%d\n", get_hard_smp_processor_id(cpu->sysdev.id));
}
static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL);
diff -puN include/asm-ppc64/paca.h~make-cpu-physical_id-signed include/asm-ppc64/paca.h
--- linux-2.6.11-rc2-mm1/include/asm-ppc64/paca.h~make-cpu-physical_id-signed 2005-01-27 15:04:14.000000000 -0600
+++ linux-2.6.11-rc2-mm1-nathanl/include/asm-ppc64/paca.h 2005-01-27 15:04:51.000000000 -0600
@@ -68,7 +68,7 @@ struct paca_struct {
u64 stab_real; /* Absolute address of segment table */
u64 stab_addr; /* Virtual address of segment table */
void *emergency_sp; /* pointer to emergency stack */
- u16 hw_cpu_id; /* Physical processor number */
+ s16 hw_cpu_id; /* Physical processor number */
u8 cpu_start; /* At startup, processor spins until */
/* this becomes non-zero. */
reply other threads:[~2005-02-04 10:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16899.18474.882725.183584@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathanl@austin.ibm.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®