Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754587AbcKQRPw (ORCPT ); Thu, 17 Nov 2016 12:15:52 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:59899 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754478AbcKQRPs (ORCPT ); Thu, 17 Nov 2016 12:15:48 -0500 From: Arnd Bergmann To: Lukas Wunner Cc: Andreas Noever , Matt Fleming , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] thunderbolt: fix compile-test dependencies Date: Thu, 17 Nov 2016 16:29:05 +0100 Message-ID: <6569629.n4CqvS5mLI@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161117151207.GA11741@wunner.de> References: <20161115155908.650902-1-arnd@arndb.de> <3694785.gp6vtA09eN@wuerfel> <20161117151207.GA11741@wunner.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:y4sOVWYbU9RXd9bTlgK7NGZ7jeGnsMJLFbxGRWx6wXLYx8xJx4O s+W5vw9bfOpbrrwmZss3n4NzI4vvwnUfLKhkIScpRklrYMkUxqipPlHU5jMbTJ4S3DdDJWQ RE1bzwTfwsJLGnPmveIYQQ8tcqpJ85OLrObG4ZZnFs8t6XnZ1J4ju8lHNq5KMXGEYDFuksI EkvB9TxLCDALmwYc1HoAg== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZmgaYPbMEVc=:hDUaSMlsA75cSBKkTq+XTg OSkjVChz/wblkZKLgeFVZicBCiUq1dqDjYnDjSk5dyUevayZVi4HwhySEC4MxWbmKcUrtvgBX 3JBqQRORCyjh19Kqo5jmkda1iyExqCAZBHvzB1oDGbm0zv+D4/sp/FyoxYx/3irOSaeMQ+Ekr 3K06qxmmlv/SyvrjlyRBfPam8Jaui7c54Kh/t8lUbQ21wnTo1RTljoZkNoFvbkLeew8BDvuVV HJuaps3sEbmmAWCE3I/q7l74UtOSAyhy3lDFn6yflW8x8C4N3hpLee9EtIDaxmvP1X66X0pSS oygsOg23DDcaaepMTVrZJRQnSMcdLOWc/ZhjVFdxCowjOyISk3TGbo2tQjB0h2FX7F5N0pvKz gCNKAvsHRNBrsrmlLJVYmDH3FUBVTC1R0jvE2DHuuHunuP3ymUfbZ8FmdRSTRP3u86RbHWGig TEwU4sseOvkVoufnh06l88bCCa7Q8D46qWSH/+HmgCGA2mdeJtyrBdakY+h0FFrBKGFXHY7sQ hNG0G7LlARy6jCIv1HduP+uB4AFCQf+Ck1olEH7u4hssnqR2OTSJVubxbDrIfMdarg/m5lPkr d0r3qcDUb55oDBP1rkj2Y0dIUuoNU4SP33bn4xTAuGx7t4cr/qLNkUIvoOWVeR4GRw/Lhh+uV 3SebL5JcXz9pQ439VPrLdI6JwkJWaxLNAYWVnwu4/Wct7TT9JT+rns+gVyNkTEVQqUT3VqHjr lG93jOwDtvFzqblE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2284 Lines: 52 On Thursday, November 17, 2016 4:12:07 PM CET Lukas Wunner wrote: > On Thu, Nov 17, 2016 at 03:10:11PM +0100, Arnd Bergmann wrote: > > On Thursday, November 17, 2016 2:53:55 PM CET Lukas Wunner wrote: > > > Hm, so far Thunderbolt is (unfortunately) an Intel proprietary > > > technology that is only available on x86, so compiling anything > > > in drivers/thunderbolt/ on other arches doesn't seem to make much > > > sense. So maybe a "depends on X86" would be more appropriate? > > > > I also found that we need "depends on ACPI" because APPLE_PROPERTIES > > does "select EFI_DEV_PATH_PARSER" and that requires APCI... > > There's a series coming up to power the Thunderbolt controller > down when nothing is plugged in and this is done via ACPI. > This commit (slated for 4.11) was going to add a dependency on > ACPI anyway: > https://github.com/l1k/linux/commit/c1f379d5dee4 > > So adding "depends on ACPI" now would be fine I guess. It would take care of ARM, but not ARM64: ARM64 has ACPI and EFI_STUB, but cannot build APPLE_PROPERTIES. Adding the ACPI dependency by itself would not be sufficient. > > > One could argue that compiling on other arches helps avoid x86-isms > > > in case Thunderbolt does become available on other arches one day, > > > then again it seems like an enormous waste of CPU cycles. *shrug* > > > > > > Opinions? > > > > We try to avoid adding architecture-specific dependencies that > > prevent build testing, and we are adding '|| COMPILE_TEST' to > > a lot of drivers for this. We could use 'depends on X86 || > > COMPILE_TEST' here, but that wouldn't help the problem on ARM. > > Yes, "depends on X86 || COMPILE_TEST" sounds like the right thing > to do, independently of the build breakage at hand. Ok. > > Another option would be to use 'depends on APPLE_PROPERTIES || > > APPLE_PROPERTIES=n', which would force the thunderbolt driver > > to be a loadable module if APPLE_PROPERTIES is one, but otherwise > > just allow all configurations. > > APPLE_PROPERTIES is bool, not tristate, so this would work. > However the solution you proposed earlier ("select APPLE_PROPERTIES if > (X86 && EFI_STUB)") is more explicit and easier to understand, > thus seems preferable to me. Ok, sounds good. That should also fix ARM64 then. Arnd