From patchwork Tue Aug 16 23:28:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 9284989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4DBF5607FD for ; Tue, 16 Aug 2016 23:32:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F62128704 for ; Tue, 16 Aug 2016 23:32:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 342D628788; Tue, 16 Aug 2016 23:32:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6B1B286F5 for ; Tue, 16 Aug 2016 23:32:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZnnZ-0004dp-C1; Tue, 16 Aug 2016 23:29:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZnnY-0004dB-3U for xen-devel@lists.xen.org; Tue, 16 Aug 2016 23:29:32 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id 94/E7-29563-BD1A3B75; Tue, 16 Aug 2016 23:29:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRWlGSWpSXmKPExsVyMXThId1bCze HG7xq17FY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDPWLv7MWnBXuOLsyX9MDYyHBLoYuTiEBCYw Six4cZC5i5GTg0VgHrPEmv0OIAkJgX5WiaOze5lAEhICMRJrtxxmgbArJR7/bACzhQQUJH5PO MQEMWkFk8Tn+72MIAk2AQ2JJ79msIHYIgLSEtc+XwaLMwuUSOyd/wPMFhawkni1eC0LxGZViR tXFrOC2LwCjhI/93azdzFyAC2Tk1jw3gckzCngJHH0ZQM7xF5HieY109kmMAosYGRYxahRnFp Ullqka2Shl1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kRGFgMQLCD8fzawEOMkhxM SqK8MyduDBfiS8pPqcxILM6ILyrNSS0+xCjDwaEkwVu3YHO4kGBRanpqRVpmDjDEYdISHDxKI rxRIGne4oLE3OLMdIjUKUZjji2/r61l4tg29d5aJiGWvPy8VClx3niQUgGQ0ozSPLhBsNi7xC grJczLCHSaEE9BalFuZgmq/CtGcQ5GJWHeGpApPJl5JXD7XgGdwgR0ir70BpBTShIRUlINjH4 S+Wk6LhY7J/9NmdR6RXRWWhtDyKPPi21fzHpx/1CmhRcw4lJKZ/vNOloQvFGlc+VG2WvLGZwf q+4+0RaiuO7u0iOzPD5ueeWq9OhStVWF1ST36yn/mO/OStrA9iBpQkZs1EN/yW36C7f1RvIG6 05UvcBiO2XahEUVX62VY7ZF7NyYUfwyVYmlOCPRUIu5qDgRAJDbqq+4AgAA X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1471390169!41763424!1 X-Originating-IP: [209.85.161.194] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25784 invoked from network); 16 Aug 2016 23:29:30 -0000 Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by server-14.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Aug 2016 23:29:30 -0000 Received: by mail-yw0-f194.google.com with SMTP id z8so4231867ywa.0 for ; Tue, 16 Aug 2016 16:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fv3JuaRG44V+N5NDoIwPyqLwHHfyuwJSSCUyKpoNPKE=; b=epsquiBLdDkloNxkg7rBTyAldE8DH77MY8mhNDm1/35G9H/AuaX/yAkuRP2jwyO+jj Eti8bo18TFrLVy3Gt86mBvpst/6xfFAYp37XmiqzfeibwFYRW4lSZsT17DUE2JC3yP91 STsxo5LwlTNJEpZLGRmu5MFfq1GoK27DgCzZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fv3JuaRG44V+N5NDoIwPyqLwHHfyuwJSSCUyKpoNPKE=; b=HGUT+NQ7v4+PJlZnpzEvcBkGoGvo1eOLk6ZDoVJBVRnVSIk3nJu0oJkky11Rn2nwwM TLTcjOldnsmPDagMoNZAoUugsIz4Mb5u7ybpuryEtvZhAXAysYYOgSGATkEouxPMN/9j DUEL3NsN/ADTrfrJ0ioW8SgzNb28CwMkIqOmAzPSwhDe/eDE96ymE6iacHjwGPmrUcGu NErmi5EGAxQkkft3u5NHVPkzfFLlDrdc+Z2+Gt4SFAwVRtM29q4/IQqwOjlIflcjTDsu 0WaINzx15voSDBiq28MRv02mVX9s1MkH6cEQpwZfrYWB8/r+fauBTq0aQ1nhb+hakLEb U0Hw== X-Gm-Message-State: AEkoouv23LwyzHRXNofPoz4gjMbASQsSjBOENIqwlyrdKYDavWZLEAAn+oaEanR/FwY0zg== X-Received: by 10.129.91.84 with SMTP id p81mr27541693ywb.25.1471390169528; Tue, 16 Aug 2016 16:29:29 -0700 (PDT) Received: from swanson.attlocal.net (104-179-196-18.lightspeed.brhmal.sbcglobal.net. [104.179.196.18]) by smtp.gmail.com with ESMTPSA id p67sm14046603ywe.2.2016.08.16.16.29.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 16:29:28 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Tue, 16 Aug 2016 18:28:26 -0500 Message-Id: <1471390109-10407-7-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1471390109-10407-1-git-send-email-cardoe@cardoe.com> References: <1471390109-10407-1-git-send-email-cardoe@cardoe.com> Cc: Andrew Cooper , Doug Goldstein , Jan Beulich Subject: [Xen-devel] [PATCH 6/9] x86/mtrr: drop unused mtrr_ops struct X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP There are no users of the mtrr_ops struct or any of the callers on it so drop those. Signed-off-by: Doug Goldstein Acked-by: Jan Beulich --- xen/arch/x86/cpu/mtrr/generic.c | 12 ------------ xen/arch/x86/cpu/mtrr/mtrr.h | 23 ----------------------- 2 files changed, 35 deletions(-) diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c index 45d4def..1d67035 100644 --- a/xen/arch/x86/cpu/mtrr/generic.c +++ b/xen/arch/x86/cpu/mtrr/generic.c @@ -560,15 +560,3 @@ int positive_have_wrcomb(void) { return 1; } - -/* generic structure... - */ -const struct mtrr_ops generic_mtrr_ops = { - .use_intel_if = 1, - .set_all = mtrr_generic_set_all, - .get = mtrr_generic_get, - .get_free_region = mtrr_generic_get_free_region, - .set = mtrr_generic_set, - .validate_add_page = mtrr_generic_validate_add_page, - .have_wrcomb = mtrr_generic_have_wrcomb, -}; diff --git a/xen/arch/x86/cpu/mtrr/mtrr.h b/xen/arch/x86/cpu/mtrr/mtrr.h index 25f4867..9391fc5 100644 --- a/xen/arch/x86/cpu/mtrr/mtrr.h +++ b/xen/arch/x86/cpu/mtrr/mtrr.h @@ -11,24 +11,6 @@ #define MTRR_CHANGE_MASK_VARIABLE 0x02 #define MTRR_CHANGE_MASK_DEFTYPE 0x04 - -struct mtrr_ops { - u32 vendor; - u32 use_intel_if; -// void (*init)(void); - void (*set)(unsigned int reg, unsigned long base, - unsigned long size, mtrr_type type); - void (*set_all)(void); - - void (*get)(unsigned int reg, unsigned long *base, - unsigned long *size, mtrr_type * type); - int (*get_free_region)(unsigned long base, unsigned long size, - int replace_reg); - int (*validate_add_page)(unsigned long base, unsigned long size, - unsigned int type); - int (*have_wrcomb)(void); -}; - void mtrr_generic_get(unsigned int reg, unsigned long *base, unsigned long *size, mtrr_type *type); int mtrr_generic_get_free_region(unsigned long base, unsigned long size, @@ -40,8 +22,6 @@ void mtrr_generic_set(unsigned int reg, unsigned long base, unsigned long size, mtrr_type type); int mtrr_generic_have_wrcomb(void); -extern const struct mtrr_ops generic_mtrr_ops; - extern int positive_have_wrcomb(void); /* library functions for processor-specific routines */ @@ -58,10 +38,7 @@ void set_mtrr_prepare_save(struct set_mtrr_context *ctxt); void get_mtrr_state(void); -extern void set_mtrr_ops(const struct mtrr_ops *); - extern u64 size_or_mask, size_and_mask; -extern const struct mtrr_ops *mtrr_if; extern unsigned int num_var_ranges;