diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-10 22:12:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-10 22:12:51 -0400 |
commit | eee33abe592da1763550e6e55b1cfb7fdc6a9b4c (patch) | |
tree | 6946db63c346f3aa215546aed47080c1d1b1087a /arch/s390 | |
parent | 04eef90c2e2fb860db71bff5f60d5ff0ec4c6dea (diff) | |
parent | 07606309ff5a9136e340b9ca87c831650c1ec47a (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] define KTIME_SCALAR for 32-bit s390
[S390] add generic atomic64 support for 31 bit
[S390] improve suspend/resume error messages
[S390] set SCHED_OMIT_FRAME_POINTER for s390
[S390] add __ucmpdi2() helper function
[S390] perf_counter build fix
[S390] shutdown actions: save/return rc from init function
[S390] dasd: correct debugfeature sense dump
[S390] udelay: disable lockdep to avoid false positives
[S390] monreader: fix dev_set_drvdata conversion
[S390] sclp: fix compile error for !SCLP_CONSOLE
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 8 | ||||
-rw-r--r-- | arch/s390/include/asm/atomic.h | 7 | ||||
-rw-r--r-- | arch/s390/include/asm/perf_counter.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 15 | ||||
-rw-r--r-- | arch/s390/lib/Makefile | 2 | ||||
-rw-r--r-- | arch/s390/lib/delay.c | 2 | ||||
-rw-r--r-- | arch/s390/lib/ucmpdi2.c | 26 |
7 files changed, 54 insertions, 8 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index e577839f3073..2ae5d72f47ed 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -95,6 +95,11 @@ config S390 | |||
95 | select HAVE_ARCH_TRACEHOOK | 95 | select HAVE_ARCH_TRACEHOOK |
96 | select INIT_ALL_POSSIBLE | 96 | select INIT_ALL_POSSIBLE |
97 | select HAVE_PERF_COUNTERS | 97 | select HAVE_PERF_COUNTERS |
98 | select GENERIC_ATOMIC64 if !64BIT | ||
99 | |||
100 | config SCHED_OMIT_FRAME_POINTER | ||
101 | bool | ||
102 | default y | ||
98 | 103 | ||
99 | source "init/Kconfig" | 104 | source "init/Kconfig" |
100 | 105 | ||
@@ -116,6 +121,9 @@ config 32BIT | |||
116 | bool | 121 | bool |
117 | default y if !64BIT | 122 | default y if !64BIT |
118 | 123 | ||
124 | config KTIME_SCALAR | ||
125 | def_bool 32BIT | ||
126 | |||
119 | config SMP | 127 | config SMP |
120 | bool "Symmetric multi-processing support" | 128 | bool "Symmetric multi-processing support" |
121 | ---help--- | 129 | ---help--- |
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index fca9dffcc669..c7d0abfb0f00 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -268,7 +268,12 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, | |||
268 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | 268 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) |
269 | 269 | ||
270 | #undef __CSG_LOOP | 270 | #undef __CSG_LOOP |
271 | #endif | 271 | |
272 | #else /* __s390x__ */ | ||
273 | |||
274 | #include <asm-generic/atomic64.h> | ||
275 | |||
276 | #endif /* __s390x__ */ | ||
272 | 277 | ||
273 | #define smp_mb__before_atomic_dec() smp_mb() | 278 | #define smp_mb__before_atomic_dec() smp_mb() |
274 | #define smp_mb__after_atomic_dec() smp_mb() | 279 | #define smp_mb__after_atomic_dec() smp_mb() |
diff --git a/arch/s390/include/asm/perf_counter.h b/arch/s390/include/asm/perf_counter.h index a7205a3828cb..7015188c2cc2 100644 --- a/arch/s390/include/asm/perf_counter.h +++ b/arch/s390/include/asm/perf_counter.h | |||
@@ -6,3 +6,5 @@ | |||
6 | 6 | ||
7 | static inline void set_perf_counter_pending(void) {} | 7 | static inline void set_perf_counter_pending(void) {} |
8 | static inline void clear_perf_counter_pending(void) {} | 8 | static inline void clear_perf_counter_pending(void) {} |
9 | |||
10 | #define PERF_COUNTER_INDEX_OFFSET 0 | ||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index b8bf4b140065..371a2d88f4ac 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -70,6 +70,7 @@ struct shutdown_action { | |||
70 | char *name; | 70 | char *name; |
71 | void (*fn) (struct shutdown_trigger *trigger); | 71 | void (*fn) (struct shutdown_trigger *trigger); |
72 | int (*init) (void); | 72 | int (*init) (void); |
73 | int init_rc; | ||
73 | }; | 74 | }; |
74 | 75 | ||
75 | static char *ipl_type_str(enum ipl_type type) | 76 | static char *ipl_type_str(enum ipl_type type) |
@@ -1486,11 +1487,13 @@ static int set_trigger(const char *buf, struct shutdown_trigger *trigger, | |||
1486 | int i; | 1487 | int i; |
1487 | 1488 | ||
1488 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { | 1489 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { |
1489 | if (!shutdown_actions_list[i]) | ||
1490 | continue; | ||
1491 | if (sysfs_streq(buf, shutdown_actions_list[i]->name)) { | 1490 | if (sysfs_streq(buf, shutdown_actions_list[i]->name)) { |
1492 | trigger->action = shutdown_actions_list[i]; | 1491 | if (shutdown_actions_list[i]->init_rc) { |
1493 | return len; | 1492 | return shutdown_actions_list[i]->init_rc; |
1493 | } else { | ||
1494 | trigger->action = shutdown_actions_list[i]; | ||
1495 | return len; | ||
1496 | } | ||
1494 | } | 1497 | } |
1495 | } | 1498 | } |
1496 | return -EINVAL; | 1499 | return -EINVAL; |
@@ -1640,8 +1643,8 @@ static void __init shutdown_actions_init(void) | |||
1640 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { | 1643 | for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) { |
1641 | if (!shutdown_actions_list[i]->init) | 1644 | if (!shutdown_actions_list[i]->init) |
1642 | continue; | 1645 | continue; |
1643 | if (shutdown_actions_list[i]->init()) | 1646 | shutdown_actions_list[i]->init_rc = |
1644 | shutdown_actions_list[i] = NULL; | 1647 | shutdown_actions_list[i]->init(); |
1645 | } | 1648 | } |
1646 | } | 1649 | } |
1647 | 1650 | ||
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index ab6735df2d21..97975ec7a274 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile | |||
@@ -3,6 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o | 5 | lib-y += delay.o string.o uaccess_std.o uaccess_pt.o |
6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o | 6 | obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o |
7 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o | 7 | lib-$(CONFIG_64BIT) += uaccess_mvcos.o |
8 | lib-$(CONFIG_SMP) += spinlock.o | 8 | lib-$(CONFIG_SMP) += spinlock.o |
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 3f5f680726ed..97c1eca83cc2 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -36,9 +36,11 @@ static void __udelay_disabled(unsigned long usecs) | |||
36 | cr0 = (cr0_saved & 0xffff00e0) | 0x00000800; | 36 | cr0 = (cr0_saved & 0xffff00e0) | 0x00000800; |
37 | __ctl_load(cr0 , 0, 0); | 37 | __ctl_load(cr0 , 0, 0); |
38 | mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT; | 38 | mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT; |
39 | lockdep_off(); | ||
39 | trace_hardirqs_on(); | 40 | trace_hardirqs_on(); |
40 | __load_psw_mask(mask); | 41 | __load_psw_mask(mask); |
41 | local_irq_disable(); | 42 | local_irq_disable(); |
43 | lockdep_on(); | ||
42 | __ctl_load(cr0_saved, 0, 0); | 44 | __ctl_load(cr0_saved, 0, 0); |
43 | local_tick_enable(clock_saved); | 45 | local_tick_enable(clock_saved); |
44 | set_clock_comparator(S390_lowcore.clock_comparator); | 46 | set_clock_comparator(S390_lowcore.clock_comparator); |
diff --git a/arch/s390/lib/ucmpdi2.c b/arch/s390/lib/ucmpdi2.c new file mode 100644 index 000000000000..3e05ff532582 --- /dev/null +++ b/arch/s390/lib/ucmpdi2.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include <linux/module.h> | ||
2 | |||
3 | union ull_union { | ||
4 | unsigned long long ull; | ||
5 | struct { | ||
6 | unsigned int high; | ||
7 | unsigned int low; | ||
8 | } ui; | ||
9 | }; | ||
10 | |||
11 | int __ucmpdi2(unsigned long long a, unsigned long long b) | ||
12 | { | ||
13 | union ull_union au = {.ull = a}; | ||
14 | union ull_union bu = {.ull = b}; | ||
15 | |||
16 | if (au.ui.high < bu.ui.high) | ||
17 | return 0; | ||
18 | else if (au.ui.high > bu.ui.high) | ||
19 | return 2; | ||
20 | if (au.ui.low < bu.ui.low) | ||
21 | return 0; | ||
22 | else if (au.ui.low > bu.ui.low) | ||
23 | return 2; | ||
24 | return 1; | ||
25 | } | ||
26 | EXPORT_SYMBOL(__ucmpdi2); | ||