Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp304049lqo; Thu, 9 May 2024 23:29:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVq4KpIVxbFr5bdKH0vIVYX+x+WcI19oD/vruloNtCDTqCFvIiwgV3c5xYnXmzYTjUBENDJUY1YsoS46xaH1d7wDWhkOQrLWDXAlWCmIQ== X-Google-Smtp-Source: AGHT+IG3FZjBd4qulBbtcwybA7VU1re5Dn/KteH/vKHCGapW+TQoU6uEj6M7NjvKhSSRoOT1f9FJ X-Received: by 2002:a17:902:ce91:b0:1eb:1c47:50d1 with SMTP id d9443c01a7336-1ef441613f8mr18240195ad.69.1715322564069; Thu, 09 May 2024 23:29:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715322564; cv=pass; d=google.com; s=arc-20160816; b=C/16brB6sse6Qccxs5RIf4ndH7d2d7pi/Ckd6oim2OGYR8YY9nrCdnBD66C1zE78AC bRbYmLnVmUGLyOVkb3PesQGTFnqXwUVOoXfT9LBGWSq57BV49cDycZQ9EfNL8pNmZ3IT dlAQeLJkLuEbjAV+rDUZBHiXv4wHNmkY6sw2JahdXqnAQBDfjD5g2lw1VtPb4URdcyP4 JCBaIrbOg5i8uoIGrCMP5kkH1/z1VKTXgafxJ7sl5iXVXpfaytWYBUtAS9aUs/tEWdHo TLSiSTT3iNkQyLRoPZ8+8jnM20aFC32ZrGmkX65GzowFBU/DoD1GYfGf6/3tGYa08jgY 68KQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :dkim-signature:dkim-signature:from; bh=1sssw5A/ygmjEBxrlSd+7ue0RV3n8+xaY+HzQNbRFGM=; fh=8eVhtEKG9nNQVrYy5mUyY8MxQMB5T6hiievcYor8Kok=; b=Usl3lbJirG2Ood5i4/l828KQPkCfEfK4RlRgI+tYxrvx6q7o1lK18vlexmPruA8R+Q yjumxQ46u9Ep7Twp8NVjY59G9gCarr2b7+fSlFz8jnnMqleJNKNBpoe+Le+h34w4DZXX k0baW2jNY0iUMQuhcTzHzzjB/hDRjhxuIEgVUJgjNPlE19c6jpF5ZOHvxMtEphH9Y413 38UX51tHNKvHFBYFwy6UupQ0Y9HrYrcRFl8MQ+zLRMi91sRUmJ0GMrF/ZNLJ+Ne1Lexl IfDSr6Pf/DRr+aungNeuEX7oNCmuVEoaXZj9l06J4ilfDErWPkpQ0Cad49H7/twOzDcQ 1VIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LZmENFvc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-175328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9cf88bsi31129355ad.61.2024.05.09.23.29.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 23:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LZmENFvc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-175328-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175328-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 87490B21497 for ; Fri, 10 May 2024 06:29:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C94616132C; Fri, 10 May 2024 06:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LZmENFvc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PR7hUigL" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 3A2D0153BE2 for ; Fri, 10 May 2024 06:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715322536; cv=none; b=NZi/XA+ETUy/0+qkmKEgix//jXos7KFAkypJkQQKswWYnZWPeVGJTFbIhVJsmbScGUp3XzRJ55pOWpin2yrA9FqIZJjqyl0jt9txHYDBXllKHO2bF7JetMhoQ8/Bo+ODswYAKRwTxIr+72yCwLvl8vUSwRiQ+O19lC49RK+nF9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715322536; c=relaxed/simple; bh=jvk7b0LQDo86RhaoPKvODKD7tH5jMXWL2BeqHj+GO3w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Nss45YE35XpVYzyFnWIFzzPIvQkxgtJmVZSuGnG6m3f0WXtMv0ABQs7HPCWtxrzqVZi2R1+dP3uHAaKUb+uoAAko0myUH9gOaG9raaf8avBbmoN3fHtcGEIAlbVHmj4IXurhpMOmS/+s4t8IGQMnTTeON4m0yn7IATXmRGr8PHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LZmENFvc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PR7hUigL; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715322531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1sssw5A/ygmjEBxrlSd+7ue0RV3n8+xaY+HzQNbRFGM=; b=LZmENFvc4euk2x3YKMDS4vZQ6njaWRRmcZhRv6mhgQDO9hm76yMnLcLAclJllAXzEWI+R8 DjMXMIQbAuNWUQU6RCme2fe+8LD7SJDor0843GvNcpMwBb9sA10gR33A6RNLBltUFyLQlt lKjiK2m6Ogj39GjYZoyhpfijSF4dbf+9rLTNVsC7in6cDBJABquEZBCCWiUZ32OUd6qtHo k53H64a5hACVKj3W1eCC8TxXG5DPJVaWvnDRArrrvRJi2mOC8JhxiaUGRLmDCAtk2/P/nd zz7c/qo+lPNtYH4bWk6rEBoDWA/SU1RAdM6Mn4T6/KIspEl0mCl5JP29Ao7/tQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715322531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1sssw5A/ygmjEBxrlSd+7ue0RV3n8+xaY+HzQNbRFGM=; b=PR7hUigLr/KX3+deEvAwKob4CebeKY++2BeuPPXpRSX1LmYFaGaHGKwQ9QYnLsI910absd h8W+VHwpLEyX2eBg== To: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Nam Cao Subject: [PATCH 0/7] remove size limit on XIP kernel Date: Fri, 10 May 2024 08:28:38 +0200 Message-Id: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, For XIP kernel, the writable data section is always at offset specified in XIP_OFFSET, which is hard-coded to 32MB. Unfortunately, this means the read-only section (placed before the writable section) is restricted in size. This causes build failure if the kernel gets too large. This series remove the use of XIP_OFFSET one by one, then remove this macro entirely at the end, with the goal of lifting this size restriction. Also some cleanup and documentation along the way. This series depends on https://lore.kernel.org/linux-riscv/20240508191917.2892064-1-namcao@linutronix.de/ to apply cleanly, and also depends on https://lore.kernel.org/linux-riscv/20240508173116.2866192-1-namcao@linutronix.de/ which fixes a boot issue. Best regards, Nam Nam Cao (7): riscv: cleanup XIP_FIXUP macro riscv: replace va_kernel_pa_offset with va_kernel_data_pa_offset on XIP riscv: drop the use of XIP_OFFSET in XIP_FIXUP_OFFSET riscv: drop the use of XIP_OFFSET in XIP_FIXUP_FLASH_OFFSET riscv: drop the use of XIP_OFFSET in kernel_mapping_va_to_pa() riscv: drop the use of XIP_OFFSET in create_kernel_page_table() riscv: remove limit on the size of read-only section for XIP kernel arch/riscv/include/asm/page.h | 25 ++++++++++++++++++------ arch/riscv/include/asm/pgtable.h | 18 +++++++---------- arch/riscv/include/asm/xip_fixup.h | 30 +++++++++++++++++++++++------ arch/riscv/kernel/vmlinux-xip.lds.S | 4 ++-- arch/riscv/mm/init.c | 11 +++++++---- 5 files changed, 59 insertions(+), 29 deletions(-) -- 2.39.2