From: Huang Ying <ying.huang@intel.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Len Brown <lenb@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 9/9] ACPI, APEI, Generic Hardware Error Source POLL/IRQ/NMI notification type support
Date: Mon, 25 Oct 2010 10:03:27 +0800 [thread overview]
Message-ID: <1287972207.2862.297.camel@yhuang-dev> (raw)
In-Reply-To: <20101022115700.GC10456@basil.fritz.box>
Hi, Andi,
Thank you very much for your review!
On Fri, 2010-10-22 at 19:57 +0800, Andi Kleen wrote:
> On Wed, Oct 20, 2010 at 09:37:00AM +0800, Huang Ying wrote:
>
> Hi Ying,
>
> Only some minor nits found in review.
>
> I don't think they're merge blockers, but could be all fixed
> in followups later.
>
> Overall it looks all good.
>
> Reviewed-by: Andi Kleen <ak@linux.intel.com>
>
> > + * These 2 spinlock is used to prevent atomic ioremap virtual memory
> > + * area from being mapped simultaneously.
> > + */
> > +static DEFINE_RAW_SPINLOCK(ghes_ioremap_lock_nmi);
> > +static DEFINE_SPINLOCK(ghes_ioremap_lock_irq);
> > +
> > +static int ghes_ioremap_init(void)
> > +{
> > + ghes_ioremap_area = __get_vm_area(PAGE_SIZE * 2, VM_IOREMAP,
>
> Should make the magic PAGE_SIZE * 2 into a define with a comment?
Yes. Will do it.
> > + vaddr = ghes_ioremap_pfn_nmi(paddr >> PAGE_SHIFT);
> > + } else {
> > + spin_lock_irqsave(&ghes_ioremap_lock_irq, flags);
> > + vaddr = ghes_ioremap_pfn_irq(paddr >> PAGE_SHIFT);
> > + }
> > + trunk = PAGE_SIZE - offset;
> > + trunk = min(trunk, len);
> > + if (from_phys)
> > + memcpy(buffer, vaddr + offset, trunk);
> > + else
> > + memcpy(vaddr + offset, buffer, trunk);
>
> In generic Linux this would be memcpy_fromio. On x86 of course it's the same.
> Still perhaps better use that to prevent sparse from freaking out with its
> address space checks.
Will do it.
> > @@ -303,6 +390,43 @@ out:
> > return 0;
> > }
> >
> > +static void ghes_add_timer(struct ghes *ghes)
> > +{
> > + struct acpi_hest_generic *g = ghes->generic;
> > + unsigned long expire;
> > +
> > + if (!g->notify.poll_interval) {
> > + pr_warning(FW_WARN GHES_PFX "Poll interval is 0 for "
> > + "generaic hardware error source: %d, disabled.",
>
> generaic -> generic
>
> This is user visible so should be fixed.
Yes. Will do it.
> > + g->header.source_id);
> > + return;
> > + }
> > + expire = jiffies + msecs_to_jiffies(g->notify.poll_interval);
> > + ghes->timer.expires = round_jiffies_relative(expire);
> > + add_timer(&ghes->timer);
>
> Could actually make this a deferrable timer I guess to be even more
> friendly to power.
Yes. Will do it.
> > + }
> > + ret = NOTIFY_STOP;
> > + }
> > +
> > + if (ret == NOTIFY_DONE)
> > + goto out;
> > +
> > + if (sev_global >= GHES_SEV_PANIC) {
> > + herr_persist_all_records();
> > + oops_begin();
> > + /* reboot to log the error! */
> > + if (panic_timeout == 0)
> > + panic_timeout = ghes_panic_timeout;
> > + panic(GHES_PFX "generic hardware fatal error!\n");
>
> I suspect need some more explanation on this one.
Yes. Will do it.
> > + case ACPI_HEST_NOTIFY_NMI:
> > + mutex_lock(&ghes_list_mutex);
> > + list_del_rcu(&ghes->list);
> > + if (list_empty(&ghes_nmi))
> > + unregister_die_notifier(&ghes_notifier_nmi);
> > + mutex_unlock(&ghes_list_mutex);
> > + synchronize_rcu();
Best Regards,
Huang Ying
next prev parent reply other threads:[~2010-10-25 2:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 1:36 [PATCH 0/9] ACPI, APEI patches for 2.6.37 Huang Ying
2010-10-20 1:36 ` [PATCH 1/9] ACPI, APEI, Add ERST record ID cache Huang Ying
2010-10-22 12:04 ` Andi Kleen
2010-10-25 2:08 ` Huang Ying
2010-10-20 1:36 ` [PATCH 2/9] Add lock-less version of bitmap_set/clear Huang Ying
2010-10-20 1:36 ` [PATCH 3/9] lock-less NULL terminated single list implementation Huang Ying
2010-10-20 1:36 ` [PATCH 4/9] lock-less general memory allocator Huang Ying
2010-10-20 1:36 ` [PATCH 5/9] Hardware error device core Huang Ying
2010-10-20 1:36 ` [PATCH 6/9] Hardware error record persistent support Huang Ying
2010-10-20 1:36 ` [PATCH 7/9] ACPI, APEI, Use ERST for hardware error persisting before panic Huang Ying
2010-10-20 1:36 ` [PATCH 8/9] ACPI, APEI, Report GHES error record with hardware error device core Huang Ying
2010-10-20 1:37 ` [PATCH 9/9] ACPI, APEI, Generic Hardware Error Source POLL/IRQ/NMI notification type support Huang Ying
2010-10-22 11:57 ` Andi Kleen
2010-10-25 2:03 ` Huang Ying [this message]
2010-10-22 5:50 ` [PATCH 0/9] ACPI, APEI patches for 2.6.37 Len Brown
2010-10-22 8:55 ` Huang Ying
2010-10-22 11:57 ` Andi Kleen
2010-10-22 11:59 ` Andi Kleen
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=1287972207.2862.297.camel@yhuang-dev \
--to=ying.huang@intel.com \
--cc=andi@firstfloor.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.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