From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BB90C432BE for ; Thu, 2 Sep 2021 05:49:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C6FF610CD for ; Thu, 2 Sep 2021 05:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233313AbhIBFuI (ORCPT ); Thu, 2 Sep 2021 01:50:08 -0400 Received: from ivanoab7.miniserver.com ([37.128.132.42]:54168 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231831AbhIBFuG (ORCPT ); Thu, 2 Sep 2021 01:50:06 -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 1mLfai-0002ca-79; Thu, 02 Sep 2021 05:48:52 +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 1mLfad-0005F9-F2; Thu, 02 Sep 2021 06:48:47 +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> From: Anton Ivanov Organization: Cambridge Greys Message-ID: <9faacbc8-3346-8033-5b4d-60543eae959e@cambridgegreys.com> Date: Thu, 2 Sep 2021 06:48:43 +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: <20210902020129.25952-1-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Clacks-Overhead: GNU Terry Pratchett Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > _______________________________________________ > linux-um mailing list > linux-um@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-um > -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/