From: Ingo Molnar <mingo@kernel.org>
To: Mike Travis <travis@sgi.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Dimitri Sivanich <sivanich@hpe.com>
Subject: Re: [PATCH 4/8] x86/platform/UV: Add Support for UV4 Hubless NMIs
Date: Sat, 14 Jan 2017 08:52:41 +0100 [thread overview]
Message-ID: <20170114075241.GA12018@gmail.com> (raw)
In-Reply-To: <20170113152111.689032281@asylum.americas.sgi.com>
* Mike Travis <travis@sgi.com> wrote:
> --- linux.orig/arch/x86/kernel/apic/x2apic_uv_x.c
> +++ linux/arch/x86/kernel/apic/x2apic_uv_x.c
> @@ -1529,6 +1529,8 @@ void __init uv_system_init(void)
> uv_system_init_hub();
>
> /* Initialize UV hubless system here */
> + else
> + uv_nmi_setup_hubless();
That's not the proper coding style ...
> +++ linux/arch/x86/platform/uv/uv_nmi.c
> @@ -67,6 +67,19 @@ static struct uv_hub_nmi_s **uv_hub_nmi_
> DEFINE_PER_CPU(struct uv_cpu_nmi_s, uv_cpu_nmi);
> EXPORT_PER_CPU_SYMBOL_GPL(uv_cpu_nmi);
>
> +/* UV hubless values */
> +static int *pch_base;
> +#define NMI_CONTROL_PORT 0x70
Ditto...
> +#define NMI_DUMMY_PORT 0x71
> +#define GPI_NMI_STS_GPP_D_0 0x164
> +#define GPI_NMI_ENA_GPP_D_0 0x174
> +#define STS_GPP_D_0_MASK 0x1
> +#define PAD_CFG_DW0_GPP_D_0 0x4c0
> +#define GPIROUTNMI (1ul << 17)
> +#define PCH_PCR_GPIO_1_BASE 0xfdae0000ul
> +#define PCH_PCR_GPIO_ADDRESS(offset) \
> + (int *)((unsigned long long)pch_base | offset)
> +static void uv_init_hubless_pch_io(int offset, int mask, int data)
> +{
> + int *addr = PCH_PCR_GPIO_ADDRESS(offset);
> + int readd = readl(addr);
> +
> + if (mask) { /* OR in new data */
> + int writed = (readd & ~mask) | data;
> +
> + nmi_debug("UV:PCH: %p = %x & %x | %x (%x)\n",
> + addr, readd, ~mask, data, writed);
No unnecessary linebreaks please.
> +
> /* wait a moment for the hub nmi locker to set flag */
> - cpu_relax();
Please capitalize 'NMI' consistently in all the patches.
> + /* PCH NMI causes only one cpu to respond */
Same for 'CPU'.
> else if (uv_nmi_action_is("kdb") || uv_nmi_action_is("kgdb"))
> uv_call_kgdb_kdb(cpu, regs, master);
>
> + /* Unknown NMI action */
> + else {
Sigh ...
> +/* setup for UV Hubless systems */
> +void __init uv_nmi_setup_hubless(void)
> +{
> + uv_nmi_setup_common(false);
> +
> + pch_base = xlate_dev_mem_ptr(PCH_PCR_GPIO_1_BASE);
> + nmi_debug("UV: PCH base:%p from 0x%lx, GPP_D_0\n",
> + pch_base, PCH_PCR_GPIO_1_BASE);
> +
> + uv_init_hubless_pch_io(GPI_NMI_ENA_GPP_D_0,
> + STS_GPP_D_0_MASK, STS_GPP_D_0_MASK);
> +
> + uv_nmi_setup_hubless_intr();
> +
> + uv_reassert_nmi(); /* insure NMI enabled in proc inf reg */
And typos ...
Much cleaner patches please! I haven't checked the others in the series but please
review them for similar mishaps.
Thanks,
Ingo
next prev parent reply other threads:[~2017-01-14 7:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 15:21 [PATCH 0/8] x86/platform/UV: UV Update PatchSet 2 Mike Travis
2017-01-13 15:21 ` [PATCH 1/8] x86/platform/UV: Fix panic with missing UVsystab support Mike Travis
2017-01-14 9:57 ` [tip:x86/platform] " tip-bot for Mike Travis
2017-01-13 15:21 ` [PATCH 2/8] x86/platform/UV: Fix 2 socket config problem Mike Travis
2017-01-14 9:58 ` [tip:x86/platform] " tip-bot for Mike Travis
2017-01-13 15:21 ` [PATCH 3/8] x86/platform/UV: Add Support for UV4 Hubless systems Mike Travis
2017-01-13 15:21 ` [PATCH 4/8] x86/platform/UV: Add Support for UV4 Hubless NMIs Mike Travis
2017-01-14 7:52 ` Ingo Molnar [this message]
2017-01-14 8:26 ` [PATCH] x86/platform/UV: Clean up the UV APIC code Ingo Molnar
2017-01-14 13:11 ` Joe Perches
2017-02-01 10:09 ` [tip:x86/platform] " tip-bot for Ingo Molnar
2017-01-13 15:21 ` [PATCH 5/8] x86/platform/UV: Add basic CPU NMI health check Mike Travis
2017-01-13 15:21 ` [PATCH 6/8] x86/platform/UV: Verify NMI action is valid, default is standard Mike Travis
2017-01-13 15:21 ` [PATCH 7/8] x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source Mike Travis
2017-01-13 15:21 ` [PATCH 8/8] x86/platform/UV: Insure uv_system_init is called when necessary Mike Travis
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=20170114075241.GA12018@gmail.com \
--to=mingo@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sivanich@hpe.com \
--cc=tglx@linutronix.de \
--cc=travis@sgi.com \
--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;
as well as URLs for NNTP newsgroup(s).