Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp232009pxb; Thu, 2 Sep 2021 02:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6lAfTjlizUNzjjEJI3UPTagVKBgyeNHG8mFOaPfncd/8C3PaYqrTIEGlp7UJ8HsMmtK/3 X-Received: by 2002:a05:6638:25c3:: with SMTP id u3mr2131573jat.52.1630576684704; Thu, 02 Sep 2021 02:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630576684; cv=none; d=google.com; s=arc-20160816; b=wNyGjdc9J94r4vBVuzBmNgLquKJ0EpisIYdiyRC4M5qFmDxxoKZjjz+pgB93nX+Nme 9Ds2AVZxyeyGNCBpp9F6Ny0HDUt+AshKKNrt1fJqNRvnDz/U8We5QSZGlFWRGwU7tRea lZaMUjFdeyaax08x7fmqAsNSU1+4hQjQroZ8ojSsm83BGEc7OcJT1FvR9uRkseeVfwbn W44vl4SVntNAxK8oZPueLfTmEM9sISrGkccnlx+uXhfX1PgRGkdlngteTfTlWYnBsrsd KlB7W3DDYdX50cEQCVzBPTCNsIcgO/E+guBap/L7K1/JKCmnvdO/E1FypMg0vucacbQ5 pCyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=lGCqt5/B/Pf46dzOOiBt1yWrYlL6UffqKFJb86R6ujI=; b=AGpGUcdASXq/U5P48jfe8eDeHZwP02IJA4D8/bvfDdLFYzDG+oF6GgnQrCvJL7pEGT 9WdHR4DXS7aXserOM/vo53IqJBQVGe+3NtbsEPqsPL27MGHylCPsQ8eK27H9nORfag6T u/HWLqY1+Kc85tvLHU9u/OKfQv5Hbiy5VfWlJJnG4L8LuX27By+mcTVQ1doFlS7o45e/ V0Dhm9F7H4aU2igXAMSkkatq8+RG4JSSaG5ixdpoRi2EYY3E4AtIgiLadKGZhgTGCdA7 qRzghXqtTI7YoPjMkjEteVqddwfqcN+MYcfWSEFeZpOvQoiWsNw8ZTuKwHQT+swpOp1E nWnA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si274403jat.52.2021.09.02.02.57.47; Thu, 02 Sep 2021 02:58:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238504AbhIBGUT (ORCPT + 99 others); Thu, 2 Sep 2021 02:20:19 -0400 Received: from ivanoab7.miniserver.com ([37.128.132.42]:54224 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbhIBGUR (ORCPT ); Thu, 2 Sep 2021 02:20:17 -0400 Received: from tun252.jain.kot-begemot.co.uk ([192.168.18.6] helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLg43-0002iY-Fn; Thu, 02 Sep 2021 06:19:11 +0000 Received: from madding.kot-begemot.co.uk ([192.168.3.98]) by jain.kot-begemot.co.uk with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mLg3x-00060b-Ah; Thu, 02 Sep 2021 07:19:07 +0100 Subject: Re: [PATCH] drm/ttm: provide default page protection for UML To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , =?UTF-8?Q?Christian_K=c3=b6nig?= , Huang Rui , dri-devel@lists.freedesktop.org, Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org, David Airlie , Daniel Vetter References: <20210902020129.25952-1-rdunlap@infradead.org> <9faacbc8-3346-8033-5b4d-60543eae959e@cambridgegreys.com> From: Anton Ivanov Organization: Cambridge Greys Message-ID: <0887903c-483d-49c7-0d35-f59be2f85bac@cambridgegreys.com> Date: Thu, 2 Sep 2021 07:19:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -1.0 X-Spam-Score: -1.0 X-Clacks-Overhead: GNU Terry Pratchett Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/09/2021 06:52, Randy Dunlap wrote: > On 9/1/21 10:48 PM, Anton Ivanov wrote: >> On 02/09/2021 03:01, Randy Dunlap wrote: >>> boot_cpu_data [struct cpuinfo_um (on UML)] does not have a struct >>> member named 'x86', so provide a default page protection mode >>> for CONFIG_UML. >>> >>> Mends this build error: >>> ../drivers/gpu/drm/ttm/ttm_module.c: In function >>> ‘ttm_prot_from_caching’: >>> ../drivers/gpu/drm/ttm/ttm_module.c:59:24: error: ‘struct cpuinfo_um’ >>> has no member named ‘x86’ >>>    else if (boot_cpu_data.x86 > 3) >>>                          ^ >>> >>> Fixes: 3bf3710e3718 ("drm/ttm: Add a generic TTM memcpy move for >>> page-based iomem") >>> Signed-off-by: Randy Dunlap >>> Cc: Thomas Hellström >>> Cc: Christian König >>> Cc: Huang Rui >>> Cc: dri-devel@lists.freedesktop.org >>> Cc: Jeff Dike >>> Cc: Richard Weinberger >>> Cc: Anton Ivanov >>> Cc: linux-um@lists.infradead.org >>> Cc: David Airlie >>> Cc: Daniel Vetter >>> --- >>>   drivers/gpu/drm/ttm/ttm_module.c |    4 ++++ >>>   1 file changed, 4 insertions(+) >>> >>> --- linux-next-20210901.orig/drivers/gpu/drm/ttm/ttm_module.c >>> +++ linux-next-20210901/drivers/gpu/drm/ttm/ttm_module.c >>> @@ -53,6 +53,9 @@ pgprot_t ttm_prot_from_caching(enum ttm_ >>>       if (caching == ttm_cached) >>>           return tmp; >>> +#ifdef CONFIG_UML >>> +    tmp = pgprot_noncached(tmp); >>> +#else >>>   #if defined(__i386__) || defined(__x86_64__) >>>       if (caching == ttm_write_combined) >>>           tmp = pgprot_writecombine(tmp); >>> @@ -69,6 +72,7 @@ pgprot_t ttm_prot_from_caching(enum ttm_ >>>   #if defined(__sparc__) >>>       tmp = pgprot_noncached(tmp); >>>   #endif >>> +#endif >>>       return tmp; >>>   } >> >> Patch looks OK. >> >> I have a question though - why all of DRM is not !UML in config. Not >> like we can use them. > > I have no idea about that. > Hopefully one of the (other) UML maintainers can answer you. Touche. We will discuss that and possibly push a patch to !UML that part of the tree. IMHO it is not applicable. A. > > thanks. -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/