aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/isa.c6
-rw-r--r--arch/arm/mach-at91/sysirq_mask.c22
-rw-r--r--arch/arm64/boot/dts/apm-storm.dtsi21
-rw-r--r--arch/blackfin/kernel/ptrace.c8
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c4
-rw-r--r--arch/cris/arch-v32/drivers/mach-fs/gpio.c6
-rw-r--r--arch/ia64/kernel/crash.c4
-rw-r--r--arch/ia64/kernel/perfmon.c6
-rw-r--r--arch/m68k/include/asm/signal.h9
-rw-r--r--arch/mips/dec/Makefile2
-rw-r--r--arch/mips/dec/platform.c44
-rw-r--r--arch/powerpc/kernel/irq.c2
-rw-r--r--arch/tile/kernel/proc.c4
-rw-r--r--arch/x86/include/asm/signal.h6
14 files changed, 99 insertions, 45 deletions
diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c
index 346485910732..9d1cf7156895 100644
--- a/arch/arm/kernel/isa.c
+++ b/arch/arm/kernel/isa.c
@@ -20,7 +20,7 @@
20 20
21static unsigned int isa_membase, isa_portbase, isa_portshift; 21static unsigned int isa_membase, isa_portbase, isa_portshift;
22 22
23static ctl_table ctl_isa_vars[4] = { 23static struct ctl_table ctl_isa_vars[4] = {
24 { 24 {
25 .procname = "membase", 25 .procname = "membase",
26 .data = &isa_membase, 26 .data = &isa_membase,
@@ -44,7 +44,7 @@ static ctl_table ctl_isa_vars[4] = {
44 44
45static struct ctl_table_header *isa_sysctl_header; 45static struct ctl_table_header *isa_sysctl_header;
46 46
47static ctl_table ctl_isa[2] = { 47static struct ctl_table ctl_isa[2] = {
48 { 48 {
49 .procname = "isa", 49 .procname = "isa",
50 .mode = 0555, 50 .mode = 0555,
@@ -52,7 +52,7 @@ static ctl_table ctl_isa[2] = {
52 }, {} 52 }, {}
53}; 53};
54 54
55static ctl_table ctl_bus[2] = { 55static struct ctl_table ctl_bus[2] = {
56 { 56 {
57 .procname = "bus", 57 .procname = "bus",
58 .mode = 0555, 58 .mode = 0555,
diff --git a/arch/arm/mach-at91/sysirq_mask.c b/arch/arm/mach-at91/sysirq_mask.c
index 2ba694f9626b..f8bc3511a8c8 100644
--- a/arch/arm/mach-at91/sysirq_mask.c
+++ b/arch/arm/mach-at91/sysirq_mask.c
@@ -25,24 +25,28 @@
25 25
26#include "generic.h" 26#include "generic.h"
27 27
28#define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */ 28#define AT91_RTC_IDR 0x24 /* Interrupt Disable Register */
29#define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */ 29#define AT91_RTC_IMR 0x28 /* Interrupt Mask Register */
30#define AT91_RTC_IRQ_MASK 0x1f /* Available IRQs mask */
30 31
31void __init at91_sysirq_mask_rtc(u32 rtc_base) 32void __init at91_sysirq_mask_rtc(u32 rtc_base)
32{ 33{
33 void __iomem *base; 34 void __iomem *base;
34 u32 mask;
35 35
36 base = ioremap(rtc_base, 64); 36 base = ioremap(rtc_base, 64);
37 if (!base) 37 if (!base)
38 return; 38 return;
39 39
40 mask = readl_relaxed(base + AT91_RTC_IMR); 40 /*
41 if (mask) { 41 * sam9x5 SoCs have the following errata:
42 pr_info("AT91: Disabling rtc irq\n"); 42 * "RTC: Interrupt Mask Register cannot be used
43 writel_relaxed(mask, base + AT91_RTC_IDR); 43 * Interrupt Mask Register read always returns 0."
44 (void)readl_relaxed(base + AT91_RTC_IMR); /* flush */ 44 *
45 } 45 * Hence we're not relying on IMR values to disable
46 * interrupts.
47 */
48 writel_relaxed(AT91_RTC_IRQ_MASK, base + AT91_RTC_IDR);
49 (void)readl_relaxed(base + AT91_RTC_IMR); /* flush */
46 50
47 iounmap(base); 51 iounmap(base);
48} 52}
diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index f8c40a66e65d..c5f0a47a1375 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -257,6 +257,19 @@
257 enable-offset = <0x0>; 257 enable-offset = <0x0>;
258 enable-mask = <0x39>; 258 enable-mask = <0x39>;
259 }; 259 };
260
261 rtcclk: rtcclk@17000000 {
262 compatible = "apm,xgene-device-clock";
263 #clock-cells = <1>;
264 clocks = <&socplldiv2 0>;
265 reg = <0x0 0x17000000 0x0 0x2000>;
266 reg-names = "csr-reg";
267 csr-offset = <0xc>;
268 csr-mask = <0x2>;
269 enable-offset = <0x10>;
270 enable-mask = <0x2>;
271 clock-output-names = "rtcclk";
272 };
260 }; 273 };
261 274
262 serial0: serial@1c020000 { 275 serial0: serial@1c020000 {
@@ -342,5 +355,13 @@
342 phys = <&phy3 0>; 355 phys = <&phy3 0>;
343 phy-names = "sata-phy"; 356 phy-names = "sata-phy";
344 }; 357 };
358
359 rtc: rtc@10510000 {
360 compatible = "apm,xgene-rtc";
361 reg = <0x0 0x10510000 0x0 0x400>;
362 interrupts = <0x0 0x46 0x4>;
363 #clock-cells = <1>;
364 clocks = <&rtcclk 0>;
365 };
345 }; 366 };
346}; 367};
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index e1f88e028cfe..8b8fe671b1a6 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -117,6 +117,7 @@ put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
117int 117int
118is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len) 118is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len)
119{ 119{
120 bool valid;
120 struct vm_area_struct *vma; 121 struct vm_area_struct *vma;
121 struct sram_list_struct *sraml; 122 struct sram_list_struct *sraml;
122 123
@@ -124,9 +125,12 @@ is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long
124 if (start + len < start) 125 if (start + len < start)
125 return -EIO; 126 return -EIO;
126 127
128 down_read(&child->mm->mmap_sem);
127 vma = find_vma(child->mm, start); 129 vma = find_vma(child->mm, start);
128 if (vma && start >= vma->vm_start && start + len <= vma->vm_end) 130 valid = vma && start >= vma->vm_start && start + len <= vma->vm_end;
129 return 0; 131 up_read(&child->mm->mmap_sem);
132 if (valid)
133 return 0;
130 134
131 for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next) 135 for (sraml = child->mm->context.sram_list; sraml; sraml = sraml->next)
132 if (start >= (unsigned long)sraml->addr 136 if (start >= (unsigned long)sraml->addr
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index f4374bae4fb4..64285e0d3481 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -833,8 +833,8 @@ static int __init gpio_init(void)
833 printk(KERN_INFO "ETRAX 100LX GPIO driver v2.5, (c) 2001-2008 " 833 printk(KERN_INFO "ETRAX 100LX GPIO driver v2.5, (c) 2001-2008 "
834 "Axis Communications AB\n"); 834 "Axis Communications AB\n");
835 /* We call etrax_gpio_wake_up_check() from timer interrupt and 835 /* We call etrax_gpio_wake_up_check() from timer interrupt and
836 * from cpu_idle() in kernel/process.c 836 * from default_idle() in kernel/process.c
837 * The check in cpu_idle() reduces latency from ~15 ms to ~6 ms 837 * The check in default_idle() reduces latency from ~15 ms to ~6 ms
838 * in some tests. 838 * in some tests.
839 */ 839 */
840 res = request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt, 840 res = request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt,
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
index 9e54273af0ca..009f4ee1bd09 100644
--- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
@@ -958,11 +958,7 @@ gpio_init(void)
958 958
959 printk(KERN_INFO "ETRAX FS GPIO driver v2.5, (c) 2003-2007 " 959 printk(KERN_INFO "ETRAX FS GPIO driver v2.5, (c) 2003-2007 "
960 "Axis Communications AB\n"); 960 "Axis Communications AB\n");
961 /* We call etrax_gpio_wake_up_check() from timer interrupt and 961 /* We call etrax_gpio_wake_up_check() from timer interrupt */
962 * from cpu_idle() in kernel/process.c
963 * The check in cpu_idle() reduces latency from ~15 ms to ~6 ms
964 * in some tests.
965 */
966 if (request_irq(TIMER0_INTR_VECT, gpio_poll_timer_interrupt, 962 if (request_irq(TIMER0_INTR_VECT, gpio_poll_timer_interrupt,
967 IRQF_SHARED, "gpio poll", &alarmlist)) 963 IRQF_SHARED, "gpio poll", &alarmlist))
968 printk(KERN_ERR "timer0 irq for gpio\n"); 964 printk(KERN_ERR "timer0 irq for gpio\n");
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index b942f4032d7a..2955f359e2a7 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -237,7 +237,7 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
237} 237}
238 238
239#ifdef CONFIG_SYSCTL 239#ifdef CONFIG_SYSCTL
240static ctl_table kdump_ctl_table[] = { 240static struct ctl_table kdump_ctl_table[] = {
241 { 241 {
242 .procname = "kdump_on_init", 242 .procname = "kdump_on_init",
243 .data = &kdump_on_init, 243 .data = &kdump_on_init,
@@ -255,7 +255,7 @@ static ctl_table kdump_ctl_table[] = {
255 { } 255 { }
256}; 256};
257 257
258static ctl_table sys_table[] = { 258static struct ctl_table sys_table[] = {
259 { 259 {
260 .procname = "kernel", 260 .procname = "kernel",
261 .mode = 0555, 261 .mode = 0555,
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index d841c4bd6864..5845ffea67c3 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -521,7 +521,7 @@ static pmu_config_t *pmu_conf;
521pfm_sysctl_t pfm_sysctl; 521pfm_sysctl_t pfm_sysctl;
522EXPORT_SYMBOL(pfm_sysctl); 522EXPORT_SYMBOL(pfm_sysctl);
523 523
524static ctl_table pfm_ctl_table[]={ 524static struct ctl_table pfm_ctl_table[] = {
525 { 525 {
526 .procname = "debug", 526 .procname = "debug",
527 .data = &pfm_sysctl.debug, 527 .data = &pfm_sysctl.debug,
@@ -552,7 +552,7 @@ static ctl_table pfm_ctl_table[]={
552 }, 552 },
553 {} 553 {}
554}; 554};
555static ctl_table pfm_sysctl_dir[] = { 555static struct ctl_table pfm_sysctl_dir[] = {
556 { 556 {
557 .procname = "perfmon", 557 .procname = "perfmon",
558 .mode = 0555, 558 .mode = 0555,
@@ -560,7 +560,7 @@ static ctl_table pfm_sysctl_dir[] = {
560 }, 560 },
561 {} 561 {}
562}; 562};
563static ctl_table pfm_sysctl_root[] = { 563static struct ctl_table pfm_sysctl_root[] = {
564 { 564 {
565 .procname = "kernel", 565 .procname = "kernel",
566 .mode = 0555, 566 .mode = 0555,
diff --git a/arch/m68k/include/asm/signal.h b/arch/m68k/include/asm/signal.h
index 214320b50384..8c8ce5e1ee0e 100644
--- a/arch/m68k/include/asm/signal.h
+++ b/arch/m68k/include/asm/signal.h
@@ -60,15 +60,6 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)
60 __const_sigismember(set,sig) : \ 60 __const_sigismember(set,sig) : \
61 __gen_sigismember(set,sig)) 61 __gen_sigismember(set,sig))
62 62
63static inline int sigfindinword(unsigned long word)
64{
65 asm ("bfffo %1{#0,#0},%0"
66 : "=d" (word)
67 : "d" (word & -word)
68 : "cc");
69 return word ^ 31;
70}
71
72#endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ 63#endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */
73 64
74#ifndef __uClinux__ 65#ifndef __uClinux__
diff --git a/arch/mips/dec/Makefile b/arch/mips/dec/Makefile
index 3d5d2c56de8d..bd74e05c90b0 100644
--- a/arch/mips/dec/Makefile
+++ b/arch/mips/dec/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \ 5obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \
6 kn02-irq.o kn02xa-berr.o reset.o setup.o time.o 6 kn02-irq.o kn02xa-berr.o platform.o reset.o setup.o time.o
7 7
8obj-$(CONFIG_TC) += tc.o 8obj-$(CONFIG_TC) += tc.o
9obj-$(CONFIG_CPU_HAS_WB) += wbflush.o 9obj-$(CONFIG_CPU_HAS_WB) += wbflush.o
diff --git a/arch/mips/dec/platform.c b/arch/mips/dec/platform.c
new file mode 100644
index 000000000000..c7ac86af847a
--- /dev/null
+++ b/arch/mips/dec/platform.c
@@ -0,0 +1,44 @@
1/*
2 * DEC platform devices.
3 *
4 * Copyright (c) 2014 Maciej W. Rozycki
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/ioport.h>
13#include <linux/kernel.h>
14#include <linux/mc146818rtc.h>
15#include <linux/platform_device.h>
16
17static struct resource dec_rtc_resources[] = {
18 {
19 .name = "rtc",
20 .flags = IORESOURCE_MEM,
21 },
22};
23
24static struct cmos_rtc_board_info dec_rtc_info = {
25 .flags = CMOS_RTC_FLAGS_NOFREQ,
26 .address_space = 64,
27};
28
29static struct platform_device dec_rtc_device = {
30 .name = "rtc_cmos",
31 .id = PLATFORM_DEVID_NONE,
32 .dev.platform_data = &dec_rtc_info,
33 .resource = dec_rtc_resources,
34 .num_resources = ARRAY_SIZE(dec_rtc_resources),
35};
36
37static int __init dec_add_devices(void)
38{
39 dec_rtc_resources[0].start = RTC_PORT(0);
40 dec_rtc_resources[0].end = RTC_PORT(0) + dec_kn_slot_size - 1;
41 return platform_device_register(&dec_rtc_device);
42}
43
44device_initcall(dec_add_devices);
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index ca1cd7459c4a..248ee7e5bebd 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -304,7 +304,7 @@ void notrace restore_interrupts(void)
304 * being re-enabled and generally sanitized the lazy irq state, 304 * being re-enabled and generally sanitized the lazy irq state,
305 * and in the latter case it will leave with interrupts hard 305 * and in the latter case it will leave with interrupts hard
306 * disabled and marked as such, so the local_irq_enable() call 306 * disabled and marked as such, so the local_irq_enable() call
307 * in cpu_idle() will properly re-enable everything. 307 * in arch_cpu_idle() will properly re-enable everything.
308 */ 308 */
309bool prep_irq_for_idle(void) 309bool prep_irq_for_idle(void)
310{ 310{
diff --git a/arch/tile/kernel/proc.c b/arch/tile/kernel/proc.c
index 681100c59fda..6829a9508649 100644
--- a/arch/tile/kernel/proc.c
+++ b/arch/tile/kernel/proc.c
@@ -113,7 +113,7 @@ arch_initcall(proc_tile_init);
113 * Support /proc/sys/tile directory 113 * Support /proc/sys/tile directory
114 */ 114 */
115 115
116static ctl_table unaligned_subtable[] = { 116static struct ctl_table unaligned_subtable[] = {
117 { 117 {
118 .procname = "enabled", 118 .procname = "enabled",
119 .data = &unaligned_fixup, 119 .data = &unaligned_fixup,
@@ -138,7 +138,7 @@ static ctl_table unaligned_subtable[] = {
138 {} 138 {}
139}; 139};
140 140
141static ctl_table unaligned_table[] = { 141static struct ctl_table unaligned_table[] = {
142 { 142 {
143 .procname = "unaligned_fixup", 143 .procname = "unaligned_fixup",
144 .mode = 0555, 144 .mode = 0555,
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 35e67a457182..31eab867e6d3 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -92,12 +92,6 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)
92 ? __const_sigismember((set), (sig)) \ 92 ? __const_sigismember((set), (sig)) \
93 : __gen_sigismember((set), (sig))) 93 : __gen_sigismember((set), (sig)))
94 94
95static inline int sigfindinword(unsigned long word)
96{
97 asm("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc");
98 return word;
99}
100
101struct pt_regs; 95struct pt_regs;
102 96
103#else /* __i386__ */ 97#else /* __i386__ */