lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <bluehawk-msi-use-upper-lower-32@mdm.bga.com>
Date:	Mon, 05 Mar 2012 22:37:13 -0600
From:	Milton Miller <miltonm@....com>
To:	Mai La <mla@....com>
Cc:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Josh Boyer <jwboyer@...ux.vnet.ibm.com>,
	Matt Porter <mporter@...nel.crashing.org>,
	Tirumala R Marri <tmarri@....com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Michael Neuling <mikey@...ling.org>,
	Kumar Gala <galak@...nel.crashing.org>,
	Anton Blanchard <anton@...ba.org>,
	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	open-source-review@....com
Subject: Re: [1/2] powerpc/44x: Fix PCI MSI support for APM821xx SoC and Bluestone board

On Mon, 05 Mar 2012 about 17:29:41 -0000, Mai La wrote:
>  
> @@ -43,7 +43,12 @@
>  #define PEIH_FLUSH0	0x30
>  #define PEIH_FLUSH1	0x38
>  #define PEIH_CNTRST	0x48
> +
> +#ifdef CONFIG_APM821xx
> +#define NR_MSI_IRQS	8
> +#else
>  #define NR_MSI_IRQS	4
> +#endif
>  

does this need to go into the dts binding?

>  struct ppc4xx_msi {
>  	u32 msi_addr_lo;
> @@ -150,12 +155,11 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev,
>  	if (!sdr_addr)
>  		return -1;
>  
> -	SDR0_WRITE(sdr_addr, (u64)res.start >> 32);	 /*HIGH addr */
> -	SDR0_WRITE(sdr_addr + 1, res.start & 0xFFFFFFFF); /* Low addr */
> -
> +	mtdcri(SDR0, *sdr_addr, (u64)res.start >> 32);	/*HIGH addr */
> +	mtdcri(SDR0, *sdr_addr + 1, res.start & 0xFFFFFFFF);/* Low addr */

Please use upper_32_bits and lower_32_bits from linux/kernel.h

>  	msi->msi_dev = of_find_node_by_name(NULL, "ppc4xx-msi");
> -	if (msi->msi_dev)
> +	if (!msi->msi_dev)
>  		return -ENODEV;
>  
>  	msi->msi_regs = of_iomap(msi->msi_dev, 0);
> @@ -167,9 +171,12 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev,
>  		(u32) (msi->msi_regs + PEIH_TERMADH), (u32) (msi->msi_regs));
>  
>  	msi_virt = dma_alloc_coherent(&dev->dev, 64, &msi_phys, GFP_KERNEL);
> -	msi->msi_addr_hi = 0x0;
> -	msi->msi_addr_lo = (u32) msi_phys;
> -	dev_dbg(&dev->dev, "PCIE-MSI: msi address 0x%x\n", msi->msi_addr_lo);
> +	if (!msi_virt)
> +		return -ENOMEM;
> +	msi->msi_addr_hi = (u32)(msi_phys >> 32);
> +	msi->msi_addr_lo = (u32)(msi_phys & 0xffffffff);

ditto


milton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