Re: [PATCH v2] ARM: Avoid discarding sections that might have SMP_ON_UP fixups SMP_ON_UP fixups

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

 



On Thu, Jan 27, 2011 at 02:37:09PM +0000, Dave Martin wrote:
> On Wed, Jan 26, 2011 at 04:31:37PM -0500, Nicolas Pitre wrote:
> > Since discarded sections are by definition not used, we should at least 
> > put them into the .init section so to discard them at run time.  And 
> > only the EXIT_TEXT and EXIT_DATA would need to be kept (see x86 for 
> > example).
> > 
> > 
> > Nicolas
> 
> I'll check up on whether we need to care about writable data.
> For now I've just attempted to move stuff to .init.

You can keep the discarding of the unwind data for exit sections as
the exit sections don't depend on the unwind data.

It's all to do with sections being referenced from other sections.  If
a section being kept references a section being discarded, then the
linker will error out.  You need to keep any section that is being
referenced - but you don't need to keep sections which only reference
those being kept.

I'd also prefer to see a 'KEEP_EXIT' macro as I think we can discard
these sections in more cases than just SMP_ON_UP.  I think it's:

SMP_ON_UP && !DEBUG_SPINLOCK

which requires it.  So if you have spinlock debugging enabled you can
discard the exit sections.  See include/linux/spinlock.h.
--
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