Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4541221pxj; Tue, 8 Jun 2021 17:27:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBWshmpX86KJgsWfhdJzykmU9H2lBbB0qVqNZ7k2p6qrOr7WsLkhYXbEuJUKE1qkfgY3gF X-Received: by 2002:a17:906:5a88:: with SMTP id l8mr20552577ejq.163.1623198428085; Tue, 08 Jun 2021 17:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623198428; cv=none; d=google.com; s=arc-20160816; b=X1DvEZIf6J4wE2w6JinLzFiAs7E6Z5l64fVYnaTy7R0JL59Mphd1SYFMsdMiZao7Y+ 76aNGufeIYyewu2FvVleccldVLipS0HPh9DGoOSaphwYOYOYOaaLibaPOb6IUB1A/3wt 61vIfe3RUGoGozQBVuTpWqQq8Q1vEfLqa6/LkHYCtV40nh0J4GVCjOk/+pt2PyDH7NgJ IMGQp8nYo4rdrOIZ/a5Mm/Cpb6hT5GCOjFtmeju3384cAj90b+ujmndfa1obsAqY9Xux ILXhYVGUaRG9D0YSxMVa2PrMabO1LnYOM4Gj1DBZd89xntQXyLBiKLDIA4vk+Uu4grLt eN0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=OmTdNAirSU2hkyrUMU+ARQjy6bvUlpwnEGNeFoKbjA8=; b=KQa+FgikuUdS2EhuByWQp3EsOBqLRPngnGKdd/UtWGbx1oxjGbnStGXeZqyblGmrTP Ynw3iWQ1qG15fjD3FuF2FJZEIeG9pD/W1wVIZvetTrO1eAEfdNN7kU0qFUE1fhFF/YS5 4kCi5MyGTiOvg1LSWg/3EcQo87iqtBQRiy73V0QaKtgJFsGZjQpRgfEbzj7bNAt/2NJY JigtOOLzPJ+O2IenJeqKdjPKoMqo7Hf9II+ILEqnVT/fMPRhmTtpNR5jlTx7ifcJgG/Q O7yhBrBGkKGIYfg3FKYig8Fw5hmw71eqaB5nV8C0vRffLvrPBovSXZtCzzSrfbKGND8E pufg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si1102074eji.591.2021.06.08.17.26.43; Tue, 08 Jun 2021 17:27:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232426AbhFHMW3 (ORCPT + 99 others); Tue, 8 Jun 2021 08:22:29 -0400 Received: from mail-oi1-f178.google.com ([209.85.167.178]:39668 "EHLO mail-oi1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231993AbhFHMW2 (ORCPT ); Tue, 8 Jun 2021 08:22:28 -0400 Received: by mail-oi1-f178.google.com with SMTP id m137so17437190oig.6; Tue, 08 Jun 2021 05:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OmTdNAirSU2hkyrUMU+ARQjy6bvUlpwnEGNeFoKbjA8=; b=AZvhwZq/UeFte7ZUzd34TXkXMBlB0cMkQHPti6/cN32rjwgvYWet4nbqjVzzi/pCn+ jQDCR+/SQd3Fe5UsCrf1Sx7MFBAf6joIx12buswXanTCR3goYB0uTQx6ydnOwQqCCWIe pbKJ/r4dXfTwzLTLuDjdBn+oeprHBKBuMdqHjho6jySsn5QTYwbCqmEado+GF0aQhXiU PnTlJSSnvghJUQ2ondLgkVl3excJCPoRAuEhxS4/0/0yvlRL/9sDg9gj+de80s6VlsK1 dVWPMBcDBNcMNmSaJuOSZu4Y2QljhhDvls/yixjF7Og2HsVYmWR5YLc7GCUUTjQLlmZo z3mw== X-Gm-Message-State: AOAM5306uT4k9j3BjQ6ajpnxkriaKPFAa1GXJmSzLwYW+nxEUn8EAjWs FEmrso0wnEZCFU9hmhXFCAnGebEpJj6hf1TNAvE= X-Received: by 2002:aca:b406:: with SMTP id d6mr2621167oif.71.1623154835851; Tue, 08 Jun 2021 05:20:35 -0700 (PDT) MIME-Version: 1.0 References: <20210607195430.48228-1-david@redhat.com> <20210607195430.48228-9-david@redhat.com> In-Reply-To: <20210607195430.48228-9-david@redhat.com> From: "Rafael J. Wysocki" Date: Tue, 8 Jun 2021 14:20:24 +0200 Message-ID: Subject: Re: [PATCH v1 08/12] ACPI: memhotplug: memory resources cannot be enabled yet To: David Hildenbrand Cc: Linux Kernel Mailing List , Andrew Morton , Vitaly Kuznetsov , "Michael S. Tsirkin" , Jason Wang , Marek Kedzierski , Hui Zhu , Pankaj Gupta , Wei Yang , Oscar Salvador , Michal Hocko , Dan Williams , Anshuman Khandual , Dave Hansen , Vlastimil Babka , Mike Rapoport , "Rafael J. Wysocki" , Len Brown , Pavel Tatashin , virtualization@lists.linux-foundation.org, Linux Memory Management List , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 7, 2021 at 9:55 PM David Hildenbrand wrote: > > We allocate + initialize everything from scratch. In case enabling the > device fails, we free all memory resourcs. > > Signed-off-by: David Hildenbrand Acked-by: Rafael J. Wysocki > --- > drivers/acpi/acpi_memhotplug.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 1d01d9414c40..eb4faf7c5cad 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -182,10 +182,6 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) > * (i.e. memory-hot-remove function) > */ > list_for_each_entry(info, &mem_device->res_list, list) { > - if (info->enabled) { /* just sanity check...*/ > - num_enabled++; > - continue; > - } > /* > * If the memory block size is zero, please ignore it. > * Don't try to do the following memory hotplug flowchart. > -- > 2.31.1 >