RE: [PATCH 11/13] OMAP: create omap_devices for MPU, DSP, L3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Jun 2010, Shilimkar, Santosh wrote:

> > -----Original Message-----
> > From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of Paul
> > Walmsley
> > Sent: Thursday, June 24, 2010 11:57 AM

> > > +struct device *omap_get_mpu_device(void)
> > > +{
> > > +	mpu_dev = per_cpu(mpu_dev, smp_processor_id());
> > 
> > Looks like this will trash the per-CPU mpu_dev on SMP.  You'll need to
> > rename one of these two mpu_devs.
> > 
> > Also, won't the use of smp_processor_id() mean that this will just return
> > the struct device * for the MPU that is running this code?  So on a
> > two-CPU system, it would be either CPU 0 or 1, randomly.  I guess one
> > solution would be to pass in the processor ID to omap_get_mpu_device().
> >
> MPUSS and both CPU's are clocked from same clock source, so above assumption
> still work on OMAP4.

If the point is to only return an omap_device corresponding to the MPU 
subsystem, then all the per_cpu() stuff is unnecessary and can be dropped, 
and the function should be so named (e.g., omap_get_mpuss_device()).


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux