Skip to content

Commit

Permalink
Merge branch 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/deller/parisc-linux

Pull second round of PARISC updates from Helge Deller:
 "The most important fix in this branch is the switch of io_setup,
  io_getevents and io_submit syscalls to use the available compat
  syscalls when running 32bit userspace on 64bit kernel.  Other than
  that it's mostly removal of compile warnings."

* 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: fix redefinition of SET_PERSONALITY
  parisc: do not install modules when installing kernel
  parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)
  parisc: check return value of down_interruptible() in hp_sdc_rtc.c
  parisc: avoid unitialized variable warning in pa_memcpy()
  parisc: remove unused variable 'compat_val'
  parisc: switch to compat_functions of io_setup, io_getevents and io_submit
  parisc: select ARCH_WANT_FRAME_POINTERS
  • Loading branch information
torvalds committed Mar 3, 2013
2 parents 8fd5e7a + cf8e18e commit 6977c6f
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions arch/parisc/Kconfig
Expand Up @@ -5,6 +5,7 @@ config PARISC
select HAVE_FUNCTION_TRACER if 64BIT
select HAVE_FUNCTION_GRAPH_TRACER if 64BIT
select HAVE_FUNCTION_TRACE_MCOUNT_TEST if 64BIT
select ARCH_WANT_FRAME_POINTERS
select RTC_CLASS
select RTC_DRV_GENERIC
select INIT_ALL_POSSIBLE
Expand Down
4 changes: 1 addition & 3 deletions arch/parisc/Makefile
Expand Up @@ -113,12 +113,10 @@ palo: vmlinux
# Shorthands for known targets not supported by parisc, use vmlinux as default
Image zImage bzImage: vmlinux

kernel_install: vmlinux
install: vmlinux
sh $(src)/arch/parisc/install.sh \
$(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"

install: kernel_install modules_install

CLEAN_FILES += lifimage
MRPROPER_FILES += palo.conf

Expand Down
4 changes: 2 additions & 2 deletions arch/parisc/include/asm/atomic.h
Expand Up @@ -115,8 +115,8 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
}


#define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v))))
#define atomic_sub(i,v) ((void)(__atomic_add_return(-(i),(v))))
#define atomic_add(i,v) ((void)(__atomic_add_return( (i),(v))))
#define atomic_sub(i,v) ((void)(__atomic_add_return(-((int) (i)),(v))))
#define atomic_inc(v) ((void)(__atomic_add_return( 1,(v))))
#define atomic_dec(v) ((void)(__atomic_add_return( -1,(v))))

Expand Down
1 change: 1 addition & 0 deletions arch/parisc/kernel/binfmt_elf32.c
Expand Up @@ -85,6 +85,7 @@ struct elf_prpsinfo32
* could set a processor dependent flag in the thread_struct.
*/

#undef SET_PERSONALITY
#define SET_PERSONALITY(ex) \
set_thread_flag(TIF_32BIT); \
current->thread.map_base = DEFAULT_MAP_BASE32; \
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/signal.c
Expand Up @@ -242,7 +242,6 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
unsigned long haddr, sigframe_size;
int err = 0;
#ifdef CONFIG_64BIT
compat_int_t compat_val;
struct compat_rt_sigframe __user * compat_frame;
compat_sigset_t compat_set;
#endif
Expand Down
6 changes: 3 additions & 3 deletions arch/parisc/kernel/syscall_table.S
Expand Up @@ -310,10 +310,10 @@
ENTRY_COMP(sched_getaffinity)
ENTRY_SAME(ni_syscall) /* set_thread_area */
ENTRY_SAME(ni_syscall) /* get_thread_area */
ENTRY_SAME(io_setup) /* 215 */
ENTRY_COMP(io_setup) /* 215 */
ENTRY_SAME(io_destroy)
ENTRY_SAME(io_getevents)
ENTRY_SAME(io_submit)
ENTRY_COMP(io_getevents)
ENTRY_COMP(io_submit)
ENTRY_SAME(io_cancel)
ENTRY_SAME(alloc_hugepages) /* 220 */
ENTRY_SAME(free_hugepages)
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/lib/memcpy.c
Expand Up @@ -68,7 +68,7 @@
DECLARE_PER_CPU(struct exception_data, exception_data);

#define preserve_branch(label) do { \
volatile int dummy; \
volatile int dummy = 0; \
/* The following branch is never taken, it's just here to */ \
/* prevent gcc from optimizing away our exception code. */ \
if (unlikely(dummy != dummy)) \
Expand Down
15 changes: 12 additions & 3 deletions drivers/input/misc/hp_sdc_rtc.c
Expand Up @@ -109,7 +109,9 @@ static int hp_sdc_rtc_do_read_bbrtc (struct rtc_time *rtctm)

if (hp_sdc_enqueue_transaction(&t)) return -1;

down_interruptible(&tsem); /* Put ourselves to sleep for results. */
/* Put ourselves to sleep for results. */
if (WARN_ON(down_interruptible(&tsem)))
return -1;

/* Check for nonpresence of BBRTC */
if (!((tseq[83] | tseq[90] | tseq[69] | tseq[76] |
Expand Down Expand Up @@ -176,11 +178,16 @@ static int64_t hp_sdc_rtc_read_i8042timer (uint8_t loadcmd, int numreg)
t.seq = tseq;
t.act.semaphore = &i8042tregs;

down_interruptible(&i8042tregs); /* Sleep if output regs in use. */
/* Sleep if output regs in use. */
if (WARN_ON(down_interruptible(&i8042tregs)))
return -1;

if (hp_sdc_enqueue_transaction(&t)) return -1;

down_interruptible(&i8042tregs); /* Sleep until results come back. */
/* Sleep until results come back. */
if (WARN_ON(down_interruptible(&i8042tregs)))
return -1;

up(&i8042tregs);

return (tseq[5] |
Expand Down Expand Up @@ -276,6 +283,7 @@ static inline int hp_sdc_rtc_read_ct(struct timeval *res) {
}


#if 0 /* not used yet */
/* Set the i8042 real-time clock */
static int hp_sdc_rtc_set_rt (struct timeval *setto)
{
Expand Down Expand Up @@ -386,6 +394,7 @@ static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
}
return 0;
}
#endif

static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) {
Expand Down

0 comments on commit 6977c6f

Please sign in to comment.