Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp272095imm; Thu, 20 Sep 2018 23:23:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY5FO7u8Ax6cxUegeBLq2SsKftUHs+gkAl8q2XudNzO4VW+uLb0n+od8pgAeXYKCSKj8YGt X-Received: by 2002:a17:902:b189:: with SMTP id s9-v6mr42537689plr.188.1537510987718; Thu, 20 Sep 2018 23:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537510987; cv=none; d=google.com; s=arc-20160816; b=BsdEsqur1cJHqgxQdOOuFlCdrcKmu4j8IH69LXMj61LHKqd6KZ0lsS0l+QJ5IaljK5 IlSeSv5vrEZELctV3lHV8U9KpdhjsErqwx2/Sez35t1mAkAwjHpNjQ4NB9pBplGRSTQq bstof1mFJuDmstFemF41gJ5f4OGr6ueMJaD64FPAfNQSgctQJkRchkA9bB52Hbm4yS/n sfO1pCT0j9ct65G07q6CLCFbO9xSnyRx6TCSwBI+TIQYOqljSXuQs2HC5LtuNOGRF/rV BvGqcLVD3he/OGk9NjbfaPbk1KdPExrh+JrOQxHTD26ZcqugQtJvLBWBwUOGvpNKel2t mL1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=D7v5oEs6hlTd7aphxIauDfDa4jqYEmOv75HwpEQvp/8=; b=m+WdzajVoP/8Hqqtz/dMkk/eCaqCcy11qlsyb9J72QgXxax1nrn6r9DABLVlYclZaD K4MRWYO20oAUP0urxApcAwX6PlhCZF8m1GJDbnxYEgoPxzCnuZrZ/OQ0E4ymVLlaSkF4 gxXF4xgq+Tz5ATUp9AU3gwc6Lr4VclHX9hVs7Bj9PMYlaS2VL69oIp7Bjc05QHoyBoj0 AcsnV+j2wwieyfqtgKjgEtV5TGMyptkMdoqz76+njf1sepp3FwW5Xb2yEW4oTxHZ0fuT mYLuhDA4GAU9+6vLMwevBFjVVsvbi9wUvB5hVHyZstkuW94wWLxSf6vA6YH9+UwwiWkB jMsQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6-v6si25929591pgn.143.2018.09.20.23.22.52; Thu, 20 Sep 2018 23:23:07 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389406AbeIUMI3 (ORCPT + 99 others); Fri, 21 Sep 2018 08:08:29 -0400 Received: from mga14.intel.com ([192.55.52.115]:60654 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389285AbeIUMI3 (ORCPT ); Fri, 21 Sep 2018 08:08:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2018 23:21:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,283,1534834800"; d="scan'208";a="74798967" Received: from chenyu-desktop.sh.intel.com ([10.239.160.116]) by orsmga007.jf.intel.com with ESMTP; 20 Sep 2018 23:21:05 -0700 From: Chen Yu To: Thomas Gleixner , "Rafael J. Wysocki" Cc: Pavel Machek , Len Brown , Zhimin Gu , Chen Yu , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: [PATCH 07/12][v4] x86-32, hibernate: Use temp_pgt as the temporary page table Date: Fri, 21 Sep 2018 14:27:51 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhimin Gu This is to reuse the temp_pgt for both 32bit and 64bit system. No functional change. Cc: "Rafael J. Wysocki" Signed-off-by: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu --- arch/x86/power/hibernate_32.c | 2 ++ arch/x86/power/hibernate_asm_32.S | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index f82fbd279d08..a44bdada4e4e 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -156,6 +156,8 @@ asmlinkage int swsusp_arch_resume(void) if (error) return error; + temp_pgt = __pa(resume_pg_dir); + /* We have got enough memory and from now on we cannot recover */ restore_image(); return 0; diff --git a/arch/x86/power/hibernate_asm_32.S b/arch/x86/power/hibernate_asm_32.S index 671d38d0d931..f0627cf30a36 100644 --- a/arch/x86/power/hibernate_asm_32.S +++ b/arch/x86/power/hibernate_asm_32.S @@ -33,8 +33,7 @@ ENDPROC(swsusp_arch_suspend) ENTRY(restore_image) movl mmu_cr4_features, %ecx - movl resume_pg_dir, %eax - subl $__PAGE_OFFSET, %eax + movl temp_pgt, %eax movl %eax, %cr3 jecxz 1f # cr4 Pentium and higher, skip if zero -- 2.17.1