Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp233068ybb; Fri, 3 Apr 2020 01:30:18 -0700 (PDT) X-Google-Smtp-Source: APiQypKrHhyYyLlqhXsLXWZbN4MgNN0oGXN4NTkstJBXYQxUHsWCvM0l19YxskDk1135om6GdH68 X-Received: by 2002:aca:7506:: with SMTP id q6mr2140384oic.73.1585902617942; Fri, 03 Apr 2020 01:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585902617; cv=none; d=google.com; s=arc-20160816; b=jBdVL5z8NkjpfKqX6QjVTuBPKSUAZQVyNLzwznhYQh5gB9VB1R1j8fggnbhRlCyGAN X8E9XIvSE8STZQj3cWXREwousin5J3OvSGHLcZVWPSLG/k8yUiQrU3FhaODMhjPn7qco iR2qEA1LdKsHMb3aDZlvyT5I0uC1k1o9tfW1gAuL5qsGahHwYuoISPfjaVnhBHT6I0y7 Z4Vh28G47Xd7WoycXhMsdz7fEKz+RXCvu7CyEaOjKT811U/IKVj8u+W6wz88Uwm9Q0cv APaBb2tr/o5xkG0tqJp2RKOR0V8kcYzh6piaHwGSTag9MMzWvmv8aKnTLTyp4OhXiD4Z Webw== 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=3ymTJVtUxBUPQPt/DjBQudCk2SDBLtq2q0vAVeHEhjU=; b=kzuvkMCFQtcGkSzb3iOaab/xJesQWJwnfyAL9Gb3yg4ZXbBnBZgmJWDKO2n12hc36g i8cWpTSefe2ZjqKzEnyXU1dHoymdPvXUFSwzMqceU9is0kwr7l8a9arwZiK/8XM/Vbzj H7rmDz2+rQGqHizmye4gYIXIx7RKdGh1IEup3ODEotpPc5eSxy8rb/md1FpfAg1RYYgA xwHYlOvpgINqgN++fSDFrgIgwMtdwadP9RrAZXi8JuNvunlCHBpRFXen+Jg2lbPMN1Ku Wjie1n2KFG15R2y+8NqH+t0R2+Vh11GdvfkX9drPLruGRclgnSfhM4GcmxVbzqNW5OyJ C5Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=MLIeXrP5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si3594485oth.163.2020.04.03.01.30.05; Fri, 03 Apr 2020 01:30:17 -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=@ffwll.ch header.s=google header.b=MLIeXrP5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390487AbgDCIM1 (ORCPT + 99 others); Fri, 3 Apr 2020 04:12:27 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:35882 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727431AbgDCIM1 (ORCPT ); Fri, 3 Apr 2020 04:12:27 -0400 Received: by mail-oi1-f196.google.com with SMTP id k18so5414657oib.3 for ; Fri, 03 Apr 2020 01:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3ymTJVtUxBUPQPt/DjBQudCk2SDBLtq2q0vAVeHEhjU=; b=MLIeXrP5vfs5pP0srG+5v4SHJhfyQO53bs//r28tSH5Z9+XMQzqZKd5isNZPnGtaVA 3cZRtIeOcaLBJRSQYypEbgbwY7mwZoRbBLKquFYBAGV9toZtODL6tslmFISYdlp5rKTK DOJ5dJQ6DrOlklAY8LMbdgHc8DfcHyurH1bqY= 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=3ymTJVtUxBUPQPt/DjBQudCk2SDBLtq2q0vAVeHEhjU=; b=btmzA30uaouQmto6vQDGjy53Lg/XrIgLYs7F3w/cluWh6ot6xw/ZOu7QJhuLVLCaUA ozBdTjN+2GGkUibFIgK7pXMxIg0WwCgwZNPBmLUZsIsPCZATWRaGD7IC1fRrkUNjF13q RSXGm9hk8e62SlVzGuccYld+/CTofB7rgq0Sks4AL96yWK+Aoj68DIpa5LTV3sS5oK/A odeHsIL1BReLZm1hVIesiRRy0v+KqRQAzt3WCOy5hlBbmZ/XsNknOwVR1OSPf103q+az dIcrYCU2ewI/ecS3sGcOhDBhBMOaTuhmKI3Vk22cKjaHg4MFRu/ohgs04w/iyjcR8hKw N2rg== X-Gm-Message-State: AGi0PuZYrE1yHrfhJIWxex2M8KzcnN1d5e9WmrticSYk0LfIqbhu3mQE WEgfb5GC1A5ZUk9+voZJF3Cpd+OTGv/0e0nrbn4mnA== X-Received: by 2002:aca:aac1:: with SMTP id t184mr2170657oie.14.1585901546393; Fri, 03 Apr 2020 01:12:26 -0700 (PDT) MIME-Version: 1.0 References: <20200402203317.GA34560@ubuntu-m2-xlarge-x86> In-Reply-To: From: Daniel Vetter Date: Fri, 3 Apr 2020 10:12:15 +0200 Message-ID: Subject: Re: [git pull] drm for 5.7-rc1 To: Linus Torvalds Cc: Nathan Chancellor , Dave Airlie , dri-devel , LKML , Chris Wilson 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 Thu, Apr 2, 2020 at 10:43 PM Linus Torvalds wrote: > > On Thu, Apr 2, 2020 at 1:33 PM Nathan Chancellor > wrote: > > > > This fixes it but I am not sure if it is proper or not (could be > > problematic if CONFIG_PHYS_ADDR_T_64BIT is set but > > CONFIG_ARCH_DMA_ADDR_T_64BIT is not, not sure if that is possible) so I > > figured I'd report it and let you guys deal with it. > > Yeah, no, that patch can't be right. > > From your build failure, your configuration has dma_addr_t being a > 'long long unsigned int', and map->offset being a resource_size_t is > for just a 'unsigned int'. Casting 'unsigned int *' to 'unsigned long > long *' is not valid. > > You'd have to do something like > > dma_addr_t temp; > > and pass the address of *that* in, and then assign that to map->offset > (and verify that it fits), I think. > > That's kind of what the old code did. > > Or alternatively, the 'offset' field should just be of type > 'dma_addr_t' instead (see include/drm/drm_legacy.h). But I didn't > check if something else wants it to be a resource_size_t. This is all exclusive in legacy code back from the days when drm drivers where shared with *bsd. None of that code ever learned that there's maybe a difference between dma/phys/virtual address sizes, and that's about the least of the problems it has. Revert seems to be clean, I'd vote for that. And maybe we instead try to push these horrors more under the CONFIG_DRM_LEGACY. I'll try to remember to do that, afaics the only thing outside are the drm_pci_alloc/free multi-layered wrappers in drm_pci.c. Linus, can you pls push the revert yourself, to avoid build bot breakage for longer than necessary? Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch