Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210954
b: refs/heads/master
c: d3654cd
h: refs/heads/master
v: v3
  • Loading branch information
Pavan Savoy authored and Greg Kroah-Hartman committed Sep 24, 2010
1 parent 4857161 commit f5177c8
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 78 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: cbff1e91bfb8afc6dbd84fec3e81855b926cceaf
refs/heads/master: d3654cd29e676cd3a2622aec926b0b56fa444714
1 change: 1 addition & 0 deletions trunk/arch/m32r/include/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ typedef struct sigaltstack {
#undef __HAVE_ARCH_SIG_BITOPS

struct pt_regs;
extern int do_signal(struct pt_regs *regs, sigset_t *oldset);

#define ptrace_signal_deliver(regs, cookie) do { } while (0)

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/m32r/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@
#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND

#define __IGNORE_lchown
#define __IGNORE_setuid
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/m32r/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ work_resched:
work_notifysig: ; deal with pending signals and
; notify-resume requests
mv r0, sp ; arg1 : struct pt_regs *regs
mv r1, r9 ; arg2 : __u32 thread_info_flags
ldi r1, #0 ; arg2 : sigset_t *oldset
mv r2, r9 ; arg3 : __u32 thread_info_flags
bl do_notify_resume
bra resume_userspace
bra restore_all

; perform syscall exit tracing
ALIGN
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/m32r/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,17 +592,16 @@ void user_enable_single_step(struct task_struct *child)

if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
!= sizeof(insn))
return -EIO;
break;

compute_next_pc(insn, pc, &next_pc, child);
if (next_pc & 0x80000000)
return -EIO;
break;

if (embed_debug_trap(child, next_pc))
return -EIO;
break;

invalidate_cache();
return 0;
}

void user_disable_single_step(struct task_struct *child)
Expand Down
105 changes: 64 additions & 41 deletions trunk/arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,37 @@

#define DEBUG_SIG 0

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

int do_signal(struct pt_regs *, sigset_t *);

asmlinkage int
sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
unsigned long r2, unsigned long r3, unsigned long r4,
unsigned long r5, unsigned long r6, struct pt_regs *regs)
{
sigset_t newset;

/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;

if (copy_from_user(&newset, unewset, sizeof(newset)))
return -EFAULT;
sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP));

spin_lock_irq(&current->sighand->siglock);
current->saved_sigmask = current->blocked;
current->blocked = newset;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);

current->state = TASK_INTERRUPTIBLE;
schedule();
set_thread_flag(TIF_RESTORE_SIGMASK);
return -ERESTARTNOHAND;
}

asmlinkage int
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
unsigned long r2, unsigned long r3, unsigned long r4,
Expand Down Expand Up @@ -187,7 +218,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
return (void __user *)((sp - frame_size) & -8ul);
}

static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs)
{
struct rt_sigframe __user *frame;
Expand Down Expand Up @@ -244,34 +275,22 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
current->comm, current->pid, frame, regs->pc);
#endif

return 0;
return;

give_sigsegv:
force_sigsegv(sig, current);
return -EFAULT;
}

static int prev_insn(struct pt_regs *regs)
{
u16 inst;
if (get_user(&inst, (u16 __user *)(regs->bpc - 2)))
return -EFAULT;
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
else
regs->bpc -= 4;
regs->syscall_nr = -1;
return 0;
}

/*
* OK, we're invoking a handler
*/

static int
static void
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *oldset, struct pt_regs *regs)
{
unsigned short inst;

/* Are we from a system call? */
if (regs->syscall_nr >= 0) {
/* If so, check system call restarting.. */
Expand All @@ -289,35 +308,36 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
/* fallthrough */
case -ERESTARTNOINTR:
regs->r0 = regs->orig_r0;
if (prev_insn(regs) < 0)
return -EFAULT;
inst = *(unsigned short *)(regs->bpc - 2);
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
else
regs->bpc -= 4;
}
}

/* Set up the stack frame */
if (setup_rt_frame(sig, ka, info, oldset, regs))
return -EFAULT;
setup_rt_frame(sig, ka, info, oldset, regs);

spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
return 0;
}

/*
* Note that 'init' is a special process: it doesn't get signals it doesn't
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
*/
static void do_signal(struct pt_regs *regs)
int do_signal(struct pt_regs *regs, sigset_t *oldset)
{
siginfo_t info;
int signr;
struct k_sigaction ka;
sigset_t *oldset;
unsigned short inst;

/*
* We want the common case to go fast, which
Expand All @@ -326,14 +346,12 @@ static void do_signal(struct pt_regs *regs)
* if so.
*/
if (!user_mode(regs))
return;
return 1;

if (try_to_freeze())
goto no_signal;

if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;
else
if (!oldset)
oldset = &current->blocked;

signr = get_signal_to_deliver(&info, &ka, regs, NULL);
Expand All @@ -345,10 +363,8 @@ static void do_signal(struct pt_regs *regs)
*/

/* Whee! Actually deliver the signal. */
if (handle_signal(signr, &ka, &info, oldset, regs) == 0)
clear_thread_flag(TIF_RESTORE_SIGMASK);

return;
handle_signal(signr, &ka, &info, oldset, regs);
return 1;
}

