Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp816060rwi; Wed, 19 Oct 2022 03:23:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM65bRDVFiomu3S0Rc21+nLy6Nzx+6KqMW78yIJL1uUrzF4wTmINUwqJv/kdQ7299Ik54h0L X-Received: by 2002:a17:906:d555:b0:78d:ce55:23af with SMTP id cr21-20020a170906d55500b0078dce5523afmr5871320ejc.524.1666175034240; Wed, 19 Oct 2022 03:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175034; cv=none; d=google.com; s=arc-20160816; b=gdLPPcRzR4LuCtzmhp3KEzIqDYDju/gv08wZ9NerRMAy2HDYDDdlcyLS5vqhs1IzmV y9s8GfASf+uKRPOb2lTTyiUD839fAX/cLH/fO7dYjno93NbGnajG7bKUfUCKnXCIuX46 qqpZkOYQ+q9IDzriaPtJJdCpmMFSCRhWsRXUYUXoR9ZjnQJhZ+VjzhYf5iV0nQZadrm2 ddl0GMQX2IWvOHu8QHH4f5Sdrueh7VNpCfH4KCz87tjytuBVNOKRUL8YVv3hIhxitOaf rVpwMRmM7sf44jtaf3sWrwdP8w4ddCNiNtyi4AqdoO3JHDKjEH4zMzhYBW0/c2LW5++8 VSlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tuja8sxdSJc2s7Rbhaz+suXxEoyZ2/4Lneuoa4MQOho=; b=R21fOlSPZL90S+qaS7IGLvJYTNX23dm9qpTFjFfcsE7PM9Z8aKJ5qawfPPUWHSs6+j 6oOkp7Ui+oPEI0+B+wGbpGiMlWkzP2WiavjxAHn8io0z3WsnVIer3aOyar/fzirQFJc/ 5GaI+9XRo7kCxFpQk5M6K/rxYimY11Iq/8nNVWgt6Bwgd2qBds8N3UCe3Z+V1u30OTjR +5dYEcoTFarhVe5vHCPXX9aUPWLYJPUL+i2dYiFRktJoCuFlem0PY5BgtN/2UZ6doeYJ Q1UTQas2mPtyHCsYphgFViUUpCGRAId9s4PEZmE9ClnGRUDjycTQC4+/RPyb33mWPhtq /Avw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MRvaOEJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go10-20020a1709070d8a00b0078d4c9d77adsi17130588ejc.94.2022.10.19.03.23.28; Wed, 19 Oct 2022 03:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MRvaOEJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230313AbiJSJyj (ORCPT + 99 others); Wed, 19 Oct 2022 05:54:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234578AbiJSJyP (ORCPT ); Wed, 19 Oct 2022 05:54:15 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 171DD50BB7 for ; Wed, 19 Oct 2022 02:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tuja8sxdSJc2s7Rbhaz+suXxEoyZ2/4Lneuoa4MQOho=; b=MRvaOEJlGziNZuKp2TUVbGcQeV Gc4jU0lBHSjp7RQy5tES7IZkXtDiaW9nacHkwRfS5SzdyapUCKclUIRarpQUMKU/GavcqILZ0EuX5 jml7cFn/YHcmowgk5QZ2+7zZy1sfeyTZaYqjZveqMPI43jxbESiPg5MXK0rt8TH3rxK8q3z8PbRNy mBYl1Z+vtv+pWOAzWGjzKMjn9sgyhzXbQYiouZtpGSNxSbptQ6ocM+1c4m4Ql1Eo5r07ir8DUABpd 2a/J6pVhXJrDbRDXjnHhuPf99St/XybvHx5oB8PZS9DCLjoEJReWeRHLqJzWhme7EnKegXl3qDX92 GrnEzhEA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34788) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ol55N-0005PB-Br; Wed, 19 Oct 2022 10:10:01 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ol55L-0001yT-Le; Wed, 19 Oct 2022 10:09:59 +0100 Date: Wed, 19 Oct 2022 10:09:59 +0100 From: "Russell King (Oracle)" To: Arnd Bergmann Cc: Giulio Benetti , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anshuman Khandual , Andrew Morton , Kefeng Wang , Will Deacon Subject: Re: [PATCH] ARM: mm: fix no-MMU ZERO_PAGE() implementation Message-ID: References: <20221017233700.84918-1-giulio.benetti@benettiengineering.com> <3fb4afd1-2eea-4a71-a914-f8208b11f9f4@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fb4afd1-2eea-4a71-a914-f8208b11f9f4@app.fastmail.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 09:03:01AM +0200, Arnd Bergmann wrote: > In addition to your fix, I see that arm is the only architecture > that defines 'empty_zero_page' as a pointer to the page, when > everything else just makes it a pointer to the data itself, > or an 'extern char empty_zero_page[]' array, which we may want > to change for consistency. ARM's implementation is the utterly sensible implementation IMHO. When the only users in the kernel _were_ ZERO_PAGE() for this, which is defined to return a struct page pointer, there was no need to make "empty_zero_page" anything but a struct page pointer, rather than a runtime translation from an address to a struct page. IMHO, we should _not_ be exposing empty_zero_page to devices - we certainly do not want the DMA API performing cache maintenance on this page since the primary purpose of this page is to fill in userspace BSS pages that have not been written. ACPI's use is just to have a cookie for invalid handles, and using the struct page pointer is good enough. The only problem one is the RAID6 code, but that is disabled: /* Set to 1 to use kernel-wide empty_zero_page */ #define RAID6_USE_EMPTY_ZERO_PAGE 0 #if RAID6_USE_EMPTY_ZERO_PAGE # define raid6_empty_zero_page empty_zero_page #else extern const char raid6_empty_zero_page[PAGE_SIZE]; #endif So, the only one that needs fixing is the SPI usage, which IMHO is wrong. ARM being different finds what I consider a driver bug. Good for 32-bit ARM. :) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!