From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 374DB389471 for ; Tue, 10 Feb 2026 16:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770739865; cv=none; b=VP4mOkyGXh+ANlPM4QvEg6YTJD7ew/MllevuxtBG9I+BuSPuFyGqEUFn0vM2AxmbdoMzzn2ozpaqndRgU+Boiyh9XIxJyjGniFZLZ6Mb85MhWKsxp7ncoGN+h3VkduBh7AbTFa/7MWIIFP9iH4zcYXKQVTpbX+v4qZ/BjSXlKDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770739865; c=relaxed/simple; bh=9+Drr5/DKVXOE1LFmpd2MvaV6meI1/Bkjxs53MWiHVA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O0JKKV7clD6obtgC6GpPLOMLx+Imr8mCqN0nXmG+itF6lUnzDGXkFL28jMusIkWGBQhfqI+4h+9rpkabC18eZv1nV2nOC+DT5P03dgNwA3ZNHvT3NOifOuSNjEGWVTmn2c7n6szOfPso8eoZ2cJLHDYEzps6fMBz/spbZkPeHfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cDWxd7Ri; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass 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="cDWxd7Ri" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770739864; x=1802275864; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9+Drr5/DKVXOE1LFmpd2MvaV6meI1/Bkjxs53MWiHVA=; b=cDWxd7Ri8zc6iACgF1RoMTKZxEPOOG6PPOW4c4AGfivuEs/TzDKtDmHK /hly80Pxi3t2cRBTxIKP3iS4/XDh1aQ+EhGeO6qxJ/NiJauFbCUVz5WWd Da2rtTo98ElFo8xNFNJYC6C4EYUha5DpQ4dH5sEJ4ENTdlUBbyvAfFZw/ O+ps/rcKT2RX9t6YCzPfCluy5+7PIw4d3qdGvIBPtJqH3R7t7O5p351Ke bxCXhCinUPZjKGOJfhHmR1liRMbYv55VSj4rVKRqU5oE+Dy0q7hUhhY92 ydhI4zzwUvdBDkXrvQoeWogUBqNi/OKsYCskhp2LoOuWhoNRztE1OQQ5j A==; X-CSE-ConnectionGUID: 2DmkfDCjTLmVeagI8m4Npw== X-CSE-MsgGUID: vJOWksjRSR6OJLpjs0OHeg== X-IronPort-AV: E=McAfee;i="6800,10657,11697"; a="94514484" X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="94514484" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2026 08:11:01 -0800 X-CSE-ConnectionGUID: Ai+8U3cPTz2CfGcKu5cAaw== X-CSE-MsgGUID: roKtkDLLSuOApkZ8JBUmMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,283,1763452800"; d="scan'208";a="211594025" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa008.fm.intel.com with ESMTP; 10 Feb 2026 08:10:59 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 78FA598; Tue, 10 Feb 2026 17:10:58 +0100 (CET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, Oleksij Rempel Cc: Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich Subject: [PATCH v1 0/3] regcache: Avoid accessing non-initialised cache Date: Tue, 10 Feb 2026 17:09:07 +0100 Message-ID: <20260210161058.53093-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit FIXME cover letter Some caches may not allow writes before full initialisation is done. In particular on REGMAP_MAPLE caches when we want to populate cache with the values (reg_defaults_raw == NULL && num_reg_defaults_raw != 0) from HW, the NULL pointer dereference may happen. Address this by moving the IO after cache initialisation is done. Andy Shevchenko (3): regcache: Remove duplicate check in regcache_hw_init() regcache: Split regcache_count_cacheable_registers() helper regcache: Move HW readback after cache initialisation drivers/base/regmap/regcache.c | 44 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) -- 2.50.1