Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1903060pxb; Fri, 5 Mar 2021 02:32:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfMRn4i5uXOJzNJkiWAJIveTHeVUruedZLl6DUgd3p4eNPr+TjnqisMlcS4Nrno3kdIFX/ X-Received: by 2002:a05:6402:350f:: with SMTP id b15mr8489720edd.6.1614940371847; Fri, 05 Mar 2021 02:32:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614940371; cv=none; d=google.com; s=arc-20160816; b=WeKCV0gm2AdzeCwU8cHDbBfcxGxUIOZowtBdl05WkR9WYyyiuqTjDvb3ySQx5eDbYN t8QSjPqnJQUIYSpMEdTDdfhFtkb/I8LKLz5m0MBZcpMJX7C2oOBdUY9pNxh3GXfgdWdw n0ltY0Uw/ty7G+EgvJFLi4fhtwHyWja8PQ5gkv/C4uZlQWpwX+wu4wFazkCsCs5Z/Ugv IWhuKv747FTqcd+f1eb5TRUNU8/QVzCd+WlL80o44cYnIniZkjOIeUSEXVQ2lV+uo/Ot J59Gh46Fm8df+TRQoLMkRE5CTbd/McV4uvxs2Nb93gg3o1UkQMOjQ6eNZs2WZPMMP4pt q3Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lo7hHCf2xoJPHW7HnDCyEwaSFaM7Keg2AX2jZ4uVfBI=; b=wBNcps63p20mChGkPLg55s4KZBKUnq3gDbuXcRp3OokWNj1F9bcjdQv63atGPlYyMs AWfUd4dKe9dSD3MAqMdNfmNnnGq+Fl/KesPLVZNA8Aksso299nSN6AVVvPyh3w2EPzJt vclErqx4WW2pQNIqqpJa/kEZo2mwoGlfk5nwHRTIbj1eBYVkuM1T4LNLZCZnQ4rTLiCI 2beyhu2euCCGwa/Tsbo12aynb9ApxpHqMR5UMJmLdw+VZ/kpHyvcDdMsOPFevuPqdrff UP+l1TCX0Jzfafm8AEmNFwSB8lD4pSG2Hhs14OSccquBXWsRMqnQdtHT9Kpruv6eeNBS fEhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W50MxM+4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si1196910ejn.713.2021.03.05.02.32.29; Fri, 05 Mar 2021 02:32:51 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=W50MxM+4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbhCEK3W (ORCPT + 99 others); Fri, 5 Mar 2021 05:29:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhCEK2u (ORCPT ); Fri, 5 Mar 2021 05:28:50 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F844C061756 for ; Fri, 5 Mar 2021 02:28:50 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id q25so2739154lfc.8 for ; Fri, 05 Mar 2021 02:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lo7hHCf2xoJPHW7HnDCyEwaSFaM7Keg2AX2jZ4uVfBI=; b=W50MxM+40GpkXjVUgQZ+hglkhIatQ62en1ksXZx59zKvAOfcZtgwWtdXoYBHbG7Q23 AqbI/7ojmTDD4QGv0lw8kRBK/x1R3M7p046e8wJ9yk0jYBxUiHfx2gNulxd5b2VkSfEn FQpet8cbJgwx+ZAH1E58hlDWyP2/BJOZ8MPWCf0sXMFllAX98uCZ3wbY5ayGxbMs4OXY 0ELSFzLEg/Oig2lds2PIkXAjDMUnftrtBWKSIEXKfQzpOgXgiPiHqw6il4Rg8bh1JzBm Ely81fAir1FA+I23NIFzQHAxRDDpkYyqM2YyJJ9hcyu3flk6I1hwaOVux6oKkJYSxbzh KMTQ== 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=lo7hHCf2xoJPHW7HnDCyEwaSFaM7Keg2AX2jZ4uVfBI=; b=d3dvEb4YDFVTWXgL+xLzNhAKxVBl4V4GSF4IpwooEz/JAHqVfen1Fbw+xgb/Q5Si1I cpLVRzqdR2aluSQzCT9ma7Y+xSr1rDjASO51OvJgMFm9IBltI1rLUqgFfeIkdRxLTuMm C1bP2WfLM6easEI2wU/0mVZTenq04+Et5ZRx/cacX32oGRzNpulZ8w6KkW5rkGjBZ1wc zNfUDHW5qZdDnIPmxgG7T2QK2HJPvaWlm9QRKhiEmI1WRMR728X/rxagucE5yKnYXxRh 45/WYrlraMY4bdQ/VWU2PrgQiq7nYtNzU6s1kOS1CMWQnYgLYTJuE3jW6lGe8xSzaFEH 4twg== X-Gm-Message-State: AOAM532pornAekloAuhBOWy/nw4iMvUVN2aqrSua5wBy7pHx2OzYMazC bDEmVuM7E5oKltEowmEYZm2z/Dqu0i5kLK+HhPwWkw== X-Received: by 2002:a05:6512:74a:: with SMTP id c10mr5124313lfs.586.1614940128739; Fri, 05 Mar 2021 02:28:48 -0800 (PST) MIME-Version: 1.0 References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-13-marcan@marcan.st> In-Reply-To: <20210304213902.83903-13-marcan@marcan.st> From: Linus Walleij Date: Fri, 5 Mar 2021 11:28:37 +0100 Message-ID: Subject: Re: [RFT PATCH v3 12/27] of/address: Add infrastructure to declare MMIO as non-posted To: Hector Martin Cc: Linux ARM , Marc Zyngier , Rob Herring , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Mark Rutland , Andy Shevchenko , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:SERIAL DRIVERS" , Linux Doc Mailing List , linux-samsung-soc , Linux-Arch , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 4, 2021 at 10:40 PM Hector Martin wrote: > This implements the 'nonposted-mmio' and 'posted-mmio' boolean > properties. Placing these properties in a bus marks all child devices as > requiring non-posted or posted MMIO mappings. If no such properties are > found, the default is posted MMIO. > > of_mmio_is_nonposted() performs the tree walking to determine if a given > device has requested non-posted MMIO. > > of_address_to_resource() uses this to set the IORESOURCE_MEM_NONPOSTED > flag on resources that require non-posted MMIO. > > of_iomap() and of_io_request_and_map() then use this flag to pick the > correct ioremap() variant. > > This mechanism is currently restricted to Apple ARM platforms, as an > optimization. > > Signed-off-by: Hector Martin This is fine with me atleast given that the nonposted IO is acceptable. Caching the quirk state in a static local is maybe a bit overoptimized but if the compiler can't see it but we can, why not. Reviewed-by: Linus Walleij Yours, Linus Walleij