Received: by 10.192.165.148 with SMTP id m20csp3477946imm; Mon, 30 Apr 2018 00:24:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqcG7OnLj/k/xjb4USxB8d7HHrJ1ucOkXx8tzMwgv9BsZLrkEFxrrMzanKYvqUfjKKh9zS+ X-Received: by 2002:a63:7352:: with SMTP id d18-v6mr9521213pgn.52.1525073099670; Mon, 30 Apr 2018 00:24:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525073099; cv=none; d=google.com; s=arc-20160816; b=MMZfNhhZRRgz9xtY3UhGdzqTNCdqcul7Lw1Cbuzj/e5rp1EBkp5M+BUkW8DfTEdspP MJztLU2GgaCka2Kq98BFdWPMwuJpngAg3WxFlXZVsTlJhOBNV6TpweZzvNM1wB9E1ylK EdstOWCh4MQJsimidgoU6zDJep5hrDN1kwEOtg64oXTiXC5aL+LSm0vBAKiTSb+SoGbd md8NbBkxqG2MURF5Xk4ElO6iB9JVgr/kcb56DUG521/mPVIbYskQLqto5d8onzbN5ubH F/8jHXoY8TbCq2vkjk4Pfod7wRGbHcV8fkzsEuF91acf6zE+bAhQU0GSeFptgn9i2Cft xDDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=qlQppYJ14sptOMsCUQgDCXRJRdPNYtf6oJoRJnH17es=; b=LOn1a+jG+C9My8L1LtsVPJyq2t7MV837MMOW/cgq4cLBkXJ5OjO1puiFESMgwD5GoN dKwfArhVXLA+rnlAup8ReD1CAxw+SeJVAY18xjn/71T5lvW3hJXdWJue/EO2s9yC/W4k GeGMukbPzAU8I50rv/Ph0rsF3onoVcdW0L6BlguTlkKqlmM5wJYEoRQFWlqtQAysPwZL Ax4UeBdpq2F21LcMNiy4rI475AU8abkozK/5vdwLDMuCJNQAuDFYeyDgY0h3uzM28bTK C6ZwtNYrLULHPosgPMHreX+e/RLbcNrbDQSo+d+fusHVS7BQgyw/0dxBQuCi8wqYR1KS 6SSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qZmur6SE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1-v6si5825473pgf.398.2018.04.30.00.24.45; Mon, 30 Apr 2018 00:24:59 -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=pass header.i=@gmail.com header.s=20161025 header.b=qZmur6SE; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030AbeD3HWd (ORCPT + 99 others); Mon, 30 Apr 2018 03:22:33 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:39239 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618AbeD3HWc (ORCPT ); Mon, 30 Apr 2018 03:22:32 -0400 Received: by mail-pg0-f67.google.com with SMTP id b9-v6so5745767pgf.6 for ; Mon, 30 Apr 2018 00:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=qlQppYJ14sptOMsCUQgDCXRJRdPNYtf6oJoRJnH17es=; b=qZmur6SEXGbPEACN+GFNC+YMDt+ysyQ8OlPdY/lfq6ABUq+MjT6mFKPJeuRC1KiDnB y0UzmpLzgN2LF/AGJ6YIcOEHe1cLoHvam9Fb321y54CLKSqC+LrWOCB3MnJfW+qfBGA8 +L6VEnX1NPqz1N6OjLHh/jG+j1x7s/MbPH7iYlLrHS+VKN6ifGgqYnZAW8VtvgtpXLk8 Def0Z6lafsnVEsIZ9MIXQhnKO6yRcdUYGNWLZ3/EWtUIRdZ5unlgjvwVwvWf5rnCArmt RoateB86HGqov+z3gMJa8HvPpgf0VMrt1EHLZLLTKwu8h1dw8QVUis6LP7C0Y/lEyUBI cnvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=qlQppYJ14sptOMsCUQgDCXRJRdPNYtf6oJoRJnH17es=; b=kZxuT76QpEFX+4mHmo2mUwl2z0KJgNEhcgzYR3WBGjdS+G5wwI73mOLRAs/lk+4fnT iDKLdhmro6OVHnIQ94C//A7KGK+Rz1gjF9zH/NqKmhe53Se4ILlWdwTUbNTzP8+1znry LTtI8lt2enSK2+4bok875mJUcT3reCHCsWy9HD+9M4BcodNDHqAW0Z8KusZxxs2GQ06s 4A1Tz5MTQmcxoak/zxc7V9ePB9RhYi83DSrvVW6EYz5lPkQyXnbG3akNADT2KS0ZM2IC oYx2efiPxJmyn3BJgopfwFo9sYEathLl3z5xLMPXIzutAR8geSm270xKJ3VicA0HrmHl AW4g== X-Gm-Message-State: ALQs6tB66BTec5Tx3GjeV8bcfKsmhG5FFkqyOur+Gc0vLPwVjcRkE+ez U8y+N6+KGVXswg1UnJtazJEv0w== X-Received: by 10.98.80.145 with SMTP id g17mr10823141pfj.71.1525072951595; Mon, 30 Apr 2018 00:22:31 -0700 (PDT) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id i2-v6sm12243108pgo.57.2018.04.30.00.22.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 00:22:30 -0700 (PDT) From: Greentime Hu X-Google-Original-From: Greentime Hu To: linux-kernel@vger.kernel.org, arnd@arndb.de, greentime@andestech.com, green.hu@gmail.com Subject: [PATCH 1/3] nds32: Fix the virtual address may map too much range by tlbop issue. Date: Mon, 30 Apr 2018 15:20:39 +0800 Message-Id: X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We use tlbop to map virtual address in the first beginning, however it may map too much if DRAM size is not that big. We have to invalidate the mapping when the page table is created. Signed-off-by: Greentime Hu --- arch/nds32/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/nds32/kernel/setup.c b/arch/nds32/kernel/setup.c index ba910e9e4ecb..2f5b2ccebe47 100644 --- a/arch/nds32/kernel/setup.c +++ b/arch/nds32/kernel/setup.c @@ -293,6 +293,9 @@ void __init setup_arch(char **cmdline_p) /* paging_init() sets up the MMU and marks all pages as reserved */ paging_init(); + /* invalidate all TLB entries because the new mapping is created */ + __nds32__tlbop_flua(); + /* use generic way to parse */ parse_early_param(); -- 1.9.5