Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp689590ybl; Fri, 16 Aug 2019 02:23:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOR26Xus/0oQq37quZdGIZBf/Hxw9r1o2ZnE8QCLc4C9ONDXea51U4kPzCyfJd97oNY7Qf X-Received: by 2002:a63:e213:: with SMTP id q19mr6858718pgh.180.1565947386014; Fri, 16 Aug 2019 02:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565947386; cv=none; d=google.com; s=arc-20160816; b=J1cyGkcq74saS7c10LgSD6IAcBmj5n6Xo0+AWUP2ZSMD0Gdxl72yK/H5zA6Xet32rG nOqzBAv3P4S8bXst4mEV2iUHgZbZ+vzeC+JvLthVFnhZuy5ktAT2n8Rn0R9uCLxTdsBd Flis3j4rXJ7C/6lutvye17JsHhZb91WPyDQlDgU9+6axq+Xzo80tKEyr7Ce1h8vmoDNt 3IrnD8JNsPHGgWrPHu3sm1/eMtpJQphgsW655h1VGsmXi4OUwVk5D7RALzAGrqvfOx3c EGgyad65ljQoqxphCqV80TLSTv0xoZMZe/gZDjOYS4lvCC+qSGUZgXxlfVmqMAtCQ7Sj NcuQ== 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:dkim-signature; bh=9ecN5oXMiEZjV2F0Oa58Q+yKo9ivsAVzldeQfVYkRrE=; b=qR8c3CeO0sk5MYFIDzloohfkEpSa5rdQvF3LTfwmdKJpgUCwDn/mMaQXxpHG4/yG/L yGDZ6YOzNtqGZ+sOvjmgKzS2sebT0tiqXxANLXKNykEsA1urBD3i8qOrfT4PLU5ZAuht XMZr1gRJI8AjFYRKVyA2dtmgsVeRJ7EmKIqKJVzxgO8AhlFc/34LCL07sFeb3eLhj2Bo snekAPE3gw83vKA3LQ0WvOVej3rHnkiqC1cmvK2rmTjwuDFujVbTVH097qea30IA688l vscRXO0heCS0Oz4xyNVXuN3fX6l5ADiezqQrbpLFNG3BE6u72+miHNFtpwBCDiHRX6k4 lgFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cihxO+YY; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y190si4015688pfy.62.2019.08.16.02.22.47; Fri, 16 Aug 2019 02:23:06 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cihxO+YY; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726952AbfHPJWL (ORCPT + 99 others); Fri, 16 Aug 2019 05:22:11 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45821 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbfHPJWL (ORCPT ); Fri, 16 Aug 2019 05:22:11 -0400 Received: by mail-pg1-f193.google.com with SMTP id o13so2645659pgp.12; Fri, 16 Aug 2019 02:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9ecN5oXMiEZjV2F0Oa58Q+yKo9ivsAVzldeQfVYkRrE=; b=cihxO+YY+3C2mg/dNbgdwcsdVTxEIPgKIFyXfek5ixCTfHXiS8CSjgrWyxznHeuw+m 9SSd6/oaNcu8jvDfJLQ75yDKGr6Acw7iuXqkaFGWw66lm+IfE/xdSuDxPuBFp+95GWYi bw4e92tDtvr0mcnnPdUIQA3p01dO9LXwnvrNpoLe3D58SnGnQfqbriUe2Qb3MqJCoyUM ZYU9OUwB6c984EMFKb9udJteBBut2o02SGBxlNByZ8LbwWPLwt2OCaiW/Lmi+1r6peyL WVJnGidYs3GX2VlmydtYfp+lPe0HNSZZwha57X+JdIk7dKk1VtVnjthtoiUiT/FNWyNO rx0w== 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=9ecN5oXMiEZjV2F0Oa58Q+yKo9ivsAVzldeQfVYkRrE=; b=A4U9Ms6pFzvqNEE4/h4lcSwF7iVxtSe7YeqAkG5oEKfjK+mMHiV866YsvG3LYzJKRm EC5FjQGBRD428IVyLJj+/r/kJcp/legm2hVOumyoWCaRXdI2LTdCS49Ri5Gcn6hbez6b sVHMfUkokVb11L1RSACreOrsZqyg2hFzFHep9tjBFO+l6/sPTpt9AttFOOqqrXE9BTNn VCGSRGZI86H5cG0Hjz3aqxsUs7hhjDsB+FQFJEJYa1vvK4JvZFJ+9FWnbLOoIbVwW+Yj OlP799cKlrqEvQrVxcHmbGZdQ/tBXULAg6aiF9BLBVF/vOO9orSeiYyNzNEQpFu9yOG5 auNw== X-Gm-Message-State: APjAAAVNGGeNud1EJ8Nte9Gzaw8rPDvP+oWRWWnHQJO+jK+GJIJw9d2X i7T9ULY3braRMfO/pGHYcsmZcIm2I80mGXJZxyM= X-Received: by 2002:a63:e54f:: with SMTP id z15mr6915845pgj.4.1565947330601; Fri, 16 Aug 2019 02:22:10 -0700 (PDT) MIME-Version: 1.0 References: <20190816014140.10687-1-m.v.b@runbox.com> In-Reply-To: <20190816014140.10687-1-m.v.b@runbox.com> From: Andy Shevchenko Date: Fri, 16 Aug 2019 12:21:58 +0300 Message-ID: Subject: Re: [PATCH] platform/x86: intel_pmc_core: Do not ioremap RAM To: "M. Vefa Bicakci" Cc: Platform Driver , Linux Kernel Mailing List , Rajneesh Bhardwaj , Vishwanath Somayaji , Darren Hart , Andy Shevchenko 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 Fri, Aug 16, 2019 at 4:42 AM M. Vefa Bicakci wrote: > > On a Xen-based PVH virtual machine with more than 4 GiB of RAM, > intel_pmc_core fails initialization with the following warning message > from the kernel, indicating that the driver is attempting to ioremap > RAM: > > ------------[ cut here ]------------ > ioremap on RAM at 0x00000000fe000000 - 0x00000000fe001fff > This issue appears to manifest itself because of the following fallback > mechanism in the driver: > > if (lpit_read_residency_count_address(&slp_s0_addr)) > pmcdev->base_addr = PMC_BASE_ADDR_DEFAULT; > > The validity of address PMC_BASE_ADDR_DEFAULT (i.e., 0xFE000000) is not > verified by the driver, which is what this patch introduces. With this > patch, if address PMC_BASE_ADDR_DEFAULT is in RAM, then the driver will > not attempt to ioremap the aforementioned address. Thank you for the patch. Is there anything preventing us to use memremap() in such case? -- With Best Regards, Andy Shevchenko