Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57450
b: refs/heads/master
c: de4f6e5
h: refs/heads/master
v: v3
  • Loading branch information
Chris Zankel committed Jun 1, 2007
1 parent 65cc698 commit 157bcc8
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 64 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 176fd6c96dcbc263eb1c61eae9fe2a33f23a876d
refs/heads/master: de4f6e5b41bef50fc981410ae8380f27f4e93bf8
1 change: 1 addition & 0 deletions trunk/arch/xtensa/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <asm/platform.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/param.h>

#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
struct screen_info screen_info = { 0, 24, 0, 0, 0, 80, 0, 0, 0, 24, 1, 16};
Expand Down
78 changes: 31 additions & 47 deletions trunk/arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ SECTIONS
{
/* The .head.text section must be the first section! */
*(.head.text)
*(.literal)
TEXT_TEXT
*(.srom.text)
*(.literal .text)
VMLINUX_SYMBOL(__sched_text_start) = .;
*(.sched.literal .sched.text)
VMLINUX_SYMBOL(__sched_text_end) = .;
Expand All @@ -96,39 +94,14 @@ SECTIONS

}
_etext = .;
PROVIDE (etext = .);

. = ALIGN(16);

RODATA

/* Relocation table */

. = ALIGN(16);
__boot_reloc_table_start = ABSOLUTE(.);

__relocate : {

RELOCATE_ENTRY(_WindowVectors_text,
.WindowVectors.text);
#if 0
RELOCATE_ENTRY(_KernelExceptionVector_literal,
.KernelExceptionVector.literal);
#endif
RELOCATE_ENTRY(_KernelExceptionVector_text,
.KernelExceptionVector.text);
#if 0
RELOCATE_ENTRY(_UserExceptionVector_literal,
.UserExceptionVector.literal);
#endif
RELOCATE_ENTRY(_UserExceptionVector_text,
.UserExceptionVector.text);
RELOCATE_ENTRY(_DoubleExceptionVector_literal,
.DoubleExceptionVector.literal);
RELOCATE_ENTRY(_DoubleExceptionVector_text,
.DoubleExceptionVector.text);
}
__boot_reloc_table_end = ABSOLUTE(.) ;

.fixup : { *(.fixup) }

. = ALIGN(16);
Expand All @@ -145,8 +118,7 @@ SECTIONS
_fdata = .;
.data :
{
DATA_DATA
CONSTRUCTORS
*(.data) CONSTRUCTORS
. = ALIGN(XCHAL_ICACHE_LINESIZE);
*(.data.cacheline_aligned)
}
Expand Down Expand Up @@ -174,6 +146,22 @@ SECTIONS
__tagtable_begin = .;
*(.taglist)
__tagtable_end = .;

. = ALIGN(16);
__boot_reloc_table_start = ABSOLUTE(.);

RELOCATE_ENTRY(_WindowVectors_text,
.WindowVectors.text);
RELOCATE_ENTRY(_KernelExceptionVector_text,
.KernelExceptionVector.text);
RELOCATE_ENTRY(_UserExceptionVector_text,
.UserExceptionVector.text);
RELOCATE_ENTRY(_DoubleExceptionVector_literal,
.DoubleExceptionVector.literal);
RELOCATE_ENTRY(_DoubleExceptionVector_text,
.DoubleExceptionVector.text);

__boot_reloc_table_end = ABSOLUTE(.) ;
}

. = ALIGN(XCHAL_ICACHE_LINESIZE);
Expand All @@ -194,16 +182,6 @@ SECTIONS

SECURITY_INIT

. = ALIGN(4);

__start___ftr_fixup = .;
__ftr_fixup : { *(__ftr_fixup) }
__stop___ftr_fixup = .;

. = ALIGN(4096);
__per_cpu_start = .;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = .;

#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(4096);
Expand All @@ -212,6 +190,12 @@ SECTIONS
__initramfs_end = .;
#endif

. = ALIGN(4096);
__per_cpu_start = .;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = .;


/* We need this dummy segment here */

. = ALIGN(4);
Expand Down Expand Up @@ -273,9 +257,9 @@ SECTIONS

