linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	xen-devel@lists.xenproject.org, mingo@kernel.org, hpa@zytor.com,
	ebiederm@xmission.com, bhe@redhat.com,
	boris.ostrovsky@oracle.com, peterz@infradead.org,
	izumi.taku@jp.fujitsu.com
Subject: Re: [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP system
Date: Sun, 2 Jul 2017 20:19:54 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1707022011040.2296@nanos> (raw)
In-Reply-To: <1fa26228fa94779d12d4089b83a43fe157b110fe.1498795030.git.douly.fnst@cn.fujitsu.com>

On Fri, 30 Jun 2017, Dou Liyang wrote:
>  static inline int apic_force_enable(unsigned long addr)
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 0601054..9bf7e95 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -1198,6 +1198,10 @@ static int __init apic_intr_mode_select(int *upmode)
>  	}
>  #endif
>  
> +#ifdef CONFIG_UP_LATE_INIT
> +	*upmode = true;
> +#endif

This is really wrong. The upmode decision, which is required for calling
apic_bsp_setup() should not happen here, really. As I told you in the
previous patch, use the return code and then you can make further decisions
in apic_intr_mode_init().

And you do it there w/o any ifdeffery:

static void apic_intr_mode_init(void)
{
	bool upmode = IS_ENABLED(CONFIG_UP_LATE_INIT);

	switch (....) {
	case XXXX:
		upmode = true;
		....
	}
	apic_bsp_setup(upmode);
}

Thanks,

	tglx

  reply	other threads:[~2017-07-02 18:19 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30  4:07 [PATCH v5 00/12] Unify the interrupt delivery mode and do its setup in advance Dou Liyang
2017-06-30  4:07 ` [PATCH v5 01/12] x86/apic: Construct a selector for the interrupt delivery mode Dou Liyang
2017-07-02 17:37   ` Thomas Gleixner
2017-07-03  1:44     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 02/12] x86/apic: Prepare for unifying the interrupt delivery modes setup Dou Liyang
2017-07-02 17:47   ` Thomas Gleixner
2017-07-03  1:58     ` Dou Liyang
2017-07-03  6:41       ` Thomas Gleixner
2017-07-03  6:47         ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 03/12] x86/apic: Split local APIC timer setup from the APIC setup Dou Liyang
2017-06-30  4:07 ` [PATCH v5 04/12] x86/apic: Move logical APIC ID away from apic_bsp_setup() Dou Liyang
2017-07-02 17:54   ` Thomas Gleixner
2017-07-03  2:02     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for SMP-capable system Dou Liyang
2017-07-02 18:07   ` Thomas Gleixner
2017-07-03  2:34     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 06/12] x86/apic: Mark the apic_intr_mode extern for sanity check cleanup Dou Liyang
2017-06-30  4:07 ` [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP system Dou Liyang
2017-07-02 18:19   ` Thomas Gleixner [this message]
2017-07-03  2:34     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 08/12] x86/ioapic: Refactor the delay logic in timer_irq_works() Dou Liyang
2017-07-02 19:15   ` Thomas Gleixner
2017-07-03  3:23     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops Dou Liyang
2017-07-02 19:16   ` Thomas Gleixner
2017-07-03  3:28     ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 10/12] x86/xen: Bypass intr mode setup in enlighten_pv system Dou Liyang
2017-07-02 19:18   ` Thomas Gleixner
2017-07-03  3:53     ` Dou Liyang
2017-07-03  6:56       ` Thomas Gleixner
2017-07-03  7:17         ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 11/12] x86/time: Initialize interrupt mode behind timer init Dou Liyang
2017-07-06 14:54   ` [x86/time] 03fa63cc96: ACPI_Error:Table[DMAR]is_not_invalidated_during_early_boot_stage(#/tbxface-#) kernel test robot
2017-07-06 21:03     ` [x86/time] 03fa63cc96: ACPI_Error:Table[DMAR]is_not_invalidated_during_early_boot_stage(#/tbxface -#) Thomas Gleixner
2017-07-07  1:54       ` Ye Xiaolong
2017-07-07  2:39         ` Dou Liyang
2017-07-07  3:04           ` Ye Xiaolong
2017-07-07  4:46             ` Dou Liyang
2017-06-30  4:07 ` [PATCH v5 12/12] x86/apic: Remove the init_bsp_APIC() Dou Liyang

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=alpine.DEB.2.20.1707022011040.2296@nanos \
    --to=tglx@linutronix.de \
    --cc=bhe@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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).