linux-mips
[Top] [All Lists]

Re: [RFC][PATCH 01/10] bcma: Use array to store cores.

To: "Hauke Mehrtens" <hauke@hauke-m.de>
Subject: Re: [RFC][PATCH 01/10] bcma: Use array to store cores.
From: "Arend van Spriel" <arend@broadcom.com>
Date: Mon, 6 Jun 2011 10:31:58 +0200
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, "zajec5@gmail.com" <zajec5@gmail.com>, "mb@bu3sch.de" <mb@bu3sch.de>, "george@znau.edu.ua" <george@znau.edu.ua>, "b43-dev@lists.infradead.org" <b43-dev@lists.infradead.org>, "bernhardloos@googlemail.com" <bernhardloos@googlemail.com>
In-reply-to: <1307311658-15853-2-git-send-email-hauke@hauke-m.de>
References: <1307311658-15853-1-git-send-email-hauke@hauke-m.de> <1307311658-15853-2-git-send-email-hauke@hauke-m.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) 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>