Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Make show_mem() skip holes in a pgdat [IA64] ia64_wait_for_slaves() incorrectly reports MCA
This commit is contained in:
@@ -963,7 +963,7 @@ no_mod:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ia64_wait_for_slaves(int monarch)
|
ia64_wait_for_slaves(int monarch, const char *type)
|
||||||
{
|
{
|
||||||
int c, wait = 0, missing = 0;
|
int c, wait = 0, missing = 0;
|
||||||
for_each_online_cpu(c) {
|
for_each_online_cpu(c) {
|
||||||
@@ -989,7 +989,7 @@ ia64_wait_for_slaves(int monarch)
|
|||||||
}
|
}
|
||||||
if (!missing)
|
if (!missing)
|
||||||
goto all_in;
|
goto all_in;
|
||||||
printk(KERN_INFO "OS MCA slave did not rendezvous on cpu");
|
printk(KERN_INFO "OS %s slave did not rendezvous on cpu", type);
|
||||||
for_each_online_cpu(c) {
|
for_each_online_cpu(c) {
|
||||||
if (c == monarch)
|
if (c == monarch)
|
||||||
continue;
|
continue;
|
||||||
@@ -1000,7 +1000,7 @@ ia64_wait_for_slaves(int monarch)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
all_in:
|
all_in:
|
||||||
printk(KERN_INFO "All OS MCA slaves have reached rendezvous\n");
|
printk(KERN_INFO "All OS %s slaves have reached rendezvous\n", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1038,7 +1038,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||||||
if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
|
if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
|
||||||
== NOTIFY_STOP)
|
== NOTIFY_STOP)
|
||||||
ia64_mca_spin(__FUNCTION__);
|
ia64_mca_spin(__FUNCTION__);
|
||||||
ia64_wait_for_slaves(cpu);
|
ia64_wait_for_slaves(cpu, "MCA");
|
||||||
|
|
||||||
/* Wakeup all the processors which are spinning in the rendezvous loop.
|
/* Wakeup all the processors which are spinning in the rendezvous loop.
|
||||||
* They will leave SAL, then spin in the OS with interrupts disabled
|
* They will leave SAL, then spin in the OS with interrupts disabled
|
||||||
@@ -1429,7 +1429,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
|
|||||||
*/
|
*/
|
||||||
printk("Delaying for 5 seconds...\n");
|
printk("Delaying for 5 seconds...\n");
|
||||||
udelay(5*1000000);
|
udelay(5*1000000);
|
||||||
ia64_wait_for_slaves(cpu);
|
ia64_wait_for_slaves(cpu, "INIT");
|
||||||
/* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
|
/* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
|
||||||
* to default_monarch_init_process() above and just print all the
|
* to default_monarch_init_process() above and just print all the
|
||||||
* tasks.
|
* tasks.
|
||||||
|
@@ -519,6 +519,68 @@ void __cpuinit *per_cpu_init(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
|
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||||
|
static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
|
||||||
|
{
|
||||||
|
unsigned long end_address, hole_next_pfn;
|
||||||
|
unsigned long stop_address;
|
||||||
|
|
||||||
|
end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
|
||||||
|
end_address = PAGE_ALIGN(end_address);
|
||||||
|
|
||||||
|
stop_address = (unsigned long) &vmem_map[
|
||||||
|
pgdat->node_start_pfn + pgdat->node_spanned_pages];
|
||||||
|
|
||||||
|
do {
|
||||||
|
pgd_t *pgd;
|
||||||
|
pud_t *pud;
|
||||||
|
pmd_t *pmd;
|
||||||
|
pte_t *pte;
|
||||||
|
|
||||||
|
pgd = pgd_offset_k(end_address);
|
||||||
|
if (pgd_none(*pgd)) {
|
||||||
|
end_address += PGDIR_SIZE;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pud = pud_offset(pgd, end_address);
|
||||||
|
if (pud_none(*pud)) {
|
||||||
|
end_address += PUD_SIZE;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmd = pmd_offset(pud, end_address);
|
||||||
|
if (pmd_none(*pmd)) {
|
||||||
|
end_address += PMD_SIZE;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pte = pte_offset_kernel(pmd, end_address);
|
||||||
|
retry_pte:
|
||||||
|
if (pte_none(*pte)) {
|
||||||
|
end_address += PAGE_SIZE;
|
||||||
|
pte++;
|
||||||
|
if ((end_address < stop_address) &&
|
||||||
|
(end_address != ALIGN(end_address, 1UL << PMD_SHIFT)))
|
||||||
|
goto retry_pte;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
/* Found next valid vmem_map page */
|
||||||
|
break;
|
||||||
|
} while (end_address < stop_address);
|
||||||
|
|
||||||
|
end_address = min(end_address, stop_address);
|
||||||
|
end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1;
|
||||||
|
hole_next_pfn = end_address / sizeof(struct page);
|
||||||
|
return hole_next_pfn - pgdat->node_start_pfn;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
|
||||||
|
{
|
||||||
|
return i + 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* show_mem - give short summary of memory stats
|
* show_mem - give short summary of memory stats
|
||||||
*
|
*
|
||||||
@@ -547,8 +609,10 @@ void show_mem(void)
|
|||||||
struct page *page;
|
struct page *page;
|
||||||
if (pfn_valid(pgdat->node_start_pfn + i))
|
if (pfn_valid(pgdat->node_start_pfn + i))
|
||||||
page = pfn_to_page(pgdat->node_start_pfn + i);
|
page = pfn_to_page(pgdat->node_start_pfn + i);
|
||||||
else
|
else {
|
||||||
|
i = find_next_valid_pfn_for_pgdat(pgdat, i) - 1;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (PageReserved(page))
|
if (PageReserved(page))
|
||||||
reserved++;
|
reserved++;
|
||||||
else if (PageSwapCache(page))
|
else if (PageSwapCache(page))
|
||||||
|
Reference in New Issue
Block a user