Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755643AbcDAKBh (ORCPT ); Fri, 1 Apr 2016 06:01:37 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34156 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755116AbcDAKBc (ORCPT ); Fri, 1 Apr 2016 06:01:32 -0400 MIME-Version: 1.0 In-Reply-To: <1AE640813FDE7649BE1B193DEA596E883BB66233@SHSMSX101.ccr.corp.intel.com> References: <1459417026-6697-1-git-send-email-octavian.purdila@intel.com> <1459417026-6697-11-git-send-email-octavian.purdila@intel.com> <1AE640813FDE7649BE1B193DEA596E883BB66233@SHSMSX101.ccr.corp.intel.com> Date: Fri, 1 Apr 2016 13:01:30 +0300 Message-ID: Subject: Re: [RFC PATCH 10/10] acpi: add support for loading SSDTs via configfs From: Octavian Purdila To: "Zheng, Lv" Cc: "Rafael J. Wysocki" , Len Brown , Matt Fleming , Mark Brown , Wolfram Sang , Joel Becker , Christoph Hellwig , "linux-acpi@vger.kernel.org" , "linux-efi@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Tirdea, Irina" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 27 On Fri, Apr 1, 2016 at 7:55 AM, Zheng, Lv wrote: > Hi, Hi Lv, >> Add support for acpi_user_table configfs items that allows the user to >> load new tables. The data attributes contains the table data and once it >> is filled from userspace the table is loaded and ACPI devices are >> enumerated. > [Lv Zheng] > We've been considering to implement this facility before. > The 2 alternative solutions are: > 1. implement LOAD/UNLOAD ioctl for /sys/kernel/debug/acpi/acpidbg - this will be useful for extracting AML byte stream from kernel to be used by a userspace disassembler. AFAIK adding new ioctls is discouraged. > 2. transition /sys/firmware/acpi/tables/xxx into directory and implement /sys/firmware/acpi/tables/load, /sys/firmware/acpi/tables/unload - this should be able to meet your requirement. We can't do that as it would break the ABI. > So my first question is: > Why do you use configfs rather than the existing mechanisms? sysfs is not a good choice for dealing with objects created from userspace, configfs was created to address this specific need. Since we want to be able to create and load new tables from userspace this use-case fits very well with configfs.