|To:||"Hauke Mehrtens" <firstname.lastname@example.org>|
|Subject:||Re: [RFC][PATCH 01/10] bcma: Use array to store cores.|
|From:||"Arend van Spriel" <email@example.com>|
|Date:||Mon, 6 Jun 2011 10:31:58 +0200|
|Cc:||"firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>|
|User-agent:||Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20110424 Thunderbird/3.1.10|
On 06/06/2011 12:07 AM, Hauke Mehrtens wrote:
When using bcma on a embedded device it is initialized very early at boot. We have to do so as the cpu and interrupt management and all other devices are attached to this bus and it has to be initialized so early. In that stage we can not allocate memory or sleep, just use the memory on the stack and in the text segment as the kernel is not initialized far enough. This patch removed the kzallocs from the scan code. Some earlier version of the bcma implementation and the normal ssb implementation are doing it like this. The __bcma_dev_wrapper struct is used as the container for the device struct as bcma_device will be too big if it includes struct device.
Does this prevent using list_for_each() and friends to be used on the device list? If so, could you consider a different approach. There were good reasons to get rid of the bcma_dev_wrapper struct if I recall discussions on the mailing list correctly. I also see tendency to use ssb solutions without considering alternatives. For this particular example, please consider adding a bcma_zalloc(), which does kzalloc for non-embedded platforms and returns array pointers for embedded platform. You could also consider this behavior for the embedded bus only.
Gr. AvS -- Almost nobody dances sober, unless they happen to be insane. -- H.P. Lovecraft --
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [PATCH] Fix build warning of the defconfigs, Hans-Christian Egtvedt|
|Next by Date:||Re: [RFC][PATCH 10/10] bcm47xx: fix irq assignment for new SoCs., Sergei Shtylyov|
|Previous by Thread:||[RFC][PATCH 01/10] bcma: Use array to store cores., Hauke Mehrtens|
|Next by Thread:||Re: [RFC][PATCH 01/10] bcma: Use array to store cores., Rafał Miłecki|
|Indexes:||[Date] [Thread] [Top] [All Lists]|