Patches contributed by Eötvös Lorand University


commit f68ec0c24755e5cdb779be6240925f2175311d84
Merge: 98920dc3d111 94aca1dac6f6
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Oct 3 19:28:46 2008 +0200

    Merge commit 'v2.6.27-rc8' into x86/setup

commit 2ec2b482b10a1ed3493c224f1893cddd3d33833b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Oct 3 10:41:00 2008 +0200

    rcu: RCU-based detection of stalled CPUs for Classic RCU, fix
    
    fix the !CONFIG_RCU_CPU_STALL_DETECTOR path:
    
     kernel/rcuclassic.c: In function '__rcu_pending':
     kernel/rcuclassic.c:609: error: too few arguments to function 'check_cpu_stall'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c
index 0d07e6e51578..37f72e551542 100644
--- a/kernel/rcuclassic.c
+++ b/kernel/rcuclassic.c
@@ -239,7 +239,7 @@ static void record_gp_stall_check_time(struct rcu_ctrlblk *rcp)
 {
 }
 
-static void check_cpu_stall(struct rcu_ctrlblk *rcp, struct rcu_data *rdp)
+static inline void check_cpu_stall(struct rcu_ctrlblk *rcp)
 {
 }
 

commit b5259d944279d0b7e78a83849a352d8ba0447c4c
Merge: 1c50b728c3e7 94aca1dac6f6
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Oct 3 10:34:36 2008 +0200

    Merge commit 'v2.6.27-rc8' into core/rcu

commit d6d5aeb661fc14655c417f3582ae7ec52985d2a8
Merge: 7e6e178ab154 94aca1dac6f6
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Oct 2 10:21:26 2008 +0200

    Merge commit 'v2.6.27-rc8' into genirq

commit 24268245d8ba9270152b2281666099ddc8ca389d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Oct 1 08:59:40 2008 +0200

    x86: add PCI IDs for AMD Barcelona PCI devices
    
    Signed-off-by: Robert Richter <robert.richter@amd.com>
    Cc: oprofile-list <oprofile-list@lists.sourceforge.net>
    Cc: Barry Kasindorf <barry.kasindorf@amd.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 2886b0eb53ec..c114103af987 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -497,6 +497,11 @@
 #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP	0x1101
 #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL	0x1102
 #define PCI_DEVICE_ID_AMD_K8_NB_MISC	0x1103
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_11H_NB_HT	0x1300
 #define PCI_DEVICE_ID_AMD_11H_NB_MAP	0x1301
 #define PCI_DEVICE_ID_AMD_11H_NB_DRAM	0x1302

