Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp198839rdb; Thu, 21 Dec 2023 06:56:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQpf0vwn0MyMlG+TzgSJJgwLKXHRMhLd13qlLe7mBGMmUuLjjopz8ZPM73MhAjXIpgL5Xq X-Received: by 2002:a9d:7f14:0:b0:6b9:dc90:8a85 with SMTP id j20-20020a9d7f14000000b006b9dc908a85mr20270709otq.24.1703170576244; Thu, 21 Dec 2023 06:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703170576; cv=none; d=google.com; s=arc-20160816; b=Xqv+u/c1llCyEEkbXq4u1mvvDa5A+ZmZmlMfH+AhsgS6RdBqwO3G+vWWRxIzOfHRT1 Hv2bhwpkQgUcYSklf1Q68lKKMqG71hkzZosHRaWVg385WJSe5qk5OkDLWji8xEH+DViy eqjHgVSAM7xZGwQO/RGV04niT/KvCyunKXStuw08KY5YMm8c/hrCkqPlrT+ohLDj/ZY4 57GpOA4PtzheBxZf9sI9gJ1xb6N9okCooRbVT8hNFBEfDaf05Li6bKgRsFrap++rrB3h OKhYhQXgIi5uIMu8PDqYL+AOBXl+kmQs9AMFD+xrz23L1/hhPbshvTmHsxDTqHW7mzsC Ud8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=HR6K3s7pVGhZ6HCBkA+SXG4yZs2vSIkftIqViYIJ0Ts=; fh=BZBCrOfT6A24b+/QLhi9VmN/KAYJr7cOnYiqlpKU08E=; b=gYJ8DEltOHQxsDs4p9DP59RKt1lBISxtVbHlOLNimqZ/yQJeJg/gt6YApToKRbVayp MroUL2Ou+PRK7aJWOOP1uPQV+DWMy7xHNU5EU+wi7We0jRUxOfsdcc/4/VV932rMzxsM bGfoUdh/mRfg6SUWAY4P43QsnfhgxlDrvvwTtHT0eO+f7B+O5rbSX11K8WCpoy0mzKww s+rm8mE+2+Xj9PJ5ohb2d7i8zFuP7nHbR0xEJwGXp5dkP3HOHXu+S+MxyP0omQMhNB+U b+iNemIwSJ0CuY1xY0oeRxQh0olF7DOi7E8KPDs5ey/e0KFQC/SN3fNlU8RQn1hrQTev d8RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8595-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k3-20020ac85fc3000000b00425895963ddsi2276097qta.411.2023.12.21.06.56.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8595-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8595-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 008531C2308F for ; Thu, 21 Dec 2023 14:56:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80CFF4AF75; Thu, 21 Dec 2023 14:56:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96B56360AD; Thu, 21 Dec 2023 14:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rGKSq-0002PR-00; Thu, 21 Dec 2023 15:55:56 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id D7761C0A1E; Thu, 21 Dec 2023 15:55:43 +0100 (CET) Date: Thu, 21 Dec 2023 15:55:43 +0100 From: Thomas Bogendoerfer To: Gregory CLEMENT 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 , =?iso-8859-1?Q?Th=E9o?= Lebrun , Thomas Petazzoni Subject: Re: [PATCH v5 00/22] Add support for the Mobileye EyeQ5 SoC Message-ID: References: <20231212163459.1923041-1-gregory.clement@bootlin.com> <878r5vctdg.fsf@BL-laptop> <87frzwasxo.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; charset=us-ascii Content-Disposition: inline In-Reply-To: <87frzwasxo.fsf@BL-laptop> On Thu, Dec 21, 2023 at 08:57:55AM +0100, Gregory CLEMENT wrote: > I do not oppose the addition of a new platform, even though, like > Jiaxun, I would prefer to avoid duplicating code. The only thing > preventing the use of the same kernel for EyeQ5 and other platforms is > the starting address. there shouldn't be code duplication. My rough idea would be something like diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild index af2967bffb73..d683993ed331 100644 --- a/arch/mips/Kbuild +++ b/arch/mips/Kbuild @@ -17,6 +17,7 @@ obj- := $(platform-y) # mips object files # The object files are linked as core-y files would be linked +obj-y += generic/ obj-y += kernel/ obj-y += mm/ obj-y += net/ diff --git a/arch/mips/generic/Makefile b/arch/mips/generic/Makefile index e37a59bae0a6..56011d738441 100644 --- a/arch/mips/generic/Makefile +++ b/arch/mips/generic/Makefile @@ -4,9 +4,9 @@ # Author: Paul Burton # -obj-y += init.o -obj-y += irq.o -obj-y += proc.o +obj-$(CONFIG_MACH_GENERIC_CORE) += init.o +obj-$(CONFIG_MACH_GENERIC_CORE) += irq.o +obj-$(CONFIG_MACH_GENERIC_CORE) += proc.o obj-$(CONFIG_YAMON_DT_SHIM) += yamon-dt.o obj-$(CONFIG_LEGACY_BOARD_SEAD3) += board-sead3.o so everyboady needing these parts of a generic kernel is able to take it. > Therefore, if it were possible to have a relocatable kernel, this > issue would disappear. yes. There is support for relocatable kernel, so what are we missing there ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]