Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754873AbcDNMXI (ORCPT ); Thu, 14 Apr 2016 08:23:08 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37399 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754668AbcDNMXG (ORCPT ); Thu, 14 Apr 2016 08:23:06 -0400 MIME-Version: 1.0 In-Reply-To: <1460582816-12703-1-git-send-email-ddaney.cavm@gmail.com> References: <1460582816-12703-1-git-send-email-ddaney.cavm@gmail.com> From: Jinpu Wang Date: Thu, 14 Apr 2016 14:22:44 +0200 Message-ID: Subject: Re: [PATCH] pm80xx: Remove bogus address masking in pm8001_ioremap() To: David Daney Cc: lindar_liu , "James E.J. Bottomley" , "Martin K. Petersen" , pmchba@pmcs.com, linux-scsi@vger.kernel.org, "linux-kernel@vger.kernel.org" , David Daney 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: 1520 Lines: 35 On Wed, Apr 13, 2016 at 11:26 PM, David Daney wrote: > From: David Daney > > It is unclear what the original intent of the masking was, but it is > clearly incorrect to truncate a physical address before calling > ioremap(). On systems where there are valid physical address bits > above bit-31 (arm64 for example) the result is an eventual OOPs when > initializing the driver. > > Remove the bogus code to fix it. > > Signed-off-by: David Daney > --- > drivers/scsi/pm8001/pm8001_init.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c > index 062ab34..6bd7bf4 100644 > --- a/drivers/scsi/pm8001/pm8001_init.c > +++ b/drivers/scsi/pm8001/pm8001_init.c > @@ -418,8 +418,6 @@ static int pm8001_ioremap(struct pm8001_hba_info *pm8001_ha) > if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) { > pm8001_ha->io_mem[logicalBar].membase = > pci_resource_start(pdev, bar); > - pm8001_ha->io_mem[logicalBar].membase &= > - (u32)PCI_BASE_ADDRESS_MEM_MASK; > pm8001_ha->io_mem[logicalBar].memsize = > pci_resource_len(pdev, bar); > pm8001_ha->io_mem[logicalBar].memvirtaddr = > -- > 1.8.3.1 > Thanks, looks good to me. Acked-by: Jack Wang