From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754617Ab1LNHtq (ORCPT ); Wed, 14 Dec 2011 02:49:46 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:47376 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754490Ab1LNHtp (ORCPT ); Wed, 14 Dec 2011 02:49:45 -0500 Date: Wed, 14 Dec 2011 08:47:49 +0100 From: Ingo Molnar To: Tony Luck Cc: linux-kernel@vger.kernel.org, Borislav Petkov , "Huang, Ying" , Hidetoshi Seto Subject: Re: [PATCH 1/6] HWPOISON: clean up memory_failure() vs. __memory_failure() Message-ID: <20111214074749.GD25232@elte.hu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=AWL,BAYES_00 autolearn=no SpamAssassin version=3.3.1 -2.0 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 AWL AWL: From: address is in the auto white-list Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tony Luck wrote: > There is only one caller of memory_failure(), all other users call > __memory_failure() and pass in the flags argument explicitly. The > lone user of memory_failure() will soon need to pass flags too. > > Add flags argument to the callsite in mce.c. Delete the old memory_failure() > function, and then rename __memory_failure() without the leading "__". > > Signed-off-by: Tony Luck > --- > arch/x86/kernel/cpu/mcheck/mce.c | 9 +++++-- > drivers/base/memory.c | 2 +- > include/linux/mm.h | 3 +- > mm/hwpoison-inject.c | 4 +- > mm/madvise.c | 2 +- > mm/memory-failure.c | 46 +++++++++++++++++-------------------- > 6 files changed, 32 insertions(+), 34 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c > index 2af127d..265139d 100644 > --- a/arch/x86/kernel/cpu/mcheck/mce.c > +++ b/arch/x86/kernel/cpu/mcheck/mce.c > @@ -1046,11 +1046,14 @@ out: > } > EXPORT_SYMBOL_GPL(do_machine_check); > > -/* dummy to break dependency. actual code is in mm/memory-failure.c */ > -void __attribute__((weak)) memory_failure(unsigned long pfn, int vector) > +#ifndef CONFIG_MEMORY_FAILURE > +int memory_failure(unsigned long pfn, int vector, int flags) > { > printk(KERN_ERR "Action optional memory failure at %lx ignored\n", pfn); Btw., while at it, could we phrase this message in a more obvious way to users, such as 'Non-fatal memory failure at %lx ignored'? Thanks, Ingo