Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp541287lqp; Wed, 12 Jun 2024 08:56:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXo15PQjy0pTgT4F1th7TJGgU0ehxyPKPbW1wMAEfuCG9Ou4/HqBJO7ed6CW022TE6SdrOgD8DgMZhp0APAeXdK4NHXTBuk1OFb9roScA== X-Google-Smtp-Source: AGHT+IEChRTWgIhtGTU2rV/FrrjKF1lAt1eavryfIenjiT07sJ8ZqW4RP4J6SFJ7k0VO13otGfcY X-Received: by 2002:a05:6a00:8901:b0:704:1a2d:4a0a with SMTP id d2e1a72fcca58-705c935cf45mr64734b3a.1.1718207792834; Wed, 12 Jun 2024 08:56:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718207792; cv=pass; d=google.com; s=arc-20160816; b=fJcQWejiKbO13VBgQTeiL8IkBVGBECGtJ03Xbo4RAaGHPziJwghsnaH2wxLOBlJYVG mg0s7nKOaE2aTKRtBeSFC/lCQSEFguZ3T40cdSzMeqKmSzvvLaZN6qtFYqXxLxIWnPVx /XacD3kU7eqvv9WwGwuz8UffZu2LtjQA12ypZYeluHW9q8xtSqjb5lNbN1IBYNvgEKRX DtHdQ/DANghwimcuMw2LlZMNr3duaFY5kMMRk0iSMyaoW0a8ysrKwKnMCZzpqMYH3CR8 QcxhGWtrq0B8QjivmfSrDli6vZ4VbcZQMwmiMHacl+W7OTIXE95plRdQKcfIq0rCTXPb jXzQ== 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:references:in-reply-to:message-id :subject:cc:to:from:date; bh=xvCpSlYeXJn8XcbehAUBlCctR5OajRR7DCr51yaClW4=; fh=dVhZfHRbgc09+OIZzK7+Dbg7ckoy+986xM9UGaoG3Mw=; b=Rbv1P/0jX/cz91rvSkT05Lfo6W/UqAWUV0wzzyAi4pfdtPNdAEA/mq85T/8H4erjdH Ib8LRFe4dpDs25o33FAaVKWAThBAvcriMbJCN6G1UmmISYQYfx7BtKCqGHWvbeQTka1G aBUUz7Dp4r5ynDZdLbvEU04WEzNKoAWyB4gX8I0Pglt1xj4T9tlRsWem0efs/zbXAyS6 cfBQpwuLyyz6EHxj0fGAJHpcUJCvP1u6VenWl/NA0g8ZqNqEN4iTw9kx/QCqYsPllMTi A3eE0AwPz4Ie5PWDZQnRyzoOfmKBkwvNGvhilh7EpuZ8ZjIakrmXLor0S/M8WcB162Ys mFYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-211788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211788-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705be07843bsi1575127b3a.262.2024.06.12.08.56.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:56:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211788-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; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-211788-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211788-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B3C71B241B8 for ; Wed, 12 Jun 2024 15:29:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ED2617FAA2; Wed, 12 Jun 2024 15:28:58 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9500917BB23; Wed, 12 Jun 2024 15:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718206137; cv=none; b=WwIrWPyusmjauvcPBq7YHXzHCaoi1JMoZeq0sYUIIE7sF1kilpE3YHV8pPYIsWYrKnhDssv6FIpM0i4gO3Ev4zOoDjtvKLq28ZEDIDTUZiMtpN9ko/PLS3T0sP7vn3V0OEL13dqtSq8d1T/hqZYt1wBM5lcPbT/dNx4RMvq1dpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718206137; c=relaxed/simple; bh=kQiMBK0k+rNB4ZdfcI9TBy6/0Qf552LfdY4dS6LInZI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HqaGygsiOm+Tk0nFeOaYQRBZFM6IfnZmlQyPgucuw1xX+cgOav2tV66SiMG7UI+41Ukn+QgRAwXYt6qyFrJePp7Tm3EpcJb1Th+4DYhRe494YMbpuLo1zwEN8Te5/1kRjROMvEpmTicTz2Ku40tQKr6BBZEr9Oedd+HxwtzmfZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26A4BC116B1; Wed, 12 Jun 2024 15:28:53 +0000 (UTC) Date: Wed, 12 Jun 2024 11:28:51 -0400 From: Steven Rostedt To: Wei Yang Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org, Guenter Roeck , Ross Zwisler , wklin@google.com, Vineeth Remanan Pillai , Joel Fernandes , Suleiman Souhlal , Linus Torvalds , Catalin Marinas , Will Deacon , Ard Biesheuvel , Mike Rapoport Subject: Re: [PATCH v2 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up Message-ID: <20240612112851.17664dab@rorschach.local.home> In-Reply-To: <20240612073049.xof3ciae2x5qjp6a@master> References: <20240606150143.876469296@goodmis.org> <20240606150316.751642266@goodmis.org> <20240612073049.xof3ciae2x5qjp6a@master> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Wed, 12 Jun 2024 07:30:49 +0000 Wei Yang wrote: > >+/* Add wildcard region with a lookup name */ > >+static int __init reserved_mem_add(unsigned long start, unsigned long size, > >+ const char *name) > >+{ > >+ struct reserve_mem_table *map; > >+ > >+ if (!name || !name[0] || strlen(name) >= RESERVE_MEM_NAME_SIZE) > >+ return -EINVAL; > >+ > >+ if (reserved_mem_count >= RESERVE_MEM_MAX_ENTRIES) > >+ return -1; > > Another thing come to my mind: could we specify several reserve_mem on the > command line? Yes, in fact I have this on my command line that I test with: reserve_mem=2M:0:oops ramoops.mem_name=oops ramoops.console_size=0x100000 reserve_mem=12M:4096:trace trace_instance=boot_mapped@trace > > If so, we may need to check whether names conflict. Yeah, I can add that. Thanks, -- Steve