Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4881601ybv; Tue, 11 Feb 2020 05:15:37 -0800 (PST) X-Google-Smtp-Source: APXvYqy6XhlAMInsGQPNrwXiLAH23V7awC4GLEMDrgvc17fK78J0/eJjXbG/vLWz9zcrxQ0Qc5TE X-Received: by 2002:aca:ab53:: with SMTP id u80mr2743058oie.94.1581426936878; Tue, 11 Feb 2020 05:15:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581426936; cv=none; d=google.com; s=arc-20160816; b=pdglmlZS0BaKc609rJx0j22ULAJgTx11vq3biVrTpb/QDzQZbZlkgghMlKCChBWrHe Z/CsyLE/RuCORKQXZPCjVgtX/SADZp1psKPQQ8PEZK/Jz+ErtQLCpdy9Ld5IJYAekmqp /FQKcXG+IeQlNRaNe9VW4FXo0OmIOZKeASzc2ddfYz05VhIDoNDRrY6XdPWfpaFEMaXD WiDyh9eVPaVSVEmxiJgXMBkNdf7vdLh3fjdrZWAulwG+RV7KD9kCUS8QLeHDj8gYoIfx EFhZX6Bouf14gAPRMi1VkbYPHG+AfUrGN+na4RzNQbTBMtqKW1J/CYHU6v/kLcq1JvXW nPeg== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TM3D5gJmLNcWVrpmlMmrLPvgDmF2FwGOuN5DI7d3s1Q=; b=WT1NHtNHVQFNMy5Z13Q1vWMPCgt324XqaSW7Lzjkokhae/vDu9agrIAiUU1UMjCkG3 UkeJeuryqE39uX7j/mPwyZq5dKdtpRqWote8GZLQDyeAqsj0EztUt/5G0n5Sd7Am5vJC jmqeY4bqJaS/puseRZB6ns02kwo19fjevnaHJLahLC8JVCTae+NNOId6UhR+1Vkb7Qri KsXx5+GQGdEqpkLbhZIoyWLw2fDVz9fob1YFrZ4kD3Tfll6J4pGPe43y6UrJm4A5B5Vw y2Quf5FrJEur77FhmFmNUaG/4qH+tN8468aTqDXkd8bnx+WS4TsqEgJSpqd6spfIffWQ BLGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=AhDcWTYs; 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 t127si1895894oih.45.2020.02.11.05.15.24; Tue, 11 Feb 2020 05:15:36 -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; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=AhDcWTYs; 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 S1729131AbgBKNNf (ORCPT + 99 others); Tue, 11 Feb 2020 08:13:35 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40941 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728604AbgBKNNe (ORCPT ); Tue, 11 Feb 2020 08:13:34 -0500 Received: by mail-wm1-f65.google.com with SMTP id t14so3519661wmi.5 for ; Tue, 11 Feb 2020 05:13:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TM3D5gJmLNcWVrpmlMmrLPvgDmF2FwGOuN5DI7d3s1Q=; b=AhDcWTYsyh0N+Ep8GLiV9XmWq4Rj+NQC5sqjSOU5PxOAHfnwDML0cTkwS0SZgftZR9 SoCNDybhZ7GW4bCi9AIJEOKj8d1hAZWjTEfmOi37ybqt/YnUgdOeKLSCmdPqC4+3LN8B 3FQtAvk4bI7F4NN29FsGgjUe8ncwyh7RTaSJiyEToYQBQrfHusokHwwGsaOgr9e+qUFR mjPGWm7OthZhnV6HZ9/IBq61MNVubH2MaMUNr2N/myYiIeTuB4SXZZ183bhXRKO5ZMG9 kMfgeWeBVx/oUP3aCKcg0ctSFUtEr7CGeD6g7pl+1BwA1NGxCPB+1k4DrStgOucxEXRu hWxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=TM3D5gJmLNcWVrpmlMmrLPvgDmF2FwGOuN5DI7d3s1Q=; b=rK39psfu3rvRrnleKBz4uuqiQvqczBnxVSyj4g9+TpHGPn2lg2fexuJKG1+QHJf70w G6sGnO90HfaNDTTNwFeVEA3lGPQE3hFy13TPSSRoUIYxMfLV6lgwrS0zubCqOLis+40F krTw0Ma4nKTKHOtsH0lVDLZdbz71qR3VFQ+9ATabrpO2jJHgK1NlY/oOofKQ6WX4WCke W1rtTuLsceFRk+6LaRGcoIjP9+aA4QtbnQ6OUegTclWd4lAZ6SX6StlSZEZE9hHe+woZ RGHIsDHTRf6rxmKA+Vgh4MKMtpTOxKhzhg7eaeJVG+AacoepRCymPV0OkiEQOCePu2uQ OpgA== X-Gm-Message-State: APjAAAVDY/PTppIDsq56leW2fZ6wYwuiC5m1zG8Ut9d4+SHLKQekExqL V+Hbnj+LUnGyRKaWAfUaJR9ykeXG2ChK6g== X-Received: by 2002:a1c:66d6:: with SMTP id a205mr5620935wmc.10.1581426812372; Tue, 11 Feb 2020 05:13:32 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id x11sm3694490wmg.46.2020.02.11.05.13.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Feb 2020 05:13:31 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Cc: Andrew Morton , Arvind Sankar , Geert Uytterhoeven , Greg Kroah-Hartman , Mike Rapoport , Shubhrajyoti Datta Subject: [PATCH v2] microblaze: Kernel parameters should be parsed earlier Date: Tue, 11 Feb 2020 14:13:30 +0100 Message-Id: <06e23d4a305d87bb1f3403b3130f130d784399c1.1581426806.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kernel command line should be parsed before cma initialization to be able to get cma sizes from command line. That's why call parse_early_param() before dma_continugous_reserve(). Unfortunately it can't be called earlier in machine_early_init() because if earlycon is passed in the command line the parse_early_param() attempts an ioremap which fails as the memory params are not set yet. Signed-off-by: Michal Simek Signed-off-by: Shubhrajyoti Datta --- Changes in v2: - Fix case with earlycon arch/microblaze/kernel/setup.c | 1 - arch/microblaze/mm/init.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 511c1ab7f57f..a8fc15ac4291 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -54,7 +54,6 @@ void __init setup_arch(char **cmdline_p) *cmdline_p = boot_command_line; setup_memory(); - parse_early_param(); console_verbose(); diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 1056f1674065..9899ff2ef9b6 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -347,6 +347,8 @@ asmlinkage void __init mmu_init(void) * inside 768MB limit */ memblock_set_current_limit(memory_start + lowmem_size - 1); + parse_early_param(); + /* CMA initialization */ dma_contiguous_reserve(memory_start + lowmem_size - 1); } -- 2.25.0