lkml.org 
[lkml]   [2018]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 05/12][RFC v3] x86-32, hibernate: Enable CONFIG_ARCH_HIBERNATION_HEADER set on 32bit system
    On Wed, Sep 19, 2018 at 9:32 AM Chen Yu <yu.c.chen@intel.com> wrote:
    >
    > From: Zhimin Gu <kookoo.gu@intel.com>
    >
    > Enable CONFIG_ARCH_HIBERNATION_HEADER for 32bit system so that
    > md5 check is enabled and prepare for relocated code executing
    > and jump address mapping.
    >
    > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    > Signed-off-by: Zhimin Gu <kookoo.gu@intel.com>
    > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
    > ---
    > arch/x86/Kconfig | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
    > index 1a0be022f91d..e8de5de1057f 100644
    > --- a/arch/x86/Kconfig
    > +++ b/arch/x86/Kconfig
    > @@ -2422,7 +2422,7 @@ menu "Power management and ACPI options"
    >
    > config ARCH_HIBERNATION_HEADER
    > def_bool y
    > - depends on X86_64 && HIBERNATION
    > + depends on HIBERNATION
    >
    > source "kernel/power/Kconfig"
    >
    > --

    In this patch, in addition to the above, I would start moving the code
    in hibernate.c that you want to be common in the end out of #ifdef
    CONFIG_X86_64 blocks.

    To start with, that would be the checksum handling code and the parts
    of arch_hibernation_header_save/restore() that refer to it and the
    "magic" value.

    I would continue doing that in the subsequent patches to make it
    easier to follow which pieces of code start to be used on 32-bit after
    each patch. The impact of each patch would be more clear this way
    IMO.

    Thanks,
    Rafael

    \
     
     \ /
      Last update: 2018-09-19 12:32    [W:4.646 / U:0.900 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site