From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2
Date: Mon, 17 Nov 2008 17:52:24 +0100 [thread overview]
Message-ID: <20081117165224.GH12081@elte.hu> (raw)
In-Reply-To: <49200031.2040701@kernel.org>
* Yinghai Lu <yinghai@kernel.org> wrote:
> Impact: fix wakeup path with numaq and es7000
applied to tip/x86/quirks, thanks Yinghai!
A couple of comments:
> +static inline void inquire_remote_apic(int apicid)
> +{
> + if (apic_verbosity >= APIC_DEBUG)
> + __inquire_remote_apic(apicid);
> +}
could you please make this a non-include-file function and only
install the function vector if the platform necessiates it?
I.e.:
> + void (*wait_for_init_deassert)(atomic_t *deassert);
> + void (*smp_callin_clear_local_apic)(void);
> + void (*store_NMI_vector)(unsigned short *high, unsigned short *low);
> + void (*restore_NMI_vector)(unsigned short *high, unsigned short *low);
> + void (*inquire_remote_apic)(int apicid);
should have NULL in the 'default' case - and only have some exception
(quick) function installed in the non-default case.
That way the 3 separate wait_for_init_deassert() and
inquire_remote_apic() inline functions can be removed and the
exception be moved to es7000_32.c and numaq_32.c.
like you did it here properly to install the MIP-init sequence in the
es7000 case:
> Index: linux-2.6/arch/x86/kernel/es7000_32.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/es7000_32.c
> +++ linux-2.6/arch/x86/kernel/es7000_32.c
> @@ -40,6 +40,7 @@
> #include <asm/smp.h>
> #include <asm/apicdef.h>
> #include <mach_mpparse.h>
> +#include <asm/setup.h>
>
> /*
> * ES7000 chipsets
> @@ -161,6 +162,26 @@ es7000_rename_gsi(int ioapic, int gsi)
> return gsi;
> }
>
> +#ifdef CONFIG_ES7000_CLUSTERED_APIC
> +static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
> +{
> + unsigned long vect = 0, psaival = 0;
> +
> + if (psai == NULL)
> + return -1;
> +
> + vect = ((unsigned long)__pa(eip)/0x1000) << 16;
> + psaival = (0x1000000 | vect | cpu);
> +
> + while (*psai & 0x1000000)
> + ;
> +
> + *psai = psaival;
> +
> + return 0;
> +}
> +#endif
> +
> void __init
> setup_unisys(void)
> {
> @@ -176,6 +197,9 @@ setup_unisys(void)
> else
> es7000_plat = ES7000_CLASSIC;
> ioapic_renumber_irq = es7000_rename_gsi;
> +#ifdef CONFIG_ES7000_CLUSTERED_APIC
> + x86_quirks->wakeup_secondary_cpu = wakeup_secondary_cpu_via_mip;
> +#endif
> }
btw:
shouldnt CONFIG_ES7000_CLUSTERED_APIC be converted to a proper genapic
variant (like we have in apic.c), instead of this #ifdef driven
mechanism?
Ingo
next prev parent reply other threads:[~2008-11-17 16:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-16 8:47 [PATCH] x86: fix wakeup_cpu with numaq/es7000 Yinghai Lu
2008-11-16 11:12 ` [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2 Yinghai Lu
2008-11-17 16:52 ` Ingo Molnar [this message]
2008-11-17 17:11 ` Cyrill Gorcunov
2008-11-17 17:35 ` Ingo Molnar
2008-11-17 17:52 ` Cyrill Gorcunov
2008-11-17 17:37 ` Ingo Molnar
2008-11-17 17:38 ` Ingo Molnar
2008-11-17 18:18 ` Yinghai Lu
2008-11-17 17:38 ` Ingo Molnar
2008-11-17 21:06 ` Yinghai Lu
2008-11-17 23:19 ` Yinghai Lu
2008-11-17 23:28 ` Ingo Molnar
2008-11-18 2:49 ` Yinghai Lu
2008-11-18 2:51 ` Yinghai Lu
2008-11-18 7:43 ` Ingo Molnar
2008-11-18 16:13 ` [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2 - fix v2 Yinghai Lu
2008-11-18 16:14 ` [PATCH] x86: use update_genapic to get rid of ES7000_CLUSTERED_APIC v2 Yinghai Lu
2008-11-18 21:14 ` [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2 - fix v2 Ingo Molnar
2008-11-20 4:50 ` Yinghai Lu
2008-11-20 4:00 ` [PATCH] x86: fix wakeup_cpu with numaq/es7000 v2 Hiroshi Shimamoto
2008-11-20 9:46 ` Ingo Molnar
2008-11-20 18:15 ` Hiroshi Shimamoto
2008-11-17 17:54 ` Yinghai Lu
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=20081117165224.GH12081@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=yinghai@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®