diff mbox

[v3,7/8] acpi: add support for configfs

Message ID 1465917446-14043-8-git-send-email-octavian.purdila@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Octavian Purdila June 14, 2016, 3:17 p.m. UTC
Register the ACPI subsystem with configfs.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
 Documentation/ABI/testing/configfs-acpi |  7 ++++++
 MAINTAINERS                             |  1 +
 drivers/acpi/Kconfig                    |  9 ++++++++
 drivers/acpi/Makefile                   |  1 +
 drivers/acpi/configfs.c                 | 39 +++++++++++++++++++++++++++++++++
 5 files changed, 57 insertions(+)
 create mode 100644 Documentation/ABI/testing/configfs-acpi
 create mode 100644 drivers/acpi/configfs.c

Comments

kernel test robot June 14, 2016, 10:43 p.m. UTC | #1
Hi,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.7-rc3]
[cannot apply to next-20160614]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Octavian-Purdila/ACPI-overlays/20160614-202312
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the linux-review/Octavian-Purdila/ACPI-overlays/20160614-202312 HEAD 042f716a165ffa274684c787377acddfc1f34e3f builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/acpi/configfs.c: In function 'acpi_configfs_init':
>> drivers/acpi/configfs.c:19:31: error: 'acpi_configfs' undeclared (first use in this function)
     struct config_group *root = &acpi_configfs.su_group;
                                  ^~~~~~~~~~~~~
   drivers/acpi/configfs.c:19:31: note: each undeclared identifier is reported only once for each function it appears in
   drivers/acpi/configfs.c: In function 'acpi_configfs_exit':
   drivers/acpi/configfs.c:33:33: error: 'acpi_configfs' undeclared (first use in this function)
     configfs_unregister_subsystem(&acpi_configfs);
                                    ^~~~~~~~~~~~~

