All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for 2.6.23] [0/3] More last minute bug fixes for x86
@ 2007-09-11 12:02 Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [1/3] x86_64: Add missing mask operation to vdso Andi Kleen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andi Kleen @ 2007-09-11 12:02 UTC (permalink / raw)
  To: torvalds, patches, linux-kernel


Linus,

Some more x86 bug fixes for .23rc6

- Fix the infamous "5 minutes" vdso problem on 32bit HPET with new glibc
- Error handling fix in cpuid4 handling (Jan Beulich) 
- Fix leak of ../kernel out of build dir (Ben LaHaise & Sam Ravnborg) 

Please merge.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH for 2.6.23] [1/3] x86_64: Add missing mask operation to vdso
  2007-09-11 12:02 [PATCH for 2.6.23] [0/3] More last minute bug fixes for x86 Andi Kleen
@ 2007-09-11 12:02 ` Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [3/3] i386: Fix leak of ../kernel from top level Andi Kleen
  2 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2007-09-11 12:02 UTC (permalink / raw)
  To: cebbert, torvalds, patches, linux-kernel


vdso vgetns() didn't mask the time source offset calculation, which could
lead to time problems with 32bit HPET. Add the masking.

Thanks to Chuck Ebbert for tracking down.

Cc: cebbert@redhat.com

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/arch/x86_64/vdso/vclock_gettime.c
===================================================================
--- linux.orig/arch/x86_64/vdso/vclock_gettime.c
+++ linux/arch/x86_64/vdso/vclock_gettime.c
@@ -34,10 +34,11 @@ static long vdso_fallback_gettime(long c
 
 static inline long vgetns(void)
 {
+	long v;
 	cycles_t (*vread)(void);
 	vread = gtod->clock.vread;
-	return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
-		gtod->clock.shift;
+	v = (vread() - gtod->clock.cycle_last) & gtod->clock.mask;
+	return (v * gtod->clock.mult) >> gtod->clock.shift;
 }
 
 static noinline int do_realtime(struct timespec *ts)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
  2007-09-11 12:02 [PATCH for 2.6.23] [0/3] More last minute bug fixes for x86 Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [1/3] x86_64: Add missing mask operation to vdso Andi Kleen
@ 2007-09-11 12:02 ` Andi Kleen
  2007-09-13  9:32   ` Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [3/3] i386: Fix leak of ../kernel from top level Andi Kleen
  2 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2007-09-11 12:02 UTC (permalink / raw)
  To: venkatesh.pallipadi, ashok.raj, akinobu.mita, torvalds, patches,
	linux-kernel


AK: Removed the unlikelies because gcc heuristics default to unlikely for test
AK: == NULL and for negative returns.

Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/arch/i386/kernel/cpu/intel_cacheinfo.c
===================================================================
--- linux.orig/arch/i386/kernel/cpu/intel_cacheinfo.c
+++ linux/arch/i386/kernel/cpu/intel_cacheinfo.c
@@ -515,7 +515,7 @@ static int __cpuinit detect_cache_attrib
 
 	cpuid4_info[cpu] = kzalloc(
 	    sizeof(struct _cpuid4_info) * num_cache_leaves, GFP_KERNEL);
-	if (unlikely(cpuid4_info[cpu] == NULL))
+	if (cpuid4_info[cpu] == NULL)
 		return -ENOMEM;
 
 	oldmask = current->cpus_allowed;
@@ -748,6 +748,8 @@ static void __cpuinit cache_remove_dev(s
 	unsigned int cpu = sys_dev->id;
 	unsigned long i;
 
+	if (cpuid4_info[cpu] == NULL)
+		return;
 	for (i = 0; i < num_cache_leaves; i++) {
 		cache_remove_shared_cpu_map(cpu, i);
 		kobject_unregister(&(INDEX_KOBJECT_PTR(cpu,i)->kobj));

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH for 2.6.23] [3/3] i386: Fix leak of ../kernel from top level
  2007-09-11 12:02 [PATCH for 2.6.23] [0/3] More last minute bug fixes for x86 Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [1/3] x86_64: Add missing mask operation to vdso Andi Kleen
  2007-09-11 12:02 ` [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed Andi Kleen
@ 2007-09-11 12:02 ` Andi Kleen
  2 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2007-09-11 12:02 UTC (permalink / raw)
  To: sam, bcrl, torvalds, patches, linux-kernel


Fix a compile error when the directory above the kernel source contains
a file named "kernel". Originally from Ben La Haise, modified based
on feedback from Sam Ravnborg

Cc: sam@ravnborg.org
Cc: bcrl@kvack.org

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/arch/i386/mach-generic/Makefile
===================================================================
--- linux.orig/arch/i386/mach-generic/Makefile
+++ linux/arch/i386/mach-generic/Makefile
@@ -2,6 +2,6 @@
 # Makefile for the generic architecture
 #
 
-EXTRA_CFLAGS	+= -I../kernel
+EXTRA_CFLAGS	:= -Iarch/i386/kernel
 
 obj-y				:= probe.o summit.o bigsmp.o es7000.o default.o ../mach-es7000/
Index: linux/arch/i386/mach-voyager/Makefile
===================================================================
--- linux.orig/arch/i386/mach-voyager/Makefile
+++ linux/arch/i386/mach-voyager/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-EXTRA_CFLAGS	+= -I../kernel
+EXTRA_CFLAGS	:= -Iarch/i386/kernel
 obj-y			:= setup.o voyager_basic.o voyager_thread.o
 
 obj-$(CONFIG_SMP)	+= voyager_smp.o voyager_cat.o

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
  2007-09-11 12:02 ` [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed Andi Kleen
@ 2007-09-13  9:32   ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2007-09-13  9:32 UTC (permalink / raw)
  To: venkatesh.pallipadi
  Cc: ashok.raj, akinobu.mita, torvalds, patches, linux-kernel,
	jbeulich

Andi Kleen <ak@suse.de> writes:

> AK: Removed the unlikelies because gcc heuristics default to unlikely for tes
> AK: == NULL and for negative returns.

This patch was actually from Jan Beulich, but somehow the attribution
got dropped. Sorry for that.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-13  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11 12:02 [PATCH for 2.6.23] [0/3] More last minute bug fixes for x86 Andi Kleen
2007-09-11 12:02 ` [PATCH for 2.6.23] [1/3] x86_64: Add missing mask operation to vdso Andi Kleen
2007-09-11 12:02 ` [PATCH for 2.6.23] [2/3] x86_64: Prevent doing anything from cache_remove_dev() when info setup failed Andi Kleen
2007-09-13  9:32   ` Andi Kleen
2007-09-11 12:02 ` [PATCH for 2.6.23] [3/3] i386: Fix leak of ../kernel from top level Andi Kleen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.