Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbdFDRtE (ORCPT ); Sun, 4 Jun 2017 13:49:04 -0400 Received: from scc-mailout-kit-01.scc.kit.edu ([129.13.231.81]:34052 "EHLO scc-mailout-kit-01.scc.kit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbdFDRtA (ORCPT ); Sun, 4 Jun 2017 13:49:00 -0400 X-Greylist: delayed 1815 seconds by postgrey-1.27 at vger.kernel.org; Sun, 04 Jun 2017 13:49:00 EDT Message-ID: <1496596719.26725.14.camel@student.kit.edu> Subject: [PATCH] x86, cyrix: add alternative Device ID of Geode GX1 SoC From: Christian =?ISO-8859-1?Q?S=FCnkenberg?= To: CC: , , , Date: Sun, 4 Jun 2017 19:18:39 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Originating-IP: [2003:73:8e3b:e300:3895:ac2a:2300:7d11] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1539 Lines: 37 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 --- 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 a70fd61..6f07744 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c @@ -255,6 +255,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.9.4