commit 0d15504f16f68725e4635aa85411015d1c573b0a
Merge: 59293c8ad547 f78e80209cf1
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Sep 30 12:19:41 2008 +0200

    Merge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into oprofile
    
    Conflicts:
            arch/x86/oprofile/nmi_int.c
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 59293c8ad54726150cf6178164311b004d615ce4
Merge: 45f197ade73b 94aca1dac6f6
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Sep 30 12:16:26 2008 +0200

    Merge commit 'v2.6.27-rc8' into oprofile
    
    Conflicts:
            arch/x86/oprofile/nmi_int.c
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc arch/x86/oprofile/nmi_int.c
index 4108d02c5292,8a5f1614a3d5..114df508b407
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@@ -31,10 -29,8 +32,10 @@@ static DEFINE_PER_CPU(unsigned long, sa
  
  static int nmi_start(void);
  static void nmi_stop(void);
+ static void nmi_cpu_start(void *dummy);
+ static void nmi_cpu_stop(void *dummy);
 +static void nmi_cpu_save_mpx_registers(struct op_msrs *msrs);
 +static void nmi_cpu_restore_mpx_registers(struct op_msrs *msrs);
- static void nmi_cpu_stop(void *dummy);
- static void nmi_cpu_start(void *dummy);
  
  /* 0 == registered but off, 1 == registered and on */
  static int nmi_enabled = 0;
@@@ -550,8 -490,11 +576,11 @@@ int __init op_nmi_init(struct oprofile_
  		return -ENODEV;
  	}
  
 -	init_sysfs();
+ #ifdef CONFIG_SMP
+ 	register_cpu_notifier(&oprofile_cpu_nb);
+ #endif
 -	using_nmi = 1;
 +	/* default values, can be overwritten by model */
 +	__raw_get_cpu_var(switch_index) = 0;
  	ops->create_files = nmi_create_files;
  	ops->setup = nmi_setup;
  	ops->shutdown = nmi_shutdown;
@@@ -573,8 -507,10 +602,12 @@@
  
  void op_nmi_exit(void)
  {
- 	if (using_nmi)
+ 	if (using_nmi) {
  		exit_sysfs();
+ #ifdef CONFIG_SMP
+ 		unregister_cpu_notifier(&oprofile_cpu_nb);
+ #endif
 +	if (model->exit)
 +		model->exit();
+ 	}
  }

commit 1508487e7f16d992ad23cabd3712563ff912f413
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Sep 30 08:28:17 2008 +0200

    timers: fix itimer/many thread hang, fix
    
    fix bogus rq dereference: v3 removed the locking but also removed the rq
    initialization.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/sched.c b/kernel/sched.c
index 29a3152c45db..ebb03def564b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4042,10 +4042,12 @@ EXPORT_PER_CPU_SYMBOL(kstat);
  */
 unsigned long long task_delta_exec(struct task_struct *p)
 {
-	struct rq *rq;
 	unsigned long flags;
+	struct rq *rq;
 	u64 ns = 0;
 
+	rq = task_rq_lock(p, &flags);
+
 	if (task_current(rq, p)) {
 		u64 delta_exec;
 
@@ -4055,6 +4057,8 @@ unsigned long long task_delta_exec(struct task_struct *p)
 			ns = delta_exec;
 	}
 
+	task_rq_unlock(rq, &flags);
+
 	return ns;
 }
 

commit 15160716eea5591eb31f40fd4dba56d83bea4209
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Sep 26 11:40:53 2008 +0200

    x86, pci-hotplug, calgary / rio: fix EBDA ioremap()
    
    IO resource and ioremap debugging uncovered this ioremap() done
    by drivers/pci/hotplug/ibmphp_ebda.c:
    
    initcall pci_hotplug_init+0x0/0x41 returned 0 after 3 msecs
    calling  ibmphp_init+0x0/0x360 @ 1
    ibmphpd: IBM Hot Plug PCI Controller Driver version: 0.6
    resource map sanity check conflict: 0x9f800 0xaf5e7 0x9f800 0x9ffff reserved
    ------------[ cut here ]------------
    WARNING: at arch/x86/mm/ioremap.c:175 __ioremap_caller+0x5c/0x226()
    Pid: 1, comm: swapper Not tainted 2.6.27-rc7-tip-00914-g347b10f-dirty #36038
     [<c013a72d>] warn_on_slowpath+0x41/0x68
     [<c0156f00>] ? __lock_acquire+0x9ba/0xa7f
     [<c012158c>] ? do_flush_tlb_all+0x0/0x59
     [<c015ac31>] ? smp_call_function_mask+0x74/0x17d
     [<c012158c>] ? do_flush_tlb_all+0x0/0x59
     [<c013b228>] ? printk+0x1a/0x1c
     [<c013f302>] ? iomem_map_sanity_check+0x82/0x8c
     [<c0a773e8>] ? _read_unlock+0x22/0x25
     [<c013f302>] ? iomem_map_sanity_check+0x82/0x8c
     [<c0154e17>] ? trace_hardirqs_off+0xb/0xd
     [<c0127731>] __ioremap_caller+0x5c/0x226
     [<c0156158>] ? trace_hardirqs_on+0xb/0xd
     [<c012767d>] ? iounmap+0x9d/0xa5
     [<c01279dd>] ioremap_nocache+0x15/0x17
     [<c0403c42>] ? ioremap+0xd/0xf
     [<c0403c42>] ioremap+0xd/0xf
     [<c0f1928f>] ibmphp_access_ebda+0x60/0xa0e
     [<c0f17f64>] ibmphp_init+0xb5/0x360
     [<c0101057>] do_one_initcall+0x57/0x138
     [<c0f17eaf>] ? ibmphp_init+0x0/0x360
     [<c0156158>] ? trace_hardirqs_on+0xb/0xd
     [<c0148d75>] ? __queue_work+0x2b/0x30
     [<c0f17eaf>] ? ibmphp_init+0x0/0x360
     [<c0f015a0>] kernel_init+0x17b/0x1e2
     [<c0f01425>] ? kernel_init+0x0/0x1e2
     [<c01178b3>] kernel_thread_helper+0x7/0x10
     =======================
    ---[ end trace a7919e7f17c0a725 ]---
    initcall ibmphp_init+0x0/0x360 returned -19 after 144 msecs
    calling  zt5550_init+0x0/0x6a @ 1
    
    the problem is this code:
    
            io_mem = ioremap (ebda_seg<<4, 65000);
    
    it assumes that the EBDA is 65000 bytes. But BIOS EBDA pointers are
    at most 1K large.
    
    _if_ the Rio code truly extends upon the customary EBDA size it needs
    to iounmap() this memory and ioremap() it larger, once it knows it from
    the generic descriptors that a Rio system is around.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 8467d0287325..7d27631e6e62 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -276,7 +276,7 @@ int __init ibmphp_access_ebda (void)
 	iounmap (io_mem);
 	debug ("returned ebda segment: %x\n", ebda_seg);
 	
-	io_mem = ioremap (ebda_seg<<4, 65000);
+	io_mem = ioremap(ebda_seg<<4, 1024);
 	if (!io_mem )
 		return -ENOMEM;
 	next_offset = 0x180;

commit 13eb83754b40bf01dc84e52a08d4196d1b719a0e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Sep 26 10:10:12 2008 +0200

    IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
    
    fix this build error:
    
     kernel/resource.c: In function 'iomem_map_sanity_check':
     kernel/resource.c:842: error: implicit declaration of function 'r_next'
     kernel/resource.c:842: warning: assignment makes pointer from integer without a cast
    
    r_next() was only available if CONFIG_PROCFS was enabled.
    
    and fix this build warning:
    
     kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
     kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'long unsigned int'
     kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
     kernel/resource.c:855: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'resource_size_t'
    
    resource_t can be 32 bits.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/resource.c b/kernel/resource.c
index 1d003a50ee17..7797dae85b50 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -38,10 +38,6 @@ EXPORT_SYMBOL(iomem_resource);
 
 static DEFINE_RWLOCK(resource_lock);
 
-#ifdef CONFIG_PROC_FS
-
-enum { MAX_IORES_LEVEL = 5 };
-
 static void *r_next(struct seq_file *m, void *v, loff_t *pos)
 {
 	struct resource *p = v;
@@ -53,6 +49,10 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
 	return p->sibling;
 }
 
+#ifdef CONFIG_PROC_FS
+
+enum { MAX_IORES_LEVEL = 5 };
+
 static void *r_start(struct seq_file *m, loff_t *pos)
 	__acquires(resource_lock)
 {
@@ -852,7 +852,11 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
 			continue;
 		printk(KERN_WARNING "resource map sanity check conflict: "
 		       "0x%llx 0x%llx 0x%llx 0x%llx %s\n",
-		       addr, addr + size - 1, p->start, p->end, p->name);
+		       (unsigned long long)addr,
+		       (unsigned long long)(addr + size - 1),
+		       (unsigned long long)p->start,
+		       (unsigned long long)p->end,
+		       p->name);
 		err = -1;
 		break;
 	}