Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3228256ybt; Mon, 22 Jun 2020 19:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr8QVyUW+G3qFHfuSUlEJnlpyVvpJb6maPJXK489uA6MTeSQ0gJATyl7WnBmO7KL/RJaD2 X-Received: by 2002:a05:6402:158d:: with SMTP id c13mr15016635edv.103.1592878096378; Mon, 22 Jun 2020 19:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592878096; cv=none; d=google.com; s=arc-20160816; b=PfnXv7fm+rZe/OX78S35+u1/kqbGHo8vDEvqTeW9NHzPqIAvz9tiRqmh3M+zUmNu1i PG1ikpFqyzLX0WZPok8WJlvgG17S001rxacHTfbskje8VH9Yn7ZlofjyqP37w0uXolGc A1OBIR2Dl5Xbpo9IkHZmwc2YFG/WMQEJimjyrsOzXKNLDo2Yg6NuIhtKfrtx2inAX6Se WDqoQe4+KMo2R5QCZabeid88sLd9kqQxsNCgyfwTzlCHtXro7TuNseNGh3Ma6NNjMwqL 9msmCmOvT+si4OEhPHogKWZTpbY4Y5HYsqP7VWmkPCSNwd9UXpXwXQ5+XZt8DjtUfT4u x8fA== 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=x99pYwa1dnOzvMHARyvq3wdM6wF3B15xvFgvTOgiQu8=; b=ZvSe8pJnIWNNsJ4J9dJT87vxBlJa3qZJGrP9Cq2A7h9H6PhFX8mn8/jKme459nQkli q5kh3hB/2BVl2Kz4SOTiqOvPtoMVI/9WnIOBPpMPTPMIo0th5HMUcBJf3tlE2ILoYxmF yy+0sMgmxwPfTsCJ9v8S2sYlYFvVXl/tiKYNtZssYG7eNjjzZ9ZgeJ+8Q2P2oYtc0M9W Q4WHuKtvsdKRmp110hNnoJIw8+eyaxMvPmT0I/6kH6C0uD14UdELTdDIpmwiBVnJii/L PjlcKGvMKvmiT/u+rgSeX7IxMtdmnuBDOHmPeFJcIb2ysv0+OyuxeBsxuupLAXyPaen0 RzvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hRnduxVY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si10313242eja.116.2020.06.22.19.07.54; Mon, 22 Jun 2020 19:08:16 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=hRnduxVY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731917AbgFWBdQ (ORCPT + 99 others); Mon, 22 Jun 2020 21:33:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731690AbgFWBdQ (ORCPT ); Mon, 22 Jun 2020 21:33:16 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 009FFC061573 for ; Mon, 22 Jun 2020 18:33:15 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id w9so3892935ilk.13 for ; Mon, 22 Jun 2020 18:33:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x99pYwa1dnOzvMHARyvq3wdM6wF3B15xvFgvTOgiQu8=; b=hRnduxVYqOiY+fbFT+FYlxtB/hvdIuvh15lxw6gyLq9tvdyWE35P6IsXTkt3CHRKcw L6d/lGdHY5APNXYzl048L4v7VjtF2KpgzRQwt0yIv70P12j/VpdfLtsTrMAK+VqH1yCI QBAB2p3E7d4I/1OYHetRPqgcrRrID1POtWkCvnNwnSOnAJKfr9FyRgGdcEhEOIoZFSBW /2ukft/5XB7tkhWi5R7ToB5Q54QtaZqU80QrEKbyvsTItDKkXl3HbrwryBHvcayJxZgY vbSzg8VzneA0g95IcGaiZTdg8rTf3MvIJjkZcLLw/62eQlHlmei4aU9UACQOJ/aSh971 RfDQ== 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=x99pYwa1dnOzvMHARyvq3wdM6wF3B15xvFgvTOgiQu8=; b=W1md7mcZ3cvWtPIrLOpIKFsGiv5OkOmtZha4ecR6iIz4IU2qdpAt0/5w3exvghTgUz LsvjWaZiJAsGBk5hF7phYeMxXxgF5o369XG4rmzTWUL4LLe5zbP0CxJeBsGlzgOnsBrz VwV27J5TPkClDLUvgg9OtbycZK0mj/WbtRrZq7gcS3he2NkBeDGpq3OpIgsFQy35NpdQ NC20kLvg99lyPCU4wby8CqtUta2ER11lU5qTIgevi8zAaIJ6igOqrWJflnjtwFdYxugq +poQWQn8JfacqJibQmi5oi5BSY0dTmpqktFXetR7GAm6DqGcDwqvCKYNKDHqc1wVxkRs c50w== X-Gm-Message-State: AOAM530/gObcaSUbKLV8QzevrXuNQGhlng51PYc62gOwSKb+HLC4Spnz t2NYFxdRLyF9CXBnnTIcVSM9paCEDf+yYbzmJjI= X-Received: by 2002:a92:da0b:: with SMTP id z11mr19094462ilm.149.1592875995226; Mon, 22 Jun 2020 18:33:15 -0700 (PDT) MIME-Version: 1.0 References: <20200619050619.266888-1-leobras.c@gmail.com> <20200619050619.266888-4-leobras.c@gmail.com> <51201582-efe5-85df-7e65-a998e91ab63f@ozlabs.ru> <887bf30e-ae9e-b0cb-0388-dc555692ff0a@ozlabs.ru> In-Reply-To: <887bf30e-ae9e-b0cb-0388-dc555692ff0a@ozlabs.ru> From: "Oliver O'Halloran" Date: Tue, 23 Jun 2020 11:33:03 +1000 Message-ID: Subject: Re: [PATCH 3/4] powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window To: Alexey Kardashevskiy Cc: Leonardo Bras , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Thiago Jung Bauermann , Ram Pai , linuxppc-dev , Linux Kernel Mailing List 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 Tue, Jun 23, 2020 at 11:12 AM Alexey Kardashevskiy wrote: > > On 23/06/2020 04:59, Leonardo Bras wrote: > > > >> Also, despite this particular file, the "pdn" name is usually used for > >> struct pci_dn (not device_node), let's keep it that way. > > > > Sure, I got confused for some time about this, as we have: > > static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn). > > but on *_ddw() we have "struct pci_dn *pdn". > > True again, not the cleanest style here. > > > > I will also add a patch that renames those 'struct device_node *pdn' to > > something like 'struct device_node *parent_dn'. I usually go with "np" or "node". In this case I'd use "parent_np" or just "parent." As you said pci_dn conventionally uses pdn so that should be avoided if at all possible. There's some places that just use "dn" for device_node, but I don't think that's something we should encourage due to how similar it is to pdn. > I would not go that far, we (well, Oliver) are getting rid of many > occurrences of pci_dn and Oliver may have a stronger opinion here. I'm trying to remove the use of pci_dn from non-RTAS platforms which doesn't apply to pseries. For RTAS platforms having pci_dn sort of makes sense since it's used to cache data from the device_node and having it saves you from needing to parse and validate the DT at runtime since we're supposed to be relying on the FW provided settings in the DT. I want to get rid of it on PowerNV because it's become a dumping ground for random bits and pieces of platform specific data. It's confusing at best and IMO it duplicates a lot of what's already available in the per-PHB structures which the platform specific stuff should actually be looking at. Oliver