diff options
Diffstat (limited to 'include')
77 files changed, 846 insertions, 1204 deletions
diff --git a/include/asm-blackfin/page.h b/include/asm-blackfin/page.h index d5c9d14..c7db022 100644 --- a/include/asm-blackfin/page.h +++ b/include/asm-blackfin/page.h @@ -39,6 +39,7 @@ typedef struct { typedef struct { unsigned long pgprot; } pgprot_t; +typedef struct page *pgtable_t; #define pte_val(x) ((x).pte) #define pmd_val(x) ((&x)->pmd[0]) diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index a834924..d6a3eaf 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h @@ -31,6 +31,7 @@ typedef struct { unsigned long pte; } pte_t; typedef struct { unsigned long pmd[16]; } pmd_t; typedef struct { unsigned long pgd; } pgd_t; typedef struct { unsigned long pgprot; } pgprot_t; +typedef struct page *pgtable_t; #define pte_val(x) ((x).pte) #define pmd_val(x) ((&x)->pmd[0]) diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index 6af480c..1e82ebb 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h @@ -31,6 +31,7 @@ typedef struct { unsigned long pte; } pte_t; typedef struct { unsigned long pmd[16]; } pmd_t; typedef struct { unsigned long pgd; } pgd_t; typedef struct { unsigned long pgprot; } pgprot_t; +typedef struct page *pgtable_t; #define pte_val(x) ((x).pte) #define pmd_val(x) ((&x)->pmd[0]) diff --git a/include/asm-s390/a.out.h b/include/asm-s390/a.out.h deleted file mode 100644 index 8d6bd9c..0000000 --- a/include/asm-s390/a.out.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * include/asm-s390/a.out.h - * - * S390 version - * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation - * - * Derived from "include/asm-i386/a.out.h" - * Copyright (C) 1992, Linus Torvalds - * - * I don't think we'll ever need a.out ... - */ - -#ifndef __S390_A_OUT_H__ -#define __S390_A_OUT_H__ - -struct exec -{ - unsigned long a_info; /* Use macros N_MAGIC, etc for access */ - unsigned a_text; /* length of text, in bytes */ - unsigned a_data; /* length of data, in bytes */ - unsigned a_bss; /* length of uninitialized data area for file, in bytes */ - unsigned a_syms; /* length of symbol table data in file, in bytes */ - unsigned a_entry; /* start address */ - unsigned a_trsize; /* length of relocation info for text, in bytes */ - unsigned a_drsize; /* length of relocation info for data, in bytes */ -}; - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#endif /* __A_OUT_GNU_H__ */ diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 882db05..ab83c84 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h @@ -472,7 +472,7 @@ static inline unsigned long __ffz_word_loop(const unsigned long *addr, " brct %1,0b\n" "1:\n" #endif - : "+a" (bytes), "+d" (size) + : "+&a" (bytes), "+&d" (size) : "d" (-1UL), "a" (addr), "m" (*(addrtype *) addr) : "cc" ); return bytes; @@ -507,7 +507,7 @@ static inline unsigned long __ffs_word_loop(const unsigned long *addr, " brct %1,0b\n" "1:\n" #endif - : "+a" (bytes), "+a" (size) + : "+&a" (bytes), "+&a" (size) : "d" (0UL), "a" (addr), "m" (*(addrtype *) addr) : "cc" ); return bytes; diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index b73a424..b3ac262 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h @@ -115,6 +115,7 @@ typedef s390_regs elf_gregset_t; #include <linux/sched.h> /* for task_struct */ #include <asm/system.h> /* for save_access_regs */ +#include <asm/mmu_context.h> /* * This is used to ensure we don't load something for the wrong architecture. @@ -137,14 +138,7 @@ typedef s390_regs elf_gregset_t; use of this is to invoke "./ld.so someprog" to test out a new version of the loader. We need to make sure that it is out of the way of the program that it will "exec", and that there is sufficient room for the brk. */ - -#ifndef __s390x__ -#define ELF_ET_DYN_BASE ((TASK_SIZE & 0x80000000) \ - ? TASK_SIZE / 3 * 2 \ - : 2 * TASK_SIZE / 3) -#else /* __s390x__ */ -#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) -#endif /* __s390x__ */ +#define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2) /* Wow, the "main" arch needs arch dependent functions too.. :) */ @@ -214,4 +208,16 @@ do { \ } while (0) #endif /* __s390x__ */ +/* + * An executable for which elf_read_implies_exec() returns TRUE will + * have the READ_IMPLIES_EXEC personality flag set automatically. + */ +#define elf_read_implies_exec(ex, executable_stack) \ +({ \ + if (current->mm->context.noexec && \ + executable_stack != EXSTACK_DISABLE_X) \ + disable_noexec(current->mm, current); \ + current->mm->context.noexec == 0; \ +}) + #endif diff --git a/include/asm-s390/mmu.h b/include/asm-s390/mmu.h index ccd36d2..1698e29 100644 --- a/include/asm-s390/mmu.h +++ b/include/asm-s390/mmu.h @@ -1,7 +1,12 @@ #ifndef __MMU_H #define __MMU_H -/* Default "unsigned long" context */ -typedef unsigned long mm_context_t; +typedef struct { + struct list_head crst_list; + struct list_head pgtable_list; + unsigned long asce_bits; + unsigned long asce_limit; + int noexec; +} mm_context_t; #endif diff --git a/include/asm-s390/mmu_context.h b/include/asm-s390/mmu_context.h index a77d4ba..b5a34c6 100644 --- a/include/asm-s390/mmu_context.h +++ b/include/asm-s390/mmu_context.h @@ -10,15 +10,19 @@ #define __S390_MMU_CONTEXT_H #include <asm/pgalloc.h> +#include <asm/uaccess.h> #include <asm-generic/mm_hooks.h> static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { - mm->context = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; + mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; #ifdef CONFIG_64BIT - mm->context |= _ASCE_TYPE_REGION3; + mm->context.asce_bits |= _ASCE_TYPE_REGION3; #endif + mm->context.noexec = s390_noexec; + mm->context.asce_limit = STACK_TOP_MAX; + crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm)); return 0; } @@ -32,24 +36,25 @@ static inline int init_new_context(struct task_struct *tsk, static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) { - S390_lowcore.user_asce = mm->context | __pa(mm->pgd); + pgd_t *pgd = mm->pgd; + + S390_lowcore.user_asce = mm->context.asce_bits | __pa(pgd); if (switch_amode) { /* Load primary space page table origin. */ - pgd_t *shadow_pgd = get_shadow_table(mm->pgd) ? : mm->pgd; - S390_lowcore.user_exec_asce = mm->context | __pa(shadow_pgd); + pgd = mm->context.noexec ? get_shadow_table(pgd) : pgd; + S390_lowcore.user_exec_asce = mm->context.asce_bits | __pa(pgd); asm volatile(LCTL_OPCODE" 1,1,%0\n" : : "m" (S390_lowcore.user_exec_asce) ); } else /* Load home space page table origin. */ asm volatile(LCTL_OPCODE" 13,13,%0" : : "m" (S390_lowcore.user_asce) ); + set_fs(current->thread.mm_segment); } static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { - if (unlikely(prev == next)) - return; cpu_set(smp_processor_id(), next->cpu_vm_mask); update_mm(next, tsk); } @@ -61,7 +66,6 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, current); - set_fs(current->thread.mm_segment); } #endif /* __S390_MMU_CONTEXT_H */ diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 7f29a98..fe7f92b 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h @@ -74,43 +74,17 @@ static inline void copy_page(void *to, void *from) typedef struct { unsigned long pgprot; } pgprot_t; typedef struct { unsigned long pte; } pte_t; - -#define pte_val(x) ((x).pte) -#define pgprot_val(x) ((x).pgprot) - -#ifndef __s390x__ - typedef struct { unsigned long pmd; } pmd_t; typedef struct { unsigned long pud; } pud_t; -typedef struct { - unsigned long pgd0; - unsigned long pgd1; - unsigned long pgd2; - unsigned long pgd3; - } pgd_t; - -#define pmd_val(x) ((x).pmd) -#define pud_val(x) ((x).pud) -#define pgd_val(x) ((x).pgd0) - -#else /* __s390x__ */ - -typedef struct { - unsigned long pmd0; - unsigned long pmd1; - } pmd_t; -typedef struct { unsigned long pud; } pud_t; typedef struct { unsigned long pgd; } pgd_t; +typedef pte_t *pgtable_t; -#define pmd_val(x) ((x).pmd0) -#define pmd_val1(x) ((x).pmd1) +#define pgprot_val(x) ((x).pgprot) +#define pte_val(x) ((x).pte) +#define pmd_val(x) ((x).pmd) #define pud_val(x) ((x).pud) #define pgd_val(x) ((x).pgd) -#endif /* __s390x__ */ - -typedef struct page *pgtable_t; - #define __pte(x) ((pte_t) { (x) } ) #define __pmd(x) ((pmd_t) { (x) } ) #define __pgd(x) ((pgd_t) { (x) } ) @@ -167,7 +141,7 @@ static inline int pfn_valid(unsigned long pfn) #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) -#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ +#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) #include <asm-generic/memory_model.h> diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 900d448..f5b2bf3 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h @@ -20,10 +20,11 @@ #define check_pgt_cache() do {} while (0) unsigned long *crst_table_alloc(struct mm_struct *, int); -void crst_table_free(unsigned long *); +void crst_table_free(struct mm_struct *, unsigned long *); -unsigned long *page_table_alloc(int); -void page_table_free(unsigned long *); +unsigned long *page_table_alloc(struct mm_struct *); +void page_table_free(struct mm_struct *, unsigned long *); +void disable_noexec(struct mm_struct *, struct task_struct *); static inline void clear_table(unsigned long *s, unsigned long val, size_t n) { @@ -72,23 +73,49 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm) static inline unsigned long pgd_entry_type(struct mm_struct *mm) { - return _REGION3_ENTRY_EMPTY; + if (mm->context.asce_limit <= (1UL << 31)) + return _SEGMENT_ENTRY_EMPTY; + if (mm->context.asce_limit <= (1UL << 42)) + return _REGION3_ENTRY_EMPTY; + return _REGION2_ENTRY_EMPTY; } -#define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) -#define pud_free(mm, x) do { } while (0) +int crst_table_upgrade(struct mm_struct *, unsigned long limit); +void crst_table_downgrade(struct mm_struct *, unsigned long limit); + +static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) +{ + unsigned long *table = crst_table_alloc(mm, mm->context.noexec); + if (table) + crst_table_init(table, _REGION3_ENTRY_EMPTY); + return (pud_t *) table; +} +#define pud_free(mm, pud) crst_table_free(mm, (unsigned long *) pud) static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) { - unsigned long *crst = crst_table_alloc(mm, s390_noexec); - if (crst) - crst_table_init(crst, _SEGMENT_ENTRY_EMPTY); - return (pmd_t *) crst; + unsigned long *table = crst_table_alloc(mm, mm->context.noexec); + if (table) + crst_table_init(table, _SEGMENT_ENTRY_EMPTY); + return (pmd_t *) table; } -#define pmd_free(mm, pmd) crst_table_free((unsigned long *)pmd) +#define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) -#define pgd_populate(mm, pgd, pud) BUG() -#define pgd_populate_kernel(mm, pgd, pud) BUG() +static inline void pgd_populate_kernel(struct mm_struct *mm, + pgd_t *pgd, pud_t *pud) +{ + pgd_val(*pgd) = _REGION2_ENTRY | __pa(pud); +} + +static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) +{ + pgd_populate_kernel(mm, pgd, pud); + if (mm->context.noexec) { + pgd = get_shadow_table(pgd); + pud = get_shadow_table(pud); + pgd_populate_kernel(mm, pgd, pud); + } +} static inline void pud_populate_kernel(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) @@ -98,63 +125,50 @@ static inline void pud_populate_kernel(struct mm_struct *mm, static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) { - pud_t *shadow_pud = get_shadow_table(pud); - pmd_t *shadow_pmd = get_shadow_table(pmd); - - if (shadow_pud && shadow_pmd) - pud_populate_kernel(mm, shadow_pud, shadow_pmd); pud_populate_kernel(mm, pud, pmd); + if (mm->context.noexec) { + pud = get_shadow_table(pud); + pmd = get_shadow_table(pmd); + pud_populate_kernel(mm, pud, pmd); + } } #endif /* __s390x__ */ static inline pgd_t *pgd_alloc(struct mm_struct *mm) { - unsigned long *crst = crst_table_alloc(mm, s390_noexec); - if (crst) - crst_table_init(crst, pgd_entry_type(mm)); - return (pgd_t *) crst; + INIT_LIST_HEAD(&mm->context.crst_list); + INIT_LIST_HEAD(&mm->context.pgtable_list); + return (pgd_t *) crst_table_alloc(mm, s390_noexec); } -#define pgd_free(mm, pgd) crst_table_free((unsigned long *) pgd) +#define pgd_free(mm, pgd) crst_table_free(mm, (unsigned long *) pgd) -static inline void -pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) +static inline void pmd_populate_kernel(struct mm_struct *mm, + pmd_t *pmd, pte_t *pte) { -#ifndef __s390x__ - pmd_val(pmd[0]) = _SEGMENT_ENTRY + __pa(pte); - pmd_val(pmd[1]) = _SEGMENT_ENTRY + __pa(pte+256); - pmd_val(pmd[2]) = _SEGMENT_ENTRY + __pa(pte+512); - pmd_val(pmd[3]) = _SEGMENT_ENTRY + __pa(pte+768); -#else /* __s390x__ */ pmd_val(*pmd) = _SEGMENT_ENTRY + __pa(pte); - pmd_val1(*pmd) = _SEGMENT_ENTRY + __pa(pte+256); -#endif /* __s390x__ */ } -static inline void -pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) +static inline void pmd_populate(struct mm_struct *mm, + pmd_t *pmd, pgtable_t pte) { - pte_t *pte = (pte_t *)page_to_phys(page); - pmd_t *shadow_pmd = get_shadow_table(pmd); - pte_t *shadow_pte = get_shadow_pte(pte); - pmd_populate_kernel(mm, pmd, pte); - if (shadow_pmd && shadow_pte) - pmd_populate_kernel(mm, shadow_pmd, shadow_pte); + if (mm->context.noexec) { + pmd = get_shadow_table(pmd); + pmd_populate_kernel(mm, pmd, pte + PTRS_PER_PTE); + } } -#define pmd_pgtable(pmd) pmd_page(pmd) + +#define pmd_pgtable(pmd) \ + (pgtable_t)(pmd_val(pmd) & -sizeof(pte_t)*PTRS_PER_PTE) /* * page table entry allocation/free routines. */ -#define pte_alloc_one_kernel(mm, vmaddr) \ - ((pte_t *) page_table_alloc(s390_noexec)) -#define pte_alloc_one(mm, vmaddr) \ - virt_to_page(page_table_alloc(s390_noexec)) - -#define pte_free_kernel(mm, pte) \ - page_table_free((unsigned long *) pte) -#define pte_free(mm, pte) \ - page_table_free((unsigned long *) page_to_phys((struct page *) pte)) +#define pte_alloc_one_kernel(mm, vmaddr) ((pte_t *) page_table_alloc(mm)) +#define pte_alloc_one(mm, vmaddr) ((pte_t *) page_table_alloc(mm)) + +#define pte_free_kernel(mm, pte) page_table_free(mm, (unsigned long *) pte) +#define pte_free(mm, pte) page_table_free(mm, (unsigned long *) pte) #endif /* _S390_PGALLOC_H */ diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 3f52075..65154dc 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -57,21 +57,21 @@ extern char empty_zero_page[PAGE_SIZE]; * PGDIR_SHIFT determines what a third-level page table entry can map */ #ifndef __s390x__ -# define PMD_SHIFT 22 -# define PUD_SHIFT 22 -# define PGDIR_SHIFT 22 +# define PMD_SHIFT 20 +# define PUD_SHIFT 20 +# define PGDIR_SHIFT 20 #else /* __s390x__ */ -# define PMD_SHIFT 21 +# define PMD_SHIFT 20 # define PUD_SHIFT 31 -# define PGDIR_SHIFT 31 +# define PGDIR_SHIFT 42 #endif /* __s390x__ */ #define PMD_SIZE (1UL << PMD_SHIFT) #define PMD_MASK (~(PMD_SIZE-1)) #define PUD_SIZE (1UL << PUD_SHIFT) #define PUD_MASK (~(PUD_SIZE-1)) -#define PGDIR_SIZE (1UL << PGDIR_SHIFT) -#define PGDIR_MASK (~(PGDIR_SIZE-1)) +#define PGDIR_SIZE (1UL << PGDIR_SHIFT) +#define PGDIR_MASK (~(PGDIR_SIZE-1)) /* * entries per page directory level: the S390 is two-level, so @@ -79,17 +79,15 @@ extern char empty_zero_page[PAGE_SIZE]; * for S390 segment-table entries are combined to one PGD * that leads to 1024 pte per pgd */ +#define PTRS_PER_PTE 256 #ifndef __s390x__ -# define PTRS_PER_PTE 1024 -# define PTRS_PER_PMD 1 -# define PTRS_PER_PUD 1 -# define PTRS_PER_PGD 512 +#define PTRS_PER_PMD 1 +#define PTRS_PER_PUD 1 #else /* __s390x__ */ -# define PTRS_PER_PTE 512 -# define PTRS_PER_PMD 1024 -# define PTRS_PER_PUD 1 -# define PTRS_PER_PGD 2048 +#define PTRS_PER_PMD 2048 +#define PTRS_PER_PUD 2048 #endif /* __s390x__ */ +#define PTRS_PER_PGD 2048 #define FIRST_USER_ADDRESS 0 @@ -127,8 +125,9 @@ extern char empty_zero_page[PAGE_SIZE]; * mapping. This needs to be calculated at compile time since the size of the * VMEM_MAP is static but the size of struct page can change. */ -#define VMEM_MAX_PHYS min(VMALLOC_START, ((VMEM_MAP_END - VMALLOC_END) / \ - sizeof(struct page) * PAGE_SIZE) & ~((16 << 20) - 1)) +#define VMEM_MAX_PAGES ((VMEM_MAP_END - VMALLOC_END) / sizeof(struct page)) +#define VMEM_MAX_PFN min(VMALLOC_START >> PAGE_SHIFT, VMEM_MAX_PAGES) +#define VMEM_MAX_PHYS ((VMEM_MAX_PFN << PAGE_SHIFT) & ~((16 << 20) - 1)) #define VMEM_MAP ((struct page *) VMALLOC_END) /* @@ -375,24 +374,6 @@ extern char empty_zero_page[PAGE_SIZE]; # define PxD_SHADOW_SHIFT 2 #endif /* __s390x__ */ -static inline struct page *get_shadow_page(struct page *page) -{ - if (s390_noexec && page->index) - return virt_to_page((void *)(addr_t) page->index); - return NULL; -} - -static inline void *get_shadow_pte(void *table) -{ - unsigned long addr, offset; - struct page *page; - - addr = (unsigned long) table; - offset = addr & (PAGE_SIZE - 1); - page = virt_to_page((void *)(addr ^ offset)); - return (void *)(addr_t)(page->index ? (page->index | offset) : 0UL); -} - static inline void *get_shadow_table(void *table) { unsigned long addr, offset; @@ -410,17 +391,16 @@ static inline void *get_shadow_table(void *table) * hook is made available. */ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, - pte_t *pteptr, pte_t pteval) + pte_t *ptep, pte_t entry) { - pte_t *shadow_pte = get_shadow_pte(pteptr); - - *pteptr = pteval; - if (shadow_pte) { - if (!(pte_val(pteval) & _PAGE_INVALID) && - (pte_val(pteval) & _PAGE_SWX)) - pte_val(*shadow_pte) = pte_val(pteval) | _PAGE_RO; + *ptep = entry; + if (mm->context.noexec) { + if (!(pte_val(entry) & _PAGE_INVALID) && + (pte_val(entry) & _PAGE_SWX)) + pte_val(entry) |= _PAGE_RO; else - pte_val(*shadow_pte) = _PAGE_TYPE_EMPTY; + pte_val(entry) = _PAGE_TYPE_EMPTY; + ptep[PTRS_PER_PTE] = entry; } } @@ -439,24 +419,58 @@ static inline int pud_bad(pud_t pud) { return 0; } #else /* __s390x__ */ -static inline int pgd_present(pgd_t pgd) { return 1; } -static inline int pgd_none(pgd_t pgd) { return 0; } -static inline int pgd_bad(pgd_t pgd) { return 0; } +static inline int pgd_present(pgd_t pgd) +{ + if ((pgd_val(pgd) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R2) + return 1; + return (pgd_val(pgd) & _REGION_ENTRY_ORIGIN) != 0UL; +} + +static inline int pgd_none(pgd_t pgd) +{ + if ((pgd_val(pgd) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R2) + return 0; + return (pgd_val(pgd) & _REGION_ENTRY_INV) != 0UL; +} + +static inline int pgd_bad(pgd_t pgd) +{ + /* + * With dynamic page table levels the pgd can be a region table + * entry or a segment table entry. Check for the bit that are + * invalid for either table entry. + */ + unsigned long mask = + ~_SEGMENT_ENTRY_ORIGIN & ~_REGION_ENTRY_INV & + ~_REGION_ENTRY_TYPE_MASK & ~_REGION_ENTRY_LENGTH; + return (pgd_val(pgd) & mask) != 0; +} static inline int pud_present(pud_t pud) { + if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R3) + return 1; return (pud_val(pud) & _REGION_ENTRY_ORIGIN) != 0UL; } static inline int pud_none(pud_t pud) { + if ((pud_val(pud) & _REGION_ENTRY_TYPE_MASK) < _REGION_ENTRY_TYPE_R3) + return 0; return (pud_val(pud) & _REGION_ENTRY_INV) != 0UL; } static inline int pud_bad(pud_t pud) { - unsigned long mask = ~_REGION_ENTRY_ORIGIN & ~_REGION_ENTRY_INV; - return (pud_val(pud) & mask) != _REGION3_ENTRY; + /* + * With dynamic page table levels the pud can be a region table + * entry or a segment table entry. Check for the bit that are + * invalid for either table entry. + */ + unsigned long mask = + ~_SEGMENT_ENTRY_ORIGIN & ~_REGION_ENTRY_INV & + ~_REGION_ENTRY_TYPE_MASK & ~_REGION_ENTRY_LENGTH; + return (pud_val(pud) & mask) != 0; } #endif /* __s390x__ */ @@ -535,24 +549,30 @@ static inline int pte_young(pte_t pte) #define pgd_clear(pgd) do { } while (0) #define pud_clear(pud) do { } while (0) -static inline void pmd_clear_kernel(pmd_t * pmdp) +#else /* __s390x__ */ + +static inline void pgd_clear_kernel(pgd_t * pgd) { - pmd_val(pmdp[0]) = _SEGMENT_ENTRY_EMPTY; - pmd_val(pmdp[1]) = _SEGMENT_ENTRY_EMPTY; - pmd_val(pmdp[2]) = _SEGMENT_ENTRY_EMPTY; - pmd_val(pmdp[3]) = _SEGMENT_ENTRY_EMPTY; + if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R2) + pgd_val(*pgd) = _REGION2_ENTRY_EMPTY; } -#else /* __s390x__ */ +static inline void pgd_clear(pgd_t * pgd) +{ + pgd_t *shadow = get_shadow_table(pgd); -#define pgd_clear(pgd) do { } while (0) + pgd_clear_kernel(pgd); + if (shadow) + pgd_clear_kernel(shadow); +} static inline void pud_clear_kernel(pud_t *pud) { - pud_val(*pud) = _REGION3_ENTRY_EMPTY; + if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) + pud_val(*pud) = _REGION3_ENTRY_EMPTY; } -static inline void pud_clear(pud_t * pud) +static inline void pud_clear(pud_t *pud) { pud_t *shadow = get_shadow_table(pud); @@ -561,30 +581,27 @@ static inline void pud_clear(pud_t * pud) pud_clear_kernel(shadow); } +#endif /* __s390x__ */ + static inline void pmd_clear_kernel(pmd_t * pmdp) { pmd_val(*pmdp) = _SEGMENT_ENTRY_EMPTY; - pmd_val1(*pmdp) = _SEGMENT_ENTRY_EMPTY; } -#endif /* __s390x__ */ - -static inline void pmd_clear(pmd_t * pmdp) +static inline void pmd_clear(pmd_t *pmd) { - pmd_t *shadow_pmd = get_shadow_table(pmdp); + pmd_t *shadow = get_shadow_table(pmd); - pmd_clear_kernel(pmdp); - if (shadow_pmd) - pmd_clear_kernel(shadow_pmd); + pmd_clear_kernel(pmd); + if (shadow) + pmd_clear_kernel(shadow); } static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { - pte_t *shadow_pte = get_shadow_pte(ptep); - pte_val(*ptep) = _PAGE_TYPE_EMPTY; - if (shadow_pte) - pte_val(*shadow_pte) = _PAGE_TYPE_EMPTY; + if (mm->context.noexec) + pte_val(ptep[PTRS_PER_PTE]) = _PAGE_TYPE_EMPTY; } /* @@ -665,7 +682,7 @@ static inline void __ptep_ipte(unsigned long address, pte_t *ptep) { if (!(pte_val(*ptep) & _PAGE_INVALID)) { #ifndef __s390x__ - /* S390 has 1mb segments, we are emulating 4MB segments */ + /* pto must point to the start of the segment table */ pte_t *pto = (pte_t *) (((unsigned long) ptep) & 0x7ffffc00); #else /* ipte in zarch mode can do the math */ @@ -679,12 +696,12 @@ static inline void __ptep_ipte(unsigned long address, pte_t *ptep) pte_val(*ptep) = _PAGE_TYPE_EMPTY; } -static inline void ptep_invalidate(unsigned long address, pte_t *ptep) +static inline void ptep_invalidate(struct mm_struct *mm, + unsigned long address, pte_t *ptep) { __ptep_ipte(address, ptep); - ptep = get_shadow_pte(ptep); - if (ptep) - __ptep_ipte(address, ptep); + if (mm->context.noexec) + __ptep_ipte(address, ptep + PTRS_PER_PTE); } /* @@ -706,7 +723,7 @@ static inline void ptep_invalidate(unsigned long address, pte_t *ptep) pte_t __pte = *(__ptep); \ if (atomic_read(&(__mm)->mm_users) > 1 || \ (__mm) != current->active_mm) \ - ptep_invalidate(__address, __ptep); \ + ptep_invalidate(__mm, __address, __ptep); \ else \ pte_clear((__mm), (__address), (__ptep)); \ __pte; \ @@ -717,7 +734,7 @@ static inline pte_t ptep_clear_flush(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) { pte_t pte = *ptep; - ptep_invalidate(address, ptep); + ptep_invalidate(vma->vm_mm, address, ptep); return pte; } @@ -738,7 +755,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, if (full) pte_clear(mm, addr, ptep); else - ptep_invalidate(addr, ptep); + ptep_invalidate(mm, addr, ptep); return pte; } @@ -749,7 +766,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, if (pte_write(__pte)) { \ if (atomic_read(&(__mm)->mm_users) > 1 || \ (__mm) != current->active_mm) \ - ptep_invalidate(__addr, __ptep); \ + ptep_invalidate(__mm, __addr, __ptep); \ set_pte_at(__mm, __addr, __ptep, pte_wrprotect(__pte)); \ } \ }) @@ -759,7 +776,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, ({ \ int __changed = !pte_same(*(__ptep), __entry); \ if (__changed) { \ - ptep_invalidate(__addr, __ptep); \ + ptep_invalidate((__vma)->vm_mm, __addr, __ptep); \ set_pte_at((__vma)->vm_mm, __addr, __ptep, __entry); \ } \ __changed; \ @@ -840,13 +857,21 @@ static inline pte_t mk_pte(struct page *page, pgprot_t pgprot) #define pmd_deref(pmd) (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) #define pud_deref(pud) (pud_val(pud) & _REGION_ENTRY_ORIGIN) -#define pgd_deref(pgd) ({ BUG(); 0UL; }) +#define pgd_deref(pgd) (pgd_val(pgd) & _REGION_ENTRY_ORIGIN) -#define pud_offset(pgd, address) ((pud_t *) pgd) +static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) +{ + pud_t *pud = (pud_t *) pgd; + if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R2) + pud = (pud_t *) pgd_deref(*pgd); + return pud + pud_index(address); +} static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) { - pmd_t *pmd = (pmd_t *) pud_deref(*pud); + pmd_t *pmd = (pmd_t *) pud; + if ((pud_val(*pud) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) + pmd = (pmd_t *) pud_deref(*pud); return pmd + pmd_index(address); } diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index e878563..51d8891 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -64,24 +64,29 @@ extern int get_cpu_capability(unsigned int *); */ #ifndef __s390x__ -# define TASK_SIZE (0x80000000UL) -# define TASK_UNMAPPED_BASE (TASK_SIZE / 2) -# define DEFAULT_TASK_SIZE (0x80000000UL) +#define TASK_SIZE (1UL << 31) +#define TASK_UNMAPPED_BASE (1UL << 30) #else /* __s390x__ */ -# define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_31BIT) ? \ - (0x80000000UL) : (0x40000000000UL)) -# define TASK_SIZE TASK_SIZE_OF(current) -# define TASK_UNMAPPED_BASE (TASK_SIZE / 2) -# define DEFAULT_TASK_SIZE (0x40000000000UL) +#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk,TIF_31BIT) ? \ + (1UL << 31) : (1UL << 53)) +#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ + (1UL << 30) : (1UL << 41)) +#define TASK_SIZE TASK_SIZE_OF(current) #endif /* __s390x__ */ #ifdef __KERNEL__ -#define STACK_TOP TASK_SIZE -#define STACK_TOP_MAX DEFAULT_TASK_SIZE +#ifndef __s390x__ +#define STACK_TOP (1UL << 31) +#define STACK_TOP_MAX (1UL << 31) +#else /* __s390x__ */ +#define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42)) +#define STACK_TOP_MAX (1UL << 42) +#endif /* __s390x__ */ + #endif @@ -138,8 +143,6 @@ struct stack_frame { /* * Do necessary setup to start up a new thread. */ -#ifndef __s390x__ - #define start_thread(regs, new_psw, new_stackp) do { \ set_fs(USER_DS); \ regs->psw.mask = psw_user_bits; \ @@ -147,24 +150,6 @@ struct stack_frame { regs->gprs[15] = new_stackp ; \ } while (0) -#else /* __s390x__ */ - -#define start_thread(regs, new_psw, new_stackp) do { \ - set_fs(USER_DS); \ - regs->psw.mask = psw_user_bits; \ - regs->psw.addr = new_psw; \ - regs->gprs[15] = new_stackp; \ -} while (0) - -#define start_thread31(regs, new_psw, new_stackp) do { \ - set_fs(USER_DS); \ - regs->psw.mask = psw_user32_bits; \ - regs->psw.addr = new_psw; \ - regs->gprs[15] = new_stackp; \ -} while (0) - -#endif /* __s390x__ */ - /* Forward declaration, a strange C thing */ struct task_struct; struct mm_struct; diff --git a/include/asm-s390/tlb.h b/include/asm-s390/tlb.h index 3c8177f..3d8a96d 100644 --- a/include/asm-s390/tlb.h +++ b/include/asm-s390/tlb.h @@ -38,7 +38,7 @@ struct mmu_gather { struct mm_struct *mm; unsigned int fullmm; unsigned int nr_ptes; - unsigned int nr_pmds; + unsigned int nr_pxds; void *array[TLB_NR_PTRS]; }; @@ -53,7 +53,7 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, tlb->fullmm = full_mm_flush || (num_online_cpus() == 1) || (atomic_read(&mm->mm_users) <= 1 && mm == current->active_mm); tlb->nr_ptes = 0; - tlb->nr_pmds = TLB_NR_PTRS; + tlb->nr_pxds = TLB_NR_PTRS; if (tlb->fullmm) __tlb_flush_mm(mm); return tlb; @@ -62,12 +62,13 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, static inline void tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) { - if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pmds < TLB_NR_PTRS)) + if (!tlb->fullmm && (tlb->nr_ptes > 0 || tlb->nr_pxds < TLB_NR_PTRS)) __tlb_flush_mm(tlb->mm); while (tlb->nr_ptes > 0) pte_free(tlb->mm, tlb->array[--tlb->nr_ptes]); - while (tlb->nr_pmds < TLB_NR_PTRS) - pmd_free(tlb->mm, (pmd_t *) tlb->array[tlb->nr_pmds++]); + while (tlb->nr_pxds < TLB_NR_PTRS) + /* pgd_free frees the pointer as region or segment table */ + pgd_free(tlb->mm, tlb->array[tlb->nr_pxds++]); } static inline void tlb_finish_mmu(struct mmu_gather *tlb, @@ -95,33 +96,57 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) * pte_free_tlb frees a pte table and clears the CRSTE for the * page table from the tlb. */ -static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t page) +static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte) { if (!tlb->fullmm) { - tlb->array[tlb->nr_ptes++] = page; - if (tlb->nr_ptes >= tlb->nr_pmds) + tlb->array[tlb->nr_ptes++] = pte; + if (tlb->nr_ptes >= tlb->nr_pxds) tlb_flush_mmu(tlb, 0, 0); } else - pte_free(tlb->mm, page); + pte_free(tlb->mm, pte); } /* * pmd_free_tlb frees a pmd table and clears the CRSTE for the * segment table entry from the tlb. + * If the mm uses a two level page table the single pmd is freed + * as the pgd. pmd_free_tlb checks the asce_limit against 2GB + * to avoid the double free of the pmd in this case. */ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) { #ifdef __s390x__ + if (tlb->mm->context.asce_limit <= (1UL << 31)) + return; if (!tlb->fullmm) { - tlb->array[--tlb->nr_pmds] = (struct page *) pmd; - if (tlb->nr_ptes >= tlb->nr_pmds) + tlb->array[--tlb->nr_pxds] = pmd; + if (tlb->nr_ptes >= tlb->nr_pxds) tlb_flush_mmu(tlb, 0, 0); } else pmd_free(tlb->mm, pmd); #endif } -#define pud_free_tlb(tlb, pud) do { } while (0) +/* + * pud_free_tlb frees a pud table and clears the CRSTE for the + * region third table entry from the tlb. + * If the mm uses a three level page table the single pud is freed + * as the pgd. pud_free_tlb checks the asce_limit against 4TB + * to avoid the double free of the pud in this case. + */ +static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud) +{ +#ifdef __s390x__ + if (tlb->mm->context.asce_limit <= (1UL << 42)) + return; + if (!tlb->fullmm) { + tlb->array[--tlb->nr_pxds] = pud; + if (tlb->nr_ptes >= tlb->nr_pxds) + tlb_flush_mmu(tlb, 0, 0); + } else + pud_free(tlb->mm, pud); +#endif +} #define tlb_start_vma(tlb, vma) do { } while (0) #define tlb_end_vma(tlb, vma) do { } while (0) diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index 70fa5ae..35fb4f9 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h @@ -61,11 +61,12 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) * only ran on the local cpu. */ if (MACHINE_HAS_IDTE) { - pgd_t *shadow = get_shadow_table(mm->pgd); - - if (shadow) - __tlb_flush_idte((unsigned long) shadow | mm->context); - __tlb_flush_idte((unsigned long) mm->pgd | mm->context); + if (mm->context.noexec) + __tlb_flush_idte((unsigned long) + get_shadow_table(mm->pgd) | + mm->context.asce_bits); + __tlb_flush_idte((unsigned long) mm->pgd | + mm->context.asce_bits); return; } preempt_disable(); diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index f04acb2..583da80 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h @@ -256,7 +256,10 @@ #define __NR_signalfd 316 #define __NR_timerfd 317 #define __NR_eventfd 318 -#define NR_syscalls 319 +#define __NR_timerfd_create 319 +#define __NR_timerfd_settime 320 +#define __NR_timerfd_gettime 321 +#define NR_syscalls 322 /* * There are some system calls that are not present on 64 bit, some diff --git a/include/asm-sparc/a.out.h b/include/asm-sparc/a.out.h index 744cfe6..2f1c374 100644 --- a/include/asm-sparc/a.out.h +++ b/include/asm-sparc/a.out.h @@ -1,24 +1,27 @@ -/* $Id: a.out.h,v 1.13 2000/01/09 10:46:53 anton Exp $ */ #ifndef __SPARC_A_OUT_H__ #define __SPARC_A_OUT_H__ #define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ #define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ +#ifndef __ASSEMBLY__ + struct exec { unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ unsigned char a_toolversion:7; unsigned char a_machtype; unsigned short a_info; - unsigned long a_text; /* length of text, in bytes */ - unsigned long a_data; /* length of data, in bytes */ - unsigned long a_bss; /* length of bss, in bytes */ - unsigned long a_syms; /* length of symbol table, in bytes */ - unsigned long a_entry; /* where program begins */ - unsigned long a_trsize; - unsigned long a_drsize; + unsigned int a_text; /* length of text, in bytes */ + unsigned int a_data; /* length of data, in bytes */ + unsigned int a_bss; /* length of bss, in bytes */ + unsigned int a_syms; /* length of symbol table, in bytes */ + unsigned int a_entry; /* where program begins */ + unsigned int a_trsize; + unsigned int a_drsize; }; +#endif /* !__ASSEMBLY__ */ + /* Where in the file does the text information begin? */ #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) @@ -28,19 +31,21 @@ struct exec { (x).a_drsize) /* Where does text segment go in memory after being loaded? */ -#define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \ +#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ ((x).a_entry < SPARC_PGSIZE)) ? \ 0 : SPARC_PGSIZE) /* And same for the data segment.. */ #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ (N_TXTADDR(x) + (x).a_text) \ - : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) + : (unsigned long) (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) +#ifndef __ASSEMBLY__ + /* * Sparc relocation types */ @@ -77,14 +82,16 @@ enum reloc_type */ struct relocation_info /* used when header.a_machtype == M_SPARC */ { - unsigned long r_address; /* relocation addr */ + unsigned int r_address; /* relocation addr */ unsigned int r_index:24; /* segment index or symbol index */ unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ unsigned int r_pad:2; /* <unused> */ enum reloc_type r_type:5; /* type of relocation to perform */ - long r_addend; /* addend for relocation value */ + int r_addend; /* addend for relocation value */ }; #define N_RELOCATION_INFO_DECLARED 1 +#endif /* !(__ASSEMBLY__) */ + #endif /* __SPARC_A_OUT_H__ */ diff --git a/include/asm-sparc/bpp.h b/include/asm-sparc/bpp.h index 3578ac1..31f515e 100644 --- a/include/asm-sparc/bpp.h +++ b/include/asm-sparc/bpp.h @@ -17,7 +17,7 @@ * with compliant or compatible devices. It will use whatever features * the device supports, prefering those that are typically faster. * - * When the device is opened, it is left in COMPATABILITY mode, and + * When the device is opened, it is left in COMPATIBILITY mode, and * writes work like any printer device. The driver only attempt to * negotiate 1284 modes when needed so that plugs can be pulled, * switch boxes switched, etc., without disrupting things. It will diff --git a/include/asm-sparc/bsderrno.h b/include/asm-sparc/bsderrno.h deleted file mode 100644 index 54a75be4..0000000 --- a/include/asm-sparc/bsderrno.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id: bsderrno.h,v 1.3 1996/04/25 06:12:47 davem Exp $ - * bsderrno.h: Error numbers for NetBSD binary compatibility - * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) - */ - -#ifndef _SPARC_BSDERRNO_H -#define _SPARC_BSDERRNO_H - -#define BSD_EPERM 1 /* Operation not permitted */ -#define BSD_ENOENT 2 /* No such file or directory */ -#define BSD_ESRCH 3 /* No such process */ -#define BSD_EINTR 4 /* Interrupted system call */ -#define BSD_EIO 5 /* Input/output error */ -#define BSD_ENXIO 6 /* Device not configured */ -#define BSD_E2BIG 7 /* Argument list too long */ -#define BSD_ENOEXEC 8 /* Exec format error */ -#define BSD_EBADF 9 /* Bad file descriptor */ -#define BSD_ECHILD 10 /* No child processes */ -#define BSD_EDEADLK 11 /* Resource deadlock avoided */ -#define BSD_ENOMEM 12 /* Cannot allocate memory */ -#define BSD_EACCES 13 /* Permission denied */ -#define BSD_EFAULT 14 /* Bad address */ -#define BSD_ENOTBLK 15 /* Block device required */ -#define BSD_EBUSY 16 /* Device busy */ -#define BSD_EEXIST 17 /* File exists */ -#define BSD_EXDEV 18 /* Cross-device link */ -#define BSD_ENODEV 19 /* Operation not supported by device */ -#define BSD_ENOTDIR 20 /* Not a directory */ -#define BSD_EISDIR 21 /* Is a directory */ -#define BSD_EINVAL 22 /* Invalid argument */ -#define BSD_ENFILE 23 /* Too many open files in system */ -#define BSD_EMFILE 24 /* Too many open files */ -#define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ -#define BSD_ETXTBSY 26 /* Text file busy */ -#define BSD_EFBIG 27 /* File too large */ -#define BSD_ENOSPC 28 /* No space left on device */ -#define BSD_ESPIPE 29 /* Illegal seek */ -#define BSD_EROFS 30 /* Read-only file system */ -#define BSD_EMLINK 31 /* Too many links */ -#define BSD_EPIPE 32 /* Broken pipe */ -#define BSD_EDOM 33 /* Numerical argument out of domain */ -#define BSD_ERANGE 34 /* Result too large */ -#define BSD_EAGAIN 35 /* Resource temporarily unavailable */ -#define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ -#define BSD_EINPROGRESS 36 /* Operation now in progress */ -#define BSD_EALREADY 37 /* Operation already in progress */ -#define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ -#define BSD_EDESTADDRREQ 39 /* Destination address required */ -#define BSD_EMSGSIZE 40 /* Message too long */ -#define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define BSD_ENOPROTOOPT 42 /* Protocol not available */ -#define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ -#define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define BSD_EOPNOTSUPP 45 /* Operation not supported */ -#define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ -#define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define BSD_EADDRINUSE 48 /* Address already in use */ -#define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ -#define BSD_ENETDOWN 50 /* Network is down */ -#define BSD_ENETUNREACH 51 /* Network is unreachable */ -#define BSD_ENETRESET 52 /* Network dropped connection on reset */ -#define BSD_ECONNABORTED 53 /* Software caused connection abort */ -#define BSD_ECONNRESET 54 /* Connection reset by peer */ -#define BSD_ENOBUFS 55 /* No buffer space available */ -#define BSD_EISCONN 56 /* Socket is already connected */ -#define BSD_ENOTCONN 57 /* Socket is not connected */ -#define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ -#define BSD_ETIMEDOUT 60 /* Operation timed out */ -#define BSD_ECONNREFUSED 61 /* Connection refused */ -#define BSD_ELOOP 62 /* Too many levels of symbolic links */ -#define BSD_ENAMETOOLONG 63 /* File name too long */ -#define BSD_EHOSTDOWN 64 /* Host is down */ -#define BSD_EHOSTUNREACH 65 /* No route to host */ -#define BSD_ENOTEMPTY 66 /* Directory not empty */ -#define BSD_EPROCLIM 67 /* Too many processes */ -#define BSD_EUSERS 68 /* Too many users */ -#define BSD_EDQUOT 69 /* Disc quota exceeded */ -#define BSD_ESTALE 70 /* Stale NFS file handle */ -#define BSD_EREMOTE 71 /* Too many levels of remote in path */ -#define BSD_EBADRPC 72 /* RPC struct is bad */ -#define BSD_ERPCMISMATCH 73 /* RPC version wrong */ -#define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define BSD_EPROGMISMATCH 75 /* Program version wrong */ -#define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ -#define BSD_ENOLCK 77 /* No locks available */ -#define BSD_ENOSYS 78 /* Function not implemented */ -#define BSD_EFTYPE 79 /* Inappropriate file type or format */ -#define BSD_EAUTH 80 /* Authentication error */ -#define BSD_ENEEDAUTH 81 /* Need authenticator */ -#define BSD_ELAST 81 /* Must be equal largest errno */ - -#endif /* !(_SPARC_BSDERRNO_H) */ diff --git a/include/asm-sparc/bug.h b/include/asm-sparc/bug.h index 0415120..8a59e5a 100644 --- a/include/asm-sparc/bug.h +++ b/include/asm-sparc/bug.h @@ -2,28 +2,16 @@ #define _SPARC_BUG_H #ifdef CONFIG_BUG -/* Only use the inline asm until a gcc release that can handle __builtin_trap - * -rob 2003-06-25 - * - * gcc-3.3.1 and later will be OK -DaveM - */ -#if (__GNUC__ > 3) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ > 3) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ >= 4) -#define __bug_trap() __builtin_trap() -#else -#define __bug_trap() \ - __asm__ __volatile__ ("t 0x5\n\t" : : ) -#endif +#include <linux/compiler.h> #ifdef CONFIG_DEBUG_BUGVERBOSE extern void do_BUG(const char *file, int line); #define BUG() do { \ do_BUG(__FILE__, __LINE__); \ - __bug_trap(); \ + __builtin_trap(); \ } while (0) #else -#define BUG() __bug_trap() +#define BUG() __builtin_trap() #endif #define HAVE_ARCH_BUG diff --git a/include/asm-sparc/bugs.h b/include/asm-sparc/bugs.h index a0f939b..2dfc07b 100644 --- a/include/asm-sparc/bugs.h +++ b/include/asm-sparc/bugs.h @@ -1,16 +1,24 @@ -/* $Id: bugs.h,v 1.1 1996/12/26 13:25:20 davem Exp $ - * include/asm-sparc/bugs.h: Sparc probes for various bugs. +/* include/asm-sparc/bugs.h: Sparc probes for various bugs. * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) */ +#ifdef CONFIG_SPARC32 #include <asm/cpudata.h> +#endif + +#ifdef CONFIG_SPARC64 +#include <asm/sstate.h> +#endif extern unsigned long loops_per_jiffy; -static void check_bugs(void) +static void __init check_bugs(void) { -#ifndef CONFIG_SMP +#if defined(CONFIG_SPARC32) && !defined(CONFIG_SMP) cpu_data(0).udelay_val = loops_per_jiffy; #endif +#ifdef CONFIG_SPARC64 + sstate_running(); +#endif } diff --git a/include/asm-sparc/byteorder.h b/include/asm-sparc/byteorder.h index a2949ae..bcd83aa 100644 --- a/include/asm-sparc/byteorder.h +++ b/include/asm-sparc/byteorder.h @@ -1,12 +1,55 @@ -/* $Id: byteorder.h,v 1.15 1997/12/16 19:20:44 davem Exp $ */ #ifndef _SPARC_BYTEORDER_H #define _SPARC_BYTEORDER_H #include <asm/types.h> +#include <asm/asi.h> + +#ifdef __GNUC__ + +#ifdef CONFIG_SPARC32 +#define __SWAB_64_THRU_32__ +#endif + +#ifdef CONFIG_SPARC64 + +static inline __u16 ___arch__swab16p(const __u16 *addr) +{ + __u16 ret; + + __asm__ __volatile__ ("lduha [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +static inline __u32 ___arch__swab32p(const __u32 *addr) +{ + __u32 ret; + + __asm__ __volatile__ ("lduwa [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +static inline __u64 ___arch__swab64p(const __u64 *addr) +{ + __u64 ret; + + __asm__ __volatile__ ("ldxa [%1] %2, %0" + : "=r" (ret) + : "r" (addr), "i" (ASI_PL)); + return ret; +} + +#define __arch__swab16p(x) ___arch__swab16p(x) +#define __arch__swab32p(x) ___arch__swab32p(x) +#define __arch__swab64p(x) ___arch__swab64p(x) + +#endif /* CONFIG_SPARC64 */ + +#define __BYTEORDER_HAS_U64__ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ #endif #include <linux/byteorder/big_endian.h> diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index cb971e8..41f85ae 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h @@ -1,20 +1,28 @@ -/* $Id: cache.h,v 1.9 1999/08/14 03:51:58 anton Exp $ - * cache.h: Cache specific code for the Sparc. These include flushing +/* cache.h: Cache specific code for the Sparc. These include flushing * and direct tag/data line access. * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) */ #ifndef _SPARC_CACHE_H #define _SPARC_CACHE_H -#include <asm/asi.h> - #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES 32 #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) -#define SMP_CACHE_BYTES 32 +#ifdef CONFIG_SPARC32 +#define SMP_CACHE_BYTES_SHIFT 5 +#else +#define SMP_CACHE_BYTES_SHIFT 6 +#endif + +#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) + +#define __read_mostly __attribute__((__section__(".data.read_mostly"))) + +#ifdef CONFIG_SPARC32 +#include <asm/asi.h> /* Direct access to the instruction cache is provided through and * alternate address space. The IDC bit must be off in the ICCR on @@ -125,5 +133,6 @@ static inline void flush_ei_user(unsigned int addr) "r" (addr), "i" (ASI_M_FLUSH_USER) : "memory"); } +#endif /* CONFIG_SPARC32 */ #endif /* !(_SPARC_CACHE_H) */ diff --git a/include/asm-sparc/current.h b/include/asm-sparc/current.h index 8fe7c82..8a1d9d6 100644 --- a/include/asm-sparc/current.h +++ b/include/asm-sparc/current.h @@ -1,31 +1,34 @@ -/* - * include/asm-sparc/current.h +/* include/asm-sparc/current.h * * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation * Copyright (C) 2002 Pete Zaitcev (zaitcev@yahoo.com) + * Copyright (C) 2007 David S. Miller (davem@davemloft.net) * * Derived from "include/asm-s390/current.h" by * Martin Schwidefsky (schwidefsky@de.ibm.com) * Derived from "include/asm-i386/current.h" - */ -#ifndef _ASM_CURRENT_H -#define _ASM_CURRENT_H - -/* - * At the sparc64 DaveM keeps current_thread_info in %g4. - * We might want to consider doing the same to shave a few cycles. - */ +*/ +#ifndef _SPARC_CURRENT_H +#define _SPARC_CURRENT_H #include <linux/thread_info.h> -struct task_struct; +#ifdef CONFIG_SPARC64 +register struct task_struct *current asm("g4"); +#endif -/* Two stage process (inline + #define) for type-checking. */ -/* We also obfuscate get_current() to check if anyone used that by mistake. */ +#ifdef CONFIG_SPARC32 +/* We might want to consider using %g4 like sparc64 to shave a few cycles. + * + * Two stage process (inline + #define) for type-checking. + * We also obfuscate get_current() to check if anyone used that by mistake. + */ +struct task_struct; static inline struct task_struct *__get_current(void) { return current_thread_info()->task; } #define current __get_current() +#endif -#endif /* !(_ASM_CURRENT_H) */ +#endif /* !(_SPARC_CURRENT_H) */ diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index c0a7786..680e51d 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h @@ -19,5 +19,3 @@ struct dev_archdata { }; #endif /* _ASM_SPARC_DEVICE_H */ - - diff --git a/include/asm-sparc/errno.h b/include/asm-sparc/errno.h index ed41c8b..a9ef172 100644 --- a/include/asm-sparc/errno.h +++ b/include/asm-sparc/errno.h @@ -1,4 +1,3 @@ -/* $Id: errno.h,v 1.6 1997/04/15 09:03:38 davem Exp $ */ #ifndef _SPARC_ERRNO_H #define _SPARC_ERRNO_H diff --git a/include/asm-sparc/fb.h b/include/asm-sparc/fb.h index c73ca08..b83e447 100644 --- a/include/asm-sparc/fb.h +++ b/include/asm-sparc/fb.h @@ -1,9 +1,17 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ +#ifndef _SPARC_FB_H_ +#define _SPARC_FB_H_ #include <linux/fb.h> +#include <linux/fs.h> +#include <asm/page.h> #include <asm/prom.h> -#define fb_pgprotect(...) do {} while (0) +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ +#ifdef CONFIG_SPARC64 + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); +#endif +} static inline int fb_is_primary_device(struct fb_info *info) { @@ -18,4 +26,4 @@ static inline int fb_is_primary_device(struct fb_info *info) return 0; } -#endif /* _ASM_FB_H_ */ +#endif /* _SPARC_FB_H_ */ diff --git a/include/asm-sparc/of_platform.h b/include/asm-sparc/of_platform.h index d638737..3833435 100644 --- a/include/asm-sparc/of_platform.h +++ b/include/asm-sparc/of_platform.h @@ -21,9 +21,4 @@ extern struct bus_type sbus_bus_type; #define of_bus_type of_platform_bus_type /* for compatibility */ -extern struct of_device *of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus); - #endif /* _ASM_SPARC_OF_PLATFORM_H */ diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 71f2a19..df5dc44 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h @@ -9,7 +9,7 @@ * Copyright (C) 1996-2005 Paul Mackerras. * * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * Updates for SPARC32 by David S. Miller + * Updates for SPARC by David S. Miller * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -39,6 +39,7 @@ struct property { unsigned int unique_id; }; +struct of_irq_controller; struct device_node { const char *name; const char *type; @@ -58,11 +59,19 @@ struct device_node { unsigned long _flags; void *data; unsigned int unique_id; + + struct of_irq_controller *irq_trans; +}; + +struct of_irq_controller { + unsigned int (*irq_build)(struct device_node *, unsigned int, void *); + void *data; }; #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) +extern struct device_node *of_find_node_by_cpuid(int cpuid); extern int of_set_property(struct device_node *node, const char *name, void *val, int len); extern int of_getintprop_default(struct device_node *np, const char *name, diff --git a/include/asm-sparc64/a.out.h b/include/asm-sparc64/a.out.h index 53c95bd..44208c2 100644 --- a/include/asm-sparc64/a.out.h +++ b/include/asm-sparc64/a.out.h @@ -1,98 +1 @@ -/* $Id: a.out.h,v 1.8 2002/02/09 19:49:31 davem Exp $ */ -#ifndef __SPARC64_A_OUT_H__ -#define __SPARC64_A_OUT_H__ - -#define SPARC_PGSIZE 0x2000 /* Thanks to the sun4 architecture... */ -#define SEGMENT_SIZE SPARC_PGSIZE /* whee... */ - -#ifndef __ASSEMBLY__ - -struct exec { - unsigned char a_dynamic:1; /* A __DYNAMIC is in this image */ - unsigned char a_toolversion:7; - unsigned char a_machtype; - unsigned short a_info; - unsigned int a_text; /* length of text, in bytes */ - unsigned int a_data; /* length of data, in bytes */ - unsigned int a_bss; /* length of bss, in bytes */ - unsigned int a_syms; /* length of symbol table, in bytes */ - unsigned int a_entry; /* where program begins */ - unsigned int a_trsize; - unsigned int a_drsize; -}; - -#endif /* !__ASSEMBLY__ */ - -/* Where in the file does the text information begin? */ -#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) - -/* Where do the Symbols start? */ -#define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \ - (x).a_data + (x).a_trsize + \ - (x).a_drsize) - -/* Where does text segment go in memory after being loaded? */ -#define N_TXTADDR(x) (unsigned long)(((N_MAGIC(x) == ZMAGIC) && \ - ((x).a_entry < SPARC_PGSIZE)) ? \ - 0 : SPARC_PGSIZE) - -/* And same for the data segment.. */ -#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \ - (N_TXTADDR(x) + (x).a_text) \ - : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#ifndef __ASSEMBLY__ - -/* - * Sparc relocation types - */ -enum reloc_type -{ - RELOC_8, - RELOC_16, - RELOC_32, /* simplest relocs */ - RELOC_DISP8, - RELOC_DISP16, - RELOC_DISP32, /* Disp's (pc-rel) */ - RELOC_WDISP30, - RELOC_WDISP22, /* SR word disp's */ - RELOC_HI22, - RELOC_22, /* SR 22-bit relocs */ - RELOC_13, - RELOC_LO10, /* SR 13&10-bit relocs */ - RELOC_SFA_BASE, - RELOC_SFA_OFF13, /* SR S.F.A. relocs */ - RELOC_BASE10, - RELOC_BASE13, - RELOC_BASE22, /* base_relative pic */ - RELOC_PC10, - RELOC_PC22, /* special pc-rel pic */ - RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ - RELOC_SEGOFF16, /* ShLib offset-in-seg */ - RELOC_GLOB_DAT, - RELOC_JMP_SLOT, - RELOC_RELATIVE /* rtld relocs */ -}; - -/* - * Format of a relocation datum. - */ -struct relocation_info /* used when header.a_machtype == M_SPARC */ -{ - unsigned int r_address; /* relocation addr */ - unsigned int r_index:24; /* segment index or symbol index */ - unsigned int r_extern:1; /* if F, r_index==SEG#; if T, SYM idx */ - unsigned int r_pad:2; /* <unused> */ - enum reloc_type r_type:5; /* type of relocation to perform */ - int r_addend; /* addend for relocation value */ -}; - -#define N_RELOCATION_INFO_DECLARED 1 - -#endif /* !(__ASSEMBLY__) */ - -#endif /* !(__SPARC64_A_OUT_H__) */ +#include <asm-sparc/a.out.h> diff --git a/include/asm-sparc64/auxvec.h b/include/asm-sparc64/auxvec.h index 436a291..1f45c67 100644 --- a/include/asm-sparc64/auxvec.h +++ b/include/asm-sparc64/auxvec.h @@ -1,4 +1 @@ -#ifndef __ASM_SPARC64_AUXVEC_H -#define __ASM_SPARC64_AUXVEC_H - -#endif /* !(__ASM_SPARC64_AUXVEC_H) */ +#include <asm-sparc/auxvec.h> diff --git a/include/asm-sparc64/bpp.h b/include/asm-sparc64/bpp.h index abe163a..514eee2 100644 --- a/include/asm-sparc64/bpp.h +++ b/include/asm-sparc64/bpp.h @@ -1,73 +1 @@ -#ifndef _SPARC64_BPP_H -#define _SPARC64_BPP_H - -/* - * Copyright (c) 1995 Picture Elements - * Stephen Williams - * Gus Baldauf - * - * Linux/SPARC port by Peter Zaitcev. - * Integration into SPARC tree by Tom Dyas. - */ - -#include <linux/ioctl.h> - -/* - * This is a driver that supports IEEE Std 1284-1994 communications - * with compliant or compatible devices. It will use whatever features - * the device supports, prefering those that are typically faster. - * - * When the device is opened, it is left in COMPATIBILITY mode, and - * writes work like any printer device. The driver only attempt to - * negotiate 1284 modes when needed so that plugs can be pulled, - * switch boxes switched, etc., without disrupting things. It will - * also leave the device in compatibility mode when closed. - */ - - - -/* - * This driver also supplies ioctls to manually manipulate the - * pins. This is great for testing devices, or writing code to deal - * with bizzarro-mode of the ACME Special TurboThingy Plus. - * - * NOTE: These ioctl currently do not interact well with - * read/write. Caveat emptor. - * - * PUT_PINS allows us to assign the sense of all the pins, including - * the data pins if being driven by the host. The GET_PINS returns the - * pins that the peripheral drives, including data if appropriate. - */ - -# define BPP_PUT_PINS _IOW('B', 1, int) -# define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */ -# define BPP_PUT_DATA _IOW('B', 3, int) -# define BPP_GET_DATA _IOR('B', 4, char) /* ditto */ - -/* - * Set the data bus to input mode. Disengage the data bin driver and - * be prepared to read values from the peripheral. If the arg is 0, - * then revert the bus to output mode. - */ -# define BPP_SET_INPUT _IOW('B', 5, int) - -/* - * These bits apply to the PUT operation... - */ -# define BPP_PP_nStrobe 0x0001 -# define BPP_PP_nAutoFd 0x0002 -# define BPP_PP_nInit 0x0004 -# define BPP_PP_nSelectIn 0x0008 - -/* - * These apply to the GET operation, which also reads the current value - * of the previously put values. A bit mask of these will be returned - * as a bit mask in the return code of the ioctl(). - */ -# define BPP_GP_nAck 0x0100 -# define BPP_GP_Busy 0x0200 -# define BPP_GP_PError 0x0400 -# define BPP_GP_Select 0x0800 -# define BPP_GP_nFault 0x1000 - -#endif +#include <asm-sparc/bpp.h> diff --git a/include/asm-sparc64/bsderrno.h b/include/asm-sparc64/bsderrno.h deleted file mode 100644 index 52fe880..0000000 --- a/include/asm-sparc64/bsderrno.h +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id: bsderrno.h,v 1.1 1996/12/26 13:25:21 davem Exp $ - * bsderrno.h: Error numbers for NetBSD binary compatibility - * - * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) - */ - -#ifndef _SPARC64_BSDERRNO_H -#define _SPARC64_BSDERRNO_H - -#define BSD_EPERM 1 /* Operation not permitted */ -#define BSD_ENOENT 2 /* No such file or directory */ -#define BSD_ESRCH 3 /* No such process */ -#define BSD_EINTR 4 /* Interrupted system call */ -#define BSD_EIO 5 /* Input/output error */ -#define BSD_ENXIO 6 /* Device not configured */ -#define BSD_E2BIG 7 /* Argument list too long */ -#define BSD_ENOEXEC 8 /* Exec format error */ -#define BSD_EBADF 9 /* Bad file descriptor */ -#define BSD_ECHILD 10 /* No child processes */ -#define BSD_EDEADLK 11 /* Resource deadlock avoided */ -#define BSD_ENOMEM 12 /* Cannot allocate memory */ -#define BSD_EACCES 13 /* Permission denied */ -#define BSD_EFAULT 14 /* Bad address */ -#define BSD_ENOTBLK 15 /* Block device required */ -#define BSD_EBUSY 16 /* Device busy */ -#define BSD_EEXIST 17 /* File exists */ -#define BSD_EXDEV 18 /* Cross-device link */ -#define BSD_ENODEV 19 /* Operation not supported by device */ -#define BSD_ENOTDIR 20 /* Not a directory */ -#define BSD_EISDIR 21 /* Is a directory */ -#define BSD_EINVAL 22 /* Invalid argument */ -#define BSD_ENFILE 23 /* Too many open files in system */ -#define BSD_EMFILE 24 /* Too many open files */ -#define BSD_ENOTTY 25 /* Inappropriate ioctl for device */ -#define BSD_ETXTBSY 26 /* Text file busy */ -#define BSD_EFBIG 27 /* File too large */ -#define BSD_ENOSPC 28 /* No space left on device */ -#define BSD_ESPIPE 29 /* Illegal seek */ -#define BSD_EROFS 30 /* Read-only file system */ -#define BSD_EMLINK 31 /* Too many links */ -#define BSD_EPIPE 32 /* Broken pipe */ -#define BSD_EDOM 33 /* Numerical argument out of domain */ -#define BSD_ERANGE 34 /* Result too large */ -#define BSD_EAGAIN 35 /* Resource temporarily unavailable */ -#define BSD_EWOULDBLOCK EAGAIN /* Operation would block */ -#define BSD_EINPROGRESS 36 /* Operation now in progress */ -#define BSD_EALREADY 37 /* Operation already in progress */ -#define BSD_ENOTSOCK 38 /* Socket operation on non-socket */ -#define BSD_EDESTADDRREQ 39 /* Destination address required */ -#define BSD_EMSGSIZE 40 /* Message too long */ -#define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define BSD_ENOPROTOOPT 42 /* Protocol not available */ -#define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */ -#define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define BSD_EOPNOTSUPP 45 /* Operation not supported */ -#define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */ -#define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define BSD_EADDRINUSE 48 /* Address already in use */ -#define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */ -#define BSD_ENETDOWN 50 /* Network is down */ -#define BSD_ENETUNREACH 51 /* Network is unreachable */ -#define BSD_ENETRESET 52 /* Network dropped connection on reset */ -#define BSD_ECONNABORTED 53 /* Software caused connection abort */ -#define BSD_ECONNRESET 54 /* Connection reset by peer */ -#define BSD_ENOBUFS 55 /* No buffer space available */ -#define BSD_EISCONN 56 /* Socket is already connected */ -#define BSD_ENOTCONN 57 /* Socket is not connected */ -#define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */ -#define BSD_ETIMEDOUT 60 /* Operation timed out */ -#define BSD_ECONNREFUSED 61 /* Connection refused */ -#define BSD_ELOOP 62 /* Too many levels of symbolic links */ -#define BSD_ENAMETOOLONG 63 /* File name too long */ -#define BSD_EHOSTDOWN 64 /* Host is down */ -#define BSD_EHOSTUNREACH 65 /* No route to host */ -#define BSD_ENOTEMPTY 66 /* Directory not empty */ -#define BSD_EPROCLIM 67 /* Too many processes */ -#define BSD_EUSERS 68 /* Too many users */ -#define BSD_EDQUOT 69 /* Disc quota exceeded */ -#define BSD_ESTALE 70 /* Stale NFS file handle */ -#define BSD_EREMOTE 71 /* Too many levels of remote in path */ -#define BSD_EBADRPC 72 /* RPC struct is bad */ -#define BSD_ERPCMISMATCH 73 /* RPC version wrong */ -#define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define BSD_EPROGMISMATCH 75 /* Program version wrong */ -#define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */ -#define BSD_ENOLCK 77 /* No locks available */ -#define BSD_ENOSYS 78 /* Function not implemented */ -#define BSD_EFTYPE 79 /* Inappropriate file type or format */ -#define BSD_EAUTH 80 /* Authentication error */ -#define BSD_ENEEDAUTH 81 /* Need authenticator */ -#define BSD_ELAST 81 /* Must be equal largest errno */ - -#endif /* !(_SPARC64_BSDERRNO_H) */ diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h index 516bb27..3433737 100644 --- a/include/asm-sparc64/bug.h +++ b/include/asm-sparc64/bug.h @@ -1,22 +1 @@ -#ifndef _SPARC64_BUG_H -#define _SPARC64_BUG_H - -#ifdef CONFIG_BUG -#include <linux/compiler.h> - -#ifdef CONFIG_DEBUG_BUGVERBOSE -extern void do_BUG(const char *file, int line); -#define BUG() do { \ - do_BUG(__FILE__, __LINE__); \ - __builtin_trap(); \ -} while (0) -#else -#define BUG() __builtin_trap() -#endif - -#define HAVE_ARCH_BUG -#endif - -#include <asm-generic/bug.h> - -#endif +#include <asm-sparc/bug.h> diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h index 11ade68..04ae9e2 100644 --- a/include/asm-sparc64/bugs.h +++ b/include/asm-sparc64/bugs.h @@ -1,10 +1 @@ -/* bugs.h: Sparc64 probes for various bugs. - * - * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) - */ -#include <asm/sstate.h> - -static void __init check_bugs(void) -{ - sstate_running(); -} +#include <asm-sparc/bugs.h> diff --git a/include/asm-sparc64/byteorder.h b/include/asm-sparc64/byteorder.h index 3943022..f672855 100644 --- a/include/asm-sparc64/byteorder.h +++ b/include/asm-sparc64/byteorder.h @@ -1,49 +1 @@ -#ifndef _SPARC64_BYTEORDER_H -#define _SPARC64_BYTEORDER_H - -#include <asm/types.h> -#include <asm/asi.h> - -#ifdef __GNUC__ - -static inline __u16 ___arch__swab16p(const __u16 *addr) -{ - __u16 ret; - - __asm__ __volatile__ ("lduha [%1] %2, %0" - : "=r" (ret) - : "r" (addr), "i" (ASI_PL)); - return ret; -} - -static inline __u32 ___arch__swab32p(const __u32 *addr) -{ - __u32 ret; - - __asm__ __volatile__ ("lduwa [%1] %2, %0" - : "=r" (ret) - : "r" (addr), "i" (ASI_PL)); - return ret; -} - -static inline __u64 ___arch__swab64p(const __u64 *addr) -{ - __u64 ret; - - __asm__ __volatile__ ("ldxa [%1] %2, %0" - : "=r" (ret) - : "r" (addr), "i" (ASI_PL)); - return ret; -} - -#define __arch__swab16p(x) ___arch__swab16p(x) -#define __arch__swab32p(x) ___arch__swab32p(x) -#define __arch__swab64p(x) ___arch__swab64p(x) - -#define __BYTEORDER_HAS_U64__ - -#endif /* __GNUC__ */ - -#include <linux/byteorder/big_endian.h> - -#endif /* _SPARC64_BYTEORDER_H */ +#include <asm-sparc/byteorder.h> diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h index e9df17a..fa9de5c 100644 --- a/include/asm-sparc64/cache.h +++ b/include/asm-sparc64/cache.h @@ -1,18 +1 @@ -/* - * include/asm-sparc64/cache.h - */ -#ifndef __ARCH_SPARC64_CACHE_H -#define __ARCH_SPARC64_CACHE_H - -/* bytes per L1 cache line */ -#define L1_CACHE_SHIFT 5 -#define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ - -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) - -#define SMP_CACHE_BYTES_SHIFT 6 -#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ - -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - -#endif +#include <asm-sparc/cache.h> diff --git a/include/asm-sparc64/cputime.h b/include/asm-sparc64/cputime.h index dec2fc7..435f37a9 100644 --- a/include/asm-sparc64/cputime.h +++ b/include/asm-sparc64/cputime.h @@ -1,6 +1 @@ -#ifndef __SPARC64_CPUTIME_H -#define __SPARC64_CPUTIME_H - -#include <asm-generic/cputime.h> - -#endif /* __SPARC64_CPUTIME_H */ +#include <asm-sparc/cputime.h> diff --git a/include/asm-sparc64/current.h b/include/asm-sparc64/current.h index 6c21e4e..a7904a7 100644 --- a/include/asm-sparc64/current.h +++ b/include/asm-sparc64/current.h @@ -1,8 +1 @@ -#ifndef _SPARC64_CURRENT_H -#define _SPARC64_CURRENT_H - -#include <linux/thread_info.h> - -register struct task_struct *current asm("g4"); - -#endif /* !(_SPARC64_CURRENT_H) */ +#include <asm-sparc/current.h> diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index 5111e87..4145c47 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h @@ -1,21 +1 @@ -/* - * Arch specific extensions to struct device - * - * This file is released under the GPLv2 - */ -#ifndef _ASM_SPARC64_DEVICE_H -#define _ASM_SPARC64_DEVICE_H - -struct device_node; -struct of_device; - -struct dev_archdata { - void *iommu; - void *stc; - void *host_controller; - - struct device_node *prom_node; - struct of_device *op; -}; - -#endif /* _ASM_SPARC64_DEVICE_H */ +#include <asm-sparc/device.h> diff --git a/include/asm-sparc64/div64.h b/include/asm-sparc64/div64.h index 6cd978c..928c94f 100644 --- a/include/asm-sparc64/div64.h +++ b/include/asm-sparc64/div64.h @@ -1 +1 @@ -#include <asm-generic/div64.h> +#include <asm-sparc/div64.h> diff --git a/include/asm-sparc64/emergency-restart.h b/include/asm-sparc64/emergency-restart.h index 108d8c4..2cac7b6 100644 --- a/include/asm-sparc64/emergency-restart.h +++ b/include/asm-sparc64/emergency-restart.h @@ -1,6 +1 @@ -#ifndef _ASM_EMERGENCY_RESTART_H -#define _ASM_EMERGENCY_RESTART_H - -#include <asm-generic/emergency-restart.h> - -#endif /* _ASM_EMERGENCY_RESTART_H */ +#include <asm-sparc/emergency-restart.h> diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h index ea3509e..9701fe0 100644 --- a/include/asm-sparc64/errno.h +++ b/include/asm-sparc64/errno.h @@ -1,114 +1 @@ -/* $Id: errno.h,v 1.2 1997/04/15 12:46:11 jj Exp $ */ -#ifndef _SPARC64_ERRNO_H -#define _SPARC64_ERRNO_H - -/* These match the SunOS error numbering scheme. */ - -#include <asm-generic/errno-base.h> - -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Op not supported on transport endpoint */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Cannot assign requested address */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Net dropped connection because of reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Transport endpoint is already connected */ -#define ENOTCONN 57 /* Transport endpoint is not connected */ -#define ESHUTDOWN 58 /* No send after transport endpoint shutdown */ -#define ETOOMANYREFS 59 /* Too many references: cannot splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ -#define ELOOP 62 /* Too many symbolic links encountered */ -#define ENAMETOOLONG 63 /* File name too long */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ -#define EPROCLIM 67 /* SUNOS: Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Quota exceeded */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Object is remote */ -#define ENOSTR 72 /* Device not a stream */ -#define ETIME 73 /* Timer expired */ -#define ENOSR 74 /* Out of streams resources */ -#define ENOMSG 75 /* No message of desired type */ -#define EBADMSG 76 /* Not a data message */ -#define EIDRM 77 /* Identifier removed */ -#define EDEADLK 78 /* Resource deadlock would occur */ -#define ENOLCK 79 /* No record locks available */ -#define ENONET 80 /* Machine is not on the network */ -#define ERREMOTE 81 /* SunOS: Too many lvls of remote in path */ -#define ENOLINK 82 /* Link has been severed */ -#define EADV 83 /* Advertise error */ -#define ESRMNT 84 /* Srmount error */ -#define ECOMM 85 /* Communication error on send */ -#define EPROTO 86 /* Protocol error */ -#define EMULTIHOP 87 /* Multihop attempted */ -#define EDOTDOT 88 /* RFS specific error */ -#define EREMCHG 89 /* Remote address changed */ -#define ENOSYS 90 /* Function not implemented */ - -/* The rest have no SunOS equivalent. */ -#define ESTRPIPE 91 /* Streams pipe error */ -#define EOVERFLOW 92 /* Value too large for defined data type */ -#define EBADFD 93 /* File descriptor in bad state */ -#define ECHRNG 94 /* Channel number out of range */ -#define EL2NSYNC 95 /* Level 2 not synchronized */ -#define EL3HLT 96 /* Level 3 halted */ -#define EL3RST 97 /* Level 3 reset */ -#define ELNRNG 98 /* Link number out of range */ -#define EUNATCH 99 /* Protocol driver not attached */ -#define ENOCSI 100 /* No CSI structure available */ -#define EL2HLT 101 /* Level 2 halted */ -#define EBADE 102 /* Invalid exchange */ -#define EBADR 103 /* Invalid request descriptor */ -#define EXFULL 104 /* Exchange full */ -#define ENOANO 105 /* No anode */ -#define EBADRQC 106 /* Invalid request code */ -#define EBADSLT 107 /* Invalid slot */ -#define EDEADLOCK 108 /* File locking deadlock error */ -#define EBFONT 109 /* Bad font file format */ -#define ELIBEXEC 110 /* Cannot exec a shared library directly */ -#define ENODATA 111 /* No data available */ -#define ELIBBAD 112 /* Accessing a corrupted shared library */ -#define ENOPKG 113 /* Package not installed */ -#define ELIBACC 114 /* Can not access a needed shared library */ -#define ENOTUNIQ 115 /* Name not unique on network */ -#define ERESTART 116 /* Interrupted syscall should be restarted */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EILSEQ 122 /* Illegal byte sequence */ -#define ELIBMAX 123 /* Atmpt to link in too many shared libs */ -#define ELIBSCN 124 /* .lib section in a.out corrupted */ - -#define ENOMEDIUM 125 /* No medium found */ -#define EMEDIUMTYPE 126 /* Wrong medium type */ -#define ECANCELED 127 /* Operation Cancelled */ -#define ENOKEY 128 /* Required key not available */ -#define EKEYEXPIRED 129 /* Key has expired */ -#define EKEYREVOKED 130 /* Key has been revoked */ -#define EKEYREJECTED 131 /* Key was rejected by service */ - -/* for robust mutexes */ -#define EOWNERDEAD 132 /* Owner died */ -#define ENOTRECOVERABLE 133 /* State not recoverable */ - -#endif /* !(_SPARC64_ERRNO_H) */ +#include <asm-sparc/errno.h> diff --git a/include/asm-sparc64/fb.h b/include/asm-sparc64/fb.h index 389012e..1c2ac58 100644 --- a/include/asm-sparc64/fb.h +++ b/include/asm-sparc64/fb.h @@ -1,27 +1 @@ -#ifndef _ASM_FB_H_ -#define _ASM_FB_H_ -#include <linux/fb.h> -#include <linux/fs.h> -#include <asm/page.h> -#include <asm/prom.h> - -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); -} - -static inline int fb_is_primary_device(struct fb_info *info) -{ - struct device *dev = info->device; - struct device_node *node; - - node = dev->archdata.prom_node; - if (node && - node == of_console_device) - return 1; - - return 0; -} - -#endif /* _ASM_FB_H_ */ +#include <asm-sparc/fb.h> diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index b6ece22..c299b85 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h @@ -16,7 +16,7 @@ /* BIO layer definitions. */ extern unsigned long kern_base, kern_size; #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) -#define BIO_VMERGE_BOUNDARY 0 +#define BIO_VMERGE_BOUNDARY 8192 static inline u8 _inb(unsigned long addr) { diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 9eac667..46325dd 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h @@ -26,6 +26,7 @@ struct iommu_arena { struct iommu { spinlock_t lock; struct iommu_arena arena; + void (*flush_all)(struct iommu *); iopte_t *page_table; u32 page_table_map_base; unsigned long iommu_control; diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index 5020eaf..7237dd8 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h @@ -14,11 +14,15 @@ typedef u32 kprobe_opcode_t; #define arch_remove_kprobe(p) do {} while (0) +#define ARCH_SUPPORTS_KRETPROBES + #define flush_insn_slot(p) \ do { flushi(&(p)->ainsn.insn[0]); \ flushi(&(p)->ainsn.insn[1]); \ } while (0) +void kretprobe_trampoline(void); + /* Architecture specific copy of original instruction*/ struct arch_specific_insn { /* copy of the original instruction */ diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h index 46d69b3..a769fdb 100644 --- a/include/asm-sparc64/of_device.h +++ b/include/asm-sparc64/of_device.h @@ -1,38 +1 @@ -#ifndef _ASM_SPARC64_OF_DEVICE_H -#define _ASM_SPARC64_OF_DEVICE_H -#ifdef __KERNEL__ - -#include <linux/device.h> -#include <linux/of.h> -#include <linux/mod_devicetable.h> -#include <asm/openprom.h> - -/* - * The of_device is a kind of "base class" that is a superset of - * struct device for use by devices attached to an OF node and - * probed using OF properties. - */ -struct of_device -{ - struct device_node *node; - struct device dev; - struct resource resource[PROMREG_MAX]; - unsigned int irqs[PROMINTR_MAX]; - int num_irqs; - - void *sysdata; - - int slot; - int portid; - int clock_freq; -}; - -extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); -extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); - -/* These are just here during the transition */ -#include <linux/of_device.h> -#include <linux/of_platform.h> - -#endif /* __KERNEL__ */ -#endif /* _ASM_SPARC64_OF_DEVICE_H */ +#include <asm-sparc/of_device.h> diff --git a/include/asm-sparc64/of_platform.h b/include/asm-sparc64/of_platform.h index f15cfa7..78aa032 100644 --- a/include/asm-sparc64/of_platform.h +++ b/include/asm-sparc64/of_platform.h @@ -22,9 +22,4 @@ extern struct bus_type sbus_bus_type; #define of_bus_type of_platform_bus_type /* for compatibility */ -extern struct of_device *of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus); - #endif /* _ASM_SPARC64_OF_PLATFORM_H */ diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 07843f9..5fa166e 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h @@ -1,103 +1 @@ -#ifndef _SPARC64_PROM_H -#define _SPARC64_PROM_H -#ifdef __KERNEL__ - -/* - * Definitions for talking to the Open Firmware PROM on - * Power Macintosh computers. - * - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * Updates for SPARC64 by David S. Miller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#include <linux/types.h> -#include <linux/proc_fs.h> -#include <asm/atomic.h> - -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 - -#define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l)) -#define of_prop_cmp(s1, s2) strcasecmp((s1), (s2)) -#define of_node_cmp(s1, s2) strcmp((s1), (s2)) - -typedef u32 phandle; -typedef u32 ihandle; - -struct property { - char *name; - int length; - void *value; - struct property *next; - unsigned long _flags; - unsigned int unique_id; -}; - -struct of_irq_controller; -struct device_node { - const char *name; - const char *type; - phandle node; - char *path_component_name; - char *full_name; - - struct property *properties; - struct property *deadprops; /* removed properties */ - struct device_node *parent; - struct device_node *child; - struct device_node *sibling; - struct device_node *next; /* next device of same type */ - struct device_node *allnext; /* next in list of all nodes */ - struct proc_dir_entry *pde; /* this node's proc directory */ - struct kref kref; - unsigned long _flags; - void *data; - unsigned int unique_id; - - struct of_irq_controller *irq_trans; -}; - -struct of_irq_controller { - unsigned int (*irq_build)(struct device_node *, unsigned int, void *); - void *data; -}; - -#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) -#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) - -extern struct device_node *of_find_node_by_cpuid(int cpuid); -extern int of_set_property(struct device_node *node, const char *name, void *val, int len); -extern int of_getintprop_default(struct device_node *np, - const char *name, - int def); -extern int of_find_in_proplist(const char *list, const char *match, int len); - -extern void prom_build_devicetree(void); - -/* Dummy ref counting routines - to be implemented later */ -static inline struct device_node *of_node_get(struct device_node *node) -{ - return node; -} -static inline void of_node_put(struct device_node *node) -{ -} - -/* - * NB: This is here while we transition from using asm/prom.h - * to linux/of.h - */ -#include <linux/of.h> - -extern struct device_node *of_console_device; -extern char *of_console_path; -extern char *of_console_options; - -#endif /* __KERNEL__ */ -#endif /* _SPARC64_PROM_H */ +#include <asm-sparc/prom.h> diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index 661d8cd..74a539a 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h @@ -57,6 +57,7 @@ typedef struct { unsigned long pte; } pte_t; typedef struct { unsigned long pmd; } pmd_t; typedef struct { unsigned long pgd; } pgd_t; typedef struct { unsigned long pgprot; } pgprot_t; +typedef struct page *pgtable_t; #define pte_val(x) ((x).pte) #define pmd_val(x) ((x).pmd) diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 98a9ca2..7a72d6a 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h @@ -89,6 +89,10 @@ extern int acpi_pci_disabled; extern int acpi_skip_timer_override; extern int acpi_use_timer_override; +extern u8 acpi_sci_flags; +extern int acpi_sci_override_gsi; +void acpi_pic_sci_set_trigger(unsigned int, u16); + static inline void disable_acpi(void) { acpi_disabled = 1; diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h index 8dd8c5e..6a22212 100644 --- a/include/asm-x86/cacheflush.h +++ b/include/asm-x86/cacheflush.h @@ -44,6 +44,8 @@ int set_memory_np(unsigned long addr, int numpages); void clflush_cache_range(void *addr, unsigned int size); +void cpa_init(void); + #ifdef CONFIG_DEBUG_RODATA void mark_rodata_ro(void); #endif diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index 811fe14..9e72800 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h @@ -206,12 +206,17 @@ static inline u16 geode_mfgpt_read(int timer, u16 reg) return inw(base + reg + (timer * 8)); } -extern int __init geode_mfgpt_detect(void); extern int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable); extern int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable); -extern int geode_mfgpt_alloc_timer(int timer, int domain, struct module *owner); +extern int geode_mfgpt_alloc_timer(int timer, int domain); #define geode_mfgpt_setup_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 1) #define geode_mfgpt_release_irq(t, c, i) geode_mfgpt_set_irq((t), (c), (i), 0) +#ifdef CONFIG_GEODE_MFGPT_TIMER +extern int __init mfgpt_timer_setup(void); +#else +static inline int mfgpt_timer_setup(void) { return 0; } +#endif + #endif diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index 984998a..5f7257f 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h @@ -48,7 +48,6 @@ typedef unsigned long pgprotval_t; typedef unsigned long phys_addr_t; typedef union { pteval_t pte, pte_low; } pte_t; -typedef pte_t boot_pte_t; #endif /* __ASSEMBLY__ */ #endif /* CONFIG_X86_PAE */ diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 44c0a4f..174b877 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h @@ -255,7 +255,7 @@ enum { * NOTE: the return type is pte_t but if the pmd is PSE then we return it * as a pte too. */ -extern pte_t *lookup_address(unsigned long address, int *level); +extern pte_t *lookup_address(unsigned long address, unsigned int *level); /* local pte updates need not use xchg for locking */ static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 80dd438..a842c72 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h @@ -52,10 +52,6 @@ void paging_init(void); #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) -#define TWOLEVEL_PGDIR_SHIFT 22 -#define BOOT_USER_PGD_PTRS (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT) -#define BOOT_KERNEL_PGD_PTRS (1024-BOOT_USER_PGD_PTRS) - /* Just any arbitrary offset to the start of the vmalloc VM area: the * current 8MB value just means that there will be a 8MB "hole" after the * physical memory until the kernel virtual memory starts. That means that diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 0ab3a32..974f5b7 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -5,15 +5,6 @@ /* These definitions are for GCC v4.x. */ #include <linux/compiler-gcc.h> -#ifdef CONFIG_FORCED_INLINING -# undef inline -# undef __inline__ -# undef __inline -# define inline inline __attribute__((always_inline)) -# define __inline__ __inline__ __attribute__((always_inline)) -# define __inline __inline __attribute__((always_inline)) -#endif - #define __used __attribute__((__used__)) #define __must_check __attribute__((warn_unused_result)) #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index c4f635a..2500325 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h @@ -490,6 +490,13 @@ do { \ #define EXT4_ORPHAN_FS 0x0004 /* Orphans being recovered */ /* + * Misc. filesystem flags + */ +#define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */ +#define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */ +#define EXT2_FLAGS_TEST_FILESYS 0x0004 /* to test development code */ + +/* * Mount flags */ #define EXT4_MOUNT_CHECK 0x00001 /* Do mount-time checks */ diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 600fc3b..1ad56a7 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -316,7 +316,7 @@ static inline u64 hrtimer_forward_now(struct hrtimer *timer, /* Precise sleep: */ extern long hrtimer_nanosleep(struct timespec *rqtp, - struct timespec *rmtp, + struct timespec __user *rmtp, const enum hrtimer_mode mode, const clockid_t clockid); extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9815951..925d57b 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -51,10 +51,8 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask); int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); -static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm) -{ - return rcu_dereference(mm->mem_cgroup); -} +#define vm_match_cgroup(mm, cgroup) \ + ((cgroup) == rcu_dereference((mm)->mem_cgroup)) extern int mem_cgroup_prepare_migration(struct page *page); extern void mem_cgroup_end_migration(struct page *page); @@ -123,9 +121,9 @@ static inline int mem_cgroup_cache_charge(struct page *page, return 0; } -static inline struct mem_cgroup *mm_cgroup(const struct mm_struct *mm) +static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) { - return NULL; + return 1; } static inline int task_in_mem_cgroup(struct task_struct *task, diff --git a/include/linux/memstick.h b/include/linux/memstick.h new file mode 100644 index 0000000..334d059 --- /dev/null +++ b/include/linux/memstick.h @@ -0,0 +1,299 @@ +/* + * Sony MemoryStick support + * + * Copyright (C) 2007 Alex Dubov <oakad@yahoo.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef _MEMSTICK_H +#define _MEMSTICK_H + +#include <linux/workqueue.h> +#include <linux/scatterlist.h> +#include <linux/device.h> + +/*** Hardware based structures ***/ + +struct ms_status_register { + unsigned char reserved; + unsigned char interrupt; +#define MEMSTICK_INT_CMDNAK 0x0001 +#define MEMSTICK_INT_BREQ 0x0020 +#define MEMSTICK_INT_ERR 0x0040 +#define MEMSTICK_INT_CED 0x0080 + + unsigned char status0; +#define MEMSTICK_STATUS0_WP 0x0001 +#define MEMSTICK_STATUS0_SL 0x0002 +#define MEMSTICK_STATUS0_BF 0x0010 +#define MEMSTICK_STATUS0_BE 0x0020 +#define MEMSTICK_STATUS0_FB0 0x0040 +#define MEMSTICK_STATUS0_MB 0x0080 + + unsigned char status1; +#define MEMSTICK_STATUS1_UCFG 0x0001 +#define MEMSTICK_STATUS1_FGER 0x0002 +#define MEMSTICK_STATUS1_UCEX 0x0004 +#define MEMSTICK_STATUS1_EXER 0x0008 +#define MEMSTICK_STATUS1_UCDT 0x0010 +#define MEMSTICK_STATUS1_DTER 0x0020 +#define MEMSTICK_STATUS1_FBI 0x0040 +#define MEMSTICK_STATUS1_MB 0x0080 +} __attribute__((packed)); + +struct ms_id_register { + unsigned char type; + unsigned char reserved; + unsigned char category; + unsigned char class; +} __attribute__((packed)); + +struct ms_param_register { + unsigned char system; + unsigned char block_address_msb; + unsigned short block_address; + unsigned char cp; +#define MEMSTICK_CP_BLOCK 0x0000 +#define MEMSTICK_CP_PAGE 0x0020 +#define MEMSTICK_CP_EXTRA 0x0040 +#define MEMSTICK_CP_OVERWRITE 0x0080 + + unsigned char page_address; +} __attribute__((packed)); + +struct ms_extra_data_register { + unsigned char overwrite_flag; +#define MEMSTICK_OVERWRITE_UPDATA 0x0010 +#define MEMSTICK_OVERWRITE_PAGE 0x0060 +#define MEMSTICK_OVERWRITE_BLOCK 0x0080 + + unsigned char management_flag; +#define MEMSTICK_MANAGEMENT_SYSTEM 0x0004 +#define MEMSTICK_MANAGEMENT_TRANS_TABLE 0x0008 +#define MEMSTICK_MANAGEMENT_COPY 0x0010 +#define MEMSTICK_MANAGEMENT_ACCESS 0x0020 + + unsigned short logical_address; +} __attribute__((packed)); + +struct ms_register { + struct ms_status_register status; + struct ms_id_register id; + unsigned char reserved[8]; + struct ms_param_register param; + struct ms_extra_data_register extra_data; +} __attribute__((packed)); + +struct mspro_param_register { + unsigned char system; + unsigned short data_count; + unsigned int data_address; + unsigned char cmd_param; +} __attribute__((packed)); + +struct mspro_register { + struct ms_status_register status; + struct ms_id_register id; + unsigned char reserved[8]; + struct mspro_param_register param; +} __attribute__((packed)); + +struct ms_register_addr { + unsigned char r_offset; + unsigned char r_length; + unsigned char w_offset; + unsigned char w_length; +} __attribute__((packed)); + +enum { + MS_TPC_READ_LONG_DATA = 0x02, + MS_TPC_READ_SHORT_DATA = 0x03, + MS_TPC_READ_REG = 0x04, + MS_TPC_READ_IO_DATA = 0x05, /* unverified */ + MS_TPC_GET_INT = 0x07, + MS_TPC_SET_RW_REG_ADRS = 0x08, + MS_TPC_EX_SET_CMD = 0x09, + MS_TPC_WRITE_IO_DATA = 0x0a, /* unverified */ + MS_TPC_WRITE_REG = 0x0b, + MS_TPC_WRITE_SHORT_DATA = 0x0c, + MS_TPC_WRITE_LONG_DATA = 0x0d, + MS_TPC_SET_CMD = 0x0e +}; + +enum { + MS_CMD_BLOCK_END = 0x33, + MS_CMD_RESET = 0x3c, + MS_CMD_BLOCK_WRITE = 0x55, + MS_CMD_SLEEP = 0x5a, + MS_CMD_BLOCK_ERASE = 0x99, + MS_CMD_BLOCK_READ = 0xaa, + MS_CMD_CLEAR_BUF = 0xc3, + MS_CMD_FLASH_STOP = 0xcc, + MSPRO_CMD_FORMAT = 0x10, + MSPRO_CMD_SLEEP = 0x11, + MSPRO_CMD_READ_DATA = 0x20, + MSPRO_CMD_WRITE_DATA = 0x21, + MSPRO_CMD_READ_ATRB = 0x24, + MSPRO_CMD_STOP = 0x25, + MSPRO_CMD_ERASE = 0x26, + MSPRO_CMD_SET_IBA = 0x46, + MSPRO_CMD_SET_IBD = 0x47 +/* + MSPRO_CMD_RESET + MSPRO_CMD_WAKEUP + MSPRO_CMD_IN_IO_DATA + MSPRO_CMD_OUT_IO_DATA + MSPRO_CMD_READ_IO_ATRB + MSPRO_CMD_IN_IO_FIFO + MSPRO_CMD_OUT_IO_FIFO + MSPRO_CMD_IN_IOM + MSPRO_CMD_OUT_IOM +*/ +}; + +/*** Driver structures and functions ***/ + +#define MEMSTICK_PART_SHIFT 3 + +enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; + +#define MEMSTICK_POWER_OFF 0 +#define MEMSTICK_POWER_ON 1 + +#define MEMSTICK_SERIAL 0 +#define MEMSTICK_PARALLEL 1 + +struct memstick_host; +struct memstick_driver; + +#define MEMSTICK_MATCH_ALL 0x01 + +#define MEMSTICK_TYPE_LEGACY 0xff +#define MEMSTICK_TYPE_DUO 0x00 +#define MEMSTICK_TYPE_PRO 0x01 + +#define MEMSTICK_CATEGORY_STORAGE 0xff +#define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 + +#define MEMSTICK_CLASS_GENERIC 0xff +#define MEMSTICK_CLASS_GENERIC_DUO 0x00 + + +struct memstick_device_id { + unsigned char match_flags; + unsigned char type; + unsigned char category; + unsigned char class; +}; + +struct memstick_request { + unsigned char tpc; + unsigned char data_dir:1, + need_card_int:1, + get_int_reg:1, + io_type:2; +#define MEMSTICK_IO_NONE 0 +#define MEMSTICK_IO_VAL 1 +#define MEMSTICK_IO_SG 2 + + unsigned char int_reg; + int error; + union { + struct scatterlist sg; + struct { + unsigned char data_len; + unsigned char data[15]; + }; + }; +}; + +struct memstick_dev { + struct memstick_device_id id; + struct memstick_host *host; + struct ms_register_addr reg_addr; + struct completion mrq_complete; + struct memstick_request current_mrq; + + /* Check that media driver is still willing to operate the device. */ + int (*check)(struct memstick_dev *card); + /* Get next request from the media driver. */ + int (*next_request)(struct memstick_dev *card, + struct memstick_request **mrq); + + struct device dev; +}; + +struct memstick_host { + struct mutex lock; + unsigned int id; + unsigned int caps; +#define MEMSTICK_CAP_PARALLEL 1 +#define MEMSTICK_CAP_AUTO_GET_INT 2 + + struct work_struct media_checker; + struct class_device cdev; + + struct memstick_dev *card; + unsigned int retries; + + /* Notify the host that some requests are pending. */ + void (*request)(struct memstick_host *host); + /* Set host IO parameters (power, clock, etc). */ + void (*set_param)(struct memstick_host *host, + enum memstick_param param, + int value); + unsigned long private[0] ____cacheline_aligned; +}; + +struct memstick_driver { + struct memstick_device_id *id_table; + int (*probe)(struct memstick_dev *card); + void (*remove)(struct memstick_dev *card); + int (*suspend)(struct memstick_dev *card, + pm_message_t state); + int (*resume)(struct memstick_dev *card); + + struct device_driver driver; +}; + +int memstick_register_driver(struct memstick_driver *drv); +void memstick_unregister_driver(struct memstick_driver *drv); + +struct memstick_host *memstick_alloc_host(unsigned int extra, + struct device *dev); + +int memstick_add_host(struct memstick_host *host); +void memstick_remove_host(struct memstick_host *host); +void memstick_free_host(struct memstick_host *host); +void memstick_detect_change(struct memstick_host *host); + +void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, + struct scatterlist *sg); +void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, + void *buf, size_t length); +int memstick_next_req(struct memstick_host *host, + struct memstick_request **mrq); +void memstick_new_req(struct memstick_host *host); + +int memstick_set_rw_addr(struct memstick_dev *card); + +static inline void *memstick_priv(struct memstick_host *host) +{ + return (void *)host->private; +} + +static inline void *memstick_get_drvdata(struct memstick_dev *card) +{ + return dev_get_drvdata(&card->dev); +} + +static inline void memstick_set_drvdata(struct memstick_dev *card, void *data) +{ + dev_set_drvdata(&card->dev, data); +} + +#endif diff --git a/include/linux/pci.h b/include/linux/pci.h index 7215d3b..87195b6 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -301,14 +301,14 @@ struct pci_ops { int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); }; -struct pci_raw_ops { - int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, - int reg, int len, u32 *val); - int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn, - int reg, int len, u32 val); -}; - -extern struct pci_raw_ops *raw_pci_ops; +/* + * ACPI needs to be able to access PCI config space before we've done a + * PCI bus scan and created pci_bus structures. + */ +extern int raw_pci_read(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 *val); +extern int raw_pci_write(unsigned int domain, unsigned int bus, + unsigned int devfn, int reg, int len, u32 val); struct pci_bus_region { resource_size_t start; diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 5eb38cc..8ba1c32 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -10,13 +10,13 @@ * * Various protocol defined structures. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 7bf2d14..6ec39ab 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -42,11 +42,13 @@ static inline pgoff_t swp_offset(swp_entry_t entry) return entry.val & SWP_OFFSET_MASK(entry); } +#ifdef CONFIG_MMU /* check whether a pte points to a swap entry */ static inline int is_swap_pte(pte_t pte) { return !pte_none(pte) && !pte_present(pte) && !pte_file(pte); } +#endif /* * Convert the arch-dependent pte representation of a swp_entry_t into an diff --git a/include/linux/thermal.h b/include/linux/thermal.h index bba7712..818ca1c 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -79,7 +79,9 @@ struct thermal_zone_device { }; struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, - struct thermal_zone_device_ops *); + struct + thermal_zone_device_ops + *); void thermal_zone_device_unregister(struct thermal_zone_device *); int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, @@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); +#ifdef CONFIG_THERMAL struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, - struct thermal_cooling_device_ops *); + struct + thermal_cooling_device_ops + *); void thermal_cooling_device_unregister(struct thermal_cooling_device *); +#else +static inline struct thermal_cooling_device +*thermal_cooling_device_register(char *c, void *v, + struct thermal_cooling_device_ops *t) +{ + return NULL; +} +static inline + void thermal_cooling_device_unregister(struct thermal_cooling_device *t) +{ +}; +#endif -#endif /* __THERMAL_H__ */ +#endif /* __THERMAL_H__ */ diff --git a/include/linux/tifm.h b/include/linux/tifm.h index 2096b76..da76ed8 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h @@ -72,6 +72,7 @@ enum { #define TIFM_FIFO_READY 0x00000001 #define TIFM_FIFO_INT_SETALL 0x0000ffff #define TIFM_FIFO_INTMASK 0x00000005 +#define TIFM_FIFO_SIZE 0x00000200 #define TIFM_DMA_RESET 0x00000002 #define TIFM_DMA_TX 0x00008000 @@ -124,6 +125,8 @@ struct tifm_adapter { void (*eject)(struct tifm_adapter *fm, struct tifm_dev *sock); + int (*has_ms_pif)(struct tifm_adapter *fm, + struct tifm_dev *sock); struct tifm_dev *sockets[0]; }; @@ -141,6 +144,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id, int tifm_register_driver(struct tifm_driver *drv); void tifm_unregister_driver(struct tifm_driver *drv); void tifm_eject(struct tifm_dev *sock); +int tifm_has_ms_pif(struct tifm_dev *sock); int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, int direction); void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents, diff --git a/include/linux/timex.h b/include/linux/timex.h index 8ea3e71..c3f3747 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -232,7 +232,14 @@ static inline int ntp_synced(void) #else #define NTP_INTERVAL_FREQ (HZ) #endif -#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) + +#define CLOCK_TICK_OVERFLOW (LATCH * HZ - CLOCK_TICK_RATE) +#define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / \ + (s64)CLOCK_TICK_RATE) + +/* Because using NSEC_PER_SEC would be too easy */ +#define NTP_INTERVAL_LENGTH ((((s64)TICK_USEC * NSEC_PER_USEC * USER_HZ) + \ + CLOCK_TICK_ADJUST) / NTP_INTERVAL_FREQ) /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ extern u64 current_tick_length(void); diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h index 5db261a..49bc957 100644 --- a/include/net/sctp/auth.h +++ b/include/net/sctp/auth.h @@ -1,15 +1,15 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index c1f7976..10ae2da 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h @@ -1,18 +1,18 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel Implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (C) 1999-2001 Cisco, Motorola * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * * These are the definitions needed for the command object. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * the SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index fefcba6..c32ddf0 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -1,18 +1,18 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 4977b0a..57df27f 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -1,20 +1,20 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001-2003 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * * The base lksctp header. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index bf2f5ed..ef9e7ed 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -1,20 +1,20 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * * These are definitions needed by the state machine. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 4d591bf..9c827a7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -1,18 +1,18 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/tsnmap.h b/include/net/sctp/tsnmap.h index 70a824d..099211b 100644 --- a/include/net/sctp/tsnmap.h +++ b/include/net/sctp/tsnmap.h @@ -1,21 +1,21 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * * These are the definitions needed for the tsnmap type. The tsnmap is used * to track out of order TSNs received. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 922a151..9bcfc12 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h @@ -1,4 +1,4 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. @@ -10,15 +10,15 @@ * sctp_ulpevent type is used to carry information from the state machine * upwards to the ULP. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index cd33270..2e5ee0d 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h @@ -1,4 +1,4 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. @@ -11,13 +11,13 @@ * and the core SCTP state machine. This is the component which handles * reassembly and ordering. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * the SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 954090b..9462d6a 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h @@ -1,21 +1,21 @@ -/* SCTP kernel reference Implementation +/* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2002 Intel Corp. * - * This file is part of the SCTP kernel reference Implementation + * This file is part of the SCTP kernel implementation * * This header represents the structures and constants needed to support * the SCTP Extension to the Sockets API. * - * The SCTP reference implementation is free software; + * This SCTP implementation is free software; * you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * - * The SCTP reference implementation is distributed in the hope that it + * This SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |