From patchwork Mon Oct 15 15:31:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 148852 Delivered-To: patches@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3933703lji; Mon, 15 Oct 2018 08:32:24 -0700 (PDT) X-Received: by 2002:a37:3ac8:: with SMTP id h191-v6mr15794859qka.43.1539617544043; Mon, 15 Oct 2018 08:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539617544; cv=none; d=google.com; s=arc-20160816; b=p3c1QC4sgfNoxTVMImPs7Iz7YogSWyQRJtJTGsnKyD6eKyygy9F7MIfId+fivhDjkf DTIeWqG/zi23BT06u2lIleCCIsDqJL08iNjpV2Jb1ta9LMEr8WJr+usqH9BmPu8STq5M 9ak0YtUVwof+nfQ7hUVciglWGG1lsI4sCKLLVUjohWTMm4uJ20gsxTEA3q7OpETIXxd2 +OS/IMOs+HUuzdUq4aD8DcpDf56Q3OU/sdtVUBMeMuqhxoubA9naqUIHMbxLb5Yx9o64 GPENHDrLPtGTbxXsjfV/VmZHW+ks7i1AnpPZgXo6VW4Cd6cfONkb6XCcUvGb9ATX7OPt 1cOQ== 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=qjoAgXvElD1E6z6x3JoEg1QXJ8FYnxif9vVfX6pXACk=; b=w1hWCTUmQFiPcnokFS000MkXS50okA8SrXK8Xv/iHU2jQc6OSdPL4dl/8rGWGGbW8S zLDtyMu0Y0yhr+qcGpOjRRU0elJRc9eHlnFIXOqTNVptmwfLrD/iaJ/FV39aLK6V8Ai3 UBNb0V+HDTvAQhG1DYFWvPsku2uCD1wWR/9X9rQX4+cv/S2shemMFdWlaeiDpNCqK+ON slhQKBfKtuRQbArAKrAnyxLBDP622dzIPmPwQWXzZGPKi2os4CQwB5oG0F9r7MM2g/+S Qjlfj5MAAnYM+DYGPoFA/RuvUchFZ9v93NwgzEVz2/rrecHWcRbKyARlI+NgAaLzeK/0 YJqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AGzKm+sD; 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 u190-v6sor6395543qkf.82.2018.10.15.08.32.23 for (Google Transport Security); Mon, 15 Oct 2018 08:32:23 -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=AGzKm+sD; 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=qjoAgXvElD1E6z6x3JoEg1QXJ8FYnxif9vVfX6pXACk=; b=AGzKm+sD5AkE4NMhiubB+V4hvShbDREuZHDYDyGJWGJsZk6FEiqlJWql0hlqEAaj7X VqybZ9dmHzTViOPFH93aWkQs7f2tmWGK18OsXk/ocUrUxtJkdw56if+lgKbeT1Mj6kZI HN6lyibKP/vCU9ux+9a5it7915vHHoPPofIfs= 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=qjoAgXvElD1E6z6x3JoEg1QXJ8FYnxif9vVfX6pXACk=; b=MUYLZP/4+2GQD/N0Hug2m9znk8y9a/h0smB496ZGJL6AdeRNZ6qyfg8aNb6EoMdWmw GN0h1VCuQoGwVDFlbX+4IoWJCJdWezFlR0YSZNG2LhSfXfRt3qfqJcFutmXR/gcsvHaq 8oVTKYVfaCoXYLUhm5K5EISbBlTDSLIJ0bP9pscT/UuBWyS97o7HTby1E+9OWCEvZR75 7PnO8piSoy4cj6evt27HB8PVxNFCpw9saSQPjEDKcQNmF6D0mIJNUBroUhPbb7DYDUfy bOZ/IpCvZi+9e+IPSh3sr7KmlBMCnHHc8nrhhBoXIELpmzWLlk1XfpHgzG1VmB92IRQM BrDQ== X-Gm-Message-State: ABuFfojmZ+mEQnezIgRn2CzfWWj81+Xq408VIhMe/kc2EYzYGjiDqX+w BQIdE4wxtrUrwWiIQee6ZvTdfy8G X-Google-Smtp-Source: ACcGV60Q+DSFIeeUoiQvpxZfBXFJvbHg3HiIuYYuRKCPEeWGkTS65VWvDj4+8Z1wDkB/CtW2J5vjLA== X-Received: by 2002:a37:6845:: with SMTP id d66-v6mr17064884qkc.9.1539617543538; Mon, 15 Oct 2018 08:32:23 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([72.71.243.63]) by smtp.googlemail.com with ESMTPSA id g82-v6sm10087768qkh.24.2018.10.15.08.32.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Oct 2018 08:32:23 -0700 (PDT) From: David Long To: , Russell King - ARM Linux , Florian Fainelli , Tony Lindgren , Marc Zyngier , Mark Rutland Cc: Greg KH , Mark Brown Subject: [PATCH 4.14 02/24] ARM: bugs: prepare processor bug infrastructure Date: Mon, 15 Oct 2018 11:31:56 -0400 Message-Id: <1539617538-22328-3-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1539617538-22328-1-git-send-email-dave.long@linaro.org> References: <1539617538-22328-1-git-send-email-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.5.0 diff --git a/arch/arm/include/asm/bugs.h b/arch/arm/include/asm/bugs.h index a97f1ea..ed122d2 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 499f978..50de918 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -31,6 +31,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 0000000..8802402 --- /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(); +}