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


Groups > linux.kernel > #1678459 > unrolled thread

[PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops

Started byDou Liyang <douly.fnst@cn.fujitsu.com>
First post2017-06-30 06:10 +0200
Last post2017-07-03 05:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-30 06:10 +0200
    Re: [PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops Thomas Gleixner <tglx@linutronix.de> - 2017-07-02 21:20 +0200
      Re: [PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-07-03 05:30 +0200

#1678459 — [PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops

FromDou Liyang <douly.fnst@cn.fujitsu.com>
Date2017-06-30 06:10 +0200
Subject[PATCH v5 09/12] x86/init: add intr_mode_init to x86_init_ops
Message-ID<tXVpN-np-39@gated-at.bofh.it>
Add an unconditional x86_init_ops function which defaults to the
standard function and can be overridden by the early platform code.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/include/asm/x86_init.h | 2 ++
 arch/x86/kernel/apic/apic.c     | 2 +-
 arch/x86/kernel/smpboot.c       | 2 +-
 arch/x86/kernel/x86_init.c      | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index 7ba7e90..f45acdf 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -50,11 +50,13 @@ struct x86_init_resources {
  *				are set up.
  * @intr_init:			interrupt init code
  * @trap_init:			platform specific trap setup
+ * @intr_mode_init:		interrupt delivery mode setup
  */
 struct x86_init_irqs {
 	void (*pre_vector_init)(void);
 	void (*intr_init)(void);
 	void (*trap_init)(void);
+	void (*intr_mode_init)(void);
 };
 
 /**
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 9bf7e95..51204d4 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2387,7 +2387,7 @@ void __init apic_bsp_setup(bool upmode)
 #ifdef CONFIG_UP_LATE_INIT
 void __init up_late_init(void)
 {
-	apic_intr_mode_init();
+	x86_init.irqs.intr_mode_init();
 
 	if (apic_intr_mode == APIC_PIC)
 		return;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2db61dcb..80d25fe 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1288,7 +1288,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 
 	set_cpu_sibling_map(0);
 
-	apic_intr_mode_init();
+	x86_init.irqs.intr_mode_init();
 	smp_sanity_check();
 
 	switch (apic_intr_mode) {
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index a088b2c..a7889b9 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -55,6 +55,7 @@ struct x86_init_ops x86_init __initdata = {
 		.pre_vector_init	= init_ISA_irqs,
 		.intr_init		= native_init_IRQ,
 		.trap_init		= x86_init_noop,
+		.intr_mode_init		= apic_intr_mode_init
 	},
 
 	.oem = {
-- 
2.5.5

[toc] | [next] | [standalone]


#1679550

FromThomas Gleixner <tglx@linutronix.de>
Date2017-07-02 21:20 +0200
Message-ID<tYSzv-6sY-1@gated-at.bofh.it>
In reply to#1678459
On Fri, 30 Jun 2017, Dou Liyang wrote:
> Add an unconditional x86_init_ops function which defaults to the
> standard function and can be overridden by the early platform code.

That changelog describes WHAT the patch does, but not WHY. That's useless
as we can see WHAT the patch does from the patch itself. The WHY is the
really important information.

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1679620

FromDou Liyang <douly.fnst@cn.fujitsu.com>
Date2017-07-03 05:30 +0200
Message-ID<tZ0dH-3G2-3@gated-at.bofh.it>
In reply to#1679550
Hi Thomas,

At 07/03/2017 03:16 AM, Thomas Gleixner wrote:
> On Fri, 30 Jun 2017, Dou Liyang wrote:
>> Add an unconditional x86_init_ops function which defaults to the
>> standard function and can be overridden by the early platform code.
>
> That changelog describes WHAT the patch does, but not WHY. That's useless
> as we can see WHAT the patch does from the patch itself. The WHY is the
> really important information.
>

Understood, I will add the WHY description in the next version.

Thank,

	dou.

> Thanks,
>
> 	tglx
>
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web