From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 758DDC63777 for ; Mon, 30 Nov 2020 15:34:21 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C43782076C for ; Mon, 30 Nov 2020 15:34:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C43782076C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4Cl8RG3zmrzDqCx for ; Tue, 1 Dec 2020 02:34:18 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.221.67; helo=mail-wr1-f67.google.com; envelope-from=kswilczynski@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.com Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Cl8M02nW7zDqXd for ; Tue, 1 Dec 2020 02:30:36 +1100 (AEDT) Received: by mail-wr1-f67.google.com with SMTP id 23so16756479wrc.8 for ; Mon, 30 Nov 2020 07:30:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=aYHHxJmw979e+wSJRiDQN73bZ6bHCfBL6+c7qQzjNRM=; b=bY938Ga6/Mgn4AaAd30NVlpPwi9AOG6sYArDVGcq+LNtq/JWCor54AUDyHvRUg72HL ofQISnJunUykrk3yKYsh7qP4PHYVNWYID4tQCo5zhs0ZPF4jWgg5eTOEytz2GBfCZauA S4yianTiXzKiHuG9nWXx8BND+EVpc+cWxMm/i8VKlshdN8Aetg8vILDzNw+UGVeiVe0O SFuk/BwwQQVKSbza5PikMfeVmb9gKg7mGnK4Yxvq5XFCOD6dt9fz9aThw0EQIUP0G07d wgubJjP7EDcNXqntpZb26wdqUJnvZ5VKbz6gwcZuYD6u1M+m+2R2LvjE3h/1nRrl3Gl6 cn+w== X-Gm-Message-State: AOAM5314hAMkn1ijc+vECgSPrMaJGxITRjOxT1J6WdOrrlOSelm0KK9c QKaqxIkC57VUp+Ob5Dcsik0= X-Google-Smtp-Source: ABdhPJxDgu0JUhfBnd1JT0sM9EnLMunvMJmxP1ptyZLeuiHRBoyRMeT9fOud0TpT6HDh8Aw84e0fEg== X-Received: by 2002:adf:9d49:: with SMTP id o9mr29398963wre.413.1606750230899; Mon, 30 Nov 2020 07:30:30 -0800 (PST) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id k11sm27836582wrv.88.2020.11.30.07.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 07:30:30 -0800 (PST) Date: Mon, 30 Nov 2020 16:30:28 +0100 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Lorenzo Pieralisi Subject: Re: [PATCH v6 1/5] PCI: Unify ECAM constants in native PCI Express drivers Message-ID: References: <20201129230743.3006978-1-kw@linux.com> <20201129230743.3006978-2-kw@linux.com> <20201130110858.GB16758@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201130110858.GB16758@e121166-lin.cambridge.arm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Shawn Lin , Paul Mackerras , Thomas Petazzoni , Jonathan Chocron , Toan Le , Will Deacon , Rob Herring , Florian Fainelli , Michal Simek , linux-rockchip@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, Jonathan Derrick , linux-pci@vger.kernel.org, Ray Jui , linux-rpi-kernel@lists.infradead.org, Jonathan Cameron , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Scott Branden , Zhou Wang , Robert Richter , linuxppc-dev@lists.ozlabs.org, Nicolas Saenz Julienne Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi Lorenzo! On 20-11-30 11:08:58, Lorenzo Pieralisi wrote: [...] > > Refactor pci_ecam_map_bus() function to use newly added constants so > > that limits to the bus, device function and offset (now limited to 4K as > > per the specification) are in place to prevent the defective or > > malicious caller from supplying incorrect configuration offset and thus > > targeting the wrong device when accessing extended configuration space. > > This refactor also allows for the ".bus_shit" initialisers to be dropped > ^^^^ > > Nice typo, I'd fix it while applying it though if you don't mind ;-), > no need to resend it. Oh doh! Apologies. :) > Jokes aside, nice piece of work, thanks for that. > > > when the user is not using a custom value as a default value will be > > used as per the PCI Express Specification. > > > > Suggested-by: Bjorn Helgaas > > Signed-off-by: Krzysztof WilczyƄski > > I think Bjorn's reviewed-by still stands so I will apply it. [...] Thank you! Krzysztof