Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146321
b: refs/heads/master
c: fd4f683
h: refs/heads/master
i:
  146319: 01c4604
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Jun 11, 2009
1 parent e1f34ea commit 68a0bb3
Show file tree
Hide file tree
Showing 15 changed files with 580 additions and 418 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: 4a3b98932270f5d69f2c081924e356325ed704d9
refs/heads/master: fd4f683d045e053abb093f80d81afce30ceadad2
1 change: 0 additions & 1 deletion trunk/arch/frv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config FRV
bool
default y
select HAVE_IDE
select HAVE_ARCH_TRACEHOOK

config ZONE_DMA
bool
Expand Down
29 changes: 14 additions & 15 deletions trunk/arch/frv/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,46 +112,46 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig
#define atomic_clear_mask(mask, v) atomic_test_and_ANDNOT_mask((mask), (v))
#define atomic_set_mask(mask, v) atomic_test_and_OR_mask((mask), (v))

static inline int test_and_clear_bit(unsigned long nr, volatile void *addr)
static inline int test_and_clear_bit(int nr, volatile void *addr)
{
volatile unsigned long *ptr = addr;
unsigned long mask = 1UL << (nr & 31);
ptr += nr >> 5;
return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0;
}

static inline int test_and_set_bit(unsigned long nr, volatile void *addr)
static inline int test_and_set_bit(int nr, volatile void *addr)
{
volatile unsigned long *ptr = addr;
unsigned long mask = 1UL << (nr & 31);
ptr += nr >> 5;
return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0;
}

static inline int test_and_change_bit(unsigned long nr, volatile void *addr)
static inline int test_and_change_bit(int nr, volatile void *addr)
{
volatile unsigned long *ptr = addr;
unsigned long mask = 1UL << (nr & 31);
ptr += nr >> 5;
return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0;
}

static inline void clear_bit(unsigned long nr, volatile void *addr)
static inline void clear_bit(int nr, volatile void *addr)
{
test_and_clear_bit(nr, addr);
}

static inline void set_bit(unsigned long nr, volatile void *addr)
static inline void set_bit(int nr, volatile void *addr)
{
test_and_set_bit(nr, addr);
}

static inline void change_bit(unsigned long nr, volatile void *addr)
static inline void change_bit(int nr, volatile void * addr)
{
test_and_change_bit(nr, addr);
}

static inline void __clear_bit(unsigned long nr, volatile void *addr)
static inline void __clear_bit(int nr, volatile void * addr)
{
volatile unsigned long *a = addr;
int mask;
Expand All @@ -161,7 +161,7 @@ static inline void __clear_bit(unsigned long nr, volatile void *addr)
*a &= ~mask;
}

static inline void __set_bit(unsigned long nr, volatile void *addr)
static inline void __set_bit(int nr, volatile void * addr)
{
volatile unsigned long *a = addr;
int mask;
Expand All @@ -171,7 +171,7 @@ static inline void __set_bit(unsigned long nr, volatile void *addr)
*a |= mask;
}

static inline void __change_bit(unsigned long nr, volatile void *addr)
static inline void __change_bit(int nr, volatile void *addr)
{
volatile unsigned long *a = addr;
int mask;
Expand All @@ -181,7 +181,7 @@ static inline void __change_bit(unsigned long nr, volatile void *addr)
*a ^= mask;
}

static inline int __test_and_clear_bit(unsigned long nr, volatile void *addr)
static inline int __test_and_clear_bit(int nr, volatile void * addr)
{
volatile unsigned long *a = addr;
int mask, retval;
Expand All @@ -193,7 +193,7 @@ static inline int __test_and_clear_bit(unsigned long nr, volatile void *addr)
return retval;
}

static inline int __test_and_set_bit(unsigned long nr, volatile void *addr)
static inline int __test_and_set_bit(int nr, volatile void * addr)
{
volatile unsigned long *a = addr;
int mask, retval;
Expand All @@ -205,7 +205,7 @@ static inline int __test_and_set_bit(unsigned long nr, volatile void *addr)
return retval;
}

