Skip to content

Commit

Permalink
score: update inconsistent declare after .c was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Liqin committed Aug 30, 2009
1 parent d8aa899 commit ffa818b
Show file tree
Hide file tree
Showing 9 changed files with 472 additions and 35 deletions.
2 changes: 2 additions & 0 deletions arch/score/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@

#define IRQ_TIMER (7) /* Timer IRQ number of SPCT6600 */

extern void interrupt_exception_vector(void);

#endif /* _ASM_SCORE_IRQ_H */
7 changes: 6 additions & 1 deletion arch/score/include/asm/irq_regs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _ASM_SCORE_IRQ_REGS_H
#define _ASM_SCORE_IRQ_REGS_H

#include <asm-generic/irq_regs.h>
#include <linux/thread_info.h>

static inline struct pt_regs *get_irq_regs(void)
{
return current_thread_info()->regs;
}

#endif /* _ASM_SCORE_IRQ_REGS_H */
3 changes: 3 additions & 0 deletions arch/score/include/asm/linkage.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef _ASM_SCORE_LINKAGE_H
#define _ASM_SCORE_LINKAGE_H

#define __ALIGN .align 2
#define __ALIGN_STR ".align 2"

#endif /* _ASM_SCORE_LINKAGE_H */
4 changes: 2 additions & 2 deletions arch/score/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ extern unsigned long max_low_pfn;
extern unsigned long min_low_pfn;
extern unsigned long max_pfn;

#define __pa(vaddr) ((unsigned long) (vaddr))
#define __va(paddr) ((void *) (paddr))
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))

#define phys_to_pfn(phys) (PFN_DOWN(phys))
#define pfn_to_phys(pfn) (PFN_PHYS(pfn))
Expand Down
2 changes: 1 addition & 1 deletion arch/score/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
__free_pages(pte, PTE_ORDER);
}

#define __pte_free_tlb(tlb, pte) \
#define __pte_free_tlb(tlb, pte, buf) \
do { \
pgtable_page_dtor(pte); \
tlb_remove_page((tlb), pte); \
Expand Down
31 changes: 21 additions & 10 deletions arch/score/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ static inline void pmd_clear(pmd_t *pmdp)
((swp_entry_t) { pte_val(pte)})
#define __swp_entry_to_pte(x) ((pte_t) {(x).val})

#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd)))
#define pmd_phys(pmd) __pa((void *)pmd_val(pmd))
#define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
static inline pte_t pte_mkspecial(pte_t pte) { return pte; }

Expand All @@ -129,14 +130,11 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
#define pgd_clear(pgdp) do { } while (0)

#define kern_addr_valid(addr) (1)
#define pmd_offset(a, b) ((void *) 0)
#define pmd_page_vaddr(pmd) pmd_val(pmd)

#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL))
#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)

#define pud_offset(pgd, address) ((pud_t *) pgd)

#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CACHE)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
_PAGE_CACHE)
Expand Down Expand Up @@ -165,15 +163,27 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
#define __S110 PAGE_SHARED
#define __S111 PAGE_SHARED

#define pgprot_noncached(x) (x)
#define pgprot_noncached pgprot_noncached

static inline pgprot_t pgprot_noncached(pgprot_t _prot)
{
unsigned long prot = pgprot_val(_prot);

prot = (prot & ~_CACHE_MASK);

return __pgprot(prot);
}

#define __swp_type(x) (0)
#define __swp_offset(x) (0)
#define __swp_entry(typ, off) ((swp_entry_t) { ((typ) | ((off) << 7)) })
#define __swp_type(x) ((x).val & 0x1f)
#define __swp_offset(x) ((x).val >> 11)
#define __swp_entry(type, offset) ((swp_entry_t){(type) | ((offset) << 11)})

#define ZERO_PAGE(vaddr) ({ BUG(); NULL; })
extern unsigned long empty_zero_page;
extern unsigned long zero_page_mask;

#define swapper_pg_dir ((pgd_t *) NULL)
#define ZERO_PAGE(vaddr) \
(virt_to_page((void *)(empty_zero_page + \
(((unsigned long)(vaddr)) & zero_page_mask))))

#define pgtable_cache_init() do {} while (0)

Expand Down Expand Up @@ -248,6 +258,7 @@ static inline pte_t pte_mkyoung(pte_t pte)
#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)

extern unsigned long pgd_current;
extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
extern void paging_init(void);

static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
Expand Down
8 changes: 5 additions & 3 deletions arch/score/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@
* system call/exception. As usual the registers k0/k1 aren't being saved.
*/
struct pt_regs {
unsigned long pad0[6];
unsigned long pad0[6]; /* stack arguments */
unsigned long orig_r4;
unsigned long orig_r7;
long is_syscall;

unsigned long regs[32];

unsigned long cel;
Expand All @@ -68,12 +70,12 @@ struct pt_regs {
unsigned long cp0_psr;
unsigned long cp0_ecr;
unsigned long cp0_condition;

long is_syscall;
};

#ifdef __KERNEL__

struct task_struct;

/*
* Does the process account for user or for system time?
*/
Expand Down
Loading

0 comments on commit ffa818b

Please sign in to comment.