Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3560491pxf; Mon, 22 Mar 2021 09:13:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfspe1IZPuEgc7I2kaOarlxpTFzs2FJTtWS09UzjWCZyWoWkYwmC/O4AP79lu3IEWVbwJK X-Received: by 2002:a17:907:3e21:: with SMTP id hp33mr513384ejc.313.1616429592455; Mon, 22 Mar 2021 09:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616429592; cv=none; d=google.com; s=arc-20160816; b=G8745fuzG2z/z8yEtPIXUSaQPme77//tFWMJZzyR3cZ3nAMyMQ/RK3H93O3xpxvgtT UYw7i61aa2BDaZM3AgUsmN92uvt0Yz5/f7Gx2B8Sjd32sZGihcxxlWEnF9Bwcs10xzRo B84RcHj5Ih6rkYinSZ3yCqLxwgqSAtiYww3KfVEiq1s5zR0yEy4eGAQDEop9+i49nvzO SrLZtW1SfKf7tMw3Dm8QbOTpt+zi5dNJkbwS2oRBsUu8nOAUGE6Z6lNgYnquTu28mtP6 uLL5QfMoUkf1wkhxuGuOkjRKU6WXgW8oQOUkou7/cyWTshKz6HVKRRMjUFVhCRkEe0jn oYlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c/AUtBaGI9CnR9/DqWeJf3hjAPYoclxfcYyUmUiEtsQ=; b=T7P4Yeqd7Fy/tpS2l2BKcEazXVRq5wmaZymeCIYqI6jgF5rq9MRuMLZ9SOwTahm0j8 XFQJX0hvQAyG4mobbdYfJw0/FdF3awC+8FuKfv9IQ3dQBhrQXGKECqmF67TAZxOv2/rD 0Locnnne7mr0mo1RUOjd3A3L3ufoet8fsDPCmUzWvKm9opEEVGvCSmbu3Tm0WXDMWjMY o/gDOSj5Ho9d4/w9BxZ+Nrf5RX8Y3SgEfg6YQGmZSJN3xHstzBINh/G11I2y2gWt+OB7 8ZsRXLFO2QTY1V7dcVs24CtA9P92IhzuVSIMoj78RHHYzRB4ep8T3DYgb8uQF0zT396C ePEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="0qo/4PJU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bi22si11440760edb.191.2021.03.22.09.12.48; Mon, 22 Mar 2021 09:13:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="0qo/4PJU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231610AbhCVQLp (ORCPT + 99 others); Mon, 22 Mar 2021 12:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbhCVQLZ (ORCPT ); Mon, 22 Mar 2021 12:11:25 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42927C061574 for ; Mon, 22 Mar 2021 09:11:24 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id w3so22209058ejc.4 for ; Mon, 22 Mar 2021 09:11:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c/AUtBaGI9CnR9/DqWeJf3hjAPYoclxfcYyUmUiEtsQ=; b=0qo/4PJUC/Enlck3rYWsBzPBBDRgAZHY169EQXzCSbNjX/ve+Q9Zv6UB160D6TGfIO wBOHs3sguwSEPp2aT498ZXR7yzT9Gm9ZTvR0INjcf5aka51gKBvzxvzcm03dh57uZkrJ uEPPoDHuhSX+QlN6Nh+88W6QbuDrjgsop0WIVChNQVKzuqflECkassa8eIEGsynZu8IU WR5dWFuLpYuPerhSmHLfE8lmTZq2Vih3/6fylJT8pStOvaeCNJYG+BcVMf1WWpm0EdGo Sc6fwzgPKJSCnudhykFtXEXAgLl1NtcpAUAq2JvQV9/nAL4X72npLxxH4x9oTd2fulU3 Piyw== 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=c/AUtBaGI9CnR9/DqWeJf3hjAPYoclxfcYyUmUiEtsQ=; b=NfPsZkF7XpK6vtPph/BiYrbhZOWP4NJ9cKYT8mTkmeLLVzmTJ7w37NVkHAzldMG9cr MeEKzpbmzj1iJWfNAfLXk4yJQq5WUfdRynNHAZ8pCJaLSqFe5/oPzYchIdT6c77IDRuc Ay7n02T3+0Ex+PS9xyE3chc9OP1n80+LgJfEFulZHtY5jk67aroD1oZr8weVeaTryhOc hcPWzHNCDzT6vV9y6yPIybjf2LR4Q+rctSzPtDvzskKKhx7gFWBgl6k/tKtgjvRJFKBf RFPusvXxNyxXD3aGnJNJZxUdIzzQm40SNMUT0FYfIo7HHLJMS41St2WY/mVFSbeyJYa+ dWKw== X-Gm-Message-State: AOAM532yBZqbH2Hm2cf1T7YKgCV1ms9MKxl15HaH4/sKgAfAFHMbCNZm EjXDOXmFDzH84xUYlnUAqHMeswPcJRNgV8kEnojpNQ== X-Received: by 2002:a17:906:1386:: with SMTP id f6mr525033ejc.45.1616429483036; Mon, 22 Mar 2021 09:11:23 -0700 (PDT) MIME-Version: 1.0 References: <20210322160200.19633-1-david@redhat.com> <20210322160200.19633-3-david@redhat.com> In-Reply-To: <20210322160200.19633-3-david@redhat.com> From: Dan Williams Date: Mon, 22 Mar 2021 09:11:14 -0700 Message-ID: Subject: Re: [PATCH v1 2/3] kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM resources To: David Hildenbrand Cc: Linux Kernel Mailing List , Linux MM , Andrew Morton , Greg Kroah-Hartman , Daniel Vetter , Andy Shevchenko , Mauro Carvalho Chehab , Dave Young , Baoquan He , Vivek Goyal , Dave Hansen , Keith Busch , Michal Hocko , Qian Cai , Oscar Salvador , Eric Biederman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Tom Lendacky , Brijesh Singh , X86 ML , Kexec Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 9:02 AM David Hildenbrand wrote: > > It used to be true that we can have system RAM only on the first level > in the resourc tree. However, this is no longer holds for driver-managed > system RAM (i.e., dax/kmem and virtio-mem). > > The function walk_mem_res() only consideres the first level and is > used in arch/x86/mm/ioremap.c:__ioremap_check_mem() only. We currently > fail to identify System RAM added by dax/kmem and virtio-mem as > "IORES_MAP_SYSTEM_RAM", for example, allowing for remapping of such > "normal RAM" in __ioremap_caller(). > > Let's find all busy IORESOURCE_MEM resources, making the function > behave similar to walk_system_ram_res(). Looks good, Reviewed-by: Dan Williams