Commit b5562c9a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, UV: Initialize the broadcast assist unit base destination node id properly
  x86, numa: Fix numa_emulation code with memory-less node0
  x86, build: Make sure mkpiggy fails on read error
parents bf98f778 54712622
...@@ -62,7 +62,12 @@ int main(int argc, char *argv[]) ...@@ -62,7 +62,12 @@ int main(int argc, char *argv[])
if (fseek(f, -4L, SEEK_END)) { if (fseek(f, -4L, SEEK_END)) {
perror(argv[1]); perror(argv[1]);
} }
fread(&olen, sizeof olen, 1, f);
if (fread(&olen, sizeof(olen), 1, f) != 1) {
perror(argv[1]);
return 1;
}
ilen = ftell(f); ilen = ftell(f);
olen = getle32(&olen); olen = getle32(&olen);
fclose(f); fclose(f);
......
...@@ -176,7 +176,7 @@ struct bau_msg_payload { ...@@ -176,7 +176,7 @@ struct bau_msg_payload {
struct bau_msg_header { struct bau_msg_header {
unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */ unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */
/* bits 5:0 */ /* bits 5:0 */
unsigned int base_dest_nodeid:15; /* nasid (pnode<<1) of */ unsigned int base_dest_nodeid:15; /* nasid of the */
/* bits 20:6 */ /* first bit in uvhub map */ /* bits 20:6 */ /* first bit in uvhub map */
unsigned int command:8; /* message type */ unsigned int command:8; /* message type */
/* bits 28:21 */ /* bits 28:21 */
......
...@@ -780,10 +780,6 @@ void __cpuinit numa_add_cpu(int cpu) ...@@ -780,10 +780,6 @@ void __cpuinit numa_add_cpu(int cpu)
int physnid; int physnid;
int nid = NUMA_NO_NODE; int nid = NUMA_NO_NODE;
apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
if (apicid != BAD_APICID)
nid = apicid_to_node[apicid];
if (nid == NUMA_NO_NODE)
nid = early_cpu_to_node(cpu); nid = early_cpu_to_node(cpu);
BUG_ON(nid == NUMA_NO_NODE || !node_online(nid)); BUG_ON(nid == NUMA_NO_NODE || !node_online(nid));
......
...@@ -1364,11 +1364,11 @@ uv_activation_descriptor_init(int node, int pnode) ...@@ -1364,11 +1364,11 @@ uv_activation_descriptor_init(int node, int pnode)
memset(bd2, 0, sizeof(struct bau_desc)); memset(bd2, 0, sizeof(struct bau_desc));
bd2->header.sw_ack_flag = 1; bd2->header.sw_ack_flag = 1;
/* /*
* base_dest_nodeid is the nasid (pnode<<1) of the first uvhub * base_dest_nodeid is the nasid of the first uvhub
* in the partition. The bit map will indicate uvhub numbers, * in the partition. The bit map will indicate uvhub numbers,
* which are 0-N in a partition. Pnodes are unique system-wide. * which are 0-N in a partition. Pnodes are unique system-wide.
*/ */
bd2->header.base_dest_nodeid = uv_partition_base_pnode << 1; bd2->header.base_dest_nodeid = UV_PNODE_TO_NASID(uv_partition_base_pnode);
bd2->header.dest_subnodeid = 0x10; /* the LB */ bd2->header.dest_subnodeid = 0x10; /* the LB */
bd2->header.command = UV_NET_ENDPOINT_INTD; bd2->header.command = UV_NET_ENDPOINT_INTD;
bd2->header.int_both = 1; bd2->header.int_both = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment