From patchwork Tue Oct 28 05:48:47 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 6040 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id D7C9EDEE18 for ; Tue, 28 Oct 2008 16:51:33 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 2125EDE0CC; Tue, 28 Oct 2008 16:49:49 +1100 (EST) To: From: Benjamin Herrenschmidt Date: Tue, 28 Oct 2008 16:48:47 +1100 Subject: [PATCH 8/10] powerpc/pci: Fix unmapping of IO space on 64-bit In-Reply-To: <1225172895.217185.958686212130.qpush@grosgo> Message-Id: <20081028054949.2125EDE0CC@ozlabs.org> X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org A typo/thinko made us pass the wrong argument to __flush_hash_table_range when unplugging bridges, thus not flushing all the translations for the IO space on unplug. This causes the hypervisor to refuse unplugging slots. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/pci_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/kernel/pci_64.c 2008-10-28 16:33:48.000000000 +1100 +++ linux-work/arch/powerpc/kernel/pci_64.c 2008-10-28 16:38:45.000000000 +1100 @@ -426,7 +426,7 @@ int pcibios_unmap_io_space(struct pci_bu pci_name(bus->self)); __flush_hash_table_range(&init_mm, res->start + _IO_BASE, - res->end - res->start + 1); + res->end + _IO_BASE + 1); return 0; }