Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp137711rwb; Tue, 4 Oct 2022 01:38:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eZmbAhsweRIkaqtLHLv1t5/GOINTKqpKz0sRWqYzUaVn6bx+vjsLQ9YemszZLfVN95LOm X-Received: by 2002:a17:902:e5ca:b0:17f:6429:e6c1 with SMTP id u10-20020a170902e5ca00b0017f6429e6c1mr6490328plf.11.1664872709093; Tue, 04 Oct 2022 01:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664872709; cv=none; d=google.com; s=arc-20160816; b=ia3SStSaVdgejprrI44ddvFqAg5gfrbAk5fSu+tyTLBWMocZNKjUqKRWFoSpgUAF1t fZf8yyVdAylx1VvgbWhbymI9ar1z7h9NiEFCYiyiUcJXic8nTfKdSI4VqA4BF9Kok01H 1bK5A/X/wraYteiKCABcVSEyN27zO23Fk8W/+3lx04gNDORuunmF7lEt31va29tZqzMv XYQfq8flbi1wqjyw8Z04ySMXMZCRxumDrnZwP4KKMIw04mgWfqe1tZCoxXcgiTYbPXUX 189l6QOvPt1x3j74xvhy+TfX3zHszVYUF+MoMlyeDseXgmWytz6fPYVTxKkqGok4XJZn u9HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8LiedMldWeIT3ErqqDfk2VgDsQE5AXBsEeh4EFbNTzw=; b=Z1Wu4uhy7KArs+uKqcRXcWq+pzO/qgtkcYxnTxq8y46KlOlMx0gxY3uxrbOeAlV8d9 elU41kDY69pagaRmd2AG0Xc5PjB9YS2PXV16zIEdOIma/Dbc1+HBBDx4vFGc6p46M4Xa 5uWsHrkmCJ7iCZrd2PIuNZ45JfGUWo9TppakZ0ILys9qE+3KV/YxOim7NuvCnnvOmlSj /iq6WlCAepFSbAhaVhvIWKkQPK1nDKzcrsenWNCfKp6J3TVvJq4c8oQj4qh9A0AkUQbv d9aA5R1ooINOGiIJao0pwWltQJjN+bFHrF7nlmA+Olgwu96mt6I2zALquz6tHTZJLWAu ceUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Kudt6qAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y73-20020a638a4c000000b0045466b00436si1929577pgd.702.2022.10.04.01.38.13; Tue, 04 Oct 2022 01:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Kudt6qAV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbiJDIMP (ORCPT + 99 others); Tue, 4 Oct 2022 04:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbiJDILp (ORCPT ); Tue, 4 Oct 2022 04:11:45 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20C104AD61 for ; Tue, 4 Oct 2022 01:10:39 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 66CFC1F8EF; Tue, 4 Oct 2022 08:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1664871038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8LiedMldWeIT3ErqqDfk2VgDsQE5AXBsEeh4EFbNTzw=; b=Kudt6qAVVcFkJOkAuDtlSMrvM71HTbTbxuB+3B+NVuLxGW7fZ4xg0xXfu3twTI1wg0dl33 Jt0fmbE3NNPQrvxDVILMLe1kjP2gfYzxaAHRndHXD3za+lZgCH0GzjIDJZlXQ7yp+uMWi2 or7dVgON8pJtspwDrifqxuqYIHbVQC8= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2C377139EF; Tue, 4 Oct 2022 08:10:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vdOACX7qO2MzSAAAMHmgww (envelope-from ); Tue, 04 Oct 2022 08:10:38 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 02/16] x86/mtrr: remove unused cyrix_set_all() function Date: Tue, 4 Oct 2022 10:10:09 +0200 Message-Id: <20221004081023.32402-3-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221004081023.32402-1-jgross@suse.com> References: <20221004081023.32402-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Cyrix CPU specific MTRR function cyrix_set_all() will never be called, as the struct mtrr_ops set_all() callback will only be called in the use_intel() case, which would require the use_intel_if member of struct mtrr_ops to be set, which isn't the case for Cyrix. Signed-off-by: Juergen Gross --- V2: - new patch --- arch/x86/kernel/cpu/mtrr/cyrix.c | 34 -------------------------------- 1 file changed, 34 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c index ca670919b561..c77d3b0a5bf2 100644 --- a/arch/x86/kernel/cpu/mtrr/cyrix.c +++ b/arch/x86/kernel/cpu/mtrr/cyrix.c @@ -234,42 +234,8 @@ static void cyrix_set_arr(unsigned int reg, unsigned long base, post_set(); } -typedef struct { - unsigned long base; - unsigned long size; - mtrr_type type; -} arr_state_t; - -static arr_state_t arr_state[8] = { - {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, - {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL} -}; - -static unsigned char ccr_state[7] = { 0, 0, 0, 0, 0, 0, 0 }; - -static void cyrix_set_all(void) -{ - int i; - - prepare_set(); - - /* the CCRs are not contiguous */ - for (i = 0; i < 4; i++) - setCx86(CX86_CCR0 + i, ccr_state[i]); - for (; i < 7; i++) - setCx86(CX86_CCR4 + i, ccr_state[i]); - - for (i = 0; i < 8; i++) { - cyrix_set_arr(i, arr_state[i].base, - arr_state[i].size, arr_state[i].type); - } - - post_set(); -} - static const struct mtrr_ops cyrix_mtrr_ops = { .vendor = X86_VENDOR_CYRIX, - .set_all = cyrix_set_all, .set = cyrix_set_arr, .get = cyrix_get_arr, .get_free_region = cyrix_get_free_region, -- 2.35.3