Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2327029ybv; Mon, 24 Feb 2020 03:21:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxf4G9zOrtIoaMZ4tiSIsatLeA7VQ+urw76SMWDVYXGsMaQ6vUMIpHgF8pmRlscZyF1e1t3 X-Received: by 2002:a9d:3b84:: with SMTP id k4mr26915205otc.18.1582543276187; Mon, 24 Feb 2020 03:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582543276; cv=none; d=google.com; s=arc-20160816; b=04O91bVLmYaHMBqmX0vNFqbOW0maJorYzi/7FQJqbAjWSdDbhMJ2eSHLYpQt+9CPwc k0xXmA0SVkBO8BrY2yA8P8IeGC62aKXwvMDXa/aO7t81l7UCgz5wQ2wp0VsVf4JJgxGG 9+FmWEsQOAsun6tNt09x3VzKCVG2o2eqMLoJB3VhJq1MQ8G7g886/qgfTpzvdfFBl/gn ZdX79q5lmnjmZIO0zen9KCqM2C90/Vg0m7yIZc4Yaj1nrKku5oBMRQgfXqqgZ2c9YOgy 3rmBzeOv9pZQjrsroWqy/2tKbpDsqXdYT7Usut9lwPu40flAa7FXAcweiLNXbLyy7RFe MSMg== 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 :dkim-signature; bh=+wONJGVe9s4Bl7gjgZbahAyOuf9jGgAtF+ecHMa9lp0=; b=Kbfm3vNLRmazbWP7KxAuf/bD0/oLJ5Ehi8Rc21g7ZXE0GeptAil7kVx6R85DuiRUqJ veffDQFuCaHAYBNw0onz2Q3XglFTBraBWPXKfpreJbxm0sVAyPwystaK61FkdrlcEWrg 0KJ+d/SDZ9trVRViUT5OKscf7SfQwkT8Cf0WErJ8Qkn7qL9iknC256j018bE3mZ4ylKs 0FL/9gBAeobsdjYw/B+EZ3yiCYCKF5lA4YUC3FJ0aFwAZk988wz2Gm9NvKrHXNKM6gxo fZZSvkXK8NU7nYJPvztq7vG1C/KJtVzWElCE7hOcXtv48GGSuByZU6KbK4aP1jeFhsa1 AaQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=h5wCvxA4; 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 e7si5929333otp.260.2020.02.24.03.21.04; Mon, 24 Feb 2020 03:21:16 -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=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=h5wCvxA4; 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 S1727325AbgBXLTO (ORCPT + 99 others); Mon, 24 Feb 2020 06:19:14 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36850 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgBXLTO (ORCPT ); Mon, 24 Feb 2020 06:19:14 -0500 Received: by mail-wm1-f67.google.com with SMTP id p17so8947880wma.1 for ; Mon, 24 Feb 2020 03:19:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+wONJGVe9s4Bl7gjgZbahAyOuf9jGgAtF+ecHMa9lp0=; b=h5wCvxA4bLUMMqSuoshcjszaDujgZ8dr7gAzD+iwMC4yEe4kWLffr49NHhKbTzxUmd uSElXTHIzon7iNn4WkgFHaIOgF7OQ7CE/fwUEIFjKLuOORCMcG1TwGFfCIVq/PNYE734 aQ+ygQ8rI3u7eoPWw50I0XSst9PdCRCj1WAaQFNe/J+23ChJWEnd+GBG4Dx0WUFBHCeu XY4aa9AaCQP8mD0zqECOEAwMt6qxQesN1DE135oaXLyjcnqzcaz5d57UrBr4tn8b1vc4 2hP5jw+dntMIbu9TjlLkEOZAU4ZC0ktHbKJaAD94S/g2aV++vTSj6dQErva9rXqn/Orf mB/g== 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=+wONJGVe9s4Bl7gjgZbahAyOuf9jGgAtF+ecHMa9lp0=; b=UGDuK6nSchojWxQUlRh2qkf7YCQsDjnv7RGEhYMJsJjduWabziC+bddlt/zReHeELs 9xt5kXvdaofthE62QtO8I1ISVFSjcOwL47t5fNix1KzqfT1+BH6wIqMXNs8v8e5H1MXP AlIhcUZe0CaZIwduzRg36Kdc06Z3vvOWZvBS25YYbGie2M/dKdP5HUPrJ7m1gYIxbiQi z9DgdAsBfN6impt8/6viZdK4nxC93fRYmDJ2iczfRgp7FokGXk5mSrbzF7XFWOo9IRNh gGV/Gd43st7oWOdgtOT0F/IZbJ8TpjMKRgtubKJkLKlfZmIKND3F39Z4KFPpZhB6z1jQ XoQg== X-Gm-Message-State: APjAAAUbV5eUK+xZ/7KRPL0nnsjpVtZ+s1BReiKmFqSvo8rLHJfIPoii PboL1zY82YvsnjoQiCn5GhKl2BPROLz8zHM579vh1AFuWxc= X-Received: by 2002:a1c:3204:: with SMTP id y4mr20955022wmy.166.1582543150802; Mon, 24 Feb 2020 03:19:10 -0800 (PST) MIME-Version: 1.0 References: <06e23d4a305d87bb1f3403b3130f130d784399c1.1581426806.git.michal.simek@xilinx.com> In-Reply-To: <06e23d4a305d87bb1f3403b3130f130d784399c1.1581426806.git.michal.simek@xilinx.com> From: Michal Simek Date: Mon, 24 Feb 2020 12:18:59 +0100 Message-ID: Subject: Re: [PATCH v2] microblaze: Kernel parameters should be parsed earlier To: LKML , Michal Simek , git Cc: Andrew Morton , Arvind Sankar , Geert Uytterhoeven , Greg Kroah-Hartman , Mike Rapoport , Shubhrajyoti Datta Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C3=BAt 11. 2. 2020 v 14:13 odes=C3=ADlatel Michal Simek napsal: > > 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() attempt= s > 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/setu= p.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 =3D 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 > Applied. M --=20 Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs