From patchwork Tue Aug 16 23:28:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 9284995 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 A1BB9607FD for ; Tue, 16 Aug 2016 23:32:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 935D628704 for ; Tue, 16 Aug 2016 23:32:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8832F2878E; Tue, 16 Aug 2016 23:32:20 +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 368F228704 for ; Tue, 16 Aug 2016 23:32:20 +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 1bZnnY-0004dH-4o; Tue, 16 Aug 2016 23:29:32 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZnnW-0004cU-TA for xen-devel@lists.xen.org; Tue, 16 Aug 2016 23:29:30 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id 8B/D6-29421-AD1A3B75; Tue, 16 Aug 2016 23:29:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsVyMXThQd2bCze HGzTdlrNY8nExiwOjx9Hdv5kCGKNYM/OS8isSWDMab95iLZjLVfHv8G7mBsa7HF2MXBxCAhMZ Jbb2TWcDcVgE5jFLvLrRwg7iSAj0s0rs/t7P0sXICeTESEz7tJIdwq6SaD71iA3EFhJQkPg94 RATxKgVTBKXfxwAa2AT0JB48msGWJGIgLTEtc+XGUFsZoESib3zf4DZwgKWEpvfr2IFsVkEVC VWPn4GFucVcJRYtOAI0DIOoGVyEgve+4CEOQWcJI6+bGCH2Oso0bxmOtsERoEFjAyrGDWKU4v KUot0DU30kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1kvNzNzECQ4sBCHYwXt8YcIhRkoNJ SZR35sSN4UJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeOsWbA4XEixKTU+tSMvMAQY5TFqCg0dJh DcKJM1bXJCYW5yZDpE6xWjMseX3tbVMHNum3lvLJMSSl5+XKiXOGw9SKgBSmlGaBzcIFn2XGG WlhHkZgU4T4ilILcrNLEGVf8UozsGoJMy7A2QKT2ZeCdy+V0CnMAGdoi+9AeSUkkSElFQDoxc H927xwPbGBM/fRxvOfUu4HrGQ68uqJQWmQVUnJ8m8Sn1U9enH3amt0Vvt9J7aRcWsrSqxOFpi 9LY3Q2mJ6g8Xq55wtx7LBpvJuuquxY3tNr3CM1/f17W//GTf039r7eRCuSsMkt87BNQ8dA472 r307+OlxwPj/kQ2brSuj/v+dOvaqcYZSizFGYmGWsxFxYkAvzgzebkCAAA= X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-10.tower-21.messagelabs.com!1471390168!28673744!1 X-Originating-IP: [209.85.161.193] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25798 invoked from network); 16 Aug 2016 23:29:29 -0000 Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by server-10.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Aug 2016 23:29:29 -0000 Received: by mail-yw0-f193.google.com with SMTP id j12so4223913ywb.1 for ; Tue, 16 Aug 2016 16:29:29 -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=zhKUQOneMh5ZI9ns545f0rwZ0jheptTwrDI7hB//CIo=; b=Em9V77+Sd7Rlo1OzZQLQTYdea5M3y1kvLb0zaA8JntjUxLYhb3mCm0rASExC56r/QA aRHU8e0pvBNhI7UcOgWn8asrbpAXyYiqTgNqsMKqNJw+G9Dzyj4dN2xW/3gQ/YhaBy2+ /kEP/rxp4XX5+ZMzo4jFMFLjbe8T0isYkFRU8= 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=zhKUQOneMh5ZI9ns545f0rwZ0jheptTwrDI7hB//CIo=; b=iN9RL4LVDABZaGguUNtaPOgwj5o99Z6IBjAFM6Dv0KT9YhZjAKUfLpFEGKnrwC2bYP fgivi8f+fO0mcuga6TZ/6LVjeO9WvmMSeehUJwrwxwDkRiF58w1F0OGCAwl6L+/q0Djh crs6z7peGsK54rVrs11loa6kxhEy3zSuZxiRQe+dvusjSP3PEkzuLh7TOUv1lS0yPN4m tEhB1I1fun707w0GHaWt888Hj9l59bdjSCLY9o5w8mapf2KniQe7BcKByy4uo9DOvg0t rSBn+3r2IeFU6fB7XoLqFPHiWmPfzlzTUFJAxVmllM7UfGTrbfw567G0wETgSN0GMl9g juww== X-Gm-Message-State: AEkoouuac9ImMEpoMmosU6xwqpLv6dfRb1CLbgnHxT/eNjUpLj8rX5k40KCtJbof3GEGSA== X-Received: by 10.129.93.86 with SMTP id r83mr27035516ywb.211.1471390168109; Tue, 16 Aug 2016 16:29:28 -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.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 16:29:27 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Tue, 16 Aug 2016 18:28:25 -0500 Message-Id: <1471390109-10407-6-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 5/9] x86/mtrr: drop unused is_cpu() macro 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 is_cpu() evaluated to Intel always so just drop it entirely. Signed-off-by: Doug Goldstein --- xen/arch/x86/cpu/mtrr/generic.c | 2 +- xen/arch/x86/cpu/mtrr/mtrr.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c index 5c4b273..45d4def 100644 --- a/xen/arch/x86/cpu/mtrr/generic.c +++ b/xen/arch/x86/cpu/mtrr/generic.c @@ -520,7 +520,7 @@ int mtrr_generic_validate_add_page(unsigned long base, unsigned long size, unsig /* For Intel PPro stepping <= 7, must be 4 MiB aligned and not touch 0x70000000->0x7003FFFF */ - if (is_cpu(INTEL) && boot_cpu_data.x86 == 6 && + if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 1 && boot_cpu_data.x86_mask <= 7) { if (base & ((1 << (22 - PAGE_SHIFT)) - 1)) { diff --git a/xen/arch/x86/cpu/mtrr/mtrr.h b/xen/arch/x86/cpu/mtrr/mtrr.h index 5e0d832..25f4867 100644 --- a/xen/arch/x86/cpu/mtrr/mtrr.h +++ b/xen/arch/x86/cpu/mtrr/mtrr.h @@ -63,8 +63,6 @@ extern void set_mtrr_ops(const struct mtrr_ops *); extern u64 size_or_mask, size_and_mask; extern const struct mtrr_ops *mtrr_if; -#define is_cpu(vnd) (X86_VENDOR_INTEL == X86_VENDOR_##vnd) - extern unsigned int num_var_ranges; void mtrr_state_warn(void);