Skip to contentSkip to conversation

upcoming patches for 3.9

DISCUSSION Helge Deller 2 participants 10 messages Feb 27, 2013 – Mar 2, 2013

Subsystems (4)
lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

the following patches are queued in the "fixes-for-3.9" branch of my git tree at
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git

Helge

author maintainer
#1 lore raw

parisc: select ARCH_WANT_FRAME_POINTERS

commit 31a54684da3c14384168889035c54d5cb3c6d32a

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 00:37:12 2013 +0100

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)

arch/parisc/Kconfig +1 -0
index 7f9b3c5..313cce5 100644
@@ -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
author maintainer
#2 lore raw

parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)

In reply to Helge Deller

commit 4e5a5143e77add104aeee9cd6a92a2f89ab6edd6

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 00:14:56 2013 +0100

parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)

This fixes compile warnings like this one:
net/ipv4/igmp.c: In function =E2=80=98ip_mc_leave_group=E2=80=99:
net/ipv4/igmp.c:1898:3: warning: overflow in implicit constant conversi= on [-Woverflow]

atomic_sub() is defined as
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:

arch/parisc/include/asm= renamed from arch/parisc/include/asm/atomic.h +0 -0

/atomic.h
index af9cf30..f38e198 100644

arch/parisc/include/asm/atomic.h +0 -0
@@ -115,8 +115,8 @@ static __inline__ int __atomic_add_unless(atomic_t =

*v, int a, int u)
}
=20
=20
-#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))))
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Re: parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)

Quoted 3 lines · Helge Deller

atomic_sub() is defined as
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:

Something in the first line of the message seems missing.

Eike

author maintainer
#4 lore raw

Re: parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)

Quoted 7 lines · Rolf Eike Beer
Quoted 3 lines · Helge Deller

atomic_sub() is defined as
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:

Something in the first line of the message seems missing.

Oops...
This line:
#define atomic_sub(VAL,v) ((void)(__atomic_add_return(-(VAL),(v))))
is missing.
It was probably ignored by git am or was eaten by vi due to the "#" :-(

I'll fix that.

Thanks!
Helge

author maintainer
#5 lore raw

parisc: switch to compat_functions of io_setup, io_getevents and io_submit

In reply to Helge Deller

commit c58c540c25a4ae98e021876cb32afb7794428267

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 00:32:10 2013 +0100

parisc: switch to compat_functions of io_setup, io_getevents and io_submit

arch/parisc/kernel/syscall_table.S +3 -3
index fc9cab1..a410b1b 100644
@@ -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)
author maintainer
#6 lore raw

parisc: remove unused variable 'compat_val'

In reply to Helge Deller

commit db0c2fcccf9ea3dc30f6e3b910bca7f819fb3a21

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 00:02:31 2013 +0100

parisc: remove unused variable 'compat_val'

clean up after commit 6e26aab98ce8a818fb1ec47f8f727a8480a9011b (switch to generic sigaltstack)

arch/parisc/kernel/signal.c +0 -1
index 98e9e71..940188d 100644
@@ -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
author maintainer
#7 lore raw

parisc: avoid unitialized variable warning in pa_memcpy()

In reply to Helge Deller

commit eed0220c5b2f33e4da2e9ba207c798c1bdebe500

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 00:06:48 2013 +0100

parisc: avoid unitialized variable warning in pa_memcpy()

Avoid this warning, while still prevent gcc from optimizing away the ex= ception code:
arch/parisc/lib/memcpy.c: In function =E2=80=98pa_memcpy=E2=80=99:
arch/parisc/lib/memcpy.c:256:2: warning: =E2=80=98dummy=E2=80=99 may be=
used uninitialized in this function [-Wuninitialized]

arch/parisc/lib/memcpy.c +0 -0
index 1dbca5c..a49cc81 100644
@@ -68,7 +68,7 @@
 DECLARE_PER_CPU(struct exception_data, exception_data);

=20
#define preserve_branch(label) do { \
- volatile int dummy; \
+ volatile int dummy =3D 0; \
/* The following branch is never taken, it's just here to */ \
/* prevent gcc from optimizing away our exception code. */ \
if (unlikely(dummy !=3D dummy)) \
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#8 lore raw

parisc: check return value of down_interruptible() in hp_sdc_rtc.c

In reply to Helge Deller

commit 42dfe13d133f945b49377c29b8c828205b231b4c

Author: Helge Deller <[email protected]>
Date:   Wed Feb 27 22:46:56 2013 +0100

parisc: check return value of down_interruptible() in hp_sdc_rtc.c

additionally comment out unused code (which may be used later)

drivers/input/misc/hp_sdc_rtc.c +12 -3
index 0b4f542..2e3334b 100644
@@ -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) {
author maintainer
#9 lore raw

parisc: fix redefinition of SET_PERSONALITY

In reply to Helge Deller

commit cf8e18ea2f8be26e8f9e44ed677d25f558ca301a

Author: Helge Deller <[email protected]>
Date:   Sat Mar 2 20:15:28 2013 +0100

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.

arch/parisc/kernel/binfmt_elf32.c +1 -0
index f61692d..00dc66f 100644
@@ -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; \