Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp570099imm; Wed, 19 Sep 2018 03:33:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbL/MHVwOk3WpnhWZvmFtv2/Dy5s6//mlNT8eoWSMPU4qE2vAlQFPrxkphIVJOJvxbSDC9x X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr31332234pgh.348.1537353235486; Wed, 19 Sep 2018 03:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537353235; cv=none; d=google.com; s=arc-20160816; b=cVC99UNLYY7nu+okWZaR+TgOeCe2XtIWwnn/1xAiYJ31aGQtOesY+DT63pA0/Zq2Lm Chs2HGqqLDptLej9qln9ptzhfKoapOznJMFFty1iLOIs1bNncdk6epI9WohRP8HDXTyJ Hls8esvWlMe4RXEbWbpVnRAlAzQ9GcT9X6CuNwxX/79JksidZaJE0i5H5fhUlDxJUONt flgzkbd2RcQr+EjSY4+us641rfysLI0Uj9x2h5BDXmFDFFzaNNTJNqmID/ycmEWnSupq eligQV3kuPsUa3dQY5Z3d+8qmblDv0zT8C6Lg0Q+D5CgQ5wSUGXwB7c66lMxY1UgykUc uWPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=t80l66fIKlf3lFTqenjvPD6QDjQXcdP3r4ln+OMnII4=; b=Y2bq26Xalbli7bAucyHzPyMElehOTjd4CUrcggJ6YlyXaUlaPOPu9AnMMd3p/BArEN mLj6iSpregmHKR67MoPatp/f5A5jKt2hsb4ejSOrB1iKLMkkaMb6VS//Engt8lEZYRwd Ic+tN8/qyuDvA8+i8rRmYPeN0dTNqH32e1E5fAm89tA8RFuChfVTHUJKdW4hG/oiKLG2 pyeWUvFuOVsuh3GN69Xt7l0cTQg6ncnUT5+XQvwtPPGwxB5fgxrqUNOqYx7uRlECBk7c 8fsml899wyWp3KbUXIyg2OqIyAiX9NphZor/cBZuYiRN8og/MSv/e75F6Wf9NYA8NWxw MCSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si2201381pgo.350.2018.09.19.03.33.40; Wed, 19 Sep 2018 03:33:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731265AbeISQJL (ORCPT + 99 others); Wed, 19 Sep 2018 12:09:11 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:40678 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728059AbeISQJL (ORCPT ); Wed, 19 Sep 2018 12:09:11 -0400 Received: by mail-oi0-f68.google.com with SMTP id l202-v6so4610323oig.7; Wed, 19 Sep 2018 03:31:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t80l66fIKlf3lFTqenjvPD6QDjQXcdP3r4ln+OMnII4=; b=b43HmdH9YUXEP/Dq0Od7FGwncfvk8OFhtVmagOjxbxvelBrnvDjdL9C0Ibi194YD3A 888+Tzo5nYJsvZkCRd0by09YMutZhOZ7C+ewB/mj6tm6qB0ChSNESnE5y3c4Z8oJaxy+ KVGJqvuUiYz411gaSKkCtMZEJXE4eCGV2MqSH9p7D+Cg9V82Jxs7KZQve+m96rU7H7Ls BcNOKAIQ0sQ1MgSI7Kab5yoCwVwdowRY0npd8GS7wioQISNyK1f2xOh53b5aEASGw5UU brOFxLT5ik0Gf9LiH58DST/vMUcpB5I1Nk1E9dHa/R7JYNbX48tk/MB9ZoMRYf5vOi0I rYrA== X-Gm-Message-State: APzg51AuUAmaI79RdHW9hKY1XroXwVEmbwhkPxuYOVDdsFkQHBxsysNn z9VhZc8XTwK2ebRoNXyjbdksNyLu4TETOMH51yY= X-Received: by 2002:aca:4141:: with SMTP id o62-v6mr1258325oia.24.1537353114216; Wed, 19 Sep 2018 03:31:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 19 Sep 2018 12:31:42 +0200 Message-ID: Subject: Re: [PATCH 05/12][RFC v3] x86-32, hibernate: Enable CONFIG_ARCH_HIBERNATION_HEADER set on 32bit system To: "Chen, Yu C" Cc: Thomas Gleixner , "Rafael J. Wysocki" , "the arch/x86 maintainers" , Linux Kernel Mailing List , Linux PM , Pavel Machek , Len Brown , kookoo.gu@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 19, 2018 at 9:32 AM Chen Yu wrote: > > From: Zhimin Gu > > 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" > Signed-off-by: Zhimin Gu > Signed-off-by: Chen Yu > --- > 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