From patchwork Wed Oct 31 13:56:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 149796 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6826337ljp; Wed, 31 Oct 2018 06:57:20 -0700 (PDT) X-Received: by 2002:ab0:720f:: with SMTP id u15mr1426779uao.114.1540994239996; Wed, 31 Oct 2018 06:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540994239; cv=none; d=google.com; s=arc-20160816; b=bKNAH9ITfHbwQWDBoEIroJIPn0R+mL8g780Xzs/UMLNlgAXPxLgOa42c/h/fYY3IWp 7byARwRBzKemIiD3nHsfareZiFrMpIJ6XVkNDsuDm7akwSvqUtIJfDgbXyPO+s3TjqTD ItuxoZKOdcbZ6x4aBEfmAdWqUn1dKpdMIKbNB+zYXxijIxGhGnLz5dmi2HtoTz0p9703 /DUXGiKPt4hKvNiYfyw3+FqhLNiYZHowJl9FRbVSBCWPQq0yx6dY8yesR50Zo6osHZCf LyNzhP5pdDaKYONuWstq9KtUCY23/FBrAuExtfCUN/49GvxI2DEyYYPO2InuRZorqCCY G97A== 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=Q2bUQBIejDOjW7rFi087bziFBqIKD0jirxPpZVkCsGIlbWBqcLiA6jG19dUv9nOXbp ASeUQcTHvHmKU9bXenMm9DNNl5c9XVox4wXOqyHJ8Z5D95Z8VUGicU9kV8wrfjTBKTyW zBnDhVpcbWk3s0BuI7ldOgAKaMqjk65lO+mlaNGRcqeuj8QpbAMKUTZdWZc23qTQzXfi Y/CBVkXA63CgIVA7ry+SBzO/0MLMCZv9FMMp2j5+K0XO0kFyBvyCO3Igxzs7ouIbms8t Gf/N6cTJjrIpEcnPNcywJ1ui/4iofmZrBztcJtHY6AbvOAN6xoQ1UAkAXp3ibVlF0zsI Xe1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gJxE+z5V; 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 q62sor7792887vsf.102.2018.10.31.06.57.19 for (Google Transport Security); Wed, 31 Oct 2018 06:57:19 -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=gJxE+z5V; 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=gJxE+z5VBHtykHccOluIowcpBIFsNRWoi5l/u4HrgycqvPiMaEpeJSwwAlBYVK9ATb psSOPrTnIjK3Q/j7qLsKlISX0RG2SCSDqwixC1vF7PagtQc4PBJJBWn5GT4HfHUw26dy bKvjX/srdFefLJxE2j0MU/w6Gyh3zD1w7PW+g= 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=OidQfxW41Aa2BUEArfglqyIhSQQy80WMF/S6IQIRKzU0tx4yo8TzbWKie/iXodQDVR sc30it1lqK3v71d17RRESZr7EEXMY9YllCtAifzV1XdJB6nqnxs4JoaBh9CNxcaSMccQ DMNiLxeCWeNRnPEGhXJP7Ll17RH2IFNrXgtyCUkknCTfKB7ztX/XVBDsHh6wDEaNGfcK pbyLo7Z0XkUVOgvIZ8aR7ukCnXpbi+CIM7FB/8iz8OAe41p86lGDLz8ruyvGF49sQg27 njnEO8Jlp6vBydqqbTcuMTVEbtIjCAAAJpmawQTx3ELTNjG+u6IArz5q+tdQDA06M58X DFAQ== X-Gm-Message-State: AGRZ1gKQktUuGaHRvMNZNILttvbnaD4xIDz6hxHXMceYgYdVGQCkFsLK 17XVR5Ilu2yOshcJRDJqJpYlvzET X-Google-Smtp-Source: AJdET5d5yvwoBn3Jyjuw2MUUmj+fTxwHTfl7kYOZDSy/HNlUIYF5PCfq82rabdM41nup2BsRmvpbJg== X-Received: by 2002:a67:a448:: with SMTP id p8mr1276688vsh.238.1540994239288; Wed, 31 Oct 2018 06:57:19 -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 s85-v6sm2275624vse.29.2018.10.31.06.57.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 06:57:18 -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.9 02/24] ARM: bugs: prepare processor bug infrastructure Date: Wed, 31 Oct 2018 09:56:51 -0400 Message-Id: <20181031135713.2873-3-dave.long@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031135713.2873-1-dave.long@linaro.org> References: <20181031135713.2873-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(); +}