diff options
| -rw-r--r-- | arch/x86/boot/compressed/mkpiggy.c | 7 | ||||
| -rw-r--r-- | arch/x86/include/asm/uv/uv_bau.h | 2 | ||||
| -rw-r--r-- | arch/x86/mm/numa_64.c | 6 | ||||
| -rw-r--r-- | arch/x86/platform/uv/tlb_uv.c | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c index 646aa78ba5fd..46a823882437 100644 --- a/arch/x86/boot/compressed/mkpiggy.c +++ b/arch/x86/boot/compressed/mkpiggy.c | |||
| @@ -62,7 +62,12 @@ int main(int argc, char *argv[]) | |||
| 62 | if (fseek(f, -4L, SEEK_END)) { | 62 | if (fseek(f, -4L, SEEK_END)) { |
| 63 | perror(argv[1]); | 63 | perror(argv[1]); |
| 64 | } | 64 | } |
| 65 | fread(&olen, sizeof olen, 1, f); | 65 | |
| 66 | if (fread(&olen, sizeof(olen), 1, f) != 1) { | ||
| 67 | perror(argv[1]); | ||
| 68 | return 1; | ||
| 69 | } | ||
| 70 | |||
| 66 | ilen = ftell(f); | 71 | ilen = ftell(f); |
| 67 | olen = getle32(&olen); | 72 | olen = getle32(&olen); |
| 68 | fclose(f); | 73 | fclose(f); |
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h index ce1d54c8a433..3e094af443c3 100644 --- a/arch/x86/include/asm/uv/uv_bau.h +++ b/arch/x86/include/asm/uv/uv_bau.h | |||
| @@ -176,7 +176,7 @@ struct bau_msg_payload { | |||
| 176 | struct bau_msg_header { | 176 | struct bau_msg_header { |
| 177 | unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */ | 177 | unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */ |
| 178 | /* bits 5:0 */ | 178 | /* bits 5:0 */ |
| 179 | unsigned int base_dest_nodeid:15; /* nasid (pnode<<1) of */ | 179 | unsigned int base_dest_nodeid:15; /* nasid of the */ |
| 180 | /* bits 20:6 */ /* first bit in uvhub map */ | 180 | /* bits 20:6 */ /* first bit in uvhub map */ |
| 181 | unsigned int command:8; /* message type */ | 181 | unsigned int command:8; /* message type */ |
| 182 | /* bits 28:21 */ | 182 | /* bits 28:21 */ |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 95ea1551eebc..1337c51b07d7 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
| @@ -780,11 +780,7 @@ void __cpuinit numa_add_cpu(int cpu) | |||
| 780 | int physnid; | 780 | int physnid; |
| 781 | int nid = NUMA_NO_NODE; | 781 | int nid = NUMA_NO_NODE; |
| 782 | 782 | ||
| 783 | apicid = early_per_cpu(x86_cpu_to_apicid, cpu); | 783 | nid = early_cpu_to_node(cpu); |
| 784 | if (apicid != BAD_APICID) | ||
| 785 | nid = apicid_to_node[apicid]; | ||
| 786 | if (nid == NUMA_NO_NODE) | ||
| 787 | nid = early_cpu_to_node(cpu); | ||
| 788 | BUG_ON(nid == NUMA_NO_NODE || !node_online(nid)); | 784 | BUG_ON(nid == NUMA_NO_NODE || !node_online(nid)); |
| 789 | 785 | ||
| 790 | /* | 786 | /* |
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index df58e9cad96a..a7b38d35c29a 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
| @@ -1364,11 +1364,11 @@ uv_activation_descriptor_init(int node, int pnode) | |||
| 1364 | memset(bd2, 0, sizeof(struct bau_desc)); | 1364 | memset(bd2, 0, sizeof(struct bau_desc)); |
| 1365 | bd2->header.sw_ack_flag = 1; | 1365 | bd2->header.sw_ack_flag = 1; |
| 1366 | /* | 1366 | /* |
| 1367 | * base_dest_nodeid is the nasid (pnode<<1) of the first uvhub | 1367 | * base_dest_nodeid is the nasid of the first uvhub |
| 1368 | * in the partition. The bit map will indicate uvhub numbers, | 1368 | * in the partition. The bit map will indicate uvhub numbers, |
| 1369 | * which are 0-N in a partition. Pnodes are unique system-wide. | 1369 | * which are 0-N in a partition. Pnodes are unique system-wide. |
| 1370 | */ | 1370 | */ |
| 1371 | bd2->header.base_dest_nodeid = uv_partition_base_pnode << 1; | 1371 | bd2->header.base_dest_nodeid = UV_PNODE_TO_NASID(uv_partition_base_pnode); |
| 1372 | bd2->header.dest_subnodeid = 0x10; /* the LB */ | 1372 | bd2->header.dest_subnodeid = 0x10; /* the LB */ |
| 1373 | bd2->header.command = UV_NET_ENDPOINT_INTD; | 1373 | bd2->header.command = UV_NET_ENDPOINT_INTD; |
| 1374 | bd2->header.int_both = 1; | 1374 | bd2->header.int_both = 1; |
