aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/setup.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-06-25 17:04:17 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-07-06 13:41:51 -0400
commit0707ad30d10110aebc01a5a64fb63f4b32d20b73 (patch)
tree64d8ba73e605ac26e56808d1d77701b3f83cf8b2 /arch/tile/kernel/setup.c
parentc78095bd8c77fca2619769ff8efb639fd100e373 (diff)
arch/tile: Miscellaneous cleanup changes.
This commit is primarily changes caused by reviewing "sparse" and "checkpatch" output on our sources, so is somewhat noisy, since things like "printk() -> pr_err()" (or whatever) throughout the codebase tend to get tedious to read. Rather than trying to tease apart precisely which things changed due to which type of code review, this commit includes various cleanups in the code: - sparse: Add declarations in headers for globals. - sparse: Fix __user annotations. - sparse: Using gfp_t consistently instead of int. - sparse: removing functions not actually used. - checkpatch: Clean up printk() warnings by using pr_info(), etc.; also avoid partial-line printks except in bootup code. - checkpatch: Use exposed structs rather than typedefs. - checkpatch: Change some C99 comments to C89 comments. In addition, a couple of minor other changes are rolled in to this commit: - Add support for a "raise" instruction to cause SIGFPE, etc., to be raised. - Remove some compat code that is unnecessary when we fully eliminate some of the deprecated syscalls from the generic syscall ABI. - Update the tile_defconfig to reflect current config contents. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/tile/kernel/setup.c')
-rw-r--r--arch/tile/kernel/setup.c132
1 files changed, 73 insertions, 59 deletions
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index 934136b61ceb..4dd21c1e6d5e 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -20,6 +20,7 @@
20#include <linux/node.h> 20#include <linux/node.h>
21#include <linux/cpu.h> 21#include <linux/cpu.h>
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23#include <linux/irq.h>
23#include <linux/kexec.h> 24#include <linux/kexec.h>
24#include <linux/pci.h> 25#include <linux/pci.h>
25#include <linux/initrd.h> 26#include <linux/initrd.h>
@@ -109,7 +110,7 @@ static int __init setup_maxmem(char *str)
109 110
110 maxmem_pfn = (maxmem_mb >> (HPAGE_SHIFT - 20)) << 111 maxmem_pfn = (maxmem_mb >> (HPAGE_SHIFT - 20)) <<
111 (HPAGE_SHIFT - PAGE_SHIFT); 112 (HPAGE_SHIFT - PAGE_SHIFT);
112 printk("Forcing RAM used to no more than %dMB\n", 113 pr_info("Forcing RAM used to no more than %dMB\n",
113 maxmem_pfn >> (20 - PAGE_SHIFT)); 114 maxmem_pfn >> (20 - PAGE_SHIFT));
114 return 0; 115 return 0;
115} 116}
@@ -127,7 +128,7 @@ static int __init setup_maxnodemem(char *str)
127 128
128 maxnodemem_pfn[node] = (maxnodemem_mb >> (HPAGE_SHIFT - 20)) << 129 maxnodemem_pfn[node] = (maxnodemem_mb >> (HPAGE_SHIFT - 20)) <<
129 (HPAGE_SHIFT - PAGE_SHIFT); 130 (HPAGE_SHIFT - PAGE_SHIFT);
130 printk("Forcing RAM used on node %ld to no more than %dMB\n", 131 pr_info("Forcing RAM used on node %ld to no more than %dMB\n",
131 node, maxnodemem_pfn[node] >> (20 - PAGE_SHIFT)); 132 node, maxnodemem_pfn[node] >> (20 - PAGE_SHIFT));
132 return 0; 133 return 0;
133} 134}
@@ -140,7 +141,7 @@ static int __init setup_isolnodes(char *str)
140 return -EINVAL; 141 return -EINVAL;
141 142
142 nodelist_scnprintf(buf, sizeof(buf), isolnodes); 143 nodelist_scnprintf(buf, sizeof(buf), isolnodes);
143 printk("Set isolnodes value to '%s'\n", buf); 144 pr_info("Set isolnodes value to '%s'\n", buf);
144 return 0; 145 return 0;
145} 146}
146early_param("isolnodes", setup_isolnodes); 147early_param("isolnodes", setup_isolnodes);
@@ -155,7 +156,7 @@ static int __init setup_pci_reserve(char* str)
155 return -EINVAL; 156 return -EINVAL;
156 157
157 pci_reserve_mb = mb; 158 pci_reserve_mb = mb;
158 printk("Reserving %dMB for PCIE root complex mappings\n", 159 pr_info("Reserving %dMB for PCIE root complex mappings\n",
159 pci_reserve_mb); 160 pci_reserve_mb);
160 return 0; 161 return 0;
161} 162}
@@ -269,7 +270,7 @@ static void *__init setup_pa_va_mapping(void)
269 * This is up to 4 mappings for lowmem, one mapping per memory 270 * This is up to 4 mappings for lowmem, one mapping per memory
270 * controller, plus one for our text segment. 271 * controller, plus one for our text segment.
271 */ 272 */
272void __cpuinit store_permanent_mappings(void) 273static void __cpuinit store_permanent_mappings(void)
273{ 274{
274 int i; 275 int i;
275 276
@@ -320,14 +321,14 @@ static void __init setup_memory(void)
320 break; 321 break;
321#ifdef CONFIG_FLATMEM 322#ifdef CONFIG_FLATMEM
322 if (i > 0) { 323 if (i > 0) {
323 printk("Can't use discontiguous PAs: %#llx..%#llx\n", 324 pr_err("Can't use discontiguous PAs: %#llx..%#llx\n",
324 range.size, range.start + range.size); 325 range.size, range.start + range.size);
325 continue; 326 continue;
326 } 327 }
327#endif 328#endif
328#ifndef __tilegx__ 329#ifndef __tilegx__
329 if ((unsigned long)range.start) { 330 if ((unsigned long)range.start) {
330 printk("Range not at 4GB multiple: %#llx..%#llx\n", 331 pr_err("Range not at 4GB multiple: %#llx..%#llx\n",
331 range.start, range.start + range.size); 332 range.start, range.start + range.size);
332 continue; 333 continue;
333 } 334 }
@@ -335,51 +336,51 @@ static void __init setup_memory(void)
335 if ((range.start & (HPAGE_SIZE-1)) != 0 || 336 if ((range.start & (HPAGE_SIZE-1)) != 0 ||
336 (range.size & (HPAGE_SIZE-1)) != 0) { 337 (range.size & (HPAGE_SIZE-1)) != 0) {
337 unsigned long long start_pa = range.start; 338 unsigned long long start_pa = range.start;
338 unsigned long long size = range.size; 339 unsigned long long orig_size = range.size;
339 range.start = (start_pa + HPAGE_SIZE - 1) & HPAGE_MASK; 340 range.start = (start_pa + HPAGE_SIZE - 1) & HPAGE_MASK;
340 range.size -= (range.start - start_pa); 341 range.size -= (range.start - start_pa);
341 range.size &= HPAGE_MASK; 342 range.size &= HPAGE_MASK;
342 printk("Range not hugepage-aligned: %#llx..%#llx:" 343 pr_err("Range not hugepage-aligned: %#llx..%#llx:"
343 " now %#llx-%#llx\n", 344 " now %#llx-%#llx\n",
344 start_pa, start_pa + size, 345 start_pa, start_pa + orig_size,
345 range.start, range.start + range.size); 346 range.start, range.start + range.size);
346 } 347 }
347 highbits = __pa_to_highbits(range.start); 348 highbits = __pa_to_highbits(range.start);
348 if (highbits >= NR_PA_HIGHBIT_VALUES) { 349 if (highbits >= NR_PA_HIGHBIT_VALUES) {
349 printk("PA high bits too high: %#llx..%#llx\n", 350 pr_err("PA high bits too high: %#llx..%#llx\n",
350 range.start, range.start + range.size); 351 range.start, range.start + range.size);
351 continue; 352 continue;
352 } 353 }
353 if (highbits_seen[highbits]) { 354 if (highbits_seen[highbits]) {
354 printk("Range overlaps in high bits: %#llx..%#llx\n", 355 pr_err("Range overlaps in high bits: %#llx..%#llx\n",
355 range.start, range.start + range.size); 356 range.start, range.start + range.size);
356 continue; 357 continue;
357 } 358 }
358 highbits_seen[highbits] = 1; 359 highbits_seen[highbits] = 1;
359 if (PFN_DOWN(range.size) > maxnodemem_pfn[i]) { 360 if (PFN_DOWN(range.size) > maxnodemem_pfn[i]) {
360 int size = maxnodemem_pfn[i]; 361 int max_size = maxnodemem_pfn[i];
361 if (size > 0) { 362 if (max_size > 0) {
362 printk("Maxnodemem reduced node %d to" 363 pr_err("Maxnodemem reduced node %d to"
363 " %d pages\n", i, size); 364 " %d pages\n", i, max_size);
364 range.size = (HV_PhysAddr)size << PAGE_SHIFT; 365 range.size = PFN_PHYS(max_size);
365 } else { 366 } else {
366 printk("Maxnodemem disabled node %d\n", i); 367 pr_err("Maxnodemem disabled node %d\n", i);
367 continue; 368 continue;
368 } 369 }
369 } 370 }
370 if (num_physpages + PFN_DOWN(range.size) > maxmem_pfn) { 371 if (num_physpages + PFN_DOWN(range.size) > maxmem_pfn) {
371 int size = maxmem_pfn - num_physpages; 372 int max_size = maxmem_pfn - num_physpages;
372 if (size > 0) { 373 if (max_size > 0) {
373 printk("Maxmem reduced node %d to %d pages\n", 374 pr_err("Maxmem reduced node %d to %d pages\n",
374 i, size); 375 i, max_size);
375 range.size = (HV_PhysAddr)size << PAGE_SHIFT; 376 range.size = PFN_PHYS(max_size);
376 } else { 377 } else {
377 printk("Maxmem disabled node %d\n", i); 378 pr_err("Maxmem disabled node %d\n", i);
378 continue; 379 continue;
379 } 380 }
380 } 381 }
381 if (i >= MAX_NUMNODES) { 382 if (i >= MAX_NUMNODES) {
382 printk("Too many PA nodes (#%d): %#llx...%#llx\n", 383 pr_err("Too many PA nodes (#%d): %#llx...%#llx\n",
383 i, range.size, range.size + range.start); 384 i, range.size, range.size + range.start);
384 continue; 385 continue;
385 } 386 }
@@ -391,7 +392,7 @@ static void __init setup_memory(void)
391#ifndef __tilegx__ 392#ifndef __tilegx__
392 if (((HV_PhysAddr)end << PAGE_SHIFT) != 393 if (((HV_PhysAddr)end << PAGE_SHIFT) !=
393 (range.start + range.size)) { 394 (range.start + range.size)) {
394 printk("PAs too high to represent: %#llx..%#llx\n", 395 pr_err("PAs too high to represent: %#llx..%#llx\n",
395 range.start, range.start + range.size); 396 range.start, range.start + range.size);
396 continue; 397 continue;
397 } 398 }
@@ -412,7 +413,7 @@ static void __init setup_memory(void)
412 NR_CPUS * (PFN_UP(per_cpu_size) >> PAGE_SHIFT); 413 NR_CPUS * (PFN_UP(per_cpu_size) >> PAGE_SHIFT);
413 if (end < pci_reserve_end_pfn + percpu_pages) { 414 if (end < pci_reserve_end_pfn + percpu_pages) {
414 end = pci_reserve_start_pfn; 415 end = pci_reserve_start_pfn;
415 printk("PCI mapping region reduced node %d to" 416 pr_err("PCI mapping region reduced node %d to"
416 " %ld pages\n", i, end - start); 417 " %ld pages\n", i, end - start);
417 } 418 }
418 } 419 }
@@ -456,11 +457,11 @@ static void __init setup_memory(void)
456 } 457 }
457 } 458 }
458 num_physpages -= dropped_pages; 459 num_physpages -= dropped_pages;
459 printk(KERN_WARNING "Only using %ldMB memory;" 460 pr_warning("Only using %ldMB memory;"
460 " ignoring %ldMB.\n", 461 " ignoring %ldMB.\n",
461 num_physpages >> (20 - PAGE_SHIFT), 462 num_physpages >> (20 - PAGE_SHIFT),
462 dropped_pages >> (20 - PAGE_SHIFT)); 463 dropped_pages >> (20 - PAGE_SHIFT));
463 printk(KERN_WARNING "Consider using a larger page size.\n"); 464 pr_warning("Consider using a larger page size.\n");
464 } 465 }
465#endif 466#endif
466 467
@@ -478,9 +479,9 @@ static void __init setup_memory(void)
478 MAXMEM_PFN : mappable_physpages; 479 MAXMEM_PFN : mappable_physpages;
479 highmem_pages = (long) (num_physpages - lowmem_pages); 480 highmem_pages = (long) (num_physpages - lowmem_pages);
480 481
481 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", 482 pr_notice("%ldMB HIGHMEM available.\n",
482 pages_to_mb(highmem_pages > 0 ? highmem_pages : 0)); 483 pages_to_mb(highmem_pages > 0 ? highmem_pages : 0));
483 printk(KERN_NOTICE "%ldMB LOWMEM available.\n", 484 pr_notice("%ldMB LOWMEM available.\n",
484 pages_to_mb(lowmem_pages)); 485 pages_to_mb(lowmem_pages));
485#else 486#else
486 /* Set max_low_pfn based on what node 0 can directly address. */ 487 /* Set max_low_pfn based on what node 0 can directly address. */
@@ -488,15 +489,15 @@ static void __init setup_memory(void)
488 489
489#ifndef __tilegx__ 490#ifndef __tilegx__
490 if (node_end_pfn[0] > MAXMEM_PFN) { 491 if (node_end_pfn[0] > MAXMEM_PFN) {
491 printk(KERN_WARNING "Only using %ldMB LOWMEM.\n", 492 pr_warning("Only using %ldMB LOWMEM.\n",
492 MAXMEM>>20); 493 MAXMEM>>20);
493 printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); 494 pr_warning("Use a HIGHMEM enabled kernel.\n");
494 max_low_pfn = MAXMEM_PFN; 495 max_low_pfn = MAXMEM_PFN;
495 max_pfn = MAXMEM_PFN; 496 max_pfn = MAXMEM_PFN;
496 num_physpages = MAXMEM_PFN; 497 num_physpages = MAXMEM_PFN;
497 node_end_pfn[0] = MAXMEM_PFN; 498 node_end_pfn[0] = MAXMEM_PFN;
498 } else { 499 } else {
499 printk(KERN_NOTICE "%ldMB memory available.\n", 500 pr_notice("%ldMB memory available.\n",
500 pages_to_mb(node_end_pfn[0])); 501 pages_to_mb(node_end_pfn[0]));
501 } 502 }
502 for (i = 1; i < MAX_NUMNODES; ++i) { 503 for (i = 1; i < MAX_NUMNODES; ++i) {
@@ -512,7 +513,7 @@ static void __init setup_memory(void)
512 if (pages) 513 if (pages)
513 high_memory = pfn_to_kaddr(node_end_pfn[i]); 514 high_memory = pfn_to_kaddr(node_end_pfn[i]);
514 } 515 }
515 printk(KERN_NOTICE "%ldMB memory available.\n", 516 pr_notice("%ldMB memory available.\n",
516 pages_to_mb(lowmem_pages)); 517 pages_to_mb(lowmem_pages));
517#endif 518#endif
518#endif 519#endif
@@ -744,7 +745,7 @@ static void __init setup_numa_mapping(void)
744 nodes_andnot(default_nodes, node_online_map, isolnodes); 745 nodes_andnot(default_nodes, node_online_map, isolnodes);
745 if (nodes_empty(default_nodes)) { 746 if (nodes_empty(default_nodes)) {
746 BUG_ON(!node_isset(0, node_online_map)); 747 BUG_ON(!node_isset(0, node_online_map));
747 printk("Forcing NUMA node zero available as a default node\n"); 748 pr_err("Forcing NUMA node zero available as a default node\n");
748 node_set(0, default_nodes); 749 node_set(0, default_nodes);
749 } 750 }
750 751
@@ -822,13 +823,13 @@ static void __init setup_numa_mapping(void)
822 printk(KERN_DEBUG "NUMA cpu-to-node row %d:", y); 823 printk(KERN_DEBUG "NUMA cpu-to-node row %d:", y);
823 for (x = 0; x < smp_width; ++x, ++cpu) { 824 for (x = 0; x < smp_width; ++x, ++cpu) {
824 if (cpu_to_node(cpu) < 0) { 825 if (cpu_to_node(cpu) < 0) {
825 printk(" -"); 826 pr_cont(" -");
826 cpu_2_node[cpu] = first_node(default_nodes); 827 cpu_2_node[cpu] = first_node(default_nodes);
827 } else { 828 } else {
828 printk(" %d", cpu_to_node(cpu)); 829 pr_cont(" %d", cpu_to_node(cpu));
829 } 830 }
830 } 831 }
831 printk("\n"); 832 pr_cont("\n");
832 } 833 }
833} 834}
834 835
@@ -856,12 +857,17 @@ subsys_initcall(topology_init);
856#endif /* CONFIG_NUMA */ 857#endif /* CONFIG_NUMA */
857 858
858/** 859/**
859 * setup_mpls() - Allow the user-space code to access various SPRs. 860 * setup_cpu() - Do all necessary per-cpu, tile-specific initialization.
861 * @boot: Is this the boot cpu?
860 * 862 *
861 * Also called from online_secondary(). 863 * Called from setup_arch() on the boot cpu, or online_secondary().
862 */ 864 */
863void __cpuinit setup_mpls(void) 865void __cpuinit setup_cpu(int boot)
864{ 866{
867 /* The boot cpu sets up its permanent mappings much earlier. */
868 if (!boot)
869 store_permanent_mappings();
870
865 /* Allow asynchronous TLB interrupts. */ 871 /* Allow asynchronous TLB interrupts. */
866#if CHIP_HAS_TILE_DMA() 872#if CHIP_HAS_TILE_DMA()
867 raw_local_irq_unmask(INT_DMATLB_MISS); 873 raw_local_irq_unmask(INT_DMATLB_MISS);
@@ -892,6 +898,14 @@ void __cpuinit setup_mpls(void)
892 * as well as the PL 0 interrupt mask. 898 * as well as the PL 0 interrupt mask.
893 */ 899 */
894 __insn_mtspr(SPR_MPL_INTCTRL_0_SET_0, 1); 900 __insn_mtspr(SPR_MPL_INTCTRL_0_SET_0, 1);
901
902 /* Initialize IRQ support for this cpu. */
903 setup_irq_regs();
904
905#ifdef CONFIG_HARDWALL
906 /* Reset the network state on this cpu. */
907 reset_network_state();
908#endif
895} 909}
896 910
897static int __initdata set_initramfs_file; 911static int __initdata set_initramfs_file;
@@ -922,22 +936,22 @@ static void __init load_hv_initrd(void)
922 fd = hv_fs_findfile((HV_VirtAddr) initramfs_file); 936 fd = hv_fs_findfile((HV_VirtAddr) initramfs_file);
923 if (fd == HV_ENOENT) { 937 if (fd == HV_ENOENT) {
924 if (set_initramfs_file) 938 if (set_initramfs_file)
925 printk("No such hvfs initramfs file '%s'\n", 939 pr_warning("No such hvfs initramfs file '%s'\n",
926 initramfs_file); 940 initramfs_file);
927 return; 941 return;
928 } 942 }
929 BUG_ON(fd < 0); 943 BUG_ON(fd < 0);
930 stat = hv_fs_fstat(fd); 944 stat = hv_fs_fstat(fd);
931 BUG_ON(stat.size < 0); 945 BUG_ON(stat.size < 0);
932 if (stat.flags & HV_FS_ISDIR) { 946 if (stat.flags & HV_FS_ISDIR) {
933 printk("Ignoring hvfs file '%s': it's a directory.\n", 947 pr_warning("Ignoring hvfs file '%s': it's a directory.\n",
934 initramfs_file); 948 initramfs_file);
935 return; 949 return;
936 } 950 }
937 initrd = alloc_bootmem_pages(stat.size); 951 initrd = alloc_bootmem_pages(stat.size);
938 rc = hv_fs_pread(fd, (HV_VirtAddr) initrd, stat.size, 0); 952 rc = hv_fs_pread(fd, (HV_VirtAddr) initrd, stat.size, 0);
939 if (rc != stat.size) { 953 if (rc != stat.size) {
940 printk("Error reading %d bytes from hvfs file '%s': %d\n", 954 pr_err("Error reading %d bytes from hvfs file '%s': %d\n",
941 stat.size, initramfs_file, rc); 955 stat.size, initramfs_file, rc);
942 free_bootmem((unsigned long) initrd, stat.size); 956 free_bootmem((unsigned long) initrd, stat.size);
943 return; 957 return;
@@ -966,9 +980,9 @@ static void __init validate_hv(void)
966 HV_Topology topology = hv_inquire_topology(); 980 HV_Topology topology = hv_inquire_topology();
967 BUG_ON(topology.coord.x != 0 || topology.coord.y != 0); 981 BUG_ON(topology.coord.x != 0 || topology.coord.y != 0);
968 if (topology.width != 1 || topology.height != 1) { 982 if (topology.width != 1 || topology.height != 1) {
969 printk("Warning: booting UP kernel on %dx%d grid;" 983 pr_warning("Warning: booting UP kernel on %dx%d grid;"
970 " will ignore all but first tile.\n", 984 " will ignore all but first tile.\n",
971 topology.width, topology.height); 985 topology.width, topology.height);
972 } 986 }
973#endif 987#endif
974 988
@@ -1004,7 +1018,7 @@ static void __init validate_hv(void)
1004 1018
1005 if (hv_confstr(HV_CONFSTR_CHIP_MODEL, (HV_VirtAddr)chip_model, 1019 if (hv_confstr(HV_CONFSTR_CHIP_MODEL, (HV_VirtAddr)chip_model,
1006 sizeof(chip_model)) < 0) { 1020 sizeof(chip_model)) < 0) {
1007 printk("Warning: HV_CONFSTR_CHIP_MODEL not available\n"); 1021 pr_err("Warning: HV_CONFSTR_CHIP_MODEL not available\n");
1008 strlcpy(chip_model, "unknown", sizeof(chip_model)); 1022 strlcpy(chip_model, "unknown", sizeof(chip_model));
1009 } 1023 }
1010} 1024}
@@ -1096,7 +1110,7 @@ static int __init disabled_cpus(char *str)
1096 if (str == NULL || cpulist_parse_crop(str, &disabled_map) != 0) 1110 if (str == NULL || cpulist_parse_crop(str, &disabled_map) != 0)
1097 return -EINVAL; 1111 return -EINVAL;
1098 if (cpumask_test_cpu(boot_cpu, &disabled_map)) { 1112 if (cpumask_test_cpu(boot_cpu, &disabled_map)) {
1099 printk("disabled_cpus: can't disable boot cpu %d\n", boot_cpu); 1113 pr_err("disabled_cpus: can't disable boot cpu %d\n", boot_cpu);
1100 cpumask_clear_cpu(boot_cpu, &disabled_map); 1114 cpumask_clear_cpu(boot_cpu, &disabled_map);
1101 } 1115 }
1102 return 0; 1116 return 0;
@@ -1104,12 +1118,12 @@ static int __init disabled_cpus(char *str)
1104 1118
1105early_param("disabled_cpus", disabled_cpus); 1119early_param("disabled_cpus", disabled_cpus);
1106 1120
1107void __init print_disabled_cpus() 1121void __init print_disabled_cpus(void)
1108{ 1122{
1109 if (!cpumask_empty(&disabled_map)) { 1123 if (!cpumask_empty(&disabled_map)) {
1110 char buf[100]; 1124 char buf[100];
1111 cpulist_scnprintf(buf, sizeof(buf), &disabled_map); 1125 cpulist_scnprintf(buf, sizeof(buf), &disabled_map);
1112 printk(KERN_INFO "CPUs not available for Linux: %s\n", buf); 1126 pr_info("CPUs not available for Linux: %s\n", buf);
1113 } 1127 }
1114} 1128}
1115 1129
@@ -1162,7 +1176,7 @@ static void __init setup_cpu_maps(void)
1162 (HV_VirtAddr) cpumask_bits(&cpu_lotar_map), 1176 (HV_VirtAddr) cpumask_bits(&cpu_lotar_map),
1163 sizeof(cpu_lotar_map)); 1177 sizeof(cpu_lotar_map));
1164 if (rc < 0) { 1178 if (rc < 0) {
1165 printk("warning: no HV_INQ_TILES_LOTAR; using AVAIL\n"); 1179 pr_err("warning: no HV_INQ_TILES_LOTAR; using AVAIL\n");
1166 cpu_lotar_map = cpu_possible_map; 1180 cpu_lotar_map = cpu_possible_map;
1167 } 1181 }
1168 1182
@@ -1182,7 +1196,7 @@ static void __init setup_cpu_maps(void)
1182 1196
1183static int __init dataplane(char *str) 1197static int __init dataplane(char *str)
1184{ 1198{
1185 printk("WARNING: dataplane support disabled in this kernel\n"); 1199 pr_warning("WARNING: dataplane support disabled in this kernel\n");
1186 return 0; 1200 return 0;
1187} 1201}
1188 1202
@@ -1200,8 +1214,8 @@ void __init setup_arch(char **cmdline_p)
1200 len = hv_get_command_line((HV_VirtAddr) boot_command_line, 1214 len = hv_get_command_line((HV_VirtAddr) boot_command_line,
1201 COMMAND_LINE_SIZE); 1215 COMMAND_LINE_SIZE);
1202 if (boot_command_line[0]) 1216 if (boot_command_line[0])
1203 printk("WARNING: ignoring dynamic command line \"%s\"\n", 1217 pr_warning("WARNING: ignoring dynamic command line \"%s\"\n",
1204 boot_command_line); 1218 boot_command_line);
1205 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); 1219 strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
1206#else 1220#else
1207 char *hv_cmdline; 1221 char *hv_cmdline;
@@ -1269,7 +1283,7 @@ void __init setup_arch(char **cmdline_p)
1269 setup_numa_mapping(); 1283 setup_numa_mapping();
1270 zone_sizes_init(); 1284 zone_sizes_init();
1271 set_page_homes(); 1285 set_page_homes();
1272 setup_mpls(); 1286 setup_cpu(1);
1273 setup_clock(); 1287 setup_clock();
1274 load_hv_initrd(); 1288 load_hv_initrd();
1275} 1289}