From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6262CB6EF4 for ; Sat, 17 Mar 2012 08:03:18 +1100 (EST) Subject: Re: [PATCH] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Kumar Gala In-Reply-To: <4F63A5BD.1090207@freescale.com> Date: Fri, 16 Mar 2012 16:03:10 -0500 Message-Id: <3F0C165C-B018-4751-97FD-557C36FC40B6@kernel.crashing.org> References: <1328861387-31390-1-git-send-email-shuo.liu@freesacle.com> <2F2A8FBF-BD4D-4A53-A293-F5426F8C5BAA@kernel.crashing.org> <4F63A5BD.1090207@freescale.com> To: Scott Wood 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 Mar 16, 2012, at 3:42 PM, Scott Wood wrote: > 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 =3D 0; i < 3; i++) { >>> + res =3D &hose->mem_resources[i]; >>> + if ((res->flags & IORESOURCE_MEM) && >>> + addr >=3D res->start && addr <=3D = res->end) >>> + return 1; >>> + } >>> + } >>> + return 0; >>=20 >> just move this into fsl_pci_mcheck_exception() no need for a separate = function. >=20 > A separate function increases readability. >=20 > -Scott I'll accept that. - k=