Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1969228ima; Thu, 25 Oct 2018 07:43:55 -0700 (PDT) X-Google-Smtp-Source: AJdET5cb+9JAOIPEH7EzNaTPeO+46XCLO99WXtUSqgrHyzAli0/KmslOI0kQYWB6Z7RmPk/qi0eO X-Received: by 2002:a62:569d:: with SMTP id h29-v6mr1908621pfj.42.1540478635152; Thu, 25 Oct 2018 07:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540478635; cv=none; d=google.com; s=arc-20160816; b=wLV9mMFoiQMJWLTbYraf+KbQkfiCfsPnt5xeV+KEcQsWWMrVI7s46ETlk8FSi1KqAJ U1REb91G3HssNlXa91BP7/x6q2zmRITEYHX8Wxm4iOa5/6pr9xTw03FEQH0YCsW5A3Jy UeIIHt/AKGCPBbcdLa+ZcC91RfTIf4raWdAkbojXILl+p+H/XPSNrFsecNQpH42eKLZF a/osw1K+JrcizHRlrR241LK9MphIOpcBv2Y3XWIvixRnkYIXPuq5ns2i/FnqTfHbDYQ1 Xzc59f1A6xec6ZPQuwVCNhYXIHsy/qu9wFZw0i9KRiX459L9Llcd+1Dbzc1FaZlcVqND mcIQ== 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=XWDIzRm721SPUwJRx6C3BPhdxc/oH+RKHSJ3cHujk3E=; b=POVOLKEj5g+iR4CHYgpVHrqWJQkrqz8NZu55wgYMZ9odCzWGuxnmgyk9VBQeT99rcE WAHYosIX2UpoEv3ZqhlEnCz/fkYQdAEVtI2N1yFRAzlb71BAkFVosYlpA9qUCYhq8QCs sSrF+95tR93YtRszZF3/LmYjMDMpwWm/LZzduZliIntlaI55uCcnRN4wBw8hbA7HtIx5 n0oUMXkWDxB/bYie3L7NLN1BWzdHm4Btrw4vjGWLSqljg8Gtt3+tpWTc/p3XJJ0S3Xqv 9x/RqtxGUBE/ygGZwXag4ERNGWqk7Z1QDA/3HjJurpie+0KQedzQbDiMScTUoVzRMvi/ I4eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+cA465r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si8330690plp.173.2018.10.25.07.43.38; Thu, 25 Oct 2018 07:43:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=V+cA465r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728902AbeJYWsP (ORCPT + 99 others); Thu, 25 Oct 2018 18:48:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:56782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728864AbeJYWsP (ORCPT ); Thu, 25 Oct 2018 18:48:15 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1515C20848; Thu, 25 Oct 2018 14:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476918; bh=1QkFq/0vNibjmWLQAgQWd9NNEStAGbUXgxor7W9y5SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V+cA465r62ghtQzCsnYeSQLCnVoovkiPL/zPeVJNoeged7kj4uLUzAOnPWM85q8MC J0cF51k5JvwLP2XWssJ7vLyutx81Lo68VZy0IPnTnEAUlOpz4O2LneS15T7bq35Vo8 2VWg/bubjpbicNS/OWLllaJmOvc7diFmC+zVSPmA= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Christian=20S=C3=BCnkenberg?= , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 4.9 36/98] x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC Date: Thu, 25 Oct 2018 10:13:21 -0400 Message-Id: <20181025141423.213774-36-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141423.213774-1-sashal@kernel.org> References: <20181025141423.213774-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Sünkenberg [ Upstream commit ae1d557d8f30cb097b4d1f2ab04fa294588ee1cf ] A SoC variant of Geode GX1, notably NSC branded SC1100, seems to report an inverted Device ID in its DIR0 configuration register, specifically 0xb instead of the expected 0x4. Catch this presumably quirky version so it's properly recognized as GX1 and has its cache switched to write-back mode, which provides a significant performance boost in most workloads. SC1100's datasheet "Geode™ SC1100 Information Appliance On a Chip", states in section 1.1.7.1 "Device ID" that device identification values are specified in SC1100's device errata. These, however, seem to not have been publicly released. Wading through a number of boot logs and /proc/cpuinfo dumps found on pastebin and blogs, this patch should mostly be relevant for a number of now admittedly aging Soekris NET4801 and PC Engines WRAP devices, the latter being the platform this issue was discovered on. Performance impact was verified using "openssl speed", with write-back caching scaling throughput between -3% and +41%. Signed-off-by: Christian Sünkenberg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1496596719.26725.14.camel@student.kit.edu Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/kernel/cpu/cyrix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index 455d8ada9b9a..d39cfb2c6b63 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c @@ -253,6 +253,7 @@ static void init_cyrix(struct cpuinfo_x86 *c) break; case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */ + case 11: /* GX1 with inverted Device ID */ #ifdef CONFIG_PCI { u32 vendor, device; -- 2.17.1