From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Thu, 8 Apr 2021 10:43:01 +0800 Subject: [PATCH 07/17] x86: Update the MP constants to avoid conflicts In-Reply-To: <20210407043228.2268429-7-sjg@chromium.org> References: <20210407043228.2268429-1-sjg@chromium.org> <20210407043228.2268429-7-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Apr 7, 2021 at 12:33 PM Simon Glass wrote: > > These constants conflict with error codes returned by the MP > implementation when something is wrong. In particular, mp_first_cpu() > returns MP_SELECT_BSP when running without multiprocessing enabled. > Since this is -2, it is interpreted as an error by callers, which > expect a positive CPU number for the first CPU. > > Correct this by using a different range for the pre-defined CPU > numbers, above zero and out of the range of possible CPU values. For > now it is safe to assume there are no more than 64K CPUs. > > This fixes the 'mtrr' command when CONFIG_SMP is not enabled. > > Signed-off-by: Simon Glass > --- > > arch/x86/include/asm/mp.h | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > Reviewed-by: Bin Meng