linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME
Date: Fri, 18 May 2018 19:05:28 -0700	[thread overview]
Message-ID: <e97aa7a7b09f020614025ddd8ec2ca4b1fcc18e7.camel@perches.com> (raw)
In-Reply-To: <CAHp75VcaAMM7NxSWEFhrmQfKMOskuzbAHL-+eqi4DQ71cT7=Bg@mail.gmail.com>

On Fri, 2018-05-18 at 23:29 +0300, Andy Shevchenko wrote:
> On Fri, May 18, 2018 at 12:10 PM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2018-05-18 at 10:42 +0200, Petr Mladek wrote:
> > > On Thu 2018-05-10 08:45:29, Joe Perches wrote:
> > > [    0.000000] libftrace: ftrace: allocating 40753 entries in 160 pages
> > > [    0.004008] apic: APIC: Switch to symmetric I/O mode setup
> > 
> > I believe the uppercase APIC: bit should be removed.
> 
> I disagree on lowering the case of some prefixes.
> 
> In the case when kernel crashes at boot time and only what you have is
> what on your screen it's much better to catch with different cases
> than if everything would be either upper or lower.

I don't parse.
My suggestion is to make "apic: " the only prefix.

ie:
---
 arch/x86/kernel/apic/apic.c | 100 +++++++++++++++++++++-----------------------
 1 file changed, 47 insertions(+), 53 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 2aabd4cb0e3f..67dd4e9191da 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -14,6 +14,8 @@
  *	Mikael Pettersson	:	PM converted to driver model.
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/perf_event.h>
 #include <linux/kernel_stat.h>
 #include <linux/mc146818rtc.h>
@@ -232,7 +234,7 @@ static int modern_apic(void)
  */
 static void __init apic_disable(void)
 {
-	pr_info("APIC: switched to apic NOOP\n");
+	pr_info("switched to apic NOOP\n");
 	apic = &apic_noop;
 }
 
@@ -430,17 +432,13 @@ int setup_APIC_eilvt(u8 offset, u8 vector, u8 msg_type, u8 mask)
 	reserved = reserve_eilvt_offset(offset, new);
 
 	if (reserved != new) {
-		pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for "
-		       "vector 0x%x, but the register is already in use for "
-		       "vector 0x%x on another cpu\n",
+		pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for vector 0x%x, but the register is already in use for vector 0x%x on another cpu\n",
 		       smp_processor_id(), reg, offset, new, reserved);
 		return -EINVAL;
 	}
 
 	if (!eilvt_entry_is_changeable(old, new)) {
-		pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for "
-		       "vector 0x%x, but the register is already in use for "
-		       "vector 0x%x on this cpu\n",
+		pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for vector 0x%x, but the register is already in use for vector 0x%x on this cpu\n",
 		       smp_processor_id(), reg, offset, new, old);
 		return -EBUSY;
 	}
@@ -624,8 +622,8 @@ static void apic_check_deadline_errata(void)
 		return;
 
 	setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
-	pr_err(FW_BUG "TSC_DEADLINE disabled due to Errata; "
-	       "please update microcode to version: 0x%x (or later)\n", rev);
+	pr_err(FW_BUG "TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x%x (or later)\n",
+	       rev);
 }
 
 /*
@@ -769,14 +767,14 @@ calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)
 
 	res = (((u64)deltapm) *  mult) >> 22;
 	do_div(res, 1000000);
-	pr_warning("APIC calibration not consistent "
-		   "with PM-Timer: %ldms instead of 100ms\n",(long)res);
+	pr_warn("calibration not consistent with PM-Timer: %ldms instead of 100ms\n",
+		   (long)res);
 
 	/* Correct the lapic counter value */
 	res = (((u64)(*delta)) * pm_100ms);
 	do_div(res, deltapm);
