From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
Wei Yang <richard.weiyang@linux.alibaba.com>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Heiko Carstens <hca@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Catalin Marinas <catalin.marinas@arm.com>,
virtualization@lists.linux-foundation.org,
linux-acpi@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Anton Blanchard <anton@ozlabs.org>,
Ard Biesheuvel <ardb@kernel.org>, Baoquan He <bhe@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Borislav Petkov <bp@alien8.de>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Christophe Leroy <christophe.leroy@c-s.fr>,
Dave Jiang <dave.jiang@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Jia He <justin.he@arm.com>, Joe Perches <joe@perches.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Laurent Dufour <ldufour@linux.ibm.com>,
Michel Lespinasse <michel@lespinasse.org>,
Nathan Lynch <nathanl@linux.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Pierre Morel <pmorel@linux.ibm.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Rich Felker <dalias@libc.org>,
Scott Cheloha <cheloha@linux.ibm.com>,
Sergei Trofimovich <slyfox@gentoo.org>,
Thiago Jung Bauermann <bauerman@linux.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vasily Gorbik <gor@linux.ibm.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Will Deacon <will@kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: [PATCH v1 4/4] ACPI: memhotplug: memory resources cannot be enabled yet
Date: Mon, 12 Jul 2021 14:40:52 +0200 [thread overview]
Message-ID: <20210712124052.26491-5-david@redhat.com> (raw)
In-Reply-To: <20210712124052.26491-1-david@redhat.com>
We allocate + initialize everything from scratch. In case enabling the
device fails, we free all memory resourcs.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: David Hildenbrand <david@redhat.com>
---
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
prev parent reply other threads:[~2021-07-12 12:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 12:40 mm/memory_hotplug: preparatory patches for new online policy and memory David Hildenbrand
2021-07-12 12:40 ` [PATCH v1 1/4] mm/memory_hotplug: use "unsigned long" for PFN in zone_for_pfn_range() David Hildenbrand
2021-07-14 20:13 ` Heiko Carstens
2021-07-15 9:42 ` David Hildenbrand
2021-07-15 18:12 ` Andrew Morton
2021-07-14 20:41 ` Pankaj Gupta
2021-07-15 9:31 ` Oscar Salvador
2021-07-15 9:34 ` Muchun Song
2021-07-12 12:40 ` [PATCH v1 2/4] mm/memory_hotplug: remove nid parameter from arch_remove_memory() David Hildenbrand
2021-07-14 20:47 ` Pankaj Gupta
2021-07-12 12:40 ` [PATCH v1 3/4] mm/memory_hotplug: remove nid parameter from remove_memory() and friends David Hildenbrand
2021-07-12 12:40 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210712124052.26491-5-david@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=anshuman.khandual@arm.com \
--cc=anton@ozlabs.org \
--cc=ardb@kernel.org \
--cc=bauerman@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bhe@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=cheloha@linux.ibm.com \
--cc=christophe.leroy@c-s.fr \
--cc=dalias@libc.org \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=jasowang@redhat.com \
--cc=joe@perches.com \
--cc=justin.he@arm.com \
--cc=ldufour@linux.ibm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mhocko@kernel.org \
--cc=michel@lespinasse.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=mst@redhat.com \
--cc=nathanl@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=osalvador@suse.de \
--cc=pankaj.gupta.linux@gmail.com \
--cc=pasha.tatashin@soleen.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=pmorel@linux.ibm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=richard.weiyang@linux.alibaba.com \
--cc=rjw@rjwysocki.net \
--cc=rppt@kernel.org \
--cc=slyfox@gentoo.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=virtualization@lists.linux-foundation.org \
--cc=vishal.l.verma@intel.com \
--cc=vkuznets@redhat.com \
--cc=wangkefeng.wang@huawei.com \
--cc=will@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).