From patchwork Wed Nov 7 16:43:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 150417 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5387119ljp; Wed, 7 Nov 2018 08:44:08 -0800 (PST) X-Received: by 2002:aed:34a3:: with SMTP id x32mr936281qtd.316.1541609047972; Wed, 07 Nov 2018 08:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541609047; cv=none; d=google.com; s=arc-20160816; b=fVMon9rsE4Mm4SH1rj+I8/MnHLO6gS7IEBgM9RUgV9sEpUnKDweNVFL8C9kuxIvLjE Hb57YngD4n1AfQzWzfK/lw9noT+NFfOgewQsZdeB8gSCSgNFONpxkMiVm8czK3OmL3/5 W91FjzNLp3a4Jis99p+vNgyq/wwfzN59TQii0KuOTNMHawRt20gl+elqoWzTLNLHqKpU nEfpMWt1M6zbb1pdnUcoLYrR59MZua2ghDq7+3T7jLr+QJf+INZYdAFUSKvksFcD9IN0 UmfuSt8d+erwrn4WRev89LuN8OlTNsb5HTtg7JPQehbpXQPbLfu81YU8B53K2MTZxSSl xOTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jTY39Ayx8ZqMRKw0D+5Pum5t44ym6U+TNMWXzWRPFX4=; b=0l502to6KXRZWMSSAn1MRT7cq3d3i0OKoGFYuG3tsxg6I+66itGHi3qXJQcsnaYVQd XohSKcbwX3lyrSBpm5qUXblGIhy0MOCk8IImocOH0qkbiKsC5yQN+iuCm1JxIFh+Y2VK CISsMyhUW0ZbMGJtYfDRicn481vEN7bkElAZbk1qFChdMcIl6dz59bx6+1uc2EZPm5/d sNh4Yv7pvM9GMH4Y85c4WdxphbxUfMZRra2CBpGMTuGG1GU/xYLPlUSgUTxydqIGJ1mQ dVR0pCLoP8S6WmNngTj9qFWWttUbaLJYcS2ttdGDcj0Ktpy3Mw9edPqcF0rwi9kLlYfw IheQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MCbDrFD9; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v124-v6sor655306qkd.86.2018.11.07.08.44.07 for (Google Transport Security); Wed, 07 Nov 2018 08:44:07 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MCbDrFD9; spf=pass (google.com: domain of dave.long@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dave.long@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=jTY39Ayx8ZqMRKw0D+5Pum5t44ym6U+TNMWXzWRPFX4=; b=MCbDrFD9/GT+iEg8HblZa/4gbyZ8lJeKHn8QaY2QKeEzqqKKnvlq/cnRli+lr2+yW7 ZZqpGBciwsshfpQlljy7UOgz72XL1mZWmfESK91Sba0py1LDboSKMKQo3sowGk4AcH/H PohJjam/X3Qf1n/AX0XlMXYGE8v7AyZbJ93Iw= 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; bh=jTY39Ayx8ZqMRKw0D+5Pum5t44ym6U+TNMWXzWRPFX4=; b=YmP5x2N+A2LuKAKyaIMaj2gExR5QIMKdBBFKiyCo+QOdxJSpVUyx/Y3tlW3IBecctF PECqCZ2Dx2zv1/PiqBZfSC4RQzuVvGlDGVdiPw5Nd9nQ4dEixjDFn3Ni9x7EjZ8d8m59 hk9zbw6ByxhWEKCJgHB6qrSpnLvrIVHYHec2azTDYG/danQs74MmcBCPaV8TBcroZLtL 2YOdP0ak47jYxjkoar0HcGBJY4yvSUT327QWz6taRdvpSJuvIqe/WEbV1JXSD8x35XMH hUUe3Jmkjp9BAEO087fH4q0Cv8ij5JYa3ApK8bYGBd8+QZVw5noq5UoGoFOI+QRdBBnK p+1g== X-Gm-Message-State: AGRZ1gI6plIjAzQAlLUn+mSNUO0watvz8GZbffPptZ0Jdfbcscs8L6L2 BUH6PKOaoHNUTnQVFWes9pWl8bUK X-Google-Smtp-Source: AJdET5dos05lSMFz2D40pDARrXy1YRodMWZCP/HF9fK/ga5gLRXhnojCx52EDXh0FNrNrBD/FKnAAg== X-Received: by 2002:a37:654b:: with SMTP id z72mr936707qkb.226.1541609047444; Wed, 07 Nov 2018 08:44:07 -0800 (PST) Return-Path: Received: from localhost.localdomain (pool-72-71-243-63.cncdnh.fast00.myfairpoint.net. [72.71.243.63]) by smtp.googlemail.com with ESMTPSA id 96-v6sm681817qtc.56.2018.11.07.08.44.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 08:44:07 -0800 (PST) From: David Long To: stable@vger.kernel.org, Russell King - ARM Linux , Florian Fainelli , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.9 V2 02/24] ARM: bugs: prepare processor bug infrastructure Date: Wed, 7 Nov 2018 11:43:40 -0500 Message-Id: <20181107164402.9380-3-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181107164402.9380-1-dave.long@linaro.org> References: <20181107164402.9380-1-dave.long@linaro.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 --- 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.17.1 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 ad325a8c7e1e..adb9add28b6f 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(); +}