From patchwork Thu Dec 6 09:30:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasilis Liaskovitis X-Patchwork-Id: 1844171 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7D540DF2F9 for ; Thu, 6 Dec 2012 09:30:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932380Ab2LFJa1 (ORCPT ); Thu, 6 Dec 2012 04:30:27 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:58586 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932204Ab2LFJa0 (ORCPT ); Thu, 6 Dec 2012 04:30:26 -0500 Received: by mail-bk0-f46.google.com with SMTP id q16so2578702bkw.19 for ; Thu, 06 Dec 2012 01:30:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent :x-gm-message-state; bh=ovW9oWl+ZEO2t61Vt/UOju7RgYuwlN45tejPAh81C7Y=; b=cDb7xGwU7ADcYBAfsAf+O/40nE6j9eyDVdKRkBc5ALYwRao2SZz1lNdfiiS7mgoxt1 nk6rSdo+fBd4ZYOXD2IFninwQxUTbb1NnkvRAfnLbcAxEFbHtCNR4ypmKeAF2AY2bmGD DOUdxtRvbwrAK1RhAqUWYtw/7kjHBcFc6LqeJPngsYCrJeLX33BUnTbFS+I35ehOodCV QqEF47BRv2008vpFodCApr1caq9gsmdUIBbUuSY5PQdPgZlqHDQzGB8rV6JMMTCYiGAH vgJvxndxkygsXpBxYYUjMOrMdpJp+eVpEndsTPetEmSTOqom70dwQp8Lh/OjeLxSyE2g RkCw== Received: by 10.204.152.149 with SMTP id g21mr268265bkw.97.1354786224184; Thu, 06 Dec 2012 01:30:24 -0800 (PST) Received: from dhcp-192-168-178-175.profitbricks.localdomain ([62.217.45.26]) by mx.google.com with ESMTPS id o9sm5729010bko.15.2012.12.06.01.30.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 01:30:22 -0800 (PST) Date: Thu, 6 Dec 2012 10:30:19 +0100 From: Vasilis Liaskovitis To: Toshi Kani Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Wen Congyang , Wen Congyang , isimatu.yasuaki@jp.fujitsu.com, lenb@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v3 3/3] acpi_memhotplug: Allow eject to proceed on rebind scenario Message-ID: <20121206093019.GA4584@dhcp-192-168-178-175.profitbricks.localdomain> References: <1353693037-21704-1-git-send-email-vasilis.liaskovitis@profitbricks.com> <9212118.3s2xH6uJDI@vostro.rjw.lan> <1354136568.26955.312.camel@misato.fc.hp.com> <4042591.gpFk7OYmph@vostro.rjw.lan> <1354150952.26955.377.camel@misato.fc.hp.com> <1354151742.26955.385.camel@misato.fc.hp.com> <20121129110451.GA639@dhcp-192-168-178-175.profitbricks.localdomain> <1354211051.26955.435.camel@misato.fc.hp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1354211051.26955.435.camel@misato.fc.hp.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQnhgla9wlDXHQDB5kvCbULyd1a8jUuSe/ev5h0eABnasrja+ugbR9AD4kQod1ai6riP3qdr Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Hi, On Thu, Nov 29, 2012 at 10:44:11AM -0700, Toshi Kani wrote: > On Thu, 2012-11-29 at 12:04 +0100, Vasilis Liaskovitis wrote: > > Yes, that's what I had in mind along with device_lock(). I think the > lock is necessary to close the window. > http://www.spinics.net/lists/linux-mm/msg46973.html > > But as I mentioned in other email, I prefer option 3 with > suppress_bind_attrs. So, yes, please take a look to see how it works > out. I tested the suppress_bind_attrs and it works by simply setting it to true before driver registration e.g. No bind/unbind sysfs files are created when using this, as expected. I assume we only want to suppress for acpi_memhotplug (class=ACPI_MEMORY_DEVICE_CLASS i.e. "memory") devices. Is there agreement on what acpi_bus_trim behaviour and rollback (if any) we want to have for the current ACPI framework (partial trim or full trim on failure)? thanks, - Vasilis --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -783,7 +783,8 @@ int acpi_bus_register_driver(struct acpi_driver *driver) driver->drv.name = driver->name; driver->drv.bus = &acpi_bus_type; driver->drv.owner = driver->owner; - + if (!strcmp(driver->class, "memory")) + driver->drv.suppress_bind_attrs = true; ret = driver_register(&driver->drv); return ret; }