Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbbHSGhk (ORCPT ); Wed, 19 Aug 2015 02:37:40 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:32856 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbbHSGhj (ORCPT ); Wed, 19 Aug 2015 02:37:39 -0400 MIME-Version: 1.0 In-Reply-To: <20150818041300.GX26431@google.com> References: <1438039809-24957-1-git-send-email-yinghai@kernel.org> <1438039809-24957-29-git-send-email-yinghai@kernel.org> <20150818041300.GX26431@google.com> Date: Tue, 18 Aug 2015 23:37:38 -0700 X-Google-Sender-Auth: oefgbeLZUj_vya1-LZiNlPAfFYY Message-ID: Subject: Re: [PATCH v3 28/51] PCI: Unifiy calculate_size for io port and mmio From: Yinghai Lu To: Bjorn Helgaas Cc: David Miller , Benjamin Herrenschmidt , Wei Yang , TJ , Yijing Wang , Andrew Morton , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1330 Lines: 34 On Mon, Aug 17, 2015 at 9:13 PM, Bjorn Helgaas wrote: > On Mon, Jul 27, 2015 at 04:29:46PM -0700, Yinghai Lu wrote: >> We should check size+size1 with min_size for io port. >> For example, when hotplug bridge has two children bridges, >> every child bridge will need 0x1000, so size1 will be 0x2000 >> and size is 0. The min_size for the hotplug bridge is 0x100. > > A min_size of 0x100? Is that a typo? yes, it is 0x100. #define DEFAULT_HOTPLUG_IO_SIZE (256) /* pci=hpmemsize=nnM,hpiosize=nn can override this */ unsigned long pci_hotplug_io_size = DEFAULT_HOTPLUG_IO_SIZE; and we have if (bus->self->is_hotplug_bridge) { min_io_size = pci_hotplug_io_size; > >> with old version calculate_iosize, we get 0x3000 for final >> size because we are using size to compare with min_size. That is >> not right, we should use 0x2000 instead. > > If this fixes a bug, please make one patch that *only* fixes the bug, > and a separate one that unifies but doesn't change the behavior. ok, will separate it into two. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/