vim +/acpi_configfs +19 drivers/acpi/configfs.c

    13	#include <linux/configfs.h>
    14	#include <linux/acpi.h>
    15	
    16	static int __init acpi_configfs_init(void)
    17	{
    18		int ret;
  > 19		struct config_group *root = &acpi_configfs.su_group;
    20	
    21		config_group_init(root);
    22	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Rafael J. Wysocki June 14, 2016, 10:59 p.m. UTC | #2
Hi Octavian,

On Wednesday, June 15, 2016 06:43:21 AM kbuild test robot wrote:
> Hi,
> 
> [auto build test ERROR on pm/linux-next]
> [also build test ERROR on v4.7-rc3]
> [cannot apply to next-20160614]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Octavian-Purdila/ACPI-overlays/20160614-202312
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: x86_64-allyesconfig (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> Note: the linux-review/Octavian-Purdila/ACPI-overlays/20160614-202312 HEAD 042f716a165ffa274684c787377acddfc1f34e3f builds fine.
>       It only hurts bisectibility.
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/acpi/configfs.c: In function 'acpi_configfs_init':
> >> drivers/acpi/configfs.c:19:31: error: 'acpi_configfs' undeclared (first use in this function)
>      struct config_group *root = &acpi_configfs.su_group;
>                                   ^~~~~~~~~~~~~
>    drivers/acpi/configfs.c:19:31: note: each undeclared identifier is reported only once for each function it appears in
>    drivers/acpi/configfs.c: In function 'acpi_configfs_exit':
>    drivers/acpi/configfs.c:33:33: error: 'acpi_configfs' undeclared (first use in this function)
>      configfs_unregister_subsystem(&acpi_configfs);
>                                     ^~~~~~~~~~~~~
> 
> vim +/acpi_configfs +19 drivers/acpi/configfs.c
> 
>     13	#include <linux/configfs.h>
>     14	#include <linux/acpi.h>
>     15	
>     16	static int __init acpi_configfs_init(void)
>     17	{
>     18		int ret;
>   > 19		struct config_group *root = &acpi_configfs.su_group;
>     20	
>     21		config_group_init(root);
>     22	
> 
> ---

Any chance to send an updated patch with this fixed?

No need to resend the whole series, just this single patch, please.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Octavian Purdila June 15, 2016, 10:20 a.m. UTC | #3
On Wed, Jun 15, 2016 at 1:59 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> Hi Octavian,
>
> On Wednesday, June 15, 2016 06:43:21 AM kbuild test robot wrote:
>> Hi,
>>
>> [auto build test ERROR on pm/linux-next]
>> [also build test ERROR on v4.7-rc3]
>> [cannot apply to next-20160614]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url:    https://github.com/0day-ci/linux/commits/Octavian-Purdila/ACPI-overlays/20160614-202312
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
>> config: x86_64-allyesconfig (attached as .config)
>> compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
>> reproduce:
>>         # save the attached .config to linux build tree
>>         make ARCH=x86_64
>>
>> Note: the linux-review/Octavian-Purdila/ACPI-overlays/20160614-202312 HEAD 042f716a165ffa274684c787377acddfc1f34e3f builds fine.
>>       It only hurts bisectibility.
>>
>> All errors (new ones prefixed by >>):
>>
>>    drivers/acpi/configfs.c: In function 'acpi_configfs_init':
>> >> drivers/acpi/configfs.c:19:31: error: 'acpi_configfs' undeclared (first use in this function)
>>      struct config_group *root = &acpi_configfs.su_group;
>>                                   ^~~~~~~~~~~~~
>>    drivers/acpi/configfs.c:19:31: note: each undeclared identifier is reported only once for each function it appears in
>>    drivers/acpi/configfs.c: In function 'acpi_configfs_exit':
>>    drivers/acpi/configfs.c:33:33: error: 'acpi_configfs' undeclared (first use in this function)
>>      configfs_unregister_subsystem(&acpi_configfs);
>>                                     ^~~~~~~~~~~~~
>>
>> vim +/acpi_configfs +19 drivers/acpi/configfs.c
>>
>>     13        #include <linux/configfs.h>
>>     14        #include <linux/acpi.h>
>>     15
>>     16        static int __init acpi_configfs_init(void)
>>     17        {
>>     18                int ret;
>>   > 19                struct config_group *root = &acpi_configfs.su_group;
>>     20
>>     21                config_group_init(root);
>>     22
>>
>> ---
>
> Any chance to send an updated patch with this fixed?
>
> No need to resend the whole series, just this single patch, please.
>

Oops, sorry about that. I will have to resend at least the last two
patches to fix this issue, but since I have missed to add the
Reviewed-by from Mika for another two patches, its probably best to
resend the whole series?
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki June 15, 2016, 9:02 p.m. UTC | #4
On Wed, Jun 15, 2016 at 12:20 PM, Octavian Purdila
<octavian.purdila@intel.com> wrote:
> On Wed, Jun 15, 2016 at 1:59 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> Hi Octavian,
>>
>> On Wednesday, June 15, 2016 06:43:21 AM kbuild test robot wrote:
>>> Hi,
>>>
>>> [auto build test ERROR on pm/linux-next]
>>> [also build test ERROR on v4.7-rc3]
>>> [cannot apply to next-20160614]
>>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>>
>>> url:    https://github.com/0day-ci/linux/commits/Octavian-Purdila/ACPI-overlays/20160614-202312
>>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
>>> config: x86_64-allyesconfig (attached as .config)
>>> compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
>>> reproduce:
>>>         # save the attached .config to linux build tree
>>>         make ARCH=x86_64
>>>
>>> Note: the linux-review/Octavian-Purdila/ACPI-overlays/20160614-202312 HEAD 042f716a165ffa274684c787377acddfc1f34e3f builds fine.
>>>       It only hurts bisectibility.
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    drivers/acpi/configfs.c: In function 'acpi_configfs_init':
>>> >> drivers/acpi/configfs.c:19:31: error: 'acpi_configfs' undeclared (first use in this function)
>>>      struct config_group *root = &acpi_configfs.su_group;
>>>                                   ^~~~~~~~~~~~~
>>>    drivers/acpi/configfs.c:19:31: note: each undeclared identifier is reported only once for each function it appears in
>>>    drivers/acpi/configfs.c: In function 'acpi_configfs_exit':
>>>    drivers/acpi/configfs.c:33:33: error: 'acpi_configfs' undeclared (first use in this function)
>>>      configfs_unregister_subsystem(&acpi_configfs);
>>>                                     ^~~~~~~~~~~~~
>>>
>>> vim +/acpi_configfs +19 drivers/acpi/configfs.c
>>>
>>>     13        #include <linux/configfs.h>
>>>     14        #include <linux/acpi.h>
>>>     15
>>>     16        static int __init acpi_configfs_init(void)
>>>     17        {
>>>     18                int ret;
>>>   > 19                struct config_group *root = &acpi_configfs.su_group;
>>>     20
>>>     21                config_group_init(root);
>>>     22
>>>
>>> ---
>>
>> Any chance to send an updated patch with this fixed?
>>
>> No need to resend the whole series, just this single patch, please.
>>
>
> Oops, sorry about that. I will have to resend at least the last two
> patches to fix this issue, but since I have missed to add the
> Reviewed-by from Mika for another two patches, its probably best to
> resend the whole series?

Yes, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/ABI/testing/configfs-acpi b/Documentation/ABI/testing/configfs-acpi
new file mode 100644
index 0000000..17b19dc
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-acpi
@@ -0,0 +1,7 @@ 
+What:		/config/acpi
+Date:		July 2016
+KernelVersion:	4.8
+Contact:	linux-acpi@vger.kernel.org
+Description:
+		This represents the ACPI subsystem entry point directory. It
+		contains sub-groups corresponding to ACPI configurable options.
diff --git a/MAINTAINERS b/MAINTAINERS
index 16700e4..9c5365f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -288,6 +288,7 @@  F:	include/linux/acpi.h
 F:	include/acpi/
 F:	Documentation/acpi/
 F:	Documentation/ABI/testing/sysfs-bus-acpi
+F:	Documentation/ABI/testing/configfs-acpi
 F:	drivers/pci/*acpi*
 F:	drivers/pci/*/*acpi*
 F:	drivers/pci/*/*/*acpi*
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index b7e2e77..a039433 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -521,4 +521,13 @@  config XPOWER_PMIC_OPREGION
 
 endif
 
+config ACPI_CONFIGFS
+	tristate "ACPI configfs support"
+	select CONFIGFS_FS
+	default n
+	help
+	  Select this option to enable support for ACPI configuration from
+	  userspace. The configurable ACPI groups will be visible under
+	  /config/acpi, assuming configfs is mounted under /config.
+
 endif	# ACPI
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 251ce85..1dc2173 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -99,5 +99,6 @@  obj-$(CONFIG_ACPI_EXTLOG)	+= acpi_extlog.o
 obj-$(CONFIG_PMIC_OPREGION)	+= pmic/intel_pmic.o
 obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/intel_pmic_crc.o
 obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o
+obj-$(CONFIG_ACPI_CONFIGFS)	+= configfs.o
 
 video-objs			+= acpi_video.o video_detect.o
diff --git a/drivers/acpi/configfs.c b/drivers/acpi/configfs.c
new file mode 100644
index 0000000..96aa3d8
--- /dev/null
+++ b/drivers/acpi/configfs.c
@@ -0,0 +1,39 @@ 
+/*
+ * ACPI configfs support
+ *
+ * Copyright (c) 2015 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/configfs.h>
+#include <linux/acpi.h>
+
+static int __init acpi_configfs_init(void)
+{
+	int ret;
+	struct config_group *root = &acpi_configfs.su_group;
+
+	config_group_init(root);
+
+	ret = configfs_register_subsystem(&acpi_configfs);
+	if (ret)
+		return ret;
+
+	return 0;
+}
+module_init(acpi_configfs_init);
+
+static void __exit acpi_configfs_exit(void)
+{
+	configfs_unregister_subsystem(&acpi_configfs);
+}
+module_exit(acpi_configfs_exit);
+
+MODULE_AUTHOR("Octavian Purdila <octavian.purdila@intel.com>");
+MODULE_DESCRIPTION("ACPI configfs support");
+MODULE_LICENSE("GPL v2");