Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177996
b: refs/heads/master
c: 70ee951
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Dec 18, 2009
1 parent 902138f commit ae2fe51
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 30 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: b4c30aad39805902cf5b855aa8a8b22d728ad057
refs/heads/master: 70ee9518cfc8baec618e69e4ef22566dcb2f29d3
3 changes: 2 additions & 1 deletion trunk/arch/s390/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@
#define __NR_pwritev 329
#define __NR_rt_tgsigqueueinfo 330
#define __NR_perf_event_open 331
#define NR_syscalls 332
#define __NR_recvmmsg 332
#define NR_syscalls 333

/*
* There are some system calls that are not present on 64 bit, some
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/s390/kernel/compat_wrapper.S
Original file line number Diff line number Diff line change
Expand Up @@ -1853,3 +1853,12 @@ sys32_execve_wrapper:
llgtr %r3,%r3 # compat_uptr_t *
llgtr %r4,%r4 # compat_uptr_t *
jg sys32_execve # branch to system call

.globl compat_sys_recvmmsg_wrapper
compat_sys_recvmmsg_wrapper:
lgfr %r2,%r2 # int
llgtr %r3,%r3 # struct compat_mmsghdr *
llgfr %r4,%r4 # unsigned int
llgfr %r5,%r5 # unsigned int
llgtr %r6,%r6 # struct compat_timespec *
jg compat_sys_recvmmsg
1 change: 1 addition & 0 deletions trunk/arch/s390/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,4 @@ SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper)
SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper)
SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */
SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper)
SYSCALL(sys_recvmmsg,sys_recvmmsg,compat_sys_recvmmsg_wrapper)
2 changes: 1 addition & 1 deletion trunk/drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ config ALIM7101_WDT

config GEODE_WDT
tristate "AMD Geode CS5535/CS5536 Watchdog"
depends on CS5535_MFGPT
depends on MGEODE_LX
help
This driver enables a watchdog capability built into the
CS5535/CS5536 companion chips for the AMD Geode GX and LX
Expand Down
40 changes: 21 additions & 19 deletions trunk/drivers/watchdog/geodewdt.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Watchdog timer for machines with the CS5535/CS5536 companion chip
/* Watchdog timer for the Geode GX/LX with the CS5535/CS5536 companion chip
*
* Copyright (C) 2006-2007, Advanced Micro Devices, Inc.
* Copyright (C) 2009 Andres Salomon <dilinger@collabora.co.uk>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -20,7 +19,7 @@
#include <linux/reboot.h>
#include <linux/uaccess.h>

#include <linux/cs5535.h>
#include <asm/geode.h>

#define GEODEWDT_HZ 500
#define GEODEWDT_SCALE 6
Expand All @@ -47,36 +46,36 @@ MODULE_PARM_DESC(nowayout,

static struct platform_device *geodewdt_platform_device;
static unsigned long wdt_flags;
static struct cs5535_mfgpt_timer *wdt_timer;
static int wdt_timer;
static int safe_close;

static void geodewdt_ping(void)
{
/* Stop the counter */
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);

/* Reset the counter */
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);

/* Enable the counter */
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
}

static void geodewdt_disable(void)
{
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
}

static int geodewdt_set_heartbeat(int val)
{
if (val < 1 || val > GEODEWDT_MAX_SECONDS)
return -EINVAL;

cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ);
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ);
geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);

timeout = val;
return 0;
Expand Down Expand Up @@ -216,25 +215,28 @@ static struct miscdevice geodewdt_miscdev = {

static int __devinit geodewdt_probe(struct platform_device *dev)
{
int ret;
int ret, timer;

timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);

wdt_timer = cs5535_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);
if (!wdt_timer) {
if (timer == -1) {
printk(KERN_ERR "geodewdt: No timers were available\n");
return -ENODEV;
}

wdt_timer = timer;

/* Set up the timer */

cs5535_mfgpt_write(wdt_timer, MFGPT_REG_SETUP,
geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP,
GEODEWDT_SCALE | (3 << 8));

/* Set up comparator 2 to reset when the event fires */
cs5535_mfgpt_toggle_event(wdt_timer, MFGPT_CMP2, MFGPT_EVENT_RESET, 1);
geode_mfgpt_toggle_event(wdt_timer, MFGPT_CMP2, MFGPT_EVENT_RESET, 1);

/* Set up the initial timeout */

cs5535_mfgpt_write(wdt_timer, MFGPT_REG_CMP2,
geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2,
timeout * GEODEWDT_HZ);

ret = misc_register(&geodewdt_miscdev);
Expand Down
13 changes: 5 additions & 8 deletions trunk/kernel/audit_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static void untag_chunk(struct node *p)
owner->root = NULL;
}

for (i = j = 0; j <= size; i++, j++) {
for (i = j = 0; i < size; i++, j++) {
struct audit_tree *s;
if (&chunk->owners[j] == p) {
list_del_init(&p->list);
Expand All @@ -290,7 +290,7 @@ static void untag_chunk(struct node *p)
if (!s) /* result of earlier fallback */
continue;
get_tree(s);
list_replace_init(&chunk->owners[j].list, &new->owners[i].list);
list_replace_init(&chunk->owners[i].list, &new->owners[j].list);
}

list_replace_rcu(&chunk->hash, &new->hash);
Expand Down Expand Up @@ -373,17 +373,15 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
for (n = 0; n < old->count; n++) {
if (old->owners[n].owner == tree) {
spin_unlock(&hash_lock);
put_inotify_watch(&old->watch);
put_inotify_watch(watch);
return 0;
}
}
spin_unlock(&hash_lock);

chunk = alloc_chunk(old->count + 1);
if (!chunk) {
put_inotify_watch(&old->watch);
if (!chunk)
return -ENOMEM;
}

mutex_lock(&inode->inotify_mutex);
if (inotify_clone_watch(&old->watch, &chunk->watch) < 0) {
Expand Down Expand Up @@ -427,8 +425,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
spin_unlock(&hash_lock);
inotify_evict_watch(&old->watch);
mutex_unlock(&inode->inotify_mutex);
put_inotify_watch(&old->watch); /* pair to inotify_find_watch */
put_inotify_watch(&old->watch); /* and kill it */
put_inotify_watch(&old->watch);
return 0;
}

Expand Down

0 comments on commit ae2fe51

Please sign in to comment.