Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp699099rdh; Wed, 14 Feb 2024 08:49:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUV6xXaPPGkCckZRBuLbsJlpzhfIZc+5BGGzHLRxjI+WNbFP96ytUCoEgPAUYZb7qhDT+GTRMjqWBRZhiLWcnCJxSO9r1EdX/qypbE4Dg== X-Google-Smtp-Source: AGHT+IGxF8CszbmvGpYlABQsEB7WaZFSh7600Ww4e5GeBDpccTWjAwyaBRTZuKXTTK2rmE8orKKG X-Received: by 2002:a17:907:105d:b0:a3d:5748:da37 with SMTP id oy29-20020a170907105d00b00a3d5748da37mr1517500ejb.33.1707929346063; Wed, 14 Feb 2024 08:49:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707929346; cv=pass; d=google.com; s=arc-20160816; b=OniGx48MOHnxZQ5ZKveqUHnpXiEuPeZWzByzZxe6mz4TlMhEYJeWA9mzFaPEmzOgLV +g+PhiMcNd4AVCqkwPV155XG13YdPZ4yx8+B8uQ8M0Y9r/FZ1ghFTwpKyeubd528vdNT sQ2ZD6oRmzMIDj1B7hEhM3y10zwEJHykM42ea0Pw7JyCZc1Q9bccI4kOW9Pa3ORXS5Cj mZEZ5oS6JQHUdrbCe9ll27fgk1CWjshmMvmhqmGx0vw8sJpOovQGCbAPra/KCqcA8EvC wd+NCysB+ZUHvRb7/46qdZ7nlc30FmR9VecRwLJI/FyUSXmt6XPlm42RG4sySc6jag+X 4RIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=D1Xkso4/luCnCKmls1XObu6mUiNp8i4jcJTznrQv8Nw=; fh=jY8X3D5ddSZUkSxxTE5HEIMNhXaQAO+BgsPYeRHORlQ=; b=02RGUDJ3tEP/Hvt28IVKLwWnE0PrMsmWUtCsgy7spKr/SIQjra8QkM54oo1jl6kAN9 gozc2F13x47kBhDNnhRNYmRh2oRwxb9hxDuYEZ9Ago03KElZuBFYYkepEG/mOH5VzO5e llea1Cni1jlSOX2o5wPFeuQujgwvulkNPMXwfYbEcYyqG+s95gaphbc/XMeycd4Hue4A 1B9PNT5I5v4twPCosrq2WxcilReRE7eMPefRxqLkzAvC5TCAW6Zobo9cbYFKqFs6e0TO 3Gnv6UpYkZx3Yp0n7is+WTL50lAiUPuNtPAg95VYQchsWMrMlscn4QLRmKlwmI1jnCOA Bovw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UJwLC3Nl; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-65584-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCXgfooTYAQ77Hopr2pPwehIzZvGFYawhFqOnYk7aZCiYFBLnZwXaZFpdQCkty44j6LC9iLLlIELa5VJaTWFdu1qxuD47eSZytpP6cbFbg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k13-20020a170906054d00b00a3d7050ccb0si146582eja.852.2024.02.14.08.49.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 08:49:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65584-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UJwLC3Nl; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-65584-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CC03A1F22F28 for ; Wed, 14 Feb 2024 16:49:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5031E604DC; Wed, 14 Feb 2024 16:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UJwLC3Nl" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7FC560273; Wed, 14 Feb 2024 16:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707929336; cv=none; b=Kt+ld7GXWAeENkM0nv3jX31er3vI7cIxjdKdzBeakl6cqInvpL/rmv230BToh2gLKmCuaIXGldvY1YVIMYIkLv44uRPrMHejHCn8yNjno4dslxW+siW3AA44I3MoTUQWan4TRBuAX1mxIrHu91vV5ka70mgaqNV8UxCWd+bcCJA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707929336; c=relaxed/simple; bh=NmM56gqPvUymNtGZLWDbLYuIQw40e9xCEmB6pNwzYbE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=PxlbPnpqBRetKYd01DcRpcxgnoY2rbYxXEAfSTuzS6eC+9E4+xbeZZo/UYo97/geeueSenqxObhEI1GltTWUPjvUpDCTLKKq1ggn5eezGNBsNCm5nqOFU8OrhhJ5XmGbkEFoeqfIN/To1v5c+QxhSDD8c2GrbfdShANq96h1HXA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=UJwLC3Nl; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F952C0005; Wed, 14 Feb 2024 16:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707929331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D1Xkso4/luCnCKmls1XObu6mUiNp8i4jcJTznrQv8Nw=; b=UJwLC3Nlmt0bX5sP8DqteDyKkHocT208N6iY6iwCQjGZvM/w/raRC6Z6u0GZvDlLlB7WiT e6Iq6q5lkA3NDDxu3e6VTZ3SuYafkYnaYvhT69fos5yQ/kpsFQSsH99X4Gxkpk9PwXspnE Eosba5GhY3zH8D8L4Y0dUSedb4ST5pvWvOF/L5nLG264pvtCXoInMXh3ES8NuMvVWL2iSZ BarDtR7VJzn2T/88ytOWk0o/O2zF0BA4FiCnU0dybZLGUqLtm3j2pwsbTFwHlX3ep4+d9e ceGEeiTNv0Zo3SJth1fPqh9WWDB1KUzAwMMoBgDv2gRpcPuh10MWWs6iEq0MOw== From: Gregory CLEMENT To: Thomas Bogendoerfer Cc: Paul Burton , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?utf-8?Q?Th=C3=A9o?= Lebrun , Thomas Petazzoni Subject: Re: [PATCH v7 03/14] MIPS: Allows relocation exception vectors everywhere In-Reply-To: References: <20240205153503.574468-1-gregory.clement@bootlin.com> <20240205153503.574468-4-gregory.clement@bootlin.com> Date: Wed, 14 Feb 2024 17:48:51 +0100 Message-ID: <87plwzj8jw.fsf@BL-laptop> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: gregory.clement@bootlin.com Thomas Bogendoerfer writes: > On Mon, Feb 05, 2024 at 04:34:49PM +0100, Gregory CLEMENT wrote: >> From: Jiaxun Yang >> >> Now the exception vector for CPS systems are allocated on-fly >> with memblock as well. >> >> It will try to allocate from KSEG1 first, and then try to allocate >> in low 4G if possible. >> >> The main reset vector is now generated by uasm, to avoid tons >> of patches to the code. Other vectors are copied to the location >> later. >> >> gc: use the new macro CKSEG[0A1]DDR_OR_64BIT() >> move 64bits fix in an other patch >> fix cache issue with mips_cps_core_entry >> rewrite the patch to reduce the diff stat >> Signed-off-by: Jiaxun Yang >> Signed-off-by: Gregory CLEMENT >> --- >> arch/mips/include/asm/mips-cm.h | 1 + >> arch/mips/include/asm/smp-cps.h | 4 +- >> arch/mips/kernel/cps-vec.S | 48 ++------- >> arch/mips/kernel/smp-cps.c | 171 +++++++++++++++++++++++++++----- >> 4 files changed, 157 insertions(+), 67 deletions(-) >> [..] >> diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c >> index dd55d59b88db3..f4cdd50177e0b 100644 >> --- a/arch/mips/kernel/smp-cps.c >> +++ b/arch/mips/kernel/smp-cps.c >> @@ -7,6 +7,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -25,7 +26,34 @@ >> #include >> #include >> >> +#define BEV_VEC_SIZE 0x500 >> +#define BEV_VEC_ALIGN 0x1000 >> + >> +#define A0 4 >> +#define A1 5 >> +#define T9 25 >> +#define K0 26 >> +#define K1 27 >> + >> +#define C0_STATUS 12, 0 >> +#define C0_CAUSE 13, 0 >> + >> +#define ST0_NMI_BIT 19 >> +#ifdef CONFIG_64BIT >> +#define ST0_KX_IF_64 ST0_KX >> +#else >> +#define ST0_KX_IF_64 0 >> +#endif > > please move this together with the other defines in arch/mips/kvm/entry.c > to a header file (arch/mips/include/asm/uasm.h sounds like a good fit). Jiaxun Yang sent a series to address it [1]. I managed to rebase my series on top of this one. Do you agree with these 8 patches? Can I send my next series with the assumption that it will be merged? Gregory 1: https://lore.kernel.org/linux-mips/20240209-regname-v1-0-2125efa016ef@flygoat.com/ -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com