no_signal:
Expand All @@ -359,32 +375,39 @@ static void do_signal(struct pt_regs *regs)
regs->r0 == -ERESTARTSYS ||
regs->r0 == -ERESTARTNOINTR) {
regs->r0 = regs->orig_r0;
prev_insn(regs);
} else if (regs->r0 == -ERESTART_RESTARTBLOCK){
inst = *(unsigned short *)(regs->bpc - 2);
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
else
regs->bpc -= 4;
}
if (regs->r0 == -ERESTART_RESTARTBLOCK){
regs->r0 = regs->orig_r0;
regs->r7 = __NR_restart_syscall;
prev_insn(regs);
inst = *(unsigned short *)(regs->bpc - 2);
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
else
regs->bpc -= 4;
}
}
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
clear_thread_flag(TIF_RESTORE_SIGMASK);
sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
}
return 0;
}

/*
* notification of userspace execution resumption
* - triggered by current->work.notify_resume
*/
void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags)
void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
__u32 thread_info_flags)
{
/* Pending single-step? */
if (thread_info_flags & _TIF_SINGLESTEP)
clear_thread_flag(TIF_SINGLESTEP);

/* deal with pending signal delivery */
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs);
do_signal(regs,oldset);

if (thread_info_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/gpu/drm/drm_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ EXPORT_SYMBOL(drm_buffer_alloc);
* user_data: A pointer the data that is copied to the buffer.
* size: The Number of bytes to copy.
*/
int drm_buffer_copy_from_user(struct drm_buffer *buf,
void __user *user_data, int size)
extern int drm_buffer_copy_from_user(struct drm_buffer *buf,
void __user *user_data, int size)
{
int nr_pages = size / PAGE_SIZE + 1;
int idx;
Expand Down Expand Up @@ -163,7 +163,7 @@ void *drm_buffer_read_object(struct drm_buffer *buf,
{
int idx = drm_buffer_index(buf);
int page = drm_buffer_page(buf);
void *obj = NULL;
void *obj = 0;

if (idx + objsize <= PAGE_SIZE) {
obj = &buf->data[page][idx];
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,8 @@ nouveau_connector_get_modes(struct drm_connector *connector)
if (nv_encoder->dcb->type == OUTPUT_LVDS &&
(nv_encoder->dcb->lvdsconf.use_straps_for_mode ||
dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) {
struct drm_display_mode mode;

nouveau_bios_fp_mode(dev, &mode);
nv_connector->native_mode = drm_mode_duplicate(dev, &mode);
nv_connector->native_mode = drm_mode_create(dev);
nouveau_bios_fp_mode(dev, nv_connector->native_mode);
}

/* Find the native mode if this is a digital panel, if we didn't
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/atombios.h
Original file line number Diff line number Diff line change
Expand Up @@ -4999,7 +4999,7 @@ typedef struct _SW_I2C_IO_DATA_PARAMETERS
#define SW_I2C_CNTL_WRITE1BIT 6

//==============================VESA definition Portion===============================
#define VESA_OEM_PRODUCT_REV "01.00"
#define VESA_OEM_PRODUCT_REV '01.00'
#define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB //refer to VBE spec p.32, no TTY support
#define VESA_MODE_WIN_ATTRIBUTE 7
#define VESA_WIN_SIZE 64
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/drm/radeon/r600.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ int r600_ib_test(struct radeon_device *rdev)
if (i < rdev->usec_timeout) {
DRM_INFO("ib test succeeded in %u usecs\n", i);
} else {
DRM_ERROR("radeon: ib test failed (scratch(0x%04X)=0x%08X)\n",
DRM_ERROR("radeon: ib test failed (sracth(0x%04X)=0x%08X)\n",
scratch, tmp);
r = -EINVAL;
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/gpu/drm/radeon/radeon_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
*/
int radeon_driver_firstopen_kms(struct drm_device *dev)
{
struct radeon_device *rdev = dev->dev_private;

if (rdev->powered_down)
return -EINVAL;
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/ttm/ttm_bo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
INIT_LIST_HEAD(&fbo->lru);
INIT_LIST_HEAD(&fbo->swap);
fbo->vm_node = NULL;
atomic_set(&fbo->cpu_writers, 0);

fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj);
kref_init(&fbo->list_kref);
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/ttm/ttm_page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct ttm_page_pool {
spinlock_t lock;
bool fill_lock;
struct list_head list;
gfp_t gfp_flags;
int gfp_flags;
unsigned npages;
char *name;
unsigned long nfrees;
Expand Down Expand Up @@ -475,7 +475,7 @@ static void ttm_handle_caching_state_failure(struct list_head *pages,
* This function is reentrant if caller updates count depending on number of
* pages returned in pages array.
*/
static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags,
static int ttm_alloc_new_pages(struct list_head *pages, int gfp_flags,
int ttm_flags, enum ttm_caching_state cstate, unsigned count)
{
struct page **caching_array;
Expand Down Expand Up @@ -666,7 +666,7 @@ int ttm_get_pages(struct list_head *pages, int flags,
{
struct ttm_page_pool *pool = ttm_get_pool(flags, cstate);
struct page *p = NULL;
gfp_t gfp_flags = GFP_USER;
int gfp_flags = GFP_USER;
int r;

/* set zero flag for page allocation if required */
Expand Down Expand Up @@ -818,7 +818,7 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages)
return 0;
}

void ttm_page_alloc_fini(void)
void ttm_page_alloc_fini()
{
int i;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/gpu/vga/vgaarb.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ static inline void vga_update_device_decodes(struct vga_device *vgadev,
pr_debug("vgaarb: decoding count now is: %d\n", vga_decode_count);
}

static void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace)
void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace)
{
struct vga_device *vgadev;
unsigned long flags;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/ti-st/st.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@ struct st_proto_s {
extern long st_register(struct st_proto_s *);
extern long st_unregister(enum proto_type);

extern struct platform_device *st_get_plat_device(void);
#endif /* ST_H */
Loading

0 comments on commit f5177c8

Please sign in to comment.