lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/6] HWPOISON: clean up memory_failure() vs. __memory_failure()

    * Tony Luck <tony.luck@intel.com> 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 <tony.luck@intel.com>
    > ---
    > 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


    \
     
     \ /
      Last update: 2011-12-14 08:51    [W:0.024 / U:65.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site