From patchwork Wed Jun 8 13:49:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micha=C5=82_Osowiecki?= X-Patchwork-Id: 632273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rPqbX1tvbz9s65 for ; Wed, 8 Jun 2016 23:51:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=hjWT3oQz; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAds7-0002Vz-RC; Wed, 08 Jun 2016 13:50:15 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAdri-0000mK-8b for lede-dev@lists.infradead.org; Wed, 08 Jun 2016 13:49:52 +0000 Received: by mail-lf0-x242.google.com with SMTP id s186so862510lfs.2 for ; Wed, 08 Jun 2016 06:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=sFkKkHp5EvWodQIz4QwsI/WvuDQB3VjZabDBmSqXRzI=; b=hjWT3oQzaPcQXDOVXZJrrqKGPrPcVDKj5aqVJBae9arDQgD9QHMJYY/9zHGV8xnUo/ 2Fq0AIRkiYM96NKhVtb/3oivzpS4hSMTwGI7MwQYLsvD5nmn/dxegstH+QIIit+t4Ei8 oteGni/lq5+zayZ+5xn6MxPljL/pr4sFO8PWje/fdhpzQcJHe7a4JLkCeeRmC6HfaI8n 7eK+UJNuknoqySsR+7+lGZ3gMoy8iwM01UzpOAGLInq9N2xLzt8yjFPHxIr05ah2r2l6 PzYW1I95MVQssaymJVtyPMJLGaqfqYhyQtr87SxYSuEoouz6z+j6T/bqBQJJpLuWrD/d A+fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=sFkKkHp5EvWodQIz4QwsI/WvuDQB3VjZabDBmSqXRzI=; b=PPWTcTKLiBTad3oYRMeP1y9lX0FFMnIW5li8db0MtShTBJyqpWO19avR3SWui8Iedg VOBTJ8jAFrKg0FsYin+pU2ntL6y0rg5OSXTlflpwLvSdPaDEUEY90noYdZNmv+mgW5us /Gf08tm9jyO7aMagwYFgTV2O2qyIv4kb2aisjYLP6H9s8oPpYkxj0hONfLo9bNAQDLV1 2bYkwrISPMXlqe3XJxlT/T8cymvIP8iKofIE4CtgYo3tkRYSDqWXaojCQCTMQOD0ljws LGoDHUgUaedAvqe07sfUpi9Dg6fW+GteU7TZhIZQ3tXVWnPPFaRTCyJTcdzlZbWcmPJB iyjQ== X-Gm-Message-State: ALyK8tLx34vpSumv02lgEnE0O/91nDt5zIx0bEFU7nBBfqeSELpEOtoOgLpzSbpmP4icxA== X-Received: by 10.25.139.136 with SMTP id n130mr4035099lfd.209.1465393767570; Wed, 08 Jun 2016 06:49:27 -0700 (PDT) Received: from [192.168.2.102] (c43-66.icpnet.pl. [62.21.43.66]) by smtp.gmail.com with ESMTPSA id f64sm155301lfe.24.2016.06.08.06.49.26 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Jun 2016 06:49:26 -0700 (PDT) To: lede-dev@lists.infradead.org From: =?UTF-8?Q?Micha=c5=82_Osowiecki?= Message-ID: <57582266.8020105@gmail.com> Date: Wed, 8 Jun 2016 15:49:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160608_064950_731662_3CED5F07 X-CRM114-Status: UNSURE ( 6.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michal.osowiecki[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] cavium: Ignore MEM boot param when too small X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Cisco RV0XX u-boot sets MEM=2048 as boot param. We assume that at least 4MB (mem_alloc_size) of ram is needed to run linux on cavium boards, so if mem < 4M - ignore it and set default value Signed-off-by: MichaƂ Osowiecki --- a/arch/mips/cavium-octeon/setup.c 2016-06-06 18:15:32.000000000 +0200 +++ b/arch/mips/cavium-octeon/setup.c 2016-06-08 15:28:56.642919151 +0200 @@ -941,6 +941,11 @@ * to consistently work. */ mem_alloc_size = 4 << 20; + + /* Ignore bootarg MEM <= 4MB */ + if (MAX_MEMORY <= mem_alloc_size) + MAX_MEMORY = 512ull << 20; + if (mem_alloc_size > MAX_MEMORY) mem_alloc_size = MAX_MEMORY;