mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dou Liyang <douly.fnst@cn.fujitsu.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<mingo@kernel.org>, <ebiederm@xmission.com>, <bhe@redhat.com>,
	<hpa@zytor.com>, <izumi.taku@jp.fujitsu.com>
Subject: Re: [RFC PATCH 3/6] x86/apic: Extract APIC timer related code from apic_bsp_setup()
Date: Fri, 7 Apr 2017 15:51:11 +0800	[thread overview]
Message-ID: <174164c8-bca5-8c3b-d0f1-ae75a3a8a0d6@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1704051347160.2382@nanos>

Hi Thomas,

At 04/05/2017 07:56 PM, Thomas Gleixner wrote:
> On Wed, 29 Mar 2017, Dou Liyang wrote:
>> +/* Setup local APIC timer and get the Id*/
>> +static int __init apic_bsp_timer_setup(void)
>
> This does not make sense. The id and the timers have nothing to do with
> each other.

Yes, Indeed. Here is more like the rest work for APIC setup, which
can't be executed earlier, The name is not suitable. I will refactor
it.

>> +{
>> +	int id;
>> +
>> +	if (x2apic_mode)
>> +		id = apic_read(APIC_LDR);
>> +	else
>> +		id = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR));
>> +
>> +	if (!skip_ioapic_setup && nr_ioapics && nr_legacy_irqs())
>> +		check_timer();
>
> Why are you moving this to the APIC? check_timer() has absolutely nothing

Because, the jiffies is used in check_timer() for checking timer irq 
works(timer_irq_works()) and can't work at the beginning.

So, keep check_timer() in IOAPIC setup function (setup_IO_APIC()) which
has been moved to init_IRQ() will make the kernel not boot up.

> to do with the apic timer. It's a IOAPIC only issue and required to test
> that the IRQ0 interrupt delivery works through the IOAPIC.
>

Yes, I see, split check_timer() is not a good way, and move the APIC
initialization to the end of init_IRQ() is also not well.

Thanks,
	Liyang

> Thanks,
>
> 	tglx
>
>
>

  reply	other threads:[~2017-04-07  7:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 14:55 [RFC PATCH 0/6] Unify the Interrupt Mode and setup it as soon as possible Dou Liyang
2017-03-29 14:55 ` [RFC PATCH 1/6] x86/apic: Replace init_bsp_APIC() with apic_virture_wire_mode_setup() Dou Liyang
2017-04-05 10:43   ` Thomas Gleixner
2017-04-05 10:50     ` Thomas Gleixner
2017-04-06  1:37       ` Dou Liyang
2017-04-06  1:32     ` Dou Liyang
2017-03-29 14:55 ` [RFC PATCH 2/6] x86/apic: Construct a framework for setuping APIC mode as soon as possible Dou Liyang
2017-04-05 11:46   ` Thomas Gleixner
2017-04-06  2:21     ` Dou Liyang
2017-03-29 14:55 ` [RFC PATCH 3/6] x86/apic: Extract APIC timer related code from apic_bsp_setup() Dou Liyang
2017-04-05 11:56   ` Thomas Gleixner
2017-04-07  7:51     ` Dou Liyang [this message]
2017-03-29 14:55 ` [RFC PATCH 4/6] x86/apic: Make the APIC mode setup earlier for SMP-capable system Dou Liyang
2017-03-29 14:55 ` [RFC PATCH 5/6] x86/apic: Make the APIC mode setup earlier for UP system Dou Liyang
2017-03-29 14:55 ` [RFC PATCH 6/6] x86/apic: Remove the apic_virture_wire_mode_setup() Dou Liyang
2017-03-30  2:08 ` [RFC PATCH 0/6] Unify the Interrupt Mode and setup it as soon as possible Baoquan He
2017-03-30  3:03   ` Dou Liyang
2017-03-30  3:09     ` Dou Liyang
2017-03-30  4:10       ` Baoquan He
2017-04-06  8:43 ` Thomas Gleixner
2017-04-07  9:39   ` 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=174164c8-bca5-8c3b-d0f1-ae75a3a8a0d6@cn.fujitsu.com \
    --to=douly.fnst@cn.fujitsu.com \
    --cc=bhe@redhat.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=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®