diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-21 16:35:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-21 16:35:10 -0500 |
commit | cfd74486eace27a0899b30529d01bc1a09a5b973 (patch) | |
tree | b4bb52cf16203b78f1a102567915911f0d1c4b85 /arch | |
parent | a1d3f5b70d13b7035f925de1f2ba0003a04b9ac5 (diff) | |
parent | 8e1b4cf2108488ccfb9a3e7ed7cd85a435e01d4b (diff) |
Merge branch 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
* 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: p2m: correctly initialize partial p2m leaf
xen: fix non-ANSI function warning in irq.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/irq.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/p2m.c | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 9d30105a0c4a..6a6fe8939645 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c | |||
@@ -126,7 +126,7 @@ static const struct pv_irq_ops xen_irq_ops __initdata = { | |||
126 | #endif | 126 | #endif |
127 | }; | 127 | }; |
128 | 128 | ||
129 | void __init xen_init_irq_ops() | 129 | void __init xen_init_irq_ops(void) |
130 | { | 130 | { |
131 | pv_irq_ops = xen_irq_ops; | 131 | pv_irq_ops = xen_irq_ops; |
132 | x86_init.irqs.intr_init = xen_init_IRQ; | 132 | x86_init.irqs.intr_init = xen_init_IRQ; |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 8f2251d2a3f8..ddc81a06edb9 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -237,7 +237,25 @@ void __init xen_build_dynamic_phys_to_machine(void) | |||
237 | p2m_top[topidx] = mid; | 237 | p2m_top[topidx] = mid; |
238 | } | 238 | } |
239 | 239 | ||
240 | p2m_top[topidx][mididx] = &mfn_list[pfn]; | 240 | /* |
241 | * As long as the mfn_list has enough entries to completely | ||
242 | * fill a p2m page, pointing into the array is ok. But if | ||
243 | * not the entries beyond the last pfn will be undefined. | ||
244 | * And guessing that the 'what-ever-there-is' does not take it | ||
245 | * too kindly when changing it to invalid markers, a new page | ||
246 | * is allocated, initialized and filled with the valid part. | ||
247 | */ | ||
248 | if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) { | ||
249 | unsigned long p2midx; | ||
250 | unsigned long *p2m = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
251 | p2m_init(p2m); | ||
252 | |||
253 | for (p2midx = 0; pfn + p2midx < max_pfn; p2midx++) { | ||
254 | p2m[p2midx] = mfn_list[pfn + p2midx]; | ||
255 | } | ||
256 | p2m_top[topidx][mididx] = p2m; | ||
257 | } else | ||
258 | p2m_top[topidx][mididx] = &mfn_list[pfn]; | ||
241 | } | 259 | } |
242 | 260 | ||
243 | m2p_override_init(); | 261 | m2p_override_init(); |