1
0
Fork 0
alistair23-linux/arch
Toshi Kani 0cc705f56e x86/mm/mtrr: Clean up mtrr_type_lookup()
MTRRs contain fixed and variable entries. mtrr_type_lookup() may
repeatedly call __mtrr_type_lookup() to handle a request that
overlaps with variable entries.

However, __mtrr_type_lookup() also handles the fixed entries,
which do not have to be repeated. Therefore, this patch creates
separate functions, mtrr_type_lookup_fixed() and
mtrr_type_lookup_variable(), to handle the fixed and variable
ranges respectively.

The patch also updates the function headers to clarify the
return values and output argument. It updates comments to
clarify that the repeating is necessary to handle overlaps with
the default type, since overlaps with multiple entries alone can
be handled without such repeating.

There is no functional change in this patch.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Elliott@hp.com
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@intel.com
Cc: linux-mm <linux-mm@kvack.org>
Cc: pebolle@tiscali.nl
Link: http://lkml.kernel.org/r/1431714237-880-6-git-send-email-toshi.kani@hp.com
Link: http://lkml.kernel.org/r/1432628901-18044-6-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-05-27 14:40:57 +02:00
..
alpha alpha: forward declare struct pt_regs in processor.h 2015-04-17 09:03:53 -04:00
arc ARC: inline cache flush toggle helpers 2015-05-11 11:21:41 +05:30
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-05-22 15:44:50 -07:00
arm64 ARM: SoC fixes for 4.1-rc3 2015-05-16 15:33:25 -07:00
avr32 Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
blackfin blackfin updates for Linux 4.1 2015-04-24 07:58:07 -07:00
c6x C6X Fixes for v4.1 2015-04-16 18:48:55 -04:00
cris CRIS changes for 4.1 2015-04-26 13:31:05 -07:00
frv Devicetree updates for 4.1: 2015-04-24 08:46:18 -07:00
hexagon Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
ia64 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
m32r m32r: make flush_cpumask non-volatile. 2015-05-09 11:09:29 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2015-04-20 10:12:29 -07:00
metag Metag architecture changes for v4.1 2015-04-24 07:56:50 -07:00
microblaze microblaze: use asm-generic for seccomp.h 2015-04-17 09:04:10 -04:00
mips MIPS: tlb-r4k: Fix PG_ELPA comment 2015-05-15 22:02:50 +02:00
mn10300 Devicetree updates for 4.1: 2015-04-24 08:46:18 -07:00
nios2 nios2 update for v4.1-rc1 2015-04-24 07:59:07 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2015-04-15 16:39:15 -07:00
parisc parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures 2015-05-12 22:03:44 +02:00
powerpc This pull request includes a fix for two oopses, one on PPC 2015-05-21 20:15:16 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-05-22 14:26:36 -07:00
score arch: Remove exec_domain from remaining archs 2015-04-12 21:03:30 +02:00
sh Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-04-24 09:49:37 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2015-04-21 23:21:34 -07:00
tile tile: properly use node_isset() on a nodemask_t 2015-04-28 10:36:45 -04:00
um Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
unicore32 Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
x86 x86/mm/mtrr: Clean up mtrr_type_lookup() 2015-05-27 14:40:57 +02:00
xtensa Xtensa changes and fixes for 4.1 2015-04-17 15:32:30 -04:00
.gitignore
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00