From 4530c49e6d609d3c90519df61a4e86ee039439c2 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 27 Feb 2013 00:37:12 +0100 Subject: parisc: select ARCH_WANT_FRAME_POINTERS Avoid the following warning when configuring the kernel for parisc: warning: (LOCKDEP && FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK) selects FRAME_POINTER \ which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || \ BLACKFIN || MN10300) || ARCH_WANT_FRAME_POINTERS) Signed-off-by: Helge Deller --- arch/parisc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 4d5ea7648574..ed8be2366685 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -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 -- cgit v1.2.3 From 48139f8695b19bdd9f045b368ed342cddc4a3cee Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 27 Feb 2013 00:32:10 +0100 Subject: parisc: switch to compat_functions of io_setup, io_getevents and io_submit Signed-off-by: Helge Deller --- arch/parisc/kernel/syscall_table.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index fc9cab1cc2df..a410b1b71303 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S @@ -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) -- cgit v1.2.3 From 850df98434b91d5f3c2e9e13f45c78c4304a45b1 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 27 Feb 2013 00:02:31 +0100 Subject: parisc: remove unused variable 'compat_val' clean up after commit 6e26aab98ce8a818fb1ec47f8f727a8480a9011b (switch to generic sigaltstack) Signed-off-by: Helge Deller --- arch/parisc/kernel/signal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 98e9e7126565..940188d1942c 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -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 -- cgit v1.2.3 From d8d0524a39056dbdafece1ed65ae51afc711c8b5 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 27 Feb 2013 00:06:48 +0100 Subject: parisc: avoid unitialized variable warning in pa_memcpy() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid this warning, while still prevent gcc from optimizing away the exception code: arch/parisc/lib/memcpy.c: In function ‘pa_memcpy’: arch/parisc/lib/memcpy.c:256:2: warning: ‘dummy’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Helge Deller --- arch/parisc/lib/memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index 1dbca5c31b3c..a49cc812df8a 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c @@ -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)) \ -- cgit v1.2.3 From 15fb9683c3e4eb1f8c6c982079a806b3894c2ba0 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Wed, 27 Feb 2013 22:46:56 +0100 Subject: parisc: check return value of down_interruptible() in hp_sdc_rtc.c additionally comment out unused code (which may be used later) Signed-off-by: Helge Deller --- drivers/input/misc/hp_sdc_rtc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 0b4f54265f62..2e3334b8f82d 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c @@ -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] | @@ -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] | @@ -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) { @@ -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) { -- cgit v1.2.3 From 8527ed4a7086e7312b8d021ea36d367f7e378c2e Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Sat, 2 Mar 2013 20:01:05 +0100 Subject: parisc: fix compile warnings triggered by atomic_sub(sizeof(),v) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes compile warnings like this one: net/ipv4/igmp.c: In function ‘ip_mc_leave_group’: net/ipv4/igmp.c:1898:3: warning: overflow in implicit constant conversion [-Woverflow] atomic_sub() is defined as __atomic_add_return(-(VAL),(v)))) and if VAL is of type unsigned int (as returned by sizeof()), negating this value will overflow. Fix this by type-casting VAL to int type. Signed-off-by: Helge Deller --- arch/parisc/include/asm/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h index af9cf30ed474..f38e1984b242 100644 --- a/arch/parisc/include/asm/atomic.h +++ b/arch/parisc/include/asm/atomic.h @@ -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)))) -- cgit v1.2.3 From 1905b7716cb61feeca79da320be4d8968495bb31 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 1 Mar 2013 22:23:11 +0000 Subject: parisc: do not install modules when installing kernel PA-RISC is the only arch that installs the modules when installing the kernel. Signed-off-by: Rolf Eike Beer Signed-off-by: Helge Deller --- arch/parisc/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index ed9a14ccd066..01d95e2f0581 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -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 -- cgit v1.2.3 From cf8e18ea2f8be26e8f9e44ed677d25f558ca301a Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Sat, 2 Mar 2013 20:15:28 +0100 Subject: parisc: fix redefinition of SET_PERSONALITY commit e72837e3e7bae3f182c4ac63c9424e86f1158dd0 introduced a default SET_PERSONALITY() in include/linux/elf.h. This breaks with our own SET_PERSONALITY define for 32bit userspace on 64bit kernel. Signed-off-by: Helge Deller --- arch/parisc/kernel/binfmt_elf32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/parisc/kernel/binfmt_elf32.c b/arch/parisc/kernel/binfmt_elf32.c index f61692d2b557..00dc66f9c2ba 100644 --- a/arch/parisc/kernel/binfmt_elf32.c +++ b/arch/parisc/kernel/binfmt_elf32.c @@ -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; \ -- cgit v1.2.3