Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262435
b: refs/heads/master
c: 5fdb324
h: refs/heads/master
i:
  262433: 21cfe94
  262431: bb23857
v: v3
  • Loading branch information
Linus Torvalds committed Aug 5, 2011
1 parent a64fe61 commit aa81586
Show file tree
Hide file tree
Showing 49 changed files with 615 additions and 425 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: 0302899e144296d6ce8cb3679a9a42d5c6436910
refs/heads/master: 5fdb32472ec6cd1d62788d8872585b342b5d1d92
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void cpu_idle(void)
cpu_relax();
} else {
stop_critical_timings();
if (cpuidle_call_idle())
if (cpuidle_idle_call())
pm_idle();
start_critical_timings();
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ prefix##_get_next_variable (unsigned long *name_size, efi_char16_t *name, \
#define STUB_SET_VARIABLE(prefix, adjust_arg) \
static efi_status_t \
prefix##_set_variable (efi_char16_t *name, efi_guid_t *vendor, \
unsigned long attr, unsigned long data_size, \
u32 attr, unsigned long data_size, \
void *data) \
{ \
struct ia64_fpreg fr[6]; \
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/parisc/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)

#define ATOMIC64_INIT(i) ((atomic64_t) { (i) })

static __inline__ int
static __inline__ s64
__atomic64_add_return(s64 i, atomic64_t *v)
{
int ret;
s64 ret;
unsigned long flags;
_atomic_spin_lock_irqsave(v, flags);

Expand Down
66 changes: 60 additions & 6 deletions trunk/arch/parisc/include/asm/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@

#include <linux/futex.h>
#include <linux/uaccess.h>
#include <asm/atomic.h>
#include <asm/errno.h>

static inline int
futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
{
unsigned long int flags;
u32 val;
int op = (encoded_op >> 28) & 7;
int cmp = (encoded_op >> 24) & 15;
int oparg = (encoded_op << 8) >> 20;
Expand All @@ -18,21 +21,58 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
oparg = 1 << oparg;

if (! access_ok (VERIFY_WRITE, uaddr, sizeof(u32)))
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr)))
return -EFAULT;

pagefault_disable();

_atomic_spin_lock_irqsave(uaddr, flags);

switch (op) {
case FUTEX_OP_SET:
/* *(int *)UADDR2 = OPARG; */
ret = get_user(oldval, uaddr);
if (!ret)
ret = put_user(oparg, uaddr);
break;
case FUTEX_OP_ADD:
/* *(int *)UADDR2 += OPARG; */
ret = get_user(oldval, uaddr);
if (!ret) {
val = oldval + oparg;
ret = put_user(val, uaddr);
}
break;
case FUTEX_OP_OR:
/* *(int *)UADDR2 |= OPARG; */
ret = get_user(oldval, uaddr);
if (!ret) {
val = oldval | oparg;
ret = put_user(val, uaddr);
}
break;
case FUTEX_OP_ANDN:
/* *(int *)UADDR2 &= ~OPARG; */
ret = get_user(oldval, uaddr);
if (!ret) {
val = oldval & ~oparg;
ret = put_user(val, uaddr);
}
break;
case FUTEX_OP_XOR:
/* *(int *)UADDR2 ^= OPARG; */
ret = get_user(oldval, uaddr);
if (!ret) {
val = oldval ^ oparg;
ret = put_user(val, uaddr);
}
break;
default:
ret = -ENOSYS;
}

_atomic_spin_unlock_irqrestore(uaddr, flags);

pagefault_enable();

if (!ret) {
Expand All @@ -54,7 +94,9 @@ static inline int
futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
u32 oldval, u32 newval)
{
int ret;
u32 val;
unsigned long flags;

/* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
* our gateway page, and causes no end of trouble...
Expand All @@ -65,12 +107,24 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
return -EFAULT;

if (get_user(val, uaddr))
return -EFAULT;
if (val == oldval && put_user(newval, uaddr))
return -EFAULT;
/* HPPA has no cmpxchg in hardware and therefore the
* best we can do here is use an array of locks. The
* lock selected is based on a hash of the userspace
* address. This should scale to a couple of CPUs.
*/

_atomic_spin_lock_irqsave(uaddr, flags);

ret = get_user(val, uaddr);

if (!ret && val == oldval)
ret = put_user(newval, uaddr);

*uval = val;
return 0;

_atomic_spin_unlock_irqrestore(uaddr, flags);

return ret;
}

#endif /*__KERNEL__*/
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/parisc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,9 @@
#define __NR_open_by_handle_at (__NR_Linux + 326)
#define __NR_syncfs (__NR_Linux + 327)
#define __NR_setns (__NR_Linux + 328)
#define __NR_sendmmsg (__NR_Linux + 329)

#define __NR_Linux_syscalls (__NR_setns + 1)
#define __NR_Linux_syscalls (__NR_sendmmsg + 1)


#define __IGNORE_select /* newselect */
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/parisc/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@
ENTRY_COMP(open_by_handle_at)
ENTRY_SAME(syncfs)
ENTRY_SAME(setns)
ENTRY_COMP(sendmmsg)

/* Nothing yet */

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ config MARCH_Z10
on older machines.

config MARCH_Z196
bool "IBM zEnterprise 196"
bool "IBM zEnterprise 114 and 196"
help
Select this to enable optimizations for IBM zEnterprise 196
(2817 series). The kernel will be slightly faster but will not work
on older machines.
Select this to enable optimizations for IBM zEnterprise 114 and 196
(2818 and 2817 series). The kernel will be slightly faster but will
not work on older machines.

