From patchwork Wed Oct 31 14:04:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 149821 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6835909ljp; Wed, 31 Oct 2018 07:04:42 -0700 (PDT) X-Received: by 2002:a1f:5286:: with SMTP id g128mr853835vkb.12.1540994682361; Wed, 31 Oct 2018 07:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540994682; cv=none; d=google.com; s=arc-20160816; b=FNVJF929bua6dqY0yP52PGmCaE/PzOT8u7npyo1nS6K0Mb/7SRLSyd3+1+CPw8vlkf p4OvkFLiRKYfDkEMzJKmSEN/FqNoSEvdc3SELcTge9upp4oWJRc9i1F4KgpNJme/04MJ II6AYuJPLCzoNm7hkpT0ie7dk8YTcLNcrHmREZGO2Q5BuAc1a6r5WWUapFiZTQZ1F717 zD+oVFhrd3Um+eyrWIfSX/kxCD1j9Gg0N0EeTThelpP943AdTmWEA2/Qxrji7E6zS58B xms13yAC28LK92xZ4ZsZpk1uk9GcEma9GlfO/tOlJ85vblmGZoLIcczN6iQfweJLtHjJ f/Gg== 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=ZjSGP3GI5NRWS7wwGi0tHqjByJ8pD27pGt33fFGUHH0=; b=csP+xsurKW+9qbj5vs5BJRjEQ5V3bYshemGF08YU+uiacGBs48c3/e49tk0vUepVDW oMS7iXhaI/tvV5d7QPQj6H6wwKwawoA+l6RwzPEyydjt0rflZ2CFOXsdmuR+z7YmktDw e6FVLgGp619eo0M9xfrCdlObNzDZ8fM5x0O1p058AHmSZMxA0JVJ47CAjqHXvDhe+fy0 N6UJ29sj/OoxCT9wfBAtH1KEeXzeswcs3ShkxYFiM/AAAVNPMn16gURlHC/YggWu2PgS T1J82b0FtFDIyx9BPSnshUHlV36rOQeTPiYRbV2sUZlhOK06qJFH/xfHoWMp2Q78CYpi AuFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZsxu8ta; 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 g4sor12441448vsa.58.2018.10.31.07.04.42 for (Google Transport Security); Wed, 31 Oct 2018 07:04:42 -0700 (PDT) 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=IZsxu8ta; 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=ZjSGP3GI5NRWS7wwGi0tHqjByJ8pD27pGt33fFGUHH0=; b=IZsxu8taCCbOs++y+3kwxClgMf3O/AiHMFbPrOW2Gg7eXQgHHjeIP1358CfuXPpy1s 8ll9yv8cTVwpqhToefNK564L0cYuU7fcBWmD7K6Okidz/bBr3HPvQ30W1wyZ6fkqb1Dl 1Jz3gvtcEO8OdeK8HQ30YyoJoDP3hK+NAFTkE= 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=ZjSGP3GI5NRWS7wwGi0tHqjByJ8pD27pGt33fFGUHH0=; b=DMuOJUMnux8fBTwwlvAkY71KbPJkairCN8aiD3mtgYHL723r/pMKBamUa9bfsZQKEI 0dC5zhTbVUOEH/d9vq6Bh/eV8xcpWWZwMz22rJKWn53Zp+QUC+OtsGl9IgjuDRNSK08f NElZcU5ik5/IGYvDdqbPnLmGs+TXMy3+YL48lr0OXDYhheJEcwGWX9EI56fciu+gS2Ey GBu4bO8RWeXyiqAhkQkuuSn1e1YA/kCG0Q1fr3o+iGbOztd/1mSQSrUKe6nA/1nwf+Dv R5LiPGdXurpP8fPajPsPlpyN9vo8qvSaL6MJeyHNWRhysMdaZ4gIYSZEW162urH7eklB D6iA== X-Gm-Message-State: AGRZ1gLSinddp+YHAYwDNpRsz90wAOgV4HA4X26iKtQmQ42+D1uvQNPG ry/sPy9M2LnaAZqatNGphYpLBrzh X-Google-Smtp-Source: AJdET5erB3Rkq2KUVPihBQ88hcNw1dfZGgL1yHtXx1Zn8X5hlY/6v/NhnZnoLY9eAATRNVHforPN3A== X-Received: by 2002:a67:60c7:: with SMTP id u190mr1286635vsb.85.1540994681737; Wed, 31 Oct 2018 07:04:41 -0700 (PDT) Return-Path: Received: from dave-Dell-System-XPS-L502X.hsd1.nh.comcast.net ([2603:3005:3403:7100:2c71:8680:34e1:a6aa]) by smtp.googlemail.com with ESMTPSA id 6sm6795632vsy.25.2018.10.31.07.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 07:04:40 -0700 (PDT) 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.4 02/18] ARM: bugs: prepare processor bug infrastructure Date: Wed, 31 Oct 2018 10:04:20 -0400 Message-Id: <20181031140436.2964-3-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031140436.2964-1-dave.long@linaro.org> References: <20181031140436.2964-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 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(); +}