static inline int __test_and_change_bit(unsigned long nr, volatile void *addr)
static inline int __test_and_change_bit(int nr, volatile void * addr)
{
volatile unsigned long *a = addr;
int mask, retval;
Expand All @@ -220,13 +220,12 @@ static inline int __test_and_change_bit(unsigned long nr, volatile void *addr)
/*
* This routine doesn't need to be atomic.
*/
static inline int
__constant_test_bit(unsigned long nr, const volatile void *addr)
static inline int __constant_test_bit(int nr, const volatile void * addr)
{
return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
}

static inline int __test_bit(unsigned long nr, const volatile void *addr)
static inline int __test_bit(int nr, const volatile void * addr)
{
int * a = (int *) addr;
int mask;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/frv/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ do { \
} while(0)

#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET
#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
#define ELF_EXEC_PAGESIZE 16384

Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/frv/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev,
dma_addr_t dma_handle,
size_t size, int direction)
{
BUG_ON(direction == PCI_DMA_NONE);
if (direction == PCI_DMA_NONE)
BUG();

frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
(unsigned long)bus_to_virt(dma_handle) + size);
Expand All @@ -104,7 +105,9 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
int nelems, int direction)
{
int i;
BUG_ON(direction == PCI_DMA_NONE);

if (direction == PCI_DMA_NONE)
BUG();

for (i = 0; i < nelems; i++)
frv_cache_wback_inv(sg_dma_address(&sg[i]),
Expand Down
11 changes: 1 addition & 10 deletions trunk/arch/frv/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
#ifdef __KERNEL__
#ifndef __ASSEMBLY__

struct task_struct;

/*
* we dedicate GR28 to keeping a pointer to the current exception frame
* - gr28 is destroyed on entry to the kernel from userspace
Expand All @@ -75,18 +73,11 @@ register struct pt_regs *__frame asm("gr28");

#define user_mode(regs) (!((regs)->psr & PSR_S))
#define instruction_pointer(regs) ((regs)->pc)
#define user_stack_pointer(regs) ((regs)->sp)

extern unsigned long user_stack(const struct pt_regs *);
extern void show_regs(struct pt_regs *);
#define profile_pc(regs) ((regs)->pc)

#define task_pt_regs(task) ((task)->thread.frame0)

#define arch_has_single_step() (1)
extern void user_enable_single_step(struct task_struct *);
extern void user_disable_single_step(struct task_struct *);
#endif

#endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_PTRACE_H */
123 changes: 0 additions & 123 deletions trunk/arch/frv/include/asm/syscall.h

This file was deleted.

10 changes: 5 additions & 5 deletions trunk/arch/frv/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,20 @@ register struct thread_info *__current_thread_info asm("gr15");
* - other flags in MSW
*/
#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
#define TIF_NOTIFY_RESUME 1 /* callback before returning to user */
#define TIF_SIGPENDING 2 /* signal pending */
#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
#define TIF_SIGPENDING 1 /* signal pending */
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */
#define TIF_IRET 4 /* return with iret */
#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 17 /* OOM killer killed process */
#define TIF_FREEZE 18 /* freezing for suspend */

#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_IRET (1 << TIF_IRET)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
#define _TIF_FREEZE (1 << TIF_FREEZE)
Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/frv/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ system_call:
bnc icc0,#0,__syscall_badsys

ldi @(gr15,#TI_FLAGS),gr4
ori gr4,#_TIF_SYSCALL_TRACE,gr4
andicc gr4,#_TIF_SYSCALL_TRACE,gr0,icc0
bne icc0,#0,__syscall_trace_entry

Expand Down Expand Up @@ -1149,10 +1150,11 @@ __entry_work_notifysig:
# perform syscall entry tracing
__syscall_trace_entry:
LEDS 0x6320
call syscall_trace_entry
setlos.p #0,gr8
call do_syscall_trace

lddi.p @(gr28,#REG_GR(8)) ,gr8
ori gr8,#0,gr7 ; syscall_trace_entry() returned new syscallno
ldi @(gr28,#REG_SYSCALLNO),gr7
lddi @(gr28,#REG_GR(8)) ,gr8
lddi @(gr28,#REG_GR(10)),gr10
lddi.p @(gr28,#REG_GR(12)),gr12

Expand All @@ -1167,10 +1169,11 @@ __syscall_exit_work:
beq icc0,#1,__entry_work_pending

movsg psr,gr23
andi gr23,#~PSR_PIL,gr23 ; could let syscall_trace_exit() call schedule()
andi gr23,#~PSR_PIL,gr23 ; could let do_syscall_trace() call schedule()
movgs gr23,psr

call syscall_trace_exit
setlos.p #1,gr8
call do_syscall_trace
bra __entry_resume_userspace

__syscall_badsys:
Expand Down
Loading

0 comments on commit 68a0bb3

Please sign in to comment.