/* BSS section */
_bss_start = .;
.sbss : { *(.sbss) *(.scommon) }
.bss : { *(COMMON) *(.bss) }
.bss : { *(.bss.page_aligned) *(.bss) }
_bss_end = .;

_end = .;

/* only used by the boot loader */
Expand All @@ -293,16 +277,16 @@ SECTIONS
*(.ResetVector.text)
}


/* Sections to be discarded */
/DISCARD/ :
{
*(.text.exit)
*(.text.exit.literal)
*(.data.exit)
*(.exit.literal .exit.text)
*(.exit.data)
*(.exitcall.exit)
}

.xt.lit : { *(.xt.lit) }
.xt.prop : { *(.xt.prop) }

.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
Expand Down
15 changes: 8 additions & 7 deletions trunk/include/asm-xtensa/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ static inline int __ffs(unsigned long x)
return 31 - __cntlz(x & -x);
}


#ifdef __KERNEL__

/*
* ffs: Find first bit set in word. This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
Expand Down Expand Up @@ -97,11 +94,15 @@ static inline int fls (unsigned int x)
#include <asm-generic/bitops/ext2-non-atomic.h>

#ifdef __XTENSA_EL__
# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(addr))
# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(addr))
# define ext2_set_bit_atomic(lock,nr,addr) \
test_and_set_bit((nr), (unsigned long*)(addr))
# define ext2_clear_bit_atomic(lock,nr,addr) \
test_and_clear_bit((nr), (unsigned long*)(addr))
#elif defined(__XTENSA_EB__)
# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr) ^ 0x18, (addr))
# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr)^0x18,(addr))
# define ext2_set_bit_atomic(lock,nr,addr) \
test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr))
# define ext2_clear_bit_atomic(lock,nr,addr) \
test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr))
#else
# error processor byte order undefined!
#endif
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/asm-xtensa/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define _XTENSA_BYTEORDER_H

#include <asm/types.h>
#include <linux/compiler.h>

static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
Expand Down Expand Up @@ -78,4 +79,4 @@ static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
# error processor byte order undefined!
#endif

#endif /* __ASM_XTENSA_BYTEORDER_H */
#endif /* _XTENSA_BYTEORDER_H */
1 change: 1 addition & 0 deletions trunk/include/asm-xtensa/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define _XTENSA_MMU_CONTEXT_H

#include <linux/stringify.h>
#include <linux/sched.h>

#include <asm/pgtable.h>
#include <asm/cacheflush.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-xtensa/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ void copy_user_page(void *to,void* from,unsigned long vaddr,struct page* page);
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

#endif /* __KERNEL__ */
#include <asm-generic/memory_model.h>
#endif /* __KERNEL__ */
#endif /* _XTENSA_PAGE_H */
4 changes: 1 addition & 3 deletions trunk/include/asm-xtensa/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
#ifndef _XTENSA_PARAM_H
#define _XTENSA_PARAM_H

#include <asm/variant/core.h>

#ifdef __KERNEL__
# define HZ 100 /* internal timer frequency */
# define USER_HZ 100 /* for user interfaces in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */
#endif

#define EXEC_PAGESIZE (1 << XCHAL_MMU_MIN_PTE_PAGE_SIZE)
#define EXEC_PAGESIZE 4096

#ifndef NGROUPS
#define NGROUPS 32
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/asm-xtensa/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#ifndef _XTENSA_PTRACE_H
#define _XTENSA_PTRACE_H

#include <asm/variant/core.h>

/*
* Kernel stack
*
Expand Down Expand Up @@ -113,6 +111,9 @@ struct pt_regs {
};

#ifdef __KERNEL__

#include <asm/variant/core.h>

# define task_pt_regs(tsk) ((struct pt_regs*) \
(task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
# define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-xtensa/shmparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#ifndef _XTENSA_SHMPARAM_H
#define _XTENSA_SHMPARAM_H

#include <asm/processor.h>

/*
* Xtensa can have variable size caches, and if
* the size of single way is larger than the page size,
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-xtensa/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
#define TIF_IRET 5 /* return with iret */
#define TIF_MEMDIE 6
#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */

#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
Expand All @@ -125,6 +126,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_IRET (1<<TIF_IRET)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)

#define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */
#define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */
Expand Down

0 comments on commit 157bcc8

Please sign in to comment.