LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Eial Czerwacki <eial@scalemp.com>,
Thomas Gleixner <tglx@linutronix.de>,
Randy Dunlap <rdunlap@infradead.org>
Cc: "Shai Fultheim (Shai@ScaleMP.com)" <Shai@ScaleMP.com>,
Andrew Morton <akpm@linux-foundation.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"mhocko@suse.cz" <mhocko@suse.cz>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
"mm-commits@vger.kernel.org" <mm-commits@vger.kernel.org>,
X86 ML <x86@kernel.org>, 'Oren Twaig' <oren@scalemp.com>
Subject: Re: [PATCH] x86/build: Build VSMP support only if selected
Date: Thu, 1 Nov 2018 14:45:05 +0100 [thread overview]
Message-ID: <054cd800-5124-f897-0069-aba49f8eb654@suse.com> (raw)
In-Reply-To: <a8f2ac8e-45dc-1c12-e888-6ad880b1306f@scalemp.com>
On 01/11/2018 14:10, Eial Czerwacki wrote:
> Greetings,
>
> On 11/01/2018 12:39 PM, Shai Fultheim (Shai@ScaleMP.com) wrote:
>> On 01/11/18 11:37, Thomas Gleixner wrote:
>>
>>> VSMP support is built even if CONFIG_X86_VSMP is not set. This leads to a build
>>> breakage when CONFIG_PCI is disabled as well.
>>>
>>> Build VSMP code only when selected.
>>
>> This patch disables detect_vsmp_box() on systems without CONFIG_X86_VSMP, due to
>> the recent 6da63eb241a05b0e676d68975e793c0521387141. This is significant
>> regression that will affect significant number of deployments.
>>
>> We will reply shortly with an updated patch that fix the dependency on pv_irq_ops,
>> and revert to CONFIG_PARAVIRT, with proper protection for CONFIG_PCI.
>>
>
> here is the proper patch which fixes the issue on hand:
> From ebff534f8cfa55d7c3ab798c44abe879f3fbe2b8 Mon Sep 17 00:00:00 2001
> From: Eial Czerwacki <eial@scalemp.com>
> Date: Thu, 1 Nov 2018 15:08:32 +0200
> Subject: [PATCH] x86/build: Build VSMP support only if CONFIG_PCI is
> selected
>
> vsmp dependency of pv_irq_ops removed some years ago, so now let's clean
> it up from vsmp_64.c.
>
> In short, "cap & ctl & (1 << 4)" was always returning 0, as such we can
> remove all the PARAVIRT/PARAVIRT_XXL code handling that.
>
> However, the rest of the code depends on CONFIG_PCI, so fix it accordingly.
>
> Signed-off-by: Eial Czerwacki <eial@scalemp.com>
> Acked-by: Shai Fultheim <shai@scalemp.com>
> ---
> arch/x86/Kconfig | 1 -
> arch/x86/kernel/vsmp_64.c | 80
> +++--------------------------------------------
> 2 files changed, 5 insertions(+), 76 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index c51c989..4b187ca 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -524,7 +524,6 @@ config X86_VSMP
> bool "ScaleMP vSMP"
> select HYPERVISOR_GUEST
> select PARAVIRT
Do you really still need PARAVIRT and HYPERVISOR_GUEST?
Maybe you want IRQ_REMAP instead?
> - select PARAVIRT_XXL
> depends on X86_64 && PCI
> depends on X86_EXTENDED_PLATFORM
> depends on SMP
> diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
> index 1eae5af..c6d2b76 100644
> --- a/arch/x86/kernel/vsmp_64.c
> +++ b/arch/x86/kernel/vsmp_64.c
> @@ -26,64 +26,7 @@
>
> #define TOPOLOGY_REGISTER_OFFSET 0x10
>
> -#if defined CONFIG_PCI && defined CONFIG_PARAVIRT_XXL
> -/*
> - * Interrupt control on vSMPowered systems:
> - * ~AC is a shadow of IF. If IF is 'on' AC should be 'off'
> - * and vice versa.
> - */
> -
> -asmlinkage __visible unsigned long vsmp_save_fl(void)
> -{
> - unsigned long flags = native_save_fl();
> -
> - if (!(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC))
> - flags &= ~X86_EFLAGS_IF;
> - return flags;
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_save_fl);
> -
> -__visible void vsmp_restore_fl(unsigned long flags)
> -{
> - if (flags & X86_EFLAGS_IF)
> - flags &= ~X86_EFLAGS_AC;
> - else
> - flags |= X86_EFLAGS_AC;
> - native_restore_fl(flags);
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_restore_fl);
> -
> -asmlinkage __visible void vsmp_irq_disable(void)
> -{
> - unsigned long flags = native_save_fl();
> -
> - native_restore_fl((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC);
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_disable);
> -
> -asmlinkage __visible void vsmp_irq_enable(void)
> -{
> - unsigned long flags = native_save_fl();
> -
> - native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_enable);
> -
> -static unsigned __init vsmp_patch(u8 type, void *ibuf,
> - unsigned long addr, unsigned len)
> -{
> - switch (type) {
> - case PARAVIRT_PATCH(irq.irq_enable):
> - case PARAVIRT_PATCH(irq.irq_disable):
> - case PARAVIRT_PATCH(irq.save_fl):
> - case PARAVIRT_PATCH(irq.restore_fl):
> - return paravirt_patch_default(type, ibuf, addr, len);
> - default:
> - return native_patch(type, ibuf, addr, len);
> - }
> -
> -}
> -
> +#if defined CONFIG_PCI
> static void __init set_vsmp_pv_ops(void)
Wouldn't be a rename of the function be appropriate now?
Juergen
next prev parent reply other threads:[~2018-11-01 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 23:09 mmotm 2018-10-30-16-08 uploaded akpm
2018-10-31 3:20 ` mmotm 2018-10-30-16-08 uploaded (arch/x86/kernel/vsmp_64.c) Randy Dunlap
2018-11-01 9:36 ` [PATCH] x86/build: Build VSMP support only if selected Thomas Gleixner
2018-11-01 10:39 ` Shai Fultheim (Shai@ScaleMP.com)
2018-11-01 13:10 ` Eial Czerwacki
2018-11-01 13:17 ` Thomas Gleixner
2018-11-01 13:45 ` Juergen Gross [this message]
2018-11-01 15:09 ` Eial Czerwacki
2018-11-01 15:39 ` Juergen Gross
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=054cd800-5124-f897-0069-aba49f8eb654@suse.com \
--to=jgross@suse.com \
--cc=Shai@ScaleMP.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=eial@scalemp.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mm-commits@vger.kernel.org \
--cc=oren@scalemp.com \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--subject='Re: [PATCH] x86/build: Build VSMP support only if selected' \
/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
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).