Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp185415oof; Mon, 24 Sep 2018 18:36:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV60g59GQVrCS2CEf5lZ0O5hIyqvTolosXwfB+d/Lgj3GP0Nn1mQ/ubJSblJq4tG/Ty7rWA75 X-Received: by 2002:a63:df4e:: with SMTP id h14-v6mr1105510pgj.300.1537839372620; Mon, 24 Sep 2018 18:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537839372; cv=none; d=google.com; s=arc-20160816; b=FPU1VsTWCes0aHTFDLL9EHhSTdIuqHMqAO83T5pvJpWBhwiBpc57U9SlQh+JwJe8bE Lt0t50GIVsip1N1b49fQROMZ7tvlE+4kEG3J2/Z0J6dcCxP12CEAEOcbD3wzXYOie77D wAX7VfIunALyXLK1hK1xaIGzxBrckTg1Xo4FCSbwm1hRTgMPiYgbFwTdXCxRUXNpkFAt thAZd8oEQLLiPHbyxdY5oMZzAKvEo/KChEtxVPYq/H5XkClRifEB7o0wF97FoA9UuACl KkfSd5mzSo17xXtzomYNssZip6REdUQHHt/H6qCZB1jdyCbBJwTDckq5fJqoiOYi16uL ccjw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5Nt3UGAe2ghv2I3b32rDyWQzeC0rBjAmbAzPPihUJ1I=; b=FT8VsT9sL/8SeaPExwNGP2kKYhuuIhQwH7EoOdRFQwKUpzSiqj9VyTy9vNNt73I5xJ kRexZmdlp1jhutUPhBLAFJDL0nJQniJ0YIGhupQc0iq/wuTW+8kOGmDJdus96I/vYcHF wkqNJBn9yOgy5agQw8XwgWc7d93ODoZ45X1d5l0+HyGja4o4p4aB3iUCuVcd3izMb5U0 k0TPtNOYNNxS60W54haZwTo2f4qYnJxvaBrvoEhn02+LXUGYTRMYWkJDKP4weqrv1Cw/ ykpqGR/r36/HHopHp+882xfhmUiNjd4bPC2Crb+09GiklQ7rjkqF7L22uVro5lPGG0ET 4UyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FIdFF9ov; 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 y11-v6si777685pgr.217.2018.09.24.18.35.55; Mon, 24 Sep 2018 18:36:12 -0700 (PDT) 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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FIdFF9ov; 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 S1726425AbeIYHkv (ORCPT + 99 others); Tue, 25 Sep 2018 03:40:51 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41268 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbeIYHku (ORCPT ); Tue, 25 Sep 2018 03:40:50 -0400 Received: by mail-pf1-f195.google.com with SMTP id m77-v6so1328183pfi.8; Mon, 24 Sep 2018 18:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5Nt3UGAe2ghv2I3b32rDyWQzeC0rBjAmbAzPPihUJ1I=; b=FIdFF9ovKydNpN1ismDcpC8KZedLbezkaplTjaztdWyoLv33rhDl7Sk5A6a38Evv/r GkTCIUdL0ZXFei4+IG8jVhIComTEozDfoQOqwa7wbxH/635eydRt19heKg/Yuc3l02nu iYcB6YVAHCFFVIcMjf1Y31fIl9qjG4C6IEqMTr8OA6HxGGdJau05AisD7eyhIDAS5ybF svDq5jG7mQPxAajTk8YEpuEj2N2QV/2koy4karpKitKk29aVIeKKvviOra2p45Ju4CUS +SWH7zdLPo4OzkL2nDvI3Cz9eGmsPSRHg6WSOvfaaKjY6YhI2nNzBzmqGkn7G8Dlv6fA loDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5Nt3UGAe2ghv2I3b32rDyWQzeC0rBjAmbAzPPihUJ1I=; b=jt4YyZ3cteSplCjgDxLLhzzj9/7P1xSnq68xvDNJ33ZKSsBfoIFbis9CnBrdkP4wK5 Qr1LDsX9963mSYa6lW5cUYRD1IQhNYsR6+DIv5qXKNu6/tRdBxcrv7XIeUURES2/EXgn 2rTiLoPn8K6eztOKr3t+ac1Rfc7imq2yJ5JYwM930hH+sxcdhgiLTLt/+RVMOnkrDbAS fsOIRvo+6uK/s48xyLicR+ucQbBd8T5NvGJrttJPCsSb6apqqjbirBMBlX6xcZ7EqIXZ TqMRpK3Y4649yWMmqVUniJS+4sMii0LrzixArFSApHpShx01P1653/DEcZNveYAaRdy/ fT9A== X-Gm-Message-State: ABuFfoiO6lsv+p31MhZsVDxNPLSVO42SwpfoDrJQZc8Rjko//nOqWVju oS3875yjHn3ZFuWUnUCNciA= X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr1098541pgh.348.1537839351034; Mon, 24 Sep 2018 18:35:51 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id g66-v6sm716784pfk.39.2018.09.24.18.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 18:35:50 -0700 (PDT) Date: Mon, 24 Sep 2018 18:35:48 -0700 From: Guenter Roeck To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Paul Burton , Jason Cooper , Marc Zyngier , Thomas Gleixner , linux-mips@linux-mips.org, Ralf Baechle , SZ Lin Subject: Re: [PATCH 4.9 111/111] MIPS: VDSO: Drop gic_get_usm_range() usage Message-ID: <20180925013548.GA28493@roeck-us.net> References: <20180924113103.337261320@linuxfoundation.org> <20180924113116.349047480@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180924113116.349047480@linuxfoundation.org> 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 On Mon, Sep 24, 2018 at 01:53:18PM +0200, Greg Kroah-Hartman wrote: > 4.9-stable review patch. If anyone has any objections, please let me know. > This patch breaks v4.4.y and v4.9.y builds. It includes asm/mips-cps.h which doesn't exist in those releases. Building mips:malta_defconfig:smp:initrd ... failed ------------ Error log: arch/mips/kernel/vdso.c:23:26: fatal error: asm/mips-cps.h: No such file or directory Guenter > ------------------ > > From: Paul Burton > > commit 00578cd864d45ae4b8fa3f684f8d6f783dd8d15d upstream. > > We don't really need gic_get_usm_range() to abstract discovery of the > address of the GIC user-visible section now that we have access to its > base address globally. > > Switch to calculating it ourselves, which will allow us to stop > requiring the irqchip driver to care about a counter exposed to userland > for use via the VDSO. > > Signed-off-by: Paul Burton > Cc: Jason Cooper > Cc: Marc Zyngier > Cc: Thomas Gleixner > Cc: linux-mips@linux-mips.org > Patchwork: https://patchwork.linux-mips.org/patch/17040/ > Signed-off-by: Ralf Baechle > Signed-off-by: SZ Lin (林上智) > Signed-off-by: Greg Kroah-Hartman > --- > arch/mips/kernel/vdso.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > --- a/arch/mips/kernel/vdso.c > +++ b/arch/mips/kernel/vdso.c > @@ -13,7 +13,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -21,6 +20,7 @@ > #include > > #include > +#include > #include > #include > > @@ -101,9 +101,8 @@ int arch_setup_additional_pages(struct l > { > struct mips_vdso_image *image = current->thread.abi->vdso; > struct mm_struct *mm = current->mm; > - unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr; > + unsigned long gic_size, vvar_size, size, base, data_addr, vdso_addr, gic_pfn; > struct vm_area_struct *vma; > - struct resource gic_res; > int ret; > > if (down_write_killable(&mm->mmap_sem)) > @@ -127,7 +126,7 @@ int arch_setup_additional_pages(struct l > * only map a page even though the total area is 64K, as we only need > * the counter registers at the start. > */ > - gic_size = gic_present ? PAGE_SIZE : 0; > + gic_size = mips_gic_present() ? PAGE_SIZE : 0; > vvar_size = gic_size + PAGE_SIZE; > size = vvar_size + image->size; > > @@ -168,13 +167,9 @@ int arch_setup_additional_pages(struct l > > /* Map GIC user page. */ > if (gic_size) { > - ret = gic_get_usm_range(&gic_res); > - if (ret) > - goto out; > + gic_pfn = virt_to_phys(mips_gic_base + MIPS_GIC_USER_OFS) >> PAGE_SHIFT; > > - ret = io_remap_pfn_range(vma, base, > - gic_res.start >> PAGE_SHIFT, > - gic_size, > + ret = io_remap_pfn_range(vma, base, gic_pfn, gic_size, > pgprot_noncached(PAGE_READONLY)); > if (ret) > goto out; > >