Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679549

Re: [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP system

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP system
Date 2017-07-02 20:30 +0200
Message-ID <tYRN8-5MQ-11@gated-at.bofh.it> (permalink)
References <tXVpM-np-9@gated-at.bofh.it> <tXVpN-np-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-30 06:10 +0200
  Re: [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP  system Thomas Gleixner <tglx@linutronix.de> - 2017-07-02 20:30 +0200
    Re: [PATCH v5 07/12] x86/apic: Unify interrupt mode setup for UP  system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-07-03 04:40 +0200

csiph-web