Commit d972a1f0 authored by David Mosberger's avatar David Mosberger

Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5

into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5
parents 7f012496 4efc6555
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* PAL & SAL emulation. * PAL & SAL emulation.
* *
* Copyright (C) 1998-2001 Hewlett-Packard Co * Copyright (C) 1998-2001 Hewlett-Packard Co
* Copyright (C) 1998-2001 David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
* *
* For the HP simulator, this file gets include in boot/bootloader.c. * For the HP simulator, this file gets include in boot/bootloader.c.
* For SoftSDV, this file gets included in sys_softsdv.c. * For SoftSDV, this file gets included in sys_softsdv.c.
......
...@@ -1012,28 +1012,13 @@ ia64_log_prt_oem_data (int header_len, int sect_len, u8 *p_data, prfunc_t prfunc ...@@ -1012,28 +1012,13 @@ ia64_log_prt_oem_data (int header_len, int sect_len, u8 *p_data, prfunc_t prfunc
void void
ia64_log_rec_header_print (sal_log_record_header_t *lh, prfunc_t prfunc) ia64_log_rec_header_print (sal_log_record_header_t *lh, prfunc_t prfunc)
{ {
char str_buf[32]; prfunc("+Err Record ID: %d SAL Rev: %2x.%02x\n", lh->id,
lh->revision.major, lh->revision.minor);
sprintf(str_buf, "%2d.%02d", prfunc("+Time: %02x/%02x/%02x%02x %02x:%02x:%02x Severity %d\n",
(lh->revision.major >> 4) * 10 + (lh->revision.major & 0xf), lh->timestamp.slh_month, lh->timestamp.slh_day,
(lh->revision.minor >> 4) * 10 + (lh->revision.minor & 0xf)); lh->timestamp.slh_century, lh->timestamp.slh_year,
prfunc("+Err Record ID: %d SAL Rev: %s\n", lh->id, str_buf); lh->timestamp.slh_hour, lh->timestamp.slh_minute,
sprintf(str_buf, "%02d/%02d/%04d/ %02d:%02d:%02d", lh->timestamp.slh_second, lh->severity);
(lh->timestamp.slh_month >> 4) * 10 +
(lh->timestamp.slh_month & 0xf),
(lh->timestamp.slh_day >> 4) * 10 +
(lh->timestamp.slh_day & 0xf),
(lh->timestamp.slh_century >> 4) * 1000 +
(lh->timestamp.slh_century & 0xf) * 100 +
(lh->timestamp.slh_year >> 4) * 10 +
(lh->timestamp.slh_year & 0xf),
(lh->timestamp.slh_hour >> 4) * 10 +
(lh->timestamp.slh_hour & 0xf),
(lh->timestamp.slh_minute >> 4) * 10 +
(lh->timestamp.slh_minute & 0xf),
(lh->timestamp.slh_second >> 4) * 10 +
(lh->timestamp.slh_second & 0xf));
prfunc("+Time: %s Severity %d\n", str_buf, lh->severity);
} }
/* /*
......
...@@ -148,8 +148,8 @@ copy_siginfo (siginfo_t *to, siginfo_t *from) ...@@ -148,8 +148,8 @@ copy_siginfo (siginfo_t *to, siginfo_t *from)
if (from->si_code < 0) if (from->si_code < 0)
memcpy(to, from, sizeof(siginfo_t)); memcpy(to, from, sizeof(siginfo_t));
else else
/* _sigchld is currently the largest know union member */ /* _sigprof is currently the largest know union member */
memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigchld)); memcpy(to, from, 4*sizeof(int) + sizeof(from->_sifields._sigprof));
} }
extern int copy_siginfo_from_user(siginfo_t *to, siginfo_t *from); extern int copy_siginfo_from_user(siginfo_t *to, siginfo_t *from);
......
...@@ -250,7 +250,7 @@ bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) ...@@ -250,7 +250,7 @@ bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
* status register into the notification area. * status register into the notification area.
* This fakes the shub performing the copy. * This fakes the shub performing the copy.
*/ */
if (jiffies > bte->idealTransferTimeout) { if (time_after(jiffies, bte->idealTransferTimeout)) {
bte->notify = HUB_L(bte->bte_base_addr); bte->notify = HUB_L(bte->bte_base_addr);
bte->idealTransferTimeoutReached++; bte->idealTransferTimeoutReached++;
bte->idealTransferTimeout = jiffies + bte->idealTransferTimeout = jiffies +
......
...@@ -53,9 +53,10 @@ ...@@ -53,9 +53,10 @@
typedef struct { typedef struct {
struct mm_struct *mm; struct mm_struct *mm;
unsigned int nr; /* == ~0U => fast mode */ unsigned int nr; /* == ~0U => fast mode */
unsigned int fullmm; /* non-zero means full mm flush */ unsigned char fullmm; /* non-zero means full mm flush */
unsigned long freed; /* number of pages freed */ unsigned char need_flush; /* really unmapped some PTEs? */
unsigned long freed; /* number of pages freed */
unsigned long start_addr; unsigned long start_addr;
unsigned long end_addr; unsigned long end_addr;
struct page *pages[FREE_PTE_NR]; struct page *pages[FREE_PTE_NR];
...@@ -73,6 +74,10 @@ ia64_tlb_flush_mmu (mmu_gather_t *tlb, unsigned long start, unsigned long end) ...@@ -73,6 +74,10 @@ ia64_tlb_flush_mmu (mmu_gather_t *tlb, unsigned long start, unsigned long end)
{ {
unsigned int nr; unsigned int nr;
if (!tlb->need_flush)
return;
tlb->need_flush = 0;
if (tlb->fullmm) { if (tlb->fullmm) {
/* /*
* Tearing down the entire address space. This happens both as a result * Tearing down the entire address space. This happens both as a result
...@@ -167,18 +172,6 @@ tlb_finish_mmu (mmu_gather_t *tlb, unsigned long start, unsigned long end) ...@@ -167,18 +172,6 @@ tlb_finish_mmu (mmu_gather_t *tlb, unsigned long start, unsigned long end)
check_pgt_cache(); check_pgt_cache();
} }
/*
* Remove TLB entry for PTE mapped at virtual address ADDRESS. This is called for any
* PTE, not just those pointing to (normal) physical memory.
*/
static inline void
__tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address)
{
if (tlb->start_addr == ~0UL)
tlb->start_addr = address;
tlb->end_addr = address + PAGE_SIZE;
}
/* /*
* Logically, this routine frees PAGE. On MP machines, the actual freeing of the page * Logically, this routine frees PAGE. On MP machines, the actual freeing of the page
* must be delayed until after the TLB has been flushed (see comments at the beginning of * must be delayed until after the TLB has been flushed (see comments at the beginning of
...@@ -187,6 +180,8 @@ __tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address) ...@@ -187,6 +180,8 @@ __tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address)
static inline void static inline void
tlb_remove_page (mmu_gather_t *tlb, struct page *page) tlb_remove_page (mmu_gather_t *tlb, struct page *page)
{ {
tlb->need_flush = 1;
if (tlb_fast_mode(tlb)) { if (tlb_fast_mode(tlb)) {
free_page_and_swap_cache(page); free_page_and_swap_cache(page);
return; return;
...@@ -196,11 +191,37 @@ tlb_remove_page (mmu_gather_t *tlb, struct page *page) ...@@ -196,11 +191,37 @@ tlb_remove_page (mmu_gather_t *tlb, struct page *page)
ia64_tlb_flush_mmu(tlb, tlb->start_addr, tlb->end_addr); ia64_tlb_flush_mmu(tlb, tlb->start_addr, tlb->end_addr);
} }
/*
* Remove TLB entry for PTE mapped at virtual address ADDRESS. This is called for any
* PTE, not just those pointing to (normal) physical memory.
*/
static inline void
__tlb_remove_tlb_entry (mmu_gather_t *tlb, pte_t *ptep, unsigned long address)
{
if (tlb->start_addr == ~0UL)
tlb->start_addr = address;
tlb->end_addr = address + PAGE_SIZE;
}
#define tlb_start_vma(tlb, vma) do { } while (0) #define tlb_start_vma(tlb, vma) do { } while (0)
#define tlb_end_vma(tlb, vma) do { } while (0) #define tlb_end_vma(tlb, vma) do { } while (0)
#define tlb_remove_tlb_entry(tlb, ptep, addr) __tlb_remove_tlb_entry(tlb, ptep, addr) #define tlb_remove_tlb_entry(tlb, ptep, addr) \
#define pte_free_tlb(tlb, ptep) __pte_free_tlb(tlb, ptep) do { \
#define pmd_free_tlb(tlb, ptep) __pmd_free_tlb(tlb, ptep) tlb->need_flush = 1; \
__tlb_remove_tlb_entry(tlb, ptep, addr); \
} while (0)
#define pte_free_tlb(tlb, ptep) \
do { \
tlb->need_flush = 1; \
__pte_free_tlb(tlb, ptep); \
} while (0)
#define pmd_free_tlb(tlb, ptep) \
do { \
tlb->need_flush = 1; \
__pmd_free_tlb(tlb, ptep); \
} while (0)
#endif /* _ASM_IA64_TLB_H */ #endif /* _ASM_IA64_TLB_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment