Skip to content

Commit

Permalink
powerpc: Add static fields to ibm,client-architecture call
Browse files Browse the repository at this point in the history
This patch adds 2 fields to the ibm_architecture_vec array.

The first of these fields indicates the number of cores which Linux can
boot.  It does not account for SMT, so it may result in cpus assigned to
Linux which cannot be booted.  A second patch follows that dynamically
updates this for SMT.

The second field just indicates that our OS is Linux, and not another
OS.  The system may or may not use this hint to performance tune
settings for Linux.

Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
jschopp@austin.ibm.com authored and Benjamin Herrenschmidt committed Feb 3, 2010
1 parent 6c504d4 commit 28bb9ee
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ static void __init early_cmdline_parse(void)
#define OV5_CMO 0x00
#endif

/* Option Vector 6: IBM PAPR hints */
#define OV6_LINUX 0x02 /* Linux is our OS */

/*
* The architecture vector has an array of PVR mask/value pairs,
* followed by # option vectors - 1, followed by the option vectors.
Expand All @@ -665,7 +668,7 @@ static unsigned char ibm_architecture_vec[] = {
W(0xffffffff), W(0x0f000003), /* all 2.06-compliant */
W(0xffffffff), W(0x0f000002), /* all 2.05-compliant */
W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */
5 - 1, /* 5 option vectors */
6 - 1, /* 6 option vectors */

/* option vector 1: processor architectures supported */
3 - 2, /* length */
Expand Down Expand Up @@ -697,12 +700,24 @@ static unsigned char ibm_architecture_vec[] = {
0, /* don't halt */

/* option vector 5: PAPR/OF options */
5 - 2, /* length */
13 - 2, /* length */
0, /* don't ignore, don't halt */
OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
OV5_DONATE_DEDICATE_CPU | OV5_MSI,
0,
OV5_CMO,
0,
0,
0,
0,
W(NR_CPUS), /* number of cores supported*/

/* option vector 6: IBM PAPR hints */
4 - 2, /* length */
0,
0,
OV6_LINUX,

};

/* Old method - ELF header with PT_NOTE sections */
Expand Down

0 comments on commit 28bb9ee

Please sign in to comment.