From patchwork Wed Jan 3 04:14:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Neri X-Patchwork-Id: 13509666 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23D8D17984; Wed, 3 Jan 2024 04:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nkuSnhuG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704255202; x=1735791202; h=from:to:cc:subject:date:message-id; bh=IGi0e3uXdLwqOum7ZLXcJjnmPDlSGG/id/BqMsxXwvI=; b=nkuSnhuG4JSt1+lV4aPIrdm+ti+xRDwlrX9PrjM5/7TaQYYf6xGL6ryb SArGfkrHpbfup+v2vV5kyhW1zxo24fp1Sjyo0tFawH2shqpfvKG/UiflO 5L737s91DdoeGsMTKoa1dbZXZMSvS//FzT4gNyv5+HFF20RflIBxIfn5x edsUOLFgJBHNwiNWqokQme/7jX2LDllQNhKVguzyDfjMysaEONB31yevd VJNpj4Rq3XP07n1EeHdk7T9tP8MhmRRJWKhpOST4Hlrc8AeeZR17MRcSU 6jjH2v+CYx4A88/ZdgxfYReyvYStDaYKywMp1TcedqRXw9zZnNl4ySeNN g==; X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="463357395" X-IronPort-AV: E=Sophos;i="6.04,326,1695711600"; d="scan'208";a="463357395" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jan 2024 20:13:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10941"; a="1026957000" X-IronPort-AV: E=Sophos;i="6.04,326,1695711600"; d="scan'208";a="1026957000" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga006.fm.intel.com with ESMTP; 02 Jan 2024 20:13:21 -0800 From: Ricardo Neri To: "Rafael J. Wysocki" Cc: Chen Yu , Len Brown , Srinivas Pandruvada , Stanislaw Gruszka , Zhang Rui , Zhao Liu , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] thermal: intel: hfi: Fix memory corruption on resume from hibernation Date: Tue, 2 Jan 2024 20:14:55 -0800 Message-Id: <20240103041459.11113-1-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Hi, This is v2 of this series. You can read the overview and motivation in the cover letter of v1 [1]. I smoke-retested this version on a Meteor Lake system. It completed 50 cycles of suspend-to-disk and resume. I completed longer testing for v1. Changes since v1: * Added locking to hfi_pm_notify() to serialize RMW operations on the MSR_IA32_HW_FEEDBACK_CONFIG register. (Rafael) * Relocated a comment regarding the reallocation of HFI memory to patch 3/4. (Rafael) * Clarified that patch 1/4 does not introduce functional changes. (Rafael) * Indicated the first stable version on which this patchset should be backported. * Renamed hfi_do_pm_[enable|disable]() as hfi_do_[enable|disable]() for future reuse. (Stan) * Registered the HFI suspend notifier towards the end of intel_hfi_init(). (Stan) Thanks and BR, Ricardo [1]. https://lore.kernel.org/all/20231227062940.10780-1-ricardo.neri-calderon@linux.intel.com/ Ricardo Neri (4): thermal: intel: hfi: Refactor enabling code into helper functions thermal: intel: hfi: Enable an HFI instance from its first online CPU thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline thermal: intel: hfi: Add a suspend notifier drivers/thermal/intel/intel_hfi.c | 153 +++++++++++++++++++++++++----- 1 file changed, 127 insertions(+), 26 deletions(-)