Patches contributed by Eötvös Lorand University
commit 760378e1497841246ea7e42abad617d8a8ac0bcc
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Jul 1 17:35:06 2008 +0200
fix "ftrace: store mcount address in rec->ip"
Alexander Beregalov reported this build failure:
$ make CROSS_COMPILE=sparc64-unknown-linux-gnu- image modules && sudo
make modules_install
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
dnsdomainname: Unknown host
CC arch/sparc64/kernel/sparc64_ksyms.o
arch/sparc64/kernel/sparc64_ksyms.c:116: error: '_mcount' undeclared
here (not in a function)
cc1: warnings being treated as errors
arch/sparc64/kernel/sparc64_ksyms.c:116: error: type defaults to 'int'
in declaration of '_mcount'
And bisected it back to:
| commit 395a59d0f8e86bb39cd700c3d185d30c670bb958
| Author: Abhishek Sagar <sagar.abhishek@gmail.com>
| Date: Sat Jun 21 23:47:27 2008 +0530
|
| ftrace: store mcount address in rec->ip
the mcount prototype is only available under CONFIG_FTRACE,
extend it to CONFIG_MCOUNT as well.
Reported-and-bisected-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index b80d982a29c6..49d3ea50c247 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(__write_trylock);
EXPORT_SYMBOL(smp_call_function);
#endif /* CONFIG_SMP */
-#if defined(CONFIG_MCOUNT)
+#ifdef CONFIG_MCOUNT
EXPORT_SYMBOL(_mcount);
#endif
diff --git a/include/asm-sparc64/ftrace.h b/include/asm-sparc64/ftrace.h
index f76a40a338bb..d27716cd38c1 100644
--- a/include/asm-sparc64/ftrace.h
+++ b/include/asm-sparc64/ftrace.h
@@ -1,7 +1,7 @@
#ifndef _ASM_SPARC64_FTRACE
#define _ASM_SPARC64_FTRACE
-#ifdef CONFIG_FTRACE
+#ifdef CONFIG_MCOUNT
#define MCOUNT_ADDR ((long)(_mcount))
#define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
commit 8594698ebddeef5443b7da8258ae33b3eaca61d5
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 21:20:17 2008 +0200
stacktrace: fix modular build, export print_stack_trace and save_stack_trace
fix:
ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
Signed-off-by: Ingo Molnar <mingo@elte.hu>
and fix:
Building modules, stage 2.
MODPOST 376 modules
ERROR: "print_stack_trace" [kernel/backtracetest.ko] undefined!
make[1]: *** [__modpost] Error 1
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index c28c342c162f..a03e7f6d90c3 100644
--- a/arch/x86/kernel/stacktrace.c
+++ b/arch/x86/kernel/stacktrace.c
@@ -74,6 +74,7 @@ void save_stack_trace(struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
+EXPORT_SYMBOL_GPL(save_stack_trace);
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{
@@ -81,3 +82,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
if (trace->nr_entries < trace->max_entries)
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
+EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 7eaea9d02a52..94b527ef1d1e 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -6,6 +6,7 @@
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
*/
#include <linux/sched.h>
+#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/stacktrace.h>
@@ -21,4 +22,5 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
print_ip_sym(trace->entries[i]);
}
}
+EXPORT_SYMBOL_GPL(print_stack_trace);
commit 34e83e850f5e5ee2a18cd77a5d70d31972a632e6
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 15:42:36 2008 +0200
sched: build fix
fix:
kernel/sched.c: In function ‘sched_group_set_shares':
kernel/sched.c:8635: error: implicit declaration of function ‘cfs_rq_set_shares'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/sched.c b/kernel/sched.c
index 7613f69f0978..058250a63b64 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1627,11 +1627,6 @@ static void update_h_load(int cpu)
walk_tg_tree(tg_load_down, tg_nop, cpu, NULL);
}
-static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
-{
- cfs_rq->shares = shares;
-}
-
#else
static inline void update_shares(struct sched_domain *sd)
@@ -1646,6 +1641,13 @@ static inline void update_shares_locked(struct rq *rq, struct sched_domain *sd)
#endif
+static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
+{
+#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
+ cfs_rq->shares = shares;
+#endif
+}
+
#include "sched_stats.h"
#include "sched_idletask.c"
#include "sched_fair.c"
commit 2d452c9b10caeec455eb5e56a0ef4ed485178213
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Jun 29 15:01:59 2008 +0200
sched: sched_clock_cpu() based cpu_clock(), lockdep fix
Vegard Nossum reported:
> WARNING: at kernel/lockdep.c:2738 check_flags+0x142/0x160()
which happens due to:
unsigned long long cpu_clock(int cpu)
{
unsigned long long clock;
unsigned long flags;
raw_local_irq_save(flags);
as lower level functions can take locks, we must not do that, use
proper lockdep-annotated irq save/restore.
Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index ed5a8c415046..60094e257a9a 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -250,9 +250,9 @@ unsigned long long cpu_clock(int cpu)
unsigned long long clock;
unsigned long flags;
- raw_local_irq_save(flags);
+ local_irq_save(flags);
clock = sched_clock_cpu(cpu);
- raw_local_irq_restore(flags);
+ local_irq_restore(flags);
return clock;
}
commit 4c9fe8ad813b257a2b9ddf0f752105a75a7dae63
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 14:49:35 2008 +0200
sched: export cpu_clock
the rcutorture module relies on cpu_clock.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index 3c696db59452..ed5a8c415046 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -256,3 +256,4 @@ unsigned long long cpu_clock(int cpu)
return clock;
}
+EXPORT_SYMBOL_GPL(cpu_clock);
commit 8b604d520799a995946437d041f46bae7d5bcc8c
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 11:52:45 2008 +0200
fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
drivers/char/sysrq.c: In function 'sysrq_showregs_othercpus':
drivers/char/sysrq.c:218: error: too many arguments to function 'smp_call_function'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index dbce1263bdff..8fdfe9c871e3 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -215,7 +215,7 @@ static void showacpu(void *dummy)
static void sysrq_showregs_othercpus(struct work_struct *dummy)
{
- smp_call_function(showacpu, NULL, 0, 0);
+ smp_call_function(showacpu, NULL, 0);
}
static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);
commit ce0d1b6f73870878aae622b72e85fe8f7a16b51c
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 11:50:32 2008 +0200
fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
fix:
kernel/smp.c: In function 'smp_call_function_mask':
kernel/smp.c:303: error: too many arguments to function 'smp_call_function_single'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/smp.c b/kernel/smp.c
index 7e0432a4a0e2..4f582b257eba 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -300,7 +300,7 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
return 0;
else if (num_cpus == 1) {
cpu = first_cpu(mask);
- return smp_call_function_single(cpu, func, info, 0, wait);
+ return smp_call_function_single(cpu, func, info, wait);
}
if (!wait) {
commit 127a237a1ff49fa5b8e00af91e841598aeea3513
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 11:48:22 2008 +0200
fix "smp_call_function: get rid of the unused nonatomic/retry argument"
fix:
arch/x86/kernel/process.c: In function 'cpu_idle_wait':
arch/x86/kernel/process.c:64: error: too many arguments to function 'smp_call_function'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index ba370dc8685b..2dad8fef391c 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -61,7 +61,7 @@ void cpu_idle_wait(void)
{
smp_mb();
/* kick all the CPUs so that they exit out of pm_idle */
- smp_call_function(do_nothing, NULL, 0, 1);
+ smp_call_function(do_nothing, NULL, 1);
}
EXPORT_SYMBOL_GPL(cpu_idle_wait);
commit 07c40e8a1acdb56fca485a6deeb252ebf19509a1
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 11:31:28 2008 +0200
x86, AMD IOMMU: build fix #3
fix typo causing:
arch/x86/kernel/built-in.o: In function `__unmap_single':
amd_iommu.c:(.text+0x17771): undefined reference to `iommu_area_free'
arch/x86/kernel/built-in.o: In function `__map_single':
amd_iommu.c:(.text+0x1797a): undefined reference to `iommu_area_alloc'
amd_iommu.c:(.text+0x179a2): undefined reference to `iommu_area_alloc'
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 62a2820297b1..8aae462f4e01 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -551,7 +551,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
config AMD_IOMMU
bool "AMD IOMMU support"
- select SWIOTL
+ select SWIOTLB
depends on X86_64 && PCI && ACPI
help
Select this to get support for AMD IOMMU hardware in your system.
commit 92af4e29020ff096178a00605b3662b3b39d4aa9
Author: Ingo Molnar <mingo@elte.hu>
Date: Fri Jun 27 10:48:16 2008 +0200
x86, AMD IOMMU, build fix #2
fix:
arch/x86/kernel/amd_iommu.c: In function ‘amd_iommu_init_dma_ops':
arch/x86/kernel/amd_iommu.c:940: error: lvalue required as left operand of assignment
arch/x86/kernel/amd_iommu.c:941: error: lvalue required as left operand of assignment
due to !CONFIG_GART_IOMMU.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 134dea103247..a1b38561d347 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -937,8 +937,10 @@ int __init amd_iommu_init_dma_ops(void)
iommu_detected = 1;
force_iommu = 1;
bad_dma_address = 0;
+#ifdef CONFIG_GART_IOMMU
gart_iommu_aperture_disabled = 1;
gart_iommu_aperture = 0;
+#endif
dma_ops = &amd_iommu_dma_ops;
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index d1aa2344cd90..6ab8128db1cc 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -801,8 +801,10 @@ void __init amd_iommu_detect(void)
if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) {
iommu_detected = 1;
+#ifdef CONFIG_GART_IOMMU
gart_iommu_aperture_disabled = 1;
gart_iommu_aperture = 0;
+#endif
}
}
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index 90958ed993fa..ec5785c6e2fd 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -18,8 +18,9 @@ extern int gart_iommu_aperture_allowed;
extern int gart_iommu_aperture_disabled;
extern int fix_aperture;
#else
-#define gart_iommu_aperture 0
-#define gart_iommu_aperture_allowed 0
+#define gart_iommu_aperture 0
+#define gart_iommu_aperture_allowed 0
+#define gart_iommu_aperture_disabled 1
static inline void early_gart_iommu_check(void)
{