From patchwork Thu Aug 1 08:15:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 170324 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5085542ile; Thu, 1 Aug 2019 01:20:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrx6amD26Rc82oVBnZY6XYrsBdse785kiVtO3BWM8gU7pR7WtaH/HfQLHxrdDuqr+JUZCA X-Received: by 2002:a17:90a:5207:: with SMTP id v7mr6924302pjh.127.1564647603024; Thu, 01 Aug 2019 01:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564647603; cv=none; d=google.com; s=arc-20160816; b=VZpqMT6hsaioVl0nzSInRshpmiMUhcB4TvgTOR1nCCzZYqcM+4bjD1d8Ljk/JzpqBR 3/S/RSkwefdCSNcX+1G7nXGSyfoHg5m0Uh86v0OTWpk1EK1bWHFOliahf0WgoB4cqJgj zoEe+x2sUNMpQwK7zI3yfjccGnb+3Y9LF3Sytg/Xe3AIGwq4oaCwz3Ssn7qWl9s34v9h nmzKExtxbyGmHsYEEQUNSI+Tb45Z8tGI6CSyjdwseU5Jz9hye/8b3pCBleiqXDu8mvtV cWQKqFUFM7v7+G3jPtaspuaguCrFOBYIcAOeWyAijqD1eXD9LBIK1c/gGYNpgaQ+vGZu YJ+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2ThYg/2PcaE2XPc0i5Ecb1/dXdxeDGNU8nmJ2xJHUWI=; b=qBNdNin6G6IV9xYvJgPJc4HwuKBvnAFA+1AtTn/NDwzRQ75vl8fUGxtlurGfz9/sg1 X7bCl0rWPC9D3dag0entKHfl6jYDXxsH6WB/AeGB4Vnb9gwUTRkbsmB+pUjogPHmxAuL ojwhfplJo8CqEXJApzqzfxa1tie/szzMdz+2By2h1fQhDtJdUX7kgXWgmx55Xk1KHLww qAG2sOS7bG62Zw7+dd7v1e+N1lBXl+9SSMxYL6GSN0iRkWzhvFzVA9hr/xq8sKEnXKCe CgIfQAYzWOvFpoJ2C1O/Q/HYLSbO0qoDI52Ujuaeat3HTSEnCHuKdWMUf+sAcjNh8Zx9 d6Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgyOciaZ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch18si32232418plb.76.2019.08.01.01.20.02; Thu, 01 Aug 2019 01:20:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.s=google header.b=qgyOciaZ; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730381AbfHAIUC (ORCPT + 14 others); Thu, 1 Aug 2019 04:20:02 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34301 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728146AbfHAIUC (ORCPT ); Thu, 1 Aug 2019 04:20:02 -0400 Received: by mail-pl1-f193.google.com with SMTP id i2so31879045plt.1 for ; Thu, 01 Aug 2019 01:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2ThYg/2PcaE2XPc0i5Ecb1/dXdxeDGNU8nmJ2xJHUWI=; b=qgyOciaZcnLJ+ScinWgYbGi83v03wFAdwHmCXOCF3q0l+t90McwWECzJNQCizBct0B InVe2nVLoCD9H0AnZ/kurROlNkLnrqZihINvdtTgq+jfMdHAUnuDVUAiZ3afxOI4dPC6 ylEeHV6fkGaTE+dmiReo1opsGMKACSLNHUF+kT6wWe4VB3YKMGXo1CaKyR4hTD5izZYm xGoZBt+jJuG7OOJfsUpSANOWnaHZw7qFL1R1VybKfR4mnst6IwhzLyCNhEbavZBguJPM GZR8M7SHdrjtWcLdpEqNImqQBPZXnTSxFQKwzZ7LoZi+FD9QrMGi6RuvxJeUk9BFFQLz /Ppw== 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:mime-version:content-transfer-encoding; bh=2ThYg/2PcaE2XPc0i5Ecb1/dXdxeDGNU8nmJ2xJHUWI=; b=jmyXXx2vdgARIsZwQ89Pb6mmSsGYh9Y/zwg8lFiiHcoVsts9dUfpl/EmdGrxvDscVF iq8lwk0gjRxlURuH3XG6gz1eiZaE2OeMMOVWl0HzcspdUEr0JECbX1LGALLxNj1B1D16 544S4/Q8TMfgTj6ARpjmTNJylCL1vBwPcHF0t5x9n1VqRqmFuZmCiMRs6da2uwv0cLVM yyw6SbT+5YQ4Q0SR1ZMYxvLaCzqlwECrSEID2Q+WdgdmJ2dooBlo/6s9W2qnqZutAqCS P4VxiXNTiOrMBR0uU1oGDaHyCrhml39ghDcV87DkznUmsVtm0w4d79dJJKQ2cKK4apxO wNSg== X-Gm-Message-State: APjAAAWc9Q451KJ/DYkFz31kJqngXk0xip0Xed2BFeFabB87bCuH3S2A 3snZZ+p0ncjOGekhxv1XGRJ8mAY8dNk= X-Received: by 2002:a17:902:2a27:: with SMTP id i36mr122339377plb.161.1564647601352; Thu, 01 Aug 2019 01:20:01 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id cx22sm3895076pjb.25.2019.08.01.01.20.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 01:20:00 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org Cc: Viresh Kumar , Julien Thierry , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com, guohanjun@huawei.com Subject: [PATCH ARM32 v4.4 V2 10/47] ARM: bugs: prepare processor bug infrastructure Date: Thu, 1 Aug 2019 13:45:54 +0530 Message-Id: <31d400e2535e6502cfa192169c054a02c3385185.1564646727.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Russell King Commit a5b9177f69329314721aa7022b7e69dab23fa1f0 upstream. Prepare the processor bug infrastructure so that it can be expanded to check for per-processor bugs. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Boot-tested-by: Tony Lindgren Reviewed-by: Tony Lindgren Acked-by: Marc Zyngier Signed-off-by: David A. Long Signed-off-by: Viresh Kumar --- arch/arm/include/asm/bugs.h | 4 ++-- arch/arm/kernel/Makefile | 1 + arch/arm/kernel/bugs.c | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 arch/arm/kernel/bugs.c -- 2.21.0.rc0.269.g1a574e7a288b diff --git a/arch/arm/include/asm/bugs.h b/arch/arm/include/asm/bugs.h index a97f1ea708d1..ed122d294f3f 100644 --- a/arch/arm/include/asm/bugs.h +++ b/arch/arm/include/asm/bugs.h @@ -10,10 +10,10 @@ #ifndef __ASM_BUGS_H #define __ASM_BUGS_H -#ifdef CONFIG_MMU extern void check_writebuffer_bugs(void); -#define check_bugs() check_writebuffer_bugs() +#ifdef CONFIG_MMU +extern void check_bugs(void); #else #define check_bugs() do { } while (0) #endif diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 3c789496297f..f936cec24f72 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -30,6 +30,7 @@ else obj-y += entry-armv.o endif +obj-$(CONFIG_MMU) += bugs.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ISA_DMA_API) += dma.o obj-$(CONFIG_FIQ) += fiq.o fiqasm.o diff --git a/arch/arm/kernel/bugs.c b/arch/arm/kernel/bugs.c new file mode 100644 index 000000000000..88024028bb70 --- /dev/null +++ b/arch/arm/kernel/bugs.c @@ -0,0 +1,9 @@ +// SPDX-Identifier: GPL-2.0 +#include +#include +#include + +void __init check_bugs(void) +{ + check_writebuffer_bugs(); +}