-	pr_info("APIC delta adjusted to PM-Timer: "
-		"%lu (%ld)\n", (unsigned long)res, *delta);
+	pr_info("APIC delta adjusted to PM-Timer: %lu (%ld)\n",
+		(unsigned long)res, *delta);
 	*delta = (long)res;
 
 	/* Correct the tsc counter value */
@@ -893,7 +891,7 @@ static int __init calibrate_APIC_clock(void)
 	 */
 	if (lapic_timer_frequency < (1000000 / HZ)) {
 		local_irq_enable();
-		pr_warning("APIC frequency too slow, disabling apic timer\n");
+		pr_warn("frequency too slow, disabling apic timer\n");
 		return -1;
 	}
 
@@ -936,8 +934,8 @@ static int __init calibrate_APIC_clock(void)
 	local_irq_enable();
 
 	if (levt->features & CLOCK_EVT_FEAT_DUMMY) {
-		pr_warning("APIC timer disabled due to verification failure\n");
-			return -1;
+		pr_warn("timer disabled due to verification failure\n");
+		return -1;
 	}
 
 	return 0;
@@ -1010,8 +1008,8 @@ static void local_apic_timer_interrupt(void)
 	 * spurious.
 	 */
 	if (!evt->event_handler) {
-		pr_warning("Spurious LAPIC timer interrupt on cpu %d\n",
-			   smp_processor_id());
+		pr_warn("Spurious LAPIC timer interrupt on cpu %d\n",
+			smp_processor_id());
 		/* Switch it off */
 		lapic_timer_shutdown(evt);
 		return;
@@ -1254,7 +1252,7 @@ static int __init apic_intr_mode_select(void)
 		APIC_INTEGRATED(boot_cpu_apic_version)) {
 		disable_apic = 1;
 		pr_err(FW_BUG "Local APIC %d not detected, force emulation\n",
-				       boot_cpu_physical_apicid);
+		       boot_cpu_physical_apicid);
 		return APIC_PIC;
 	}
 #endif
@@ -1263,7 +1261,7 @@ static int __init apic_intr_mode_select(void)
 	if (!smp_found_config) {
 		disable_ioapic_support();
 		if (!acpi_lapic) {
-			pr_info("APIC: ACPI MADT or MP tables are not detected\n");
+			pr_info("ACPI MADT or MP tables are not detected\n");
 			return APIC_VIRTUAL_WIRE_NO_CONFIG;
 		}
 		return APIC_VIRTUAL_WIRE;
@@ -1272,7 +1270,7 @@ static int __init apic_intr_mode_select(void)
 #ifdef CONFIG_SMP
 	/* If SMP should be disabled, then really disable it! */
 	if (!setup_max_cpus) {
-		pr_info("APIC: SMP mode deactivated\n");
+		pr_info("SMP mode deactivated\n");
 		return APIC_SYMMETRIC_IO_NO_ROUTING;
 	}
 
@@ -1344,23 +1342,23 @@ void __init apic_intr_mode_init(void)
 
 	switch (apic_intr_mode) {
 	case APIC_PIC:
-		pr_info("APIC: Keep in PIC mode(8259)\n");
+		pr_info("Keep in PIC mode(8259)\n");
 		return;
 	case APIC_VIRTUAL_WIRE:
-		pr_info("APIC: Switch to virtual wire mode setup\n");
+		pr_info("Switch to virtual wire mode setup\n");
 		default_setup_apic_routing();
 		break;
 	case APIC_VIRTUAL_WIRE_NO_CONFIG:
-		pr_info("APIC: Switch to virtual wire mode setup with no configuration\n");
+		pr_info("Switch to virtual wire mode setup with no configuration\n");
 		upmode = true;
 		default_setup_apic_routing();
 		break;
 	case APIC_SYMMETRIC_IO:
-		pr_info("APIC: Switch to symmetric I/O mode setup\n");
+		pr_info("Switch to symmetric I/O mode setup\n");
 		default_setup_apic_routing();
 		break;
 	case APIC_SYMMETRIC_IO_NO_ROUTING:
-		pr_info("APIC: Switch to symmetric I/O mode setup in no SMP routine\n");
+		pr_info("Switch to symmetric I/O mode setup in no SMP routine\n");
 		break;
 	}
 
@@ -1372,7 +1370,7 @@ static void lapic_setup_esr(void)
 	unsigned int oldvalue, value, maxlvt;
 
 	if (!lapic_is_integrated()) {
-		pr_info("No ESR for 82489DX.\n");
+		pr_info("No ESR for 82489DX\n");
 		return;
 	}
 
@@ -1383,7 +1381,7 @@ static void lapic_setup_esr(void)
 		 * ESR disabled - we can't do anything useful with the
 		 * errors anyway - mbligh
 		 */
-		pr_info("Leaving ESR disabled.\n");
+		pr_info("Leaving ESR disabled\n");
 		return;
 	}
 