endchoice

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/include/asm/ipl.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,6 @@ enum diag308_rc {
};

extern int diag308(unsigned long subcode, void *addr);
extern void diag308_reset(void);

#endif /* _ASM_S390_IPL_H */
11 changes: 9 additions & 2 deletions trunk/arch/s390/include/asm/lowcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void system_call(void);
void pgm_check_handler(void);
void mcck_int_handler(void);
void io_int_handler(void);
void psw_restart_int_handler(void);

#ifdef CONFIG_32BIT

Expand Down Expand Up @@ -150,7 +151,10 @@ struct _lowcore {
*/
__u32 ipib; /* 0x0e00 */
__u32 ipib_checksum; /* 0x0e04 */
__u8 pad_0x0e08[0x0f00-0x0e08]; /* 0x0e08 */

/* 64 bit save area */
__u64 save_area_64; /* 0x0e08 */
__u8 pad_0x0e10[0x0f00-0x0e10]; /* 0x0e10 */

/* Extended facility list */
__u64 stfle_fac_list[32]; /* 0x0f00 */
Expand Down Expand Up @@ -286,7 +290,10 @@ struct _lowcore {
*/
__u64 ipib; /* 0x0e00 */
__u32 ipib_checksum; /* 0x0e08 */
__u8 pad_0x0e0c[0x0f00-0x0e0c]; /* 0x0e0c */

/* 64 bit save area */
__u64 save_area_64; /* 0x0e0c */
__u8 pad_0x0e14[0x0f00-0x0e14]; /* 0x0e14 */

/* Extended facility list */
__u64 stfle_fac_list[32]; /* 0x0f00 */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/s390/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,12 @@ struct stack_frame {
* Do necessary setup to start up a new thread.
*/
#define start_thread(regs, new_psw, new_stackp) do { \
set_fs(USER_DS); \
regs->psw.mask = psw_user_bits; \
regs->psw.addr = new_psw | PSW_ADDR_AMODE; \
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 | PSW_ADDR_AMODE; \
regs->gprs[15] = new_stackp; \
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ extern void pfault_fini(void);

extern void cmma_init(void);
extern int memcpy_real(void *, void *, size_t);
extern void copy_to_absolute_zero(void *dest, void *src, size_t count);

#define finish_arch_switch(prev) do { \
set_fs(current->thread.mm_segment); \
Expand Down
10 changes: 4 additions & 6 deletions trunk/arch/s390/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ int main(void)
BLANK();
DEFINE(__TASK_pid, offsetof(struct task_struct, pid));
BLANK();
DEFINE(__THREAD_per_cause,
offsetof(struct task_struct, thread.per_event.cause));
DEFINE(__THREAD_per_address,
offsetof(struct task_struct, thread.per_event.address));
DEFINE(__THREAD_per_paid,
offsetof(struct task_struct, thread.per_event.paid));
DEFINE(__THREAD_per_cause, offsetof(struct task_struct, thread.per_event.cause));
DEFINE(__THREAD_per_address, offsetof(struct task_struct, thread.per_event.address));
DEFINE(__THREAD_per_paid, offsetof(struct task_struct, thread.per_event.paid));
BLANK();
DEFINE(__TI_task, offsetof(struct thread_info, task));
DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain));
Expand Down Expand Up @@ -142,6 +139,7 @@ int main(void)
DEFINE(__LC_FPREGS_SAVE_AREA, offsetof(struct _lowcore, floating_pt_save_area));
DEFINE(__LC_GPREGS_SAVE_AREA, offsetof(struct _lowcore, gpregs_save_area));
DEFINE(__LC_CREGS_SAVE_AREA, offsetof(struct _lowcore, cregs_save_area));
DEFINE(__LC_SAVE_AREA_64, offsetof(struct _lowcore, save_area_64));
#ifdef CONFIG_32BIT
DEFINE(SAVE_AREA_BASE, offsetof(struct _lowcore, extended_save_area_addr));
#else /* CONFIG_32BIT */
Expand Down
36 changes: 36 additions & 0 deletions trunk/arch/s390/kernel/base.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,42 @@ s390_base_pgm_handler_fn:
.quad 0
.previous

#
# Calls diag 308 subcode 1 and continues execution
#
# The following conditions must be ensured before calling this function:
# * Prefix register = 0
# * Lowcore protection is disabled
#
ENTRY(diag308_reset)
larl %r4,.Lctlregs # Save control registers
stctg %c0,%c15,0(%r4)
larl %r4,.Lrestart_psw # Setup restart PSW at absolute 0
lghi %r3,0
lg %r4,0(%r4) # Save PSW
sturg %r4,%r3 # Use sturg, because of large pages
lghi %r1,1
diag %r1,%r1,0x308
.Lrestart_part2:
lhi %r0,0 # Load r0 with zero
lhi %r1,2 # Use mode 2 = ESAME (dump)
sigp %r1,%r0,0x12 # Switch to ESAME mode
sam64 # Switch to 64 bit addressing mode
larl %r4,.Lctlregs # Restore control registers
lctlg %c0,%c15,0(%r4)
br %r14
.align 16
.Lrestart_psw:
.long 0x00080000,0x80000000 + .Lrestart_part2

.section .bss
.align 8
.Lctlregs:
.rept 16
.quad 0
.endr
.previous

#else /* CONFIG_64BIT */

ENTRY(s390_base_mcck_handler)
Expand Down
Loading

0 comments on commit aa81586

Please sign in to comment.