From patchwork Fri Aug 31 07:30:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 964303 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421rjS5lSCz9ryn for ; Fri, 31 Aug 2018 17:34:52 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rK6IkZ2p"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 421rjS463PzF38x for ; Fri, 31 Aug 2018 17:34:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rK6IkZ2p"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com; envelope-from=kernelfans@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rK6IkZ2p"; dkim-atps=neutral Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 421rcy2CbxzF38W for ; Fri, 31 Aug 2018 17:30:57 +1000 (AEST) Received: by mail-pf1-x444.google.com with SMTP id p12-v6so5128845pfh.2 for ; Fri, 31 Aug 2018 00:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WyZt6pR7Usw98fARtpjcE0IK54BQMvDCQM9wkn2SRu0=; b=rK6IkZ2pAuQZLJApXEe0swnA8MgLJTg0sJSdgYGBdinFnYG0CRYhu3ZHlx9h4ud/BG 6kg/Ys1Kqdl4U2hLkeUDr8PfFwzmOlFfKU5tc17b2MH+jhhU/5zj3P0EgUfBReRZ09Uu K+8822U6DMjrJIlfMOCOA2eUjBmKyA48aFg5OeCWfV9EpQcyyEllqU3L7zSR8OAIJyvU efcKNAWNAweWobA31WK7+y/sf3TIPIyffUDwB4BTt9NEjITiXjkmi6CweWGXsJPORfit cv3EDDAVk7M8fLD/Sf21VjUekZkzWf1Oow2v/kciureP27riBRKrZfvzEpnm480p9i0i HUvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WyZt6pR7Usw98fARtpjcE0IK54BQMvDCQM9wkn2SRu0=; b=RHsDt/rzERF9yKqyv63zStXmasOhIce44vsh4crNObGwirAGYwl1E6C9bFSjaGYlEz Rwyq5TJEQbiCT17uKfRxbH+VpLhpntlNkG1p9w+oxMge2aeaLd1PITgtECkw9ItAZtrQ wG/3QtyhZ149M/yaOAi1FtFVKC/eD7RgotOGaLiwWLQ1OWOQQK6kV0z+SZpoqLmD/Lqi PdyFLYNgfDDihNCXXb/RVwo0pFBHtRFwVDe0j74Pt/ZYNPrQLp8Q8huH41RCYekXdp/3 QBBA8L1zj/7H0oizQOx49A9Ljiu2Elx9TzMyqghTqn6dbwX6tZIYAEU7zQ28qaCT7HPk yAyQ== X-Gm-Message-State: APzg51De7quyHaK1SiyCZSj88xcfbFNB14Ycu1z0EzwvfIObxGhvDJ6B nxkpOkKXTdLsoXrhuzRwj95X6bI= X-Google-Smtp-Source: ANB0VdbTMpVIyD2EKwMdw/nIDYTqeCrl4SolGuI++VqjfYTikYOIDPFG+/Z9lPUZ0NdnUzPNVjrY2g== X-Received: by 2002:a63:60c1:: with SMTP id u184-v6mr13141334pgb.266.1535700653428; Fri, 31 Aug 2018 00:30:53 -0700 (PDT) Received: from mylaptop.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id h190-v6sm23358156pge.18.2018.08.31.00.30.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 00:30:52 -0700 (PDT) From: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 1/2] powerpc/prom: move mmu_early_init_devtree() before early_init_dt_scan_cpus() Date: Fri, 31 Aug 2018 15:30:22 +0800 Message-Id: <1535700623-23750-2-git-send-email-kernelfans@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535700623-23750-1-git-send-email-kernelfans@gmail.com> References: <1535700623-23750-1-git-send-email-kernelfans@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mahesh Salgaonkar , Pingfan Liu , Anton Blanchard , Hari Bathini Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" In early_init_dt_scan_cpus() -> allocate_paca(), using ppc64_bolted_size() to get the limitation. Although MMU_SEGSIZE_256M is enough for boot cpu's paca, but in fact the bolted segment size may be MMU_SEGSIZE_1T. Hence moving mmu_early_init_devtree() a little earlier, and let any callers of ppc64_bolted_size() get the right value. Signed-off-by: Pingfan Liu Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Hari Bathini Cc: Mahesh Salgaonkar Cc: Anton Blanchard --- arch/powerpc/kernel/prom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index c4d7078..cae4a78 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -760,6 +760,7 @@ void __init early_init_devtree(void *params) DBG("Scanning CPUs ...\n"); dt_cpu_ftrs_scan(); + mmu_early_init_devtree(); /* Retrieve CPU related informations from the flat tree * (altivec support, boot CPU ID, ...) @@ -777,8 +778,6 @@ void __init early_init_devtree(void *params) spinning_secondaries = boot_cpu_count - 1; #endif - mmu_early_init_devtree(); - #ifdef CONFIG_PPC_POWERNV /* Scan and build the list of machine check recoverable ranges */ of_scan_flat_dt(early_init_dt_scan_recoverable_ranges, NULL);