@@ -1442,7 +1440,8 @@ static void apic_pending_intr_clear(void)
 			}
 		}
 		if (acked > 256) {
-			pr_err("LAPIC pending interrupts after %d EOI\n", acked);
+			pr_err("LAPIC pending interrupts after %d EOI\n",
+			       acked);
 			break;
 		}
 		if (queued) {
@@ -1679,11 +1678,11 @@ static int __init setup_nox2apic(char *str)
 		int apicid = native_apic_msr_read(APIC_ID);
 
 		if (apicid >= 255) {
-			pr_warning("Apicid: %08x, cannot enforce nox2apic\n",
-				   apicid);
+			pr_warn("Apicid: %08x, cannot enforce nox2apic\n",
+				apicid);
 			return 0;
 		}
-		pr_warning("x2apic already enabled.\n");
+		pr_warn("x2apic already enabled\n");
 		__x2apic_disable();
 	}
 	setup_clear_cpu_cap(X86_FEATURE_X2APIC);
@@ -1851,7 +1850,7 @@ static int __init apic_verify(void)
 	 */
 	features = cpuid_edx(1);
 	if (!(features & (1 << X86_FEATURE_APIC))) {
-		pr_warning("Could not enable APIC!\n");
+		pr_warn("Could not enable APIC!\n");
 		return -1;
 	}
 	set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
@@ -1923,8 +1922,7 @@ static int __init detect_init_APIC(void)
 		 * "lapic" specified.
 		 */
 		if (!force_enable_local_apic) {
-			pr_info("Local APIC disabled by BIOS -- "
-				"you can enable it with \"lapic\"\n");
+			pr_info("Local APIC disabled by BIOS -- you can enable it with \"lapic\"\n");
 			return -1;
 		}
 		if (apic_force_enable(APIC_DEFAULT_PHYS_BASE))
