From: Yinghai Lu <yinghai@kernel.org>
To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
yinghai@kernel.org, jaswinder@kernel.org,
alan@lxorguk.ukuu.org.uk, jaswinderrajput@gmail.com,
akpm@linux-foundation.org, tglx@linutronix.de, mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/cleanups] x86: Clean up mtrr/cleanup.c
Date: Sat, 04 Jul 2009 14:12:48 -0700 [thread overview]
Message-ID: <4A4FC5D0.6090000@kernel.org> (raw)
In-Reply-To: <tip-63f9600fadb10ea739108ae93e3e842d9843c58b@git.kernel.org>
tip-bot for Jaswinder Singh Rajput wrote:
> Commit-ID: 63f9600fadb10ea739108ae93e3e842d9843c58b
> Gitweb: http://git.kernel.org/tip/63f9600fadb10ea739108ae93e3e842d9843c58b
> Author: Jaswinder Singh Rajput <jaswinder@kernel.org>
> AuthorDate: Sat, 4 Jul 2009 07:51:32 +0530
> Committer: Ingo Molnar <mingo@elte.hu>
> CommitDate: Sat, 4 Jul 2009 11:10:46 +0200
>
> x86: Clean up mtrr/cleanup.c
>
> Fix trivial style problems:
>
> WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
> WARNING: Use #include <linux/kvm_para.h> instead of <asm/kvm_para.h>
>
> Also, nr_mtrr_spare_reg should be unsigned long.
>
> arch/x86/kernel/cpu/mtrr/cleanup.o:
>
> text data bss dec hex filename
> 6241 8992 2056 17289 4389 cleanup.o.before
> 6241 8992 2056 17289 4389 cleanup.o.after
>
> The md5 has changed:
> 1a7a27513aef1825236daf29110fe657 cleanup.o.before.asm
> bcea358efa2532b6020e338e158447af cleanup.o.after.asm
>
> Because a WARN_ON()'s __LINE__ value changed by 3 lines.
>
> Suggested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Yinghai Lu <yinghai@kernel.org>
> LKML-Reference: <20090703164225.GA21447@elte.hu>
> [ Did lots of other cleanups to make the code look more consistent. ]
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
>
> ---
> arch/x86/kernel/cpu/mtrr/cleanup.c | 350 ++++++++++++++++++------------------
> 1 files changed, 176 insertions(+), 174 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c
> index 1d584a1..b8aba81 100644
> --- a/arch/x86/kernel/cpu/mtrr/cleanup.c
> +++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
> @@ -1,51 +1,52 @@
> -/* MTRR (Memory Type Range Register) cleanup
> -
> - Copyright (C) 2009 Yinghai Lu
> -
> - This library is free software; you can redistribute it and/or
> - modify it under the terms of the GNU Library General Public
> - License as published by the Free Software Foundation; either
> - version 2 of the License, or (at your option) any later version.
> -
> - This library is distributed in the hope that it will be useful,
> - but WITHOUT ANY WARRANTY; without even the implied warranty of
> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - Library General Public License for more details.
> -
> - You should have received a copy of the GNU Library General Public
> - License along with this library; if not, write to the Free
> - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> -*/
> -
> +/*
> + * MTRR (Memory Type Range Register) cleanup
> + *
> + * Copyright (C) 2009 Yinghai Lu
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Library General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Library General Public License for more details.
> + *
> + * You should have received a copy of the GNU Library General Public
> + * License along with this library; if not, write to the Free
> + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> + */
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/pci.h>
> #include <linux/smp.h>
> #include <linux/cpu.h>
> -#include <linux/mutex.h>
> #include <linux/sort.h>
> +#include <linux/mutex.h>
> +#include <linux/uaccess.h>
> +#include <linux/kvm_para.h>
>
> +#include <asm/processor.h>
> #include <asm/e820.h>
> #include <asm/mtrr.h>
> -#include <asm/uaccess.h>
> -#include <asm/processor.h>
> #include <asm/msr.h>
> -#include <asm/kvm_para.h>
> +
> #include "mtrr.h"
>
> -/* should be related to MTRR_VAR_RANGES nums */
> +/* Should be related to MTRR_VAR_RANGES nums */
> #define RANGE_NUM 256
>
> struct res_range {
> - unsigned long start;
> - unsigned long end;
> + unsigned long start;
> + unsigned long end;
> };
>
> static int __init
> -add_range(struct res_range *range, int nr_range, unsigned long start,
> - unsigned long end)
> +add_range(struct res_range *range, int nr_range,
> + unsigned long start, unsigned long end)
> {
> - /* out of slots */
> + /* Out of slots: */
> if (nr_range >= RANGE_NUM)
> return nr_range;
>
> @@ -58,12 +59,12 @@ add_range(struct res_range *range, int nr_range, unsigned long start,
> }
>
> static int __init
> -add_range_with_merge(struct res_range *range, int nr_range, unsigned long start,
> - unsigned long end)
> +add_range_with_merge(struct res_range *range, int nr_range,
> + unsigned long start, unsigned long end)
> {
> int i;
>
> - /* try to merge it with old one */
> + /* Try to merge it with old one: */
> for (i = 0; i < nr_range; i++) {
> unsigned long final_start, final_end;
> unsigned long common_start, common_end;
> @@ -84,7 +85,7 @@ add_range_with_merge(struct res_range *range, int nr_range, unsigned long start,
> return nr_range;
> }
>
> - /* need to add that */
> + /* Need to add it: */
> return add_range(range, nr_range, start, end);
> }
>
> @@ -117,7 +118,7 @@ subtract_range(struct res_range *range, unsigned long start, unsigned long end)
> }
>
> if (start > range[j].start && end < range[j].end) {
> - /* find the new spare */
> + /* Find the new spare: */
> for (i = 0; i < RANGE_NUM; i++) {
> if (range[i].end == 0)
> break;
> @@ -147,13 +148,19 @@ static int __init cmp_range(const void *x1, const void *x2)
> }
>
> struct var_mtrr_range_state {
> - unsigned long base_pfn;
> - unsigned long size_pfn;
> - mtrr_type type;
> + unsigned long base_pfn;
> + unsigned long size_pfn;
> + mtrr_type type;
> };
>
> static struct var_mtrr_range_state __initdata range_state[RANGE_NUM];
> +
> static int __initdata debug_print;
> +#define Dprintk(x...) do { if (debug_print) printk(KERN_DEBUG x); } while (0)
> +
> +
two blank lines?
> +#define BIOS_BUG_MSG KERN_WARNING \
> + "WARNING: BIOS bug: VAR MTRR %d contains strange UC entry under 1M, check with your system vendor!\n"
No user for this
YH
next prev parent reply other threads:[~2009-07-04 21:15 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 11:36 [PATCH] vt: add an event interface Alan Cox
2009-07-03 6:45 ` Ingo Molnar
2009-07-03 9:08 ` Alan Cox
2009-07-03 9:16 ` Ingo Molnar
2009-07-03 9:44 ` Alan Cox
2009-07-03 9:54 ` Ingo Molnar
2009-07-03 10:06 ` Alan Cox
2009-07-03 10:22 ` Ingo Molnar
2009-07-03 10:44 ` Alan Cox
2009-07-03 13:17 ` Ingo Molnar
2009-07-03 13:37 ` Alan Cox
2009-07-03 14:47 ` Ingo Molnar
2009-07-03 15:02 ` Alan Cox
2009-07-03 15:42 ` Ingo Molnar
2009-07-03 15:48 ` Ingo Molnar
2009-07-03 16:11 ` Alan Cox
2009-07-03 16:24 ` Ingo Molnar
2009-07-03 18:29 ` Alan Cox
2009-07-03 18:41 ` Ingo Molnar
2009-07-03 15:57 ` Ingo Molnar
2009-07-03 15:58 ` Ingo Molnar
2009-07-03 16:26 ` Alan Cox
2009-07-03 16:33 ` Ingo Molnar
2009-07-03 16:42 ` Ingo Molnar
2009-07-03 22:17 ` Jaswinder Singh Rajput
2009-07-04 2:18 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 1/9 -tip] x86: mtrr/amd.c fix trivial style problems Jaswinder Singh Rajput
2009-07-04 2:20 ` [PATCH 2/9 -tip] x86: mtrr/centaur.c fix " Jaswinder Singh Rajput
2009-07-04 2:21 ` [PATCH 3/9 -tip] x86: mtrr/cleanup.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:22 ` [PATCH 4/9 -tip] x86: mtrr/cyrix.c " Jaswinder Singh Rajput
2009-07-04 2:23 ` [PATCH 5/9 -tip] x86: mtrr/generic.c fix " Jaswinder Singh Rajput
2009-07-04 2:23 ` [PATCH 6/9 -tip] x86: mtrr/if.c fix trivial " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 7/9 -tip] x86: mtrr/mtrr.h " Jaswinder Singh Rajput
2009-07-04 2:24 ` [PATCH 8/9 -tip] x86: mtrr/state.c " Jaswinder Singh Rajput
2009-07-04 2:26 ` [PATCH 9/9 -tip] x86: mtrr/main.c fix " Jaswinder Singh Rajput
2009-07-05 18:21 ` [GIT PULL -tip][PATCH 0/9] MTRR fix trivial style patches Ingo Molnar
2009-07-05 22:09 ` Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/amd.c: tip-bot for Jaswinder Singh Rajput
2009-07-04 10:06 ` [tip:x86/cleanups] x86: Clean up mtrr/centaur.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cleanup.c tip-bot for Jaswinder Singh Rajput
2009-07-04 21:12 ` Yinghai Lu [this message]
2009-07-05 0:27 ` Ingo Molnar
2009-07-05 6:02 ` Jaswinder Singh Rajput
2009-07-05 11:59 ` Pekka Enberg
2009-07-05 13:19 ` Jaswinder Singh Rajput
2009-07-05 20:11 ` Thomas Gleixner
2009-07-05 22:16 ` Jaswinder Singh Rajput
2009-07-05 18:04 ` Ingo Molnar
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/cyrix.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/generic.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/if.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:07 ` [tip:x86/cleanups] x86: Clean up mtrr/mtrr.h tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/state.c tip-bot for Jaswinder Singh Rajput
2009-07-04 10:08 ` [tip:x86/cleanups] x86: Clean up mtrr/main.c tip-bot for Jaswinder Singh Rajput
2009-07-05 7:57 ` [tip:x86/cleanups] x86: Further clean up of mtrr/generic.c tip-bot for Ingo Molnar
2009-07-03 16:10 ` [PATCH] vt: add an event interface Ingo Molnar
2009-07-03 18:24 ` Alan Cox
2009-07-21 16:23 ` Lennart Poettering
2009-07-21 16:32 ` Alan Cox
2009-07-22 11:14 ` Lennart Poettering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4FC5D0.6090000@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hpa@zytor.com \
--cc=jaswinder@kernel.org \
--cc=jaswinderrajput@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox