From patchwork Fri Apr 18 12:19:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 340290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 340471400EF for ; Fri, 18 Apr 2014 22:21:03 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750857AbaDRMUu (ORCPT ); Fri, 18 Apr 2014 08:20:50 -0400 Received: from top.free-electrons.com ([176.31.233.9]:33080 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752123AbaDRMUF (ORCPT ); Fri, 18 Apr 2014 08:20:05 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 6E793857; Fri, 18 Apr 2014 14:20:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 173937D6; Fri, 18 Apr 2014 14:20:08 +0200 (CEST) From: Thomas Petazzoni To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Bjorn Helgaas , linux-pci@vger.kernel.org, Thomas Gleixner Cc: Tawfik Bayouk , Nadav Haklai , Lior Amsalem , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Jason Gunthorpe , Neil Greatorex , Willy Tarreau , Matthew Minter , Subject: [PATCH 6/7] bus: mvebu-mbus: allow several windows with the same target/attribute Date: Fri, 18 Apr 2014 14:19:52 +0200 Message-Id: <1397823593-1932-7-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1397823593-1932-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1397823593-1932-1-git-send-email-thomas.petazzoni@free-electrons.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Having multiple windows with the same target and attribute is actually legal, and can be useful for PCIe windows, when PCIe BARs have a size that isn't a power of two, and we therefore need to create several MBus windows to cover the PCIe BAR for a given PCIe interface. Fixes: fddddb52a6c4e2438f4514ed979183653ca0732a ('bus: introduce an Marvell EBU MBus driver') Cc: # v3.10+ Signed-off-by: Thomas Petazzoni Tested-by: Neil Greatorex --- drivers/bus/mvebu-mbus.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index afee0f7..00b7344 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -223,12 +223,6 @@ static int mvebu_mbus_window_conflicts(struct mvebu_mbus_state *mbus, */ if ((u64)base < wend && end > wbase) return 0; - - /* - * Check if target/attribute conflicts - */ - if (target == wtarget && attr == wattr) - return 0; } return 1;