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

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

 



> -----Original Message-----
> From: Paul Walmsley [mailto:paul@xxxxxxxxx]
> Sent: Thursday, June 24, 2010 12:50 PM
> To: Shilimkar, Santosh
> Cc: Kevin Hilman; linux-omap@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH 11/13] OMAP: create omap_devices for MPU, DSP, L3
> 
> 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()).
> 
Indeed !!
Even otherwise the patch is not really initializing per-cpu device because
init(omap_hwmod_for_each_by_class("mpu", _init_omap_device, &mpu_dev);)
is called only on one CPU.

Regards,
Santosh
--
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