Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B0FA8CE79AE for ; Wed, 20 Sep 2023 08:01:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E562A10E451; Wed, 20 Sep 2023 08:01:39 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDA0410E450 for ; Wed, 20 Sep 2023 08:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695196890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rnpCpoK1Qphye/H0at9y+THlkxPvcEo2r5PdFTxqnHY=; b=X7zFmIRX9QOChls+rvrYdN4Udka+KOZgkB1+O5rdEGP+qTZhZ8BzEBmusRX2jMXHMWrMTY +go032lHwk8XUXt1MgdFKdP6dUslJ0p55+yZ+1LufxTuPn6UogdlZIit4HqmK3rD8CtH+M lMuneXBURfuQDVa+gRvmyLBsnjJRsqI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-179-J0jA91EuPQCDN8XRpjI3Jg-1; Wed, 20 Sep 2023 04:01:29 -0400 X-MC-Unique: J0jA91EuPQCDN8XRpjI3Jg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-31f79595669so238943f8f.0 for ; Wed, 20 Sep 2023 01:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695196888; x=1695801688; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rnpCpoK1Qphye/H0at9y+THlkxPvcEo2r5PdFTxqnHY=; b=R0r8enW/TuZ3dZVgfxVBZw+V406TJ245sa/7/hCH0eqwwFDcpjfZv5d51E0oeVlu3O PkhiWkMfj/pSs//ZbK4kyKBEvNe0Rw5ojcHot6b5/a46rXiVjmAnGUQ8SC+PMy7heCYK u1YlB+jsb9dsipUZYLDY8TJiTrJjFeV7inuFFiR8scTTZT+LeejIHuWsvIYKiUQqF0Ns ra1EYByv3kWEa3a7bMnB5Cd70iqEPD+zbGzKpw2IFhRIeplqmKPba8yPA8K5xD7LXat9 kR+6HX951RHKGBEHH0zy7H6RJP8KAUEBDc4S6R+zBKj4UTM+tPAGgNhhM1GhlrM5jWKT XCAQ== X-Gm-Message-State: AOJu0Ywl4hlE5EmmpXL/h99Y7oRdsjvmsOgKlMfXXXoy9wJRjc1TA+GA TqPHG6iez309bPX8ysAUw6neCDBRDDJJ+X93CLNETK6DBoC+EAKez3JFCOoUaThR7irsw4GKZ6w YtkUZN7z1GzmEXfdzeQpOJ5PqvS6f X-Received: by 2002:a5d:4691:0:b0:317:6579:2b9f with SMTP id u17-20020a5d4691000000b0031765792b9fmr1441895wrq.30.1695196888608; Wed, 20 Sep 2023 01:01:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGjMaHCrb95S6OjzxI7LM9YzqMZD+FHo9V0ilc7E6hmphf8oly7XaHzjchfvY6rdHHetD1Jw== X-Received: by 2002:a5d:4691:0:b0:317:6579:2b9f with SMTP id u17-20020a5d4691000000b0031765792b9fmr1441876wrq.30.1695196888277; Wed, 20 Sep 2023 01:01:28 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id a4-20020adffb84000000b0031c5e9c2ed7sm17627845wrr.92.2023.09.20.01.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 01:01:27 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, arnd@arndb.de, deller@gmx.de Subject: Re: [PATCH v4 1/5] fbdev: Avoid file argument in fb_pgprotect() In-Reply-To: <20230912135050.17155-2-tzimmermann@suse.de> References: <20230912135050.17155-1-tzimmermann@suse.de> <20230912135050.17155-2-tzimmermann@suse.de> Date: Wed, 20 Sep 2023 10:01:27 +0200 Message-ID: <87il85l1d4.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: linux-arch@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-m68k@lists.linux-m68k.org, Thomas Zimmermann , sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Thomas Zimmermann writes: Hello Thomas, > Only PowerPC's fb_pgprotect() needs the file argument, although > the implementation does not use it. Pass NULL to the internal Can you please mention the function that's the implementation for PowerPC ? If I'm looking at the code correctly, that function is phys_mem_access_prot() defined in the arch/powerpc/mm/mem.c file: pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot) { if (ppc_md.phys_mem_access_prot) return ppc_md.phys_mem_access_prot(file, pfn, size, vma_prot); if (!page_is_ram(pfn)) vma_prot = pgprot_noncached(vma_prot); return vma_prot; } and if set, ppc_md.phys_mem_access_prot is pci_phys_mem_access_prot() that is defined in the arch/powerpc/kernel/pci-common.c source file: https://elixir.bootlin.com/linux/v6.6-rc2/source/arch/powerpc/kernel/pci-common.c#L524 That function indeed doesn't use the file argument. So your patch looks correct to me. Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat