Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3625511rwi; Wed, 2 Nov 2022 00:52:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4mI6K2hYa7pKga1oMSksZu2DzZDGElo3konzgdxpeGprg2v0i8VvH067tTnaHwmbSd56xR X-Received: by 2002:a50:ff13:0:b0:43e:76d3:63e1 with SMTP id a19-20020a50ff13000000b0043e76d363e1mr22676818edu.271.1667375546163; Wed, 02 Nov 2022 00:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667375546; cv=none; d=google.com; s=arc-20160816; b=xFMhktGWgvkpa++bXVD2t2INyY6OBTae7HBv4L6lmsve296mJxvtriED8cidICbpoz YCpniu89I7/n8TaCgspdCUwYvCnDFADRe/RzUKQCNqf/UP4LEWkAgQypXsLmhl1eRVw4 qVreDarlv/DLaZtMMIIAJMRHd1U/h47KoKHTUQoEdQYx60g5vRAGWc9+1DKUh9nPhnX1 zTUO2o6FaCVDbZXRG+G9ki6usHFi44zgS2tNVFWb0cmMozgrtGFZJrFGWRLvq63x6p4Q 36+a0sbZBD2uBoWB9OY/DmtLGZV35SQ52mLfcSAR2BFqHHWmxpqVjTNyBYc0m7mx8Uqf GcPg== 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=GQEtb2vL+iQO4o3v4gnSZ8HiVeg2+FFF5GuRa10reVo=; b=FHMQdFh7yuXoi46fmRtdI8a3ixQDU7DCv0MQk7M2RCZGvwoql1ZwAObqloSZIQ70Fb uLboSOff4tGsRsbB0QHq+IrVqHFm2IfPPF91iV64nqEftKasUhBdYj8sbaQ7etDgPe3L bzNdSCKOn2hUnTxeciZESTgvoryBQvEe2SG+Zu83QVDPbJq05HIGvqEftxXA937NMsjZ BUjGSVzN3olZwpFMofI5R0+LcPhXA/8zAmOMJBE+tLFLTThBWFB55/ZW/MrWd6cH/jYK 4EqSEwPOpqfs0oY47qQ5fCCQ7PZFjmufj+6+tpefFEEOE1aO3OwDPs4JESLDjBRT1v5q C71g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=XcAg0758; 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 d10-20020a170906304a00b00780076c3322si11842343ejd.432.2022.11.02.00.52.02; Wed, 02 Nov 2022 00:52:26 -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=XcAg0758; 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 S229493AbiKBHrf (ORCPT + 97 others); Wed, 2 Nov 2022 03:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230424AbiKBHra (ORCPT ); Wed, 2 Nov 2022 03:47:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6301B25EA2 for ; Wed, 2 Nov 2022 00:47:28 -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 07CF61F8B0; Wed, 2 Nov 2022 07:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667375247; 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=GQEtb2vL+iQO4o3v4gnSZ8HiVeg2+FFF5GuRa10reVo=; b=XcAg0758gjmv84xLkZT984Qx7dgoXbDg2VgwRDexHARVFS/H9a7bejr26a2+5BXSudfixa TGFD3ycnVDrW8J1yLkpHFUxcBiV1J0fryFHTuP+AMoiMCwWXAJEPM8Ni2kt3zvJIY5AZqG PjWf0m9dqJ1FFqOf9Z1FczZkNAX5M7s= 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 BB5C41376E; Wed, 2 Nov 2022 07:47:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sI5FLI4gYmOccgAAMHmgww (envelope-from ); Wed, 02 Nov 2022 07:47:26 +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 v5 02/16] x86/mtrr: remove unused cyrix_set_all() function Date: Wed, 2 Nov 2022 08:46:59 +0100 Message-Id: <20221102074713.21493-3-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221102074713.21493-1-jgross@suse.com> References: <20221102074713.21493-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. Note that this patch has already been applied to tip.git. 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