Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266831AbUAXBDp (ORCPT ); Fri, 23 Jan 2004 20:03:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266832AbUAXBDo (ORCPT ); Fri, 23 Jan 2004 20:03:44 -0500 Received: from gate.crashing.org ([63.228.1.57]:14300 "EHLO gate.crashing.org") by vger.kernel.org with ESMTP id S266831AbUAXBDl (ORCPT ); Fri, 23 Jan 2004 20:03:41 -0500 Subject: Re: swsusp vs pgdir From: Benjamin Herrenschmidt To: Patrick Mochel Cc: Pavel Machek , Nigel Cunningham , Linux Kernel list In-Reply-To: References: <1074833921.975.197.camel@gaston> <20040123073426.GA211@elf.ucw.cz> <1074843781.878.1.camel@gaston> <20040123075451.GB211@elf.ucw.cz> <1074874219.835.32.camel@gaston> Content-Type: text/plain Message-Id: <1074906182.835.47.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 24 Jan 2004 12:03:02 +1100 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1290 Lines: 30 On Sat, 2004-01-24 at 03:45, Patrick Mochel wrote: > A new pgdir is allocated on resume that does not overlap with any pages > being restored. See relocate_pagedir() in the code.. Looking at the code, this is not a real HW pgdir but rather the page copy list specific to swsusp. AFAIK, the HW pgdir is copied over. > We assume that the kernel version is the same, and therefore that the code > and static data are in same locations in memory. So, even if the kernel > page tables get overwritten, we can still access the pointer to the pgdir. Yes, the pgdir is there, but 1) it's getting overwriten, so if it doesn't contain the same large page mapping on old and new, we are screwed and 2) if accessing the linear mapping (when copying pages) require going one level deeper into the page tables, then we are possibly screwed too since those will be partly overwriten and won't ever be in a "sane" state until the full copy is done. Note that I don't have that problem with my current PPC hacks, as I disable the MMU for the copy :) Ben. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/