From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4745CC33CB2 for ; Wed, 29 Jan 2020 10:27:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BF0F2071E for ; Wed, 29 Jan 2020 10:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbgA2K1d (ORCPT ); Wed, 29 Jan 2020 05:27:33 -0500 Received: from lhrrgout.huawei.com ([185.176.76.210]:2327 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726067AbgA2K1d (ORCPT ); Wed, 29 Jan 2020 05:27:33 -0500 Received: from lhreml702-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 37804B6EB07BAEE4412C; Wed, 29 Jan 2020 10:27:31 +0000 (GMT) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by lhreml702-cah.china.huawei.com (10.201.108.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 29 Jan 2020 10:27:31 +0000 Received: from [127.0.0.1] (10.202.226.43) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 29 Jan 2020 10:27:30 +0000 Subject: Re: [PATCH RFC 2/2] soc: Add a basic ACPI generic driver To: "Rafael J. Wysocki" CC: Olof Johansson , "Rafael J. Wysocki" , Len Brown , Jeremy Linton , "Arnd Bergmann" , Linux Kernel Mailing List , ACPI Devel Maling List , Hanjun Guo , "Greg Kroah-Hartman" References: <1580210059-199540-1-git-send-email-john.garry@huawei.com> <1580210059-199540-3-git-send-email-john.garry@huawei.com> <4c6462e3-e368-bd9f-260f-e8351c85bcc2@huawei.com> From: John Garry Message-ID: <651c836a-327c-f91d-fc5d-ab6f59c1b8db@huawei.com> Date: Wed, 29 Jan 2020 10:27:30 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.43] X-ClientProxiedBy: lhreml735-chm.china.huawei.com (10.201.108.86) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org >> >>> Any reasons for not putting it into drivers/acpi/pptt.c specifically? >>> . >> >> I don't think so. >> >> One thing is that the code does a one-time scan of the PPTT to find all >> processor package nodes with ID structures to register the soc devices - >> so we would need some new call from from acpi_init() for that. > Hi Rafael, > Or an extra initcall or similar. [Calls from acpi_init() are basically > for things that need to be strictly ordered in a specific way for some > reason.]> > Why would that be a problem? I don't see a problem if we want to use a soc driver, but that is starting to look unlikely. Alternatively, if we want to create some folder under /sys/firmware/acpi, any restriction comes from the folder location. For a folder like /sys/firmware/acpi/pptt, we need to ensure acpi_kobj is initialized; acpi_kobj is set from subsys_init(acpi_init), so module_init() for pptt module would suffice. However if we wanted to make pptt folder a sub-folder from those created in acpi_sysfs_init() - then we would need to make that parent folder kobj non-static. Again, module_init() would suffice. Thanks, John