@@ -1961,7 +1959,7 @@ void __init init_apic_mappings(void)
 	/* If no local APIC can be found return early */
 	if (!smp_found_config && detect_init_APIC()) {
 		/* lets NOP'ify apic operations */
-		pr_info("APIC: disable apic facility\n");
+		pr_info("disable apic facility\n");
 		apic_disable();
 	} else {
 		apic_phys = mp_lapic_addr;
@@ -2248,9 +2246,8 @@ int generic_processor_info(int apicid, int version)
 	    disabled_cpu_apicid == apicid) {
 		int thiscpu = num_processors + disabled_cpus;
 
-		pr_warning("APIC: Disabling requested cpu."
-			   " Processor %d/0x%x ignored.\n",
-			   thiscpu, apicid);
+		pr_warn("Disabling requested cpu. Processor %d/0x%x ignored.\n",
+			thiscpu, apicid);
 
 		disabled_cpus++;
 		return -ENODEV;
@@ -2264,10 +2261,7 @@ int generic_processor_info(int apicid, int version)
 	    apicid != boot_cpu_physical_apicid) {
 		int thiscpu = max + disabled_cpus - 1;
 
-		pr_warning(
-			"APIC: NR_CPUS/possible_cpus limit of %i almost"
-			" reached. Keeping one slot for boot cpu."
-			"  Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
+		pr_warn("NR_CPUS/possible_cpus limit of %i almost reached.  Keeping one slot for boot cpu.  Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
 
 		disabled_cpus++;
 		return -ENODEV;
@@ -2276,9 +2270,8 @@ int generic_processor_info(int apicid, int version)
 	if (num_processors >= nr_cpu_ids) {
 		int thiscpu = max + disabled_cpus;
 
-		pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
-			   "reached. Processor %d/0x%x ignored.\n",
-			   max, thiscpu, apicid);
+		pr_warn("NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
+			max, thiscpu, apicid);
 
 		disabled_cpus++;
 		return -EINVAL;
@@ -2308,13 +2301,13 @@ int generic_processor_info(int apicid, int version)
 	 * Validate version
 	 */
 	if (version == 0x0) {
-		pr_warning("BIOS bug: APIC version is 0 for CPU %d/0x%x, fixing up to 0x10\n",
-			   cpu, apicid);
+		pr_warn("BIOS bug: APIC version is 0 for CPU %d/0x%x, fixing up to 0x10\n",
+			cpu, apicid);
 		version = 0x10;
 	}
 
 	if (version != boot_cpu_apic_version) {
-		pr_warning("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n",
+		pr_warn("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n",
 			boot_cpu_apic_version, cpu, version);
 	}
 
@@ -2590,7 +2583,7 @@ static int set_multi(const struct dmi_system_id *d)
 {
 	if (multi)
 		return 0;
-	pr_info("APIC: %s detected, Multi Chassis\n", d->ident);
+	pr_info("%s detected, Multi Chassis\n", d->ident);
 	multi = 1;
 	return 0;
 }
@@ -2686,8 +2679,8 @@ static int __init apic_set_verbosity(char *arg)
 		apic_verbosity = APIC_VERBOSE;
 #ifdef CONFIG_X86_64
 	else {
-		pr_warning("APIC Verbosity level %s not recognised"
-			" use apic=verbose or apic=debug\n", arg);
+		pr_warn("Verbosity level %s not recognised use apic=verbose or apic=debug\n",
+			arg);
 		return -EINVAL;
 	}
 #endif
@@ -2736,7 +2729,8 @@ static int __init apic_set_extnmi(char *arg)
 	else if (!strncmp("bsp", arg, 3))
 		apic_extnmi = APIC_EXTNMI_BSP;
 	else {
-		pr_warn("Unknown external NMI delivery mode `%s' ignored\n", arg);
+		pr_warn("Unknown external NMI delivery mode `%s' ignored\n",
+			arg);
 		return -EINVAL;
 	}
 

  reply	other threads:[~2018-05-19  2:05 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 15:45 [PATCH 00/18] Convert default pr_fmt from empty to KBUILD_MODNAME Joe Perches
2018-05-10 15:45 ` [PATCH 01/18] kernel: Use pr_fmt Joe Perches
2018-05-10 16:14   ` Paul Moore
2018-05-10 19:05   ` Kees Cook
2018-05-13 19:17   ` Jessica Yu
2018-05-14 13:38   ` Masami Hiramatsu
2018-05-14 18:06   ` Paul E. McKenney
2018-05-14 18:59   ` Paul Moore
2018-05-10 15:45 ` [PATCH 02/18] lib: " Joe Perches
2018-05-10 15:45 ` [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME Joe Perches
2018-05-10 16:28   ` Steven Rostedt
2018-05-11 21:39     ` [PATCH] ring_buffer: Update logging to use single line output Joe Perches
2018-07-12  2:57       ` Steven Rostedt
2018-07-12  4:42         ` Joe Perches
2018-07-12 13:00           ` Steven Rostedt
2018-05-11  1:51   ` [PATCH 03/18] printk: Convert pr_fmt from blank define to KBUILD_MODNAME Sergey Senozhatsky
2018-05-11  1:57     ` Joe Perches
2018-05-11  2:12       ` Joe Perches
2018-05-11  2:24       ` Sergey Senozhatsky
2018-05-11  2:23     ` Sergey Senozhatsky
2018-05-11  2:33       ` Joe Perches
2018-05-11  2:41         ` Sergey Senozhatsky
2018-05-11  2:57           ` Joe Perches
2018-05-18  8:42   ` Petr Mladek
2018-05-18  9:10     ` Joe Perches
2018-05-18 20:29       ` Andy Shevchenko
2018-05-19  2:05         ` Joe Perches [this message]
2018-05-19 18:27           ` Andy Shevchenko
2018-05-10 15:45 ` [PATCH 04/18] x86: Remove pr_fmt duplicate logging prefixes Joe Perches
2018-05-13 19:27   ` [tip:x86/cleanups] " tip-bot for Joe Perches
2018-05-17 18:27     ` Borislav Petkov
2018-05-17 18:43       ` Joe Perches
2018-05-17 19:14         ` Thomas Gleixner
2019-02-21  6:25         ` Bjorn Helgaas
2018-05-10 15:45 ` [PATCH 05/18] x86/mtrr: Rename main.c to mtrr.c and remove duplicate prefixes Joe Perches
2018-05-13 19:28   ` [tip:x86/cleanups] " tip-bot for Joe Perches
2018-05-10 15:45 ` [PATCH 06/18] net: Remove pr_fmt duplicate logging prefixes Joe Perches
2018-05-10 15:45 ` [PATCH 07/18] blk-mq: " Joe Perches
2018-05-10 15:45 ` [PATCH 08/18] random: " Joe Perches
2018-05-10 15:45 ` [PATCH 09/18] ptp: " Joe Perches
2018-05-10 19:35   ` Richard Cochran
2018-05-10 15:45 ` [PATCH 10/18] efifb: " Joe Perches
2018-05-10 15:45 ` [PATCH 11/18] proc: " Joe Perches
2018-05-10 15:45 ` [PATCH 12/18] uprobes: " Joe Perches
2018-05-10 15:45 ` [PATCH 13/18] printk: " Joe Perches
2018-05-11  1:54   ` Sergey Senozhatsky
2018-05-18  8:43   ` Petr Mladek
2018-05-10 15:45 ` [PATCH 14/18] lib/mpi: " Joe Perches
2018-05-10 15:45 ` [PATCH 15/18] security: " Joe Perches
2018-05-10 16:15   ` Paul Moore
2018-05-10 15:45 ` [PATCH 16/18] aoe: " Joe Perches
2018-05-10 15:45 ` [PATCH 17/18] security: encrypted-keys: " Joe Perches
2018-05-10 18:09   ` James Morris
2018-05-10 15:45 ` [PATCH 18/18] rcu: Use pr_fmt to prefix "rcu: " to logging output Joe Perches
2018-05-14 20:29   ` Paul E. McKenney
2018-05-14 20:37     ` Andy Shevchenko
2018-05-14 21:08       ` Paul E. McKenney
2018-05-14 20:52     ` Randy Dunlap
2018-05-14 21:05       ` Paul E. McKenney
2018-05-14 21:41     ` Joe Perches
2018-05-14 22:24       ` Paul E. McKenney
2018-05-14 22:54         ` Joe Perches
2018-05-14 23:58           ` Paul E. McKenney
2018-05-15  0:23             ` Joe Perches
2018-05-15  0:32               ` Paul E. McKenney
2018-05-15  1:22                 ` Joe Perches
2018-05-15  3:41                   ` Paul E. McKenney
2018-05-15 19:28                 ` Paul E. McKenney
2018-05-15 21:11                   ` Joe Perches
2018-05-15 21:23                     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e97aa7a7b09f020614025ddd8ec2ca4b1fcc18e7.camel@perches.com \
    --to=joe@perches.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).