From: gabriel huau Date: Sun, 22 Jun 2014 09:56:45 -0700 Subject: [U-Boot] [PATCH v2] mx6: add support of multi-processor command In-Reply-To: <53A69E61.40003@myspectrum.nl> References: <1403375369-3882-1-git-send-email-contact@huau-gabriel.fr> <1403394920-632-1-git-send-email-contact@huau-gabriel.fr> <53A69E61.40003@myspectrum.nl> Message-ID: <53A70ACD.8070809@huau-gabriel.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Agreed, I'll submit a patch to fix that. Regards, Gabriel On 06/22/2014 02:14 AM, Jeroen Hofstee wrote: > 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 > >