aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-06-24 14:17:22 -0500
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-26 14:28:58 +1000
commit7fab123bff59c44650b4b9c6a45c4884ed7ea2bd (patch)
tree9292560e8147aa9a347308415cfafa7395a6be4f /core
parent562a10caf48c91c673f5e78289894dfbfe326884 (diff)
downloadskiboot-7fab123bff59c44650b4b9c6a45c4884ed7ea2bd.zip
skiboot-7fab123bff59c44650b4b9c6a45c4884ed7ea2bd.tar.gz
skiboot-7fab123bff59c44650b4b9c6a45c4884ed7ea2bd.tar.bz2
Big log level reduction...
90% of what we print isn't useful to a normal user. This dramatically reduces the amount of messages printed by OPAL in normal circumstances. We still need to add a way to bump the log level at boot based on a BMC scratch register or some HDAT property. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/device.c2
-rw-r--r--core/init.c17
-rw-r--r--core/interrupts.c4
-rw-r--r--core/mem_region.c2
-rw-r--r--core/nvram-format.c9
-rw-r--r--core/opal.c4
-rw-r--r--core/pci.c2
7 files changed, 19 insertions, 21 deletions
diff --git a/core/device.c b/core/device.c
index f3ee63f..42c47d1 100644
--- a/core/device.c
+++ b/core/device.c
@@ -893,7 +893,7 @@ int dt_expand_node(struct dt_node *node, const void *fdt, int fdt_node)
void dt_expand(const void *fdt)
{
- printf("FDT: Parsing fdt @%p\n", fdt);
+ prlog(PR_DEBUG, "FDT: Parsing fdt @%p\n", fdt);
if (dt_expand_node(dt_root, fdt, 0) < 0)
abort();
diff --git a/core/init.c b/core/init.c
index 228186a..206b1ab 100644
--- a/core/init.c
+++ b/core/init.c
@@ -119,8 +119,8 @@ static bool try_load_elf64_le(struct elf_hdr *header)
kernel_size = le64_to_cpu(kh->e_shoff) +
(le16_to_cpu(kh->e_shentsize) * le16_to_cpu(kh->e_shnum));
- printf("INIT: 64-bit kernel entry at 0x%llx, size 0x%lx\n",
- kernel_entry, kernel_size);
+ prlog(PR_DEBUG, "INIT: 64-bit kernel entry at 0x%llx, size 0x%lx\n",
+ kernel_entry, kernel_size);
return true;
}
@@ -371,7 +371,7 @@ static bool load_kernel(void)
if (dt_has_node_property(dt_chosen, "kernel-base-address", NULL)) {
kernel_entry = dt_prop_get_u64(dt_chosen,
"kernel-base-address");
- printf("INIT: Kernel image at 0x%llx\n",kernel_entry);
+ prlog(PR_DEBUG, "INIT: Kernel image at 0x%llx\n", kernel_entry);
kh = (struct elf_hdr *)kernel_entry;
/*
* If the kernel is at 0, restore it as it was overwritten
@@ -398,11 +398,12 @@ static bool load_kernel(void)
}
}
- printf("INIT: Kernel loaded, size: %zu bytes (0 = unknown preload)\n",
- kernel_size);
+ prlog(PR_DEBUG,
+ "INIT: Kernel loaded, size: %zu bytes (0 = unknown preload)\n",
+ kernel_size);
if (kh->ei_ident != ELF_IDENT) {
- printf("INIT: ELF header not found. Assuming raw binary.\n");
+ prerror("INIT: ELF header not found. Assuming raw binary.\n");
return true;
}
@@ -413,7 +414,7 @@ static bool load_kernel(void)
if (!try_load_elf32(kh))
return false;
} else {
- printf("INIT: Neither ELF32 not ELF64 ?\n");
+ prerror("INIT: Neither ELF32 not ELF64 ?\n");
return false;
}
@@ -542,7 +543,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
/* Dump the selected console */
stdoutp = dt_prop_get_def(dt_chosen, "linux,stdout-path", NULL);
- printf("INIT: stdout-path: %s\n", stdoutp ? stdoutp : "");
+ prlog(PR_DEBUG, "INIT: stdout-path: %s\n", stdoutp ? stdoutp : "");
printf("INIT: Starting kernel at 0x%llx, fdt at %p %u bytes)\n",
diff --git a/core/interrupts.c b/core/interrupts.c
index b9f4d14..9161960 100644
--- a/core/interrupts.c
+++ b/core/interrupts.c
@@ -230,8 +230,8 @@ void add_opal_interrupts(void)
continue;
name = is->ops->name ? is->ops->name(is, isn) : NULL;
ns = name ? strlen(name) : 0;
- printf("irq %x name: %s (%d/%d)\n",
- isn, name ? name : "<null>", ns, tns);
+ prlog(PR_DEBUG, "irq %x name: %s (%d/%d)\n",
+ isn, name ? name : "<null>", ns, tns);
names = realloc(names, tns + ns + 1);
if (name) {
strcpy(names + tns, name);
diff --git a/core/mem_region.c b/core/mem_region.c
index ec38b24..8d1363f 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -926,7 +926,7 @@ static void mem_region_parse_reserved_properties(void)
const struct dt_property *names, *ranges;
struct mem_region *region;
- prlog(PR_INFO, "MEM: parsing reserved memory from "
+ prlog(PR_DEBUG, "MEM: parsing reserved memory from "
"reserved-names/-ranges properties\n");
names = dt_find_property(dt_root, "reserved-names");
diff --git a/core/nvram-format.c b/core/nvram-format.c
index 84407fc..923098a 100644
--- a/core/nvram-format.c
+++ b/core/nvram-format.c
@@ -156,12 +156,12 @@ int nvram_check(void *nvram_image, const uint32_t nvram_size)
}
}
if (!found_common) {
- prerror("NVRAM: Common partition not found !\n");
+ prlog_once(PR_ERR, "NVRAM: Common partition not found !\n");
goto failed;
}
if (!skiboot_part_hdr) {
- prerror("NVRAM: Skiboot private partition not found !\n");
+ prlog_once(PR_ERR, "NVRAM: Skiboot private partition not found !\n");
goto failed;
} else {
/*
@@ -222,11 +222,8 @@ const char *nvram_query(const char *key)
*
* NB: nvram_validate() can update skiboot_part_hdr
*/
- if (!nvram_validate()) {
- prerror("NVRAM: Look up for '%s' failed due to bad format!\n",
- key);
+ if (!nvram_validate())
return NULL;
- }
part_end = (const char *) skiboot_part_hdr
+ be16_to_cpu(skiboot_part_hdr->len) * 16 - 1;
diff --git a/core/opal.c b/core/opal.c
index 14357cc..8095f73 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -64,8 +64,8 @@ void opal_table_init(void)
struct opal_table_entry *s = __opal_table_start;
struct opal_table_entry *e = __opal_table_end;
- printf("OPAL table: %p .. %p, branch table: %p\n",
- s, e, opal_branch_table);
+ prlog(PR_DEBUG, "OPAL table: %p .. %p, branch table: %p\n",
+ s, e, opal_branch_table);
while(s < e) {
opal_branch_table[s->token] = function_entry_address(s->func);
opal_num_args[s->token] = s->nargs;
diff --git a/core/pci.c b/core/pci.c
index 63d9d24..cc18db1 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1737,7 +1737,7 @@ void pci_init_slots(void)
if (platform.pre_pci_fixup)
platform.pre_pci_fixup();
- prlog(PR_NOTICE, "PCI: Resetting PHBs...\n");
+ prlog(PR_INFO, "PCI: Resetting PHBs...\n");
pci_do_jobs(pci_reset_phb);
prlog(PR_NOTICE, "PCI: Probing slots...\n");