Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp286237oof; Mon, 24 Sep 2018 20:38:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV63MOH93dyg4oTbkSxctX4Yf0upF0clfIncsPlotjS4933WQcrqmqFedVfs2YMyVxmdyWby4 X-Received: by 2002:a63:dd49:: with SMTP id g9-v6mr1425168pgj.356.1537846734800; Mon, 24 Sep 2018 20:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537846734; cv=none; d=google.com; s=arc-20160816; b=fA11h7QhHHPbcw/G/NMJdfpMeFev6AsdQ5RJB0FxcIugCREOdMv75kA3H7vkvHwaym VkwUsW9/5INiTxugr3cwYQ09WlQgKW7chNp7u+9mZEZQjh8l41Jbgv1CBSQ2c4ep0ffq lm76f58/gYJ8yrB6UOZu4xkLjmf4ncJIuO3ZIyRAdGthDLOJUXrSPbiwzhXAiJKIiRx2 LD8kX0PnVLK8xxyJVCnKM1TFOwc9AMzpy9fASGctY/qJXXTJAunv24HU4dHni+8A84Ec FpU8+8e8DT0Ne+vzLFwrtQpzBisnSdpdn4y7VQJkO1yivxYaQIiE6A6VopSfzZReJWrT qk7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=fJ/ASccyoeHkUHmh1BW1vVQ0/gS4T8SEfP5x42JnegU=; b=qKf2VkdAl3nLNf6lnGDLpSDJvnfXBUFjvynQcrgf+OgY0TeUdmySklh0fzrQBaIqar /IrR7iP/r3ygViIhpXVmgdt2J3F9sALY+X5t7A0fU3ZxKMNAJNUPt06S37MNgTa7i3mD OjIqT+Vt9xWAcom3F5Q9p4fZMCOVbdSz7I+39uzspboZmQ+s4ba4TXFW3Ek662oPcBBM YSKiczb+c/uKc3F/ml1L4j4bRa8PFsYpa1heQ8LQxF/dtABc7Z5V1nz4lT3q/ER9ybsa ONdXc6dAopou0wRYRdCIdiUcmrsx5m2oIJHVJzXYiMPy/YAxqJo6QwPe3n8+uk+jo9aF YXyw== 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 y22-v6si1129160pgj.436.2018.09.24.20.38.37; Mon, 24 Sep 2018 20:38:54 -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; 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 S1728087AbeIYJoA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Sep 2018 05:44:00 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:39192 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727453AbeIYJn7 (ORCPT ); Tue, 25 Sep 2018 05:43:59 -0400 Received: by mail-it1-f196.google.com with SMTP id w200-v6so5229287itc.4; Mon, 24 Sep 2018 20:38:32 -0700 (PDT) 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:content-transfer-encoding; bh=FHHwzBW7g3qOnNhrt/f9DbTQ5B0XU0w/gTZNaswBLkU=; b=REAGCY34IbqTtuqGFbiRoCpXCQjxGH/O1VEQj8dz9uc/YFDc9efE099jYWHe1R/IAl xwUvyQ8lcAdnwJf30PY/7C3JRcLh1Y8Bl2SwLfT10V04erd1ETu+wbzLyRIY7rQoe+tx qEoz4GmEO+aCTREnUlAxgZd32nYJjLCWxZLnVJMJP1/sp9Ejt4g1qbcNGg/ujmZS5grj 9nxgbYcV2efT50JKTgD7dNIGKNY633H2AToUFG7SUtJ5X8UozFW07WeK6NUIaOX42NCg d1PKzYPimoiL0GG1LQ6WmPAIYAJ+bfck9XSY3d9uEwAmvU4tkZDiyut+P3DD3L5Vm2jw xTNA== X-Gm-Message-State: ABuFfojBIrxWX7/TFE6Eih13nQCe2E2WdSxF5G9cQ4pcaUinl5zh5rbv rjxaxclXEtkSbR6Pfu+FWeXsuKBjCWV0hg== X-Received: by 2002:a02:98db:: with SMTP id c27-v6mr305751jak.24.1537846712023; Mon, 24 Sep 2018 20:38:32 -0700 (PDT) Received: from mail-it1-f174.google.com (mail-it1-f174.google.com. [209.85.166.174]) by smtp.gmail.com with ESMTPSA id z195-v6sm478693iof.71.2018.09.24.20.38.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 20:38:30 -0700 (PDT) Received: by mail-it1-f174.google.com with SMTP id h3-v6so13617199ita.2; Mon, 24 Sep 2018 20:38:30 -0700 (PDT) X-Received: by 2002:a24:ad2e:: with SMTP id c46-v6mr1209191itf.82.1537846710225; Mon, 24 Sep 2018 20:38:30 -0700 (PDT) MIME-Version: 1.0 References: <20180924113103.337261320@linuxfoundation.org> <20180924113116.349047480@linuxfoundation.org> <20180925013548.GA28493@roeck-us.net> In-Reply-To: <20180925013548.GA28493@roeck-us.net> From: =?UTF-8?B?U1ogTGluICjmnpfkuIrmmbop?= Date: Tue, 25 Sep 2018 11:38:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4.9 111/111] MIPS: VDSO: Drop gic_get_usm_range() usage To: Guenter Roeck Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable , paul.burton@imgtec.com, jason@lakedaemon.net, marc.zyngier@arm.com, tglx@linutronix.de, linux-mips@linux-mips.org, ralf@linux-mips.org, SZ Lin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Guenter Roeck 於 2018年9月25日 週二 上午9:36寫道: > > 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. I am sorry for my fault, thanks for your report. Since the patch b025d51873d5fe6 "MIPS: CM: Specify register size when generating accessors" which created asm/mips-cps.h is not a bug-fixed patch, hence I will not backport this header. Hi Greg, Could you please help to revert this commit? This commit was intended to fix dependency of 70d7783 "MIPS: VDSO: Match data page cache colouring when D$ aliases", but I saw 70d7783 was merged before this commit; therefore, I don't think it is necessary to keep this commit. I apology for any inconvenience caused, and I will be more careful next time. SZ Lin (林上智) > > 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; > > > >