From patchwork Fri May 1 18:20:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 11523751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3C1C139A for ; Sat, 2 May 2020 08:34:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF71B208DB for ; Sat, 2 May 2020 08:34:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="F4zt2FGz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF71B208DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F8EE6E0CE; Sat, 2 May 2020 08:34:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id E9DF36ED27 for ; Fri, 1 May 2020 18:20:50 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id z90so8553831qtd.10 for ; Fri, 01 May 2020 11:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/v1SRW7RLO2DyhUWTLyIJTwDXoWoQz0FjZx07fCIeIw=; b=F4zt2FGzsxpHPLdvktVhW3BfaN6xiFRDbuZkmSco75064Myp5HCFf0VMtoTpyF+HiZ gRl5jFZA8gibhRyeT6gHVetVqNOQYZUID/RV5pJBKFoOYZa/OvYCZnOIqlLaMbKFSpll EAszPsPRiX5trtB1G4f3CckG+aiuyg2V/qlwfz9x20qzG5Mvo6FMMrPDEHY4s7Gr6gh9 WFyg9Gen7dOr5u6UFXc4Vh8MfWWjJlXbMAECTzKUl1RU3ZMLRbM+iO6qYAj6lWWH3TIF tN+zdQYygGrKyLOsgvh/lQT43tb+NndC7zvYZoUsjb0indx6hqFAlW7CKJkjXoZ/HE/q mwig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/v1SRW7RLO2DyhUWTLyIJTwDXoWoQz0FjZx07fCIeIw=; b=Y3X3LWM1CdbJq2yH1Q6qra+2P8e+ojyEpFMd9mKlqDcJJTvVqABKxhDUhiTRjVARzC 5JkTjoQBkKcXKuGJ7kwq1W+EQhXkT9IoPqzlPXhYnx/zGdPlZ4TBoehTTN6rBTp9Sh9G dec/J5VTH67Td+VUl3cejMJFWCcToTtsP3W6DwUP+wLJcKnTET6htcqoeh8Dy7ehJeX6 Ijeos4iZt0pDafoVkkzP7ThHxGwWgxzBRSG6W0L/Kec+dvxoyrdPJj1Y8njTsGdtLfkF XHzLyi9H+95rfaswXyYZ2WTPc0pq2W6YjvCg+m5uZ425/VySyo51rJl32L4SDLLQKCZd A3WA== X-Gm-Message-State: AGi0PubyV4qrzND/T+RE+nnzIRe3xo4dVxbHGxKm+FpILLbbSJcwMVdu cOfc+T47BKJvNi5P10qfdUg4PA== X-Google-Smtp-Source: APiQypKho3FfU0G2u2X5Z/Op83RdkxxNU65dMGVqf/F76QTq7UpcGGr2GdyYCLdwVfV5qiEQbT1o3A== X-Received: by 2002:ac8:40c8:: with SMTP id f8mr5141557qtm.280.1588357249992; Fri, 01 May 2020 11:20:49 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id n10sm3107746qkk.105.2020.05.01.11.20.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 May 2020 11:20:49 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jUaHI-0006oO-GN; Fri, 01 May 2020 15:20:48 -0300 From: Jason Gunthorpe To: linux-mm@kvack.org, Ralph Campbell Subject: [PATCH hmm v2 1/5] mm/hmm: make CONFIG_DEVICE_PRIVATE into a select Date: Fri, 1 May 2020 15:20:44 -0300 Message-Id: <1-v2-b4e84f444c7d+24f57-hmm_no_flags_jgg@mellanox.com> In-Reply-To: <0-v2-b4e84f444c7d+24f57-hmm_no_flags_jgg@mellanox.com> References: MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 02 May 2020 08:34:27 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx@lists.freedesktop.org, "Yang, Philip" , John Hubbard , Felix Kuehling , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Christoph Hellwig , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Ben Skeggs , nouveau@lists.freedesktop.org, Alex Deucher , Niranjana Vishwanathapura , intel-gfx@lists.freedesktop.org, =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Jason Gunthorpe There is no reason for a user to select this or not directly - it should be selected by drivers that are going to use the feature, similar to how CONFIG_HMM_MIRROR works. Currently all drivers provide a feature kconfig that will disable use of DEVICE_PRIVATE in that driver, allowing users to avoid enabling this if they don't want the overhead. Acked-by: Felix Kuehling Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe --- arch/powerpc/Kconfig | 2 +- drivers/gpu/drm/nouveau/Kconfig | 2 +- mm/Kconfig | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 924c541a926008..8de52aefdc74cc 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -455,7 +455,7 @@ config PPC_TRANSACTIONAL_MEM config PPC_UV bool "Ultravisor support" depends on KVM_BOOK3S_HV_POSSIBLE - depends on DEVICE_PRIVATE + select DEVICE_PRIVATE default n help This option paravirtualizes the kernel to run in POWER platforms that diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index d6e4ae1ef7053a..af5793f3e7c2cf 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -86,10 +86,10 @@ config DRM_NOUVEAU_BACKLIGHT config DRM_NOUVEAU_SVM bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" - depends on DEVICE_PRIVATE depends on DRM_NOUVEAU depends on MMU depends on STAGING + select DEVICE_PRIVATE select HMM_MIRROR select MMU_NOTIFIER default n diff --git a/mm/Kconfig b/mm/Kconfig index c1acc34c1c358c..7ca36bf5f5058e 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -805,15 +805,10 @@ config HMM_MIRROR depends on MMU config DEVICE_PRIVATE - bool "Unaddressable device memory (GPU memory, ...)" + bool depends on ZONE_DEVICE select DEV_PAGEMAP_OPS - help - Allows creation of struct pages to represent unaddressable device - memory; i.e., memory that is only accessible from the device (or - group of devices). You likely also want to select HMM_MIRROR. - config FRAME_VECTOR bool