Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751068AbWH0PTZ (ORCPT ); Sun, 27 Aug 2006 11:19:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751032AbWH0PTZ (ORCPT ); Sun, 27 Aug 2006 11:19:25 -0400 Received: from mail.suse.de ([195.135.220.2]:61377 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1750915AbWH0PTY (ORCPT ); Sun, 27 Aug 2006 11:19:24 -0400 Message-ID: <6037166.1156691954750.SLOX.WebMail.wwwrun@imap-dhs.suse.de> Date: Sun, 27 Aug 2006 17:19:14 +0200 (CEST) From: Thomas Renninger To: Yasunori Goto Subject: [PATCH 2/2] ACPI memory_hotplug cleanups Cc: akpm@osdl.org, "Brown, Len" , keith mannthey , ACPI-ML , Linux Kernel ML , Linux Hotplug Memory Support In-Reply-To: <20060825205423.0778.Y-GOTO@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_202_2944632.1156691954738" X-Priority: 3 (normal) X-Mailer: SuSE Linux Openexchange Server 4 - WebMail (Build 2.4160) X-Operating-System: Linux 2.4.21-309-smp i386 (JVM 1.3.1_18) Organization: SuSE Linux AG References: <20060810142329.EB03.Y-GOTO@jp.fujitsu.com> <1155643418.4302.1154.camel@queen.suse.de> <20060825205423.0778.Y-GOTO@jp.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14139 Lines: 217 ------=_Part_202_2944632.1156691954738 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Fr 25.08.2006 13:59 schrieb Yasunori Goto : > >> >> > I sent a patch a while ago that gets rid of the whole namespace >> > walking >> > by making acpi_memoryhotplug an acpi device and making use of the >> > .add >> > callback function and the acpi_bus_register_driver call. >> > >> > I am not sure whether this is possible if you have multiple memory >> > devices, though (if not maybe it should be made possible?)... >> > >> > Yasunori even tested the patch and sent an Ok: >> > http://marc.theaimsgroup.com/?t=3D114065312400001&r=3D1&w=3D2 >> > >> > If this is acceptable I can rebase the patch on a current kernel. >> >> Hi. Thomas-san. >> Did you rebase your patch? >> >> I'm trying to do it now too. >> But, current code (2.6.18-rc4) seems to register handler for >> only enable status devices at boot time. >> So, notification is -discarded- due to no handler for new memory >> device when hot-add event occurs. Hmmm. :-( >> > Looking a bit deeper into this I think some more things can be > optimised. >The author's email address also seems to be invalid >(naveen.b.s@intel.com)? > >More cleanups attached (on top of the last one). >Again only compile tested and patch attached not inlined > >(I forgot to upload the patch in my previous mail? Will resend...). > >BTW: I will be on holidays the next days, expect that it may take >some time until I answer... > >=C2=A0=C2=A0=C2=A0=C2=A0Thomas >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Thomas > ------=_Part_202_2944632.1156691954738 Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=acpi_memory_hotplug_state_cleanup.patch YWNwaV9tZW1vcnlfaG90cGx1ZyBjbGVhbnVwcyBbMi8yXQoKIC0gZ2V0IHJpZCBvZiB1bnVzZWQg YWNwaV9tZW1vcnlfZGV2aWNlLT5zdGF0ZSAoaXMgc2V0LCBidXQgbmV2ZXIgZXZhbHVhdGVkKQog LSBNYWtlIHVzZSBvZiBnbG9iYWwgYWNwaV9idXNfZ2V0X3N0YXR1cyhkZXZpY2UpIGZ1bmMgaW5z dGVhZCBvZiBldmFsdWF0ZQogICBfU1RBIHdpdGggb3duIGZ1bmMgLT4gZ2V0cyByaWQgb2YgYWNw aV9tZW1vcnlfY2hlY2tfZGV2aWNlIGFuZCBfU1RBIGRlZmluZXMKIC0gcGFzcyBtZW1fZGV2aWNl IHBvaW50ZXIgYXMgY2FsbGJhY2sgZGF0YSB0byBub3RpZnkgaGFuZGxlciBmdW5jCiAgIC0+IGdl dCByaWQgb2YgYWNwaV9tZW1vcnlfZ2V0X2RldmljZSgpCiAtIGNoZWNrIGZvciBhdmFpbGFiZSBf U1RBIGFuZCBfRU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CQkvKiBjYWxsIGFkZF9tZW1vcnkgZnVuYyAqLwot CQlyZXN1bHQgPSBhY3BpX21lbW9yeV9lbmFibGVfZGV2aWNlKG1lbV9kZXZpY2UpOwotCQlpZiAo cmVzdWx0KQotCQkJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9FUlJPUiwKLQkJCQkiRXJyb3Ig aW4gYWNwaV9tZW1vcnlfZW5hYmxlX2RldmljZVxuIikpOworCWFjcGlfYnVzX2dldF9zdGF0dXMo ZGV2aWNlKTsKKwlpZiAoIShkZXZpY2UtPnN0YXR1cy5wcmVzZW50ICYmCisJICAgICAgZGV2aWNl LT5zdGF0dXMuZW5hYmxlZCAmJgorCSAgICAgIGRldmljZS0+c3RhdHVzLmZ1bmN0aW9uYWwpKXsK KwkJaWYgKGFjcGlfbWVtb3J5X2VuYWJsZV9kZXZpY2UobWVtX2RldmljZSkpCisJCQlwcmludGso S0VSTl9FUlIgUFJFRklYCisJCQkgICAgICAgIkVycm9yIGluIGFjcGlfbWVtb3J5X2VuYWJsZV9k ZXZpY2VcbiIpOwogCX0KKwogCXJldHVybiByZXN1bHQ7CiB9CiAK ------=_Part_202_2944632.1156691954738-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/