From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe002.messaging.microsoft.com [216.32.181.182]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 60908B6FF4 for ; Sat, 17 Mar 2012 07:42:47 +1100 (EST) Message-ID: <4F63A5BD.1090207@freescale.com> Date: Fri, 16 Mar 2012 15:42:37 -0500 From: Scott Wood MIME-Version: 1.0 To: Kumar Gala Subject: Re: [PATCH] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx References: <1328861387-31390-1-git-send-email-shuo.liu@freesacle.com> <2F2A8FBF-BD4D-4A53-A293-F5426F8C5BAA@kernel.crashing.org> In-Reply-To: <2F2A8FBF-BD4D-4A53-A293-F5426F8C5BAA@kernel.crashing.org> Content-Type: text/plain; charset="ISO-8859-1" Cc: linuxppc-dev@lists.ozlabs.org, r61911@freescale.com, "" , Zhao Chenhui List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 03/16/2012 03:35 PM, Kumar Gala wrote: > On Feb 10, 2012, at 2:09 AM, wrote: >> +static int is_in_pci_mem_space(phys_addr_t addr) >> +{ >> + struct pci_controller *hose; >> + struct resource *res; >> + int i; >> + >> + list_for_each_entry(hose, &hose_list, list_node) { >> + for (i = 0; i < 3; i++) { >> + res = &hose->mem_resources[i]; >> + if ((res->flags & IORESOURCE_MEM) && >> + addr >= res->start && addr <= res->end) >> + return 1; >> + } >> + } >> + return 0; > > just move this into fsl_pci_mcheck_exception() no need for a separate function. A separate function increases readability. -Scott