Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp712624imp; Wed, 20 Feb 2019 07:44:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IbC9I+6A+ZgdeCupCpqpBxun8tGHlqwtutvtnfcMPvkJzFgvXZL5vo3dfFuRcZxkzcZxRLQ X-Received: by 2002:a17:902:8a91:: with SMTP id p17mr37467995plo.316.1550677491169; Wed, 20 Feb 2019 07:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550677491; cv=none; d=google.com; s=arc-20160816; b=tSe2TGjDms6ZCdwyhsf6pEniFQkB6VSouaPhFkE/Zg6/gH13KDqxA9lq9mhj1G/Qjt F0deLRSR8J2vZ+J2jzpL6hircTUoFHVFPAQfH73iOg1npg/tSXfX/Q4229zJJgabSYMV wEUGy47aJKwR7v7EFkYDSEVQ1/S9StQvsvPwBMGwVHlgBoramnUv7SREof4k7ae6F8Ea qmf/IZGSxOaFnAYqlFaC46DrZ0VSz/ONQtJkwtkS5bx4NnamZXSwujzsv7mFX4oFkfSV w8jdzZr/DS8ZY1B8LYzSSghAbnDcULM0TPU1WUboTlYVrzpISM/IvEreSCamIsRBHfj9 DhxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=OKmoKFPA+ZYy/hUAI9OFMS9xv1Mzt2jaoQIoF31S6y0=; b=HmP09LO7oBD899XCInwOd1SKZy/5tZS3nmpofdy/s5/aHHDd5wgYzLQuO4Ot0YrYX5 P9CHC1WETAMGpQkTBY+kf4Hna3u0j2B6ftjcxF4w2aln8eSYYvNEo8yrZ8wHpQBLAVWo ZV58jyuZnm2hTHb97HXAje7kHkAcR19qgvJM+6Dy0hL3j2/Rq+fZp+JMNBrOkN/bLwlz AcPYv9zEkgiXB260EHWZHapjwR91QSLlSQOcaHydOWQswfqD034F/tVBt8UX6fTiEGHG v5hEJrTJi5aFq3i7wOiGHiadkRu1Iz88bvcbl4cAdtPT376swe8S4zEhxu8ztrqXTQT+ kWHw== 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 3si19066922plr.336.2019.02.20.07.44.36; Wed, 20 Feb 2019 07:44:51 -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 S1726174AbfBTPoK (ORCPT + 99 others); Wed, 20 Feb 2019 10:44:10 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:33243 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfBTPoK (ORCPT ); Wed, 20 Feb 2019 10:44:10 -0500 Received: by mail-ua1-f66.google.com with SMTP id q17so8409680uam.0; Wed, 20 Feb 2019 07:44:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OKmoKFPA+ZYy/hUAI9OFMS9xv1Mzt2jaoQIoF31S6y0=; b=V7XXofknQ8VS1LByZliI2FpHtTTAK4jwEzA2Q/XslXGmBrMYajpAAJLwOo9QFH1km0 vtmLE0HfFmLnZjoyJwiFhZbsYhJUsKjrYOzXjD4LMZSgM32fYK+m2hIIRa6SvNugmscy cQKNeHUNPNdJOpj1zX/QJIx0PWS1xjJXtf6EVIi8kB5KRhXamwMFC1/wbKXYgVt5Kr+Y aXfdg4pILy5aFWPFIpwIz3d5zwDSr4bDQtbKVEXhochtURbRq1Lwb3+C/n7IXasYsBAv BAXGHZUe2xq+5vDif0PDZj4R3PJWYQPezQVrTLgjmnSb/jVeZjjNgOlx0GKhdEjg6MHv gPVg== X-Gm-Message-State: AHQUAube89n0eFwihsOTuojgsjGCi0PXSvhIcAdcBFzoVu5sjvf6kfjw MvUirs6u/aXmhLE4XjiezTs9eJG55rLX8ZGuiOk= X-Received: by 2002:a9f:2f0b:: with SMTP id x11mr10966485uaj.78.1550677449039; Wed, 20 Feb 2019 07:44:09 -0800 (PST) MIME-Version: 1.0 References: <20190220150531.2462-1-geert+renesas@glider.be> <20190220150531.2462-7-geert+renesas@glider.be> <20190220153533.GH3516@pendragon.ideasonboard.com> In-Reply-To: <20190220153533.GH3516@pendragon.ideasonboard.com> From: Geert Uytterhoeven Date: Wed, 20 Feb 2019 16:43:57 +0100 Message-ID: Subject: Re: [PATCH 6/7] iommu/ipmmu-vmsa: Extract hardware context initialization To: Laurent Pinchart Cc: Geert Uytterhoeven , Joerg Roedel , Magnus Damm , Laurent Pinchart , Linux IOMMU , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurent, On Wed, Feb 20, 2019 at 4:35 PM Laurent Pinchart wrote: > On Wed, Feb 20, 2019 at 04:05:30PM +0100, Geert Uytterhoeven wrote: > > ipmmu_domain_init_context() takes care of (1) initializing the software > > domain, and (2) initializing the hardware context for the domain. > > > > Extract the code to initialize the hardware context into a new subroutine > > ipmmu_context_init(), to prepare for later reuse. > > > > Signed-off-by: Geert Uytterhoeven > > --- > > drivers/iommu/ipmmu-vmsa.c | 91 ++++++++++++++++++++------------------ > > 1 file changed, 48 insertions(+), 43 deletions(-) > > > > diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c > > index 0a21e734466eb1bd..92a766dd8b459f0c 100644 > > --- a/drivers/iommu/ipmmu-vmsa.c > > +++ b/drivers/iommu/ipmmu-vmsa.c > > @@ -404,52 +404,10 @@ static void ipmmu_domain_free_context(struct ipmmu_vmsa_device *mmu, > > spin_unlock_irqrestore(&mmu->lock, flags); > > } > > > > -static int ipmmu_domain_init_context(struct ipmmu_vmsa_domain *domain) > > +static void ipmmu_context_init(struct ipmmu_vmsa_domain *domain) > > ipmmu_context_init() vs. ipmmmu_domain_init_context() is confusing. You > could call this one ipmmu_domain_setup_context() maybe ? Thanks, that name was actually on my shortlist, and may make most sense. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds