From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Sun, 22 Jun 2014 11:14:09 +0200 Subject: [U-Boot] [PATCH v2] mx6: add support of multi-processor command In-Reply-To: <1403394920-632-1-git-send-email-contact@huau-gabriel.fr> References: <1403375369-3882-1-git-send-email-contact@huau-gabriel.fr> <1403394920-632-1-git-send-email-contact@huau-gabriel.fr> Message-ID: <53A69E61.40003@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Gabriel, On 22-06-14 01:55, Gabriel Huau wrote: > This allows u-boot to load different OS or Bare Metal application on the > different cores of the i.MX6DQ. > For example: we can run Android on cpu0 and a RT OS like QNX/FreeRTOS on cpu1. > > Signed-off-by: Gabriel Huau funny.. > +int is_core_valid(unsigned int nr) > +{ > + if (nr < 0 || nr >= CONFIG_NUM_CPUS) > + return 0; > + > + return 1; > +} > + > I am not sure if u-boot has rules for it, but personally I would prefer not to test values which are obvious unsigned for negativity, since it causes unnecessary noise when compiling u-boot with W=1, W=2. Regards, Jeroen