[PATCH] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

Scott Wood scottwood at freescale.com
Sat Mar 17 07:42:37 EST 2012


On 03/16/2012 03:35 PM, Kumar Gala wrote:
> On Feb 10, 2012, at 2:09 AM, <shuo.liu at freesacle.com> <shuo.liu at freesacle.com> 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



More information about the Linuxppc-dev mailing list