Received: by 10.223.176.5 with SMTP id f5csp1219866wra; Fri, 2 Feb 2018 13:22:32 -0800 (PST) X-Google-Smtp-Source: AH8x225SOFabqZG+0QIgaWtlX8AwVnITCafFyK4Arb2ZZ/BP8JZlKDEMevfMEgpJtJm+woCfi9Js X-Received: by 2002:a17:902:5aca:: with SMTP id g10-v6mr20550181plm.334.1517606552224; Fri, 02 Feb 2018 13:22:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517606552; cv=none; d=google.com; s=arc-20160816; b=RSTqVPfWjavkKyHm6bq331Hf1KL+VWklY5YqbO4rjpgl2VH4sFS0g3SquhoBSQfVb+ 4wMqkJjWbDd8C8GO0glXHiS4AmKpxRDqp8GFnabr892sZeWR1sGjFNR4rrBs2CIPo32+ ArQu7w0mHgyTDoYt//Josc7UbWYL2T/w+EFx/oRxchwCu39LU/gzrOzxnwgNMifgRxpP ZamYh3NYp3GOjq2JNCCb3hKHkhTwNhnl4BYhoLtrX3v6Gv3rX5tLX+6YSw9eeqfOJPyY P2Ts2uQLPCEQi5ezNO7Sf31vAWzJpdlvLP6xWOgpRwf4Io0Ej9FGyy7UKAkvn6q/t8ub nN/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=0Z3ywNVGa6xtn8MCp+tc+SkpR5wbSmwighWc/AX9AdI=; b=sLAewJd2GZEU3NtCWGqmdDkXN3HYq9Z4/pOj0pZASqIfIZrn9lH0E74m0bBMa/C6Gg wQoFuC1dwIgAMl0dG22fbbyhHLpS6FgHVXR0TUmeof46skVrVRN+ra/vn+/3TYGxlQNd 2zhnuePKmW2gmotXt9RZgMf0Hx1sd0wPQlU/EaFfQwSWtBuW003NniDQfLOAcdDSuB6a rc0Z55quMGYUyZq50d/4C1p5LLR47Smy2L82SRILcQbgj5BYp7ntRQLTVeY+SpJcI7ZD 9XM75/zhGJWjWK86EhS9hAqUXKeDGcC5tToUOXBPdrjUo4+TdXIPE0MWHbZ1ozIuTN6B y4zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T5F2C/m4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l91-v6si476419plb.266.2018.02.02.13.22.16; Fri, 02 Feb 2018 13:22:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T5F2C/m4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649AbeBBUu2 (ORCPT + 99 others); Fri, 2 Feb 2018 15:50:28 -0500 Received: from mail-qt0-f169.google.com ([209.85.216.169]:36686 "EHLO mail-qt0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbeBBUuV (ORCPT ); Fri, 2 Feb 2018 15:50:21 -0500 Received: by mail-qt0-f169.google.com with SMTP id z11so32591245qtm.3 for ; Fri, 02 Feb 2018 12:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0Z3ywNVGa6xtn8MCp+tc+SkpR5wbSmwighWc/AX9AdI=; b=T5F2C/m43aAiczqkMExa5gTZWscoIYL5IVuZA7Y1Ga9oM0hZrm/CZzs1OetxP+ar/6 OE8KVFvPnVf1+4q2vNgnPVMKYQC5tgN8KrDQAzH4TeEtNN2TxUI/rVgpz6fOoO6+jFrX O4wVs60pmLFxkEa5bbvwWFGcYH+0viIdShyDvW6o/R23SkY3BV77N0KCK3ag4wWo+vrF JD5QG7hRukeS8JFmc2cDjIbvrLGccG85GTdVv+YjXuhLLqPazlo/y1qaPeZQfVHfIUbC lbqtAOradV3mqVD5R6MQ69Zqj9NHw8aJFb5yaNo2m48O3dZxIX9QDVy3Lr9bv9TBkVn6 b/Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0Z3ywNVGa6xtn8MCp+tc+SkpR5wbSmwighWc/AX9AdI=; b=Ut+0BuJ03mzdHS0pCtXQzQ2UPpee5zWuc78uT3/Zo7J9NgOynRzdw7eD5P2uj5wZ87 8GIabZ+FHh7NT/hZ0Rqa9193l0rk78z+WYdv/bGyY988YwRUn5vaPI9QfkzqZRh/l5Zi alfSI5lDWUHVEyZ9LqnyJ7EJ1kAA+5hIEQbm7ks80GuPkHxN5iyd68nNC0FQ0kn8l5AO ioqyxE9pFkY3T+cY/TgWsck62fl6XL2fkWJFBjDPPyRRzJq84A0ZO53sKihY8iAPy2ov 3Z7+FHMJNv884GtSuG0XWuw2WQCagrH7nMXCa9UomXQVsoFU9Oo7S+POP2J9XGlD4KqU DbIw== X-Gm-Message-State: APf1xPDc6qpGnIYbFg7AyBNWcWUvjvA1/XrXg2wYj2EXZDXtVmJMkd11 qTirVjwKNis4ezcKN0xQXg1EvFuXcaXdWJwau8w= X-Received: by 10.237.32.68 with SMTP id 62mr5571976qta.340.1517604621195; Fri, 02 Feb 2018 12:50:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.175.35 with HTTP; Fri, 2 Feb 2018 12:50:20 -0800 (PST) In-Reply-To: <20180201231313.28458-1-jschoenh@amazon.de> References: <20180201231313.28458-1-jschoenh@amazon.de> From: Andy Shevchenko Date: Fri, 2 Feb 2018 22:50:20 +0200 Message-ID: Subject: Re: [PATCH] x86: e820: Implement a range manipulation operator To: =?UTF-8?Q?Jan_H=2E_Sch=C3=B6nherr?= Cc: Ingo Molnar , Thomas Gleixner , x86@kernel.org, "H. Peter Anvin" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 2, 2018 at 1:13 AM, Jan H. Sch=C3=B6nherr = wrote: > + [KNL,ACPI] Convert memory within the specified re= gion > + from to . If "-" is l= eft > + out, the whole region will be marked as = , > + even if previously unavailable. If "+" i= s left > + out, matching memory will be removed. Types are > + specified as e820 types, eg, 1=3D=3DRAM, 2=3D=3Dr= eserved, > + 3=3D=3DACPI, 12=3D=3DPRAM. s/=3D=3D/ =3D /g > + } else if (*p =3D=3D '%') { > + enum e820_type from =3D 0, to =3D 0; > + > + start_at =3D memparse(p + 1, &p); > + if (*p =3D=3D '-') > + from =3D simple_strtoull(p + 1, &p, 0); > + if (*p =3D=3D '+') > + to =3D simple_strtoull(p + 1, &p, 0); > + if (*p !=3D 0) if (*p) or if (*p !=3D '\0') ? > + return -EINVAL; > + if (from && to) > + e820__range_update(start_at, mem_size, from, to); > + else if (to) > + e820__range_add(start_at, mem_size, to); > + else if (from) > + e820__range_remove(start_at, mem_size, from, 1); > + else > + e820__range_remove(start_at, mem_size, 0, 0); --=20 With Best Regards, Andy Shevchenko