Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp286436imm; Fri, 5 Oct 2018 03:56:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV62b8AOsGlxiqPtciMRnfNeQE4EI2XPBDhcivVFE51kh1Yf092n9ABS/ov+Ye9B6WM1aBLbc X-Received: by 2002:a62:3942:: with SMTP id g63-v6mr11678788pfa.170.1538736980600; Fri, 05 Oct 2018 03:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538736980; cv=none; d=google.com; s=arc-20160816; b=i1bowZ3YXfOX3bKf2xfyD6SOhZsODj2U/T1o/5LfJ9D7RvNcEUtfZ7d3iIch/RKOal BZ+xU0KeH4ss13gVJAUH3LYePztT+Z76qVVda7uEtZSKz9CWmiCssuUmDlgeBVdcG7Y0 TGDPRt/HdW3FVkkjm5U+Lzt7dsd0GmUkbdbKKbxCNLvwIOnvoYcS/AUJYG1BWRWvbGyO YDIy3VxF6GKquxEMVfPSdwaCnwKOJjce0/i7m4VWy2hhzPkr7c0zyXwvHO/98ziE+KPM wgvDAXPc1XFXIPcxOsvrenOi3xzkR5IZnz8fzzFv/11wz/vpv0KYri2l+GNeVh96cx99 HW6w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=dN7+X1e9jvF9cTdBJE1uc2rnpBD4/syKv8Br4fk5goQ=; b=fEgDTbjbxj7rM26Z42tyDXgdUhpiIDrU5gQZifHjAZdkCW4blGRHz50GB7E0ngjA4X qP6oDlCfG/T8k7MYWfVFl2Qjaxl2Xb/LWcMAJ0Yr58lX0/Mo+R7KuyBDPjhCjIxYFnfx iUya/DRgEMwNMnhKhKwI1wTCb5zihYsBkOVONlXTyF/XUY46OQSGZsiUcGjnHhIFoKZt lZ8rPqo+4LMK4/rq4JkVcMmmgA8oJB4Hk8yWHo+asT3Io+frvNa+OnXxMA1vBZvtKK+F hOHq1jK4m2RrczS5Qmt+a2GMkUfVVu2sSop3SILDCGvG/8ZL2bUHeKQTvzrQMvVuQQqQ 0Gkg== ARC-Authentication-Results: i=1; mx.google.com; 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 z20-v6si4576286pfe.245.2018.10.05.03.56.04; Fri, 05 Oct 2018 03:56:20 -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; 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 S1728025AbeJERyI (ORCPT + 99 others); Fri, 5 Oct 2018 13:54:08 -0400 Received: from foss.arm.com ([217.140.101.70]:49954 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJERyI (ORCPT ); Fri, 5 Oct 2018 13:54:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 841437A9; Fri, 5 Oct 2018 03:55:52 -0700 (PDT) Received: from [10.4.13.99] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 366D13F5A0; Fri, 5 Oct 2018 03:55:50 -0700 (PDT) Subject: Re: [PATCH] irqchip/gic-v3-its: Add early memory allocation errata To: Matthias Brugger , matthias.bgg@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, tglx@linutronix.de, jason@lakedaemon.net, robert.richter@cavium.com Cc: suzuki.poulose@arm.com, shankerd@codeaurora.org, xiexiuqi@huawei.com, Dave.Martin@arm.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180912095232.2110-1-matthias.bgg@kernel.org> From: Marc Zyngier Organization: ARM Ltd Message-ID: <95733d12-ee1d-9874-16a7-c614cc0ce8cd@arm.com> Date: Fri, 5 Oct 2018 11:55:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 04/10/18 23:11, Matthias Brugger wrote: > Friendly reminder, if anyone has any comment on the patch :) > > On 9/12/18 11:52 AM, matthias.bgg@kernel.org wrote: >> From: Matthias Brugger >> >> Some hardware does not implement two-level page tables so that >> the amount of contigious memory needed by the baser is bigger >> then the zone order. This is a known problem on Cavium Thunderx >> with 4K page size. >> >> We fix this by adding an errata which allocates the memory early >> in the boot cycle, using the memblock allocator. >> >> Signed-off-by: Matthias Brugger >> --- >> arch/arm64/Kconfig | 12 ++++++++ >> arch/arm64/include/asm/cpucaps.h | 3 +- >> arch/arm64/kernel/cpu_errata.c | 33 +++++++++++++++++++++ >> drivers/irqchip/irq-gic-v3-its.c | 50 ++++++++++++++++++++------------ >> 4 files changed, 79 insertions(+), 19 deletions(-) My only comment would be to state how much I dislike both the HW and the patch... ;-) The idea that we have some erratum that depends on the page size doesn't feel good at all. >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 1b1a0e95c751..dfd9fe08f0b2 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -597,6 +597,18 @@ config QCOM_FALKOR_ERRATUM_E1041 >> >> If unsure, say Y. >> >> +config CAVIUM_ALLOC_ITS_TABLE_EARLY >> + bool "Cavium Thunderx: Allocate the its table early" >> + default y >> + depends on ARM64_4K_PAGES && FORCE_MAX_ZONEORDER < 13 Here's a though: Why don't we ensure that FORCE_MAX_ZONEORDER is such as we could always allocate the same amount of memory, no matter what the page size is? That, or bump FORCE_MAX_ZONEORDER to 13 if the kernel includes support for TX1. Any of this of course requires buy-in from the arm64 maintainers, as this is quite a departure from the way things work so far. Thanks, M. -- Jazz is not dead. It just smells funny...