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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 86B01C07E9B for ; Wed, 21 Jul 2021 05:46:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 673D96101E for ; Wed, 21 Jul 2021 05:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229528AbhGUFFy (ORCPT ); Wed, 21 Jul 2021 01:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbhGUFFx (ORCPT ); Wed, 21 Jul 2021 01:05:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37C17C061574 for ; Tue, 20 Jul 2021 22:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3ILXClfUuTZ1MDh8PxJhABjxWJ9KLFYrL9TpGq8wtgg=; b=caX4qMnkfw/x9Jwgd5iRmIm/H+ hvyi3mOKR54OWTgz84hlEgsk2zIWQh40t/XeEb+6kX8gYUBEoDkGjoaedQFhQPNxwUuR7KyA8HWPL RM1nE4Rn7Iaj81YONChjgXLhWWEPxIqsNb+PdNMCQ2nySLphaCdAHbSI5BGdYp6mPsXmQwzvdW2ax tJlL8yLslmmu4OtkCaztP3/17OVlzbAbsiYRUU31ArsCjJRM0QvmOs+75eu0WnfUkBD8T+2gNe0gO 7T/dXeAifIloFSRffBTHvoFfl6KPvfHpzr0d2fSBF87UiZNWxpFsjT8pqWUyv+fwDs8TmpfVIJ/k0 NUH49d6A==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m653L-008qLF-Ue; Wed, 21 Jul 2021 05:45:59 +0000 Date: Wed, 21 Jul 2021 06:45:55 +0100 From: Christoph Hellwig To: Nirmal Patel Cc: Jon Derrick , linux-pci@vger.kernel.org Subject: Re: [PATCH v2 1/2] PCI: vmd: Trigger secondary bus reset Message-ID: References: <20210720205009.111806-1-nirmal.patel@linux.intel.com> <20210720205009.111806-2-nirmal.patel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720205009.111806-2-nirmal.patel@linux.intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Jul 20, 2021 at 01:50:08PM -0700, Nirmal Patel wrote: > +#define PCI_HEADER_TYPE_MASK 0x7f > +#define PCI_CLASS_BRIDGE_PCI 0x0604 Please use the existing definitions from pci_regs.h / pci_ids.h. > > +#define DEVICE_SPACE (8 * 4096) > +#define VMD_DEVICE_BASE(vmd, device) ((vmd)->cfgbar + (device) * DEVICE_SPACE) > +#define VMD_FUNCTION_BASE(vmd, device, fn) ((vmd)->cfgbar + (device) * (DEVICE_SPACE + (fn*4096))) Plase turn thos into readable inline functions and avoid the overly long lines. > + /* > + * Subdevice config space may or many not be mapped linearly using 4k config > + * space. > + */ Please avoid the overly long line, especially in a comment.