Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1291235imu; Wed, 28 Nov 2018 07:28:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/VeHYLjH63ajdam+a4PMjEAMR5LDn4BXw1xJg61gevEOEKBLuCaBIlF6Tvk/ueyjvlwJeh6 X-Received: by 2002:a65:484c:: with SMTP id i12mr33498356pgs.309.1543418888445; Wed, 28 Nov 2018 07:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543418888; cv=none; d=google.com; s=arc-20160816; b=h49Miyr6pJhxdqBoP5b8dabFkYErd0Ug9vtsyIqNylIXafdqngPTIS5NA3k0ONvYQ/ DLhUe9FvMQYdK94RCDcbA0pkUKHmaoa5epAM3bj20ob5oEfOUqBiXmVam2hAAlRgZpXg wK1n9AoXWcM6vxqYcAYWwTsAOWfI3gqGsY9ra7L/PiGGCbQBclGweouRb0LvYu+aJ0Zf czbzNyQtae2o/j64Jk8BY/Wush5eNwgQMagTUcZyb9mVfF5ybmNG0hYsKNNfHXGAYRZ/ cJ2BhMzTMztQgWzOenB7f2SoE8/GKB3/yglOFbTBmgVWz1teyjDp9riPFXxF5+mDLp8Q 1TtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bE4wviaTaSRu1i6cFsJ7Z5GXV55l3fvyvUIPUCFKEDg=; b=oxP8ypH4VR7WU2O1Jc+G8Uhkz7WvVImU0A5z+jVbqLhSf9lZv1SiO/7s6WoFOv2ghR EZ73gAlfgHmtG8iBaNkZeManQNgOofwKAEFIM/8kqeptN19O0CNOfd0VSGfvmR/2nZst TOY7+FUN/jpAahh75P1JoxMpmsUqaajzRyoW/HqOrJJR1vs0iydz/YruWtAObI3vxsKT FM9mp9X45WXo8zEB9Qze/Ny0jv82TjKu1EhBKNibCqrIVtrG3o3KyBuhd8tD9O16Mb99 xRRO9K2TDIOXZXEqnvAwfo+qhRBQe9NQPaYzvG4S5L6+w2ytu/Cpv4okPb1tfu9YGQoJ EA3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si6950760pgm.250.2018.11.28.07.27.52; Wed, 28 Nov 2018 07:28:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728506AbeK2C3G (ORCPT + 99 others); Wed, 28 Nov 2018 21:29:06 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55298 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727726AbeK2C3G (ORCPT ); Wed, 28 Nov 2018 21:29:06 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id wASFOtPQ006687 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 28 Nov 2018 07:25:10 -0800 Received: from yow-pgortmak-d1.corp.ad.wrs.com (128.224.56.57) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.408.0; Wed, 28 Nov 2018 07:24:46 -0800 Received: by yow-pgortmak-d1.corp.ad.wrs.com (Postfix, from userid 1000) id D82D52E130B; Wed, 28 Nov 2018 10:24:45 -0500 (EST) Date: Wed, 28 Nov 2018 10:24:45 -0500 From: Paul Gortmaker To: Robin Murphy CC: Joerg Roedel , , , Will Deacon , Nate Watterson , Subject: Re: [PATCH 8/9] iommu: arm-smmu: make it explicitly non-modular Message-ID: <20181128152445.GH14659@windriver.com> References: <1543271498-28966-1-git-send-email-paul.gortmaker@windriver.com> <1543271498-28966-9-git-send-email-paul.gortmaker@windriver.com> <755c95d7-882c-0dec-207e-20bf8f22b159@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <755c95d7-882c-0dec-207e-20bf8f22b159@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Re: [PATCH 8/9] iommu: arm-smmu: make it explicitly non-modular] On 28/11/2018 (Wed 12:42) Robin Murphy wrote: > Hi Paul, > > On 26/11/2018 22:31, Paul Gortmaker wrote: [...] > >We add a moduleparam.h include since the file does actually declare > >some module parameters, and leaving them as such is the easiest way > >currently to remain backwards compatible with existing use cases. [...] > Is it worth introducing builtin_param() and friends for this sort of thing, > to echo the *_platform_driver() helpers? It seems like that could be > justifiable under the motivation described in the cover letter. I've definitely gone back and looked at this a few times when coming across the few corner cases like these, to remind myself why I didn't do it already. We'd not want to replicate all the module_param stuff as an instance of builtin_param() because we already have setup() and setup_param() in init.h -- however they don't do the file name in the param - hence the reason it isn't a direct swap in replacement. So, it would become some more complex refactoring of moduleparam.h into say bootparam.h - to reduce code/macro duplication, while at the same time being aware of existing setup_param stuff and making something like a new setup_param_named() that is consistent with existing setup fcns. And based on past experience, there will be reviewers who don't see the value in the distinction and simply reply with two words "why bother?". Not impossible, but not as simple as the builtin_platform_driver and similar wrappers that I've already added to mainline. You've made we want to go have another look at it again, but in the meantime we can do what I've done here, and circle around later to update the few instances of moduleparam in non-modules once/if the refactoring I describe above works out and is accepted in mainline. > > Otherwise, the changes look reasonable. I still hold out hope that one day > we'll be able to make IOMMU drivers modular (it can work with minimal hacks > today, but it's far from robust in general), but for now I agree this makes > sense (and it'll be easy enough to revert for playing with further hacks). I totally agree - I've had similar discussions with the DMA maintainers, and if being modular can be made to work and has a use case - great! But it should be a conscious decision, since nobody writes a new driver from scratch; they copy one that is "close" as a template and then go from there. Which leads to a good percentage of drivers having hints of modular stuff when there is no intent of them ever being modular. > With the title fixed up as Joerg asked, > > Acked-by: Robin Murphy Thanks for the feedback/review. Will re-send with updated titles before the week is finished and a good chance for additional feedback has elapsed. Paul. -- > > > module_param(force_stage, int, S_IRUGO); > > MODULE_PARM_DESC(force_stage, > > "Force SMMU mappings to be installed at a particular stage of translation. A value of '1' or '2' forces the corresponding stage. All other values are ignored (i.e. no stage is forced). Note that selecting a specific stage will disable support for nested translation.");