diff options
Diffstat (limited to 'arch')
754 files changed, 3642 insertions, 2156 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index bd4160c57196..9808998cc073 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -12,7 +12,6 @@ config ALPHA | |||
12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
13 | select AUTO_IRQ_AFFINITY if SMP | 13 | select AUTO_IRQ_AFFINITY if SMP |
14 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
15 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
16 | help | 15 | help |
17 | The Alpha is a 64-bit general-purpose processor designed and | 16 | The Alpha is a 64-bit general-purpose processor designed and |
18 | marketed by the Digital Equipment Corporation of blessed memory, | 17 | marketed by the Digital Equipment Corporation of blessed memory, |
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h index 9baae8afe8a3..da5449e22175 100644 --- a/arch/alpha/include/asm/elf.h +++ b/arch/alpha/include/asm/elf.h | |||
@@ -101,7 +101,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
101 | 101 | ||
102 | #define ELF_PLAT_INIT(_r, load_addr) _r->r0 = 0 | 102 | #define ELF_PLAT_INIT(_r, load_addr) _r->r0 = 0 |
103 | 103 | ||
104 | /* The registers are layed out in pt_regs for PAL and syscall | 104 | /* The registers are laid out in pt_regs for PAL and syscall |
105 | convenience. Re-order them for the linear elf_gregset_t. */ | 105 | convenience. Re-order them for the linear elf_gregset_t. */ |
106 | 106 | ||
107 | struct pt_regs; | 107 | struct pt_regs; |
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index 9bb7b858ed23..7a6d908bb865 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | extra-y := head.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
6 | asflags-y := $(KBUILD_CFLAGS) | 6 | asflags-y := $(KBUILD_CFLAGS) |
7 | ccflags-y := -Werror -Wno-sign-compare | 7 | ccflags-y := -Wno-sign-compare |
8 | 8 | ||
9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ | 9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ |
10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ | 10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ |
diff --git a/arch/alpha/kernel/core_lca.c b/arch/alpha/kernel/core_lca.c index 4843f6ec9f3a..cb2801cfd3df 100644 --- a/arch/alpha/kernel/core_lca.c +++ b/arch/alpha/kernel/core_lca.c | |||
@@ -133,7 +133,7 @@ conf_read(unsigned long addr) | |||
133 | 133 | ||
134 | local_irq_save(flags); | 134 | local_irq_save(flags); |
135 | 135 | ||
136 | /* Reset status register to avoid loosing errors. */ | 136 | /* Reset status register to avoid losing errors. */ |
137 | stat0 = *(vulp)LCA_IOC_STAT0; | 137 | stat0 = *(vulp)LCA_IOC_STAT0; |
138 | *(vulp)LCA_IOC_STAT0 = stat0; | 138 | *(vulp)LCA_IOC_STAT0 = stat0; |
139 | mb(); | 139 | mb(); |
@@ -170,7 +170,7 @@ conf_write(unsigned long addr, unsigned int value) | |||
170 | 170 | ||
171 | local_irq_save(flags); /* avoid getting hit by machine check */ | 171 | local_irq_save(flags); /* avoid getting hit by machine check */ |
172 | 172 | ||
173 | /* Reset status register to avoid loosing errors. */ | 173 | /* Reset status register to avoid losing errors. */ |
174 | stat0 = *(vulp)LCA_IOC_STAT0; | 174 | stat0 = *(vulp)LCA_IOC_STAT0; |
175 | *(vulp)LCA_IOC_STAT0 = stat0; | 175 | *(vulp)LCA_IOC_STAT0 = stat0; |
176 | mb(); | 176 | mb(); |
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c index 381fec0af52e..da7bcc372f16 100644 --- a/arch/alpha/kernel/core_mcpcia.c +++ b/arch/alpha/kernel/core_mcpcia.c | |||
@@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1, | |||
88 | { | 88 | { |
89 | unsigned long flags; | 89 | unsigned long flags; |
90 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); | 90 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); |
91 | unsigned int stat0, value, temp, cpu; | 91 | unsigned int stat0, value, cpu; |
92 | 92 | ||
93 | cpu = smp_processor_id(); | 93 | cpu = smp_processor_id(); |
94 | 94 | ||
@@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1, | |||
101 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); | 101 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); |
102 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; | 102 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; |
103 | mb(); | 103 | mb(); |
104 | temp = *(vuip)MCPCIA_CAP_ERR(mid); | 104 | *(vuip)MCPCIA_CAP_ERR(mid); |
105 | DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0)); | 105 | DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0)); |
106 | 106 | ||
107 | mb(); | 107 | mb(); |
@@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
136 | { | 136 | { |
137 | unsigned long flags; | 137 | unsigned long flags; |
138 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); | 138 | unsigned long mid = MCPCIA_HOSE2MID(hose->index); |
139 | unsigned int stat0, temp, cpu; | 139 | unsigned int stat0, cpu; |
140 | 140 | ||
141 | cpu = smp_processor_id(); | 141 | cpu = smp_processor_id(); |
142 | 142 | ||
@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
145 | /* Reset status register to avoid losing errors. */ | 145 | /* Reset status register to avoid losing errors. */ |
146 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); | 146 | stat0 = *(vuip)MCPCIA_CAP_ERR(mid); |
147 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb(); | 147 | *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb(); |
148 | temp = *(vuip)MCPCIA_CAP_ERR(mid); | 148 | *(vuip)MCPCIA_CAP_ERR(mid); |
149 | DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0)); | 149 | DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0)); |
150 | 150 | ||
151 | draina(); | 151 | draina(); |
@@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, | |||
157 | *((vuip)addr) = value; | 157 | *((vuip)addr) = value; |
158 | mb(); | 158 | mb(); |
159 | mb(); /* magic */ | 159 | mb(); /* magic */ |
160 | temp = *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */ | 160 | *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */ |
161 | mcheck_expected(cpu) = 0; | 161 | mcheck_expected(cpu) = 0; |
162 | mb(); | 162 | mb(); |
163 | 163 | ||
@@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr) | |||
572 | void | 572 | void |
573 | mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) | 573 | mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) |
574 | { | 574 | { |
575 | struct el_common *mchk_header; | ||
576 | struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; | 575 | struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; |
577 | unsigned int cpu = smp_processor_id(); | 576 | unsigned int cpu = smp_processor_id(); |
578 | int expected; | 577 | int expected; |
579 | 578 | ||
580 | mchk_header = (struct el_common *)la_ptr; | ||
581 | mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; | 579 | mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; |
582 | expected = mcheck_expected(cpu); | 580 | expected = mcheck_expected(cpu); |
583 | 581 | ||
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 648ae88aeb8a..ae54ad91e18f 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
@@ -1027,7 +1027,7 @@ marvel_process_logout_frame(struct ev7_lf_subpackets *lf_subpackets, int print) | |||
1027 | * normal operation, dismiss them. | 1027 | * normal operation, dismiss them. |
1028 | * | 1028 | * |
1029 | * Dismiss if: | 1029 | * Dismiss if: |
1030 | * C_STAT = 0x14 (Error Reponse) | 1030 | * C_STAT = 0x14 (Error Response) |
1031 | * C_STS<3> = 0 (C_ADDR valid) | 1031 | * C_STS<3> = 0 (C_ADDR valid) |
1032 | * C_ADDR<42> = 1 (I/O) | 1032 | * C_ADDR<42> = 1 (I/O) |
1033 | * C_ADDR<31:22> = 111110xxb (PCI Config space) | 1033 | * C_ADDR<31:22> = 111110xxb (PCI Config space) |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index c3b3781a03de..14b26c466c89 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
@@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = { | |||
533 | static struct el_subpacket * | 533 | static struct el_subpacket * |
534 | el_process_regatta_subpacket(struct el_subpacket *header) | 534 | el_process_regatta_subpacket(struct el_subpacket *header) |
535 | { | 535 | { |
536 | int status; | ||
537 | |||
538 | if (header->class != EL_CLASS__REGATTA_FAMILY) { | 536 | if (header->class != EL_CLASS__REGATTA_FAMILY) { |
539 | printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n", | 537 | printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n", |
540 | err_print_prefix, | 538 | err_print_prefix, |
@@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header) | |||
551 | printk("%s ** Occurred on CPU %d:\n", | 549 | printk("%s ** Occurred on CPU %d:\n", |
552 | err_print_prefix, | 550 | err_print_prefix, |
553 | (int)header->by_type.regatta_frame.cpuid); | 551 | (int)header->by_type.regatta_frame.cpuid); |
554 | status = privateer_process_logout_frame((struct el_common *) | 552 | privateer_process_logout_frame((struct el_common *) |
555 | header->by_type.regatta_frame.data_start, 1); | 553 | header->by_type.regatta_frame.data_start, 1); |
556 | break; | 554 | break; |
557 | default: | 555 | default: |
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 1479dc6ebd97..51b7fbd9e4c1 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
@@ -228,7 +228,7 @@ struct irqaction timer_irqaction = { | |||
228 | void __init | 228 | void __init |
229 | init_rtc_irq(void) | 229 | init_rtc_irq(void) |
230 | { | 230 | { |
231 | irq_set_chip_and_handler_name(RTC_IRQ, &no_irq_chip, | 231 | irq_set_chip_and_handler_name(RTC_IRQ, &dummy_irq_chip, |
232 | handle_simple_irq, "RTC"); | 232 | handle_simple_irq, "RTC"); |
233 | setup_irq(RTC_IRQ, &timer_irqaction); | 233 | setup_irq(RTC_IRQ, &timer_irqaction); |
234 | } | 234 | } |
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index d2634e4476b4..edbddcbd5bc6 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
@@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type) | |||
1404 | case PCA56_CPU: | 1404 | case PCA56_CPU: |
1405 | case PCA57_CPU: | 1405 | case PCA57_CPU: |
1406 | { | 1406 | { |
1407 | unsigned long cbox_config, size; | ||
1408 | |||
1409 | if (cpu_type == PCA56_CPU) { | 1407 | if (cpu_type == PCA56_CPU) { |
1410 | L1I = CSHAPE(16*1024, 6, 1); | 1408 | L1I = CSHAPE(16*1024, 6, 1); |
1411 | L1D = CSHAPE(8*1024, 5, 1); | 1409 | L1D = CSHAPE(8*1024, 5, 1); |
@@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type) | |||
1415 | } | 1413 | } |
1416 | L3 = -1; | 1414 | L3 = -1; |
1417 | 1415 | ||
1416 | #if 0 | ||
1417 | unsigned long cbox_config, size; | ||
1418 | |||
1418 | cbox_config = *(vulp) phys_to_virt (0xfffff00008UL); | 1419 | cbox_config = *(vulp) phys_to_virt (0xfffff00008UL); |
1419 | size = 512*1024 * (1 << ((cbox_config >> 12) & 3)); | 1420 | size = 512*1024 * (1 << ((cbox_config >> 12) & 3)); |
1420 | 1421 | ||
1421 | #if 0 | ||
1422 | L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1); | 1422 | L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1); |
1423 | #else | 1423 | #else |
1424 | L2 = external_cache_probe(512*1024, 6); | 1424 | L2 = external_cache_probe(512*1024, 6); |
diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c index 3e6a2893af9f..6886b834f487 100644 --- a/arch/alpha/kernel/smc37c93x.c +++ b/arch/alpha/kernel/smc37c93x.c | |||
@@ -79,7 +79,6 @@ | |||
79 | static unsigned long __init SMCConfigState(unsigned long baseAddr) | 79 | static unsigned long __init SMCConfigState(unsigned long baseAddr) |
80 | { | 80 | { |
81 | unsigned char devId; | 81 | unsigned char devId; |
82 | unsigned char devRev; | ||
83 | 82 | ||
84 | unsigned long configPort; | 83 | unsigned long configPort; |
85 | unsigned long indexPort; | 84 | unsigned long indexPort; |
@@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr) | |||
100 | devId = inb(dataPort); | 99 | devId = inb(dataPort); |
101 | if (devId == VALID_DEVICE_ID) { | 100 | if (devId == VALID_DEVICE_ID) { |
102 | outb(DEVICE_REV, indexPort); | 101 | outb(DEVICE_REV, indexPort); |
103 | devRev = inb(dataPort); | 102 | /* unsigned char devRev = */ inb(dataPort); |
104 | break; | 103 | break; |
105 | } | 104 | } |
106 | else | 105 | else |
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index d3cb28bb8eb0..d92cdc715c65 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c | |||
@@ -156,7 +156,6 @@ static void __init | |||
156 | wildfire_init_irq_per_pca(int qbbno, int pcano) | 156 | wildfire_init_irq_per_pca(int qbbno, int pcano) |
157 | { | 157 | { |
158 | int i, irq_bias; | 158 | int i, irq_bias; |
159 | unsigned long io_bias; | ||
160 | static struct irqaction isa_enable = { | 159 | static struct irqaction isa_enable = { |
161 | .handler = no_action, | 160 | .handler = no_action, |
162 | .name = "isa_enable", | 161 | .name = "isa_enable", |
@@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) | |||
165 | irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA) | 164 | irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA) |
166 | + pcano * WILDFIRE_IRQ_PER_PCA; | 165 | + pcano * WILDFIRE_IRQ_PER_PCA; |
167 | 166 | ||
167 | #if 0 | ||
168 | unsigned long io_bias; | ||
169 | |||
168 | /* Only need the following for first PCI bus per PCA. */ | 170 | /* Only need the following for first PCI bus per PCA. */ |
169 | io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS; | 171 | io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS; |
170 | 172 | ||
171 | #if 0 | ||
172 | outb(0, DMA1_RESET_REG + io_bias); | 173 | outb(0, DMA1_RESET_REG + io_bias); |
173 | outb(0, DMA2_RESET_REG + io_bias); | 174 | outb(0, DMA2_RESET_REG + io_bias); |
174 | outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias); | 175 | outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias); |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index a58e84f1a63b..918e8e0b72ff 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -153,6 +153,7 @@ void read_persistent_clock(struct timespec *ts) | |||
153 | year += 100; | 153 | year += 100; |
154 | 154 | ||
155 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); | 155 | ts->tv_sec = mktime(year, mon, day, hour, min, sec); |
156 | ts->tv_nsec = 0; | ||
156 | } | 157 | } |
157 | 158 | ||
158 | 159 | ||
diff --git a/arch/alpha/lib/ev67-strrchr.S b/arch/alpha/lib/ev67-strrchr.S index 3fd8bf414c7b..dd0d8c6b9f59 100644 --- a/arch/alpha/lib/ev67-strrchr.S +++ b/arch/alpha/lib/ev67-strrchr.S | |||
@@ -82,7 +82,7 @@ $loop: | |||
82 | $eos: | 82 | $eos: |
83 | negq t1, t4 # E : isolate first null byte match | 83 | negq t1, t4 # E : isolate first null byte match |
84 | and t1, t4, t4 # E : | 84 | and t1, t4, t4 # E : |
85 | subq t4, 1, t5 # E : build a mask of the bytes upto... | 85 | subq t4, 1, t5 # E : build a mask of the bytes up to... |
86 | or t4, t5, t4 # E : ... and including the null | 86 | or t4, t5, t4 # E : ... and including the null |
87 | 87 | ||
88 | and t3, t4, t3 # E : mask out char matches after null | 88 | and t3, t4, t3 # E : mask out char matches after null |
diff --git a/arch/alpha/lib/fls.c b/arch/alpha/lib/fls.c index 32afaa3fa686..ddd048c0d825 100644 --- a/arch/alpha/lib/fls.c +++ b/arch/alpha/lib/fls.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/bitops.h> | 6 | #include <linux/bitops.h> |
7 | 7 | ||
8 | /* This is fls(x)-1, except zero is held to zero. This allows most | 8 | /* This is fls(x)-1, except zero is held to zero. This allows most |
9 | efficent input into extbl, plus it allows easy handling of fls(0)=0. */ | 9 | efficient input into extbl, plus it allows easy handling of fls(0)=0. */ |
10 | 10 | ||
11 | const unsigned char __flsm1_tab[256] = | 11 | const unsigned char __flsm1_tab[256] = |
12 | { | 12 | { |
diff --git a/arch/alpha/lib/strrchr.S b/arch/alpha/lib/strrchr.S index 82cfd0ac907b..1970dc07cfd1 100644 --- a/arch/alpha/lib/strrchr.S +++ b/arch/alpha/lib/strrchr.S | |||
@@ -54,7 +54,7 @@ $loop: | |||
54 | $eos: | 54 | $eos: |
55 | negq t1, t4 # e0 : isolate first null byte match | 55 | negq t1, t4 # e0 : isolate first null byte match |
56 | and t1, t4, t4 # e1 : | 56 | and t1, t4, t4 # e1 : |
57 | subq t4, 1, t5 # e0 : build a mask of the bytes upto... | 57 | subq t4, 1, t5 # e0 : build a mask of the bytes up to... |
58 | or t4, t5, t4 # e1 : ... and including the null | 58 | or t4, t5, t4 # e1 : ... and including the null |
59 | 59 | ||
60 | and t3, t4, t3 # e0 : mask out char matches after null | 60 | and t3, t4, t3 # e0 : mask out char matches after null |
diff --git a/arch/alpha/oprofile/op_model_ev67.c b/arch/alpha/oprofile/op_model_ev67.c index 70302086283c..5b9d178e0228 100644 --- a/arch/alpha/oprofile/op_model_ev67.c +++ b/arch/alpha/oprofile/op_model_ev67.c | |||
@@ -192,7 +192,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs, | |||
192 | case TRAP_INVALID1: | 192 | case TRAP_INVALID1: |
193 | case TRAP_INVALID2: | 193 | case TRAP_INVALID2: |
194 | case TRAP_INVALID3: | 194 | case TRAP_INVALID3: |
195 | /* Pipeline redirection ocurred. PMPC points | 195 | /* Pipeline redirection occurred. PMPC points |
196 | to PALcode. Recognize ITB miss by PALcode | 196 | to PALcode. Recognize ITB miss by PALcode |
197 | offset address, and get actual PC from | 197 | offset address, and get actual PC from |
198 | EXC_ADDR. */ | 198 | EXC_ADDR. */ |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7c0effb69fc7..377a7a595b08 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -366,6 +366,7 @@ config ARCH_MXC | |||
366 | select GENERIC_CLOCKEVENTS | 366 | select GENERIC_CLOCKEVENTS |
367 | select ARCH_REQUIRE_GPIOLIB | 367 | select ARCH_REQUIRE_GPIOLIB |
368 | select CLKDEV_LOOKUP | 368 | select CLKDEV_LOOKUP |
369 | select HAVE_SCHED_CLOCK | ||
369 | help | 370 | help |
370 | Support for Freescale MXC/iMX-based family of processors | 371 | Support for Freescale MXC/iMX-based family of processors |
371 | 372 | ||
@@ -693,7 +694,7 @@ config ARCH_S3C2410 | |||
693 | the Samsung SMDK2410 development board (and derivatives). | 694 | the Samsung SMDK2410 development board (and derivatives). |
694 | 695 | ||
695 | Note, the S3C2416 and the S3C2450 are so close that they even share | 696 | Note, the S3C2416 and the S3C2450 are so close that they even share |
696 | the same SoC ID code. This means that there is no seperate machine | 697 | the same SoC ID code. This means that there is no separate machine |
697 | directory (no arch/arm/mach-s3c2450) as the S3C2416 was first. | 698 | directory (no arch/arm/mach-s3c2450) as the S3C2416 was first. |
698 | 699 | ||
699 | config ARCH_S3C64XX | 700 | config ARCH_S3C64XX |
@@ -1539,7 +1540,6 @@ config HIGHMEM | |||
1539 | config HIGHPTE | 1540 | config HIGHPTE |
1540 | bool "Allocate 2nd-level pagetables from highmem" | 1541 | bool "Allocate 2nd-level pagetables from highmem" |
1541 | depends on HIGHMEM | 1542 | depends on HIGHMEM |
1542 | depends on !OUTER_CACHE | ||
1543 | 1543 | ||
1544 | config HW_PERF_EVENTS | 1544 | config HW_PERF_EVENTS |
1545 | bool "Enable hardware performance counter support for perf events" | 1545 | bool "Enable hardware performance counter support for perf events" |
@@ -2011,6 +2011,8 @@ source "kernel/power/Kconfig" | |||
2011 | 2011 | ||
2012 | config ARCH_SUSPEND_POSSIBLE | 2012 | config ARCH_SUSPEND_POSSIBLE |
2013 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 | 2013 | depends on !ARCH_S5P64X0 && !ARCH_S5P6442 |
2014 | depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ | ||
2015 | CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE | ||
2014 | def_bool y | 2016 | def_bool y |
2015 | 2017 | ||
2016 | endmenu | 2018 | endmenu |
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu index 901e6dff8437..2cef8e13f9f8 100644 --- a/arch/arm/Kconfig-nommu +++ b/arch/arm/Kconfig-nommu | |||
@@ -34,7 +34,7 @@ config PROCESSOR_ID | |||
34 | used instead of the auto-probing which utilizes the register. | 34 | used instead of the auto-probing which utilizes the register. |
35 | 35 | ||
36 | config REMAP_VECTORS_TO_RAM | 36 | config REMAP_VECTORS_TO_RAM |
37 | bool 'Install vectors to the begining of RAM' if DRAM_BASE | 37 | bool 'Install vectors to the beginning of RAM' if DRAM_BASE |
38 | depends on DRAM_BASE | 38 | depends on DRAM_BASE |
39 | help | 39 | help |
40 | The kernel needs to change the hardware exception vectors. | 40 | The kernel needs to change the hardware exception vectors. |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 494224a9b459..03d01d783e3b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -63,17 +63,6 @@ config DEBUG_USER | |||
63 | 8 - SIGSEGV faults | 63 | 8 - SIGSEGV faults |
64 | 16 - SIGBUS faults | 64 | 16 - SIGBUS faults |
65 | 65 | ||
66 | config DEBUG_ERRORS | ||
67 | bool "Verbose kernel error messages" | ||
68 | depends on DEBUG_KERNEL | ||
69 | help | ||
70 | This option controls verbose debugging information which can be | ||
71 | printed when the kernel detects an internal error. This debugging | ||
72 | information is useful to kernel hackers when tracking down problems, | ||
73 | but mostly meaningless to other people. It's safe to say Y unless | ||
74 | you are concerned with the code size or don't want to see these | ||
75 | messages. | ||
76 | |||
77 | config DEBUG_STACK_USAGE | 66 | config DEBUG_STACK_USAGE |
78 | bool "Enable stack utilization instrumentation" | 67 | bool "Enable stack utilization instrumentation" |
79 | depends on DEBUG_KERNEL | 68 | depends on DEBUG_KERNEL |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index d1fd1cfca9c2..49f5b2eaaa87 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -21,20 +21,12 @@ | |||
21 | 21 | ||
22 | #if defined(CONFIG_DEBUG_ICEDCC) | 22 | #if defined(CONFIG_DEBUG_ICEDCC) |
23 | 23 | ||
24 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 24 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
25 | .macro loadsp, rb, tmp | 25 | .macro loadsp, rb, tmp |
26 | .endm | 26 | .endm |
27 | .macro writeb, ch, rb | 27 | .macro writeb, ch, rb |
28 | mcr p14, 0, \ch, c0, c5, 0 | 28 | mcr p14, 0, \ch, c0, c5, 0 |
29 | .endm | 29 | .endm |
30 | #elif defined(CONFIG_CPU_V7) | ||
31 | .macro loadsp, rb, tmp | ||
32 | .endm | ||
33 | .macro writeb, ch, rb | ||
34 | wait: mrc p14, 0, pc, c0, c1, 0 | ||
35 | bcs wait | ||
36 | mcr p14, 0, \ch, c0, c5, 0 | ||
37 | .endm | ||
38 | #elif defined(CONFIG_CPU_XSCALE) | 30 | #elif defined(CONFIG_CPU_XSCALE) |
39 | .macro loadsp, rb, tmp | 31 | .macro loadsp, rb, tmp |
40 | .endm | 32 | .endm |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 4657e877bf8f..2df38263124c 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -36,7 +36,7 @@ extern void error(char *x); | |||
36 | 36 | ||
37 | #ifdef CONFIG_DEBUG_ICEDCC | 37 | #ifdef CONFIG_DEBUG_ICEDCC |
38 | 38 | ||
39 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 39 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
40 | 40 | ||
41 | static void icedcc_putc(int ch) | 41 | static void icedcc_putc(int ch) |
42 | { | 42 | { |
@@ -52,16 +52,6 @@ static void icedcc_putc(int ch) | |||
52 | asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); | 52 | asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); |
53 | } | 53 | } |
54 | 54 | ||
55 | #elif defined(CONFIG_CPU_V7) | ||
56 | |||
57 | static void icedcc_putc(int ch) | ||
58 | { | ||
59 | asm( | ||
60 | "wait: mrc p14, 0, pc, c0, c1, 0 \n\ | ||
61 | bcs wait \n\ | ||
62 | mcr p14, 0, %0, c0, c5, 0 " | ||
63 | : : "r" (ch)); | ||
64 | } | ||
65 | 55 | ||
66 | #elif defined(CONFIG_CPU_XSCALE) | 56 | #elif defined(CONFIG_CPU_XSCALE) |
67 | 57 | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index e7521bca2c35..6ea9b6f3607a 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -16,5 +16,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 16 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 18 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
19 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
20 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 19 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 8f0f86db3602..97912fa48782 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1045,7 +1045,7 @@ static inline int _loop(unsigned dry_run, u8 buf[], | |||
1045 | unsigned lcnt0, lcnt1, ljmp0, ljmp1; | 1045 | unsigned lcnt0, lcnt1, ljmp0, ljmp1; |
1046 | struct _arg_LPEND lpend; | 1046 | struct _arg_LPEND lpend; |
1047 | 1047 | ||
1048 | /* Max iterations possibile in DMALP is 256 */ | 1048 | /* Max iterations possible in DMALP is 256 */ |
1049 | if (*bursts >= 256*256) { | 1049 | if (*bursts >= 256*256) { |
1050 | lcnt1 = 256; | 1050 | lcnt1 = 256; |
1051 | lcnt0 = 256; | 1051 | lcnt0 = 256; |
@@ -1446,7 +1446,7 @@ int pl330_update(const struct pl330_info *pi) | |||
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | for (ev = 0; ev < pi->pcfg.num_events; ev++) { | 1448 | for (ev = 0; ev < pi->pcfg.num_events; ev++) { |
1449 | if (val & (1 << ev)) { /* Event occured */ | 1449 | if (val & (1 << ev)) { /* Event occurred */ |
1450 | struct pl330_thread *thrd; | 1450 | struct pl330_thread *thrd; |
1451 | u32 inten = readl(regs + INTEN); | 1451 | u32 inten = readl(regs + INTEN); |
1452 | int active; | 1452 | int active; |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index ed5bc9e05a4e..cd4458f64171 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_ARM_CPUTYPE_H | 2 | #define __ASM_ARM_CPUTYPE_H |
3 | 3 | ||
4 | #include <linux/stringify.h> | 4 | #include <linux/stringify.h> |
5 | #include <linux/kernel.h> | ||
5 | 6 | ||
6 | #define CPUID_ID 0 | 7 | #define CPUID_ID 0 |
7 | #define CPUID_CACHETYPE 1 | 8 | #define CPUID_CACHETYPE 1 |
diff --git a/arch/arm/include/asm/fpstate.h b/arch/arm/include/asm/fpstate.h index ee5e03efc1bb..3ad4c10d0d84 100644 --- a/arch/arm/include/asm/fpstate.h +++ b/arch/arm/include/asm/fpstate.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * VFP storage area has: | 18 | * VFP storage area has: |
19 | * - FPEXC, FPSCR, FPINST and FPINST2. | 19 | * - FPEXC, FPSCR, FPINST and FPINST2. |
20 | * - 16 or 32 double precision data registers | 20 | * - 16 or 32 double precision data registers |
21 | * - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6) | 21 | * - an implementation-dependent word of state for FLDMX/FSTMX (pre-ARMv6) |
22 | * | 22 | * |
23 | * FPEXC will always be non-zero once the VFP has been used in this process. | 23 | * FPEXC will always be non-zero once the VFP has been used in this process. |
24 | */ | 24 | */ |
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h index c7afbc552c7f..7e30874377e6 100644 --- a/arch/arm/include/asm/glue-cache.h +++ b/arch/arm/include/asm/glue-cache.h | |||
@@ -126,7 +126,7 @@ | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) | 128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) |
129 | #error Unknown cache maintainence model | 129 | #error Unknown cache maintenance model |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #ifndef MULTI_CACHE | 132 | #ifndef MULTI_CACHE |
diff --git a/arch/arm/include/asm/glue.h b/arch/arm/include/asm/glue.h index 0ec35d1698aa..fbf71d75ec83 100644 --- a/arch/arm/include/asm/glue.h +++ b/arch/arm/include/asm/glue.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * | 10 | * |
11 | * This file provides the glue to stick the processor-specific bits | 11 | * This file provides the glue to stick the processor-specific bits |
12 | * into the kernel in an efficient manner. The idea is to use branches | 12 | * into the kernel in an efficient manner. The idea is to use branches |
13 | * when we're only targetting one class of TLB, or indirect calls | 13 | * when we're only targeting one class of TLB, or indirect calls |
14 | * when we're targetting multiple classes of TLBs. | 14 | * when we're targeting multiple classes of TLBs. |
15 | */ | 15 | */ |
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
diff --git a/arch/arm/include/asm/hardware/pl080.h b/arch/arm/include/asm/hardware/pl080.h index f35b86e68dd5..e4a04e4e5627 100644 --- a/arch/arm/include/asm/hardware/pl080.h +++ b/arch/arm/include/asm/hardware/pl080.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * make it not entierly compatible with the PL080 specification from | 16 | * make it not entierly compatible with the PL080 specification from |
17 | * ARM. When in doubt, check the Samsung documentation first. | 17 | * ARM. When in doubt, check the Samsung documentation first. |
18 | * | 18 | * |
19 | * The Samsung defines are PL080S, and add an extra controll register, | 19 | * The Samsung defines are PL080S, and add an extra control register, |
20 | * the ability to move more than 2^11 counts of data and some extra | 20 | * the ability to move more than 2^11 counts of data and some extra |
21 | * OneNAND features. | 21 | * OneNAND features. |
22 | */ | 22 | */ |
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index bb8a19bd5822..e46bdd0097eb 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h | |||
@@ -39,10 +39,13 @@ typedef u32 kprobe_opcode_t; | |||
39 | struct kprobe; | 39 | struct kprobe; |
40 | typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); | 40 | typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); |
41 | 41 | ||
42 | typedef unsigned long (kprobe_check_cc)(unsigned long); | ||
43 | |||
42 | /* Architecture specific copy of original instruction. */ | 44 | /* Architecture specific copy of original instruction. */ |
43 | struct arch_specific_insn { | 45 | struct arch_specific_insn { |
44 | kprobe_opcode_t *insn; | 46 | kprobe_opcode_t *insn; |
45 | kprobe_insn_handler_t *insn_handler; | 47 | kprobe_insn_handler_t *insn_handler; |
48 | kprobe_check_cc *insn_check_cc; | ||
46 | }; | 49 | }; |
47 | 50 | ||
48 | struct prev_kprobe { | 51 | struct prev_kprobe { |
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index 833306ee9e7f..ea297ac70bc6 100644 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
@@ -20,8 +20,6 @@ struct pxa2xx_udc_mach_info { | |||
20 | * VBUS IRQ and omit the methods above. Store the GPIO number | 20 | * VBUS IRQ and omit the methods above. Store the GPIO number |
21 | * here. Note that sometimes the signals go through inverters... | 21 | * here. Note that sometimes the signals go through inverters... |
22 | */ | 22 | */ |
23 | bool gpio_vbus_inverted; | ||
24 | int gpio_vbus; /* high == vbus present */ | ||
25 | bool gpio_pullup_inverted; | 23 | bool gpio_pullup_inverted; |
26 | int gpio_pullup; /* high == pullup activated */ | 24 | int gpio_pullup; /* high == pullup activated */ |
27 | }; | 25 | }; |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 9a87823642d0..885be097769d 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -249,7 +249,7 @@ do { \ | |||
249 | * cache totally. This means that the cache becomes inconsistent, and, | 249 | * cache totally. This means that the cache becomes inconsistent, and, |
250 | * since we use normal loads/stores as well, this is really bad. | 250 | * since we use normal loads/stores as well, this is really bad. |
251 | * Typically, this causes oopsen in filp_close, but could have other, | 251 | * Typically, this causes oopsen in filp_close, but could have other, |
252 | * more disasterous effects. There are two work-arounds: | 252 | * more disastrous effects. There are two work-arounds: |
253 | * 1. Disable interrupts and emulate the atomic swap | 253 | * 1. Disable interrupts and emulate the atomic swap |
254 | * 2. Clean the cache, perform atomic swap, flush the cache | 254 | * 2. Clean the cache, perform atomic swap, flush the cache |
255 | * | 255 | * |
diff --git a/arch/arm/include/asm/thread_notify.h b/arch/arm/include/asm/thread_notify.h index c4391ba20350..1dc980675894 100644 --- a/arch/arm/include/asm/thread_notify.h +++ b/arch/arm/include/asm/thread_notify.h | |||
@@ -43,6 +43,7 @@ static inline void thread_notify(unsigned long rc, struct thread_info *thread) | |||
43 | #define THREAD_NOTIFY_FLUSH 0 | 43 | #define THREAD_NOTIFY_FLUSH 0 |
44 | #define THREAD_NOTIFY_EXIT 1 | 44 | #define THREAD_NOTIFY_EXIT 1 |
45 | #define THREAD_NOTIFY_SWITCH 2 | 45 | #define THREAD_NOTIFY_SWITCH 2 |
46 | #define THREAD_NOTIFY_COPY 3 | ||
46 | 47 | ||
47 | #endif | 48 | #endif |
48 | #endif | 49 | #endif |
diff --git a/arch/arm/include/asm/ucontext.h b/arch/arm/include/asm/ucontext.h index 47f023aa8495..14749aec94bf 100644 --- a/arch/arm/include/asm/ucontext.h +++ b/arch/arm/include/asm/ucontext.h | |||
@@ -47,7 +47,7 @@ struct crunch_sigframe { | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef CONFIG_IWMMXT | 49 | #ifdef CONFIG_IWMMXT |
50 | /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ | 50 | /* iwmmxt_area is 0x98 bytes long, preceded by 8 bytes of signature */ |
51 | #define IWMMXT_MAGIC 0x12ef842a | 51 | #define IWMMXT_MAGIC 0x12ef842a |
52 | #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) | 52 | #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) |
53 | 53 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index c891eb76c0e3..87dbe3e21970 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -396,6 +396,10 @@ | |||
396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) | 396 | #define __NR_fanotify_init (__NR_SYSCALL_BASE+367) |
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | 397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) |
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | 398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) |
399 | #define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) | ||
400 | #define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) | ||
401 | #define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) | ||
402 | #define __NR_syncfs (__NR_SYSCALL_BASE+373) | ||
399 | 403 | ||
400 | /* | 404 | /* |
401 | * The following SWIs are ARM private. | 405 | * The following SWIs are ARM private. |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 74554f1742d7..8d95446150a3 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES) += armksyms.o module.o | |||
29 | obj-$(CONFIG_ARTHUR) += arthur.o | 29 | obj-$(CONFIG_ARTHUR) += arthur.o |
30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o | 30 | obj-$(CONFIG_ISA_DMA) += dma-isa.o |
31 | obj-$(CONFIG_PCI) += bios32.o isa.o | 31 | obj-$(CONFIG_PCI) += bios32.o isa.o |
32 | obj-$(CONFIG_PM) += sleep.o | 32 | obj-$(CONFIG_PM_SLEEP) += sleep.o |
33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o | 33 | obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o |
34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 5c26eccef998..7fbf28c35bb2 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -379,6 +379,10 @@ | |||
379 | CALL(sys_fanotify_init) | 379 | CALL(sys_fanotify_init) |
380 | CALL(sys_fanotify_mark) | 380 | CALL(sys_fanotify_mark) |
381 | CALL(sys_prlimit64) | 381 | CALL(sys_prlimit64) |
382 | /* 370 */ CALL(sys_name_to_handle_at) | ||
383 | CALL(sys_open_by_handle_at) | ||
384 | CALL(sys_clock_adjtime) | ||
385 | CALL(sys_syncfs) | ||
382 | #ifndef syscalls_counted | 386 | #ifndef syscalls_counted |
383 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 387 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
384 | #define syscalls_counted | 388 | #define syscalls_counted |
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index d2d983be096d..bcd66e00bdbe 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
@@ -25,7 +25,7 @@ | |||
25 | .macro addruart, rp, rv | 25 | .macro addruart, rp, rv |
26 | .endm | 26 | .endm |
27 | 27 | ||
28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 28 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) |
29 | 29 | ||
30 | .macro senduart, rd, rx | 30 | .macro senduart, rd, rx |
31 | mcr p14, 0, \rd, c0, c5, 0 | 31 | mcr p14, 0, \rd, c0, c5, 0 |
@@ -49,23 +49,6 @@ | |||
49 | 1002: | 49 | 1002: |
50 | .endm | 50 | .endm |
51 | 51 | ||
52 | #elif defined(CONFIG_CPU_V7) | ||
53 | |||
54 | .macro senduart, rd, rx | ||
55 | mcr p14, 0, \rd, c0, c5, 0 | ||
56 | .endm | ||
57 | |||
58 | .macro busyuart, rd, rx | ||
59 | busy: mrc p14, 0, pc, c0, c1, 0 | ||
60 | bcs busy | ||
61 | .endm | ||
62 | |||
63 | .macro waituart, rd, rx | ||
64 | wait: mrc p14, 0, pc, c0, c1, 0 | ||
65 | bcs wait | ||
66 | |||
67 | .endm | ||
68 | |||
69 | #elif defined(CONFIG_CPU_XSCALE) | 52 | #elif defined(CONFIG_CPU_XSCALE) |
70 | 53 | ||
71 | .macro senduart, rd, rx | 54 | .macro senduart, rd, rx |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index d4a0da1e48f4..9b05c6a0dcea 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -40,15 +40,22 @@ EXPORT_SYMBOL(elf_check_arch); | |||
40 | void elf_set_personality(const struct elf32_hdr *x) | 40 | void elf_set_personality(const struct elf32_hdr *x) |
41 | { | 41 | { |
42 | unsigned int eflags = x->e_flags; | 42 | unsigned int eflags = x->e_flags; |
43 | unsigned int personality = PER_LINUX_32BIT; | 43 | unsigned int personality = current->personality & ~PER_MASK; |
44 | |||
45 | /* | ||
46 | * We only support Linux ELF executables, so always set the | ||
47 | * personality to LINUX. | ||
48 | */ | ||
49 | personality |= PER_LINUX; | ||
44 | 50 | ||
45 | /* | 51 | /* |
46 | * APCS-26 is only valid for OABI executables | 52 | * APCS-26 is only valid for OABI executables |
47 | */ | 53 | */ |
48 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { | 54 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN && |
49 | if (eflags & EF_ARM_APCS_26) | 55 | (eflags & EF_ARM_APCS_26)) |
50 | personality = PER_LINUX; | 56 | personality &= ~ADDR_LIMIT_32BIT; |
51 | } | 57 | else |
58 | personality |= ADDR_LIMIT_32BIT; | ||
52 | 59 | ||
53 | set_personality(personality); | 60 | set_personality(personality); |
54 | 61 | ||
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c index 052b509e2d5f..1bec8b5f22f0 100644 --- a/arch/arm/kernel/etm.c +++ b/arch/arm/kernel/etm.c | |||
@@ -338,7 +338,7 @@ static struct miscdevice etb_miscdev = { | |||
338 | .fops = &etb_fops, | 338 | .fops = &etb_fops, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static int __init etb_probe(struct amba_device *dev, const struct amba_id *id) | 341 | static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id) |
342 | { | 342 | { |
343 | struct tracectx *t = &tracer; | 343 | struct tracectx *t = &tracer; |
344 | int ret = 0; | 344 | int ret = 0; |
@@ -530,7 +530,7 @@ static ssize_t trace_mode_store(struct kobject *kobj, | |||
530 | static struct kobj_attribute trace_mode_attr = | 530 | static struct kobj_attribute trace_mode_attr = |
531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); | 531 | __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); |
532 | 532 | ||
533 | static int __init etm_probe(struct amba_device *dev, const struct amba_id *id) | 533 | static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id) |
534 | { | 534 | { |
535 | struct tracectx *t = &tracer; | 535 | struct tracectx *t = &tracer; |
536 | int ret = 0; | 536 | int ret = 0; |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 8dbc126f7152..87acc25d7a3e 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info) | |||
868 | */ | 868 | */ |
869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); | 869 | asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0)); |
870 | isb(); | 870 | isb(); |
871 | |||
872 | /* | ||
873 | * Clear any configured vector-catch events before | ||
874 | * enabling monitor mode. | ||
875 | */ | ||
876 | asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0)); | ||
877 | isb(); | ||
871 | } | 878 | } |
872 | 879 | ||
873 | if (enable_monitor_mode()) | 880 | if (enable_monitor_mode()) |
diff --git a/arch/arm/kernel/kprobes-decode.c b/arch/arm/kernel/kprobes-decode.c index 8f6ed43861f1..15eeff6aea0e 100644 --- a/arch/arm/kernel/kprobes-decode.c +++ b/arch/arm/kernel/kprobes-decode.c | |||
@@ -34,9 +34,6 @@ | |||
34 | * | 34 | * |
35 | * *) If the PC is written to by the instruction, the | 35 | * *) If the PC is written to by the instruction, the |
36 | * instruction must be fully simulated in software. | 36 | * instruction must be fully simulated in software. |
37 | * If it is a conditional instruction, the handler | ||
38 | * will use insn[0] to copy its condition code to | ||
39 | * set r0 to 1 and insn[1] to "mov pc, lr" to return. | ||
40 | * | 37 | * |
41 | * *) Otherwise, a modified form of the instruction is | 38 | * *) Otherwise, a modified form of the instruction is |
42 | * directly executed. Its handler calls the | 39 | * directly executed. Its handler calls the |
@@ -68,13 +65,17 @@ | |||
68 | 65 | ||
69 | #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) | 66 | #define branch_displacement(insn) sign_extend(((insn) & 0xffffff) << 2, 25) |
70 | 67 | ||
68 | #define is_r15(insn, bitpos) (((insn) & (0xf << bitpos)) == (0xf << bitpos)) | ||
69 | |||
70 | /* | ||
71 | * Test if load/store instructions writeback the address register. | ||
72 | * if P (bit 24) == 0 or W (bit 21) == 1 | ||
73 | */ | ||
74 | #define is_writeback(insn) ((insn ^ 0x01000000) & 0x01200000) | ||
75 | |||
71 | #define PSR_fs (PSR_f|PSR_s) | 76 | #define PSR_fs (PSR_f|PSR_s) |
72 | 77 | ||
73 | #define KPROBE_RETURN_INSTRUCTION 0xe1a0f00e /* mov pc, lr */ | 78 | #define KPROBE_RETURN_INSTRUCTION 0xe1a0f00e /* mov pc, lr */ |
74 | #define SET_R0_TRUE_INSTRUCTION 0xe3a00001 /* mov r0, #1 */ | ||
75 | |||
76 | #define truecc_insn(insn) (((insn) & 0xf0000000) | \ | ||
77 | (SET_R0_TRUE_INSTRUCTION & 0x0fffffff)) | ||
78 | 79 | ||
79 | typedef long (insn_0arg_fn_t)(void); | 80 | typedef long (insn_0arg_fn_t)(void); |
80 | typedef long (insn_1arg_fn_t)(long); | 81 | typedef long (insn_1arg_fn_t)(long); |
@@ -419,14 +420,10 @@ insnslot_llret_4arg_rwflags(long r0, long r1, long r2, long r3, long *cpsr, | |||
419 | 420 | ||
420 | static void __kprobes simulate_bbl(struct kprobe *p, struct pt_regs *regs) | 421 | static void __kprobes simulate_bbl(struct kprobe *p, struct pt_regs *regs) |
421 | { | 422 | { |
422 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
423 | kprobe_opcode_t insn = p->opcode; | 423 | kprobe_opcode_t insn = p->opcode; |
424 | long iaddr = (long)p->addr; | 424 | long iaddr = (long)p->addr; |
425 | int disp = branch_displacement(insn); | 425 | int disp = branch_displacement(insn); |
426 | 426 | ||
427 | if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn)) | ||
428 | return; | ||
429 | |||
430 | if (insn & (1 << 24)) | 427 | if (insn & (1 << 24)) |
431 | regs->ARM_lr = iaddr + 4; | 428 | regs->ARM_lr = iaddr + 4; |
432 | 429 | ||
@@ -446,14 +443,10 @@ static void __kprobes simulate_blx1(struct kprobe *p, struct pt_regs *regs) | |||
446 | 443 | ||
447 | static void __kprobes simulate_blx2bx(struct kprobe *p, struct pt_regs *regs) | 444 | static void __kprobes simulate_blx2bx(struct kprobe *p, struct pt_regs *regs) |
448 | { | 445 | { |
449 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
450 | kprobe_opcode_t insn = p->opcode; | 446 | kprobe_opcode_t insn = p->opcode; |
451 | int rm = insn & 0xf; | 447 | int rm = insn & 0xf; |
452 | long rmv = regs->uregs[rm]; | 448 | long rmv = regs->uregs[rm]; |
453 | 449 | ||
454 | if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn)) | ||
455 | return; | ||
456 | |||
457 | if (insn & (1 << 5)) | 450 | if (insn & (1 << 5)) |
458 | regs->ARM_lr = (long)p->addr + 4; | 451 | regs->ARM_lr = (long)p->addr + 4; |
459 | 452 | ||
@@ -463,9 +456,16 @@ static void __kprobes simulate_blx2bx(struct kprobe *p, struct pt_regs *regs) | |||
463 | regs->ARM_cpsr |= PSR_T_BIT; | 456 | regs->ARM_cpsr |= PSR_T_BIT; |
464 | } | 457 | } |
465 | 458 | ||
459 | static void __kprobes simulate_mrs(struct kprobe *p, struct pt_regs *regs) | ||
460 | { | ||
461 | kprobe_opcode_t insn = p->opcode; | ||
462 | int rd = (insn >> 12) & 0xf; | ||
463 | unsigned long mask = 0xf8ff03df; /* Mask out execution state */ | ||
464 | regs->uregs[rd] = regs->ARM_cpsr & mask; | ||
465 | } | ||
466 | |||
466 | static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) | 467 | static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) |
467 | { | 468 | { |
468 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
469 | kprobe_opcode_t insn = p->opcode; | 469 | kprobe_opcode_t insn = p->opcode; |
470 | int rn = (insn >> 16) & 0xf; | 470 | int rn = (insn >> 16) & 0xf; |
471 | int lbit = insn & (1 << 20); | 471 | int lbit = insn & (1 << 20); |
@@ -476,9 +476,6 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) | |||
476 | int reg_bit_vector; | 476 | int reg_bit_vector; |
477 | int reg_count; | 477 | int reg_count; |
478 | 478 | ||
479 | if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn)) | ||
480 | return; | ||
481 | |||
482 | reg_count = 0; | 479 | reg_count = 0; |
483 | reg_bit_vector = insn & 0xffff; | 480 | reg_bit_vector = insn & 0xffff; |
484 | while (reg_bit_vector) { | 481 | while (reg_bit_vector) { |
@@ -510,11 +507,6 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs) | |||
510 | 507 | ||
511 | static void __kprobes simulate_stm1_pc(struct kprobe *p, struct pt_regs *regs) | 508 | static void __kprobes simulate_stm1_pc(struct kprobe *p, struct pt_regs *regs) |
512 | { | 509 | { |
513 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
514 | |||
515 | if (!insnslot_1arg_rflags(0, regs->ARM_cpsr, i_fn)) | ||
516 | return; | ||
517 | |||
518 | regs->ARM_pc = (long)p->addr + str_pc_offset; | 510 | regs->ARM_pc = (long)p->addr + str_pc_offset; |
519 | simulate_ldm1stm1(p, regs); | 511 | simulate_ldm1stm1(p, regs); |
520 | regs->ARM_pc = (long)p->addr + 4; | 512 | regs->ARM_pc = (long)p->addr + 4; |
@@ -525,24 +517,16 @@ static void __kprobes simulate_mov_ipsp(struct kprobe *p, struct pt_regs *regs) | |||
525 | regs->uregs[12] = regs->uregs[13]; | 517 | regs->uregs[12] = regs->uregs[13]; |
526 | } | 518 | } |
527 | 519 | ||
528 | static void __kprobes emulate_ldcstc(struct kprobe *p, struct pt_regs *regs) | ||
529 | { | ||
530 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
531 | kprobe_opcode_t insn = p->opcode; | ||
532 | int rn = (insn >> 16) & 0xf; | ||
533 | long rnv = regs->uregs[rn]; | ||
534 | |||
535 | /* Save Rn in case of writeback. */ | ||
536 | regs->uregs[rn] = insnslot_1arg_rflags(rnv, regs->ARM_cpsr, i_fn); | ||
537 | } | ||
538 | |||
539 | static void __kprobes emulate_ldrd(struct kprobe *p, struct pt_regs *regs) | 520 | static void __kprobes emulate_ldrd(struct kprobe *p, struct pt_regs *regs) |
540 | { | 521 | { |
541 | insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0]; | 522 | insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0]; |
542 | kprobe_opcode_t insn = p->opcode; | 523 | kprobe_opcode_t insn = p->opcode; |
524 | long ppc = (long)p->addr + 8; | ||
543 | int rd = (insn >> 12) & 0xf; | 525 | int rd = (insn >> 12) & 0xf; |
544 | int rn = (insn >> 16) & 0xf; | 526 | int rn = (insn >> 16) & 0xf; |
545 | int rm = insn & 0xf; /* rm may be invalid, don't care. */ | 527 | int rm = insn & 0xf; /* rm may be invalid, don't care. */ |
528 | long rmv = (rm == 15) ? ppc : regs->uregs[rm]; | ||
529 | long rnv = (rn == 15) ? ppc : regs->uregs[rn]; | ||
546 | 530 | ||
547 | /* Not following the C calling convention here, so need asm(). */ | 531 | /* Not following the C calling convention here, so need asm(). */ |
548 | __asm__ __volatile__ ( | 532 | __asm__ __volatile__ ( |
@@ -554,29 +538,36 @@ static void __kprobes emulate_ldrd(struct kprobe *p, struct pt_regs *regs) | |||
554 | "str r0, %[rn] \n\t" /* in case of writeback */ | 538 | "str r0, %[rn] \n\t" /* in case of writeback */ |
555 | "str r2, %[rd0] \n\t" | 539 | "str r2, %[rd0] \n\t" |
556 | "str r3, %[rd1] \n\t" | 540 | "str r3, %[rd1] \n\t" |
557 | : [rn] "+m" (regs->uregs[rn]), | 541 | : [rn] "+m" (rnv), |
558 | [rd0] "=m" (regs->uregs[rd]), | 542 | [rd0] "=m" (regs->uregs[rd]), |
559 | [rd1] "=m" (regs->uregs[rd+1]) | 543 | [rd1] "=m" (regs->uregs[rd+1]) |
560 | : [rm] "m" (regs->uregs[rm]), | 544 | : [rm] "m" (rmv), |
561 | [cpsr] "r" (regs->ARM_cpsr), | 545 | [cpsr] "r" (regs->ARM_cpsr), |
562 | [i_fn] "r" (i_fn) | 546 | [i_fn] "r" (i_fn) |
563 | : "r0", "r1", "r2", "r3", "lr", "cc" | 547 | : "r0", "r1", "r2", "r3", "lr", "cc" |
564 | ); | 548 | ); |
549 | if (is_writeback(insn)) | ||
550 | regs->uregs[rn] = rnv; | ||
565 | } | 551 | } |
566 | 552 | ||
567 | static void __kprobes emulate_strd(struct kprobe *p, struct pt_regs *regs) | 553 | static void __kprobes emulate_strd(struct kprobe *p, struct pt_regs *regs) |
568 | { | 554 | { |
569 | insn_4arg_fn_t *i_fn = (insn_4arg_fn_t *)&p->ainsn.insn[0]; | 555 | insn_4arg_fn_t *i_fn = (insn_4arg_fn_t *)&p->ainsn.insn[0]; |
570 | kprobe_opcode_t insn = p->opcode; | 556 | kprobe_opcode_t insn = p->opcode; |
557 | long ppc = (long)p->addr + 8; | ||
571 | int rd = (insn >> 12) & 0xf; | 558 | int rd = (insn >> 12) & 0xf; |
572 | int rn = (insn >> 16) & 0xf; | 559 | int rn = (insn >> 16) & 0xf; |
573 | int rm = insn & 0xf; | 560 | int rm = insn & 0xf; |
574 | long rnv = regs->uregs[rn]; | 561 | long rnv = (rn == 15) ? ppc : regs->uregs[rn]; |
575 | long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ | 562 | /* rm/rmv may be invalid, don't care. */ |
563 | long rmv = (rm == 15) ? ppc : regs->uregs[rm]; | ||
564 | long rnv_wb; | ||
576 | 565 | ||
577 | regs->uregs[rn] = insnslot_4arg_rflags(rnv, rmv, regs->uregs[rd], | 566 | rnv_wb = insnslot_4arg_rflags(rnv, rmv, regs->uregs[rd], |
578 | regs->uregs[rd+1], | 567 | regs->uregs[rd+1], |
579 | regs->ARM_cpsr, i_fn); | 568 | regs->ARM_cpsr, i_fn); |
569 | if (is_writeback(insn)) | ||
570 | regs->uregs[rn] = rnv_wb; | ||
580 | } | 571 | } |
581 | 572 | ||
582 | static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) | 573 | static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) |
@@ -594,7 +585,8 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs) | |||
594 | long cpsr = regs->ARM_cpsr; | 585 | long cpsr = regs->ARM_cpsr; |
595 | 586 | ||
596 | fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn); | 587 | fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn); |
597 | regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */ | 588 | if (rn != 15) |
589 | regs->uregs[rn] = fnr.r0; /* Save Rn in case of writeback. */ | ||
598 | rdv = fnr.r1; | 590 | rdv = fnr.r1; |
599 | 591 | ||
600 | if (rd == 15) { | 592 | if (rd == 15) { |
@@ -622,35 +614,11 @@ static void __kprobes emulate_str(struct kprobe *p, struct pt_regs *regs) | |||
622 | long rdv = (rd == 15) ? iaddr + str_pc_offset : regs->uregs[rd]; | 614 | long rdv = (rd == 15) ? iaddr + str_pc_offset : regs->uregs[rd]; |
623 | long rnv = (rn == 15) ? iaddr + 8 : regs->uregs[rn]; | 615 | long rnv = (rn == 15) ? iaddr + 8 : regs->uregs[rn]; |
624 | long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ | 616 | long rmv = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */ |
617 | long rnv_wb; | ||
625 | 618 | ||
626 | /* Save Rn in case of writeback. */ | 619 | rnv_wb = insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn); |
627 | regs->uregs[rn] = | 620 | if (rn != 15) |
628 | insnslot_3arg_rflags(rnv, rdv, rmv, regs->ARM_cpsr, i_fn); | 621 | regs->uregs[rn] = rnv_wb; /* Save Rn in case of writeback. */ |
629 | } | ||
630 | |||
631 | static void __kprobes emulate_mrrc(struct kprobe *p, struct pt_regs *regs) | ||
632 | { | ||
633 | insn_llret_0arg_fn_t *i_fn = (insn_llret_0arg_fn_t *)&p->ainsn.insn[0]; | ||
634 | kprobe_opcode_t insn = p->opcode; | ||
635 | union reg_pair fnr; | ||
636 | int rd = (insn >> 12) & 0xf; | ||
637 | int rn = (insn >> 16) & 0xf; | ||
638 | |||
639 | fnr.dr = insnslot_llret_0arg_rflags(regs->ARM_cpsr, i_fn); | ||
640 | regs->uregs[rn] = fnr.r0; | ||
641 | regs->uregs[rd] = fnr.r1; | ||
642 | } | ||
643 | |||
644 | static void __kprobes emulate_mcrr(struct kprobe *p, struct pt_regs *regs) | ||
645 | { | ||
646 | insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0]; | ||
647 | kprobe_opcode_t insn = p->opcode; | ||
648 | int rd = (insn >> 12) & 0xf; | ||
649 | int rn = (insn >> 16) & 0xf; | ||
650 | long rnv = regs->uregs[rn]; | ||
651 | long rdv = regs->uregs[rd]; | ||
652 | |||
653 | insnslot_2arg_rflags(rnv, rdv, regs->ARM_cpsr, i_fn); | ||
654 | } | 622 | } |
655 | 623 | ||
656 | static void __kprobes emulate_sat(struct kprobe *p, struct pt_regs *regs) | 624 | static void __kprobes emulate_sat(struct kprobe *p, struct pt_regs *regs) |
@@ -686,32 +654,32 @@ static void __kprobes emulate_none(struct kprobe *p, struct pt_regs *regs) | |||
686 | insnslot_0arg_rflags(regs->ARM_cpsr, i_fn); | 654 | insnslot_0arg_rflags(regs->ARM_cpsr, i_fn); |
687 | } | 655 | } |
688 | 656 | ||
689 | static void __kprobes emulate_rd12(struct kprobe *p, struct pt_regs *regs) | 657 | static void __kprobes emulate_nop(struct kprobe *p, struct pt_regs *regs) |
690 | { | 658 | { |
691 | insn_0arg_fn_t *i_fn = (insn_0arg_fn_t *)&p->ainsn.insn[0]; | ||
692 | kprobe_opcode_t insn = p->opcode; | ||
693 | int rd = (insn >> 12) & 0xf; | ||
694 | |||
695 | regs->uregs[rd] = insnslot_0arg_rflags(regs->ARM_cpsr, i_fn); | ||
696 | } | 659 | } |
697 | 660 | ||
698 | static void __kprobes emulate_ird12(struct kprobe *p, struct pt_regs *regs) | 661 | static void __kprobes |
662 | emulate_rd12_modify(struct kprobe *p, struct pt_regs *regs) | ||
699 | { | 663 | { |
700 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | 664 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; |
701 | kprobe_opcode_t insn = p->opcode; | 665 | kprobe_opcode_t insn = p->opcode; |
702 | int ird = (insn >> 12) & 0xf; | 666 | int rd = (insn >> 12) & 0xf; |
667 | long rdv = regs->uregs[rd]; | ||
703 | 668 | ||
704 | insnslot_1arg_rflags(regs->uregs[ird], regs->ARM_cpsr, i_fn); | 669 | regs->uregs[rd] = insnslot_1arg_rflags(rdv, regs->ARM_cpsr, i_fn); |
705 | } | 670 | } |
706 | 671 | ||
707 | static void __kprobes emulate_rn16(struct kprobe *p, struct pt_regs *regs) | 672 | static void __kprobes |
673 | emulate_rd12rn0_modify(struct kprobe *p, struct pt_regs *regs) | ||
708 | { | 674 | { |
709 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | 675 | insn_2arg_fn_t *i_fn = (insn_2arg_fn_t *)&p->ainsn.insn[0]; |
710 | kprobe_opcode_t insn = p->opcode; | 676 | kprobe_opcode_t insn = p->opcode; |
711 | int rn = (insn >> 16) & 0xf; | 677 | int rd = (insn >> 12) & 0xf; |
678 | int rn = insn & 0xf; | ||
679 | long rdv = regs->uregs[rd]; | ||
712 | long rnv = regs->uregs[rn]; | 680 | long rnv = regs->uregs[rn]; |
713 | 681 | ||
714 | insnslot_1arg_rflags(rnv, regs->ARM_cpsr, i_fn); | 682 | regs->uregs[rd] = insnslot_2arg_rflags(rdv, rnv, regs->ARM_cpsr, i_fn); |
715 | } | 683 | } |
716 | 684 | ||
717 | static void __kprobes emulate_rd12rm0(struct kprobe *p, struct pt_regs *regs) | 685 | static void __kprobes emulate_rd12rm0(struct kprobe *p, struct pt_regs *regs) |
@@ -817,6 +785,17 @@ emulate_alu_imm_rwflags(struct kprobe *p, struct pt_regs *regs) | |||
817 | } | 785 | } |
818 | 786 | ||
819 | static void __kprobes | 787 | static void __kprobes |
788 | emulate_alu_tests_imm(struct kprobe *p, struct pt_regs *regs) | ||
789 | { | ||
790 | insn_1arg_fn_t *i_fn = (insn_1arg_fn_t *)&p->ainsn.insn[0]; | ||
791 | kprobe_opcode_t insn = p->opcode; | ||
792 | int rn = (insn >> 16) & 0xf; | ||
793 | long rnv = (rn == 15) ? (long)p->addr + 8 : regs->uregs[rn]; | ||
794 | |||
795 | insnslot_1arg_rwflags(rnv, ®s->ARM_cpsr, i_fn); | ||
796 | } | ||
797 | |||
798 | static void __kprobes | ||
820 | emulate_alu_rflags(struct kprobe *p, struct pt_regs *regs) | 799 | emulate_alu_rflags(struct kprobe *p, struct pt_regs *regs) |
821 | { | 800 | { |
822 | insn_3arg_fn_t *i_fn = (insn_3arg_fn_t *)&p->ainsn.insn[0]; | 801 | insn_3arg_fn_t *i_fn = (insn_3arg_fn_t *)&p->ainsn.insn[0]; |
@@ -852,14 +831,34 @@ emulate_alu_rwflags(struct kprobe *p, struct pt_regs *regs) | |||
852 | insnslot_3arg_rwflags(rnv, rmv, rsv, ®s->ARM_cpsr, i_fn); | 831 | insnslot_3arg_rwflags(rnv, rmv, rsv, ®s->ARM_cpsr, i_fn); |
853 | } | 832 | } |
854 | 833 | ||
834 | static void __kprobes | ||
835 | emulate_alu_tests(struct kprobe *p, struct pt_regs *regs) | ||
836 | { | ||
837 | insn_3arg_fn_t *i_fn = (insn_3arg_fn_t *)&p->ainsn.insn[0]; | ||
838 | kprobe_opcode_t insn = p->opcode; | ||
839 | long ppc = (long)p->addr + 8; | ||
840 | int rn = (insn >> 16) & 0xf; | ||
841 | int rs = (insn >> 8) & 0xf; /* rs/rsv may be invalid, don't care. */ | ||
842 | int rm = insn & 0xf; | ||
843 | long rnv = (rn == 15) ? ppc : regs->uregs[rn]; | ||
844 | long rmv = (rm == 15) ? ppc : regs->uregs[rm]; | ||
845 | long rsv = regs->uregs[rs]; | ||
846 | |||
847 | insnslot_3arg_rwflags(rnv, rmv, rsv, ®s->ARM_cpsr, i_fn); | ||
848 | } | ||
849 | |||
855 | static enum kprobe_insn __kprobes | 850 | static enum kprobe_insn __kprobes |
856 | prep_emulate_ldr_str(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 851 | prep_emulate_ldr_str(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
857 | { | 852 | { |
858 | int ibit = (insn & (1 << 26)) ? 25 : 22; | 853 | int not_imm = (insn & (1 << 26)) ? (insn & (1 << 25)) |
854 | : (~insn & (1 << 22)); | ||
855 | |||
856 | if (is_writeback(insn) && is_r15(insn, 16)) | ||
857 | return INSN_REJECTED; /* Writeback to PC */ | ||
859 | 858 | ||
860 | insn &= 0xfff00fff; | 859 | insn &= 0xfff00fff; |
861 | insn |= 0x00001000; /* Rn = r0, Rd = r1 */ | 860 | insn |= 0x00001000; /* Rn = r0, Rd = r1 */ |
862 | if (insn & (1 << ibit)) { | 861 | if (not_imm) { |
863 | insn &= ~0xf; | 862 | insn &= ~0xf; |
864 | insn |= 2; /* Rm = r2 */ | 863 | insn |= 2; /* Rm = r2 */ |
865 | } | 864 | } |
@@ -869,20 +868,40 @@ prep_emulate_ldr_str(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
869 | } | 868 | } |
870 | 869 | ||
871 | static enum kprobe_insn __kprobes | 870 | static enum kprobe_insn __kprobes |
872 | prep_emulate_rd12rm0(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 871 | prep_emulate_rd12_modify(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
873 | { | 872 | { |
874 | insn &= 0xffff0ff0; /* Rd = r0, Rm = r0 */ | 873 | if (is_r15(insn, 12)) |
874 | return INSN_REJECTED; /* Rd is PC */ | ||
875 | |||
876 | insn &= 0xffff0fff; /* Rd = r0 */ | ||
875 | asi->insn[0] = insn; | 877 | asi->insn[0] = insn; |
876 | asi->insn_handler = emulate_rd12rm0; | 878 | asi->insn_handler = emulate_rd12_modify; |
877 | return INSN_GOOD; | 879 | return INSN_GOOD; |
878 | } | 880 | } |
879 | 881 | ||
880 | static enum kprobe_insn __kprobes | 882 | static enum kprobe_insn __kprobes |
881 | prep_emulate_rd12(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 883 | prep_emulate_rd12rn0_modify(kprobe_opcode_t insn, |
884 | struct arch_specific_insn *asi) | ||
882 | { | 885 | { |
883 | insn &= 0xffff0fff; /* Rd = r0 */ | 886 | if (is_r15(insn, 12)) |
887 | return INSN_REJECTED; /* Rd is PC */ | ||
888 | |||
889 | insn &= 0xffff0ff0; /* Rd = r0 */ | ||
890 | insn |= 0x00000001; /* Rn = r1 */ | ||
891 | asi->insn[0] = insn; | ||
892 | asi->insn_handler = emulate_rd12rn0_modify; | ||
893 | return INSN_GOOD; | ||
894 | } | ||
895 | |||
896 | static enum kprobe_insn __kprobes | ||
897 | prep_emulate_rd12rm0(kprobe_opcode_t insn, struct arch_specific_insn *asi) | ||
898 | { | ||
899 | if (is_r15(insn, 12)) | ||
900 | return INSN_REJECTED; /* Rd is PC */ | ||
901 | |||
902 | insn &= 0xffff0ff0; /* Rd = r0, Rm = r0 */ | ||
884 | asi->insn[0] = insn; | 903 | asi->insn[0] = insn; |
885 | asi->insn_handler = emulate_rd12; | 904 | asi->insn_handler = emulate_rd12rm0; |
886 | return INSN_GOOD; | 905 | return INSN_GOOD; |
887 | } | 906 | } |
888 | 907 | ||
@@ -890,6 +909,9 @@ static enum kprobe_insn __kprobes | |||
890 | prep_emulate_rd12rn16rm0_wflags(kprobe_opcode_t insn, | 909 | prep_emulate_rd12rn16rm0_wflags(kprobe_opcode_t insn, |
891 | struct arch_specific_insn *asi) | 910 | struct arch_specific_insn *asi) |
892 | { | 911 | { |
912 | if (is_r15(insn, 12)) | ||
913 | return INSN_REJECTED; /* Rd is PC */ | ||
914 | |||
893 | insn &= 0xfff00ff0; /* Rd = r0, Rn = r0 */ | 915 | insn &= 0xfff00ff0; /* Rd = r0, Rn = r0 */ |
894 | insn |= 0x00000001; /* Rm = r1 */ | 916 | insn |= 0x00000001; /* Rm = r1 */ |
895 | asi->insn[0] = insn; | 917 | asi->insn[0] = insn; |
@@ -901,6 +923,9 @@ static enum kprobe_insn __kprobes | |||
901 | prep_emulate_rd16rs8rm0_wflags(kprobe_opcode_t insn, | 923 | prep_emulate_rd16rs8rm0_wflags(kprobe_opcode_t insn, |
902 | struct arch_specific_insn *asi) | 924 | struct arch_specific_insn *asi) |
903 | { | 925 | { |
926 | if (is_r15(insn, 16)) | ||
927 | return INSN_REJECTED; /* Rd is PC */ | ||
928 | |||
904 | insn &= 0xfff0f0f0; /* Rd = r0, Rs = r0 */ | 929 | insn &= 0xfff0f0f0; /* Rd = r0, Rs = r0 */ |
905 | insn |= 0x00000001; /* Rm = r1 */ | 930 | insn |= 0x00000001; /* Rm = r1 */ |
906 | asi->insn[0] = insn; | 931 | asi->insn[0] = insn; |
@@ -912,6 +937,9 @@ static enum kprobe_insn __kprobes | |||
912 | prep_emulate_rd16rn12rs8rm0_wflags(kprobe_opcode_t insn, | 937 | prep_emulate_rd16rn12rs8rm0_wflags(kprobe_opcode_t insn, |
913 | struct arch_specific_insn *asi) | 938 | struct arch_specific_insn *asi) |
914 | { | 939 | { |
940 | if (is_r15(insn, 16)) | ||
941 | return INSN_REJECTED; /* Rd is PC */ | ||
942 | |||
915 | insn &= 0xfff000f0; /* Rd = r0, Rn = r0 */ | 943 | insn &= 0xfff000f0; /* Rd = r0, Rn = r0 */ |
916 | insn |= 0x00000102; /* Rs = r1, Rm = r2 */ | 944 | insn |= 0x00000102; /* Rs = r1, Rm = r2 */ |
917 | asi->insn[0] = insn; | 945 | asi->insn[0] = insn; |
@@ -923,6 +951,9 @@ static enum kprobe_insn __kprobes | |||
923 | prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn, | 951 | prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn, |
924 | struct arch_specific_insn *asi) | 952 | struct arch_specific_insn *asi) |
925 | { | 953 | { |
954 | if (is_r15(insn, 16) || is_r15(insn, 12)) | ||
955 | return INSN_REJECTED; /* RdHi or RdLo is PC */ | ||
956 | |||
926 | insn &= 0xfff000f0; /* RdHi = r0, RdLo = r1 */ | 957 | insn &= 0xfff000f0; /* RdHi = r0, RdLo = r1 */ |
927 | insn |= 0x00001203; /* Rs = r2, Rm = r3 */ | 958 | insn |= 0x00001203; /* Rs = r2, Rm = r3 */ |
928 | asi->insn[0] = insn; | 959 | asi->insn[0] = insn; |
@@ -943,20 +974,13 @@ prep_emulate_rdhi16rdlo12rs8rm0_wflags(kprobe_opcode_t insn, | |||
943 | static enum kprobe_insn __kprobes | 974 | static enum kprobe_insn __kprobes |
944 | space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 975 | space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
945 | { | 976 | { |
946 | /* CPS mmod == 1 : 1111 0001 0000 xx10 xxxx xxxx xx0x xxxx */ | 977 | /* memory hint : 1111 0100 x001 xxxx xxxx xxxx xxxx xxxx : */ |
947 | /* RFE : 1111 100x x0x1 xxxx xxxx 1010 xxxx xxxx */ | 978 | /* PLDI : 1111 0100 x101 xxxx xxxx xxxx xxxx xxxx : */ |
948 | /* SRS : 1111 100x x1x0 1101 xxxx 0101 xxxx xxxx */ | 979 | /* PLDW : 1111 0101 x001 xxxx xxxx xxxx xxxx xxxx : */ |
949 | if ((insn & 0xfff30020) == 0xf1020000 || | 980 | /* PLD : 1111 0101 x101 xxxx xxxx xxxx xxxx xxxx : */ |
950 | (insn & 0xfe500f00) == 0xf8100a00 || | 981 | if ((insn & 0xfe300000) == 0xf4100000) { |
951 | (insn & 0xfe5f0f00) == 0xf84d0500) | 982 | asi->insn_handler = emulate_nop; |
952 | return INSN_REJECTED; | 983 | return INSN_GOOD_NO_SLOT; |
953 | |||
954 | /* PLD : 1111 01x1 x101 xxxx xxxx xxxx xxxx xxxx : */ | ||
955 | if ((insn & 0xfd700000) == 0xf4500000) { | ||
956 | insn &= 0xfff0ffff; /* Rn = r0 */ | ||
957 | asi->insn[0] = insn; | ||
958 | asi->insn_handler = emulate_rn16; | ||
959 | return INSN_GOOD; | ||
960 | } | 984 | } |
961 | 985 | ||
962 | /* BLX(1) : 1111 101x xxxx xxxx xxxx xxxx xxxx xxxx : */ | 986 | /* BLX(1) : 1111 101x xxxx xxxx xxxx xxxx xxxx xxxx : */ |
@@ -965,41 +989,22 @@ space_1111(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
965 | return INSN_GOOD_NO_SLOT; | 989 | return INSN_GOOD_NO_SLOT; |
966 | } | 990 | } |
967 | 991 | ||
968 | /* SETEND : 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */ | 992 | /* CPS : 1111 0001 0000 xxx0 xxxx xxxx xx0x xxxx */ |
969 | /* CDP2 : 1111 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */ | 993 | /* SETEND: 1111 0001 0000 0001 xxxx xxxx 0000 xxxx */ |
970 | if ((insn & 0xffff00f0) == 0xf1010000 || | 994 | |
971 | (insn & 0xff000010) == 0xfe000000) { | 995 | /* SRS : 1111 100x x1x0 xxxx xxxx xxxx xxxx xxxx */ |
972 | asi->insn[0] = insn; | 996 | /* RFE : 1111 100x x0x1 xxxx xxxx xxxx xxxx xxxx */ |
973 | asi->insn_handler = emulate_none; | ||
974 | return INSN_GOOD; | ||
975 | } | ||
976 | 997 | ||
998 | /* Coprocessor instructions... */ | ||
977 | /* MCRR2 : 1111 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ | 999 | /* MCRR2 : 1111 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ |
978 | /* MRRC2 : 1111 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ | 1000 | /* MRRC2 : 1111 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd != Rn) */ |
979 | if ((insn & 0xffe00000) == 0xfc400000) { | 1001 | /* LDC2 : 1111 110x xxx1 xxxx xxxx xxxx xxxx xxxx */ |
980 | insn &= 0xfff00fff; /* Rn = r0 */ | 1002 | /* STC2 : 1111 110x xxx0 xxxx xxxx xxxx xxxx xxxx */ |
981 | insn |= 0x00001000; /* Rd = r1 */ | 1003 | /* CDP2 : 1111 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */ |
982 | asi->insn[0] = insn; | 1004 | /* MCR2 : 1111 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */ |
983 | asi->insn_handler = | 1005 | /* MRC2 : 1111 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */ |
984 | (insn & (1 << 20)) ? emulate_mrrc : emulate_mcrr; | ||
985 | return INSN_GOOD; | ||
986 | } | ||
987 | 1006 | ||
988 | /* LDC2 : 1111 110x xxx1 xxxx xxxx xxxx xxxx xxxx */ | 1007 | return INSN_REJECTED; |
989 | /* STC2 : 1111 110x xxx0 xxxx xxxx xxxx xxxx xxxx */ | ||
990 | if ((insn & 0xfe000000) == 0xfc000000) { | ||
991 | insn &= 0xfff0ffff; /* Rn = r0 */ | ||
992 | asi->insn[0] = insn; | ||
993 | asi->insn_handler = emulate_ldcstc; | ||
994 | return INSN_GOOD; | ||
995 | } | ||
996 | |||
997 | /* MCR2 : 1111 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */ | ||
998 | /* MRC2 : 1111 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */ | ||
999 | insn &= 0xffff0fff; /* Rd = r0 */ | ||
1000 | asi->insn[0] = insn; | ||
1001 | asi->insn_handler = (insn & (1 << 20)) ? emulate_rd12 : emulate_ird12; | ||
1002 | return INSN_GOOD; | ||
1003 | } | 1008 | } |
1004 | 1009 | ||
1005 | static enum kprobe_insn __kprobes | 1010 | static enum kprobe_insn __kprobes |
@@ -1008,19 +1013,18 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1008 | /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx xxx0 xxxx */ | 1013 | /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx xxx0 xxxx */ |
1009 | if ((insn & 0x0f900010) == 0x01000000) { | 1014 | if ((insn & 0x0f900010) == 0x01000000) { |
1010 | 1015 | ||
1011 | /* BXJ : cccc 0001 0010 xxxx xxxx xxxx 0010 xxxx */ | 1016 | /* MRS cpsr : cccc 0001 0000 xxxx xxxx xxxx 0000 xxxx */ |
1012 | /* MSR : cccc 0001 0x10 xxxx xxxx xxxx 0000 xxxx */ | 1017 | if ((insn & 0x0ff000f0) == 0x01000000) { |
1013 | if ((insn & 0x0ff000f0) == 0x01200020 || | 1018 | if (is_r15(insn, 12)) |
1014 | (insn & 0x0fb000f0) == 0x01200000) | 1019 | return INSN_REJECTED; /* Rd is PC */ |
1015 | return INSN_REJECTED; | 1020 | asi->insn_handler = simulate_mrs; |
1016 | 1021 | return INSN_GOOD_NO_SLOT; | |
1017 | /* MRS : cccc 0001 0x00 xxxx xxxx xxxx 0000 xxxx */ | 1022 | } |
1018 | if ((insn & 0x0fb00010) == 0x01000000) | ||
1019 | return prep_emulate_rd12(insn, asi); | ||
1020 | 1023 | ||
1021 | /* SMLALxy : cccc 0001 0100 xxxx xxxx xxxx 1xx0 xxxx */ | 1024 | /* SMLALxy : cccc 0001 0100 xxxx xxxx xxxx 1xx0 xxxx */ |
1022 | if ((insn & 0x0ff00090) == 0x01400080) | 1025 | if ((insn & 0x0ff00090) == 0x01400080) |
1023 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); | 1026 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, |
1027 | asi); | ||
1024 | 1028 | ||
1025 | /* SMULWy : cccc 0001 0010 xxxx xxxx xxxx 1x10 xxxx */ | 1029 | /* SMULWy : cccc 0001 0010 xxxx xxxx xxxx 1x10 xxxx */ |
1026 | /* SMULxy : cccc 0001 0110 xxxx xxxx xxxx 1xx0 xxxx */ | 1030 | /* SMULxy : cccc 0001 0110 xxxx xxxx xxxx 1xx0 xxxx */ |
@@ -1029,24 +1033,29 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1029 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | 1033 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); |
1030 | 1034 | ||
1031 | /* SMLAxy : cccc 0001 0000 xxxx xxxx xxxx 1xx0 xxxx : Q */ | 1035 | /* SMLAxy : cccc 0001 0000 xxxx xxxx xxxx 1xx0 xxxx : Q */ |
1032 | /* SMLAWy : cccc 0001 0010 xxxx xxxx xxxx 0x00 xxxx : Q */ | 1036 | /* SMLAWy : cccc 0001 0010 xxxx xxxx xxxx 1x00 xxxx : Q */ |
1033 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | 1037 | if ((insn & 0x0ff00090) == 0x01000080 || |
1038 | (insn & 0x0ff000b0) == 0x01200080) | ||
1039 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | ||
1034 | 1040 | ||
1041 | /* BXJ : cccc 0001 0010 xxxx xxxx xxxx 0010 xxxx */ | ||
1042 | /* MSR : cccc 0001 0x10 xxxx xxxx xxxx 0000 xxxx */ | ||
1043 | /* MRS spsr : cccc 0001 0100 xxxx xxxx xxxx 0000 xxxx */ | ||
1044 | |||
1045 | /* Other instruction encodings aren't yet defined */ | ||
1046 | return INSN_REJECTED; | ||
1035 | } | 1047 | } |
1036 | 1048 | ||
1037 | /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx 0xx1 xxxx */ | 1049 | /* cccc 0001 0xx0 xxxx xxxx xxxx xxxx 0xx1 xxxx */ |
1038 | else if ((insn & 0x0f900090) == 0x01000010) { | 1050 | else if ((insn & 0x0f900090) == 0x01000010) { |
1039 | 1051 | ||
1040 | /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */ | ||
1041 | if ((insn & 0xfff000f0) == 0xe1200070) | ||
1042 | return INSN_REJECTED; | ||
1043 | |||
1044 | /* BLX(2) : cccc 0001 0010 xxxx xxxx xxxx 0011 xxxx */ | 1052 | /* BLX(2) : cccc 0001 0010 xxxx xxxx xxxx 0011 xxxx */ |
1045 | /* BX : cccc 0001 0010 xxxx xxxx xxxx 0001 xxxx */ | 1053 | /* BX : cccc 0001 0010 xxxx xxxx xxxx 0001 xxxx */ |
1046 | if ((insn & 0x0ff000d0) == 0x01200010) { | 1054 | if ((insn & 0x0ff000d0) == 0x01200010) { |
1047 | asi->insn[0] = truecc_insn(insn); | 1055 | if ((insn & 0x0ff000ff) == 0x0120003f) |
1056 | return INSN_REJECTED; /* BLX pc */ | ||
1048 | asi->insn_handler = simulate_blx2bx; | 1057 | asi->insn_handler = simulate_blx2bx; |
1049 | return INSN_GOOD; | 1058 | return INSN_GOOD_NO_SLOT; |
1050 | } | 1059 | } |
1051 | 1060 | ||
1052 | /* CLZ : cccc 0001 0110 xxxx xxxx xxxx 0001 xxxx */ | 1061 | /* CLZ : cccc 0001 0110 xxxx xxxx xxxx 0001 xxxx */ |
@@ -1057,17 +1066,27 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1057 | /* QSUB : cccc 0001 0010 xxxx xxxx xxxx 0101 xxxx :Q */ | 1066 | /* QSUB : cccc 0001 0010 xxxx xxxx xxxx 0101 xxxx :Q */ |
1058 | /* QDADD : cccc 0001 0100 xxxx xxxx xxxx 0101 xxxx :Q */ | 1067 | /* QDADD : cccc 0001 0100 xxxx xxxx xxxx 0101 xxxx :Q */ |
1059 | /* QDSUB : cccc 0001 0110 xxxx xxxx xxxx 0101 xxxx :Q */ | 1068 | /* QDSUB : cccc 0001 0110 xxxx xxxx xxxx 0101 xxxx :Q */ |
1060 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | 1069 | if ((insn & 0x0f9000f0) == 0x01000050) |
1070 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | ||
1071 | |||
1072 | /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */ | ||
1073 | /* SMC : cccc 0001 0110 xxxx xxxx xxxx 0111 xxxx */ | ||
1074 | |||
1075 | /* Other instruction encodings aren't yet defined */ | ||
1076 | return INSN_REJECTED; | ||
1061 | } | 1077 | } |
1062 | 1078 | ||
1063 | /* cccc 0000 xxxx xxxx xxxx xxxx xxxx 1001 xxxx */ | 1079 | /* cccc 0000 xxxx xxxx xxxx xxxx xxxx 1001 xxxx */ |
1064 | else if ((insn & 0x0f000090) == 0x00000090) { | 1080 | else if ((insn & 0x0f0000f0) == 0x00000090) { |
1065 | 1081 | ||
1066 | /* MUL : cccc 0000 0000 xxxx xxxx xxxx 1001 xxxx : */ | 1082 | /* MUL : cccc 0000 0000 xxxx xxxx xxxx 1001 xxxx : */ |
1067 | /* MULS : cccc 0000 0001 xxxx xxxx xxxx 1001 xxxx :cc */ | 1083 | /* MULS : cccc 0000 0001 xxxx xxxx xxxx 1001 xxxx :cc */ |
1068 | /* MLA : cccc 0000 0010 xxxx xxxx xxxx 1001 xxxx : */ | 1084 | /* MLA : cccc 0000 0010 xxxx xxxx xxxx 1001 xxxx : */ |
1069 | /* MLAS : cccc 0000 0011 xxxx xxxx xxxx 1001 xxxx :cc */ | 1085 | /* MLAS : cccc 0000 0011 xxxx xxxx xxxx 1001 xxxx :cc */ |
1070 | /* UMAAL : cccc 0000 0100 xxxx xxxx xxxx 1001 xxxx : */ | 1086 | /* UMAAL : cccc 0000 0100 xxxx xxxx xxxx 1001 xxxx : */ |
1087 | /* undef : cccc 0000 0101 xxxx xxxx xxxx 1001 xxxx : */ | ||
1088 | /* MLS : cccc 0000 0110 xxxx xxxx xxxx 1001 xxxx : */ | ||
1089 | /* undef : cccc 0000 0111 xxxx xxxx xxxx 1001 xxxx : */ | ||
1071 | /* UMULL : cccc 0000 1000 xxxx xxxx xxxx 1001 xxxx : */ | 1090 | /* UMULL : cccc 0000 1000 xxxx xxxx xxxx 1001 xxxx : */ |
1072 | /* UMULLS : cccc 0000 1001 xxxx xxxx xxxx 1001 xxxx :cc */ | 1091 | /* UMULLS : cccc 0000 1001 xxxx xxxx xxxx 1001 xxxx :cc */ |
1073 | /* UMLAL : cccc 0000 1010 xxxx xxxx xxxx 1001 xxxx : */ | 1092 | /* UMLAL : cccc 0000 1010 xxxx xxxx xxxx 1001 xxxx : */ |
@@ -1076,13 +1095,15 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1076 | /* SMULLS : cccc 0000 1101 xxxx xxxx xxxx 1001 xxxx :cc */ | 1095 | /* SMULLS : cccc 0000 1101 xxxx xxxx xxxx 1001 xxxx :cc */ |
1077 | /* SMLAL : cccc 0000 1110 xxxx xxxx xxxx 1001 xxxx : */ | 1096 | /* SMLAL : cccc 0000 1110 xxxx xxxx xxxx 1001 xxxx : */ |
1078 | /* SMLALS : cccc 0000 1111 xxxx xxxx xxxx 1001 xxxx :cc */ | 1097 | /* SMLALS : cccc 0000 1111 xxxx xxxx xxxx 1001 xxxx :cc */ |
1079 | if ((insn & 0x0fe000f0) == 0x00000090) { | 1098 | if ((insn & 0x00d00000) == 0x00500000) |
1080 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | 1099 | return INSN_REJECTED; |
1081 | } else if ((insn & 0x0fe000f0) == 0x00200090) { | 1100 | else if ((insn & 0x00e00000) == 0x00000000) |
1082 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | 1101 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); |
1083 | } else { | 1102 | else if ((insn & 0x00a00000) == 0x00200000) |
1084 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); | 1103 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); |
1085 | } | 1104 | else |
1105 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, | ||
1106 | asi); | ||
1086 | } | 1107 | } |
1087 | 1108 | ||
1088 | /* cccc 000x xxxx xxxx xxxx xxxx xxxx 1xx1 xxxx */ | 1109 | /* cccc 000x xxxx xxxx xxxx xxxx xxxx 1xx1 xxxx */ |
@@ -1090,23 +1111,45 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1090 | 1111 | ||
1091 | /* SWP : cccc 0001 0000 xxxx xxxx xxxx 1001 xxxx */ | 1112 | /* SWP : cccc 0001 0000 xxxx xxxx xxxx 1001 xxxx */ |
1092 | /* SWPB : cccc 0001 0100 xxxx xxxx xxxx 1001 xxxx */ | 1113 | /* SWPB : cccc 0001 0100 xxxx xxxx xxxx 1001 xxxx */ |
1093 | /* LDRD : cccc 000x xxx0 xxxx xxxx xxxx 1101 xxxx */ | 1114 | /* ??? : cccc 0001 0x01 xxxx xxxx xxxx 1001 xxxx */ |
1094 | /* STRD : cccc 000x xxx0 xxxx xxxx xxxx 1111 xxxx */ | 1115 | /* ??? : cccc 0001 0x10 xxxx xxxx xxxx 1001 xxxx */ |
1116 | /* ??? : cccc 0001 0x11 xxxx xxxx xxxx 1001 xxxx */ | ||
1095 | /* STREX : cccc 0001 1000 xxxx xxxx xxxx 1001 xxxx */ | 1117 | /* STREX : cccc 0001 1000 xxxx xxxx xxxx 1001 xxxx */ |
1096 | /* LDREX : cccc 0001 1001 xxxx xxxx xxxx 1001 xxxx */ | 1118 | /* LDREX : cccc 0001 1001 xxxx xxxx xxxx 1001 xxxx */ |
1119 | /* STREXD: cccc 0001 1010 xxxx xxxx xxxx 1001 xxxx */ | ||
1120 | /* LDREXD: cccc 0001 1011 xxxx xxxx xxxx 1001 xxxx */ | ||
1121 | /* STREXB: cccc 0001 1100 xxxx xxxx xxxx 1001 xxxx */ | ||
1122 | /* LDREXB: cccc 0001 1101 xxxx xxxx xxxx 1001 xxxx */ | ||
1123 | /* STREXH: cccc 0001 1110 xxxx xxxx xxxx 1001 xxxx */ | ||
1124 | /* LDREXH: cccc 0001 1111 xxxx xxxx xxxx 1001 xxxx */ | ||
1125 | |||
1126 | /* LDRD : cccc 000x xxx0 xxxx xxxx xxxx 1101 xxxx */ | ||
1127 | /* STRD : cccc 000x xxx0 xxxx xxxx xxxx 1111 xxxx */ | ||
1097 | /* LDRH : cccc 000x xxx1 xxxx xxxx xxxx 1011 xxxx */ | 1128 | /* LDRH : cccc 000x xxx1 xxxx xxxx xxxx 1011 xxxx */ |
1098 | /* STRH : cccc 000x xxx0 xxxx xxxx xxxx 1011 xxxx */ | 1129 | /* STRH : cccc 000x xxx0 xxxx xxxx xxxx 1011 xxxx */ |
1099 | /* LDRSB : cccc 000x xxx1 xxxx xxxx xxxx 1101 xxxx */ | 1130 | /* LDRSB : cccc 000x xxx1 xxxx xxxx xxxx 1101 xxxx */ |
1100 | /* LDRSH : cccc 000x xxx1 xxxx xxxx xxxx 1111 xxxx */ | 1131 | /* LDRSH : cccc 000x xxx1 xxxx xxxx xxxx 1111 xxxx */ |
1101 | if ((insn & 0x0fb000f0) == 0x01000090) { | 1132 | if ((insn & 0x0f0000f0) == 0x01000090) { |
1102 | /* SWP/SWPB */ | 1133 | if ((insn & 0x0fb000f0) == 0x01000090) { |
1103 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | 1134 | /* SWP/SWPB */ |
1135 | return prep_emulate_rd12rn16rm0_wflags(insn, | ||
1136 | asi); | ||
1137 | } else { | ||
1138 | /* STREX/LDREX variants and unallocaed space */ | ||
1139 | return INSN_REJECTED; | ||
1140 | } | ||
1141 | |||
1104 | } else if ((insn & 0x0e1000d0) == 0x00000d0) { | 1142 | } else if ((insn & 0x0e1000d0) == 0x00000d0) { |
1105 | /* STRD/LDRD */ | 1143 | /* STRD/LDRD */ |
1144 | if ((insn & 0x0000e000) == 0x0000e000) | ||
1145 | return INSN_REJECTED; /* Rd is LR or PC */ | ||
1146 | if (is_writeback(insn) && is_r15(insn, 16)) | ||
1147 | return INSN_REJECTED; /* Writeback to PC */ | ||
1148 | |||
1106 | insn &= 0xfff00fff; | 1149 | insn &= 0xfff00fff; |
1107 | insn |= 0x00002000; /* Rn = r0, Rd = r2 */ | 1150 | insn |= 0x00002000; /* Rn = r0, Rd = r2 */ |
1108 | if (insn & (1 << 22)) { | 1151 | if (!(insn & (1 << 22))) { |
1109 | /* I bit */ | 1152 | /* Register index */ |
1110 | insn &= ~0xf; | 1153 | insn &= ~0xf; |
1111 | insn |= 1; /* Rm = r1 */ | 1154 | insn |= 1; /* Rm = r1 */ |
1112 | } | 1155 | } |
@@ -1116,6 +1159,9 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1116 | return INSN_GOOD; | 1159 | return INSN_GOOD; |
1117 | } | 1160 | } |
1118 | 1161 | ||
1162 | /* LDRH/STRH/LDRSB/LDRSH */ | ||
1163 | if (is_r15(insn, 12)) | ||
1164 | return INSN_REJECTED; /* Rd is PC */ | ||
1119 | return prep_emulate_ldr_str(insn, asi); | 1165 | return prep_emulate_ldr_str(insn, asi); |
1120 | } | 1166 | } |
1121 | 1167 | ||
@@ -1123,7 +1169,7 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1123 | 1169 | ||
1124 | /* | 1170 | /* |
1125 | * ALU op with S bit and Rd == 15 : | 1171 | * ALU op with S bit and Rd == 15 : |
1126 | * cccc 000x xxx1 xxxx 1111 xxxx xxxx xxxx | 1172 | * cccc 000x xxx1 xxxx 1111 xxxx xxxx xxxx |
1127 | */ | 1173 | */ |
1128 | if ((insn & 0x0e10f000) == 0x0010f000) | 1174 | if ((insn & 0x0e10f000) == 0x0010f000) |
1129 | return INSN_REJECTED; | 1175 | return INSN_REJECTED; |
@@ -1152,22 +1198,61 @@ space_cccc_000x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1152 | insn |= 0x00000200; /* Rs = r2 */ | 1198 | insn |= 0x00000200; /* Rs = r2 */ |
1153 | } | 1199 | } |
1154 | asi->insn[0] = insn; | 1200 | asi->insn[0] = insn; |
1155 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | 1201 | |
1202 | if ((insn & 0x0f900000) == 0x01100000) { | ||
1203 | /* | ||
1204 | * TST : cccc 0001 0001 xxxx xxxx xxxx xxxx xxxx | ||
1205 | * TEQ : cccc 0001 0011 xxxx xxxx xxxx xxxx xxxx | ||
1206 | * CMP : cccc 0001 0101 xxxx xxxx xxxx xxxx xxxx | ||
1207 | * CMN : cccc 0001 0111 xxxx xxxx xxxx xxxx xxxx | ||
1208 | */ | ||
1209 | asi->insn_handler = emulate_alu_tests; | ||
1210 | } else { | ||
1211 | /* ALU ops which write to Rd */ | ||
1212 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | ||
1156 | emulate_alu_rwflags : emulate_alu_rflags; | 1213 | emulate_alu_rwflags : emulate_alu_rflags; |
1214 | } | ||
1157 | return INSN_GOOD; | 1215 | return INSN_GOOD; |
1158 | } | 1216 | } |
1159 | 1217 | ||
1160 | static enum kprobe_insn __kprobes | 1218 | static enum kprobe_insn __kprobes |
1161 | space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 1219 | space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
1162 | { | 1220 | { |
1221 | /* MOVW : cccc 0011 0000 xxxx xxxx xxxx xxxx xxxx */ | ||
1222 | /* MOVT : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx */ | ||
1223 | if ((insn & 0x0fb00000) == 0x03000000) | ||
1224 | return prep_emulate_rd12_modify(insn, asi); | ||
1225 | |||
1226 | /* hints : cccc 0011 0010 0000 xxxx xxxx xxxx xxxx */ | ||
1227 | if ((insn & 0x0fff0000) == 0x03200000) { | ||
1228 | unsigned op2 = insn & 0x000000ff; | ||
1229 | if (op2 == 0x01 || op2 == 0x04) { | ||
1230 | /* YIELD : cccc 0011 0010 0000 xxxx xxxx 0000 0001 */ | ||
1231 | /* SEV : cccc 0011 0010 0000 xxxx xxxx 0000 0100 */ | ||
1232 | asi->insn[0] = insn; | ||
1233 | asi->insn_handler = emulate_none; | ||
1234 | return INSN_GOOD; | ||
1235 | } else if (op2 <= 0x03) { | ||
1236 | /* NOP : cccc 0011 0010 0000 xxxx xxxx 0000 0000 */ | ||
1237 | /* WFE : cccc 0011 0010 0000 xxxx xxxx 0000 0010 */ | ||
1238 | /* WFI : cccc 0011 0010 0000 xxxx xxxx 0000 0011 */ | ||
1239 | /* | ||
1240 | * We make WFE and WFI true NOPs to avoid stalls due | ||
1241 | * to missing events whilst processing the probe. | ||
1242 | */ | ||
1243 | asi->insn_handler = emulate_nop; | ||
1244 | return INSN_GOOD_NO_SLOT; | ||
1245 | } | ||
1246 | /* For DBG and unallocated hints it's safest to reject them */ | ||
1247 | return INSN_REJECTED; | ||
1248 | } | ||
1249 | |||
1163 | /* | 1250 | /* |
1164 | * MSR : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx | 1251 | * MSR : cccc 0011 0x10 xxxx xxxx xxxx xxxx xxxx |
1165 | * Undef : cccc 0011 0100 xxxx xxxx xxxx xxxx xxxx | ||
1166 | * ALU op with S bit and Rd == 15 : | 1252 | * ALU op with S bit and Rd == 15 : |
1167 | * cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx | 1253 | * cccc 001x xxx1 xxxx 1111 xxxx xxxx xxxx |
1168 | */ | 1254 | */ |
1169 | if ((insn & 0x0fb00000) == 0x03200000 || /* MSR */ | 1255 | if ((insn & 0x0fb00000) == 0x03200000 || /* MSR */ |
1170 | (insn & 0x0ff00000) == 0x03400000 || /* Undef */ | ||
1171 | (insn & 0x0e10f000) == 0x0210f000) /* ALU s-bit, R15 */ | 1256 | (insn & 0x0e10f000) == 0x0210f000) /* ALU s-bit, R15 */ |
1172 | return INSN_REJECTED; | 1257 | return INSN_REJECTED; |
1173 | 1258 | ||
@@ -1178,10 +1263,22 @@ space_cccc_001x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1178 | * *S (bit 20) updates condition codes | 1263 | * *S (bit 20) updates condition codes |
1179 | * ADC/SBC/RSC reads the C flag | 1264 | * ADC/SBC/RSC reads the C flag |
1180 | */ | 1265 | */ |
1181 | insn &= 0xffff0fff; /* Rd = r0 */ | 1266 | insn &= 0xfff00fff; /* Rn = r0 and Rd = r0 */ |
1182 | asi->insn[0] = insn; | 1267 | asi->insn[0] = insn; |
1183 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | 1268 | |
1269 | if ((insn & 0x0f900000) == 0x03100000) { | ||
1270 | /* | ||
1271 | * TST : cccc 0011 0001 xxxx xxxx xxxx xxxx xxxx | ||
1272 | * TEQ : cccc 0011 0011 xxxx xxxx xxxx xxxx xxxx | ||
1273 | * CMP : cccc 0011 0101 xxxx xxxx xxxx xxxx xxxx | ||
1274 | * CMN : cccc 0011 0111 xxxx xxxx xxxx xxxx xxxx | ||
1275 | */ | ||
1276 | asi->insn_handler = emulate_alu_tests_imm; | ||
1277 | } else { | ||
1278 | /* ALU ops which write to Rd */ | ||
1279 | asi->insn_handler = (insn & (1 << 20)) ? /* S-bit */ | ||
1184 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; | 1280 | emulate_alu_imm_rwflags : emulate_alu_imm_rflags; |
1281 | } | ||
1185 | return INSN_GOOD; | 1282 | return INSN_GOOD; |
1186 | } | 1283 | } |
1187 | 1284 | ||
@@ -1190,6 +1287,8 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1190 | { | 1287 | { |
1191 | /* SEL : cccc 0110 1000 xxxx xxxx xxxx 1011 xxxx GE: !!! */ | 1288 | /* SEL : cccc 0110 1000 xxxx xxxx xxxx 1011 xxxx GE: !!! */ |
1192 | if ((insn & 0x0ff000f0) == 0x068000b0) { | 1289 | if ((insn & 0x0ff000f0) == 0x068000b0) { |
1290 | if (is_r15(insn, 12)) | ||
1291 | return INSN_REJECTED; /* Rd is PC */ | ||
1193 | insn &= 0xfff00ff0; /* Rd = r0, Rn = r0 */ | 1292 | insn &= 0xfff00ff0; /* Rd = r0, Rn = r0 */ |
1194 | insn |= 0x00000001; /* Rm = r1 */ | 1293 | insn |= 0x00000001; /* Rm = r1 */ |
1195 | asi->insn[0] = insn; | 1294 | asi->insn[0] = insn; |
@@ -1203,6 +1302,8 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1203 | /* USAT16 : cccc 0110 1110 xxxx xxxx xxxx 0011 xxxx :Q */ | 1302 | /* USAT16 : cccc 0110 1110 xxxx xxxx xxxx 0011 xxxx :Q */ |
1204 | if ((insn & 0x0fa00030) == 0x06a00010 || | 1303 | if ((insn & 0x0fa00030) == 0x06a00010 || |
1205 | (insn & 0x0fb000f0) == 0x06a00030) { | 1304 | (insn & 0x0fb000f0) == 0x06a00030) { |
1305 | if (is_r15(insn, 12)) | ||
1306 | return INSN_REJECTED; /* Rd is PC */ | ||
1206 | insn &= 0xffff0ff0; /* Rd = r0, Rm = r0 */ | 1307 | insn &= 0xffff0ff0; /* Rd = r0, Rm = r0 */ |
1207 | asi->insn[0] = insn; | 1308 | asi->insn[0] = insn; |
1208 | asi->insn_handler = emulate_sat; | 1309 | asi->insn_handler = emulate_sat; |
@@ -1211,57 +1312,101 @@ space_cccc_0110__1(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1211 | 1312 | ||
1212 | /* REV : cccc 0110 1011 xxxx xxxx xxxx 0011 xxxx */ | 1313 | /* REV : cccc 0110 1011 xxxx xxxx xxxx 0011 xxxx */ |
1213 | /* REV16 : cccc 0110 1011 xxxx xxxx xxxx 1011 xxxx */ | 1314 | /* REV16 : cccc 0110 1011 xxxx xxxx xxxx 1011 xxxx */ |
1315 | /* RBIT : cccc 0110 1111 xxxx xxxx xxxx 0011 xxxx */ | ||
1214 | /* REVSH : cccc 0110 1111 xxxx xxxx xxxx 1011 xxxx */ | 1316 | /* REVSH : cccc 0110 1111 xxxx xxxx xxxx 1011 xxxx */ |
1215 | if ((insn & 0x0ff00070) == 0x06b00030 || | 1317 | if ((insn & 0x0ff00070) == 0x06b00030 || |
1216 | (insn & 0x0ff000f0) == 0x06f000b0) | 1318 | (insn & 0x0ff00070) == 0x06f00030) |
1217 | return prep_emulate_rd12rm0(insn, asi); | 1319 | return prep_emulate_rd12rm0(insn, asi); |
1218 | 1320 | ||
1321 | /* ??? : cccc 0110 0000 xxxx xxxx xxxx xxx1 xxxx : */ | ||
1219 | /* SADD16 : cccc 0110 0001 xxxx xxxx xxxx 0001 xxxx :GE */ | 1322 | /* SADD16 : cccc 0110 0001 xxxx xxxx xxxx 0001 xxxx :GE */ |
1220 | /* SADDSUBX : cccc 0110 0001 xxxx xxxx xxxx 0011 xxxx :GE */ | 1323 | /* SADDSUBX : cccc 0110 0001 xxxx xxxx xxxx 0011 xxxx :GE */ |
1221 | /* SSUBADDX : cccc 0110 0001 xxxx xxxx xxxx 0101 xxxx :GE */ | 1324 | /* SSUBADDX : cccc 0110 0001 xxxx xxxx xxxx 0101 xxxx :GE */ |
1222 | /* SSUB16 : cccc 0110 0001 xxxx xxxx xxxx 0111 xxxx :GE */ | 1325 | /* SSUB16 : cccc 0110 0001 xxxx xxxx xxxx 0111 xxxx :GE */ |
1223 | /* SADD8 : cccc 0110 0001 xxxx xxxx xxxx 1001 xxxx :GE */ | 1326 | /* SADD8 : cccc 0110 0001 xxxx xxxx xxxx 1001 xxxx :GE */ |
1327 | /* ??? : cccc 0110 0001 xxxx xxxx xxxx 1011 xxxx : */ | ||
1328 | /* ??? : cccc 0110 0001 xxxx xxxx xxxx 1101 xxxx : */ | ||
1224 | /* SSUB8 : cccc 0110 0001 xxxx xxxx xxxx 1111 xxxx :GE */ | 1329 | /* SSUB8 : cccc 0110 0001 xxxx xxxx xxxx 1111 xxxx :GE */ |
1225 | /* QADD16 : cccc 0110 0010 xxxx xxxx xxxx 0001 xxxx : */ | 1330 | /* QADD16 : cccc 0110 0010 xxxx xxxx xxxx 0001 xxxx : */ |
1226 | /* QADDSUBX : cccc 0110 0010 xxxx xxxx xxxx 0011 xxxx : */ | 1331 | /* QADDSUBX : cccc 0110 0010 xxxx xxxx xxxx 0011 xxxx : */ |
1227 | /* QSUBADDX : cccc 0110 0010 xxxx xxxx xxxx 0101 xxxx : */ | 1332 | /* QSUBADDX : cccc 0110 0010 xxxx xxxx xxxx 0101 xxxx : */ |
1228 | /* QSUB16 : cccc 0110 0010 xxxx xxxx xxxx 0111 xxxx : */ | 1333 | /* QSUB16 : cccc 0110 0010 xxxx xxxx xxxx 0111 xxxx : */ |
1229 | /* QADD8 : cccc 0110 0010 xxxx xxxx xxxx 1001 xxxx : */ | 1334 | /* QADD8 : cccc 0110 0010 xxxx xxxx xxxx 1001 xxxx : */ |
1335 | /* ??? : cccc 0110 0010 xxxx xxxx xxxx 1011 xxxx : */ | ||
1336 | /* ??? : cccc 0110 0010 xxxx xxxx xxxx 1101 xxxx : */ | ||
1230 | /* QSUB8 : cccc 0110 0010 xxxx xxxx xxxx 1111 xxxx : */ | 1337 | /* QSUB8 : cccc 0110 0010 xxxx xxxx xxxx 1111 xxxx : */ |
1231 | /* SHADD16 : cccc 0110 0011 xxxx xxxx xxxx 0001 xxxx : */ | 1338 | /* SHADD16 : cccc 0110 0011 xxxx xxxx xxxx 0001 xxxx : */ |
1232 | /* SHADDSUBX : cccc 0110 0011 xxxx xxxx xxxx 0011 xxxx : */ | 1339 | /* SHADDSUBX : cccc 0110 0011 xxxx xxxx xxxx 0011 xxxx : */ |
1233 | /* SHSUBADDX : cccc 0110 0011 xxxx xxxx xxxx 0101 xxxx : */ | 1340 | /* SHSUBADDX : cccc 0110 0011 xxxx xxxx xxxx 0101 xxxx : */ |
1234 | /* SHSUB16 : cccc 0110 0011 xxxx xxxx xxxx 0111 xxxx : */ | 1341 | /* SHSUB16 : cccc 0110 0011 xxxx xxxx xxxx 0111 xxxx : */ |
1235 | /* SHADD8 : cccc 0110 0011 xxxx xxxx xxxx 1001 xxxx : */ | 1342 | /* SHADD8 : cccc 0110 0011 xxxx xxxx xxxx 1001 xxxx : */ |
1343 | /* ??? : cccc 0110 0011 xxxx xxxx xxxx 1011 xxxx : */ | ||
1344 | /* ??? : cccc 0110 0011 xxxx xxxx xxxx 1101 xxxx : */ | ||
1236 | /* SHSUB8 : cccc 0110 0011 xxxx xxxx xxxx 1111 xxxx : */ | 1345 | /* SHSUB8 : cccc 0110 0011 xxxx xxxx xxxx 1111 xxxx : */ |
1346 | /* ??? : cccc 0110 0100 xxxx xxxx xxxx xxx1 xxxx : */ | ||
1237 | /* UADD16 : cccc 0110 0101 xxxx xxxx xxxx 0001 xxxx :GE */ | 1347 | /* UADD16 : cccc 0110 0101 xxxx xxxx xxxx 0001 xxxx :GE */ |
1238 | /* UADDSUBX : cccc 0110 0101 xxxx xxxx xxxx 0011 xxxx :GE */ | 1348 | /* UADDSUBX : cccc 0110 0101 xxxx xxxx xxxx 0011 xxxx :GE */ |
1239 | /* USUBADDX : cccc 0110 0101 xxxx xxxx xxxx 0101 xxxx :GE */ | 1349 | /* USUBADDX : cccc 0110 0101 xxxx xxxx xxxx 0101 xxxx :GE */ |
1240 | /* USUB16 : cccc 0110 0101 xxxx xxxx xxxx 0111 xxxx :GE */ | 1350 | /* USUB16 : cccc 0110 0101 xxxx xxxx xxxx 0111 xxxx :GE */ |
1241 | /* UADD8 : cccc 0110 0101 xxxx xxxx xxxx 1001 xxxx :GE */ | 1351 | /* UADD8 : cccc 0110 0101 xxxx xxxx xxxx 1001 xxxx :GE */ |
1352 | /* ??? : cccc 0110 0101 xxxx xxxx xxxx 1011 xxxx : */ | ||
1353 | /* ??? : cccc 0110 0101 xxxx xxxx xxxx 1101 xxxx : */ | ||
1242 | /* USUB8 : cccc 0110 0101 xxxx xxxx xxxx 1111 xxxx :GE */ | 1354 | /* USUB8 : cccc 0110 0101 xxxx xxxx xxxx 1111 xxxx :GE */ |
1243 | /* UQADD16 : cccc 0110 0110 xxxx xxxx xxxx 0001 xxxx : */ | 1355 | /* UQADD16 : cccc 0110 0110 xxxx xxxx xxxx 0001 xxxx : */ |
1244 | /* UQADDSUBX : cccc 0110 0110 xxxx xxxx xxxx 0011 xxxx : */ | 1356 | /* UQADDSUBX : cccc 0110 0110 xxxx xxxx xxxx 0011 xxxx : */ |
1245 | /* UQSUBADDX : cccc 0110 0110 xxxx xxxx xxxx 0101 xxxx : */ | 1357 | /* UQSUBADDX : cccc 0110 0110 xxxx xxxx xxxx 0101 xxxx : */ |
1246 | /* UQSUB16 : cccc 0110 0110 xxxx xxxx xxxx 0111 xxxx : */ | 1358 | /* UQSUB16 : cccc 0110 0110 xxxx xxxx xxxx 0111 xxxx : */ |
1247 | /* UQADD8 : cccc 0110 0110 xxxx xxxx xxxx 1001 xxxx : */ | 1359 | /* UQADD8 : cccc 0110 0110 xxxx xxxx xxxx 1001 xxxx : */ |
1360 | /* ??? : cccc 0110 0110 xxxx xxxx xxxx 1011 xxxx : */ | ||
1361 | /* ??? : cccc 0110 0110 xxxx xxxx xxxx 1101 xxxx : */ | ||
1248 | /* UQSUB8 : cccc 0110 0110 xxxx xxxx xxxx 1111 xxxx : */ | 1362 | /* UQSUB8 : cccc 0110 0110 xxxx xxxx xxxx 1111 xxxx : */ |
1249 | /* UHADD16 : cccc 0110 0111 xxxx xxxx xxxx 0001 xxxx : */ | 1363 | /* UHADD16 : cccc 0110 0111 xxxx xxxx xxxx 0001 xxxx : */ |
1250 | /* UHADDSUBX : cccc 0110 0111 xxxx xxxx xxxx 0011 xxxx : */ | 1364 | /* UHADDSUBX : cccc 0110 0111 xxxx xxxx xxxx 0011 xxxx : */ |
1251 | /* UHSUBADDX : cccc 0110 0111 xxxx xxxx xxxx 0101 xxxx : */ | 1365 | /* UHSUBADDX : cccc 0110 0111 xxxx xxxx xxxx 0101 xxxx : */ |
1252 | /* UHSUB16 : cccc 0110 0111 xxxx xxxx xxxx 0111 xxxx : */ | 1366 | /* UHSUB16 : cccc 0110 0111 xxxx xxxx xxxx 0111 xxxx : */ |
1253 | /* UHADD8 : cccc 0110 0111 xxxx xxxx xxxx 1001 xxxx : */ | 1367 | /* UHADD8 : cccc 0110 0111 xxxx xxxx xxxx 1001 xxxx : */ |
1368 | /* ??? : cccc 0110 0111 xxxx xxxx xxxx 1011 xxxx : */ | ||
1369 | /* ??? : cccc 0110 0111 xxxx xxxx xxxx 1101 xxxx : */ | ||
1254 | /* UHSUB8 : cccc 0110 0111 xxxx xxxx xxxx 1111 xxxx : */ | 1370 | /* UHSUB8 : cccc 0110 0111 xxxx xxxx xxxx 1111 xxxx : */ |
1371 | if ((insn & 0x0f800010) == 0x06000010) { | ||
1372 | if ((insn & 0x00300000) == 0x00000000 || | ||
1373 | (insn & 0x000000e0) == 0x000000a0 || | ||
1374 | (insn & 0x000000e0) == 0x000000c0) | ||
1375 | return INSN_REJECTED; /* Unallocated space */ | ||
1376 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | ||
1377 | } | ||
1378 | |||
1255 | /* PKHBT : cccc 0110 1000 xxxx xxxx xxxx x001 xxxx : */ | 1379 | /* PKHBT : cccc 0110 1000 xxxx xxxx xxxx x001 xxxx : */ |
1256 | /* PKHTB : cccc 0110 1000 xxxx xxxx xxxx x101 xxxx : */ | 1380 | /* PKHTB : cccc 0110 1000 xxxx xxxx xxxx x101 xxxx : */ |
1381 | if ((insn & 0x0ff00030) == 0x06800010) | ||
1382 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | ||
1383 | |||
1257 | /* SXTAB16 : cccc 0110 1000 xxxx xxxx xxxx 0111 xxxx : */ | 1384 | /* SXTAB16 : cccc 0110 1000 xxxx xxxx xxxx 0111 xxxx : */ |
1258 | /* SXTB : cccc 0110 1010 xxxx xxxx xxxx 0111 xxxx : */ | 1385 | /* SXTB16 : cccc 0110 1000 1111 xxxx xxxx 0111 xxxx : */ |
1386 | /* ??? : cccc 0110 1001 xxxx xxxx xxxx 0111 xxxx : */ | ||
1259 | /* SXTAB : cccc 0110 1010 xxxx xxxx xxxx 0111 xxxx : */ | 1387 | /* SXTAB : cccc 0110 1010 xxxx xxxx xxxx 0111 xxxx : */ |
1388 | /* SXTB : cccc 0110 1010 1111 xxxx xxxx 0111 xxxx : */ | ||
1260 | /* SXTAH : cccc 0110 1011 xxxx xxxx xxxx 0111 xxxx : */ | 1389 | /* SXTAH : cccc 0110 1011 xxxx xxxx xxxx 0111 xxxx : */ |
1390 | /* SXTH : cccc 0110 1011 1111 xxxx xxxx 0111 xxxx : */ | ||
1261 | /* UXTAB16 : cccc 0110 1100 xxxx xxxx xxxx 0111 xxxx : */ | 1391 | /* UXTAB16 : cccc 0110 1100 xxxx xxxx xxxx 0111 xxxx : */ |
1392 | /* UXTB16 : cccc 0110 1100 1111 xxxx xxxx 0111 xxxx : */ | ||
1393 | /* ??? : cccc 0110 1101 xxxx xxxx xxxx 0111 xxxx : */ | ||
1262 | /* UXTAB : cccc 0110 1110 xxxx xxxx xxxx 0111 xxxx : */ | 1394 | /* UXTAB : cccc 0110 1110 xxxx xxxx xxxx 0111 xxxx : */ |
1395 | /* UXTB : cccc 0110 1110 1111 xxxx xxxx 0111 xxxx : */ | ||
1263 | /* UXTAH : cccc 0110 1111 xxxx xxxx xxxx 0111 xxxx : */ | 1396 | /* UXTAH : cccc 0110 1111 xxxx xxxx xxxx 0111 xxxx : */ |
1264 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | 1397 | /* UXTH : cccc 0110 1111 1111 xxxx xxxx 0111 xxxx : */ |
1398 | if ((insn & 0x0f8000f0) == 0x06800070) { | ||
1399 | if ((insn & 0x00300000) == 0x00100000) | ||
1400 | return INSN_REJECTED; /* Unallocated space */ | ||
1401 | |||
1402 | if ((insn & 0x000f0000) == 0x000f0000) | ||
1403 | return prep_emulate_rd12rm0(insn, asi); | ||
1404 | else | ||
1405 | return prep_emulate_rd12rn16rm0_wflags(insn, asi); | ||
1406 | } | ||
1407 | |||
1408 | /* Other instruction encodings aren't yet defined */ | ||
1409 | return INSN_REJECTED; | ||
1265 | } | 1410 | } |
1266 | 1411 | ||
1267 | static enum kprobe_insn __kprobes | 1412 | static enum kprobe_insn __kprobes |
@@ -1271,29 +1416,49 @@ space_cccc_0111__1(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1271 | if ((insn & 0x0ff000f0) == 0x03f000f0) | 1416 | if ((insn & 0x0ff000f0) == 0x03f000f0) |
1272 | return INSN_REJECTED; | 1417 | return INSN_REJECTED; |
1273 | 1418 | ||
1274 | /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx */ | ||
1275 | /* USAD8 : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx */ | ||
1276 | if ((insn & 0x0ff000f0) == 0x07800010) | ||
1277 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | ||
1278 | |||
1279 | /* SMLALD : cccc 0111 0100 xxxx xxxx xxxx 00x1 xxxx */ | 1419 | /* SMLALD : cccc 0111 0100 xxxx xxxx xxxx 00x1 xxxx */ |
1280 | /* SMLSLD : cccc 0111 0100 xxxx xxxx xxxx 01x1 xxxx */ | 1420 | /* SMLSLD : cccc 0111 0100 xxxx xxxx xxxx 01x1 xxxx */ |
1281 | if ((insn & 0x0ff00090) == 0x07400010) | 1421 | if ((insn & 0x0ff00090) == 0x07400010) |
1282 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); | 1422 | return prep_emulate_rdhi16rdlo12rs8rm0_wflags(insn, asi); |
1283 | 1423 | ||
1284 | /* SMLAD : cccc 0111 0000 xxxx xxxx xxxx 00x1 xxxx :Q */ | 1424 | /* SMLAD : cccc 0111 0000 xxxx xxxx xxxx 00x1 xxxx :Q */ |
1425 | /* SMUAD : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */ | ||
1285 | /* SMLSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :Q */ | 1426 | /* SMLSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx :Q */ |
1427 | /* SMUSD : cccc 0111 0000 xxxx 1111 xxxx 01x1 xxxx : */ | ||
1286 | /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */ | 1428 | /* SMMLA : cccc 0111 0101 xxxx xxxx xxxx 00x1 xxxx : */ |
1287 | /* SMMLS : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx : */ | 1429 | /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */ |
1430 | /* USADA8 : cccc 0111 1000 xxxx xxxx xxxx 0001 xxxx : */ | ||
1431 | /* USAD8 : cccc 0111 1000 xxxx 1111 xxxx 0001 xxxx : */ | ||
1288 | if ((insn & 0x0ff00090) == 0x07000010 || | 1432 | if ((insn & 0x0ff00090) == 0x07000010 || |
1289 | (insn & 0x0ff000d0) == 0x07500010 || | 1433 | (insn & 0x0ff000d0) == 0x07500010 || |
1290 | (insn & 0x0ff000d0) == 0x075000d0) | 1434 | (insn & 0x0ff000f0) == 0x07800010) { |
1435 | |||
1436 | if ((insn & 0x0000f000) == 0x0000f000) | ||
1437 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | ||
1438 | else | ||
1439 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | ||
1440 | } | ||
1441 | |||
1442 | /* SMMLS : cccc 0111 0101 xxxx xxxx xxxx 11x1 xxxx : */ | ||
1443 | if ((insn & 0x0ff000d0) == 0x075000d0) | ||
1291 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); | 1444 | return prep_emulate_rd16rn12rs8rm0_wflags(insn, asi); |
1292 | 1445 | ||
1293 | /* SMUSD : cccc 0111 0000 xxxx xxxx xxxx 01x1 xxxx : */ | 1446 | /* SBFX : cccc 0111 101x xxxx xxxx xxxx x101 xxxx : */ |
1294 | /* SMUAD : cccc 0111 0000 xxxx 1111 xxxx 00x1 xxxx :Q */ | 1447 | /* UBFX : cccc 0111 111x xxxx xxxx xxxx x101 xxxx : */ |
1295 | /* SMMUL : cccc 0111 0101 xxxx 1111 xxxx 00x1 xxxx : */ | 1448 | if ((insn & 0x0fa00070) == 0x07a00050) |
1296 | return prep_emulate_rd16rs8rm0_wflags(insn, asi); | 1449 | return prep_emulate_rd12rm0(insn, asi); |
1450 | |||
1451 | /* BFI : cccc 0111 110x xxxx xxxx xxxx x001 xxxx : */ | ||
1452 | /* BFC : cccc 0111 110x xxxx xxxx xxxx x001 1111 : */ | ||
1453 | if ((insn & 0x0fe00070) == 0x07c00010) { | ||
1454 | |||
1455 | if ((insn & 0x0000000f) == 0x0000000f) | ||
1456 | return prep_emulate_rd12_modify(insn, asi); | ||
1457 | else | ||
1458 | return prep_emulate_rd12rn0_modify(insn, asi); | ||
1459 | } | ||
1460 | |||
1461 | return INSN_REJECTED; | ||
1297 | } | 1462 | } |
1298 | 1463 | ||
1299 | static enum kprobe_insn __kprobes | 1464 | static enum kprobe_insn __kprobes |
@@ -1307,6 +1472,10 @@ space_cccc_01xx(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1307 | /* STRB : cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */ | 1472 | /* STRB : cccc 01xx x1x0 xxxx xxxx xxxx xxxx xxxx */ |
1308 | /* STRBT : cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */ | 1473 | /* STRBT : cccc 01x0 x110 xxxx xxxx xxxx xxxx xxxx */ |
1309 | /* STRT : cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */ | 1474 | /* STRT : cccc 01x0 x010 xxxx xxxx xxxx xxxx xxxx */ |
1475 | |||
1476 | if ((insn & 0x00500000) == 0x00500000 && is_r15(insn, 12)) | ||
1477 | return INSN_REJECTED; /* LDRB into PC */ | ||
1478 | |||
1310 | return prep_emulate_ldr_str(insn, asi); | 1479 | return prep_emulate_ldr_str(insn, asi); |
1311 | } | 1480 | } |
1312 | 1481 | ||
@@ -1321,10 +1490,9 @@ space_cccc_100x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1321 | 1490 | ||
1322 | /* LDM(1) : cccc 100x x0x1 xxxx xxxx xxxx xxxx xxxx */ | 1491 | /* LDM(1) : cccc 100x x0x1 xxxx xxxx xxxx xxxx xxxx */ |
1323 | /* STM(1) : cccc 100x x0x0 xxxx xxxx xxxx xxxx xxxx */ | 1492 | /* STM(1) : cccc 100x x0x0 xxxx xxxx xxxx xxxx xxxx */ |
1324 | asi->insn[0] = truecc_insn(insn); | ||
1325 | asi->insn_handler = ((insn & 0x108000) == 0x008000) ? /* STM & R15 */ | 1493 | asi->insn_handler = ((insn & 0x108000) == 0x008000) ? /* STM & R15 */ |
1326 | simulate_stm1_pc : simulate_ldm1stm1; | 1494 | simulate_stm1_pc : simulate_ldm1stm1; |
1327 | return INSN_GOOD; | 1495 | return INSN_GOOD_NO_SLOT; |
1328 | } | 1496 | } |
1329 | 1497 | ||
1330 | static enum kprobe_insn __kprobes | 1498 | static enum kprobe_insn __kprobes |
@@ -1332,58 +1500,117 @@ space_cccc_101x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1332 | { | 1500 | { |
1333 | /* B : cccc 1010 xxxx xxxx xxxx xxxx xxxx xxxx */ | 1501 | /* B : cccc 1010 xxxx xxxx xxxx xxxx xxxx xxxx */ |
1334 | /* BL : cccc 1011 xxxx xxxx xxxx xxxx xxxx xxxx */ | 1502 | /* BL : cccc 1011 xxxx xxxx xxxx xxxx xxxx xxxx */ |
1335 | asi->insn[0] = truecc_insn(insn); | ||
1336 | asi->insn_handler = simulate_bbl; | 1503 | asi->insn_handler = simulate_bbl; |
1337 | return INSN_GOOD; | 1504 | return INSN_GOOD_NO_SLOT; |
1338 | } | 1505 | } |
1339 | 1506 | ||
1340 | static enum kprobe_insn __kprobes | 1507 | static enum kprobe_insn __kprobes |
1341 | space_cccc_1100_010x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 1508 | space_cccc_11xx(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
1342 | { | 1509 | { |
1510 | /* Coprocessor instructions... */ | ||
1343 | /* MCRR : cccc 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */ | 1511 | /* MCRR : cccc 1100 0100 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */ |
1344 | /* MRRC : cccc 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */ | 1512 | /* MRRC : cccc 1100 0101 xxxx xxxx xxxx xxxx xxxx : (Rd!=Rn) */ |
1345 | insn &= 0xfff00fff; | 1513 | /* LDC : cccc 110x xxx1 xxxx xxxx xxxx xxxx xxxx */ |
1346 | insn |= 0x00001000; /* Rn = r0, Rd = r1 */ | 1514 | /* STC : cccc 110x xxx0 xxxx xxxx xxxx xxxx xxxx */ |
1347 | asi->insn[0] = insn; | 1515 | /* CDP : cccc 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */ |
1348 | asi->insn_handler = (insn & (1 << 20)) ? emulate_mrrc : emulate_mcrr; | 1516 | /* MCR : cccc 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */ |
1349 | return INSN_GOOD; | 1517 | /* MRC : cccc 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */ |
1518 | |||
1519 | /* SVC : cccc 1111 xxxx xxxx xxxx xxxx xxxx xxxx */ | ||
1520 | |||
1521 | return INSN_REJECTED; | ||
1350 | } | 1522 | } |
1351 | 1523 | ||
1352 | static enum kprobe_insn __kprobes | 1524 | static unsigned long __kprobes __check_eq(unsigned long cpsr) |
1353 | space_cccc_110x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | ||
1354 | { | 1525 | { |
1355 | /* LDC : cccc 110x xxx1 xxxx xxxx xxxx xxxx xxxx */ | 1526 | return cpsr & PSR_Z_BIT; |
1356 | /* STC : cccc 110x xxx0 xxxx xxxx xxxx xxxx xxxx */ | ||
1357 | insn &= 0xfff0ffff; /* Rn = r0 */ | ||
1358 | asi->insn[0] = insn; | ||
1359 | asi->insn_handler = emulate_ldcstc; | ||
1360 | return INSN_GOOD; | ||
1361 | } | 1527 | } |
1362 | 1528 | ||
1363 | static enum kprobe_insn __kprobes | 1529 | static unsigned long __kprobes __check_ne(unsigned long cpsr) |
1364 | space_cccc_111x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | ||
1365 | { | 1530 | { |
1366 | /* BKPT : 1110 0001 0010 xxxx xxxx xxxx 0111 xxxx */ | 1531 | return (~cpsr) & PSR_Z_BIT; |
1367 | /* SWI : cccc 1111 xxxx xxxx xxxx xxxx xxxx xxxx */ | 1532 | } |
1368 | if ((insn & 0xfff000f0) == 0xe1200070 || | ||
1369 | (insn & 0x0f000000) == 0x0f000000) | ||
1370 | return INSN_REJECTED; | ||
1371 | 1533 | ||
1372 | /* CDP : cccc 1110 xxxx xxxx xxxx xxxx xxx0 xxxx */ | 1534 | static unsigned long __kprobes __check_cs(unsigned long cpsr) |
1373 | if ((insn & 0x0f000010) == 0x0e000000) { | 1535 | { |
1374 | asi->insn[0] = insn; | 1536 | return cpsr & PSR_C_BIT; |
1375 | asi->insn_handler = emulate_none; | 1537 | } |
1376 | return INSN_GOOD; | ||
1377 | } | ||
1378 | 1538 | ||
1379 | /* MCR : cccc 1110 xxx0 xxxx xxxx xxxx xxx1 xxxx */ | 1539 | static unsigned long __kprobes __check_cc(unsigned long cpsr) |
1380 | /* MRC : cccc 1110 xxx1 xxxx xxxx xxxx xxx1 xxxx */ | 1540 | { |
1381 | insn &= 0xffff0fff; /* Rd = r0 */ | 1541 | return (~cpsr) & PSR_C_BIT; |
1382 | asi->insn[0] = insn; | ||
1383 | asi->insn_handler = (insn & (1 << 20)) ? emulate_rd12 : emulate_ird12; | ||
1384 | return INSN_GOOD; | ||
1385 | } | 1542 | } |
1386 | 1543 | ||
1544 | static unsigned long __kprobes __check_mi(unsigned long cpsr) | ||
1545 | { | ||
1546 | return cpsr & PSR_N_BIT; | ||
1547 | } | ||
1548 | |||
1549 | static unsigned long __kprobes __check_pl(unsigned long cpsr) | ||
1550 | { | ||
1551 | return (~cpsr) & PSR_N_BIT; | ||
1552 | } | ||
1553 | |||
1554 | static unsigned long __kprobes __check_vs(unsigned long cpsr) | ||
1555 | { | ||
1556 | return cpsr & PSR_V_BIT; | ||
1557 | } | ||
1558 | |||
1559 | static unsigned long __kprobes __check_vc(unsigned long cpsr) | ||
1560 | { | ||
1561 | return (~cpsr) & PSR_V_BIT; | ||
1562 | } | ||
1563 | |||
1564 | static unsigned long __kprobes __check_hi(unsigned long cpsr) | ||
1565 | { | ||
1566 | cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */ | ||
1567 | return cpsr & PSR_C_BIT; | ||
1568 | } | ||
1569 | |||
1570 | static unsigned long __kprobes __check_ls(unsigned long cpsr) | ||
1571 | { | ||
1572 | cpsr &= ~(cpsr >> 1); /* PSR_C_BIT &= ~PSR_Z_BIT */ | ||
1573 | return (~cpsr) & PSR_C_BIT; | ||
1574 | } | ||
1575 | |||
1576 | static unsigned long __kprobes __check_ge(unsigned long cpsr) | ||
1577 | { | ||
1578 | cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1579 | return (~cpsr) & PSR_N_BIT; | ||
1580 | } | ||
1581 | |||
1582 | static unsigned long __kprobes __check_lt(unsigned long cpsr) | ||
1583 | { | ||
1584 | cpsr ^= (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1585 | return cpsr & PSR_N_BIT; | ||
1586 | } | ||
1587 | |||
1588 | static unsigned long __kprobes __check_gt(unsigned long cpsr) | ||
1589 | { | ||
1590 | unsigned long temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1591 | temp |= (cpsr << 1); /* PSR_N_BIT |= PSR_Z_BIT */ | ||
1592 | return (~temp) & PSR_N_BIT; | ||
1593 | } | ||
1594 | |||
1595 | static unsigned long __kprobes __check_le(unsigned long cpsr) | ||
1596 | { | ||
1597 | unsigned long temp = cpsr ^ (cpsr << 3); /* PSR_N_BIT ^= PSR_V_BIT */ | ||
1598 | temp |= (cpsr << 1); /* PSR_N_BIT |= PSR_Z_BIT */ | ||
1599 | return temp & PSR_N_BIT; | ||
1600 | } | ||
1601 | |||
1602 | static unsigned long __kprobes __check_al(unsigned long cpsr) | ||
1603 | { | ||
1604 | return true; | ||
1605 | } | ||
1606 | |||
1607 | static kprobe_check_cc * const condition_checks[16] = { | ||
1608 | &__check_eq, &__check_ne, &__check_cs, &__check_cc, | ||
1609 | &__check_mi, &__check_pl, &__check_vs, &__check_vc, | ||
1610 | &__check_hi, &__check_ls, &__check_ge, &__check_lt, | ||
1611 | &__check_gt, &__check_le, &__check_al, &__check_al | ||
1612 | }; | ||
1613 | |||
1387 | /* Return: | 1614 | /* Return: |
1388 | * INSN_REJECTED If instruction is one not allowed to kprobe, | 1615 | * INSN_REJECTED If instruction is one not allowed to kprobe, |
1389 | * INSN_GOOD If instruction is supported and uses instruction slot, | 1616 | * INSN_GOOD If instruction is supported and uses instruction slot, |
@@ -1399,133 +1626,45 @@ space_cccc_111x(kprobe_opcode_t insn, struct arch_specific_insn *asi) | |||
1399 | enum kprobe_insn __kprobes | 1626 | enum kprobe_insn __kprobes |
1400 | arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi) | 1627 | arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi) |
1401 | { | 1628 | { |
1629 | asi->insn_check_cc = condition_checks[insn>>28]; | ||
1402 | asi->insn[1] = KPROBE_RETURN_INSTRUCTION; | 1630 | asi->insn[1] = KPROBE_RETURN_INSTRUCTION; |
1403 | 1631 | ||
1404 | if ((insn & 0xf0000000) == 0xf0000000) { | 1632 | if ((insn & 0xf0000000) == 0xf0000000) |
1405 | 1633 | ||
1406 | return space_1111(insn, asi); | 1634 | return space_1111(insn, asi); |
1407 | 1635 | ||
1408 | } else if ((insn & 0x0e000000) == 0x00000000) { | 1636 | else if ((insn & 0x0e000000) == 0x00000000) |
1409 | 1637 | ||
1410 | return space_cccc_000x(insn, asi); | 1638 | return space_cccc_000x(insn, asi); |
1411 | 1639 | ||
1412 | } else if ((insn & 0x0e000000) == 0x02000000) { | 1640 | else if ((insn & 0x0e000000) == 0x02000000) |
1413 | 1641 | ||
1414 | return space_cccc_001x(insn, asi); | 1642 | return space_cccc_001x(insn, asi); |
1415 | 1643 | ||
1416 | } else if ((insn & 0x0f000010) == 0x06000010) { | 1644 | else if ((insn & 0x0f000010) == 0x06000010) |
1417 | 1645 | ||
1418 | return space_cccc_0110__1(insn, asi); | 1646 | return space_cccc_0110__1(insn, asi); |
1419 | 1647 | ||
1420 | } else if ((insn & 0x0f000010) == 0x07000010) { | 1648 | else if ((insn & 0x0f000010) == 0x07000010) |
1421 | 1649 | ||
1422 | return space_cccc_0111__1(insn, asi); | 1650 | return space_cccc_0111__1(insn, asi); |
1423 | 1651 | ||
1424 | } else if ((insn & 0x0c000000) == 0x04000000) { | 1652 | else if ((insn & 0x0c000000) == 0x04000000) |
1425 | 1653 | ||
1426 | return space_cccc_01xx(insn, asi); | 1654 | return space_cccc_01xx(insn, asi); |
1427 | 1655 | ||
1428 | } else if ((insn & 0x0e000000) == 0x08000000) { | 1656 | else if ((insn & 0x0e000000) == 0x08000000) |
1429 | 1657 | ||
1430 | return space_cccc_100x(insn, asi); | 1658 | return space_cccc_100x(insn, asi); |
1431 | 1659 | ||
1432 | } else if ((insn & 0x0e000000) == 0x0a000000) { | 1660 | else if ((insn & 0x0e000000) == 0x0a000000) |
1433 | 1661 | ||
1434 | return space_cccc_101x(insn, asi); | 1662 | return space_cccc_101x(insn, asi); |
1435 | 1663 | ||
1436 | } else if ((insn & 0x0fe00000) == 0x0c400000) { | 1664 | return space_cccc_11xx(insn, asi); |
1437 | |||
1438 | return space_cccc_1100_010x(insn, asi); | ||
1439 | |||
1440 | } else if ((insn & 0x0e000000) == 0x0c000000) { | ||
1441 | |||
1442 | return space_cccc_110x(insn, asi); | ||
1443 | |||
1444 | } | ||
1445 | |||
1446 | return space_cccc_111x(insn, asi); | ||
1447 | } | 1665 | } |
1448 | 1666 | ||
1449 | void __init arm_kprobe_decode_init(void) | 1667 | void __init arm_kprobe_decode_init(void) |
1450 | { | 1668 | { |
1451 | find_str_pc_offset(); | 1669 | find_str_pc_offset(); |
1452 | } | 1670 | } |
1453 | |||
1454 | |||
1455 | /* | ||
1456 | * All ARM instructions listed below. | ||
1457 | * | ||
1458 | * Instructions and their general purpose registers are given. | ||
1459 | * If a particular register may not use R15, it is prefixed with a "!". | ||
1460 | * If marked with a "*" means the value returned by reading R15 | ||
1461 | * is implementation defined. | ||
1462 | * | ||
1463 | * ADC/ADD/AND/BIC/CMN/CMP/EOR/MOV/MVN/ORR/RSB/RSC/SBC/SUB/TEQ | ||
1464 | * TST: Rd, Rn, Rm, !Rs | ||
1465 | * BX: Rm | ||
1466 | * BLX(2): !Rm | ||
1467 | * BX: Rm (R15 legal, but discouraged) | ||
1468 | * BXJ: !Rm, | ||
1469 | * CLZ: !Rd, !Rm | ||
1470 | * CPY: Rd, Rm | ||
1471 | * LDC/2,STC/2 immediate offset & unindex: Rn | ||
1472 | * LDC/2,STC/2 immediate pre/post-indexed: !Rn | ||
1473 | * LDM(1/3): !Rn, register_list | ||
1474 | * LDM(2): !Rn, !register_list | ||
1475 | * LDR,STR,PLD immediate offset: Rd, Rn | ||
1476 | * LDR,STR,PLD register offset: Rd, Rn, !Rm | ||
1477 | * LDR,STR,PLD scaled register offset: Rd, !Rn, !Rm | ||
1478 | * LDR,STR immediate pre/post-indexed: Rd, !Rn | ||
1479 | * LDR,STR register pre/post-indexed: Rd, !Rn, !Rm | ||
1480 | * LDR,STR scaled register pre/post-indexed: Rd, !Rn, !Rm | ||
1481 | * LDRB,STRB immediate offset: !Rd, Rn | ||
1482 | * LDRB,STRB register offset: !Rd, Rn, !Rm | ||
1483 | * LDRB,STRB scaled register offset: !Rd, !Rn, !Rm | ||
1484 | * LDRB,STRB immediate pre/post-indexed: !Rd, !Rn | ||
1485 | * LDRB,STRB register pre/post-indexed: !Rd, !Rn, !Rm | ||
1486 | * LDRB,STRB scaled register pre/post-indexed: !Rd, !Rn, !Rm | ||
1487 | * LDRT,LDRBT,STRBT immediate pre/post-indexed: !Rd, !Rn | ||
1488 | * LDRT,LDRBT,STRBT register pre/post-indexed: !Rd, !Rn, !Rm | ||
1489 | * LDRT,LDRBT,STRBT scaled register pre/post-indexed: !Rd, !Rn, !Rm | ||
1490 | * LDRH/SH/SB/D,STRH/SH/SB/D immediate offset: !Rd, Rn | ||
1491 | * LDRH/SH/SB/D,STRH/SH/SB/D register offset: !Rd, Rn, !Rm | ||
1492 | * LDRH/SH/SB/D,STRH/SH/SB/D immediate pre/post-indexed: !Rd, !Rn | ||
1493 | * LDRH/SH/SB/D,STRH/SH/SB/D register pre/post-indexed: !Rd, !Rn, !Rm | ||
1494 | * LDREX: !Rd, !Rn | ||
1495 | * MCR/2: !Rd | ||
1496 | * MCRR/2,MRRC/2: !Rd, !Rn | ||
1497 | * MLA: !Rd, !Rn, !Rm, !Rs | ||
1498 | * MOV: Rd | ||
1499 | * MRC/2: !Rd (if Rd==15, only changes cond codes, not the register) | ||
1500 | * MRS,MSR: !Rd | ||
1501 | * MUL: !Rd, !Rm, !Rs | ||
1502 | * PKH{BT,TB}: !Rd, !Rn, !Rm | ||
1503 | * QDADD,[U]QADD/16/8/SUBX: !Rd, !Rm, !Rn | ||
1504 | * QDSUB,[U]QSUB/16/8/ADDX: !Rd, !Rm, !Rn | ||
1505 | * REV/16/SH: !Rd, !Rm | ||
1506 | * RFE: !Rn | ||
1507 | * {S,U}[H]ADD{16,8,SUBX},{S,U}[H]SUB{16,8,ADDX}: !Rd, !Rn, !Rm | ||
1508 | * SEL: !Rd, !Rn, !Rm | ||
1509 | * SMLA<x><y>,SMLA{D,W<y>},SMLSD,SMML{A,S}: !Rd, !Rn, !Rm, !Rs | ||
1510 | * SMLAL<x><y>,SMLA{D,LD},SMLSLD,SMMULL,SMULW<y>: !RdHi, !RdLo, !Rm, !Rs | ||
1511 | * SMMUL,SMUAD,SMUL<x><y>,SMUSD: !Rd, !Rm, !Rs | ||
1512 | * SSAT/16: !Rd, !Rm | ||
1513 | * STM(1/2): !Rn, register_list* (R15 in reg list not recommended) | ||
1514 | * STRT immediate pre/post-indexed: Rd*, !Rn | ||
1515 | * STRT register pre/post-indexed: Rd*, !Rn, !Rm | ||
1516 | * STRT scaled register pre/post-indexed: Rd*, !Rn, !Rm | ||
1517 | * STREX: !Rd, !Rn, !Rm | ||
1518 | * SWP/B: !Rd, !Rn, !Rm | ||
1519 | * {S,U}XTA{B,B16,H}: !Rd, !Rn, !Rm | ||
1520 | * {S,U}XT{B,B16,H}: !Rd, !Rm | ||
1521 | * UM{AA,LA,UL}L: !RdHi, !RdLo, !Rm, !Rs | ||
1522 | * USA{D8,A8,T,T16}: !Rd, !Rm, !Rs | ||
1523 | * | ||
1524 | * May transfer control by writing R15 (possible mode changes or alternate | ||
1525 | * mode accesses marked by "*"): | ||
1526 | * ALU op (* with s-bit), B, BL, BKPT, BLX(1/2), BX, BXJ, CPS*, CPY, | ||
1527 | * LDM(1), LDM(2/3)*, LDR, MOV, RFE*, SWI* | ||
1528 | * | ||
1529 | * Instructions that do not take general registers, nor transfer control: | ||
1530 | * CDP/2, SETEND, SRS* | ||
1531 | */ | ||
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 2ba7deb3072e..1656c87501c0 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
@@ -134,7 +134,8 @@ static void __kprobes singlestep(struct kprobe *p, struct pt_regs *regs, | |||
134 | struct kprobe_ctlblk *kcb) | 134 | struct kprobe_ctlblk *kcb) |
135 | { | 135 | { |
136 | regs->ARM_pc += 4; | 136 | regs->ARM_pc += 4; |
137 | p->ainsn.insn_handler(p, regs); | 137 | if (p->ainsn.insn_check_cc(regs->ARM_cpsr)) |
138 | p->ainsn.insn_handler(p, regs); | ||
138 | } | 139 | } |
139 | 140 | ||
140 | /* | 141 | /* |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 22e194eb8536..139e3c827369 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -79,6 +79,7 @@ struct arm_pmu { | |||
79 | void (*write_counter)(int idx, u32 val); | 79 | void (*write_counter)(int idx, u32 val); |
80 | void (*start)(void); | 80 | void (*start)(void); |
81 | void (*stop)(void); | 81 | void (*stop)(void); |
82 | void (*reset)(void *); | ||
82 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] | 83 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] |
83 | [PERF_COUNT_HW_CACHE_OP_MAX] | 84 | [PERF_COUNT_HW_CACHE_OP_MAX] |
84 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; | 85 | [PERF_COUNT_HW_CACHE_RESULT_MAX]; |
@@ -204,11 +205,9 @@ armpmu_event_set_period(struct perf_event *event, | |||
204 | static u64 | 205 | static u64 |
205 | armpmu_event_update(struct perf_event *event, | 206 | armpmu_event_update(struct perf_event *event, |
206 | struct hw_perf_event *hwc, | 207 | struct hw_perf_event *hwc, |
207 | int idx) | 208 | int idx, int overflow) |
208 | { | 209 | { |
209 | int shift = 64 - 32; | 210 | u64 delta, prev_raw_count, new_raw_count; |
210 | s64 prev_raw_count, new_raw_count; | ||
211 | u64 delta; | ||
212 | 211 | ||
213 | again: | 212 | again: |
214 | prev_raw_count = local64_read(&hwc->prev_count); | 213 | prev_raw_count = local64_read(&hwc->prev_count); |
@@ -218,8 +217,13 @@ again: | |||
218 | new_raw_count) != prev_raw_count) | 217 | new_raw_count) != prev_raw_count) |
219 | goto again; | 218 | goto again; |
220 | 219 | ||
221 | delta = (new_raw_count << shift) - (prev_raw_count << shift); | 220 | new_raw_count &= armpmu->max_period; |
222 | delta >>= shift; | 221 | prev_raw_count &= armpmu->max_period; |
222 | |||
223 | if (overflow) | ||
224 | delta = armpmu->max_period - prev_raw_count + new_raw_count + 1; | ||
225 | else | ||
226 | delta = new_raw_count - prev_raw_count; | ||
223 | 227 | ||
224 | local64_add(delta, &event->count); | 228 | local64_add(delta, &event->count); |
225 | local64_sub(delta, &hwc->period_left); | 229 | local64_sub(delta, &hwc->period_left); |
@@ -236,7 +240,7 @@ armpmu_read(struct perf_event *event) | |||
236 | if (hwc->idx < 0) | 240 | if (hwc->idx < 0) |
237 | return; | 241 | return; |
238 | 242 | ||
239 | armpmu_event_update(event, hwc, hwc->idx); | 243 | armpmu_event_update(event, hwc, hwc->idx, 0); |
240 | } | 244 | } |
241 | 245 | ||
242 | static void | 246 | static void |
@@ -254,7 +258,7 @@ armpmu_stop(struct perf_event *event, int flags) | |||
254 | if (!(hwc->state & PERF_HES_STOPPED)) { | 258 | if (!(hwc->state & PERF_HES_STOPPED)) { |
255 | armpmu->disable(hwc, hwc->idx); | 259 | armpmu->disable(hwc, hwc->idx); |
256 | barrier(); /* why? */ | 260 | barrier(); /* why? */ |
257 | armpmu_event_update(event, hwc, hwc->idx); | 261 | armpmu_event_update(event, hwc, hwc->idx, 0); |
258 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; | 262 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; |
259 | } | 263 | } |
260 | } | 264 | } |
@@ -624,6 +628,19 @@ static struct pmu pmu = { | |||
624 | #include "perf_event_v6.c" | 628 | #include "perf_event_v6.c" |
625 | #include "perf_event_v7.c" | 629 | #include "perf_event_v7.c" |
626 | 630 | ||
631 | /* | ||
632 | * Ensure the PMU has sane values out of reset. | ||
633 | * This requires SMP to be available, so exists as a separate initcall. | ||
634 | */ | ||
635 | static int __init | ||
636 | armpmu_reset(void) | ||
637 | { | ||
638 | if (armpmu && armpmu->reset) | ||
639 | return on_each_cpu(armpmu->reset, NULL, 1); | ||
640 | return 0; | ||
641 | } | ||
642 | arch_initcall(armpmu_reset); | ||
643 | |||
627 | static int __init | 644 | static int __init |
628 | init_hw_perf_events(void) | 645 | init_hw_perf_events(void) |
629 | { | 646 | { |
@@ -729,7 +746,8 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) | |||
729 | 746 | ||
730 | tail = (struct frame_tail __user *)regs->ARM_fp - 1; | 747 | tail = (struct frame_tail __user *)regs->ARM_fp - 1; |
731 | 748 | ||
732 | while (tail && !((unsigned long)tail & 0x3)) | 749 | while ((entry->nr < PERF_MAX_STACK_DEPTH) && |
750 | tail && !((unsigned long)tail & 0x3)) | ||
733 | tail = user_backtrace(tail, entry); | 751 | tail = user_backtrace(tail, entry); |
734 | } | 752 | } |
735 | 753 | ||
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index 6fc2d228db55..f1e8dd94afe8 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
@@ -474,7 +474,7 @@ armv6pmu_handle_irq(int irq_num, | |||
474 | continue; | 474 | continue; |
475 | 475 | ||
476 | hwc = &event->hw; | 476 | hwc = &event->hw; |
477 | armpmu_event_update(event, hwc, idx); | 477 | armpmu_event_update(event, hwc, idx, 1); |
478 | data.period = event->hw.last_period; | 478 | data.period = event->hw.last_period; |
479 | if (!armpmu_event_set_period(event, hwc, idx)) | 479 | if (!armpmu_event_set_period(event, hwc, idx)) |
480 | continue; | 480 | continue; |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 2e1402556fa0..4960686afb58 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -466,6 +466,7 @@ static inline unsigned long armv7_pmnc_read(void) | |||
466 | static inline void armv7_pmnc_write(unsigned long val) | 466 | static inline void armv7_pmnc_write(unsigned long val) |
467 | { | 467 | { |
468 | val &= ARMV7_PMNC_MASK; | 468 | val &= ARMV7_PMNC_MASK; |
469 | isb(); | ||
469 | asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(val)); | 470 | asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(val)); |
470 | } | 471 | } |
471 | 472 | ||
@@ -502,6 +503,7 @@ static inline int armv7_pmnc_select_counter(unsigned int idx) | |||
502 | 503 | ||
503 | val = (idx - ARMV7_EVENT_CNT_TO_CNTx) & ARMV7_SELECT_MASK; | 504 | val = (idx - ARMV7_EVENT_CNT_TO_CNTx) & ARMV7_SELECT_MASK; |
504 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val)); | 505 | asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val)); |
506 | isb(); | ||
505 | 507 | ||
506 | return idx; | 508 | return idx; |
507 | } | 509 | } |
@@ -780,7 +782,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
780 | continue; | 782 | continue; |
781 | 783 | ||
782 | hwc = &event->hw; | 784 | hwc = &event->hw; |
783 | armpmu_event_update(event, hwc, idx); | 785 | armpmu_event_update(event, hwc, idx, 1); |
784 | data.period = event->hw.last_period; | 786 | data.period = event->hw.last_period; |
785 | if (!armpmu_event_set_period(event, hwc, idx)) | 787 | if (!armpmu_event_set_period(event, hwc, idx)) |
786 | continue; | 788 | continue; |
@@ -847,6 +849,18 @@ static int armv7pmu_get_event_idx(struct cpu_hw_events *cpuc, | |||
847 | } | 849 | } |
848 | } | 850 | } |
849 | 851 | ||
852 | static void armv7pmu_reset(void *info) | ||
853 | { | ||
854 | u32 idx, nb_cnt = armpmu->num_events; | ||
855 | |||
856 | /* The counter and interrupt enable registers are unknown at reset. */ | ||
857 | for (idx = 1; idx < nb_cnt; ++idx) | ||
858 | armv7pmu_disable_event(NULL, idx); | ||
859 | |||
860 | /* Initialize & Reset PMNC: C and P bits */ | ||
861 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); | ||
862 | } | ||
863 | |||
850 | static struct arm_pmu armv7pmu = { | 864 | static struct arm_pmu armv7pmu = { |
851 | .handle_irq = armv7pmu_handle_irq, | 865 | .handle_irq = armv7pmu_handle_irq, |
852 | .enable = armv7pmu_enable_event, | 866 | .enable = armv7pmu_enable_event, |
@@ -856,17 +870,15 @@ static struct arm_pmu armv7pmu = { | |||
856 | .get_event_idx = armv7pmu_get_event_idx, | 870 | .get_event_idx = armv7pmu_get_event_idx, |
857 | .start = armv7pmu_start, | 871 | .start = armv7pmu_start, |
858 | .stop = armv7pmu_stop, | 872 | .stop = armv7pmu_stop, |
873 | .reset = armv7pmu_reset, | ||
859 | .raw_event_mask = 0xFF, | 874 | .raw_event_mask = 0xFF, |
860 | .max_period = (1LLU << 32) - 1, | 875 | .max_period = (1LLU << 32) - 1, |
861 | }; | 876 | }; |
862 | 877 | ||
863 | static u32 __init armv7_reset_read_pmnc(void) | 878 | static u32 __init armv7_read_num_pmnc_events(void) |
864 | { | 879 | { |
865 | u32 nb_cnt; | 880 | u32 nb_cnt; |
866 | 881 | ||
867 | /* Initialize & Reset PMNC: C and P bits */ | ||
868 | armv7_pmnc_write(ARMV7_PMNC_P | ARMV7_PMNC_C); | ||
869 | |||
870 | /* Read the nb of CNTx counters supported from PMNC */ | 882 | /* Read the nb of CNTx counters supported from PMNC */ |
871 | nb_cnt = (armv7_pmnc_read() >> ARMV7_PMNC_N_SHIFT) & ARMV7_PMNC_N_MASK; | 883 | nb_cnt = (armv7_pmnc_read() >> ARMV7_PMNC_N_SHIFT) & ARMV7_PMNC_N_MASK; |
872 | 884 | ||
@@ -880,7 +892,7 @@ static const struct arm_pmu *__init armv7_a8_pmu_init(void) | |||
880 | armv7pmu.name = "ARMv7 Cortex-A8"; | 892 | armv7pmu.name = "ARMv7 Cortex-A8"; |
881 | armv7pmu.cache_map = &armv7_a8_perf_cache_map; | 893 | armv7pmu.cache_map = &armv7_a8_perf_cache_map; |
882 | armv7pmu.event_map = &armv7_a8_perf_map; | 894 | armv7pmu.event_map = &armv7_a8_perf_map; |
883 | armv7pmu.num_events = armv7_reset_read_pmnc(); | 895 | armv7pmu.num_events = armv7_read_num_pmnc_events(); |
884 | return &armv7pmu; | 896 | return &armv7pmu; |
885 | } | 897 | } |
886 | 898 | ||
@@ -890,7 +902,7 @@ static const struct arm_pmu *__init armv7_a9_pmu_init(void) | |||
890 | armv7pmu.name = "ARMv7 Cortex-A9"; | 902 | armv7pmu.name = "ARMv7 Cortex-A9"; |
891 | armv7pmu.cache_map = &armv7_a9_perf_cache_map; | 903 | armv7pmu.cache_map = &armv7_a9_perf_cache_map; |
892 | armv7pmu.event_map = &armv7_a9_perf_map; | 904 | armv7pmu.event_map = &armv7_a9_perf_map; |
893 | armv7pmu.num_events = armv7_reset_read_pmnc(); | 905 | armv7pmu.num_events = armv7_read_num_pmnc_events(); |
894 | return &armv7pmu; | 906 | return &armv7pmu; |
895 | } | 907 | } |
896 | #else | 908 | #else |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 28cd3b025bc3..39affbe4fdb2 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -246,7 +246,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
246 | continue; | 246 | continue; |
247 | 247 | ||
248 | hwc = &event->hw; | 248 | hwc = &event->hw; |
249 | armpmu_event_update(event, hwc, idx); | 249 | armpmu_event_update(event, hwc, idx, 1); |
250 | data.period = event->hw.last_period; | 250 | data.period = event->hw.last_period; |
251 | if (!armpmu_event_set_period(event, hwc, idx)) | 251 | if (!armpmu_event_set_period(event, hwc, idx)) |
252 | continue; | 252 | continue; |
@@ -578,7 +578,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
578 | continue; | 578 | continue; |
579 | 579 | ||
580 | hwc = &event->hw; | 580 | hwc = &event->hw; |
581 | armpmu_event_update(event, hwc, idx); | 581 | armpmu_event_update(event, hwc, idx, 1); |
582 | data.period = event->hw.last_period; | 582 | data.period = event->hw.last_period; |
583 | if (!armpmu_event_set_period(event, hwc, idx)) | 583 | if (!armpmu_event_set_period(event, hwc, idx)) |
584 | continue; | 584 | continue; |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 94bbedbed639..5e1e54197227 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -372,6 +372,8 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, | |||
372 | if (clone_flags & CLONE_SETTLS) | 372 | if (clone_flags & CLONE_SETTLS) |
373 | thread->tp_value = regs->ARM_r3; | 373 | thread->tp_value = regs->ARM_r3; |
374 | 374 | ||
375 | thread_notify(THREAD_NOTIFY_COPY, thread); | ||
376 | |||
375 | return 0; | 377 | return 0; |
376 | } | 378 | } |
377 | 379 | ||
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index bfad698a02e7..6398ead9d1c0 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
@@ -119,11 +119,19 @@ ENTRY(cpu_resume) | |||
119 | #else | 119 | #else |
120 | ldr r0, sleep_save_sp @ stack phys addr | 120 | ldr r0, sleep_save_sp @ stack phys addr |
121 | #endif | 121 | #endif |
122 | msr cpsr_c, #PSR_I_BIT | PSR_F_BIT | SVC_MODE @ set SVC, irqs off | 122 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off |
123 | #ifdef MULTI_CPU | 123 | #ifdef MULTI_CPU |
124 | ldmia r0!, {r1, sp, lr, pc} @ load v:p, stack, return fn, resume fn | 124 | @ load v:p, stack, return fn, resume fn |
125 | ARM( ldmia r0!, {r1, sp, lr, pc} ) | ||
126 | THUMB( ldmia r0!, {r1, r2, r3, r4} ) | ||
127 | THUMB( mov sp, r2 ) | ||
128 | THUMB( mov lr, r3 ) | ||
129 | THUMB( bx r4 ) | ||
125 | #else | 130 | #else |
126 | ldmia r0!, {r1, sp, lr} @ load v:p, stack, return fn | 131 | @ load v:p, stack, return fn |
132 | ARM( ldmia r0!, {r1, sp, lr} ) | ||
133 | THUMB( ldmia r0!, {r1, r2, lr} ) | ||
134 | THUMB( mov sp, r2 ) | ||
127 | b cpu_do_resume | 135 | b cpu_do_resume |
128 | #endif | 136 | #endif |
129 | ENDPROC(cpu_resume) | 137 | ENDPROC(cpu_resume) |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 8fe05ad932e4..f29b8a29b174 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -479,7 +479,7 @@ static void broadcast_timer_set_mode(enum clock_event_mode mode, | |||
479 | { | 479 | { |
480 | } | 480 | } |
481 | 481 | ||
482 | static void broadcast_timer_setup(struct clock_event_device *evt) | 482 | static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt) |
483 | { | 483 | { |
484 | evt->name = "dummy_timer"; | 484 | evt->name = "dummy_timer"; |
485 | evt->features = CLOCK_EVT_FEAT_ONESHOT | | 485 | evt->features = CLOCK_EVT_FEAT_ONESHOT | |
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index 7a5760922914..40ee7e5045e4 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
@@ -158,7 +158,7 @@ static int emulate_swpX(unsigned int address, unsigned int *data, | |||
158 | 158 | ||
159 | if (res == 0) { | 159 | if (res == 0) { |
160 | /* | 160 | /* |
161 | * Barrier also required between aquiring a lock for a | 161 | * Barrier also required between acquiring a lock for a |
162 | * protected resource and accessing the resource. Inserted for | 162 | * protected resource and accessing the resource. Inserted for |
163 | * same reason as above. | 163 | * same reason as above. |
164 | */ | 164 | */ |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 4ad8da15ef2b..af0aaebf4de6 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -311,7 +311,7 @@ asmlinkage long sys_oabi_semtimedop(int semid, | |||
311 | long err; | 311 | long err; |
312 | int i; | 312 | int i; |
313 | 313 | ||
314 | if (nsops < 1) | 314 | if (nsops < 1 || nsops > SEMOPM) |
315 | return -EINVAL; | 315 | return -EINVAL; |
316 | sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); | 316 | sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL); |
317 | if (!sops) | 317 | if (!sops) |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f0000e188c8c..3b54ad19d489 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -410,8 +410,7 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
410 | struct thread_info *thread = current_thread_info(); | 410 | struct thread_info *thread = current_thread_info(); |
411 | siginfo_t info; | 411 | siginfo_t info; |
412 | 412 | ||
413 | if (current->personality != PER_LINUX && | 413 | if ((current->personality & PER_MASK) != PER_LINUX && |
414 | current->personality != PER_LINUX_32BIT && | ||
415 | thread->exec_domain->handler) { | 414 | thread->exec_domain->handler) { |
416 | thread->exec_domain->handler(n, regs); | 415 | thread->exec_domain->handler(n, regs); |
417 | return regs->ARM_r0; | 416 | return regs->ARM_r0; |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 2e74a19874d1..295e1e77fa60 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -76,7 +76,7 @@ static struct at91_udc_data __initdata carmeva_udc_data = { | |||
76 | .pullup_pin = AT91_PIN_PD9, | 76 | .pullup_pin = AT91_PIN_PD9, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* FIXME: user dependant */ | 79 | /* FIXME: user dependent */ |
80 | // static struct at91_cf_data __initdata carmeva_cf_data = { | 80 | // static struct at91_cf_data __initdata carmeva_cf_data = { |
81 | // .det_pin = AT91_PIN_PB0, | 81 | // .det_pin = AT91_PIN_PB0, |
82 | // .rst_pin = AT91_PIN_PC5, | 82 | // .rst_pin = AT91_PIN_PC5, |
diff --git a/arch/arm/mach-at91/include/mach/at91_mci.h b/arch/arm/mach-at91/include/mach/at91_mci.h index 27ac6f550fe3..02182c16a022 100644 --- a/arch/arm/mach-at91/include/mach/at91_mci.h +++ b/arch/arm/mach-at91/include/mach/at91_mci.h | |||
@@ -102,7 +102,7 @@ | |||
102 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ | 102 | #define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */ |
103 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ | 103 | #define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */ |
104 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ | 104 | #define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */ |
105 | #define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */ | 105 | #define AT91_MCI_RTOE (1 << 20) /* Response Time-out Error */ |
106 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ | 106 | #define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */ |
107 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ | 107 | #define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */ |
108 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ | 108 | #define AT91_MCI_OVRE (1 << 30) /* Overrun */ |
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index ddeb64536756..056dc6674b6b 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
@@ -208,7 +208,7 @@ extern void at91_gpio_resume(void); | |||
208 | 208 | ||
209 | /*-------------------------------------------------------------------------*/ | 209 | /*-------------------------------------------------------------------------*/ |
210 | 210 | ||
211 | /* wrappers for "new style" GPIO calls. the old AT91-specfic ones should | 211 | /* wrappers for "new style" GPIO calls. the old AT91-specific ones should |
212 | * eventually be removed (along with this errno.h inclusion), and the | 212 | * eventually be removed (along with this errno.h inclusion), and the |
213 | * gpio request/free calls should probably be implemented. | 213 | * gpio request/free calls should probably be implemented. |
214 | */ | 214 | */ |
diff --git a/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c b/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c index 77f84b40dda9..a1f328357aa4 100644 --- a/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c +++ b/arch/arm/mach-bcmring/csp/dmac/dmacHw_extra.c | |||
@@ -551,7 +551,7 @@ int dmacHw_calculateDescriptorCount(dmacHw_CONFIG_t *pConfig, /* [ IN ] Config | |||
551 | 551 | ||
552 | /****************************************************************************/ | 552 | /****************************************************************************/ |
553 | /** | 553 | /** |
554 | * @brief Check the existance of pending descriptor | 554 | * @brief Check the existence of pending descriptor |
555 | * | 555 | * |
556 | * This function confirmes if there is any pending descriptor in the chain | 556 | * This function confirmes if there is any pending descriptor in the chain |
557 | * to program the channel | 557 | * to program the channel |
@@ -775,7 +775,7 @@ int dmacHw_setVariableDataDescriptor(dmacHw_HANDLE_t handle, /* [ IN ] DMA Cha | |||
775 | /** | 775 | /** |
776 | * @brief Read data DMAed to memory | 776 | * @brief Read data DMAed to memory |
777 | * | 777 | * |
778 | * This function will read data that has been DMAed to memory while transfering from: | 778 | * This function will read data that has been DMAed to memory while transferring from: |
779 | * - Memory to memory | 779 | * - Memory to memory |
780 | * - Peripheral to memory | 780 | * - Peripheral to memory |
781 | * | 781 | * |
@@ -941,7 +941,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configurat | |||
941 | /** | 941 | /** |
942 | * @brief Sets channel specific user data | 942 | * @brief Sets channel specific user data |
943 | * | 943 | * |
944 | * This function associates user data to a specif DMA channel | 944 | * This function associates user data to a specific DMA channel |
945 | * | 945 | * |
946 | */ | 946 | */ |
947 | /****************************************************************************/ | 947 | /****************************************************************************/ |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 8d1baf3f4683..d87ad30dda35 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -629,7 +629,7 @@ EXPORT_SYMBOL(dma_get_device_descriptor_ring); | |||
629 | * Configures a DMA channel. | 629 | * Configures a DMA channel. |
630 | * | 630 | * |
631 | * @return | 631 | * @return |
632 | * >= 0 - Initialization was successfull. | 632 | * >= 0 - Initialization was successful. |
633 | * | 633 | * |
634 | * -EBUSY - Device is currently being used. | 634 | * -EBUSY - Device is currently being used. |
635 | * -ENODEV - Device handed in is invalid. | 635 | * -ENODEV - Device handed in is invalid. |
@@ -673,7 +673,7 @@ static int ConfigChannel(DMA_Handle_t handle) | |||
673 | /** | 673 | /** |
674 | * Initializes all of the data structures associated with the DMA. | 674 | * Initializes all of the data structures associated with the DMA. |
675 | * @return | 675 | * @return |
676 | * >= 0 - Initialization was successfull. | 676 | * >= 0 - Initialization was successful. |
677 | * | 677 | * |
678 | * -EBUSY - Device is currently being used. | 678 | * -EBUSY - Device is currently being used. |
679 | * -ENODEV - Device handed in is invalid. | 679 | * -ENODEV - Device handed in is invalid. |
diff --git a/arch/arm/mach-bcmring/include/csp/dmacHw.h b/arch/arm/mach-bcmring/include/csp/dmacHw.h index 6c8da2b9fc1f..e6a1dc484ca7 100644 --- a/arch/arm/mach-bcmring/include/csp/dmacHw.h +++ b/arch/arm/mach-bcmring/include/csp/dmacHw.h | |||
@@ -362,7 +362,7 @@ int dmacHw_setControlDescriptor(dmacHw_CONFIG_t *pConfig, /* [ IN ] Configurati | |||
362 | /** | 362 | /** |
363 | * @brief Read data DMA transferred to memory | 363 | * @brief Read data DMA transferred to memory |
364 | * | 364 | * |
365 | * This function will read data that has been DMAed to memory while transfering from: | 365 | * This function will read data that has been DMAed to memory while transferring from: |
366 | * - Memory to memory | 366 | * - Memory to memory |
367 | * - Peripheral to memory | 367 | * - Peripheral to memory |
368 | * | 368 | * |
@@ -446,7 +446,7 @@ void dmacHw_stopTransfer(dmacHw_HANDLE_t handle /* [ IN ] DMA Channel handle * | |||
446 | 446 | ||
447 | /****************************************************************************/ | 447 | /****************************************************************************/ |
448 | /** | 448 | /** |
449 | * @brief Check the existance of pending descriptor | 449 | * @brief Check the existence of pending descriptor |
450 | * | 450 | * |
451 | * This function confirmes if there is any pending descriptor in the chain | 451 | * This function confirmes if there is any pending descriptor in the chain |
452 | * to program the channel | 452 | * to program the channel |
@@ -542,7 +542,7 @@ dmacHw_HANDLE_t dmacHw_getInterruptSource(void); | |||
542 | /** | 542 | /** |
543 | * @brief Sets channel specific user data | 543 | * @brief Sets channel specific user data |
544 | * | 544 | * |
545 | * This function associates user data to a specif DMA channel | 545 | * This function associates user data to a specific DMA channel |
546 | * | 546 | * |
547 | */ | 547 | */ |
548 | /****************************************************************************/ | 548 | /****************************************************************************/ |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h index 70eaea866cfe..161973385faf 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h +++ b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_def.h | |||
@@ -180,7 +180,7 @@ typedef enum { | |||
180 | 180 | ||
181 | #define chipcHw_XTAL_FREQ_Hz 25000000 /* Reference clock frequency in Hz */ | 181 | #define chipcHw_XTAL_FREQ_Hz 25000000 /* Reference clock frequency in Hz */ |
182 | 182 | ||
183 | /* Programable pin defines */ | 183 | /* Programmable pin defines */ |
184 | #define chipcHw_PIN_GPIO(n) ((((n) >= 0) && ((n) < (chipcHw_GPIO_COUNT))) ? (n) : 0xFFFFFFFF) | 184 | #define chipcHw_PIN_GPIO(n) ((((n) >= 0) && ((n) < (chipcHw_GPIO_COUNT))) ? (n) : 0xFFFFFFFF) |
185 | /* GPIO pin 0 - 60 */ | 185 | /* GPIO pin 0 - 60 */ |
186 | #define chipcHw_PIN_UARTTXD (chipcHw_GPIO_COUNT + 0) /* UART Transmit */ | 186 | #define chipcHw_PIN_UARTTXD (chipcHw_GPIO_COUNT + 0) /* UART Transmit */ |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h index c78833acb37a..03238c299001 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h +++ b/arch/arm/mach-bcmring/include/mach/csp/chipcHw_inline.h | |||
@@ -832,7 +832,7 @@ static inline void chipcHw_setUsbDevice(void) | |||
832 | 832 | ||
833 | /****************************************************************************/ | 833 | /****************************************************************************/ |
834 | /** | 834 | /** |
835 | * @brief Lower layer funtion to enable/disable a clock of a certain device | 835 | * @brief Lower layer function to enable/disable a clock of a certain device |
836 | * | 836 | * |
837 | * This function enables/disables a core clock | 837 | * This function enables/disables a core clock |
838 | * | 838 | * |
diff --git a/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h b/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h index e01fc4607c91..0aeb6a6fe7f8 100644 --- a/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h +++ b/arch/arm/mach-bcmring/include/mach/csp/intcHw_reg.h | |||
@@ -109,9 +109,9 @@ | |||
109 | #define INTCHW_INTC0_DMA0C0 (1<<INTCHW_INTC0_DMA0C0_BITNUM) | 109 | #define INTCHW_INTC0_DMA0C0 (1<<INTCHW_INTC0_DMA0C0_BITNUM) |
110 | 110 | ||
111 | /* INTC1 - interrupt controller 1 */ | 111 | /* INTC1 - interrupt controller 1 */ |
112 | #define INTCHW_INTC1_DDRVPMP_BITNUM 27 /* DDR and VPM PLL clock phase relationship interupt (Not for A0) */ | 112 | #define INTCHW_INTC1_DDRVPMP_BITNUM 27 /* DDR and VPM PLL clock phase relationship interrupt (Not for A0) */ |
113 | #define INTCHW_INTC1_DDRVPMT_BITNUM 26 /* DDR and VPM HW phase align timeout interrupt (Not for A0) */ | 113 | #define INTCHW_INTC1_DDRVPMT_BITNUM 26 /* DDR and VPM HW phase align timeout interrupt (Not for A0) */ |
114 | #define INTCHW_INTC1_DDRP_BITNUM 26 /* DDR and PLL clock phase relationship interupt (For A0 only)) */ | 114 | #define INTCHW_INTC1_DDRP_BITNUM 26 /* DDR and PLL clock phase relationship interrupt (For A0 only)) */ |
115 | #define INTCHW_INTC1_RTC2_BITNUM 25 /* Real time clock tamper interrupt */ | 115 | #define INTCHW_INTC1_RTC2_BITNUM 25 /* Real time clock tamper interrupt */ |
116 | #define INTCHW_INTC1_VDEC_BITNUM 24 /* Hantro Video Decoder interrupt */ | 116 | #define INTCHW_INTC1_VDEC_BITNUM 24 /* Hantro Video Decoder interrupt */ |
117 | /* Bits 13-23 are non-secure versions of the corresponding secure bits in SINTC bits 0-10. */ | 117 | /* Bits 13-23 are non-secure versions of the corresponding secure bits in SINTC bits 0-10. */ |
diff --git a/arch/arm/mach-bcmring/include/mach/reg_umi.h b/arch/arm/mach-bcmring/include/mach/reg_umi.h index 06a355481ea6..0992842caa77 100644 --- a/arch/arm/mach-bcmring/include/mach/reg_umi.h +++ b/arch/arm/mach-bcmring/include/mach/reg_umi.h | |||
@@ -88,7 +88,7 @@ | |||
88 | /* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */ | 88 | /* REG_UMI_FLASH0/1/2_TCR, REG_UMI_SRAM0/1_TCR bits */ |
89 | /* Enable wait pin during burst write or read */ | 89 | /* Enable wait pin during burst write or read */ |
90 | #define REG_UMI_TCR_WAITEN 0x80000000 | 90 | #define REG_UMI_TCR_WAITEN 0x80000000 |
91 | /* Enable mem ctrlr to work iwth ext mem of lower freq than AHB clk */ | 91 | /* Enable mem ctrlr to work with ext mem of lower freq than AHB clk */ |
92 | #define REG_UMI_TCR_LOWFREQ 0x40000000 | 92 | #define REG_UMI_TCR_LOWFREQ 0x40000000 |
93 | /* 1=synch write, 0=async write */ | 93 | /* 1=synch write, 0=async write */ |
94 | #define REG_UMI_TCR_MEMTYPE_SYNCWRITE 0x20000000 | 94 | #define REG_UMI_TCR_MEMTYPE_SYNCWRITE 0x20000000 |
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 32f147998cd9..c0deacae778d 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -63,6 +63,7 @@ config MACH_DAVINCI_EVM | |||
63 | depends on ARCH_DAVINCI_DM644x | 63 | depends on ARCH_DAVINCI_DM644x |
64 | select MISC_DEVICES | 64 | select MISC_DEVICES |
65 | select EEPROM_AT24 | 65 | select EEPROM_AT24 |
66 | select I2C | ||
66 | help | 67 | help |
67 | Configure this option to specify the whether the board used | 68 | Configure this option to specify the whether the board used |
68 | for development is a DM644x EVM | 69 | for development is a DM644x EVM |
@@ -72,6 +73,7 @@ config MACH_SFFSDR | |||
72 | depends on ARCH_DAVINCI_DM644x | 73 | depends on ARCH_DAVINCI_DM644x |
73 | select MISC_DEVICES | 74 | select MISC_DEVICES |
74 | select EEPROM_AT24 | 75 | select EEPROM_AT24 |
76 | select I2C | ||
75 | help | 77 | help |
76 | Say Y here to select the Lyrtech Small Form Factor | 78 | Say Y here to select the Lyrtech Small Form Factor |
77 | Software Defined Radio (SFFSDR) board. | 79 | Software Defined Radio (SFFSDR) board. |
@@ -105,6 +107,7 @@ config MACH_DAVINCI_DM6467_EVM | |||
105 | select MACH_DAVINCI_DM6467TEVM | 107 | select MACH_DAVINCI_DM6467TEVM |
106 | select MISC_DEVICES | 108 | select MISC_DEVICES |
107 | select EEPROM_AT24 | 109 | select EEPROM_AT24 |
110 | select I2C | ||
108 | help | 111 | help |
109 | Configure this option to specify the whether the board used | 112 | Configure this option to specify the whether the board used |
110 | for development is a DM6467 EVM | 113 | for development is a DM6467 EVM |
@@ -118,6 +121,7 @@ config MACH_DAVINCI_DM365_EVM | |||
118 | depends on ARCH_DAVINCI_DM365 | 121 | depends on ARCH_DAVINCI_DM365 |
119 | select MISC_DEVICES | 122 | select MISC_DEVICES |
120 | select EEPROM_AT24 | 123 | select EEPROM_AT24 |
124 | select I2C | ||
121 | help | 125 | help |
122 | Configure this option to specify whether the board used | 126 | Configure this option to specify whether the board used |
123 | for development is a DM365 EVM | 127 | for development is a DM365 EVM |
@@ -129,6 +133,7 @@ config MACH_DAVINCI_DA830_EVM | |||
129 | select GPIO_PCF857X | 133 | select GPIO_PCF857X |
130 | select MISC_DEVICES | 134 | select MISC_DEVICES |
131 | select EEPROM_AT24 | 135 | select EEPROM_AT24 |
136 | select I2C | ||
132 | help | 137 | help |
133 | Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module. | 138 | Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module. |
134 | 139 | ||
@@ -205,6 +210,7 @@ config MACH_MITYOMAPL138 | |||
205 | depends on ARCH_DAVINCI_DA850 | 210 | depends on ARCH_DAVINCI_DA850 |
206 | select MISC_DEVICES | 211 | select MISC_DEVICES |
207 | select EEPROM_AT24 | 212 | select EEPROM_AT24 |
213 | select I2C | ||
208 | help | 214 | help |
209 | Say Y here to select the Critical Link MityDSP-L138/MityARM-1808 | 215 | Say Y here to select the Critical Link MityDSP-L138/MityARM-1808 |
210 | System on Module. Information on this SoM may be found at | 216 | System on Module. Information on this SoM may be found at |
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 2aa79c54f98e..606a6f27ed6c 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <mach/mux.h> | 29 | #include <mach/mux.h> |
30 | #include <mach/spi.h> | 30 | #include <mach/spi.h> |
31 | 31 | ||
32 | #define MITYOMAPL138_PHY_ID "0:03" | 32 | #define MITYOMAPL138_PHY_ID "" |
33 | 33 | ||
34 | #define FACTORY_CONFIG_MAGIC 0x012C0138 | 34 | #define FACTORY_CONFIG_MAGIC 0x012C0138 |
35 | #define FACTORY_CONFIG_VERSION 0x00010001 | 35 | #define FACTORY_CONFIG_VERSION 0x00010001 |
@@ -414,7 +414,7 @@ static struct resource mityomapl138_nandflash_resource[] = { | |||
414 | 414 | ||
415 | static struct platform_device mityomapl138_nandflash_device = { | 415 | static struct platform_device mityomapl138_nandflash_device = { |
416 | .name = "davinci_nand", | 416 | .name = "davinci_nand", |
417 | .id = 0, | 417 | .id = 1, |
418 | .dev = { | 418 | .dev = { |
419 | .platform_data = &mityomapl138_nandflash_data, | 419 | .platform_data = &mityomapl138_nandflash_data, |
420 | }, | 420 | }, |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 6c389ff1020e..3e7be2de96de 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * DM644X-EVM board. It has: | 11 | * DM644X-EVM board. It has: |
12 | * DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC, | 12 | * DM6446M02 module with 256MB NAND, 256MB RAM, TLV320AIC32 AIC, |
13 | * USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video. | 13 | * USB, Ethernet, SD/MMC, UART, THS8200, TVP7000 for video. |
14 | * Additionaly realtime clock, IR remote control receiver, | 14 | * Additionally realtime clock, IR remote control receiver, |
15 | * IR Blaster based on MSP430 (firmware although is different | 15 | * IR Blaster based on MSP430 (firmware although is different |
16 | * from used in DM644X-EVM), internal ATA-6 3.5” HDD drive | 16 | * from used in DM644X-EVM), internal ATA-6 3.5” HDD drive |
17 | * with PATA interface, two muxed red-green leds. | 17 | * with PATA interface, two muxed red-green leds. |
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c index 4a68c2b1ec11..0a95be1512bb 100644 --- a/arch/arm/mach-davinci/cpufreq.c +++ b/arch/arm/mach-davinci/cpufreq.c | |||
@@ -167,7 +167,7 @@ static int davinci_cpu_init(struct cpufreq_policy *policy) | |||
167 | /* | 167 | /* |
168 | * Time measurement across the target() function yields ~1500-1800us | 168 | * Time measurement across the target() function yields ~1500-1800us |
169 | * time taken with no drivers on notification list. | 169 | * time taken with no drivers on notification list. |
170 | * Setting the latency to 2000 us to accomodate addition of drivers | 170 | * Setting the latency to 2000 us to accommodate addition of drivers |
171 | * to pre/post change notification list. | 171 | * to pre/post change notification list. |
172 | */ | 172 | */ |
173 | policy->cpuinfo.transition_latency = 2000 * 1000; | 173 | policy->cpuinfo.transition_latency = 2000 * 1000; |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 68fe4c289d77..b95b9196deed 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -1123,7 +1123,7 @@ void __init da850_init(void) | |||
1123 | * This helps keeping the peripherals on this domain insulated | 1123 | * This helps keeping the peripherals on this domain insulated |
1124 | * from CPU frequency changes caused by DVFS. The firmware sets | 1124 | * from CPU frequency changes caused by DVFS. The firmware sets |
1125 | * both PLL0 and PLL1 to the same frequency so, there should not | 1125 | * both PLL0 and PLL1 to the same frequency so, there should not |
1126 | * be any noticible change even in non-DVFS use cases. | 1126 | * be any noticeable change even in non-DVFS use cases. |
1127 | */ | 1127 | */ |
1128 | da850_set_async3_src(1); | 1128 | da850_set_async3_src(1); |
1129 | 1129 | ||
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 625d4b66718b..58a02dc7b15a 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -39,7 +39,8 @@ | |||
39 | #define DA8XX_GPIO_BASE 0x01e26000 | 39 | #define DA8XX_GPIO_BASE 0x01e26000 |
40 | #define DA8XX_I2C1_BASE 0x01e28000 | 40 | #define DA8XX_I2C1_BASE 0x01e28000 |
41 | #define DA8XX_SPI0_BASE 0x01c41000 | 41 | #define DA8XX_SPI0_BASE 0x01c41000 |
42 | #define DA8XX_SPI1_BASE 0x01f0e000 | 42 | #define DA830_SPI1_BASE 0x01e12000 |
43 | #define DA850_SPI1_BASE 0x01f0e000 | ||
43 | 44 | ||
44 | #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 | 45 | #define DA8XX_EMAC_CTRL_REG_OFFSET 0x3000 |
45 | #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 | 46 | #define DA8XX_EMAC_MOD_REG_OFFSET 0x2000 |
@@ -762,8 +763,8 @@ static struct resource da8xx_spi0_resources[] = { | |||
762 | 763 | ||
763 | static struct resource da8xx_spi1_resources[] = { | 764 | static struct resource da8xx_spi1_resources[] = { |
764 | [0] = { | 765 | [0] = { |
765 | .start = DA8XX_SPI1_BASE, | 766 | .start = DA830_SPI1_BASE, |
766 | .end = DA8XX_SPI1_BASE + SZ_4K - 1, | 767 | .end = DA830_SPI1_BASE + SZ_4K - 1, |
767 | .flags = IORESOURCE_MEM, | 768 | .flags = IORESOURCE_MEM, |
768 | }, | 769 | }, |
769 | [1] = { | 770 | [1] = { |
@@ -832,5 +833,10 @@ int __init da8xx_register_spi(int instance, struct spi_board_info *info, | |||
832 | 833 | ||
833 | da8xx_spi_pdata[instance].num_chipselect = len; | 834 | da8xx_spi_pdata[instance].num_chipselect = len; |
834 | 835 | ||
836 | if (instance == 1 && cpu_is_davinci_da850()) { | ||
837 | da8xx_spi1_resources[0].start = DA850_SPI1_BASE; | ||
838 | da8xx_spi1_resources[0].end = DA850_SPI1_BASE + SZ_4K - 1; | ||
839 | } | ||
840 | |||
835 | return platform_device_register(&da8xx_spi_device[instance]); | 841 | return platform_device_register(&da8xx_spi_device[instance]); |
836 | } | 842 | } |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 76364d1345df..a3a94e9c9378 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -314,7 +314,7 @@ static struct clk timer2_clk = { | |||
314 | .name = "timer2", | 314 | .name = "timer2", |
315 | .parent = &pll1_aux_clk, | 315 | .parent = &pll1_aux_clk, |
316 | .lpsc = DAVINCI_LPSC_TIMER2, | 316 | .lpsc = DAVINCI_LPSC_TIMER2, |
317 | .usecount = 1, /* REVISIT: why cant' this be disabled? */ | 317 | .usecount = 1, /* REVISIT: why can't this be disabled? */ |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static struct clk timer3_clk = { | 320 | static struct clk timer3_clk = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 9a2376b3137c..4c82c2716293 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -274,7 +274,7 @@ static struct clk timer2_clk = { | |||
274 | .name = "timer2", | 274 | .name = "timer2", |
275 | .parent = &pll1_aux_clk, | 275 | .parent = &pll1_aux_clk, |
276 | .lpsc = DAVINCI_LPSC_TIMER2, | 276 | .lpsc = DAVINCI_LPSC_TIMER2, |
277 | .usecount = 1, /* REVISIT: why cant' this be disabled? */ | 277 | .usecount = 1, /* REVISIT: why can't this be disabled? */ |
278 | }; | 278 | }; |
279 | 279 | ||
280 | static struct clk_lookup dm644x_clks[] = { | 280 | static struct clk_lookup dm644x_clks[] = { |
diff --git a/arch/arm/mach-davinci/include/mach/cputype.h b/arch/arm/mach-davinci/include/mach/cputype.h index cea6b8972043..957fb87e832e 100644 --- a/arch/arm/mach-davinci/include/mach/cputype.h +++ b/arch/arm/mach-davinci/include/mach/cputype.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | 4 | * Author: Kevin Hilman, Deep Root Systems, LLC |
5 | * | 5 | * |
6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci | 6 | * Defines the cpu_is_*() macros for runtime detection of DaVinci |
7 | * device type. In addtion, if support for a given device is not | 7 | * device type. In addition, if support for a given device is not |
8 | * compiled in to the kernel, the macros return 0 so that | 8 | * compiled in to the kernel, the macros return 0 so that |
9 | * resulting code can be optimized out. | 9 | * resulting code can be optimized out. |
10 | * | 10 | * |
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S index 9f1befc5ac38..f8b7ea4f6235 100644 --- a/arch/arm/mach-davinci/include/mach/debug-macro.S +++ b/arch/arm/mach-davinci/include/mach/debug-macro.S | |||
@@ -24,6 +24,9 @@ | |||
24 | 24 | ||
25 | #define UART_SHIFT 2 | 25 | #define UART_SHIFT 2 |
26 | 26 | ||
27 | #define davinci_uart_v2p(x) ((x) - PAGE_OFFSET + PLAT_PHYS_OFFSET) | ||
28 | #define davinci_uart_p2v(x) ((x) - PLAT_PHYS_OFFSET + PAGE_OFFSET) | ||
29 | |||
27 | .pushsection .data | 30 | .pushsection .data |
28 | davinci_uart_phys: .word 0 | 31 | davinci_uart_phys: .word 0 |
29 | davinci_uart_virt: .word 0 | 32 | davinci_uart_virt: .word 0 |
@@ -34,7 +37,7 @@ davinci_uart_virt: .word 0 | |||
34 | /* Use davinci_uart_phys/virt if already configured */ | 37 | /* Use davinci_uart_phys/virt if already configured */ |
35 | 10: mrc p15, 0, \rp, c1, c0 | 38 | 10: mrc p15, 0, \rp, c1, c0 |
36 | tst \rp, #1 @ MMU enabled? | 39 | tst \rp, #1 @ MMU enabled? |
37 | ldreq \rp, =__virt_to_phys(davinci_uart_phys) | 40 | ldreq \rp, =davinci_uart_v2p(davinci_uart_phys) |
38 | ldrne \rp, =davinci_uart_phys | 41 | ldrne \rp, =davinci_uart_phys |
39 | add \rv, \rp, #4 @ davinci_uart_virt | 42 | add \rv, \rp, #4 @ davinci_uart_virt |
40 | ldr \rp, [\rp, #0] | 43 | ldr \rp, [\rp, #0] |
@@ -48,18 +51,18 @@ davinci_uart_virt: .word 0 | |||
48 | tst \rp, #1 @ MMU enabled? | 51 | tst \rp, #1 @ MMU enabled? |
49 | 52 | ||
50 | /* Copy uart phys address from decompressor uart info */ | 53 | /* Copy uart phys address from decompressor uart info */ |
51 | ldreq \rv, =__virt_to_phys(davinci_uart_phys) | 54 | ldreq \rv, =davinci_uart_v2p(davinci_uart_phys) |
52 | ldrne \rv, =davinci_uart_phys | 55 | ldrne \rv, =davinci_uart_phys |
53 | ldreq \rp, =DAVINCI_UART_INFO | 56 | ldreq \rp, =DAVINCI_UART_INFO |
54 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) | 57 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
55 | ldr \rp, [\rp, #0] | 58 | ldr \rp, [\rp, #0] |
56 | str \rp, [\rv] | 59 | str \rp, [\rv] |
57 | 60 | ||
58 | /* Copy uart virt address from decompressor uart info */ | 61 | /* Copy uart virt address from decompressor uart info */ |
59 | ldreq \rv, =__virt_to_phys(davinci_uart_virt) | 62 | ldreq \rv, =davinci_uart_v2p(davinci_uart_virt) |
60 | ldrne \rv, =davinci_uart_virt | 63 | ldrne \rv, =davinci_uart_virt |
61 | ldreq \rp, =DAVINCI_UART_INFO | 64 | ldreq \rp, =DAVINCI_UART_INFO |
62 | ldrne \rp, =__phys_to_virt(DAVINCI_UART_INFO) | 65 | ldrne \rp, =davinci_uart_p2v(DAVINCI_UART_INFO) |
63 | ldr \rp, [\rp, #4] | 66 | ldr \rp, [\rp, #4] |
64 | str \rp, [\rv] | 67 | str \rp, [\rv] |
65 | 68 | ||
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 8051110b8ac3..c9e6ce185a66 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). | 23 | * This area sits just below the page tables (see arch/arm/kernel/head.S). |
24 | */ | 24 | */ |
25 | #define DAVINCI_UART_INFO (PHYS_OFFSET + 0x3ff8) | 25 | #define DAVINCI_UART_INFO (PLAT_PHYS_OFFSET + 0x3ff8) |
26 | 26 | ||
27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) | 27 | #define DAVINCI_UART0_BASE (IO_PHYS + 0x20000) |
28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) | 28 | #define DAVINCI_UART1_BASE (IO_PHYS + 0x20400) |
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index 180b8a9d0d21..a5a9ff70b198 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -101,7 +101,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
101 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | 101 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) |
102 | { | 102 | { |
103 | /* | 103 | /* |
104 | * map discontiguous hw irq range to continous sw irq range: | 104 | * map discontiguous hw irq range to continuous sw irq range: |
105 | * | 105 | * |
106 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) | 106 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) |
107 | */ | 107 | */ |
diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-exynos4/include/mach/gpio.h index 939728b38d48..be9266b10fdb 100644 --- a/arch/arm/mach-exynos4/include/mach/gpio.h +++ b/arch/arm/mach-exynos4/include/mach/gpio.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
20 | 20 | ||
21 | /* Practically, GPIO banks upto GPZ are the configurable gpio banks */ | 21 | /* Practically, GPIO banks up to GPZ are the configurable gpio banks */ |
22 | 22 | ||
23 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
24 | #define EXYNOS4_GPIO_A0_NR (8) | 24 | #define EXYNOS4_GPIO_A0_NR (8) |
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c index af82a8fbb68b..14ac10b7ec02 100644 --- a/arch/arm/mach-exynos4/mct.c +++ b/arch/arm/mach-exynos4/mct.c | |||
@@ -276,7 +276,7 @@ static void exynos4_mct_tick_start(unsigned long cycles, | |||
276 | /* update interrupt count buffer */ | 276 | /* update interrupt count buffer */ |
277 | exynos4_mct_write(tmp, mevt->base + MCT_L_ICNTB_OFFSET); | 277 | exynos4_mct_write(tmp, mevt->base + MCT_L_ICNTB_OFFSET); |
278 | 278 | ||
279 | /* enable MCT tick interupt */ | 279 | /* enable MCT tick interrupt */ |
280 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); | 280 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); |
281 | 281 | ||
282 | tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET); | 282 | tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET); |
diff --git a/arch/arm/mach-exynos4/setup-sdhci-gpio.c b/arch/arm/mach-exynos4/setup-sdhci-gpio.c index 1b3d3a2de95c..e8d08bf8965a 100644 --- a/arch/arm/mach-exynos4/setup-sdhci-gpio.c +++ b/arch/arm/mach-exynos4/setup-sdhci-gpio.c | |||
@@ -38,14 +38,14 @@ void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
38 | switch (width) { | 38 | switch (width) { |
39 | case 8: | 39 | case 8: |
40 | for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) { | 40 | for (gpio = EXYNOS4_GPK1(3); gpio <= EXYNOS4_GPK1(6); gpio++) { |
41 | /* Data pin GPK1[3:6] to special-funtion 3 */ | 41 | /* Data pin GPK1[3:6] to special-function 3 */ |
42 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | 42 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); |
43 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | 43 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); |
44 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | 44 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); |
45 | } | 45 | } |
46 | case 4: | 46 | case 4: |
47 | for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) { | 47 | for (gpio = EXYNOS4_GPK0(3); gpio <= EXYNOS4_GPK0(6); gpio++) { |
48 | /* Data pin GPK0[3:6] to special-funtion 2 */ | 48 | /* Data pin GPK0[3:6] to special-function 2 */ |
49 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | 49 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); |
50 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); | 50 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); |
51 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); | 51 | s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4); |
diff --git a/arch/arm/mach-exynos4/setup-sdhci.c b/arch/arm/mach-exynos4/setup-sdhci.c index 85f9433d4836..1e83f8cf236d 100644 --- a/arch/arm/mach-exynos4/setup-sdhci.c +++ b/arch/arm/mach-exynos4/setup-sdhci.c | |||
@@ -35,7 +35,7 @@ void exynos4_setup_sdhci_cfg_card(struct platform_device *dev, void __iomem *r, | |||
35 | { | 35 | { |
36 | u32 ctrl2, ctrl3; | 36 | u32 ctrl2, ctrl3; |
37 | 37 | ||
38 | /* don't need to alter anything acording to card-type */ | 38 | /* don't need to alter anything according to card-type */ |
39 | 39 | ||
40 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); | 40 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); |
41 | 41 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 5eec099e0c72..56b930a13443 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -255,6 +255,7 @@ config MACH_IMX27_VISSTRIM_M10 | |||
255 | bool "Vista Silicon i.MX27 Visstrim_m10" | 255 | bool "Vista Silicon i.MX27 Visstrim_m10" |
256 | select SOC_IMX27 | 256 | select SOC_IMX27 |
257 | select IMX_HAVE_PLATFORM_IMX_I2C | 257 | select IMX_HAVE_PLATFORM_IMX_I2C |
258 | select IMX_HAVE_PLATFORM_IMX_SSI | ||
258 | select IMX_HAVE_PLATFORM_IMX_UART | 259 | select IMX_HAVE_PLATFORM_IMX_UART |
259 | select IMX_HAVE_PLATFORM_MXC_MMC | 260 | select IMX_HAVE_PLATFORM_MXC_MMC |
260 | select IMX_HAVE_PLATFORM_MXC_EHCI | 261 | select IMX_HAVE_PLATFORM_MXC_EHCI |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index cb705c28de02..6269053505f7 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <mach/mx25.h> | 34 | #include <mach/mx25.h> |
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/audmux.h> | 36 | #include <mach/audmux.h> |
37 | #include <mach/esdhc.h> | ||
37 | 38 | ||
38 | #include "devices-imx25.h" | 39 | #include "devices-imx25.h" |
39 | 40 | ||
@@ -242,6 +243,11 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
242 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 243 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
243 | }; | 244 | }; |
244 | 245 | ||
246 | static struct esdhc_platform_data sd1_pdata = { | ||
247 | .cd_gpio = GPIO_SD1CD, | ||
248 | .wp_gpio = -EINVAL, | ||
249 | }; | ||
250 | |||
245 | /* | 251 | /* |
246 | * system init for baseboard usage. Will be called by cpuimx25 init. | 252 | * system init for baseboard usage. Will be called by cpuimx25 init. |
247 | * | 253 | * |
@@ -275,7 +281,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
275 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 281 | imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
276 | 282 | ||
277 | imx25_add_flexcan1(NULL); | 283 | imx25_add_flexcan1(NULL); |
278 | imx25_add_sdhci_esdhc_imx(0, NULL); | 284 | imx25_add_sdhci_esdhc_imx(0, &sd1_pdata); |
279 | 285 | ||
280 | gpio_request(GPIO_LED1, "LED1"); | 286 | gpio_request(GPIO_LED1, "LED1"); |
281 | gpio_direction_output(GPIO_LED1, 1); | 287 | gpio_direction_output(GPIO_LED1, 1); |
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 773ea0c95b9f..ba3dae352a2d 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -225,7 +225,7 @@ static u32 iop13xx_atue_cfg_address(struct pci_bus *bus, int devfn, int where) | |||
225 | /* This routine checks the status of the last configuration cycle. If an error | 225 | /* This routine checks the status of the last configuration cycle. If an error |
226 | * was detected it returns >0, else it returns a 0. The errors being checked | 226 | * was detected it returns >0, else it returns a 0. The errors being checked |
227 | * are parity, master abort, target abort (master and target). These types of | 227 | * are parity, master abort, target abort (master and target). These types of |
228 | * errors occure during a config cycle where there is no device, like during | 228 | * errors occur during a config cycle where there is no device, like during |
229 | * the discovery stage. | 229 | * the discovery stage. |
230 | */ | 230 | */ |
231 | static int iop13xx_atux_pci_status(int clear) | 231 | static int iop13xx_atux_pci_status(int clear) |
@@ -332,7 +332,7 @@ static struct pci_ops iop13xx_atux_ops = { | |||
332 | /* This routine checks the status of the last configuration cycle. If an error | 332 | /* This routine checks the status of the last configuration cycle. If an error |
333 | * was detected it returns >0, else it returns a 0. The errors being checked | 333 | * was detected it returns >0, else it returns a 0. The errors being checked |
334 | * are parity, master abort, target abort (master and target). These types of | 334 | * are parity, master abort, target abort (master and target). These types of |
335 | * errors occure during a config cycle where there is no device, like during | 335 | * errors occur during a config cycle where there is no device, like during |
336 | * the discovery stage. | 336 | * the discovery stage. |
337 | */ | 337 | */ |
338 | static int iop13xx_atue_pci_status(int clear) | 338 | static int iop13xx_atue_pci_status(int clear) |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 0a95063f6d32..17de0bf53c08 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -58,6 +58,12 @@ static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { | |||
58 | 58 | ||
59 | static struct gpio_led sheevaplug_led_pins[] = { | 59 | static struct gpio_led sheevaplug_led_pins[] = { |
60 | { | 60 | { |
61 | .name = "plug:red:misc", | ||
62 | .default_trigger = "none", | ||
63 | .gpio = 46, | ||
64 | .active_low = 1, | ||
65 | }, | ||
66 | { | ||
61 | .name = "plug:green:health", | 67 | .name = "plug:green:health", |
62 | .default_trigger = "default-on", | 68 | .default_trigger = "default-on", |
63 | .gpio = 49, | 69 | .gpio = 49, |
@@ -80,6 +86,7 @@ static struct platform_device sheevaplug_leds = { | |||
80 | 86 | ||
81 | static unsigned int sheevaplug_mpp_config[] __initdata = { | 87 | static unsigned int sheevaplug_mpp_config[] __initdata = { |
82 | MPP29_GPIO, /* USB Power Enable */ | 88 | MPP29_GPIO, /* USB Power Enable */ |
89 | MPP46_GPIO, /* LED Red */ | ||
83 | MPP49_GPIO, /* LED */ | 90 | MPP49_GPIO, /* LED */ |
84 | 0 | 91 | 0 |
85 | }; | 92 | }; |
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c index f781164e623f..24294b2bc469 100644 --- a/arch/arm/mach-kirkwood/tsx1x-common.c +++ b/arch/arm/mach-kirkwood/tsx1x-common.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /**************************************************************************** | 16 | /**************************************************************************** |
17 | * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the | 17 | * 16 MiB NOR flash. The struct mtd_partition is not in the same order as the |
18 | * partitions on the device because we want to keep compatability with | 18 | * partitions on the device because we want to keep compatibility with |
19 | * the QNAP firmware. | 19 | * the QNAP firmware. |
20 | * Layout as used by QNAP: | 20 | * Layout as used by QNAP: |
21 | * 0x00000000-0x00080000 : "U-Boot" | 21 | * 0x00000000-0x00080000 : "U-Boot" |
diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c index e76d41bb7056..b9c80597b7bf 100644 --- a/arch/arm/mach-lpc32xx/pm.c +++ b/arch/arm/mach-lpc32xx/pm.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * DRAM clocking and refresh are slightly different for systems with DDR | 41 | * DRAM clocking and refresh are slightly different for systems with DDR |
42 | * DRAM or regular SDRAM devices. If SDRAM is used in the system, the | 42 | * DRAM or regular SDRAM devices. If SDRAM is used in the system, the |
43 | * SDRAM will still be accessible in direct-run mode. In DDR based systems, | 43 | * SDRAM will still be accessible in direct-run mode. In DDR based systems, |
44 | * a transistion to direct-run mode will stop all DDR accesses (no clocks). | 44 | * a transition to direct-run mode will stop all DDR accesses (no clocks). |
45 | * Because of this, the code to switch power modes and the code to enter | 45 | * Because of this, the code to switch power modes and the code to enter |
46 | * and exit DRAM self-refresh modes must not be executed in DRAM. A small | 46 | * and exit DRAM self-refresh modes must not be executed in DRAM. A small |
47 | * section of IRAM is used instead for this. | 47 | * section of IRAM is used instead for this. |
diff --git a/arch/arm/mach-mmp/include/mach/gpio.h b/arch/arm/mach-mmp/include/mach/gpio.h index ee8b02ed8011..7bfb827f3fe3 100644 --- a/arch/arm/mach-mmp/include/mach/gpio.h +++ b/arch/arm/mach-mmp/include/mach/gpio.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | 10 | #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) |
11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) | 11 | #define GPIO_REG(x) (*((volatile u32 *)(GPIO_REGS_VIRT + (x)))) |
12 | 12 | ||
13 | #define NR_BUILTIN_GPIO (192) | 13 | #define NR_BUILTIN_GPIO IRQ_GPIO_NUM |
14 | 14 | ||
15 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 15 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) | 16 | #define gpio_to_irq(gpio) (IRQ_GPIO_START + (gpio)) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h index 4621067c7720..713be155a44d 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa168.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa168.h | |||
@@ -8,6 +8,15 @@ | |||
8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) | 8 | #define MFP_DRIVE_MEDIUM (0x2 << 13) |
9 | #define MFP_DRIVE_FAST (0x3 << 13) | 9 | #define MFP_DRIVE_FAST (0x3 << 13) |
10 | 10 | ||
11 | #undef MFP_CFG | ||
12 | #undef MFP_CFG_DRV | ||
13 | |||
14 | #define MFP_CFG(pin, af) \ | ||
15 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM) | ||
16 | |||
17 | #define MFP_CFG_DRV(pin, af, drv) \ | ||
18 | (MFP_LPM_INPUT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv) | ||
19 | |||
11 | /* GPIO */ | 20 | /* GPIO */ |
12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) | 21 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF5) |
13 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) | 22 | #define GPIO1_GPIO MFP_CFG(GPIO1, AF5) |
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index aeb9ae23e6ce..99833b9485cf 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * 2008-04-11: Jason Chagas <Jason.chagas@marvell.com> | 9 | * 2008-04-11: Jason Chagas <Jason.chagas@marvell.com> |
10 | * 2008-10-08: Bin Yang <bin.yang@marvell.com> | 10 | * 2008-10-08: Bin Yang <bin.yang@marvell.com> |
11 | * | 11 | * |
12 | * The timers module actually includes three timers, each timer with upto | 12 | * The timers module actually includes three timers, each timer with up to |
13 | * three match comparators. Timer #0 is used here in free-running mode as | 13 | * three match comparators. Timer #0 is used here in free-running mode as |
14 | * the clock source, and match comparator #1 used as clock event device. | 14 | * the clock source, and match comparator #1 used as clock event device. |
15 | * | 15 | * |
diff --git a/arch/arm/mach-msm/acpuclock-arm11.c b/arch/arm/mach-msm/acpuclock-arm11.c index 7ffbd987eb5d..805d4ee53f7e 100644 --- a/arch/arm/mach-msm/acpuclock-arm11.c +++ b/arch/arm/mach-msm/acpuclock-arm11.c | |||
@@ -343,7 +343,7 @@ int acpuclk_set_rate(unsigned long rate, int for_power_collapse) | |||
343 | } | 343 | } |
344 | } | 344 | } |
345 | 345 | ||
346 | /* Set wait states for CPU inbetween frequency changes */ | 346 | /* Set wait states for CPU between frequency changes */ |
347 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); | 347 | reg_clkctl = readl(A11S_CLK_CNTL_ADDR); |
348 | reg_clkctl |= (100 << 16); /* set WT_ST_CNT */ | 348 | reg_clkctl |= (100 << 16); /* set WT_ST_CNT */ |
349 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); | 349 | writel(reg_clkctl, A11S_CLK_CNTL_ADDR); |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 7f568611547e..6a96911b0ad5 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -160,10 +160,7 @@ static struct msm_mmc_platform_data qsd8x50_sdc1_data = { | |||
160 | 160 | ||
161 | static void __init qsd8x50_init_mmc(void) | 161 | static void __init qsd8x50_init_mmc(void) |
162 | { | 162 | { |
163 | if (machine_is_qsd8x50_ffa() || machine_is_qsd8x50a_ffa()) | 163 | vreg_mmc = vreg_get(NULL, "gp5"); |
164 | vreg_mmc = vreg_get(NULL, "gp6"); | ||
165 | else | ||
166 | vreg_mmc = vreg_get(NULL, "gp5"); | ||
167 | 164 | ||
168 | if (IS_ERR(vreg_mmc)) { | 165 | if (IS_ERR(vreg_mmc)) { |
169 | pr_err("vreg get for vreg_mmc failed (%ld)\n", | 166 | pr_err("vreg get for vreg_mmc failed (%ld)\n", |
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index cfa808dd4897..232f97a04504 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c | |||
@@ -46,7 +46,7 @@ static DEFINE_MUTEX(scm_lock); | |||
46 | * @id: command to be executed | 46 | * @id: command to be executed |
47 | * @buf: buffer returned from scm_get_command_buffer() | 47 | * @buf: buffer returned from scm_get_command_buffer() |
48 | * | 48 | * |
49 | * An SCM command is layed out in memory as follows: | 49 | * An SCM command is laid out in memory as follows: |
50 | * | 50 | * |
51 | * ------------------- <--- struct scm_command | 51 | * ------------------- <--- struct scm_command |
52 | * | command header | | 52 | * | command header | |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 56f920c55b6a..38b95e949d13 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -269,7 +269,7 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt) | |||
269 | 269 | ||
270 | /* Use existing clock_event for cpu 0 */ | 270 | /* Use existing clock_event for cpu 0 */ |
271 | if (!smp_processor_id()) | 271 | if (!smp_processor_id()) |
272 | return; | 272 | return 0; |
273 | 273 | ||
274 | writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL); | 274 | writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL); |
275 | 275 | ||
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c index 80761474c0f8..2e288b38b4ad 100644 --- a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <mach/ipu.h> | 43 | #include <mach/ipu.h> |
44 | #include <mach/mx3fb.h> | 44 | #include <mach/mx3fb.h> |
45 | #include <mach/audmux.h> | 45 | #include <mach/audmux.h> |
46 | #include <mach/esdhc.h> | ||
46 | 47 | ||
47 | #include "devices-imx35.h" | 48 | #include "devices-imx35.h" |
48 | #include "devices.h" | 49 | #include "devices.h" |
@@ -163,11 +164,14 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
163 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | 164 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, |
164 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | 165 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, |
165 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 166 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
167 | /* SD1 CD */ | ||
168 | MX35_PAD_LD18__GPIO3_24, | ||
166 | }; | 169 | }; |
167 | 170 | ||
168 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) | 171 | #define GPIO_LED1 IMX_GPIO_NR(3, 29) |
169 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) | 172 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 25) |
170 | #define GPIO_LCDPWR (4) | 173 | #define GPIO_LCDPWR IMX_GPIO_NR(1, 4) |
174 | #define GPIO_SD1CD IMX_GPIO_NR(3, 24) | ||
171 | 175 | ||
172 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, | 176 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, |
173 | unsigned int power) | 177 | unsigned int power) |
@@ -254,6 +258,11 @@ struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = { | |||
254 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | 258 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, |
255 | }; | 259 | }; |
256 | 260 | ||
261 | static struct esdhc_platform_data sd1_pdata = { | ||
262 | .cd_gpio = GPIO_SD1CD, | ||
263 | .wp_gpio = -EINVAL, | ||
264 | }; | ||
265 | |||
257 | /* | 266 | /* |
258 | * system init for baseboard usage. Will be called by cpuimx35 init. | 267 | * system init for baseboard usage. Will be called by cpuimx35 init. |
259 | * | 268 | * |
@@ -289,7 +298,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
289 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); | 298 | imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); |
290 | 299 | ||
291 | imx35_add_flexcan1(NULL); | 300 | imx35_add_flexcan1(NULL); |
292 | imx35_add_sdhci_esdhc_imx(0, NULL); | 301 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); |
293 | 302 | ||
294 | gpio_request(GPIO_LED1, "LED1"); | 303 | gpio_request(GPIO_LED1, "LED1"); |
295 | gpio_direction_output(GPIO_LED1, 1); | 304 | gpio_direction_output(GPIO_LED1, 1); |
@@ -301,7 +310,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
301 | 310 | ||
302 | gpio_request(GPIO_LCDPWR, "LCDPWR"); | 311 | gpio_request(GPIO_LCDPWR, "LCDPWR"); |
303 | gpio_direction_output(GPIO_LCDPWR, 1); | 312 | gpio_direction_output(GPIO_LCDPWR, 1); |
304 | gpio_free(GPIO_LCDPWR); | ||
305 | 313 | ||
306 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 314 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
307 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 315 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index b3ecfb22d241..036ba1a4704b 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <mach/mx3fb.h> | 40 | #include <mach/mx3fb.h> |
41 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
42 | #include <mach/audmux.h> | 42 | #include <mach/audmux.h> |
43 | #include <mach/esdhc.h> | ||
43 | 44 | ||
44 | #include "devices-imx35.h" | 45 | #include "devices-imx35.h" |
45 | #include "devices.h" | 46 | #include "devices.h" |
@@ -217,11 +218,15 @@ static iomux_v3_cfg_t pcm043_pads[] = { | |||
217 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, | 218 | MX35_PAD_SD1_DATA1__ESDHC1_DAT1, |
218 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, | 219 | MX35_PAD_SD1_DATA2__ESDHC1_DAT2, |
219 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, | 220 | MX35_PAD_SD1_DATA3__ESDHC1_DAT3, |
221 | MX35_PAD_ATA_DATA10__GPIO2_23, /* WriteProtect */ | ||
222 | MX35_PAD_ATA_DATA11__GPIO2_24, /* CardDetect */ | ||
220 | }; | 223 | }; |
221 | 224 | ||
222 | #define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31) | 225 | #define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31) |
223 | #define AC97_GPIO_TXD IMX_GPIO_NR(2, 28) | 226 | #define AC97_GPIO_TXD IMX_GPIO_NR(2, 28) |
224 | #define AC97_GPIO_RESET IMX_GPIO_NR(2, 0) | 227 | #define AC97_GPIO_RESET IMX_GPIO_NR(2, 0) |
228 | #define SD1_GPIO_WP IMX_GPIO_NR(2, 23) | ||
229 | #define SD1_GPIO_CD IMX_GPIO_NR(2, 24) | ||
225 | 230 | ||
226 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | 231 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) |
227 | { | 232 | { |
@@ -346,6 +351,11 @@ static int __init pcm043_otg_mode(char *options) | |||
346 | } | 351 | } |
347 | __setup("otg_mode=", pcm043_otg_mode); | 352 | __setup("otg_mode=", pcm043_otg_mode); |
348 | 353 | ||
354 | static struct esdhc_platform_data sd1_pdata = { | ||
355 | .wp_gpio = SD1_GPIO_WP, | ||
356 | .cd_gpio = SD1_GPIO_CD, | ||
357 | }; | ||
358 | |||
349 | /* | 359 | /* |
350 | * Board specific initialization. | 360 | * Board specific initialization. |
351 | */ | 361 | */ |
@@ -395,7 +405,7 @@ static void __init pcm043_init(void) | |||
395 | imx35_add_fsl_usb2_udc(&otg_device_pdata); | 405 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
396 | 406 | ||
397 | imx35_add_flexcan1(NULL); | 407 | imx35_add_flexcan1(NULL); |
398 | imx35_add_sdhci_esdhc_imx(0, NULL); | 408 | imx35_add_sdhci_esdhc_imx(0, &sd1_pdata); |
399 | } | 409 | } |
400 | 410 | ||
401 | static void __init pcm043_timer_init(void) | 411 | static void __init pcm043_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-vpr200.c b/arch/arm/mach-mx3/mach-vpr200.c index 2cf390fbd980..47a69cbc31a8 100644 --- a/arch/arm/mach-mx3/mach-vpr200.c +++ b/arch/arm/mach-mx3/mach-vpr200.c | |||
@@ -257,11 +257,16 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
257 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, | 257 | .workaround = FLS_USB2_WORKAROUND_ENGCM09152, |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static int vpr200_usbh_init(struct platform_device *pdev) | ||
261 | { | ||
262 | return mx35_initialize_usb_hw(pdev->id, | ||
263 | MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY); | ||
264 | } | ||
265 | |||
260 | /* USB HOST config */ | 266 | /* USB HOST config */ |
261 | static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { | 267 | static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { |
262 | .portsc = MXC_EHCI_MODE_SERIAL, | 268 | .init = vpr200_usbh_init, |
263 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | | 269 | .portsc = MXC_EHCI_MODE_SERIAL, |
264 | MXC_EHCI_INTERNAL_PHY, | ||
265 | }; | 270 | }; |
266 | 271 | ||
267 | static struct platform_device *devices[] __initdata = { | 272 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 83ee08847d4d..159340da9191 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -165,6 +165,7 @@ config MACH_MX53_LOCO | |||
165 | select IMX_HAVE_PLATFORM_IMX_I2C | 165 | select IMX_HAVE_PLATFORM_IMX_I2C |
166 | select IMX_HAVE_PLATFORM_IMX_UART | 166 | select IMX_HAVE_PLATFORM_IMX_UART |
167 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 167 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
168 | select IMX_HAVE_PLATFORM_GPIO_KEYS | ||
168 | help | 169 | help |
169 | Include support for MX53 LOCO platform. This includes specific | 170 | Include support for MX53 LOCO platform. This includes specific |
170 | configurations for the board and its peripherals. | 171 | configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 4f63048be3ca..0b9338cec516 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o | 6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o |
7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o | 7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o |
8 | 8 | ||
9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o | 9 | obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index b2ecd194e76d..bea4e4135f9d 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -228,13 +228,12 @@ static inline void babbage_fec_reset(void) | |||
228 | int ret; | 228 | int ret; |
229 | 229 | ||
230 | /* reset FEC PHY */ | 230 | /* reset FEC PHY */ |
231 | ret = gpio_request(BABBAGE_FEC_PHY_RESET, "fec-phy-reset"); | 231 | ret = gpio_request_one(BABBAGE_FEC_PHY_RESET, |
232 | GPIOF_OUT_INIT_LOW, "fec-phy-reset"); | ||
232 | if (ret) { | 233 | if (ret) { |
233 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | 234 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); |
234 | return; | 235 | return; |
235 | } | 236 | } |
236 | gpio_direction_output(BABBAGE_FEC_PHY_RESET, 0); | ||
237 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 0); | ||
238 | msleep(1); | 237 | msleep(1); |
239 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); | 238 | gpio_set_value(BABBAGE_FEC_PHY_RESET, 1); |
240 | } | 239 | } |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index 7b5735c5ea59..2af3f43f74db 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <mach/imx-uart.h> | 34 | #include <mach/imx-uart.h> |
35 | #include <mach/iomux-mx53.h> | 35 | #include <mach/iomux-mx53.h> |
36 | 36 | ||
37 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 37 | #define MX53_EVK_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
38 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) | 38 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) |
39 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) | 39 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) |
40 | 40 | ||
@@ -82,15 +82,14 @@ static inline void mx53_evk_fec_reset(void) | |||
82 | int ret; | 82 | int ret; |
83 | 83 | ||
84 | /* reset FEC PHY */ | 84 | /* reset FEC PHY */ |
85 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | 85 | ret = gpio_request_one(MX53_EVK_FEC_PHY_RST, GPIOF_OUT_INIT_LOW, |
86 | "fec-phy-reset"); | ||
86 | if (ret) { | 87 | if (ret) { |
87 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | 88 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); |
88 | return; | 89 | return; |
89 | } | 90 | } |
90 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
91 | gpio_set_value(SMD_FEC_PHY_RST, 0); | ||
92 | msleep(1); | 91 | msleep(1); |
93 | gpio_set_value(SMD_FEC_PHY_RST, 1); | 92 | gpio_set_value(MX53_EVK_FEC_PHY_RST, 1); |
94 | } | 93 | } |
95 | 94 | ||
96 | static struct fec_platform_data mx53_evk_fec_pdata = { | 95 | static struct fec_platform_data mx53_evk_fec_pdata = { |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c index 0a18f8d23eb0..6206b1191fe8 100644 --- a/arch/arm/mach-mx5/board-mx53_loco.c +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -36,6 +36,9 @@ | |||
36 | #include "crm_regs.h" | 36 | #include "crm_regs.h" |
37 | #include "devices-imx53.h" | 37 | #include "devices-imx53.h" |
38 | 38 | ||
39 | #define MX53_LOCO_POWER IMX_GPIO_NR(1, 8) | ||
40 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) | ||
41 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) | ||
39 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | 42 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
40 | 43 | ||
41 | static iomux_v3_cfg_t mx53_loco_pads[] = { | 44 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
@@ -180,6 +183,27 @@ static iomux_v3_cfg_t mx53_loco_pads[] = { | |||
180 | MX53_PAD_GPIO_8__GPIO1_8, | 183 | MX53_PAD_GPIO_8__GPIO1_8, |
181 | }; | 184 | }; |
182 | 185 | ||
186 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ | ||
187 | { \ | ||
188 | .gpio = gpio_num, \ | ||
189 | .type = EV_KEY, \ | ||
190 | .code = ev_code, \ | ||
191 | .active_low = act_low, \ | ||
192 | .desc = "btn " descr, \ | ||
193 | .wakeup = wake, \ | ||
194 | } | ||
195 | |||
196 | static struct gpio_keys_button loco_buttons[] = { | ||
197 | GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0), | ||
198 | GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0), | ||
199 | GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), | ||
200 | }; | ||
201 | |||
202 | static const struct gpio_keys_platform_data loco_button_data __initconst = { | ||
203 | .buttons = loco_buttons, | ||
204 | .nbuttons = ARRAY_SIZE(loco_buttons), | ||
205 | }; | ||
206 | |||
183 | static inline void mx53_loco_fec_reset(void) | 207 | static inline void mx53_loco_fec_reset(void) |
184 | { | 208 | { |
185 | int ret; | 209 | int ret; |
@@ -215,6 +239,7 @@ static void __init mx53_loco_board_init(void) | |||
215 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); | 239 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); |
216 | imx53_add_sdhci_esdhc_imx(0, NULL); | 240 | imx53_add_sdhci_esdhc_imx(0, NULL); |
217 | imx53_add_sdhci_esdhc_imx(2, NULL); | 241 | imx53_add_sdhci_esdhc_imx(2, NULL); |
242 | imx_add_gpio_keys(&loco_button_data); | ||
218 | } | 243 | } |
219 | 244 | ||
220 | static void __init mx53_loco_timer_init(void) | 245 | static void __init mx53_loco_timer_init(void) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 652ace413825..fdbc05ed5513 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -865,6 +865,13 @@ static struct clk aips_tz2_clk = { | |||
865 | .disable = _clk_ccgr_disable_inwait, | 865 | .disable = _clk_ccgr_disable_inwait, |
866 | }; | 866 | }; |
867 | 867 | ||
868 | static struct clk gpc_dvfs_clk = { | ||
869 | .enable_reg = MXC_CCM_CCGR5, | ||
870 | .enable_shift = MXC_CCM_CCGRx_CG12_OFFSET, | ||
871 | .enable = _clk_ccgr_enable, | ||
872 | .disable = _clk_ccgr_disable, | ||
873 | }; | ||
874 | |||
868 | static struct clk gpt_32k_clk = { | 875 | static struct clk gpt_32k_clk = { |
869 | .id = 0, | 876 | .id = 0, |
870 | .parent = &ckil_clk, | 877 | .parent = &ckil_clk, |
@@ -1448,6 +1455,7 @@ static struct clk_lookup mx51_lookups[] = { | |||
1448 | _REGISTER_CLOCK("imx-ipuv3", NULL, ipu_clk) | 1455 | _REGISTER_CLOCK("imx-ipuv3", NULL, ipu_clk) |
1449 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) | 1456 | _REGISTER_CLOCK("imx-ipuv3", "di0", ipu_di0_clk) |
1450 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) | 1457 | _REGISTER_CLOCK("imx-ipuv3", "di1", ipu_di1_clk) |
1458 | _REGISTER_CLOCK(NULL, "gpc_dvfs", gpc_dvfs_clk) | ||
1451 | }; | 1459 | }; |
1452 | 1460 | ||
1453 | static struct clk_lookup mx53_lookups[] = { | 1461 | static struct clk_lookup mx53_lookups[] = { |
@@ -1511,6 +1519,7 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | |||
1511 | clk_enable(&iim_clk); | 1519 | clk_enable(&iim_clk); |
1512 | mx51_revision(); | 1520 | mx51_revision(); |
1513 | clk_disable(&iim_clk); | 1521 | clk_disable(&iim_clk); |
1522 | mx51_display_revision(); | ||
1514 | 1523 | ||
1515 | /* move usb_phy_clk to 24MHz */ | 1524 | /* move usb_phy_clk to 24MHz */ |
1516 | clk_set_parent(&usb_phy1_clk, &osc_clk); | 1525 | clk_set_parent(&usb_phy1_clk, &osc_clk); |
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index df46b5e60857..472bdfab2e55 100644 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c | |||
@@ -21,6 +21,7 @@ | |||
21 | static int cpu_silicon_rev = -1; | 21 | static int cpu_silicon_rev = -1; |
22 | 22 | ||
23 | #define IIM_SREV 0x24 | 23 | #define IIM_SREV 0x24 |
24 | #define MX50_HW_ADADIG_DIGPROG 0xB0 | ||
24 | 25 | ||
25 | static int get_mx51_srev(void) | 26 | static int get_mx51_srev(void) |
26 | { | 27 | { |
@@ -51,6 +52,26 @@ int mx51_revision(void) | |||
51 | } | 52 | } |
52 | EXPORT_SYMBOL(mx51_revision); | 53 | EXPORT_SYMBOL(mx51_revision); |
53 | 54 | ||
55 | void mx51_display_revision(void) | ||
56 | { | ||
57 | int rev; | ||
58 | char *srev; | ||
59 | rev = mx51_revision(); | ||
60 | |||
61 | switch (rev) { | ||
62 | case IMX_CHIP_REVISION_2_0: | ||
63 | srev = IMX_CHIP_REVISION_2_0_STRING; | ||
64 | break; | ||
65 | case IMX_CHIP_REVISION_3_0: | ||
66 | srev = IMX_CHIP_REVISION_3_0_STRING; | ||
67 | break; | ||
68 | default: | ||
69 | srev = IMX_CHIP_REVISION_UNKNOWN_STRING; | ||
70 | } | ||
71 | printk(KERN_INFO "CPU identified as i.MX51, silicon rev %s\n", srev); | ||
72 | } | ||
73 | EXPORT_SYMBOL(mx51_display_revision); | ||
74 | |||
54 | #ifdef CONFIG_NEON | 75 | #ifdef CONFIG_NEON |
55 | 76 | ||
56 | /* | 77 | /* |
@@ -107,6 +128,44 @@ int mx53_revision(void) | |||
107 | } | 128 | } |
108 | EXPORT_SYMBOL(mx53_revision); | 129 | EXPORT_SYMBOL(mx53_revision); |
109 | 130 | ||
131 | static int get_mx50_srev(void) | ||
132 | { | ||
133 | void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K); | ||
134 | u32 rev; | ||
135 | |||
136 | if (!anatop) { | ||
137 | cpu_silicon_rev = -EINVAL; | ||
138 | return 0; | ||
139 | } | ||
140 | |||
141 | rev = readl(anatop + MX50_HW_ADADIG_DIGPROG); | ||
142 | rev &= 0xff; | ||
143 | |||
144 | iounmap(anatop); | ||
145 | if (rev == 0x0) | ||
146 | return IMX_CHIP_REVISION_1_0; | ||
147 | else if (rev == 0x1) | ||
148 | return IMX_CHIP_REVISION_1_1; | ||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | /* | ||
153 | * Returns: | ||
154 | * the silicon revision of the cpu | ||
155 | * -EINVAL - not a mx50 | ||
156 | */ | ||
157 | int mx50_revision(void) | ||
158 | { | ||
159 | if (!cpu_is_mx50()) | ||
160 | return -EINVAL; | ||
161 | |||
162 | if (cpu_silicon_rev == -1) | ||
163 | cpu_silicon_rev = get_mx50_srev(); | ||
164 | |||
165 | return cpu_silicon_rev; | ||
166 | } | ||
167 | EXPORT_SYMBOL(mx50_revision); | ||
168 | |||
110 | static int __init post_cpu_init(void) | 169 | static int __init post_cpu_init(void) |
111 | { | 170 | { |
112 | unsigned int reg; | 171 | unsigned int reg; |
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index c372a4373691..e6c1119c20ae 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |||
@@ -67,6 +67,10 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
67 | MX51_PAD_SD1_DATA1__SD1_DATA1, | 67 | MX51_PAD_SD1_DATA1__SD1_DATA1, |
68 | MX51_PAD_SD1_DATA2__SD1_DATA2, | 68 | MX51_PAD_SD1_DATA2__SD1_DATA2, |
69 | MX51_PAD_SD1_DATA3__SD1_DATA3, | 69 | MX51_PAD_SD1_DATA3__SD1_DATA3, |
70 | /* SD1 CD */ | ||
71 | _MX51_PAD_GPIO1_0__SD1_CD | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | ||
72 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
73 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
70 | }; | 74 | }; |
71 | 75 | ||
72 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) | 76 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index 868af8f435fa..d0c7075937cf 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/time.h> | 44 | #include <asm/mach/time.h> |
45 | #include <asm/mach-types.h> | ||
46 | 45 | ||
47 | #include "devices-imx51.h" | 46 | #include "devices-imx51.h" |
48 | #include "devices.h" | 47 | #include "devices.h" |
diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c new file mode 100644 index 000000000000..76ae8dc33e00 --- /dev/null +++ b/arch/arm/mach-mx5/system.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <mach/hardware.h> | ||
16 | #include "crm_regs.h" | ||
17 | |||
18 | /* set cpu low power mode before WFI instruction. This function is called | ||
19 | * mx5 because it can be used for mx50, mx51, and mx53.*/ | ||
20 | void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) | ||
21 | { | ||
22 | u32 plat_lpc, arm_srpgcr, ccm_clpcr; | ||
23 | u32 empgc0, empgc1; | ||
24 | int stop_mode = 0; | ||
25 | |||
26 | /* always allow platform to issue a deep sleep mode request */ | ||
27 | plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & | ||
28 | ~(MXC_CORTEXA8_PLAT_LPC_DSM); | ||
29 | ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK); | ||
30 | arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
31 | empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
32 | empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR); | ||
33 | |||
34 | switch (mode) { | ||
35 | case WAIT_CLOCKED: | ||
36 | break; | ||
37 | case WAIT_UNCLOCKED: | ||
38 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
39 | break; | ||
40 | case WAIT_UNCLOCKED_POWER_OFF: | ||
41 | case STOP_POWER_OFF: | ||
42 | plat_lpc |= MXC_CORTEXA8_PLAT_LPC_DSM | ||
43 | | MXC_CORTEXA8_PLAT_LPC_DBG_DSM; | ||
44 | if (mode == WAIT_UNCLOCKED_POWER_OFF) { | ||
45 | ccm_clpcr |= 0x1 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
46 | ccm_clpcr &= ~MXC_CCM_CLPCR_VSTBY; | ||
47 | ccm_clpcr &= ~MXC_CCM_CLPCR_SBYOS; | ||
48 | stop_mode = 0; | ||
49 | } else { | ||
50 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
51 | ccm_clpcr |= 0x3 << MXC_CCM_CLPCR_STBY_COUNT_OFFSET; | ||
52 | ccm_clpcr |= MXC_CCM_CLPCR_VSTBY; | ||
53 | ccm_clpcr |= MXC_CCM_CLPCR_SBYOS; | ||
54 | stop_mode = 1; | ||
55 | } | ||
56 | arm_srpgcr |= MXC_SRPGCR_PCR; | ||
57 | |||
58 | if (tzic_enable_wake(1) != 0) | ||
59 | return; | ||
60 | break; | ||
61 | case STOP_POWER_ON: | ||
62 | ccm_clpcr |= 0x2 << MXC_CCM_CLPCR_LPM_OFFSET; | ||
63 | break; | ||
64 | default: | ||
65 | printk(KERN_WARNING "UNKNOWN cpu power mode: %d\n", mode); | ||
66 | return; | ||
67 | } | ||
68 | |||
69 | __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); | ||
70 | __raw_writel(ccm_clpcr, MXC_CCM_CLPCR); | ||
71 | __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); | ||
72 | |||
73 | /* Enable NEON SRPG for all but MX50TO1.0. */ | ||
74 | if (mx50_revision() != IMX_CHIP_REVISION_1_0) | ||
75 | __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR); | ||
76 | |||
77 | if (stop_mode) { | ||
78 | empgc0 |= MXC_SRPGCR_PCR; | ||
79 | empgc1 |= MXC_SRPGCR_PCR; | ||
80 | |||
81 | __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR); | ||
82 | __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR); | ||
83 | } | ||
84 | } | ||
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index 4f6f174af6c8..4522fbb235d5 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -22,6 +22,7 @@ config MACH_MX23EVK | |||
22 | select SOC_IMX23 | 22 | select SOC_IMX23 |
23 | select MXS_HAVE_AMBA_DUART | 23 | select MXS_HAVE_AMBA_DUART |
24 | select MXS_HAVE_PLATFORM_AUART | 24 | select MXS_HAVE_PLATFORM_AUART |
25 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
25 | select MXS_HAVE_PLATFORM_MXSFB | 26 | select MXS_HAVE_PLATFORM_MXSFB |
26 | default y | 27 | default y |
27 | help | 28 | help |
@@ -35,6 +36,7 @@ config MACH_MX28EVK | |||
35 | select MXS_HAVE_PLATFORM_AUART | 36 | select MXS_HAVE_PLATFORM_AUART |
36 | select MXS_HAVE_PLATFORM_FEC | 37 | select MXS_HAVE_PLATFORM_FEC |
37 | select MXS_HAVE_PLATFORM_FLEXCAN | 38 | select MXS_HAVE_PLATFORM_FLEXCAN |
39 | select MXS_HAVE_PLATFORM_MXS_MMC | ||
38 | select MXS_HAVE_PLATFORM_MXSFB | 40 | select MXS_HAVE_PLATFORM_MXSFB |
39 | select MXS_OCOTP | 41 | select MXS_OCOTP |
40 | default y | 42 | default y |
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index d133c7f30940..c3577ea789ac 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c | |||
@@ -521,6 +521,15 @@ static int clk_misc_init(void) | |||
521 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, | 521 | __raw_writel(BM_CLKCTRL_CPU_INTERRUPT_WAIT, |
522 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); | 522 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU_SET); |
523 | 523 | ||
524 | /* | ||
525 | * 480 MHz seems too high to be ssp clock source directly, | ||
526 | * so set frac to get a 288 MHz ref_io. | ||
527 | */ | ||
528 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC); | ||
529 | reg &= ~BM_CLKCTRL_FRAC_IOFRAC; | ||
530 | reg |= 30 << BP_CLKCTRL_FRAC_IOFRAC; | ||
531 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC); | ||
532 | |||
524 | return 0; | 533 | return 0; |
525 | } | 534 | } |
526 | 535 | ||
@@ -528,6 +537,12 @@ int __init mx23_clocks_init(void) | |||
528 | { | 537 | { |
529 | clk_misc_init(); | 538 | clk_misc_init(); |
530 | 539 | ||
540 | /* | ||
541 | * source ssp clock from ref_io than ref_xtal, | ||
542 | * as ref_xtal only provides 24 MHz as maximum. | ||
543 | */ | ||
544 | clk_set_parent(&ssp_clk, &ref_io_clk); | ||
545 | |||
531 | clk_enable(&cpu_clk); | 546 | clk_enable(&cpu_clk); |
532 | clk_enable(&hbus_clk); | 547 | clk_enable(&hbus_clk); |
533 | clk_enable(&xbus_clk); | 548 | clk_enable(&xbus_clk); |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 5e489a2b2023..5dcc59d5b9ec 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -295,11 +295,11 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
295 | unsigned long diff, parent_rate, calc_rate; \ | 295 | unsigned long diff, parent_rate, calc_rate; \ |
296 | int i; \ | 296 | int i; \ |
297 | \ | 297 | \ |
298 | parent_rate = clk_get_rate(clk->parent); \ | ||
299 | div_max = BM_CLKCTRL_##dr##_DIV >> BP_CLKCTRL_##dr##_DIV; \ | 298 | div_max = BM_CLKCTRL_##dr##_DIV >> BP_CLKCTRL_##dr##_DIV; \ |
300 | bm_busy = BM_CLKCTRL_##dr##_BUSY; \ | 299 | bm_busy = BM_CLKCTRL_##dr##_BUSY; \ |
301 | \ | 300 | \ |
302 | if (clk->parent == &ref_xtal_clk) { \ | 301 | if (clk->parent == &ref_xtal_clk) { \ |
302 | parent_rate = clk_get_rate(clk->parent); \ | ||
303 | div = DIV_ROUND_UP(parent_rate, rate); \ | 303 | div = DIV_ROUND_UP(parent_rate, rate); \ |
304 | if (clk == &cpu_clk) { \ | 304 | if (clk == &cpu_clk) { \ |
305 | div_max = BM_CLKCTRL_CPU_DIV_XTAL >> \ | 305 | div_max = BM_CLKCTRL_CPU_DIV_XTAL >> \ |
@@ -309,6 +309,11 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
309 | if (div == 0 || div > div_max) \ | 309 | if (div == 0 || div > div_max) \ |
310 | return -EINVAL; \ | 310 | return -EINVAL; \ |
311 | } else { \ | 311 | } else { \ |
312 | /* \ | ||
313 | * hack alert: this block modifies clk->parent, too, \ | ||
314 | * so the base to use it the grand parent. \ | ||
315 | */ \ | ||
316 | parent_rate = clk_get_rate(clk->parent->parent); \ | ||
312 | rate >>= PARENT_RATE_SHIFT; \ | 317 | rate >>= PARENT_RATE_SHIFT; \ |
313 | parent_rate >>= PARENT_RATE_SHIFT; \ | 318 | parent_rate >>= PARENT_RATE_SHIFT; \ |
314 | diff = parent_rate; \ | 319 | diff = parent_rate; \ |
@@ -618,6 +623,8 @@ static struct clk_lookup lookups[] = { | |||
618 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) | 623 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) |
619 | _REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk) | 624 | _REGISTER_CLOCK("mxs-dma-apbh", NULL, hbus_clk) |
620 | _REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk) | 625 | _REGISTER_CLOCK("mxs-dma-apbx", NULL, xbus_clk) |
626 | _REGISTER_CLOCK("mxs-mmc.0", NULL, ssp0_clk) | ||
627 | _REGISTER_CLOCK("mxs-mmc.1", NULL, ssp1_clk) | ||
621 | _REGISTER_CLOCK("flexcan.0", NULL, can0_clk) | 628 | _REGISTER_CLOCK("flexcan.0", NULL, can0_clk) |
622 | _REGISTER_CLOCK("flexcan.1", NULL, can1_clk) | 629 | _REGISTER_CLOCK("flexcan.1", NULL, can1_clk) |
623 | _REGISTER_CLOCK(NULL, "usb0", usb0_clk) | 630 | _REGISTER_CLOCK(NULL, "usb0", usb0_clk) |
@@ -737,6 +744,15 @@ static int clk_misc_init(void) | |||
737 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; | 744 | reg |= BM_CLKCTRL_ENET_CLK_OUT_EN; |
738 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); | 745 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_ENET); |
739 | 746 | ||
747 | /* | ||
748 | * 480 MHz seems too high to be ssp clock source directly, | ||
749 | * so set frac0 to get a 288 MHz ref_io0. | ||
750 | */ | ||
751 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC0); | ||
752 | reg &= ~BM_CLKCTRL_FRAC0_IO0FRAC; | ||
753 | reg |= 30 << BP_CLKCTRL_FRAC0_IO0FRAC; | ||
754 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_FRAC0); | ||
755 | |||
740 | return 0; | 756 | return 0; |
741 | } | 757 | } |
742 | 758 | ||
@@ -744,6 +760,13 @@ int __init mx28_clocks_init(void) | |||
744 | { | 760 | { |
745 | clk_misc_init(); | 761 | clk_misc_init(); |
746 | 762 | ||
763 | /* | ||
764 | * source ssp clock from ref_io0 than ref_xtal, | ||
765 | * as ref_xtal only provides 24 MHz as maximum. | ||
766 | */ | ||
767 | clk_set_parent(&ssp0_clk, &ref_io0_clk); | ||
768 | clk_set_parent(&ssp1_clk, &ref_io0_clk); | ||
769 | |||
747 | clk_enable(&cpu_clk); | 770 | clk_enable(&cpu_clk); |
748 | clk_enable(&hbus_clk); | 771 | clk_enable(&hbus_clk); |
749 | clk_enable(&xbus_clk); | 772 | clk_enable(&xbus_clk); |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index c7e14f4e3669..c6f345febd39 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
@@ -21,6 +21,10 @@ extern const struct mxs_auart_data mx23_auart_data[] __initconst; | |||
21 | #define mx23_add_auart0() mx23_add_auart(0) | 21 | #define mx23_add_auart0() mx23_add_auart(0) |
22 | #define mx23_add_auart1() mx23_add_auart(1) | 22 | #define mx23_add_auart1() mx23_add_auart(1) |
23 | 23 | ||
24 | extern const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst; | ||
25 | #define mx23_add_mxs_mmc(id, pdata) \ | ||
26 | mxs_add_mxs_mmc(&mx23_mxs_mmc_data[id], pdata) | ||
27 | |||
24 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) | 28 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) |
25 | 29 | ||
26 | struct platform_device *__init mx23_add_mxsfb( | 30 | struct platform_device *__init mx23_add_mxsfb( |
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9d08555c4cf0..c473eddce8cf 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
@@ -37,6 +37,10 @@ extern const struct mxs_flexcan_data mx28_flexcan_data[] __initconst; | |||
37 | extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst; | 37 | extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst; |
38 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) | 38 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) |
39 | 39 | ||
40 | extern const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst; | ||
41 | #define mx28_add_mxs_mmc(id, pdata) \ | ||
42 | mxs_add_mxs_mmc(&mx28_mxs_mmc_data[id], pdata) | ||
43 | |||
40 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) | 44 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) |
41 | 45 | ||
42 | struct platform_device *__init mx28_add_mxsfb( | 46 | struct platform_device *__init mx28_add_mxsfb( |
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index 1451ad060d82..acf9eea124c0 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig | |||
@@ -15,6 +15,9 @@ config MXS_HAVE_PLATFORM_FLEXCAN | |||
15 | config MXS_HAVE_PLATFORM_MXS_I2C | 15 | config MXS_HAVE_PLATFORM_MXS_I2C |
16 | bool | 16 | bool |
17 | 17 | ||
18 | config MXS_HAVE_PLATFORM_MXS_MMC | ||
19 | bool | ||
20 | |||
18 | config MXS_HAVE_PLATFORM_MXS_PWM | 21 | config MXS_HAVE_PLATFORM_MXS_PWM |
19 | bool | 22 | bool |
20 | 23 | ||
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index 0d9bea30b0a2..324f2824d38d 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
@@ -4,5 +4,6 @@ obj-y += platform-dma.o | |||
4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o |
5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | 5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o |
6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o | 6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o |
7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_MMC) += platform-mxs-mmc.o | ||
7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o | 8 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o |
8 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o | 9 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o |
diff --git a/arch/arm/mach-mxs/devices/platform-mxs-mmc.c b/arch/arm/mach-mxs/devices/platform-mxs-mmc.c new file mode 100644 index 000000000000..382dacbeca21 --- /dev/null +++ b/arch/arm/mach-mxs/devices/platform-mxs-mmc.c | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it under | ||
8 | * the terms of the GNU General Public License version 2 as published by the | ||
9 | * Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/compiler.h> | ||
13 | #include <linux/err.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <mach/mx23.h> | ||
17 | #include <mach/mx28.h> | ||
18 | #include <mach/devices-common.h> | ||
19 | |||
20 | #define mxs_mxs_mmc_data_entry_single(soc, _id, hwid) \ | ||
21 | { \ | ||
22 | .id = _id, \ | ||
23 | .iobase = soc ## _SSP ## hwid ## _BASE_ADDR, \ | ||
24 | .dma = soc ## _DMA_SSP ## hwid, \ | ||
25 | .irq_err = soc ## _INT_SSP ## hwid ## _ERROR, \ | ||
26 | .irq_dma = soc ## _INT_SSP ## hwid ## _DMA, \ | ||
27 | } | ||
28 | |||
29 | #define mxs_mxs_mmc_data_entry(soc, _id, hwid) \ | ||
30 | [_id] = mxs_mxs_mmc_data_entry_single(soc, _id, hwid) | ||
31 | |||
32 | |||
33 | #ifdef CONFIG_SOC_IMX23 | ||
34 | const struct mxs_mxs_mmc_data mx23_mxs_mmc_data[] __initconst = { | ||
35 | mxs_mxs_mmc_data_entry(MX23, 0, 1), | ||
36 | mxs_mxs_mmc_data_entry(MX23, 1, 2), | ||
37 | }; | ||
38 | #endif | ||
39 | |||
40 | #ifdef CONFIG_SOC_IMX28 | ||
41 | const struct mxs_mxs_mmc_data mx28_mxs_mmc_data[] __initconst = { | ||
42 | mxs_mxs_mmc_data_entry(MX28, 0, 0), | ||
43 | mxs_mxs_mmc_data_entry(MX28, 1, 1), | ||
44 | }; | ||
45 | #endif | ||
46 | |||
47 | struct platform_device *__init mxs_add_mxs_mmc( | ||
48 | const struct mxs_mxs_mmc_data *data, | ||
49 | const struct mxs_mmc_platform_data *pdata) | ||
50 | { | ||
51 | struct resource res[] = { | ||
52 | { | ||
53 | .start = data->iobase, | ||
54 | .end = data->iobase + SZ_8K - 1, | ||
55 | .flags = IORESOURCE_MEM, | ||
56 | }, { | ||
57 | .start = data->dma, | ||
58 | .end = data->dma, | ||
59 | .flags = IORESOURCE_DMA, | ||
60 | }, { | ||
61 | .start = data->irq_err, | ||
62 | .end = data->irq_err, | ||
63 | .flags = IORESOURCE_IRQ, | ||
64 | }, { | ||
65 | .start = data->irq_dma, | ||
66 | .end = data->irq_dma, | ||
67 | .flags = IORESOURCE_IRQ, | ||
68 | }, | ||
69 | }; | ||
70 | |||
71 | return mxs_add_platform_device("mxs-mmc", data->id, | ||
72 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | ||
73 | } | ||
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index 71f24484b044..c5137f14c364 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h | |||
@@ -73,6 +73,19 @@ struct mxs_i2c_data { | |||
73 | }; | 73 | }; |
74 | struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data); | 74 | struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data); |
75 | 75 | ||
76 | /* mmc */ | ||
77 | #include <mach/mmc.h> | ||
78 | struct mxs_mxs_mmc_data { | ||
79 | int id; | ||
80 | resource_size_t iobase; | ||
81 | resource_size_t dma; | ||
82 | resource_size_t irq_err; | ||
83 | resource_size_t irq_dma; | ||
84 | }; | ||
85 | struct platform_device *__init mxs_add_mxs_mmc( | ||
86 | const struct mxs_mxs_mmc_data *data, | ||
87 | const struct mxs_mmc_platform_data *pdata); | ||
88 | |||
76 | /* pwm */ | 89 | /* pwm */ |
77 | struct platform_device *__init mxs_add_mxs_pwm( | 90 | struct platform_device *__init mxs_add_mxs_pwm( |
78 | resource_size_t iobase, int id); | 91 | resource_size_t iobase, int id); |
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c index a66994f0518f..214e5b641bbc 100644 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ b/arch/arm/mach-mxs/mach-mx23evk.c | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | #define MX23EVK_LCD_ENABLE MXS_GPIO_NR(1, 18) | 29 | #define MX23EVK_LCD_ENABLE MXS_GPIO_NR(1, 18) |
30 | #define MX23EVK_BL_ENABLE MXS_GPIO_NR(1, 28) | 30 | #define MX23EVK_BL_ENABLE MXS_GPIO_NR(1, 28) |
31 | #define MX23EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(1, 30) | ||
32 | #define MX23EVK_MMC0_SLOT_POWER MXS_GPIO_NR(1, 29) | ||
31 | 33 | ||
32 | static const iomux_cfg_t mx23evk_pads[] __initconst = { | 34 | static const iomux_cfg_t mx23evk_pads[] __initconst = { |
33 | /* duart */ | 35 | /* duart */ |
@@ -73,6 +75,36 @@ static const iomux_cfg_t mx23evk_pads[] __initconst = { | |||
73 | MX23_PAD_LCD_RESET__GPIO_1_18 | MXS_PAD_CTRL, | 75 | MX23_PAD_LCD_RESET__GPIO_1_18 | MXS_PAD_CTRL, |
74 | /* backlight control */ | 76 | /* backlight control */ |
75 | MX23_PAD_PWM2__GPIO_1_28 | MXS_PAD_CTRL, | 77 | MX23_PAD_PWM2__GPIO_1_28 | MXS_PAD_CTRL, |
78 | |||
79 | /* mmc */ | ||
80 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 | | ||
81 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
82 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 | | ||
83 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
84 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 | | ||
85 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
86 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 | | ||
87 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
88 | MX23_PAD_GPMI_D08__SSP1_DATA4 | | ||
89 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
90 | MX23_PAD_GPMI_D09__SSP1_DATA5 | | ||
91 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
92 | MX23_PAD_GPMI_D10__SSP1_DATA6 | | ||
93 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
94 | MX23_PAD_GPMI_D11__SSP1_DATA7 | | ||
95 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
96 | MX23_PAD_SSP1_CMD__SSP1_CMD | | ||
97 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
98 | MX23_PAD_SSP1_DETECT__SSP1_DETECT | | ||
99 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
100 | MX23_PAD_SSP1_SCK__SSP1_SCK | | ||
101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
102 | /* write protect */ | ||
103 | MX23_PAD_PWM4__GPIO_1_30 | | ||
104 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
105 | /* slot power enable */ | ||
106 | MX23_PAD_PWM3__GPIO_1_29 | | ||
107 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
76 | }; | 108 | }; |
77 | 109 | ||
78 | /* mxsfb (lcdif) */ | 110 | /* mxsfb (lcdif) */ |
@@ -101,6 +133,11 @@ static const struct mxsfb_platform_data mx23evk_mxsfb_pdata __initconst = { | |||
101 | .ld_intf_width = STMLCDIF_24BIT, | 133 | .ld_intf_width = STMLCDIF_24BIT, |
102 | }; | 134 | }; |
103 | 135 | ||
136 | static struct mxs_mmc_platform_data mx23evk_mmc_pdata __initdata = { | ||
137 | .wp_gpio = MX23EVK_MMC0_WRITE_PROTECT, | ||
138 | .flags = SLOTF_8_BIT_CAPABLE, | ||
139 | }; | ||
140 | |||
104 | static void __init mx23evk_init(void) | 141 | static void __init mx23evk_init(void) |
105 | { | 142 | { |
106 | int ret; | 143 | int ret; |
@@ -110,6 +147,13 @@ static void __init mx23evk_init(void) | |||
110 | mx23_add_duart(); | 147 | mx23_add_duart(); |
111 | mx23_add_auart0(); | 148 | mx23_add_auart0(); |
112 | 149 | ||
150 | /* power on mmc slot by writing 0 to the gpio */ | ||
151 | ret = gpio_request_one(MX23EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT, | ||
152 | "mmc0-slot-power"); | ||
153 | if (ret) | ||
154 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | ||
155 | mx23_add_mxs_mmc(0, &mx23evk_mmc_pdata); | ||
156 | |||
113 | ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); | 157 | ret = gpio_request_one(MX23EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); |
114 | if (ret) | 158 | if (ret) |
115 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); | 159 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); |
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index 08002d02267a..bb329b9a2608 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
@@ -34,6 +34,11 @@ | |||
34 | #define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30) | 34 | #define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30) |
35 | #define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) | 35 | #define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) |
36 | 36 | ||
37 | #define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12) | ||
38 | #define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28) | ||
39 | #define MX28EVK_MMC0_SLOT_POWER MXS_GPIO_NR(3, 28) | ||
40 | #define MX28EVK_MMC1_SLOT_POWER MXS_GPIO_NR(3, 29) | ||
41 | |||
37 | static const iomux_cfg_t mx28evk_pads[] __initconst = { | 42 | static const iomux_cfg_t mx28evk_pads[] __initconst = { |
38 | /* duart */ | 43 | /* duart */ |
39 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, | 44 | MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL, |
@@ -115,6 +120,65 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = { | |||
115 | MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL, | 120 | MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL, |
116 | /* backlight control */ | 121 | /* backlight control */ |
117 | MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL, | 122 | MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL, |
123 | /* mmc0 */ | ||
124 | MX28_PAD_SSP0_DATA0__SSP0_D0 | | ||
125 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
126 | MX28_PAD_SSP0_DATA1__SSP0_D1 | | ||
127 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
128 | MX28_PAD_SSP0_DATA2__SSP0_D2 | | ||
129 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
130 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | ||
131 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
132 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
133 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
134 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
135 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
136 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
137 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
138 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
139 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
140 | MX28_PAD_SSP0_CMD__SSP0_CMD | | ||
141 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
142 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | ||
143 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
144 | MX28_PAD_SSP0_SCK__SSP0_SCK | | ||
145 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
146 | /* write protect */ | ||
147 | MX28_PAD_SSP1_SCK__GPIO_2_12 | | ||
148 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
149 | /* slot power enable */ | ||
150 | MX28_PAD_PWM3__GPIO_3_28 | | ||
151 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
152 | |||
153 | /* mmc1 */ | ||
154 | MX28_PAD_GPMI_D00__SSP1_D0 | | ||
155 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
156 | MX28_PAD_GPMI_D01__SSP1_D1 | | ||
157 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
158 | MX28_PAD_GPMI_D02__SSP1_D2 | | ||
159 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
160 | MX28_PAD_GPMI_D03__SSP1_D3 | | ||
161 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
162 | MX28_PAD_GPMI_D04__SSP1_D4 | | ||
163 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
164 | MX28_PAD_GPMI_D05__SSP1_D5 | | ||
165 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
166 | MX28_PAD_GPMI_D06__SSP1_D6 | | ||
167 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
168 | MX28_PAD_GPMI_D07__SSP1_D7 | | ||
169 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
170 | MX28_PAD_GPMI_RDY1__SSP1_CMD | | ||
171 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
172 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT | | ||
173 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
174 | MX28_PAD_GPMI_WRN__SSP1_SCK | | ||
175 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
176 | /* write protect */ | ||
177 | MX28_PAD_GPMI_RESETN__GPIO_0_28 | | ||
178 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
179 | /* slot power enable */ | ||
180 | MX28_PAD_PWM4__GPIO_3_29 | | ||
181 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | ||
118 | }; | 182 | }; |
119 | 183 | ||
120 | /* fec */ | 184 | /* fec */ |
@@ -258,6 +322,18 @@ static const struct mxsfb_platform_data mx28evk_mxsfb_pdata __initconst = { | |||
258 | .ld_intf_width = STMLCDIF_24BIT, | 322 | .ld_intf_width = STMLCDIF_24BIT, |
259 | }; | 323 | }; |
260 | 324 | ||
325 | static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = { | ||
326 | { | ||
327 | /* mmc0 */ | ||
328 | .wp_gpio = MX28EVK_MMC0_WRITE_PROTECT, | ||
329 | .flags = SLOTF_8_BIT_CAPABLE, | ||
330 | }, { | ||
331 | /* mmc1 */ | ||
332 | .wp_gpio = MX28EVK_MMC1_WRITE_PROTECT, | ||
333 | .flags = SLOTF_8_BIT_CAPABLE, | ||
334 | }, | ||
335 | }; | ||
336 | |||
261 | static void __init mx28evk_init(void) | 337 | static void __init mx28evk_init(void) |
262 | { | 338 | { |
263 | int ret; | 339 | int ret; |
@@ -297,6 +373,19 @@ static void __init mx28evk_init(void) | |||
297 | gpio_set_value(MX28EVK_BL_ENABLE, 1); | 373 | gpio_set_value(MX28EVK_BL_ENABLE, 1); |
298 | 374 | ||
299 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); | 375 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); |
376 | |||
377 | /* power on mmc slot by writing 0 to the gpio */ | ||
378 | ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_DIR_OUT, | ||
379 | "mmc0-slot-power"); | ||
380 | if (ret) | ||
381 | pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret); | ||
382 | mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]); | ||
383 | |||
384 | ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_DIR_OUT, | ||
385 | "mmc1-slot-power"); | ||
386 | if (ret) | ||
387 | pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); | ||
388 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | ||
300 | } | 389 | } |
301 | 390 | ||
302 | static void __init mx28evk_timer_init(void) | 391 | static void __init mx28evk_timer_init(void) |
diff --git a/arch/arm/mach-mxs/module-tx28.c b/arch/arm/mach-mxs/module-tx28.c index fa0b154da67b..0fcff47009cf 100644 --- a/arch/arm/mach-mxs/module-tx28.c +++ b/arch/arm/mach-mxs/module-tx28.c | |||
@@ -45,7 +45,7 @@ static const iomux_cfg_t tx28_fec_gpio_pads[] __initconst = { | |||
45 | }; | 45 | }; |
46 | 46 | ||
47 | #define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3) | 47 | #define FEC_MODE (MXS_PAD_8MA | MXS_PAD_PULLUP | MXS_PAD_3V3) |
48 | static const iomux_cfg_t tx28_fec_pads[] __initconst = { | 48 | static const iomux_cfg_t tx28_fec0_pads[] __initconst = { |
49 | MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE, | 49 | MX28_PAD_ENET0_MDC__ENET0_MDC | FEC_MODE, |
50 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE, | 50 | MX28_PAD_ENET0_MDIO__ENET0_MDIO | FEC_MODE, |
51 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE, | 51 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | FEC_MODE, |
@@ -57,7 +57,20 @@ static const iomux_cfg_t tx28_fec_pads[] __initconst = { | |||
57 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE, | 57 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | FEC_MODE, |
58 | }; | 58 | }; |
59 | 59 | ||
60 | static const struct fec_platform_data tx28_fec_data __initconst = { | 60 | static const iomux_cfg_t tx28_fec1_pads[] __initconst = { |
61 | MX28_PAD_ENET0_RXD2__ENET1_RXD0, | ||
62 | MX28_PAD_ENET0_RXD3__ENET1_RXD1, | ||
63 | MX28_PAD_ENET0_TXD2__ENET1_TXD0, | ||
64 | MX28_PAD_ENET0_TXD3__ENET1_TXD1, | ||
65 | MX28_PAD_ENET0_COL__ENET1_TX_EN, | ||
66 | MX28_PAD_ENET0_CRS__ENET1_RX_EN, | ||
67 | }; | ||
68 | |||
69 | static struct fec_platform_data tx28_fec0_data = { | ||
70 | .phy = PHY_INTERFACE_MODE_RMII, | ||
71 | }; | ||
72 | |||
73 | static struct fec_platform_data tx28_fec1_data = { | ||
61 | .phy = PHY_INTERFACE_MODE_RMII, | 74 | .phy = PHY_INTERFACE_MODE_RMII, |
62 | }; | 75 | }; |
63 | 76 | ||
@@ -108,15 +121,15 @@ int __init tx28_add_fec0(void) | |||
108 | pr_debug("%s: Deasserting FEC PHY RESET\n", __func__); | 121 | pr_debug("%s: Deasserting FEC PHY RESET\n", __func__); |
109 | gpio_set_value(TX28_FEC_PHY_RESET, 1); | 122 | gpio_set_value(TX28_FEC_PHY_RESET, 1); |
110 | 123 | ||
111 | ret = mxs_iomux_setup_multiple_pads(tx28_fec_pads, | 124 | ret = mxs_iomux_setup_multiple_pads(tx28_fec0_pads, |
112 | ARRAY_SIZE(tx28_fec_pads)); | 125 | ARRAY_SIZE(tx28_fec0_pads)); |
113 | if (ret) { | 126 | if (ret) { |
114 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | 127 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", |
115 | __func__, ret); | 128 | __func__, ret); |
116 | goto free_gpios; | 129 | goto free_gpios; |
117 | } | 130 | } |
118 | pr_debug("%s: Registering FEC device\n", __func__); | 131 | pr_debug("%s: Registering FEC0 device\n", __func__); |
119 | mx28_add_fec(0, &tx28_fec_data); | 132 | mx28_add_fec(0, &tx28_fec0_data); |
120 | return 0; | 133 | return 0; |
121 | 134 | ||
122 | free_gpios: | 135 | free_gpios: |
@@ -129,3 +142,19 @@ free_gpios: | |||
129 | 142 | ||
130 | return ret; | 143 | return ret; |
131 | } | 144 | } |
145 | |||
146 | int __init tx28_add_fec1(void) | ||
147 | { | ||
148 | int ret; | ||
149 | |||
150 | ret = mxs_iomux_setup_multiple_pads(tx28_fec1_pads, | ||
151 | ARRAY_SIZE(tx28_fec1_pads)); | ||
152 | if (ret) { | ||
153 | pr_debug("%s: mxs_iomux_setup_multiple_pads() failed with rc: %d\n", | ||
154 | __func__, ret); | ||
155 | return ret; | ||
156 | } | ||
157 | pr_debug("%s: Registering FEC1 device\n", __func__); | ||
158 | mx28_add_fec(1, &tx28_fec1_data); | ||
159 | return 0; | ||
160 | } | ||
diff --git a/arch/arm/mach-mxs/module-tx28.h b/arch/arm/mach-mxs/module-tx28.h index df9e1b6e81bf..8ed425457d30 100644 --- a/arch/arm/mach-mxs/module-tx28.h +++ b/arch/arm/mach-mxs/module-tx28.h | |||
@@ -7,3 +7,4 @@ | |||
7 | * Free Software Foundation. | 7 | * Free Software Foundation. |
8 | */ | 8 | */ |
9 | int __init tx28_add_fec0(void); | 9 | int __init tx28_add_fec0(void); |
10 | int __init tx28_add_fec1(void); | ||
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index 927d5a181760..c1c5fb6a5b4c 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S | |||
@@ -79,7 +79,7 @@ | |||
79 | 79 | ||
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Register useage | 82 | * Register usage |
83 | * r8 - temporary | 83 | * r8 - temporary |
84 | * r9 - the driver buffer | 84 | * r9 - the driver buffer |
85 | * r10 - temporary | 85 | * r10 - temporary |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index d41fe2d0616a..0ad781db4e66 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -399,7 +399,7 @@ static void __init omap_sx1_init(void) | |||
399 | sx1_mmc_init(); | 399 | sx1_mmc_init(); |
400 | 400 | ||
401 | /* turn on USB power */ | 401 | /* turn on USB power */ |
402 | /* sx1_setusbpower(1); cant do it here because i2c is not ready */ | 402 | /* sx1_setusbpower(1); can't do it here because i2c is not ready */ |
403 | gpio_request(1, "A_IRDA_OFF"); | 403 | gpio_request(1, "A_IRDA_OFF"); |
404 | gpio_request(11, "A_SWITCH"); | 404 | gpio_request(11, "A_SWITCH"); |
405 | gpio_request(15, "A_USB_ON"); | 405 | gpio_request(15, "A_USB_ON"); |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index b0f4c231595f..36f26c3fa25e 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -281,7 +281,7 @@ static inline void omap_init_audio(void) {} | |||
281 | * Claiming GPIOs, and setting their direction and initial values, is the | 281 | * Claiming GPIOs, and setting their direction and initial values, is the |
282 | * responsibility of the device drivers. So is responding to probe(). | 282 | * responsibility of the device drivers. So is responding to probe(). |
283 | * | 283 | * |
284 | * Board-specific knowlege like creating devices or pin setup is to be | 284 | * Board-specific knowledge like creating devices or pin setup is to be |
285 | * kept out of drivers as much as possible. In particular, pin setup | 285 | * kept out of drivers as much as possible. In particular, pin setup |
286 | * may be handled by the boot loader, and drivers should expect it will | 286 | * may be handled by the boot loader, and drivers should expect it will |
287 | * normally have been done by the time they're probed. | 287 | * normally have been done by the time they're probed. |
diff --git a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h index 7a2df29400ca..23eed0035ed8 100644 --- a/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h +++ b/arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * These are the offsets from the begining of the fiq_buffer. They are put here | 34 | * These are the offsets from the beginning of the fiq_buffer. They are put here |
35 | * since the buffer and header need to be accessed by drivers servicing devices | 35 | * since the buffer and header need to be accessed by drivers servicing devices |
36 | * which generate GPIO interrupts - e.g. keyboard, modem, hook switch. | 36 | * which generate GPIO interrupts - e.g. keyboard, modem, hook switch. |
37 | */ | 37 | */ |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index a45cd6409686..512b15204450 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -68,7 +68,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o | |||
68 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o | 68 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o |
69 | 69 | ||
70 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 | 70 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 |
71 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a | 71 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) |
72 | 72 | ||
73 | ifeq ($(CONFIG_PM_VERBOSE),y) | 73 | ifeq ($(CONFIG_PM_VERBOSE),y) |
74 | CFLAGS_pm_bus.o += -DDEBUG | 74 | CFLAGS_pm_bus.o += -DDEBUG |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 5f8a2fd06337..34cf982b9679 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -696,7 +696,7 @@ static void __init igep2_init(void) | |||
696 | igep2_init_smsc911x(); | 696 | igep2_init_smsc911x(); |
697 | 697 | ||
698 | /* | 698 | /* |
699 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN | 699 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
700 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | 700 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
701 | */ | 701 | */ |
702 | igep2_wlan_bt_init(); | 702 | igep2_wlan_bt_init(); |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index b10db0e6ee62..2cf86c3cb1a3 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -440,7 +440,7 @@ static void __init igep3_init(void) | |||
440 | igep3_leds_init(); | 440 | igep3_leds_init(); |
441 | 441 | ||
442 | /* | 442 | /* |
443 | * WLAN-BT combo module from MuRata wich has a Marvell WLAN | 443 | * WLAN-BT combo module from MuRata which has a Marvell WLAN |
444 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | 444 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. |
445 | */ | 445 | */ |
446 | igep3_wifi_bt_init(); | 446 | igep3_wifi_bt_init(); |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index e964895b80e8..f8ba20a14e62 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -141,14 +141,19 @@ static void __init rx51_init(void) | |||
141 | static void __init rx51_map_io(void) | 141 | static void __init rx51_map_io(void) |
142 | { | 142 | { |
143 | omap2_set_globals_3xxx(); | 143 | omap2_set_globals_3xxx(); |
144 | rx51_video_mem_init(); | ||
145 | omap34xx_map_common_io(); | 144 | omap34xx_map_common_io(); |
146 | } | 145 | } |
147 | 146 | ||
147 | static void __init rx51_reserve(void) | ||
148 | { | ||
149 | rx51_video_mem_init(); | ||
150 | omap_reserve(); | ||
151 | } | ||
152 | |||
148 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | 153 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") |
149 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ | 154 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ |
150 | .boot_params = 0x80000100, | 155 | .boot_params = 0x80000100, |
151 | .reserve = omap_reserve, | 156 | .reserve = rx51_reserve, |
152 | .map_io = rx51_map_io, | 157 | .map_io = rx51_map_io, |
153 | .init_early = rx51_init_early, | 158 | .init_early = rx51_init_early, |
154 | .init_irq = omap_init_irq, | 159 | .init_irq = omap_init_irq, |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 276992d3b7fb..8c965671b4d4 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3116,14 +3116,9 @@ static struct omap_clk omap44xx_clks[] = { | |||
3116 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), | 3116 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), |
3117 | CLK("omapdss_dss", "sys_clk", &dss_sys_clk, CK_443X), | 3117 | CLK("omapdss_dss", "sys_clk", &dss_sys_clk, CK_443X), |
3118 | CLK("omapdss_dss", "tv_clk", &dss_tv_clk, CK_443X), | 3118 | CLK("omapdss_dss", "tv_clk", &dss_tv_clk, CK_443X), |
3119 | CLK("omapdss_dss", "dss_clk", &dss_dss_clk, CK_443X), | ||
3120 | CLK("omapdss_dss", "video_clk", &dss_48mhz_clk, CK_443X), | 3119 | CLK("omapdss_dss", "video_clk", &dss_48mhz_clk, CK_443X), |
3121 | CLK("omapdss_dss", "fck", &dss_fck, CK_443X), | 3120 | CLK("omapdss_dss", "fck", &dss_dss_clk, CK_443X), |
3122 | /* | 3121 | CLK("omapdss_dss", "ick", &dss_fck, CK_443X), |
3123 | * On OMAP4, DSS ick is a dummy clock; this is needed for compatibility | ||
3124 | * with OMAP2/3. | ||
3125 | */ | ||
3126 | CLK("omapdss_dss", "ick", &dummy_ck, CK_443X), | ||
3127 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), | 3122 | CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), |
3128 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), | 3123 | CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), |
3129 | CLK(NULL, "emif2_fck", &emif2_fck, CK_443X), | 3124 | CLK(NULL, "emif2_fck", &emif2_fck, CK_443X), |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index ab878545bd9b..6cb6c03293df 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -258,7 +258,7 @@ static void _resolve_clkdm_deps(struct clockdomain *clkdm, | |||
258 | * clkdm_init - set up the clockdomain layer | 258 | * clkdm_init - set up the clockdomain layer |
259 | * @clkdms: optional pointer to an array of clockdomains to register | 259 | * @clkdms: optional pointer to an array of clockdomains to register |
260 | * @init_autodeps: optional pointer to an array of autodeps to register | 260 | * @init_autodeps: optional pointer to an array of autodeps to register |
261 | * @custom_funcs: func pointers for arch specfic implementations | 261 | * @custom_funcs: func pointers for arch specific implementations |
262 | * | 262 | * |
263 | * Set up internal state. If a pointer to an array of clockdomains | 263 | * Set up internal state. If a pointer to an array of clockdomains |
264 | * @clkdms was supplied, loop through the list of clockdomains, | 264 | * @clkdms was supplied, loop through the list of clockdomains, |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 85b3dce65640..5823584d9cd7 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -125,7 +125,7 @@ struct clockdomain { | |||
125 | }; | 125 | }; |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * struct clkdm_ops - Arch specfic function implementations | 128 | * struct clkdm_ops - Arch specific function implementations |
129 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains | 129 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains |
130 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains | 130 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains |
131 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains | 131 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c index 9d0dec806e92..38830d8d4783 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c | |||
@@ -247,6 +247,7 @@ struct omap3_cm_regs { | |||
247 | u32 per_cm_clksel; | 247 | u32 per_cm_clksel; |
248 | u32 emu_cm_clksel; | 248 | u32 emu_cm_clksel; |
249 | u32 emu_cm_clkstctrl; | 249 | u32 emu_cm_clkstctrl; |
250 | u32 pll_cm_autoidle; | ||
250 | u32 pll_cm_autoidle2; | 251 | u32 pll_cm_autoidle2; |
251 | u32 pll_cm_clksel4; | 252 | u32 pll_cm_clksel4; |
252 | u32 pll_cm_clksel5; | 253 | u32 pll_cm_clksel5; |
@@ -319,6 +320,15 @@ void omap3_cm_save_context(void) | |||
319 | omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, CM_CLKSEL1); | 320 | omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, CM_CLKSEL1); |
320 | cm_context.emu_cm_clkstctrl = | 321 | cm_context.emu_cm_clkstctrl = |
321 | omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, OMAP2_CM_CLKSTCTRL); | 322 | omap2_cm_read_mod_reg(OMAP3430_EMU_MOD, OMAP2_CM_CLKSTCTRL); |
323 | /* | ||
324 | * As per erratum i671, ROM code does not respect the PER DPLL | ||
325 | * programming scheme if CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL == 1. | ||
326 | * In this case, even though this register has been saved in | ||
327 | * scratchpad contents, we need to restore AUTO_PERIPH_DPLL | ||
328 | * by ourselves. So, we need to save it anyway. | ||
329 | */ | ||
330 | cm_context.pll_cm_autoidle = | ||
331 | omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE); | ||
322 | cm_context.pll_cm_autoidle2 = | 332 | cm_context.pll_cm_autoidle2 = |
323 | omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE2); | 333 | omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE2); |
324 | cm_context.pll_cm_clksel4 = | 334 | cm_context.pll_cm_clksel4 = |
@@ -441,6 +451,13 @@ void omap3_cm_restore_context(void) | |||
441 | CM_CLKSEL1); | 451 | CM_CLKSEL1); |
442 | omap2_cm_write_mod_reg(cm_context.emu_cm_clkstctrl, OMAP3430_EMU_MOD, | 452 | omap2_cm_write_mod_reg(cm_context.emu_cm_clkstctrl, OMAP3430_EMU_MOD, |
443 | OMAP2_CM_CLKSTCTRL); | 453 | OMAP2_CM_CLKSTCTRL); |
454 | /* | ||
455 | * As per erratum i671, ROM code does not respect the PER DPLL | ||
456 | * programming scheme if CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL == 1. | ||
457 | * In this case, we need to restore AUTO_PERIPH_DPLL by ourselves. | ||
458 | */ | ||
459 | omap2_cm_write_mod_reg(cm_context.pll_cm_autoidle, PLL_MOD, | ||
460 | CM_AUTOIDLE); | ||
444 | omap2_cm_write_mod_reg(cm_context.pll_cm_autoidle2, PLL_MOD, | 461 | omap2_cm_write_mod_reg(cm_context.pll_cm_autoidle2, PLL_MOD, |
445 | CM_AUTOIDLE2); | 462 | CM_AUTOIDLE2); |
446 | omap2_cm_write_mod_reg(cm_context.pll_cm_clksel4, PLL_MOD, | 463 | omap2_cm_write_mod_reg(cm_context.pll_cm_clksel4, PLL_MOD, |
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 695279419020..da53ba3917ca 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c | |||
@@ -316,8 +316,14 @@ void omap3_save_scratchpad_contents(void) | |||
316 | omap2_cm_read_mod_reg(WKUP_MOD, CM_CLKSEL); | 316 | omap2_cm_read_mod_reg(WKUP_MOD, CM_CLKSEL); |
317 | prcm_block_contents.cm_clken_pll = | 317 | prcm_block_contents.cm_clken_pll = |
318 | omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); | 318 | omap2_cm_read_mod_reg(PLL_MOD, CM_CLKEN); |
319 | /* | ||
320 | * As per erratum i671, ROM code does not respect the PER DPLL | ||
321 | * programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1. | ||
322 | * Then, in anycase, clear these bits to avoid extra latencies. | ||
323 | */ | ||
319 | prcm_block_contents.cm_autoidle_pll = | 324 | prcm_block_contents.cm_autoidle_pll = |
320 | omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_AUTOIDLE_PLL); | 325 | omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) & |
326 | ~OMAP3430_AUTO_PERIPH_DPLL_MASK; | ||
321 | prcm_block_contents.cm_clksel1_pll = | 327 | prcm_block_contents.cm_clksel1_pll = |
322 | omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL1_PLL); | 328 | omap2_cm_read_mod_reg(PLL_MOD, OMAP3430_CM_CLKSEL1_PLL); |
323 | prcm_block_contents.cm_clksel2_pll = | 329 | prcm_block_contents.cm_clksel2_pll = |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index a44c52303405..1c240eff3918 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -297,8 +297,8 @@ DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); | |||
297 | 297 | ||
298 | /** | 298 | /** |
299 | * omap3_cpuidle_update_states() - Update the cpuidle states | 299 | * omap3_cpuidle_update_states() - Update the cpuidle states |
300 | * @mpu_deepest_state: Enable states upto and including this for mpu domain | 300 | * @mpu_deepest_state: Enable states up to and including this for mpu domain |
301 | * @core_deepest_state: Enable states upto and including this for core domain | 301 | * @core_deepest_state: Enable states up to and including this for core domain |
302 | * | 302 | * |
303 | * This goes through the list of states available and enables and disables the | 303 | * This goes through the list of states available and enables and disables the |
304 | * validity of C states based on deepest state that can be achieved for the | 304 | * validity of C states based on deepest state that can be achieved for the |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 84d1b735fe80..7b8558564591 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -253,7 +253,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data | |||
253 | ARRAY_SIZE(omap_keyboard_latency), 0); | 253 | ARRAY_SIZE(omap_keyboard_latency), 0); |
254 | 254 | ||
255 | if (IS_ERR(od)) { | 255 | if (IS_ERR(od)) { |
256 | WARN(1, "Cant build omap_device for %s:%s.\n", | 256 | WARN(1, "Can't build omap_device for %s:%s.\n", |
257 | name, oh->name); | 257 | name, oh->name); |
258 | return PTR_ERR(od); | 258 | return PTR_ERR(od); |
259 | } | 259 | } |
@@ -373,7 +373,7 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) | |||
373 | od = omap_device_build(name, spi_num, oh, pdata, | 373 | od = omap_device_build(name, spi_num, oh, pdata, |
374 | sizeof(*pdata), omap_mcspi_latency, | 374 | sizeof(*pdata), omap_mcspi_latency, |
375 | ARRAY_SIZE(omap_mcspi_latency), 0); | 375 | ARRAY_SIZE(omap_mcspi_latency), 0); |
376 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n", | 376 | WARN(IS_ERR(od), "Can't build omap_device for %s:%s\n", |
377 | name, oh->name); | 377 | name, oh->name); |
378 | kfree(pdata); | 378 | kfree(pdata); |
379 | return 0; | 379 | return 0; |
@@ -725,7 +725,7 @@ static int __init omap_init_wdt(void) | |||
725 | od = omap_device_build(dev_name, id, oh, NULL, 0, | 725 | od = omap_device_build(dev_name, id, oh, NULL, 0, |
726 | omap_wdt_latency, | 726 | omap_wdt_latency, |
727 | ARRAY_SIZE(omap_wdt_latency), 0); | 727 | ARRAY_SIZE(omap_wdt_latency), 0); |
728 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s.\n", | 728 | WARN(IS_ERR(od), "Can't build omap_device for %s:%s.\n", |
729 | dev_name, oh->name); | 729 | dev_name, oh->name); |
730 | return 0; | 730 | return 0; |
731 | } | 731 | } |
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index 34922b2d2e3f..c9ff0e79703d 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c | |||
@@ -262,7 +262,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) | |||
262 | omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0); | 262 | omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0); |
263 | kfree(p); | 263 | kfree(p); |
264 | if (IS_ERR(od)) { | 264 | if (IS_ERR(od)) { |
265 | pr_err("%s: Cant build omap_device for %s:%s.\n", | 265 | pr_err("%s: Can't build omap_device for %s:%s.\n", |
266 | __func__, name, oh->name); | 266 | __func__, name, oh->name); |
267 | return PTR_ERR(od); | 267 | return PTR_ERR(od); |
268 | } | 268 | } |
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 413de18c1d2b..9529842ae054 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -82,7 +82,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
82 | kfree(pdata); | 82 | kfree(pdata); |
83 | 83 | ||
84 | if (IS_ERR(od)) { | 84 | if (IS_ERR(od)) { |
85 | WARN(1, "Cant build omap_device for %s:%s.\n", | 85 | WARN(1, "Can't build omap_device for %s:%s.\n", |
86 | name, oh->name); | 86 | name, oh->name); |
87 | return PTR_ERR(od); | 87 | return PTR_ERR(od); |
88 | } | 88 | } |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 137e1a5f3d85..b2f30bed5a20 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -465,7 +465,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | |||
465 | od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, | 465 | od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, |
466 | sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); | 466 | sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); |
467 | if (IS_ERR(od)) { | 467 | if (IS_ERR(od)) { |
468 | WARN(1, "Cant build omap_device for %s:%s.\n", name, oh->name); | 468 | WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name); |
469 | kfree(mmc_data->slots[0].name); | 469 | kfree(mmc_data->slots[0].name); |
470 | goto done; | 470 | goto done; |
471 | } | 471 | } |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 565b9064a328..4a6ef6ab8458 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -149,7 +149,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | |||
149 | ARRAY_SIZE(omap2_mcbsp_latency), false); | 149 | ARRAY_SIZE(omap2_mcbsp_latency), false); |
150 | kfree(pdata); | 150 | kfree(pdata); |
151 | if (IS_ERR(od)) { | 151 | if (IS_ERR(od)) { |
152 | pr_err("%s: Cant build omap_device for %s:%s.\n", __func__, | 152 | pr_err("%s: Can't build omap_device for %s:%s.\n", __func__, |
153 | name, oh->name); | 153 | name, oh->name); |
154 | return PTR_ERR(od); | 154 | return PTR_ERR(od); |
155 | } | 155 | } |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index bb043cbb3886..a4ab1e364313 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -518,7 +518,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) | |||
518 | seq_printf(s, "/* %s */\n", m->muxnames[mode]); | 518 | seq_printf(s, "/* %s */\n", m->muxnames[mode]); |
519 | 519 | ||
520 | /* | 520 | /* |
521 | * XXX: Might be revisited to support differences accross | 521 | * XXX: Might be revisited to support differences across |
522 | * same OMAP generation. | 522 | * same OMAP generation. |
523 | */ | 523 | */ |
524 | seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); | 524 | seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def); |
diff --git a/arch/arm/mach-omap2/mux2430.h b/arch/arm/mach-omap2/mux2430.h index adbea0d03e08..9fd93149ebd9 100644 --- a/arch/arm/mach-omap2/mux2430.h +++ b/arch/arm/mach-omap2/mux2430.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * absolute addresses. The name in the macro is the mode-0 name of | 22 | * absolute addresses. The name in the macro is the mode-0 name of |
23 | * the pin. NOTE: These registers are 8-bits wide. | 23 | * the pin. NOTE: These registers are 8-bits wide. |
24 | * | 24 | * |
25 | * Note that these defines use SDMMC instead of MMC for compability | 25 | * Note that these defines use SDMMC instead of MMC for compatibility |
26 | * with signal names used in 3630. | 26 | * with signal names used in 3630. |
27 | */ | 27 | */ |
28 | #define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x000 | 28 | #define OMAP2430_CONTROL_PADCONF_GPMC_CLK_OFFSET 0x000 |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 8eb3ce1bbfbe..c4d0ae87d62a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -1639,6 +1639,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { | |||
1639 | 1639 | ||
1640 | static struct omap_hwmod omap2420_gpio1_hwmod = { | 1640 | static struct omap_hwmod omap2420_gpio1_hwmod = { |
1641 | .name = "gpio1", | 1641 | .name = "gpio1", |
1642 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1642 | .mpu_irqs = omap242x_gpio1_irqs, | 1643 | .mpu_irqs = omap242x_gpio1_irqs, |
1643 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs), | 1644 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs), |
1644 | .main_clk = "gpios_fck", | 1645 | .main_clk = "gpios_fck", |
@@ -1669,6 +1670,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { | |||
1669 | 1670 | ||
1670 | static struct omap_hwmod omap2420_gpio2_hwmod = { | 1671 | static struct omap_hwmod omap2420_gpio2_hwmod = { |
1671 | .name = "gpio2", | 1672 | .name = "gpio2", |
1673 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1672 | .mpu_irqs = omap242x_gpio2_irqs, | 1674 | .mpu_irqs = omap242x_gpio2_irqs, |
1673 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio2_irqs), | 1675 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio2_irqs), |
1674 | .main_clk = "gpios_fck", | 1676 | .main_clk = "gpios_fck", |
@@ -1699,6 +1701,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { | |||
1699 | 1701 | ||
1700 | static struct omap_hwmod omap2420_gpio3_hwmod = { | 1702 | static struct omap_hwmod omap2420_gpio3_hwmod = { |
1701 | .name = "gpio3", | 1703 | .name = "gpio3", |
1704 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1702 | .mpu_irqs = omap242x_gpio3_irqs, | 1705 | .mpu_irqs = omap242x_gpio3_irqs, |
1703 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio3_irqs), | 1706 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio3_irqs), |
1704 | .main_clk = "gpios_fck", | 1707 | .main_clk = "gpios_fck", |
@@ -1729,6 +1732,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { | |||
1729 | 1732 | ||
1730 | static struct omap_hwmod omap2420_gpio4_hwmod = { | 1733 | static struct omap_hwmod omap2420_gpio4_hwmod = { |
1731 | .name = "gpio4", | 1734 | .name = "gpio4", |
1735 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1732 | .mpu_irqs = omap242x_gpio4_irqs, | 1736 | .mpu_irqs = omap242x_gpio4_irqs, |
1733 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio4_irqs), | 1737 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio4_irqs), |
1734 | .main_clk = "gpios_fck", | 1738 | .main_clk = "gpios_fck", |
@@ -1782,7 +1786,7 @@ static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = { | |||
1782 | static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = { | 1786 | static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = { |
1783 | { | 1787 | { |
1784 | .pa_start = 0x48056000, | 1788 | .pa_start = 0x48056000, |
1785 | .pa_end = 0x4a0560ff, | 1789 | .pa_end = 0x48056fff, |
1786 | .flags = ADDR_TYPE_RT | 1790 | .flags = ADDR_TYPE_RT |
1787 | }, | 1791 | }, |
1788 | }; | 1792 | }; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index a860fb5024c2..9682dd519f8d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -1559,7 +1559,7 @@ static struct omap_hwmod omap2430_i2c1_hwmod = { | |||
1559 | * I2CHS IP's do not follow the usual pattern. | 1559 | * I2CHS IP's do not follow the usual pattern. |
1560 | * prcm_reg_id alone cannot be used to program | 1560 | * prcm_reg_id alone cannot be used to program |
1561 | * the iclk and fclk. Needs to be handled using | 1561 | * the iclk and fclk. Needs to be handled using |
1562 | * additonal flags when clk handling is moved | 1562 | * additional flags when clk handling is moved |
1563 | * to hwmod framework. | 1563 | * to hwmod framework. |
1564 | */ | 1564 | */ |
1565 | .module_offs = CORE_MOD, | 1565 | .module_offs = CORE_MOD, |
@@ -1742,6 +1742,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { | |||
1742 | 1742 | ||
1743 | static struct omap_hwmod omap2430_gpio1_hwmod = { | 1743 | static struct omap_hwmod omap2430_gpio1_hwmod = { |
1744 | .name = "gpio1", | 1744 | .name = "gpio1", |
1745 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1745 | .mpu_irqs = omap243x_gpio1_irqs, | 1746 | .mpu_irqs = omap243x_gpio1_irqs, |
1746 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs), | 1747 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs), |
1747 | .main_clk = "gpios_fck", | 1748 | .main_clk = "gpios_fck", |
@@ -1772,6 +1773,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { | |||
1772 | 1773 | ||
1773 | static struct omap_hwmod omap2430_gpio2_hwmod = { | 1774 | static struct omap_hwmod omap2430_gpio2_hwmod = { |
1774 | .name = "gpio2", | 1775 | .name = "gpio2", |
1776 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1775 | .mpu_irqs = omap243x_gpio2_irqs, | 1777 | .mpu_irqs = omap243x_gpio2_irqs, |
1776 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs), | 1778 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs), |
1777 | .main_clk = "gpios_fck", | 1779 | .main_clk = "gpios_fck", |
@@ -1802,6 +1804,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { | |||
1802 | 1804 | ||
1803 | static struct omap_hwmod omap2430_gpio3_hwmod = { | 1805 | static struct omap_hwmod omap2430_gpio3_hwmod = { |
1804 | .name = "gpio3", | 1806 | .name = "gpio3", |
1807 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1805 | .mpu_irqs = omap243x_gpio3_irqs, | 1808 | .mpu_irqs = omap243x_gpio3_irqs, |
1806 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs), | 1809 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs), |
1807 | .main_clk = "gpios_fck", | 1810 | .main_clk = "gpios_fck", |
@@ -1832,6 +1835,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { | |||
1832 | 1835 | ||
1833 | static struct omap_hwmod omap2430_gpio4_hwmod = { | 1836 | static struct omap_hwmod omap2430_gpio4_hwmod = { |
1834 | .name = "gpio4", | 1837 | .name = "gpio4", |
1838 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1835 | .mpu_irqs = omap243x_gpio4_irqs, | 1839 | .mpu_irqs = omap243x_gpio4_irqs, |
1836 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs), | 1840 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs), |
1837 | .main_clk = "gpios_fck", | 1841 | .main_clk = "gpios_fck", |
@@ -1862,6 +1866,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = { | |||
1862 | 1866 | ||
1863 | static struct omap_hwmod omap2430_gpio5_hwmod = { | 1867 | static struct omap_hwmod omap2430_gpio5_hwmod = { |
1864 | .name = "gpio5", | 1868 | .name = "gpio5", |
1869 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1865 | .mpu_irqs = omap243x_gpio5_irqs, | 1870 | .mpu_irqs = omap243x_gpio5_irqs, |
1866 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs), | 1871 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs), |
1867 | .main_clk = "gpio5_fck", | 1872 | .main_clk = "gpio5_fck", |
@@ -1915,7 +1920,7 @@ static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = { | |||
1915 | static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = { | 1920 | static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = { |
1916 | { | 1921 | { |
1917 | .pa_start = 0x48056000, | 1922 | .pa_start = 0x48056000, |
1918 | .pa_end = 0x4a0560ff, | 1923 | .pa_end = 0x48056fff, |
1919 | .flags = ADDR_TYPE_RT | 1924 | .flags = ADDR_TYPE_RT |
1920 | }, | 1925 | }, |
1921 | }; | 1926 | }; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index b98e2dfcba28..909a84de6682 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -2141,6 +2141,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = { | |||
2141 | 2141 | ||
2142 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { | 2142 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { |
2143 | .name = "gpio1", | 2143 | .name = "gpio1", |
2144 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2144 | .mpu_irqs = omap3xxx_gpio1_irqs, | 2145 | .mpu_irqs = omap3xxx_gpio1_irqs, |
2145 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs), | 2146 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs), |
2146 | .main_clk = "gpio1_ick", | 2147 | .main_clk = "gpio1_ick", |
@@ -2177,6 +2178,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = { | |||
2177 | 2178 | ||
2178 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { | 2179 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { |
2179 | .name = "gpio2", | 2180 | .name = "gpio2", |
2181 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2180 | .mpu_irqs = omap3xxx_gpio2_irqs, | 2182 | .mpu_irqs = omap3xxx_gpio2_irqs, |
2181 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs), | 2183 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs), |
2182 | .main_clk = "gpio2_ick", | 2184 | .main_clk = "gpio2_ick", |
@@ -2213,6 +2215,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = { | |||
2213 | 2215 | ||
2214 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { | 2216 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { |
2215 | .name = "gpio3", | 2217 | .name = "gpio3", |
2218 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2216 | .mpu_irqs = omap3xxx_gpio3_irqs, | 2219 | .mpu_irqs = omap3xxx_gpio3_irqs, |
2217 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs), | 2220 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs), |
2218 | .main_clk = "gpio3_ick", | 2221 | .main_clk = "gpio3_ick", |
@@ -2249,6 +2252,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = { | |||
2249 | 2252 | ||
2250 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { | 2253 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { |
2251 | .name = "gpio4", | 2254 | .name = "gpio4", |
2255 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2252 | .mpu_irqs = omap3xxx_gpio4_irqs, | 2256 | .mpu_irqs = omap3xxx_gpio4_irqs, |
2253 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs), | 2257 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs), |
2254 | .main_clk = "gpio4_ick", | 2258 | .main_clk = "gpio4_ick", |
@@ -2285,6 +2289,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = { | |||
2285 | 2289 | ||
2286 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { | 2290 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { |
2287 | .name = "gpio5", | 2291 | .name = "gpio5", |
2292 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2288 | .mpu_irqs = omap3xxx_gpio5_irqs, | 2293 | .mpu_irqs = omap3xxx_gpio5_irqs, |
2289 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs), | 2294 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs), |
2290 | .main_clk = "gpio5_ick", | 2295 | .main_clk = "gpio5_ick", |
@@ -2321,6 +2326,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = { | |||
2321 | 2326 | ||
2322 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { | 2327 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { |
2323 | .name = "gpio6", | 2328 | .name = "gpio6", |
2329 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
2324 | .mpu_irqs = omap3xxx_gpio6_irqs, | 2330 | .mpu_irqs = omap3xxx_gpio6_irqs, |
2325 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs), | 2331 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs), |
2326 | .main_clk = "gpio6_ick", | 2332 | .main_clk = "gpio6_ick", |
@@ -2386,7 +2392,7 @@ static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = { | |||
2386 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { | 2392 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { |
2387 | { | 2393 | { |
2388 | .pa_start = 0x48056000, | 2394 | .pa_start = 0x48056000, |
2389 | .pa_end = 0x4a0560ff, | 2395 | .pa_end = 0x48056fff, |
2390 | .flags = ADDR_TYPE_RT | 2396 | .flags = ADDR_TYPE_RT |
2391 | }, | 2397 | }, |
2392 | }; | 2398 | }; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 3e88dd3f8ef3..abc548a0c98d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -885,7 +885,7 @@ static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = { | |||
885 | static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { | 885 | static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { |
886 | { | 886 | { |
887 | .pa_start = 0x4a056000, | 887 | .pa_start = 0x4a056000, |
888 | .pa_end = 0x4a0560ff, | 888 | .pa_end = 0x4a056fff, |
889 | .flags = ADDR_TYPE_RT | 889 | .flags = ADDR_TYPE_RT |
890 | }, | 890 | }, |
891 | }; | 891 | }; |
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c index 5f2da7565b68..4321e7938929 100644 --- a/arch/arm/mach-omap2/omap_l3_smx.c +++ b/arch/arm/mach-omap2/omap_l3_smx.c | |||
@@ -196,11 +196,11 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) | |||
196 | /* No timeout error for debug sources */ | 196 | /* No timeout error for debug sources */ |
197 | } | 197 | } |
198 | 198 | ||
199 | base = ((l3->rt) + (*(omap3_l3_bases[int_type] + err_source))); | ||
200 | |||
201 | /* identify the error source */ | 199 | /* identify the error source */ |
202 | for (err_source = 0; !(status & (1 << err_source)); err_source++) | 200 | for (err_source = 0; !(status & (1 << err_source)); err_source++) |
203 | ; | 201 | ; |
202 | |||
203 | base = l3->rt + *(omap3_l3_bases[int_type] + err_source); | ||
204 | error = omap3_l3_readll(base, L3_ERROR_LOG); | 204 | error = omap3_l3_readll(base, L3_ERROR_LOG); |
205 | 205 | ||
206 | if (error) { | 206 | if (error) { |
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index e2e605fe9138..05f6abc96b0d 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -112,12 +112,12 @@ int omap4430_phy_power(struct device *dev, int ID, int on) | |||
112 | else | 112 | else |
113 | /* | 113 | /* |
114 | * Enable VBUS Valid, AValid and IDDIG | 114 | * Enable VBUS Valid, AValid and IDDIG |
115 | * high impedence | 115 | * high impedance |
116 | */ | 116 | */ |
117 | __raw_writel(IDDIG | AVALID | VBUSVALID, | 117 | __raw_writel(IDDIG | AVALID | VBUSVALID, |
118 | ctrl_base + USBOTGHS_CONTROL); | 118 | ctrl_base + USBOTGHS_CONTROL); |
119 | } else { | 119 | } else { |
120 | /* Enable session END and IDIG to high impedence. */ | 120 | /* Enable session END and IDIG to high impedance. */ |
121 | __raw_writel(SESSEND | IDDIG, ctrl_base + | 121 | __raw_writel(SESSEND | IDDIG, ctrl_base + |
122 | USBOTGHS_CONTROL); | 122 | USBOTGHS_CONTROL); |
123 | } | 123 | } |
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 0a8e74e3e811..07d6140baa9d 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c | |||
@@ -308,7 +308,7 @@ int __init omap3_twl_init(void) | |||
308 | * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages, | 308 | * Strategy Software Scaling Mode (ENABLE_VMODE=0), for setting the voltages, |
309 | * in those scenarios this bit is to be cleared (enable = false). | 309 | * in those scenarios this bit is to be cleared (enable = false). |
310 | * | 310 | * |
311 | * Returns 0 on sucess, error is returned if I2C read/write fails. | 311 | * Returns 0 on success, error is returned if I2C read/write fails. |
312 | */ | 312 | */ |
313 | int __init omap3_twl_set_sr_bit(bool enable) | 313 | int __init omap3_twl_set_sr_bit(bool enable) |
314 | { | 314 | { |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 30af3351c2d6..49486f522dca 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -89,6 +89,7 @@ static void omap2_init_processor_devices(void) | |||
89 | if (cpu_is_omap44xx()) { | 89 | if (cpu_is_omap44xx()) { |
90 | _init_omap_device("l3_main_1", &l3_dev); | 90 | _init_omap_device("l3_main_1", &l3_dev); |
91 | _init_omap_device("dsp", &dsp_dev); | 91 | _init_omap_device("dsp", &dsp_dev); |
92 | _init_omap_device("iva", &iva_dev); | ||
92 | } else { | 93 | } else { |
93 | _init_omap_device("l3_main", &l3_dev); | 94 | _init_omap_device("l3_main", &l3_dev); |
94 | } | 95 | } |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 49c6513e90d8..9af08473bf10 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -196,7 +196,7 @@ static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused) | |||
196 | /** | 196 | /** |
197 | * pwrdm_init - set up the powerdomain layer | 197 | * pwrdm_init - set up the powerdomain layer |
198 | * @pwrdm_list: array of struct powerdomain pointers to register | 198 | * @pwrdm_list: array of struct powerdomain pointers to register |
199 | * @custom_funcs: func pointers for arch specfic implementations | 199 | * @custom_funcs: func pointers for arch specific implementations |
200 | * | 200 | * |
201 | * Loop through the array of powerdomains @pwrdm_list, registering all | 201 | * Loop through the array of powerdomains @pwrdm_list, registering all |
202 | * that are available on the current CPU. If pwrdm_list is supplied | 202 | * that are available on the current CPU. If pwrdm_list is supplied |
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 027f40bd235d..d23d979b9c34 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -121,7 +121,7 @@ struct powerdomain { | |||
121 | }; | 121 | }; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * struct pwrdm_ops - Arch specfic function implementations | 124 | * struct pwrdm_ops - Arch specific function implementations |
125 | * @pwrdm_set_next_pwrst: Set the target power state for a pd | 125 | * @pwrdm_set_next_pwrst: Set the target power state for a pd |
126 | * @pwrdm_read_next_pwrst: Read the target power state set for a pd | 126 | * @pwrdm_read_next_pwrst: Read the target power state set for a pd |
127 | * @pwrdm_read_pwrst: Read the current power state of a pd | 127 | * @pwrdm_read_pwrst: Read the current power state of a pd |
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index 9c9c113788b9..469a920a74dc 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c | |||
@@ -72,7 +72,7 @@ static struct powerdomain mpu_3xxx_pwrdm = { | |||
72 | 72 | ||
73 | /* | 73 | /* |
74 | * The USBTLL Save-and-Restore mechanism is broken on | 74 | * The USBTLL Save-and-Restore mechanism is broken on |
75 | * 3430s upto ES3.0 and 3630ES1.0. Hence this feature | 75 | * 3430s up to ES3.0 and 3630ES1.0. Hence this feature |
76 | * needs to be disabled on these chips. | 76 | * needs to be disabled on these chips. |
77 | * Refer: 3430 errata ID i459 and 3630 errata ID i579 | 77 | * Refer: 3430 errata ID i459 and 3630 errata ID i579 |
78 | * | 78 | * |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 8f674c9442bf..13e24f913dd4 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -247,7 +247,7 @@ static void sr_stop_vddautocomp(struct omap_sr *sr) | |||
247 | * driver register and sr device intializtion API's. Only one call | 247 | * driver register and sr device intializtion API's. Only one call |
248 | * will ultimately succeed. | 248 | * will ultimately succeed. |
249 | * | 249 | * |
250 | * Currenly this function registers interrrupt handler for a particular SR | 250 | * Currently this function registers interrrupt handler for a particular SR |
251 | * if smartreflex class driver is already registered and has | 251 | * if smartreflex class driver is already registered and has |
252 | * requested for interrupts and the SR interrupt line in present. | 252 | * requested for interrupts and the SR interrupt line in present. |
253 | */ | 253 | */ |
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index c6facf7becf8..0c1552d9d995 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c | |||
@@ -114,7 +114,6 @@ static int __init _config_common_vdd_data(struct omap_vdd_info *vdd) | |||
114 | sys_clk_speed /= 1000; | 114 | sys_clk_speed /= 1000; |
115 | 115 | ||
116 | /* Generic voltage parameters */ | 116 | /* Generic voltage parameters */ |
117 | vdd->curr_volt = 1200000; | ||
118 | vdd->volt_scale = vp_forceupdate_scale_voltage; | 117 | vdd->volt_scale = vp_forceupdate_scale_voltage; |
119 | vdd->vp_enabled = false; | 118 | vdd->vp_enabled = false; |
120 | 119 | ||
@@ -851,7 +850,7 @@ int omap_voltage_scale_vdd(struct voltagedomain *voltdm, | |||
851 | * @voltdm: pointer to the VDD whose voltage is to be reset. | 850 | * @voltdm: pointer to the VDD whose voltage is to be reset. |
852 | * | 851 | * |
853 | * This API finds out the correct voltage the voltage domain is supposed | 852 | * This API finds out the correct voltage the voltage domain is supposed |
854 | * to be at and resets the voltage to that level. Should be used expecially | 853 | * to be at and resets the voltage to that level. Should be used especially |
855 | * while disabling any voltage compensation modules. | 854 | * while disabling any voltage compensation modules. |
856 | */ | 855 | */ |
857 | void omap_voltage_reset(struct voltagedomain *voltdm) | 856 | void omap_voltage_reset(struct voltagedomain *voltdm) |
@@ -912,7 +911,7 @@ void omap_voltage_get_volttable(struct voltagedomain *voltdm, | |||
912 | * This API searches only through the non-compensated voltages int the | 911 | * This API searches only through the non-compensated voltages int the |
913 | * voltage table. | 912 | * voltage table. |
914 | * Returns pointer to the voltage table entry corresponding to volt on | 913 | * Returns pointer to the voltage table entry corresponding to volt on |
915 | * sucess. Returns -ENODATA if no voltage table exisits for the passed voltage | 914 | * success. Returns -ENODATA if no voltage table exisits for the passed voltage |
916 | * domain or if there is no matching entry. | 915 | * domain or if there is no matching entry. |
917 | */ | 916 | */ |
918 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, | 917 | struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 1a5d6a0e2602..5ceafdccc456 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include "common.h" | 19 | #include "common.h" |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * The Orion has fully programable address map. There's a separate address | 22 | * The Orion has fully programmable address map. There's a separate address |
23 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, | 23 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, |
24 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own | 24 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own |
25 | * address decode windows that allow it to access any of the Orion resources. | 25 | * address decode windows that allow it to access any of the Orion resources. |
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c index 429ecafe9fdd..a5930f83958b 100644 --- a/arch/arm/mach-orion5x/net2big-setup.c +++ b/arch/arm/mach-orion5x/net2big-setup.c | |||
@@ -190,7 +190,7 @@ err_free_1: | |||
190 | * The power front LEDs (blue and red) and SATA red LEDs are controlled via a | 190 | * The power front LEDs (blue and red) and SATA red LEDs are controlled via a |
191 | * single GPIO line and are compatible with the leds-gpio driver. | 191 | * single GPIO line and are compatible with the leds-gpio driver. |
192 | * | 192 | * |
193 | * The SATA blue LEDs have some hardware blink capabilities which are detailled | 193 | * The SATA blue LEDs have some hardware blink capabilities which are detailed |
194 | * in the following array: | 194 | * in the following array: |
195 | * | 195 | * |
196 | * SATAx blue LED | SATAx activity | LED state | 196 | * SATAx blue LED | SATAx activity | LED state |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index f0f43e13ac87..e6d64494d3de 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | /**************************************************************************** | 37 | /**************************************************************************** |
38 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the | 38 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the |
39 | * partitions on the device because we want to keep compatability with | 39 | * partitions on the device because we want to keep compatibility with |
40 | * existing QNAP firmware. | 40 | * existing QNAP firmware. |
41 | * | 41 | * |
42 | * Layout as used by QNAP: | 42 | * Layout as used by QNAP: |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 92f393f08fa4..9eac8192d923 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | /**************************************************************************** | 57 | /**************************************************************************** |
58 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the | 58 | * 8MiB NOR flash. The struct mtd_partition is not in the same order as the |
59 | * partitions on the device because we want to keep compatability with | 59 | * partitions on the device because we want to keep compatibility with |
60 | * existing QNAP firmware. | 60 | * existing QNAP firmware. |
61 | * | 61 | * |
62 | * Layout as used by QNAP: | 62 | * Layout as used by QNAP: |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 8554707d20a9..edb1dd2d1611 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -402,7 +402,7 @@ static void ts78xx_fpga_supports(void) | |||
402 | /* enable devices if magic matches */ | 402 | /* enable devices if magic matches */ |
403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { | 403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { |
404 | case TS7800_FPGA_MAGIC: | 404 | case TS7800_FPGA_MAGIC: |
405 | printk(KERN_WARNING "TS-7800 FPGA: unrecognized revision 0x%.2x\n", | 405 | pr_warning("TS-7800 FPGA: unrecognized revision 0x%.2x\n", |
406 | ts78xx_fpga.id & 0xff); | 406 | ts78xx_fpga.id & 0xff); |
407 | ts78xx_fpga.supports.ts_rtc.present = 1; | 407 | ts78xx_fpga.supports.ts_rtc.present = 1; |
408 | ts78xx_fpga.supports.ts_nand.present = 1; | 408 | ts78xx_fpga.supports.ts_nand.present = 1; |
@@ -423,7 +423,7 @@ static int ts78xx_fpga_load_devices(void) | |||
423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { | 423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { |
424 | tmp = ts78xx_ts_rtc_load(); | 424 | tmp = ts78xx_ts_rtc_load(); |
425 | if (tmp) { | 425 | if (tmp) { |
426 | printk(KERN_INFO "TS-78xx: RTC not registered\n"); | 426 | pr_info("TS-78xx: RTC not registered\n"); |
427 | ts78xx_fpga.supports.ts_rtc.present = 0; | 427 | ts78xx_fpga.supports.ts_rtc.present = 0; |
428 | } | 428 | } |
429 | ret |= tmp; | 429 | ret |= tmp; |
@@ -431,7 +431,7 @@ static int ts78xx_fpga_load_devices(void) | |||
431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { | 431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { |
432 | tmp = ts78xx_ts_nand_load(); | 432 | tmp = ts78xx_ts_nand_load(); |
433 | if (tmp) { | 433 | if (tmp) { |
434 | printk(KERN_INFO "TS-78xx: NAND not registered\n"); | 434 | pr_info("TS-78xx: NAND not registered\n"); |
435 | ts78xx_fpga.supports.ts_nand.present = 0; | 435 | ts78xx_fpga.supports.ts_nand.present = 0; |
436 | } | 436 | } |
437 | ret |= tmp; | 437 | ret |= tmp; |
@@ -439,7 +439,7 @@ static int ts78xx_fpga_load_devices(void) | |||
439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { | 439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { |
440 | tmp = ts78xx_ts_rng_load(); | 440 | tmp = ts78xx_ts_rng_load(); |
441 | if (tmp) { | 441 | if (tmp) { |
442 | printk(KERN_INFO "TS-78xx: RNG not registered\n"); | 442 | pr_info("TS-78xx: RNG not registered\n"); |
443 | ts78xx_fpga.supports.ts_rng.present = 0; | 443 | ts78xx_fpga.supports.ts_rng.present = 0; |
444 | } | 444 | } |
445 | ret |= tmp; | 445 | ret |= tmp; |
@@ -466,7 +466,7 @@ static int ts78xx_fpga_load(void) | |||
466 | { | 466 | { |
467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); | 467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); |
468 | 468 | ||
469 | printk(KERN_INFO "TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", | 469 | pr_info("TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", |
470 | (ts78xx_fpga.id >> 8) & 0xffffff, | 470 | (ts78xx_fpga.id >> 8) & 0xffffff, |
471 | ts78xx_fpga.id & 0xff); | 471 | ts78xx_fpga.id & 0xff); |
472 | 472 | ||
@@ -494,7 +494,7 @@ static int ts78xx_fpga_unload(void) | |||
494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA | 494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA |
495 | */ | 495 | */ |
496 | if (ts78xx_fpga.id != fpga_id) { | 496 | if (ts78xx_fpga.id != fpga_id) { |
497 | printk(KERN_ERR "TS-78xx FPGA: magic/rev mismatch\n" | 497 | pr_err("TS-78xx FPGA: magic/rev mismatch\n" |
498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", | 498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", |
499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, | 499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, |
500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); | 500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); |
@@ -525,7 +525,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
525 | int value, ret; | 525 | int value, ret; |
526 | 526 | ||
527 | if (ts78xx_fpga.state < 0) { | 527 | if (ts78xx_fpga.state < 0) { |
528 | printk(KERN_ERR "TS-78xx FPGA: borked, you must powercycle asap\n"); | 528 | pr_err("TS-78xx FPGA: borked, you must powercycle asap\n"); |
529 | return -EBUSY; | 529 | return -EBUSY; |
530 | } | 530 | } |
531 | 531 | ||
@@ -534,7 +534,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) | 534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) |
535 | value = 0; | 535 | value = 0; |
536 | else { | 536 | else { |
537 | printk(KERN_ERR "ts78xx_fpga_store: Invalid value\n"); | 537 | pr_err("ts78xx_fpga_store: Invalid value\n"); |
538 | return -EINVAL; | 538 | return -EINVAL; |
539 | } | 539 | } |
540 | 540 | ||
@@ -616,7 +616,7 @@ static void __init ts78xx_init(void) | |||
616 | ret = ts78xx_fpga_load(); | 616 | ret = ts78xx_fpga_load(); |
617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); | 617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); |
618 | if (ret) | 618 | if (ret) |
619 | printk(KERN_ERR "sysfs_create_file failed: %d\n", ret); | 619 | pr_err("sysfs_create_file failed: %d\n", ret); |
620 | } | 620 | } |
621 | 621 | ||
622 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") | 622 | MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") |
diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c index 3499fada73ae..4cb069fd9af2 100644 --- a/arch/arm/mach-pxa/am200epd.c +++ b/arch/arm/mach-pxa/am200epd.c | |||
@@ -128,8 +128,8 @@ static int am200_init_gpio_regs(struct metronomefb_par *par) | |||
128 | return 0; | 128 | return 0; |
129 | 129 | ||
130 | err_req_gpio: | 130 | err_req_gpio: |
131 | while (i > 0) | 131 | while (--i >= 0) |
132 | gpio_free(gpios[i--]); | 132 | gpio_free(gpios[i]); |
133 | 133 | ||
134 | return err; | 134 | return err; |
135 | } | 135 | } |
@@ -194,7 +194,7 @@ static struct notifier_block am200_fb_notif = { | |||
194 | }; | 194 | }; |
195 | 195 | ||
196 | /* this gets called as part of our init. these steps must be done now so | 196 | /* this gets called as part of our init. these steps must be done now so |
197 | * that we can use set_pxa_fb_info */ | 197 | * that we can use pxa_set_fb_info */ |
198 | static void __init am200_presetup_fb(void) | 198 | static void __init am200_presetup_fb(void) |
199 | { | 199 | { |
200 | int fw; | 200 | int fw; |
@@ -249,7 +249,7 @@ static void __init am200_presetup_fb(void) | |||
249 | /* we divide since we told the LCD controller we're 16bpp */ | 249 | /* we divide since we told the LCD controller we're 16bpp */ |
250 | am200_fb_info.modes->xres /= 2; | 250 | am200_fb_info.modes->xres /= 2; |
251 | 251 | ||
252 | set_pxa_fb_info(&am200_fb_info); | 252 | pxa_set_fb_info(NULL, &am200_fb_info); |
253 | 253 | ||
254 | } | 254 | } |
255 | 255 | ||
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c index 993d75e66390..fa8bad235d9f 100644 --- a/arch/arm/mach-pxa/am300epd.c +++ b/arch/arm/mach-pxa/am300epd.c | |||
@@ -125,10 +125,7 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par) | |||
125 | if (err) { | 125 | if (err) { |
126 | dev_err(&am300_device->dev, "failed requesting " | 126 | dev_err(&am300_device->dev, "failed requesting " |
127 | "gpio %d, err=%d\n", i, err); | 127 | "gpio %d, err=%d\n", i, err); |
128 | while (i >= DB0_GPIO_PIN) | 128 | goto err_req_gpio2; |
129 | gpio_free(i--); | ||
130 | i = ARRAY_SIZE(gpios) - 1; | ||
131 | goto err_req_gpio; | ||
132 | } | 129 | } |
133 | } | 130 | } |
134 | 131 | ||
@@ -159,9 +156,13 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par) | |||
159 | 156 | ||
160 | return 0; | 157 | return 0; |
161 | 158 | ||
159 | err_req_gpio2: | ||
160 | while (--i >= DB0_GPIO_PIN) | ||
161 | gpio_free(i); | ||
162 | i = ARRAY_SIZE(gpios); | ||
162 | err_req_gpio: | 163 | err_req_gpio: |
163 | while (i > 0) | 164 | while (--i >= 0) |
164 | gpio_free(gpios[i--]); | 165 | gpio_free(gpios[i]); |
165 | 166 | ||
166 | return err; | 167 | return err; |
167 | } | 168 | } |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 38dea05df7f8..bfbecec6d05f 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -263,7 +263,7 @@ static void __init balloon3_lcd_init(void) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; | 265 | balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; |
266 | set_pxa_fb_info(&balloon3_lcd_screen); | 266 | pxa_set_fb_info(NULL, &balloon3_lcd_screen); |
267 | return; | 267 | return; |
268 | 268 | ||
269 | err2: | 269 | err2: |
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index b734d8468168..8225e2e58c6e 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
@@ -379,7 +379,7 @@ __setup("monitor=", cmx2xx_set_display); | |||
379 | 379 | ||
380 | static void __init cmx2xx_init_display(void) | 380 | static void __init cmx2xx_init_display(void) |
381 | { | 381 | { |
382 | set_pxa_fb_info(cmx2xx_display); | 382 | pxa_set_fb_info(NULL, cmx2xx_display); |
383 | } | 383 | } |
384 | #else | 384 | #else |
385 | static inline void cmx2xx_init_display(void) {} | 385 | static inline void cmx2xx_init_display(void) {} |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 06d0a03f462d..b2248e76ec8b 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -296,7 +296,7 @@ static struct pxafb_mach_info cm_x300_lcd = { | |||
296 | 296 | ||
297 | static void __init cm_x300_init_lcd(void) | 297 | static void __init cm_x300_init_lcd(void) |
298 | { | 298 | { |
299 | set_pxa_fb_info(&cm_x300_lcd); | 299 | pxa_set_fb_info(NULL, &cm_x300_lcd); |
300 | } | 300 | } |
301 | #else | 301 | #else |
302 | static inline void cm_x300_init_lcd(void) {} | 302 | static inline void cm_x300_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index ee797397dc5b..44c1b77ece67 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c | |||
@@ -175,7 +175,7 @@ static struct pxafb_mach_info income_lcd_screen = { | |||
175 | 175 | ||
176 | static void __init income_lcd_init(void) | 176 | static void __init income_lcd_init(void) |
177 | { | 177 | { |
178 | set_pxa_fb_info(&income_lcd_screen); | 178 | pxa_set_fb_info(NULL, &income_lcd_screen); |
179 | } | 179 | } |
180 | #else | 180 | #else |
181 | static inline void income_lcd_init(void) {} | 181 | static inline void income_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 96b2d9fbfef0..3f9be419959d 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
@@ -105,7 +105,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin) | |||
105 | lcd_bl_pin = bl_pin; | 105 | lcd_bl_pin = bl_pin; |
106 | gpio_request(bl_pin, "lcd backlight"); | 106 | gpio_request(bl_pin, "lcd backlight"); |
107 | gpio_direction_output(bl_pin, 0); | 107 | gpio_direction_output(bl_pin, 0); |
108 | set_pxa_fb_info(&sharp_lq43_info); | 108 | pxa_set_fb_info(NULL, &sharp_lq43_info); |
109 | } | 109 | } |
110 | #endif | 110 | #endif |
111 | 111 | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index d4e705caefea..3a5507e31919 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -462,7 +462,6 @@ static struct pxaficp_platform_data corgi_ficp_platform_data = { | |||
462 | * USB Device Controller | 462 | * USB Device Controller |
463 | */ | 463 | */ |
464 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | 464 | static struct pxa2xx_udc_mach_info udc_info __initdata = { |
465 | .gpio_vbus = -1, | ||
466 | /* no connect GPIO; corgi can't tell connection status */ | 465 | /* no connect GPIO; corgi can't tell connection status */ |
467 | .gpio_pullup = CORGI_GPIO_USB_PULLUP, | 466 | .gpio_pullup = CORGI_GPIO_USB_PULLUP, |
468 | }; | 467 | }; |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index c4bf08b3eb61..2e0425404de5 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -90,7 +90,6 @@ void __init pxa_set_mci_info(struct pxamci_platform_data *info) | |||
90 | 90 | ||
91 | static struct pxa2xx_udc_mach_info pxa_udc_info = { | 91 | static struct pxa2xx_udc_mach_info pxa_udc_info = { |
92 | .gpio_pullup = -1, | 92 | .gpio_pullup = -1, |
93 | .gpio_vbus = -1, | ||
94 | }; | 93 | }; |
95 | 94 | ||
96 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) | 95 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) |
@@ -188,16 +187,12 @@ struct platform_device pxa_device_fb = { | |||
188 | .resource = pxafb_resources, | 187 | .resource = pxafb_resources, |
189 | }; | 188 | }; |
190 | 189 | ||
191 | void __init set_pxa_fb_info(struct pxafb_mach_info *info) | 190 | void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info) |
192 | { | 191 | { |
192 | pxa_device_fb.dev.parent = parent; | ||
193 | pxa_register_device(&pxa_device_fb, info); | 193 | pxa_register_device(&pxa_device_fb, info); |
194 | } | 194 | } |
195 | 195 | ||
196 | void __init set_pxa_fb_parent(struct device *parent_dev) | ||
197 | { | ||
198 | pxa_device_fb.dev.parent = parent_dev; | ||
199 | } | ||
200 | |||
201 | static struct resource pxa_resource_ffuart[] = { | 196 | static struct resource pxa_resource_ffuart[] = { |
202 | { | 197 | { |
203 | .start = 0x40100000, | 198 | .start = 0x40100000, |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index b411d7cbf5a1..f8a6e9d79a3a 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -689,7 +689,7 @@ static struct pxafb_mach_info em_x270_lcd = { | |||
689 | 689 | ||
690 | static void __init em_x270_init_lcd(void) | 690 | static void __init em_x270_init_lcd(void) |
691 | { | 691 | { |
692 | set_pxa_fb_info(&em_x270_lcd); | 692 | pxa_set_fb_info(NULL, &em_x270_lcd); |
693 | } | 693 | } |
694 | #else | 694 | #else |
695 | static inline void em_x270_init_lcd(void) {} | 695 | static inline void em_x270_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index edca0a043293..2e3970fdde0b 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mfd/t7l66xb.h> | 20 | #include <linux/mfd/t7l66xb.h> |
21 | #include <linux/mtd/nand.h> | 21 | #include <linux/mtd/nand.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/usb/gpio_vbus.h> | ||
23 | 24 | ||
24 | #include <video/w100fb.h> | 25 | #include <video/w100fb.h> |
25 | 26 | ||
@@ -51,12 +52,20 @@ void __init eseries_fixup(struct machine_desc *desc, | |||
51 | mi->bank[0].size = (64*1024*1024); | 52 | mi->bank[0].size = (64*1024*1024); |
52 | } | 53 | } |
53 | 54 | ||
54 | struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { | 55 | struct gpio_vbus_mach_info e7xx_udc_info = { |
55 | .gpio_vbus = GPIO_E7XX_USB_DISC, | 56 | .gpio_vbus = GPIO_E7XX_USB_DISC, |
56 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, | 57 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, |
57 | .gpio_pullup_inverted = 1 | 58 | .gpio_pullup_inverted = 1 |
58 | }; | 59 | }; |
59 | 60 | ||
61 | static struct platform_device e7xx_gpio_vbus = { | ||
62 | .name = "gpio-vbus", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .platform_data = &e7xx_udc_info, | ||
66 | }, | ||
67 | }; | ||
68 | |||
60 | struct pxaficp_platform_data e7xx_ficp_platform_data = { | 69 | struct pxaficp_platform_data e7xx_ficp_platform_data = { |
61 | .gpio_pwdown = GPIO_E7XX_IR_OFF, | 70 | .gpio_pwdown = GPIO_E7XX_IR_OFF, |
62 | .transceiver_cap = IR_SIRMODE | IR_OFF, | 71 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
@@ -165,6 +174,7 @@ static struct platform_device e330_tc6387xb_device = { | |||
165 | 174 | ||
166 | static struct platform_device *e330_devices[] __initdata = { | 175 | static struct platform_device *e330_devices[] __initdata = { |
167 | &e330_tc6387xb_device, | 176 | &e330_tc6387xb_device, |
177 | &e7xx_gpio_vbus, | ||
168 | }; | 178 | }; |
169 | 179 | ||
170 | static void __init e330_init(void) | 180 | static void __init e330_init(void) |
@@ -175,7 +185,6 @@ static void __init e330_init(void) | |||
175 | eseries_register_clks(); | 185 | eseries_register_clks(); |
176 | eseries_get_tmio_gpios(); | 186 | eseries_get_tmio_gpios(); |
177 | platform_add_devices(ARRAY_AND_SIZE(e330_devices)); | 187 | platform_add_devices(ARRAY_AND_SIZE(e330_devices)); |
178 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
179 | } | 188 | } |
180 | 189 | ||
181 | MACHINE_START(E330, "Toshiba e330") | 190 | MACHINE_START(E330, "Toshiba e330") |
@@ -214,6 +223,7 @@ static struct platform_device e350_t7l66xb_device = { | |||
214 | 223 | ||
215 | static struct platform_device *e350_devices[] __initdata = { | 224 | static struct platform_device *e350_devices[] __initdata = { |
216 | &e350_t7l66xb_device, | 225 | &e350_t7l66xb_device, |
226 | &e7xx_gpio_vbus, | ||
217 | }; | 227 | }; |
218 | 228 | ||
219 | static void __init e350_init(void) | 229 | static void __init e350_init(void) |
@@ -224,7 +234,6 @@ static void __init e350_init(void) | |||
224 | eseries_register_clks(); | 234 | eseries_register_clks(); |
225 | eseries_get_tmio_gpios(); | 235 | eseries_get_tmio_gpios(); |
226 | platform_add_devices(ARRAY_AND_SIZE(e350_devices)); | 236 | platform_add_devices(ARRAY_AND_SIZE(e350_devices)); |
227 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
228 | } | 237 | } |
229 | 238 | ||
230 | MACHINE_START(E350, "Toshiba e350") | 239 | MACHINE_START(E350, "Toshiba e350") |
@@ -333,6 +342,7 @@ static struct platform_device e400_t7l66xb_device = { | |||
333 | 342 | ||
334 | static struct platform_device *e400_devices[] __initdata = { | 343 | static struct platform_device *e400_devices[] __initdata = { |
335 | &e400_t7l66xb_device, | 344 | &e400_t7l66xb_device, |
345 | &e7xx_gpio_vbus, | ||
336 | }; | 346 | }; |
337 | 347 | ||
338 | static void __init e400_init(void) | 348 | static void __init e400_init(void) |
@@ -344,9 +354,8 @@ static void __init e400_init(void) | |||
344 | /* Fixme - e400 may have a switched clock */ | 354 | /* Fixme - e400 may have a switched clock */ |
345 | eseries_register_clks(); | 355 | eseries_register_clks(); |
346 | eseries_get_tmio_gpios(); | 356 | eseries_get_tmio_gpios(); |
347 | set_pxa_fb_info(&e400_pxafb_mach_info); | 357 | pxa_set_fb_info(NULL, &e400_pxafb_mach_info); |
348 | platform_add_devices(ARRAY_AND_SIZE(e400_devices)); | 358 | platform_add_devices(ARRAY_AND_SIZE(e400_devices)); |
349 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
350 | } | 359 | } |
351 | 360 | ||
352 | MACHINE_START(E400, "Toshiba e400") | 361 | MACHINE_START(E400, "Toshiba e400") |
@@ -519,6 +528,7 @@ static struct platform_device e740_t7l66xb_device = { | |||
519 | static struct platform_device *e740_devices[] __initdata = { | 528 | static struct platform_device *e740_devices[] __initdata = { |
520 | &e740_fb_device, | 529 | &e740_fb_device, |
521 | &e740_t7l66xb_device, | 530 | &e740_t7l66xb_device, |
531 | &e7xx_gpio_vbus, | ||
522 | }; | 532 | }; |
523 | 533 | ||
524 | static void __init e740_init(void) | 534 | static void __init e740_init(void) |
@@ -532,7 +542,6 @@ static void __init e740_init(void) | |||
532 | "UDCCLK", &pxa25x_device_udc.dev), | 542 | "UDCCLK", &pxa25x_device_udc.dev), |
533 | eseries_get_tmio_gpios(); | 543 | eseries_get_tmio_gpios(); |
534 | platform_add_devices(ARRAY_AND_SIZE(e740_devices)); | 544 | platform_add_devices(ARRAY_AND_SIZE(e740_devices)); |
535 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
536 | pxa_set_ac97_info(NULL); | 545 | pxa_set_ac97_info(NULL); |
537 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | 546 | pxa_set_ficp_info(&e7xx_ficp_platform_data); |
538 | } | 547 | } |
@@ -711,6 +720,7 @@ static struct platform_device e750_tc6393xb_device = { | |||
711 | static struct platform_device *e750_devices[] __initdata = { | 720 | static struct platform_device *e750_devices[] __initdata = { |
712 | &e750_fb_device, | 721 | &e750_fb_device, |
713 | &e750_tc6393xb_device, | 722 | &e750_tc6393xb_device, |
723 | &e7xx_gpio_vbus, | ||
714 | }; | 724 | }; |
715 | 725 | ||
716 | static void __init e750_init(void) | 726 | static void __init e750_init(void) |
@@ -723,7 +733,6 @@ static void __init e750_init(void) | |||
723 | "GPIO11_CLK", NULL), | 733 | "GPIO11_CLK", NULL), |
724 | eseries_get_tmio_gpios(); | 734 | eseries_get_tmio_gpios(); |
725 | platform_add_devices(ARRAY_AND_SIZE(e750_devices)); | 735 | platform_add_devices(ARRAY_AND_SIZE(e750_devices)); |
726 | pxa_set_udc_info(&e7xx_udc_mach_info); | ||
727 | pxa_set_ac97_info(NULL); | 736 | pxa_set_ac97_info(NULL); |
728 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | 737 | pxa_set_ficp_info(&e7xx_ficp_platform_data); |
729 | } | 738 | } |
@@ -873,12 +882,21 @@ static struct platform_device e800_fb_device = { | |||
873 | 882 | ||
874 | /* --------------------------- UDC definitions --------------------------- */ | 883 | /* --------------------------- UDC definitions --------------------------- */ |
875 | 884 | ||
876 | static struct pxa2xx_udc_mach_info e800_udc_mach_info = { | 885 | static struct gpio_vbus_mach_info e800_udc_info = { |
877 | .gpio_vbus = GPIO_E800_USB_DISC, | 886 | .gpio_vbus = GPIO_E800_USB_DISC, |
878 | .gpio_pullup = GPIO_E800_USB_PULLUP, | 887 | .gpio_pullup = GPIO_E800_USB_PULLUP, |
879 | .gpio_pullup_inverted = 1 | 888 | .gpio_pullup_inverted = 1 |
880 | }; | 889 | }; |
881 | 890 | ||
891 | static struct platform_device e800_gpio_vbus = { | ||
892 | .name = "gpio-vbus", | ||
893 | .id = -1, | ||
894 | .dev = { | ||
895 | .platform_data = &e800_udc_info, | ||
896 | }, | ||
897 | }; | ||
898 | |||
899 | |||
882 | /* ----------------- e800 tc6393xb parameters ------------------ */ | 900 | /* ----------------- e800 tc6393xb parameters ------------------ */ |
883 | 901 | ||
884 | static struct tc6393xb_platform_data e800_tc6393xb_info = { | 902 | static struct tc6393xb_platform_data e800_tc6393xb_info = { |
@@ -907,6 +925,7 @@ static struct platform_device e800_tc6393xb_device = { | |||
907 | static struct platform_device *e800_devices[] __initdata = { | 925 | static struct platform_device *e800_devices[] __initdata = { |
908 | &e800_fb_device, | 926 | &e800_fb_device, |
909 | &e800_tc6393xb_device, | 927 | &e800_tc6393xb_device, |
928 | &e800_gpio_vbus, | ||
910 | }; | 929 | }; |
911 | 930 | ||
912 | static void __init e800_init(void) | 931 | static void __init e800_init(void) |
@@ -919,7 +938,6 @@ static void __init e800_init(void) | |||
919 | "GPIO11_CLK", NULL), | 938 | "GPIO11_CLK", NULL), |
920 | eseries_get_tmio_gpios(); | 939 | eseries_get_tmio_gpios(); |
921 | platform_add_devices(ARRAY_AND_SIZE(e800_devices)); | 940 | platform_add_devices(ARRAY_AND_SIZE(e800_devices)); |
922 | pxa_set_udc_info(&e800_udc_mach_info); | ||
923 | pxa_set_ac97_info(NULL); | 941 | pxa_set_ac97_info(NULL); |
924 | } | 942 | } |
925 | 943 | ||
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 93f05e024313..d88aed8fbe15 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -783,7 +783,7 @@ static void __init a780_init(void) | |||
783 | 783 | ||
784 | pxa_set_i2c_info(NULL); | 784 | pxa_set_i2c_info(NULL); |
785 | 785 | ||
786 | set_pxa_fb_info(&ezx_fb_info_1); | 786 | pxa_set_fb_info(NULL, &ezx_fb_info_1); |
787 | 787 | ||
788 | pxa_set_keypad_info(&a780_keypad_platform_data); | 788 | pxa_set_keypad_info(&a780_keypad_platform_data); |
789 | 789 | ||
@@ -853,7 +853,7 @@ static void __init e680_init(void) | |||
853 | pxa_set_i2c_info(NULL); | 853 | pxa_set_i2c_info(NULL); |
854 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); | 854 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); |
855 | 855 | ||
856 | set_pxa_fb_info(&ezx_fb_info_1); | 856 | pxa_set_fb_info(NULL, &ezx_fb_info_1); |
857 | 857 | ||
858 | pxa_set_keypad_info(&e680_keypad_platform_data); | 858 | pxa_set_keypad_info(&e680_keypad_platform_data); |
859 | 859 | ||
@@ -918,7 +918,7 @@ static void __init a1200_init(void) | |||
918 | pxa_set_i2c_info(NULL); | 918 | pxa_set_i2c_info(NULL); |
919 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); | 919 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); |
920 | 920 | ||
921 | set_pxa_fb_info(&ezx_fb_info_2); | 921 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
922 | 922 | ||
923 | pxa_set_keypad_info(&a1200_keypad_platform_data); | 923 | pxa_set_keypad_info(&a1200_keypad_platform_data); |
924 | 924 | ||
@@ -1103,7 +1103,7 @@ static void __init a910_init(void) | |||
1103 | pxa_set_i2c_info(NULL); | 1103 | pxa_set_i2c_info(NULL); |
1104 | i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info)); | 1104 | i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info)); |
1105 | 1105 | ||
1106 | set_pxa_fb_info(&ezx_fb_info_2); | 1106 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
1107 | 1107 | ||
1108 | pxa_set_keypad_info(&a910_keypad_platform_data); | 1108 | pxa_set_keypad_info(&a910_keypad_platform_data); |
1109 | 1109 | ||
@@ -1173,7 +1173,7 @@ static void __init e6_init(void) | |||
1173 | pxa_set_i2c_info(NULL); | 1173 | pxa_set_i2c_info(NULL); |
1174 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); | 1174 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); |
1175 | 1175 | ||
1176 | set_pxa_fb_info(&ezx_fb_info_2); | 1176 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
1177 | 1177 | ||
1178 | pxa_set_keypad_info(&e6_keypad_platform_data); | 1178 | pxa_set_keypad_info(&e6_keypad_platform_data); |
1179 | 1179 | ||
@@ -1212,7 +1212,7 @@ static void __init e2_init(void) | |||
1212 | pxa_set_i2c_info(NULL); | 1212 | pxa_set_i2c_info(NULL); |
1213 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); | 1213 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); |
1214 | 1214 | ||
1215 | set_pxa_fb_info(&ezx_fb_info_2); | 1215 | pxa_set_fb_info(NULL, &ezx_fb_info_2); |
1216 | 1216 | ||
1217 | pxa_set_keypad_info(&e2_keypad_platform_data); | 1217 | pxa_set_keypad_info(&e2_keypad_platform_data); |
1218 | 1218 | ||
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index 6fd319ea5284..d65e4bde9b91 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/usb/gpio_vbus.h> | ||
29 | 30 | ||
30 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
31 | #include <asm/memory.h> | 32 | #include <asm/memory.h> |
@@ -106,14 +107,22 @@ static void __init gumstix_mmc_init(void) | |||
106 | #endif | 107 | #endif |
107 | 108 | ||
108 | #ifdef CONFIG_USB_GADGET_PXA25X | 109 | #ifdef CONFIG_USB_GADGET_PXA25X |
109 | static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = { | 110 | static struct gpio_vbus_mach_info gumstix_udc_info = { |
110 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, | 111 | .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn, |
111 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, | 112 | .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx, |
112 | }; | 113 | }; |
113 | 114 | ||
115 | static struct platform_device gumstix_gpio_vbus = { | ||
116 | .name = "gpio-vbus", | ||
117 | .id = -1, | ||
118 | .dev = { | ||
119 | .platform_data = &gumstix_udc_info, | ||
120 | }, | ||
121 | }; | ||
122 | |||
114 | static void __init gumstix_udc_init(void) | 123 | static void __init gumstix_udc_init(void) |
115 | { | 124 | { |
116 | pxa_set_udc_info(&gumstix_udc_info); | 125 | platform_device_register(&gumstix_gpio_vbus); |
117 | } | 126 | } |
118 | #else | 127 | #else |
119 | static void gumstix_udc_init(void) | 128 | static void gumstix_udc_init(void) |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 6de0ad0eea65..9cdcca597924 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -711,7 +711,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = { | |||
711 | static struct regulator_init_data bq24022_init_data = { | 711 | static struct regulator_init_data bq24022_init_data = { |
712 | .constraints = { | 712 | .constraints = { |
713 | .max_uA = 500000, | 713 | .max_uA = 500000, |
714 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT, | 714 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT|REGULATOR_CHANGE_STATUS, |
715 | }, | 715 | }, |
716 | .num_consumer_supplies = ARRAY_SIZE(bq24022_consumers), | 716 | .num_consumer_supplies = ARRAY_SIZE(bq24022_consumers), |
717 | .consumer_supplies = bq24022_consumers, | 717 | .consumer_supplies = bq24022_consumers, |
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index dd40e4a9291c..f7fb64f11a7d 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
@@ -167,7 +167,7 @@ static void __init idp_init(void) | |||
167 | 167 | ||
168 | platform_device_register(&smc91x_device); | 168 | platform_device_register(&smc91x_device); |
169 | //platform_device_register(&mst_audio_device); | 169 | //platform_device_register(&mst_audio_device); |
170 | set_pxa_fb_info(&sharp_lm8v31); | 170 | pxa_set_fb_info(NULL, &sharp_lm8v31); |
171 | pxa_set_mci_info(&idp_mci_platform_data); | 171 | pxa_set_mci_info(&idp_mci_platform_data); |
172 | } | 172 | } |
173 | 173 | ||
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index b024a8b37439..c4639502efca 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
@@ -99,11 +99,24 @@ | |||
99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) | 99 | #define GAFR(x) GPIO_REG(0x54 + (((x) & 0x70) >> 2)) |
100 | 100 | ||
101 | 101 | ||
102 | #define NR_BUILTIN_GPIO 128 | 102 | #define NR_BUILTIN_GPIO PXA_GPIO_IRQ_NUM |
103 | 103 | ||
104 | #define gpio_to_bank(gpio) ((gpio) >> 5) | 104 | #define gpio_to_bank(gpio) ((gpio) >> 5) |
105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | 105 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) |
106 | #define irq_to_gpio(irq) IRQ_TO_GPIO(irq) | 106 | |
107 | static inline int irq_to_gpio(unsigned int irq) | ||
108 | { | ||
109 | int gpio; | ||
110 | |||
111 | if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1) | ||
112 | return irq - IRQ_GPIO0; | ||
113 | |||
114 | gpio = irq - PXA_GPIO_IRQ_BASE; | ||
115 | if (gpio >= 2 && gpio < NR_BUILTIN_GPIO) | ||
116 | return gpio; | ||
117 | |||
118 | return -1; | ||
119 | } | ||
107 | 120 | ||
108 | #ifdef CONFIG_CPU_PXA26x | 121 | #ifdef CONFIG_CPU_PXA26x |
109 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | 122 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index a4285fc00878..038402404e39 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -93,9 +93,6 @@ | |||
93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) | 93 | #define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x)) |
94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) | 94 | #define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x)) |
95 | 95 | ||
96 | #define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE) | ||
97 | #define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i)) | ||
98 | |||
99 | /* | 96 | /* |
100 | * The following interrupts are for board specific purposes. Since | 97 | * The following interrupts are for board specific purposes. Since |
101 | * the kernel can only run on one machine at a time, we can re-use | 98 | * the kernel can only run on one machine at a time, we can re-use |
diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h b/arch/arm/mach-pxa/include/mach/palmz72.h index 2bbcf70dd935..0d4700a79612 100644 --- a/arch/arm/mach-pxa/include/mach/palmz72.h +++ b/arch/arm/mach-pxa/include/mach/palmz72.h | |||
@@ -44,6 +44,11 @@ | |||
44 | #define GPIO_NR_PALMZ72_BT_POWER 17 | 44 | #define GPIO_NR_PALMZ72_BT_POWER 17 |
45 | #define GPIO_NR_PALMZ72_BT_RESET 83 | 45 | #define GPIO_NR_PALMZ72_BT_RESET 83 |
46 | 46 | ||
47 | /* Camera */ | ||
48 | #define GPIO_NR_PALMZ72_CAM_PWDN 56 | ||
49 | #define GPIO_NR_PALMZ72_CAM_RESET 57 | ||
50 | #define GPIO_NR_PALMZ72_CAM_POWER 91 | ||
51 | |||
47 | /** Initial values **/ | 52 | /** Initial values **/ |
48 | 53 | ||
49 | /* Battery */ | 54 | /* Battery */ |
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h index e4fb4668c26e..207ecb49a61b 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #define PCMD(x) __REG(0x40F50110 + ((x) << 2)) | 38 | #define PCMD(x) __REG(0x40F50110 + ((x) << 2)) |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Slave Power Managment Unit | 41 | * Slave Power Management Unit |
42 | */ | 42 | */ |
43 | #define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */ | 43 | #define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */ |
44 | #define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */ | 44 | #define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */ |
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h index 160ec83f51a6..01a45ac48114 100644 --- a/arch/arm/mach-pxa/include/mach/pxafb.h +++ b/arch/arm/mach-pxa/include/mach/pxafb.h | |||
@@ -154,8 +154,8 @@ struct pxafb_mach_info { | |||
154 | void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); | 154 | void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); |
155 | void (*smart_update)(struct fb_info *); | 155 | void (*smart_update)(struct fb_info *); |
156 | }; | 156 | }; |
157 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); | 157 | |
158 | void set_pxa_fb_parent(struct device *parent_dev); | 158 | void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); |
159 | unsigned long pxafb_get_hsync_time(struct device *dev); | 159 | unsigned long pxafb_get_hsync_time(struct device *dev); |
160 | 160 | ||
161 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); | 161 | extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); |
diff --git a/arch/arm/mach-pxa/include/mach/z2.h b/arch/arm/mach-pxa/include/mach/z2.h index 8835c16bc82f..7b0f71ef3167 100644 --- a/arch/arm/mach-pxa/include/mach/z2.h +++ b/arch/arm/mach-pxa/include/mach/z2.h | |||
@@ -25,8 +25,7 @@ | |||
25 | #define GPIO98_ZIPITZ2_LID_BUTTON 98 | 25 | #define GPIO98_ZIPITZ2_LID_BUTTON 98 |
26 | 26 | ||
27 | /* Libertas GSPI8686 WiFi */ | 27 | /* Libertas GSPI8686 WiFi */ |
28 | #define GPIO14_ZIPITZ2_WIFI_RESET 14 | 28 | #define GPIO14_ZIPITZ2_WIFI_POWER 14 |
29 | #define GPIO15_ZIPITZ2_WIFI_POWER 15 | ||
30 | #define GPIO24_ZIPITZ2_WIFI_CS 24 | 29 | #define GPIO24_ZIPITZ2_WIFI_CS 24 |
31 | #define GPIO36_ZIPITZ2_WIFI_IRQ 36 | 30 | #define GPIO36_ZIPITZ2_WIFI_IRQ 36 |
32 | 31 | ||
diff --git a/arch/arm/mach-pxa/include/mach/zeus.h b/arch/arm/mach-pxa/include/mach/zeus.h index faa408ab7ad7..0641f31a56b7 100644 --- a/arch/arm/mach-pxa/include/mach/zeus.h +++ b/arch/arm/mach-pxa/include/mach/zeus.h | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | /* | 65 | /* |
66 | * CPLD registers: | 66 | * CPLD registers: |
67 | * Only 4 registers, but spreaded over a 32MB address space. | 67 | * Only 4 registers, but spread over a 32MB address space. |
68 | * Be gentle, and remap that over 32kB... | 68 | * Be gentle, and remap that over 32kB... |
69 | */ | 69 | */ |
70 | 70 | ||
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 87c1ed9ccd2f..e5e326d2cdc9 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -185,7 +185,7 @@ static struct pxafb_mach_info littleton_lcd_info = { | |||
185 | 185 | ||
186 | static void littleton_init_lcd(void) | 186 | static void littleton_init_lcd(void) |
187 | { | 187 | { |
188 | set_pxa_fb_info(&littleton_lcd_info); | 188 | pxa_set_fb_info(NULL, &littleton_lcd_info); |
189 | } | 189 | } |
190 | #else | 190 | #else |
191 | static inline void littleton_init_lcd(void) {}; | 191 | static inline void littleton_init_lcd(void) {}; |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 6307f70ae22a..f5de541725b1 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -480,7 +480,7 @@ static void __init lpd270_init(void) | |||
480 | pxa_set_ac97_info(NULL); | 480 | pxa_set_ac97_info(NULL); |
481 | 481 | ||
482 | if (lpd270_lcd_to_use != NULL) | 482 | if (lpd270_lcd_to_use != NULL) |
483 | set_pxa_fb_info(lpd270_lcd_to_use); | 483 | pxa_set_fb_info(NULL, lpd270_lcd_to_use); |
484 | 484 | ||
485 | pxa_set_ohci_info(&lpd270_ohci_platform_data); | 485 | pxa_set_ohci_info(&lpd270_ohci_platform_data); |
486 | } | 486 | } |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 0fea945dd6f2..3ede978c83d9 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -521,7 +521,7 @@ static void __init lubbock_init(void) | |||
521 | 521 | ||
522 | clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); | 522 | clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); |
523 | pxa_set_udc_info(&udc_info); | 523 | pxa_set_udc_info(&udc_info); |
524 | set_pxa_fb_info(&sharp_lm8v31); | 524 | pxa_set_fb_info(NULL, &sharp_lm8v31); |
525 | pxa_set_mci_info(&lubbock_mci_platform_data); | 525 | pxa_set_mci_info(&lubbock_mci_platform_data); |
526 | pxa_set_ficp_info(&lubbock_ficp_platform_data); | 526 | pxa_set_ficp_info(&lubbock_ficp_platform_data); |
527 | pxa_set_ac97_info(NULL); | 527 | pxa_set_ac97_info(NULL); |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 5535991c4a3c..9984ef70bd79 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -599,7 +599,7 @@ static struct regulator_consumer_supply bq24022_consumers[] = { | |||
599 | static struct regulator_init_data bq24022_init_data = { | 599 | static struct regulator_init_data bq24022_init_data = { |
600 | .constraints = { | 600 | .constraints = { |
601 | .max_uA = 500000, | 601 | .max_uA = 500000, |
602 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT, | 602 | .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS, |
603 | }, | 603 | }, |
604 | .num_consumer_supplies = ARRAY_SIZE(bq24022_consumers), | 604 | .num_consumer_supplies = ARRAY_SIZE(bq24022_consumers), |
605 | .consumer_supplies = bq24022_consumers, | 605 | .consumer_supplies = bq24022_consumers, |
@@ -757,7 +757,7 @@ static void __init magician_init(void) | |||
757 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); | 757 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); |
758 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); | 758 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); |
759 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); | 759 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); |
760 | set_pxa_fb_info(lcd_select ? &samsung_info : &toppoly_info); | 760 | pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info); |
761 | } else | 761 | } else |
762 | pr_err("LCD detection: CPLD mapping failed\n"); | 762 | pr_err("LCD detection: CPLD mapping failed\n"); |
763 | } | 763 | } |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 29b6e7a94e11..95163baca29e 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -592,7 +592,7 @@ static void __init mainstone_init(void) | |||
592 | else | 592 | else |
593 | mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode; | 593 | mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode; |
594 | 594 | ||
595 | set_pxa_fb_info(&mainstone_pxafb_info); | 595 | pxa_set_fb_info(NULL, &mainstone_pxafb_info); |
596 | mainstone_backlight_register(); | 596 | mainstone_backlight_register(); |
597 | 597 | ||
598 | pxa_set_mci_info(&mainstone_mci_platform_data); | 598 | pxa_set_mci_info(&mainstone_mci_platform_data); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 78d98a8607ec..23925db8ff74 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -458,7 +458,7 @@ static struct platform_device strataflash = { | |||
458 | /* | 458 | /* |
459 | * Suspend/Resume bootstrap management | 459 | * Suspend/Resume bootstrap management |
460 | * | 460 | * |
461 | * MIO A701 reboot sequence is highly ROM dependant. From the one dissassembled, | 461 | * MIO A701 reboot sequence is highly ROM dependent. From the one dissassembled, |
462 | * this sequence is as follows : | 462 | * this sequence is as follows : |
463 | * - disables interrupts | 463 | * - disables interrupts |
464 | * - initialize SDRAM (self refresh RAM into active RAM) | 464 | * - initialize SDRAM (self refresh RAM into active RAM) |
@@ -795,7 +795,7 @@ static void __init mioa701_machine_init(void) | |||
795 | pxa_set_stuart_info(NULL); | 795 | pxa_set_stuart_info(NULL); |
796 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); | 796 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); |
797 | bootstrap_init(); | 797 | bootstrap_init(); |
798 | set_pxa_fb_info(&mioa701_pxafb_info); | 798 | pxa_set_fb_info(NULL, &mioa701_pxafb_info); |
799 | pxa_set_mci_info(&mioa701_mci_info); | 799 | pxa_set_mci_info(&mioa701_mci_info); |
800 | pxa_set_keypad_info(&mioa701_keypad_info); | 800 | pxa_set_keypad_info(&mioa701_keypad_info); |
801 | pxa_set_udc_info(&mioa701_udc_info); | 801 | pxa_set_udc_info(&mioa701_udc_info); |
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 72adb3ae2b43..325c245c0a0d 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c | |||
@@ -1,8 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Common code for Palm LD, T5, TX, Z72 | 2 | * Common code for Palm LD, T5, TX, Z72 |
3 | * | 3 | * |
4 | * Copyright (C) 2010 | 4 | * Copyright (C) 2010-2011 Marek Vasut <marek.vasut@gmail.com> |
5 | * Marek Vasut <marek.vasut@gmail.com> | ||
6 | * | 5 | * |
7 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -158,7 +157,7 @@ void __init palm27x_lcd_init(int power, struct pxafb_mode_info *mode) | |||
158 | palm27x_lcd_screen.pxafb_lcd_power = palm27x_lcd_ctl; | 157 | palm27x_lcd_screen.pxafb_lcd_power = palm27x_lcd_ctl; |
159 | } | 158 | } |
160 | 159 | ||
161 | set_pxa_fb_info(&palm27x_lcd_screen); | 160 | pxa_set_fb_info(NULL, &palm27x_lcd_screen); |
162 | } | 161 | } |
163 | #endif | 162 | #endif |
164 | 163 | ||
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index a09a2374697b..fb06bd047272 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -507,7 +507,7 @@ static struct pxafb_mach_info palmtc_lcd_screen = { | |||
507 | 507 | ||
508 | static void __init palmtc_lcd_init(void) | 508 | static void __init palmtc_lcd_init(void) |
509 | { | 509 | { |
510 | set_pxa_fb_info(&palmtc_lcd_screen); | 510 | pxa_set_fb_info(NULL, &palmtc_lcd_screen); |
511 | } | 511 | } |
512 | #else | 512 | #else |
513 | static inline void palmtc_lcd_init(void) {} | 513 | static inline void palmtc_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 3f25014a136c..726f5b98dcd3 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
@@ -136,30 +136,14 @@ static struct platform_device palmte2_pxa_keys = { | |||
136 | /****************************************************************************** | 136 | /****************************************************************************** |
137 | * Backlight | 137 | * Backlight |
138 | ******************************************************************************/ | 138 | ******************************************************************************/ |
139 | static struct gpio palmte_bl_gpios[] = { | ||
140 | { GPIO_NR_PALMTE2_BL_POWER, GPIOF_INIT_LOW, "Backlight power" }, | ||
141 | { GPIO_NR_PALMTE2_LCD_POWER, GPIOF_INIT_LOW, "LCD power" }, | ||
142 | }; | ||
143 | |||
139 | static int palmte2_backlight_init(struct device *dev) | 144 | static int palmte2_backlight_init(struct device *dev) |
140 | { | 145 | { |
141 | int ret; | 146 | return gpio_request_array(ARRAY_AND_SIZE(palmte_bl_gpios)); |
142 | |||
143 | ret = gpio_request(GPIO_NR_PALMTE2_BL_POWER, "BL POWER"); | ||
144 | if (ret) | ||
145 | goto err; | ||
146 | ret = gpio_direction_output(GPIO_NR_PALMTE2_BL_POWER, 0); | ||
147 | if (ret) | ||
148 | goto err2; | ||
149 | ret = gpio_request(GPIO_NR_PALMTE2_LCD_POWER, "LCD POWER"); | ||
150 | if (ret) | ||
151 | goto err2; | ||
152 | ret = gpio_direction_output(GPIO_NR_PALMTE2_LCD_POWER, 0); | ||
153 | if (ret) | ||
154 | goto err3; | ||
155 | |||
156 | return 0; | ||
157 | err3: | ||
158 | gpio_free(GPIO_NR_PALMTE2_LCD_POWER); | ||
159 | err2: | ||
160 | gpio_free(GPIO_NR_PALMTE2_BL_POWER); | ||
161 | err: | ||
162 | return ret; | ||
163 | } | 147 | } |
164 | 148 | ||
165 | static int palmte2_backlight_notify(struct device *dev, int brightness) | 149 | static int palmte2_backlight_notify(struct device *dev, int brightness) |
@@ -171,8 +155,7 @@ static int palmte2_backlight_notify(struct device *dev, int brightness) | |||
171 | 155 | ||
172 | static void palmte2_backlight_exit(struct device *dev) | 156 | static void palmte2_backlight_exit(struct device *dev) |
173 | { | 157 | { |
174 | gpio_free(GPIO_NR_PALMTE2_BL_POWER); | 158 | gpio_free_array(ARRAY_AND_SIZE(palmte_bl_gpios)); |
175 | gpio_free(GPIO_NR_PALMTE2_LCD_POWER); | ||
176 | } | 159 | } |
177 | 160 | ||
178 | static struct platform_pwm_backlight_data palmte2_backlight_data = { | 161 | static struct platform_pwm_backlight_data palmte2_backlight_data = { |
@@ -363,7 +346,7 @@ static void __init palmte2_init(void) | |||
363 | pxa_set_btuart_info(NULL); | 346 | pxa_set_btuart_info(NULL); |
364 | pxa_set_stuart_info(NULL); | 347 | pxa_set_stuart_info(NULL); |
365 | 348 | ||
366 | set_pxa_fb_info(&palmte2_lcd_screen); | 349 | pxa_set_fb_info(NULL, &palmte2_lcd_screen); |
367 | pxa_set_mci_info(&palmte2_mci_platform_data); | 350 | pxa_set_mci_info(&palmte2_mci_platform_data); |
368 | palmte2_udc_init(); | 351 | palmte2_udc_init(); |
369 | pxa_set_ac97_info(&palmte2_ac97_pdata); | 352 | pxa_set_ac97_info(&palmte2_ac97_pdata); |
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 3010193b081e..3b8a4f37dbbe 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/wm97xx.h> | 30 | #include <linux/wm97xx.h> |
31 | #include <linux/power_supply.h> | 31 | #include <linux/power_supply.h> |
32 | #include <linux/usb/gpio_vbus.h> | 32 | #include <linux/usb/gpio_vbus.h> |
33 | #include <linux/i2c-gpio.h> | ||
33 | 34 | ||
34 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
@@ -47,6 +48,9 @@ | |||
47 | #include <mach/palm27x.h> | 48 | #include <mach/palm27x.h> |
48 | 49 | ||
49 | #include <mach/pm.h> | 50 | #include <mach/pm.h> |
51 | #include <mach/camera.h> | ||
52 | |||
53 | #include <media/soc_camera.h> | ||
50 | 54 | ||
51 | #include "generic.h" | 55 | #include "generic.h" |
52 | #include "devices.h" | 56 | #include "devices.h" |
@@ -103,6 +107,28 @@ static unsigned long palmz72_pin_config[] __initdata = { | |||
103 | GPIO22_GPIO, /* LCD border color */ | 107 | GPIO22_GPIO, /* LCD border color */ |
104 | GPIO96_GPIO, /* lcd power */ | 108 | GPIO96_GPIO, /* lcd power */ |
105 | 109 | ||
110 | /* PXA Camera */ | ||
111 | GPIO81_CIF_DD_0, | ||
112 | GPIO48_CIF_DD_5, | ||
113 | GPIO50_CIF_DD_3, | ||
114 | GPIO51_CIF_DD_2, | ||
115 | GPIO52_CIF_DD_4, | ||
116 | GPIO53_CIF_MCLK, | ||
117 | GPIO54_CIF_PCLK, | ||
118 | GPIO55_CIF_DD_1, | ||
119 | GPIO84_CIF_FV, | ||
120 | GPIO85_CIF_LV, | ||
121 | GPIO93_CIF_DD_6, | ||
122 | GPIO108_CIF_DD_7, | ||
123 | |||
124 | GPIO56_GPIO, /* OV9640 Powerdown */ | ||
125 | GPIO57_GPIO, /* OV9640 Reset */ | ||
126 | GPIO91_GPIO, /* OV9640 Power */ | ||
127 | |||
128 | /* I2C */ | ||
129 | GPIO117_GPIO, /* I2C_SCL */ | ||
130 | GPIO118_GPIO, /* I2C_SDA */ | ||
131 | |||
106 | /* Misc. */ | 132 | /* Misc. */ |
107 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* power detect */ | 133 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* power detect */ |
108 | GPIO88_GPIO, /* green led */ | 134 | GPIO88_GPIO, /* green led */ |
@@ -254,6 +280,106 @@ device_initcall(palmz72_pm_init); | |||
254 | #endif | 280 | #endif |
255 | 281 | ||
256 | /****************************************************************************** | 282 | /****************************************************************************** |
283 | * SoC Camera | ||
284 | ******************************************************************************/ | ||
285 | #if defined(CONFIG_SOC_CAMERA_OV9640) || \ | ||
286 | defined(CONFIG_SOC_CAMERA_OV9640_MODULE) | ||
287 | static struct pxacamera_platform_data palmz72_pxacamera_platform_data = { | ||
288 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | | ||
289 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, | ||
290 | .mclk_10khz = 2600, | ||
291 | }; | ||
292 | |||
293 | /* Board I2C devices. */ | ||
294 | static struct i2c_board_info palmz72_i2c_device[] = { | ||
295 | { | ||
296 | I2C_BOARD_INFO("ov9640", 0x30), | ||
297 | } | ||
298 | }; | ||
299 | |||
300 | static int palmz72_camera_power(struct device *dev, int power) | ||
301 | { | ||
302 | gpio_set_value(GPIO_NR_PALMZ72_CAM_PWDN, !power); | ||
303 | mdelay(50); | ||
304 | return 0; | ||
305 | } | ||
306 | |||
307 | static int palmz72_camera_reset(struct device *dev) | ||
308 | { | ||
309 | gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 1); | ||
310 | mdelay(50); | ||
311 | gpio_set_value(GPIO_NR_PALMZ72_CAM_RESET, 0); | ||
312 | mdelay(50); | ||
313 | return 0; | ||
314 | } | ||
315 | |||
316 | static struct soc_camera_link palmz72_iclink = { | ||
317 | .bus_id = 0, /* Match id in pxa27x_device_camera in device.c */ | ||
318 | .board_info = &palmz72_i2c_device[0], | ||
319 | .i2c_adapter_id = 0, | ||
320 | .module_name = "ov96xx", | ||
321 | .power = &palmz72_camera_power, | ||
322 | .reset = &palmz72_camera_reset, | ||
323 | .flags = SOCAM_DATAWIDTH_8, | ||
324 | }; | ||
325 | |||
326 | static struct i2c_gpio_platform_data palmz72_i2c_bus_data = { | ||
327 | .sda_pin = 118, | ||
328 | .scl_pin = 117, | ||
329 | .udelay = 10, | ||
330 | .timeout = 100, | ||
331 | }; | ||
332 | |||
333 | static struct platform_device palmz72_i2c_bus_device = { | ||
334 | .name = "i2c-gpio", | ||
335 | .id = 0, /* we use this as a replacement for i2c-pxa */ | ||
336 | .dev = { | ||
337 | .platform_data = &palmz72_i2c_bus_data, | ||
338 | } | ||
339 | }; | ||
340 | |||
341 | static struct platform_device palmz72_camera = { | ||
342 | .name = "soc-camera-pdrv", | ||
343 | .id = -1, | ||
344 | .dev = { | ||
345 | .platform_data = &palmz72_iclink, | ||
346 | }, | ||
347 | }; | ||
348 | |||
349 | /* Here we request the camera GPIOs and configure them. We power up the camera | ||
350 | * module, deassert the reset pin, but put it into powerdown (low to no power | ||
351 | * consumption) mode. This allows us to later bring the module up fast. */ | ||
352 | static struct gpio palmz72_camera_gpios[] = { | ||
353 | { GPIO_NR_PALMZ72_CAM_POWER, GPIOF_INIT_HIGH,"Camera DVDD" }, | ||
354 | { GPIO_NR_PALMZ72_CAM_RESET, GPIOF_INIT_LOW, "Camera RESET" }, | ||
355 | { GPIO_NR_PALMZ72_CAM_PWDN, GPIOF_INIT_LOW, "Camera PWDN" }, | ||
356 | }; | ||
357 | |||
358 | static inline void __init palmz72_cam_gpio_init(void) | ||
359 | { | ||
360 | int ret; | ||
361 | |||
362 | ret = gpio_request_array(ARRAY_AND_SIZE(palmz72_camera_gpios)); | ||
363 | if (!ret) | ||
364 | gpio_free_array(ARRAY_AND_SIZE(palmz72_camera_gpios)); | ||
365 | else | ||
366 | printk(KERN_ERR "Camera GPIO init failed!\n"); | ||
367 | |||
368 | return; | ||
369 | } | ||
370 | |||
371 | static void __init palmz72_camera_init(void) | ||
372 | { | ||
373 | palmz72_cam_gpio_init(); | ||
374 | pxa_set_camera_info(&palmz72_pxacamera_platform_data); | ||
375 | platform_device_register(&palmz72_i2c_bus_device); | ||
376 | platform_device_register(&palmz72_camera); | ||
377 | } | ||
378 | #else | ||
379 | static inline void palmz72_camera_init(void) {} | ||
380 | #endif | ||
381 | |||
382 | /****************************************************************************** | ||
257 | * Machine init | 383 | * Machine init |
258 | ******************************************************************************/ | 384 | ******************************************************************************/ |
259 | static void __init palmz72_init(void) | 385 | static void __init palmz72_init(void) |
@@ -276,6 +402,7 @@ static void __init palmz72_init(void) | |||
276 | palm27x_pmic_init(); | 402 | palm27x_pmic_init(); |
277 | palmz72_kpc_init(); | 403 | palmz72_kpc_init(); |
278 | palmz72_leds_init(); | 404 | palmz72_leds_init(); |
405 | palmz72_camera_init(); | ||
279 | } | 406 | } |
280 | 407 | ||
281 | MACHINE_START(PALMZ72, "Palm Zire72") | 408 | MACHINE_START(PALMZ72, "Palm Zire72") |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 4d0120540124..6d5b7e062124 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -515,7 +515,7 @@ void __init pcm990_baseboard_init(void) | |||
515 | pcm990_init_irq(); | 515 | pcm990_init_irq(); |
516 | 516 | ||
517 | #ifndef CONFIG_PCM990_DISPLAY_NONE | 517 | #ifndef CONFIG_PCM990_DISPLAY_NONE |
518 | set_pxa_fb_info(&pcm990_fbinfo); | 518 | pxa_set_fb_info(NULL, &pcm990_fbinfo); |
519 | #endif | 519 | #endif |
520 | platform_device_register(&pcm990_backlight_device); | 520 | platform_device_register(&pcm990_backlight_device); |
521 | 521 | ||
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 35353af345d5..16d14fd79b4b 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -445,8 +445,7 @@ static void __init poodle_init(void) | |||
445 | if (ret) | 445 | if (ret) |
446 | pr_warning("poodle: Unable to register LoCoMo device\n"); | 446 | pr_warning("poodle: Unable to register LoCoMo device\n"); |
447 | 447 | ||
448 | set_pxa_fb_parent(&poodle_locomo_device.dev); | 448 | pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info); |
449 | set_pxa_fb_info(&poodle_fb_info); | ||
450 | pxa_set_udc_info(&udc_info); | 449 | pxa_set_udc_info(&udc_info); |
451 | pxa_set_mci_info(&poodle_mci_platform_data); | 450 | pxa_set_mci_info(&poodle_mci_platform_data); |
452 | pxa_set_ficp_info(&poodle_ficp_platform_data); | 451 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 6bde5956358d..a4af8c52d7ee 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -285,7 +285,7 @@ static inline void pxa25x_init_pm(void) {} | |||
285 | 285 | ||
286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) | 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) |
287 | { | 287 | { |
288 | int gpio = IRQ_TO_GPIO(d->irq); | 288 | int gpio = irq_to_gpio(d->irq); |
289 | uint32_t mask = 0; | 289 | uint32_t mask = 0; |
290 | 290 | ||
291 | if (gpio >= 0 && gpio < 85) | 291 | if (gpio >= 0 && gpio < 85) |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 1cb5d0f9723f..909756eaf4b7 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -345,7 +345,7 @@ static inline void pxa27x_init_pm(void) {} | |||
345 | */ | 345 | */ |
346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) | 346 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) |
347 | { | 347 | { |
348 | int gpio = IRQ_TO_GPIO(d->irq); | 348 | int gpio = irq_to_gpio(d->irq); |
349 | uint32_t mask; | 349 | uint32_t mask; |
350 | 350 | ||
351 | if (gpio >= 0 && gpio < 128) | 351 | if (gpio >= 0 && gpio < 128) |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 47094188e029..cd1861351f75 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -597,7 +597,7 @@ static void __init raumfeld_lcd_init(void) | |||
597 | { | 597 | { |
598 | int ret; | 598 | int ret; |
599 | 599 | ||
600 | set_pxa_fb_info(&raumfeld_sharp_lcd_info); | 600 | pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); |
601 | 601 | ||
602 | /* Earlier devices had the backlight regulator controlled | 602 | /* Earlier devices had the backlight regulator controlled |
603 | * via PWM, later versions use another controller for that */ | 603 | * via PWM, later versions use another controller for that */ |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index eb83c89428ef..fee97a935122 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -473,7 +473,7 @@ static struct pxafb_mach_info saar_lcd_info = { | |||
473 | 473 | ||
474 | static void __init saar_init_lcd(void) | 474 | static void __init saar_init_lcd(void) |
475 | { | 475 | { |
476 | set_pxa_fb_info(&saar_lcd_info); | 476 | pxa_set_fb_info(NULL, &saar_lcd_info); |
477 | } | 477 | } |
478 | #else | 478 | #else |
479 | static inline void saar_init_lcd(void) {} | 479 | static inline void saar_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 38e2c0912b9a..01c576963e94 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -724,7 +724,7 @@ static struct pxafb_mach_info spitz_pxafb_info = { | |||
724 | 724 | ||
725 | static void __init spitz_lcd_init(void) | 725 | static void __init spitz_lcd_init(void) |
726 | { | 726 | { |
727 | set_pxa_fb_info(&spitz_pxafb_info); | 727 | pxa_set_fb_info(NULL, &spitz_pxafb_info); |
728 | } | 728 | } |
729 | #else | 729 | #else |
730 | static inline void spitz_lcd_init(void) {} | 730 | static inline void spitz_lcd_init(void) {} |
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index 9cecf8366db8..53d4a472b699 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c | |||
@@ -466,7 +466,7 @@ static void __init tavorevb_init_lcd(void) | |||
466 | { | 466 | { |
467 | platform_device_register(&tavorevb_backlight_devices[0]); | 467 | platform_device_register(&tavorevb_backlight_devices[0]); |
468 | platform_device_register(&tavorevb_backlight_devices[1]); | 468 | platform_device_register(&tavorevb_backlight_devices[1]); |
469 | set_pxa_fb_info(&tavorevb_lcd_info); | 469 | pxa_set_fb_info(NULL, &tavorevb_lcd_info); |
470 | } | 470 | } |
471 | #else | 471 | #else |
472 | static inline void tavorevb_init_lcd(void) {} | 472 | static inline void tavorevb_init_lcd(void) {} |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index e7f64d9b4f2d..428da3ff33a5 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -100,7 +100,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev) | |||
100 | static struct clock_event_device ckevt_pxa_osmr0 = { | 100 | static struct clock_event_device ckevt_pxa_osmr0 = { |
101 | .name = "osmr0", | 101 | .name = "osmr0", |
102 | .features = CLOCK_EVT_FEAT_ONESHOT, | 102 | .features = CLOCK_EVT_FEAT_ONESHOT, |
103 | .shift = 32, | ||
104 | .rating = 200, | 103 | .rating = 200, |
105 | .set_next_event = pxa_osmr0_set_next_event, | 104 | .set_next_event = pxa_osmr0_set_next_event, |
106 | .set_mode = pxa_osmr0_set_mode, | 105 | .set_mode = pxa_osmr0_set_mode, |
@@ -135,8 +134,8 @@ static void __init pxa_timer_init(void) | |||
135 | 134 | ||
136 | init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); | 135 | init_sched_clock(&cd, pxa_update_sched_clock, 32, clock_tick_rate); |
137 | 136 | ||
138 | ckevt_pxa_osmr0.mult = | 137 | clocksource_calc_mult_shift(&cksrc_pxa_oscr0, clock_tick_rate, 4); |
139 | div_sc(clock_tick_rate, NSEC_PER_SEC, ckevt_pxa_osmr0.shift); | 138 | clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4); |
140 | ckevt_pxa_osmr0.max_delta_ns = | 139 | ckevt_pxa_osmr0.max_delta_ns = |
141 | clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); | 140 | clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0); |
142 | ckevt_pxa_osmr0.min_delta_ns = | 141 | ckevt_pxa_osmr0.min_delta_ns = |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 5ad3807af334..5fa145778e7d 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spi/pxa2xx_spi.h> | 35 | #include <linux/spi/pxa2xx_spi.h> |
36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
37 | #include <linux/i2c/pxa-i2c.h> | 37 | #include <linux/i2c/pxa-i2c.h> |
38 | #include <linux/usb/gpio_vbus.h> | ||
38 | 39 | ||
39 | #include <asm/setup.h> | 40 | #include <asm/setup.h> |
40 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
@@ -240,12 +241,20 @@ static struct scoop_pcmcia_config tosa_pcmcia_config = { | |||
240 | /* | 241 | /* |
241 | * USB Device Controller | 242 | * USB Device Controller |
242 | */ | 243 | */ |
243 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | 244 | static struct gpio_vbus_mach_info tosa_udc_info = { |
244 | .gpio_pullup = TOSA_GPIO_USB_PULLUP, | 245 | .gpio_pullup = TOSA_GPIO_USB_PULLUP, |
245 | .gpio_vbus = TOSA_GPIO_USB_IN, | 246 | .gpio_vbus = TOSA_GPIO_USB_IN, |
246 | .gpio_vbus_inverted = 1, | 247 | .gpio_vbus_inverted = 1, |
247 | }; | 248 | }; |
248 | 249 | ||
250 | static struct platform_device tosa_gpio_vbus = { | ||
251 | .name = "gpio-vbus", | ||
252 | .id = -1, | ||
253 | .dev = { | ||
254 | .platform_data = &tosa_udc_info, | ||
255 | }, | ||
256 | }; | ||
257 | |||
249 | /* | 258 | /* |
250 | * MMC/SD Device | 259 | * MMC/SD Device |
251 | */ | 260 | */ |
@@ -891,6 +900,7 @@ static struct platform_device *devices[] __initdata = { | |||
891 | &tosa_bt_device, | 900 | &tosa_bt_device, |
892 | &sharpsl_rom_device, | 901 | &sharpsl_rom_device, |
893 | &wm9712_device, | 902 | &wm9712_device, |
903 | &tosa_gpio_vbus, | ||
894 | }; | 904 | }; |
895 | 905 | ||
896 | static void tosa_poweroff(void) | 906 | static void tosa_poweroff(void) |
@@ -937,7 +947,6 @@ static void __init tosa_init(void) | |||
937 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); | 947 | dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); |
938 | 948 | ||
939 | pxa_set_mci_info(&tosa_mci_platform_data); | 949 | pxa_set_mci_info(&tosa_mci_platform_data); |
940 | pxa_set_udc_info(&udc_info); | ||
941 | pxa_set_ficp_info(&tosa_ficp_platform_data); | 950 | pxa_set_ficp_info(&tosa_ficp_platform_data); |
942 | pxa_set_i2c_info(NULL); | 951 | pxa_set_i2c_info(NULL); |
943 | pxa_set_ac97_info(NULL); | 952 | pxa_set_ac97_info(NULL); |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 857bb2e63486..b9cfbebdfe9c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
@@ -516,9 +516,9 @@ static void __init trizeps4_init(void) | |||
516 | pxa_set_stuart_info(NULL); | 516 | pxa_set_stuart_info(NULL); |
517 | 517 | ||
518 | if (0) /* dont know how to determine LCD */ | 518 | if (0) /* dont know how to determine LCD */ |
519 | set_pxa_fb_info(&sharp_lcd); | 519 | pxa_set_fb_info(NULL, &sharp_lcd); |
520 | else | 520 | else |
521 | set_pxa_fb_info(&toshiba_lcd); | 521 | pxa_set_fb_info(NULL, &toshiba_lcd); |
522 | 522 | ||
523 | pxa_set_mci_info(&trizeps4_mci_platform_data); | 523 | pxa_set_mci_info(&trizeps4_mci_platform_data); |
524 | #ifndef STATUS_LEDS_ON_STUART_PINS | 524 | #ifndef STATUS_LEDS_ON_STUART_PINS |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index aa70331c0805..b523f119e0f0 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -932,7 +932,7 @@ static void __init viper_init(void) | |||
932 | /* Wake-up serial console */ | 932 | /* Wake-up serial console */ |
933 | viper_init_serial_gpio(); | 933 | viper_init_serial_gpio(); |
934 | 934 | ||
935 | set_pxa_fb_info(&fb_info); | 935 | pxa_set_fb_info(NULL, &fb_info); |
936 | 936 | ||
937 | /* v1 hardware cannot use the datacs line */ | 937 | /* v1 hardware cannot use the datacs line */ |
938 | version = viper_hw_version(); | 938 | version = viper_hw_version(); |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index e709fd459268..f71d377c8640 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -572,7 +572,7 @@ static void __init vpac270_lcd_init(void) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power; | 574 | vpac270_lcd_screen.pxafb_lcd_power = vpac270_lcd_power; |
575 | set_pxa_fb_info(&vpac270_lcd_screen); | 575 | pxa_set_fb_info(NULL, &vpac270_lcd_screen); |
576 | return; | 576 | return; |
577 | 577 | ||
578 | err2: | 578 | err2: |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index aaf883754ef4..fbe9e02e2f9f 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -91,13 +91,13 @@ static unsigned long z2_pin_config[] = { | |||
91 | GPIO47_STUART_TXD, | 91 | GPIO47_STUART_TXD, |
92 | 92 | ||
93 | /* Keypad */ | 93 | /* Keypad */ |
94 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 94 | GPIO100_KP_MKIN_0, |
95 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 95 | GPIO101_KP_MKIN_1, |
96 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 96 | GPIO102_KP_MKIN_2, |
97 | GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | 97 | GPIO34_KP_MKIN_3, |
98 | GPIO38_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | 98 | GPIO38_KP_MKIN_4, |
99 | GPIO16_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, | 99 | GPIO16_KP_MKIN_5, |
100 | GPIO17_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH, | 100 | GPIO17_KP_MKIN_6, |
101 | GPIO103_KP_MKOUT_0, | 101 | GPIO103_KP_MKOUT_0, |
102 | GPIO104_KP_MKOUT_1, | 102 | GPIO104_KP_MKOUT_1, |
103 | GPIO105_KP_MKOUT_2, | 103 | GPIO105_KP_MKOUT_2, |
@@ -138,8 +138,7 @@ static unsigned long z2_pin_config[] = { | |||
138 | GPIO1_GPIO, /* Power button */ | 138 | GPIO1_GPIO, /* Power button */ |
139 | GPIO37_GPIO, /* Headphone detect */ | 139 | GPIO37_GPIO, /* Headphone detect */ |
140 | GPIO98_GPIO, /* Lid switch */ | 140 | GPIO98_GPIO, /* Lid switch */ |
141 | GPIO14_GPIO, /* WiFi Reset */ | 141 | GPIO14_GPIO, /* WiFi Power */ |
142 | GPIO15_GPIO, /* WiFi Power */ | ||
143 | GPIO24_GPIO, /* WiFi CS */ | 142 | GPIO24_GPIO, /* WiFi CS */ |
144 | GPIO36_GPIO, /* WiFi IRQ */ | 143 | GPIO36_GPIO, /* WiFi IRQ */ |
145 | GPIO88_GPIO, /* LCD CS */ | 144 | GPIO88_GPIO, /* LCD CS */ |
@@ -204,7 +203,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = { | |||
204 | /* Keypad Backlight */ | 203 | /* Keypad Backlight */ |
205 | .pwm_id = 1, | 204 | .pwm_id = 1, |
206 | .max_brightness = 1023, | 205 | .max_brightness = 1023, |
207 | .dft_brightness = 512, | 206 | .dft_brightness = 0, |
208 | .pwm_period_ns = 1260320, | 207 | .pwm_period_ns = 1260320, |
209 | }, | 208 | }, |
210 | [1] = { | 209 | [1] = { |
@@ -271,7 +270,7 @@ static struct pxafb_mach_info z2_lcd_screen = { | |||
271 | 270 | ||
272 | static void __init z2_lcd_init(void) | 271 | static void __init z2_lcd_init(void) |
273 | { | 272 | { |
274 | set_pxa_fb_info(&z2_lcd_screen); | 273 | pxa_set_fb_info(NULL, &z2_lcd_screen); |
275 | } | 274 | } |
276 | #else | 275 | #else |
277 | static inline void z2_lcd_init(void) {} | 276 | static inline void z2_lcd_init(void) {} |
@@ -309,12 +308,12 @@ struct gpio_led z2_gpio_leds[] = { | |||
309 | .active_low = 1, | 308 | .active_low = 1, |
310 | }, { | 309 | }, { |
311 | .name = "z2:green:charged", | 310 | .name = "z2:green:charged", |
312 | .default_trigger = "none", | 311 | .default_trigger = "mmc0", |
313 | .gpio = GPIO85_ZIPITZ2_LED_CHARGED, | 312 | .gpio = GPIO85_ZIPITZ2_LED_CHARGED, |
314 | .active_low = 1, | 313 | .active_low = 1, |
315 | }, { | 314 | }, { |
316 | .name = "z2:amber:charging", | 315 | .name = "z2:amber:charging", |
317 | .default_trigger = "none", | 316 | .default_trigger = "Z2-charging-or-full", |
318 | .gpio = GPIO83_ZIPITZ2_LED_CHARGING, | 317 | .gpio = GPIO83_ZIPITZ2_LED_CHARGING, |
319 | .active_low = 1, | 318 | .active_low = 1, |
320 | }, | 319 | }, |
@@ -427,8 +426,22 @@ static inline void z2_mkp_init(void) {} | |||
427 | ******************************************************************************/ | 426 | ******************************************************************************/ |
428 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 427 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
429 | static struct gpio_keys_button z2_pxa_buttons[] = { | 428 | static struct gpio_keys_button z2_pxa_buttons[] = { |
430 | {KEY_POWER, GPIO1_ZIPITZ2_POWER_BUTTON, 0, "Power Button" }, | 429 | { |
431 | {KEY_CLOSE, GPIO98_ZIPITZ2_LID_BUTTON, 0, "Lid Button" }, | 430 | .code = KEY_POWER, |
431 | .gpio = GPIO1_ZIPITZ2_POWER_BUTTON, | ||
432 | .active_low = 0, | ||
433 | .desc = "Power Button", | ||
434 | .wakeup = 1, | ||
435 | .type = EV_KEY, | ||
436 | }, | ||
437 | { | ||
438 | .code = SW_LID, | ||
439 | .gpio = GPIO98_ZIPITZ2_LID_BUTTON, | ||
440 | .active_low = 1, | ||
441 | .desc = "Lid Switch", | ||
442 | .wakeup = 0, | ||
443 | .type = EV_SW, | ||
444 | }, | ||
432 | }; | 445 | }; |
433 | 446 | ||
434 | static struct gpio_keys_platform_data z2_pxa_keys_data = { | 447 | static struct gpio_keys_platform_data z2_pxa_keys_data = { |
@@ -461,9 +474,9 @@ static struct z2_battery_info batt_chip_info = { | |||
461 | .batt_I2C_addr = 0x55, | 474 | .batt_I2C_addr = 0x55, |
462 | .batt_I2C_reg = 2, | 475 | .batt_I2C_reg = 2, |
463 | .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT, | 476 | .charge_gpio = GPIO0_ZIPITZ2_AC_DETECT, |
464 | .min_voltage = 2400000, | 477 | .min_voltage = 3475000, |
465 | .max_voltage = 3700000, | 478 | .max_voltage = 4190000, |
466 | .batt_div = 69, | 479 | .batt_div = 59, |
467 | .batt_mult = 1000000, | 480 | .batt_mult = 1000000, |
468 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, | 481 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, |
469 | .batt_name = "Z2", | 482 | .batt_name = "Z2", |
@@ -497,26 +510,16 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
497 | { | 510 | { |
498 | int ret = 0; | 511 | int ret = 0; |
499 | 512 | ||
500 | ret = gpio_request(GPIO15_ZIPITZ2_WIFI_POWER, "WiFi Power"); | 513 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_POWER, "WiFi Power"); |
501 | if (ret) | 514 | if (ret) |
502 | goto err; | 515 | goto err; |
503 | 516 | ||
504 | ret = gpio_direction_output(GPIO15_ZIPITZ2_WIFI_POWER, 1); | 517 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_POWER, 1); |
505 | if (ret) | 518 | if (ret) |
506 | goto err2; | 519 | goto err2; |
507 | 520 | ||
508 | ret = gpio_request(GPIO14_ZIPITZ2_WIFI_RESET, "WiFi Reset"); | 521 | /* Wait until card is powered on */ |
509 | if (ret) | ||
510 | goto err2; | ||
511 | |||
512 | ret = gpio_direction_output(GPIO14_ZIPITZ2_WIFI_RESET, 0); | ||
513 | if (ret) | ||
514 | goto err3; | ||
515 | |||
516 | /* Reset the card */ | ||
517 | mdelay(180); | 522 | mdelay(180); |
518 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 1); | ||
519 | mdelay(20); | ||
520 | 523 | ||
521 | spi->bits_per_word = 16; | 524 | spi->bits_per_word = 16; |
522 | spi->mode = SPI_MODE_2, | 525 | spi->mode = SPI_MODE_2, |
@@ -525,22 +528,18 @@ static int z2_lbs_spi_setup(struct spi_device *spi) | |||
525 | 528 | ||
526 | return 0; | 529 | return 0; |
527 | 530 | ||
528 | err3: | ||
529 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
530 | err2: | 531 | err2: |
531 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | 532 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
532 | err: | 533 | err: |
533 | return ret; | 534 | return ret; |
534 | }; | 535 | }; |
535 | 536 | ||
536 | static int z2_lbs_spi_teardown(struct spi_device *spi) | 537 | static int z2_lbs_spi_teardown(struct spi_device *spi) |
537 | { | 538 | { |
538 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_RESET, 0); | 539 | gpio_set_value(GPIO14_ZIPITZ2_WIFI_POWER, 0); |
539 | gpio_set_value(GPIO15_ZIPITZ2_WIFI_POWER, 0); | 540 | gpio_free(GPIO14_ZIPITZ2_WIFI_POWER); |
540 | gpio_free(GPIO14_ZIPITZ2_WIFI_RESET); | ||
541 | gpio_free(GPIO15_ZIPITZ2_WIFI_POWER); | ||
542 | return 0; | ||
543 | 541 | ||
542 | return 0; | ||
544 | }; | 543 | }; |
545 | 544 | ||
546 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { | 545 | static struct pxa2xx_spi_chip z2_lbs_chip_info = { |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 139aa7f2ed90..00363c7ac182 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -847,7 +847,7 @@ static void __init zeus_init(void) | |||
847 | if (zeus_setup_fb_gpios()) | 847 | if (zeus_setup_fb_gpios()) |
848 | pr_err("Failed to setup fb gpios\n"); | 848 | pr_err("Failed to setup fb gpios\n"); |
849 | else | 849 | else |
850 | set_pxa_fb_info(&zeus_fb_info); | 850 | pxa_set_fb_info(NULL, &zeus_fb_info); |
851 | 851 | ||
852 | pxa_set_mci_info(&zeus_mci_platform_data); | 852 | pxa_set_mci_info(&zeus_mci_platform_data); |
853 | pxa_set_udc_info(&zeus_udc_info); | 853 | pxa_set_udc_info(&zeus_udc_info); |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index a4c784aab764..5821185f77ab 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -208,7 +208,7 @@ static void __init zylonite_init_lcd(void) | |||
208 | platform_device_register(&zylonite_backlight_device); | 208 | platform_device_register(&zylonite_backlight_device); |
209 | 209 | ||
210 | if (lcd_id & 0x20) { | 210 | if (lcd_id & 0x20) { |
211 | set_pxa_fb_info(&zylonite_sharp_lcd_info); | 211 | pxa_set_fb_info(NULL, &zylonite_sharp_lcd_info); |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | 214 | ||
@@ -220,7 +220,7 @@ static void __init zylonite_init_lcd(void) | |||
220 | else | 220 | else |
221 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode; | 221 | zylonite_toshiba_lcd_info.modes = &toshiba_ltm04c380k_mode; |
222 | 222 | ||
223 | set_pxa_fb_info(&zylonite_toshiba_lcd_info); | 223 | pxa_set_fb_info(NULL, &zylonite_toshiba_lcd_info); |
224 | } | 224 | } |
225 | #else | 225 | #else |
226 | static inline void zylonite_init_lcd(void) {} | 226 | static inline void zylonite_init_lcd(void) {} |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 2ecc1d94284e..10e75faba4c9 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -348,7 +348,7 @@ static void __init gic_init_irq(void) | |||
348 | 348 | ||
349 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB | 349 | #ifndef CONFIG_REALVIEW_EB_ARM11MP_REVB |
350 | /* board GIC, secondary */ | 350 | /* board GIC, secondary */ |
351 | gic_init(1, 64, __io_address(REALVIEW_EB_GIC_DIST_BASE), | 351 | gic_init(1, 96, __io_address(REALVIEW_EB_GIC_DIST_BASE), |
352 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); | 352 | __io_address(REALVIEW_EB_GIC_CPU_BASE)); |
353 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); | 353 | gic_cascade_irq(1, IRQ_EB11MP_EB_IRQ1); |
354 | #endif | 354 | #endif |
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index cf68136cc668..b2b2a5bb275e 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ | 19 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ |
20 | 20 | ||
21 | /* We use `virtual` dma channels to hide the fact we have only a limited | 21 | /* We use `virtual` dma channels to hide the fact we have only a limited |
22 | * number of DMA channels, and not of all of them (dependant on the device) | 22 | * number of DMA channels, and not of all of them (dependent on the device) |
23 | * can be attached to any DMA source. We therefore let the DMA core handle | 23 | * can be attached to any DMA source. We therefore let the DMA core handle |
24 | * the allocation of hardware channels to clients. | 24 | * the allocation of hardware channels to clients. |
25 | */ | 25 | */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-mem.h b/arch/arm/mach-s3c2410/include/mach/regs-mem.h index 7f7c52947963..988a6863e54b 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-mem.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-mem.h | |||
@@ -101,7 +101,7 @@ | |||
101 | #define S3C2410_BANKCON_PMC16 (0x03) | 101 | #define S3C2410_BANKCON_PMC16 (0x03) |
102 | 102 | ||
103 | /* bank configurations for banks 0..7, note banks | 103 | /* bank configurations for banks 0..7, note banks |
104 | * 6 and 7 have differnt configurations depending on | 104 | * 6 and 7 have different configurations depending on |
105 | * the memory type bits */ | 105 | * the memory type bits */ |
106 | 106 | ||
107 | #define S3C2410_BANKCON_Tacp2 (0x0 << 2) | 107 | #define S3C2410_BANKCON_Tacp2 (0x0 << 2) |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 66f44440d5d3..079dcaa602d3 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -252,7 +252,7 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { | |||
252 | .def_trigger = "", | 252 | .def_trigger = "", |
253 | }; | 253 | }; |
254 | 254 | ||
255 | /* This is the blue LED on the device. Originaly used to indicate GPS activity | 255 | /* This is the blue LED on the device. Originally used to indicate GPS activity |
256 | * by flashing. */ | 256 | * by flashing. */ |
257 | static struct s3c24xx_led_platdata n35_blue_led_pdata = { | 257 | static struct s3c24xx_led_platdata n35_blue_led_pdata = { |
258 | .name = "blue_led", | 258 | .name = "blue_led", |
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 0db2411ef4bb..716662008ce2 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c | |||
@@ -409,6 +409,10 @@ struct platform_device s3c24xx_pwm_device = { | |||
409 | .num_resources = 0, | 409 | .num_resources = 0, |
410 | }; | 410 | }; |
411 | 411 | ||
412 | static struct platform_device gta02_dfbmcs320_device = { | ||
413 | .name = "dfbmcs320", | ||
414 | }; | ||
415 | |||
412 | static struct i2c_board_info gta02_i2c_devs[] __initdata = { | 416 | static struct i2c_board_info gta02_i2c_devs[] __initdata = { |
413 | { | 417 | { |
414 | I2C_BOARD_INFO("pcf50633", 0x73), | 418 | I2C_BOARD_INFO("pcf50633", 0x73), |
@@ -523,6 +527,7 @@ static struct platform_device *gta02_devices[] __initdata = { | |||
523 | &s3c_device_iis, | 527 | &s3c_device_iis, |
524 | &samsung_asoc_dma, | 528 | &samsung_asoc_dma, |
525 | &s3c_device_i2c0, | 529 | &s3c_device_i2c0, |
530 | >a02_dfbmcs320_device, | ||
526 | >a02_buttons_device, | 531 | >a02_buttons_device, |
527 | &s3c_device_adc, | 532 | &s3c_device_adc, |
528 | &s3c_device_ts, | 533 | &s3c_device_ts, |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index dfedc9c9e005..dd3120df09fe 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -155,7 +155,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = { | |||
155 | * the same timings, however, anything smaller than 1024x768 | 155 | * the same timings, however, anything smaller than 1024x768 |
156 | * will only be displayed in the top left corner of a 1024x768 | 156 | * will only be displayed in the top left corner of a 1024x768 |
157 | * XGA output unless you add optional dip switches to the shield. | 157 | * XGA output unless you add optional dip switches to the shield. |
158 | * Therefore timings for other resolutions have been ommited here. | 158 | * Therefore timings for other resolutions have been omitted here. |
159 | */ | 159 | */ |
160 | [2] = { | 160 | [2] = { |
161 | _LCD_DECLARE( | 161 | _LCD_DECLARE( |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index c35585cf8c4f..b197171e7d03 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -315,7 +315,7 @@ int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) | |||
315 | case S3C2410_DMAOP_FLUSH: | 315 | case S3C2410_DMAOP_FLUSH: |
316 | return s3c64xx_dma_flush(chan); | 316 | return s3c64xx_dma_flush(chan); |
317 | 317 | ||
318 | /* belive PAUSE/RESUME are no-ops */ | 318 | /* believe PAUSE/RESUME are no-ops */ |
319 | case S3C2410_DMAOP_PAUSE: | 319 | case S3C2410_DMAOP_PAUSE: |
320 | case S3C2410_DMAOP_RESUME: | 320 | case S3C2410_DMAOP_RESUME: |
321 | case S3C2410_DMAOP_STARTED: | 321 | case S3C2410_DMAOP_STARTED: |
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-fb.h b/arch/arm/mach-s5pc100/include/mach/regs-fb.h index 4be4cc9abf75..07aa4d6054fe 100644 --- a/arch/arm/mach-s5pc100/include/mach/regs-fb.h +++ b/arch/arm/mach-s5pc100/include/mach/regs-fb.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #define WPALCON_H (0x19c) | 29 | #define WPALCON_H (0x19c) |
30 | #define WPALCON_L (0x1a0) | 30 | #define WPALCON_L (0x1a0) |
31 | 31 | ||
32 | /* Pallete contro for WPAL0 and WPAL1 is the same as in S3C64xx, but | 32 | /* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but |
33 | * different for WPAL2-4 | 33 | * different for WPAL2-4 |
34 | */ | 34 | */ |
35 | /* In WPALCON_L (aka WPALCON) */ | 35 | /* In WPALCON_L (aka WPALCON) */ |
diff --git a/arch/arm/mach-s5pc100/setup-sdhci.c b/arch/arm/mach-s5pc100/setup-sdhci.c index f16946e456e9..be25879bb2ee 100644 --- a/arch/arm/mach-s5pc100/setup-sdhci.c +++ b/arch/arm/mach-s5pc100/setup-sdhci.c | |||
@@ -40,7 +40,7 @@ void s5pc100_setup_sdhci0_cfg_card(struct platform_device *dev, | |||
40 | { | 40 | { |
41 | u32 ctrl2, ctrl3; | 41 | u32 ctrl2, ctrl3; |
42 | 42 | ||
43 | /* don't need to alter anything acording to card-type */ | 43 | /* don't need to alter anything according to card-type */ |
44 | 44 | ||
45 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | 45 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); |
46 | 46 | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h index 1f4b595534c2..a5a1e331f8ed 100644 --- a/arch/arm/mach-s5pv210/include/mach/gpio.h +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
20 | 20 | ||
21 | /* Practically, GPIO banks upto MP03 are the configurable gpio banks */ | 21 | /* Practically, GPIO banks up to MP03 are the configurable gpio banks */ |
22 | 22 | ||
23 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
24 | #define S5PV210_GPIO_A0_NR (8) | 24 | #define S5PV210_GPIO_A0_NR (8) |
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c index 746777d56df9..3e3ac05bb7b1 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c +++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c | |||
@@ -32,10 +32,10 @@ void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | |||
32 | 32 | ||
33 | switch (width) { | 33 | switch (width) { |
34 | case 8: | 34 | case 8: |
35 | /* GPG1[3:6] special-funtion 3 */ | 35 | /* GPG1[3:6] special-function 3 */ |
36 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); | 36 | s3c_gpio_cfgrange_nopull(S5PV210_GPG1(3), 4, S3C_GPIO_SFN(3)); |
37 | case 4: | 37 | case 4: |
38 | /* GPG0[3:6] special-funtion 2 */ | 38 | /* GPG0[3:6] special-function 2 */ |
39 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); | 39 | s3c_gpio_cfgrange_nopull(S5PV210_GPG0(3), 4, S3C_GPIO_SFN(2)); |
40 | default: | 40 | default: |
41 | break; | 41 | break; |
diff --git a/arch/arm/mach-s5pv210/setup-sdhci.c b/arch/arm/mach-s5pv210/setup-sdhci.c index c32e202731c1..a83b6c909f6b 100644 --- a/arch/arm/mach-s5pv210/setup-sdhci.c +++ b/arch/arm/mach-s5pv210/setup-sdhci.c | |||
@@ -38,7 +38,7 @@ void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev, | |||
38 | { | 38 | { |
39 | u32 ctrl2, ctrl3; | 39 | u32 ctrl2, ctrl3; |
40 | 40 | ||
41 | /* don't need to alter anything acording to card-type */ | 41 | /* don't need to alter anything according to card-type */ |
42 | 42 | ||
43 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | 43 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); |
44 | 44 | ||
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile index e697691eed28..41252d22e659 100644 --- a/arch/arm/mach-sa1100/Makefile +++ b/arch/arm/mach-sa1100/Makefile | |||
@@ -50,7 +50,7 @@ led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o | |||
50 | # LEDs support | 50 | # LEDs support |
51 | obj-$(CONFIG_LEDS) += $(led-y) | 51 | obj-$(CONFIG_LEDS) += $(led-y) |
52 | 52 | ||
53 | # Miscelaneous functions | 53 | # Miscellaneous functions |
54 | obj-$(CONFIG_PM) += pm.o sleep.o | 54 | obj-$(CONFIG_PM) += pm.o sleep.o |
55 | obj-$(CONFIG_SA1100_SSP) += ssp.o | 55 | obj-$(CONFIG_SA1100_SSP) += ssp.o |
56 | 56 | ||
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 07d4e8ba3719..aaa8acf76b7b 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -68,7 +68,7 @@ | |||
68 | * clock change in ROM and jump to that code from the kernel. The main | 68 | * clock change in ROM and jump to that code from the kernel. The main |
69 | * disadvantage is that the ROM has to be modified, which is not | 69 | * disadvantage is that the ROM has to be modified, which is not |
70 | * possible on all SA-1100 platforms. Another disadvantage is that | 70 | * possible on all SA-1100 platforms. Another disadvantage is that |
71 | * jumping to ROM makes clock switching unecessary complicated. | 71 | * jumping to ROM makes clock switching unnecessary complicated. |
72 | * | 72 | * |
73 | * The idea behind this driver is that the memory configuration can be | 73 | * The idea behind this driver is that the memory configuration can be |
74 | * changed while running from DRAM (even with interrupts turned on!) | 74 | * changed while running from DRAM (even with interrupts turned on!) |
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1100.h b/arch/arm/mach-sa1100/include/mach/SA-1100.h index 4f7ea012e1e5..bae8296f5dbf 100644 --- a/arch/arm/mach-sa1100/include/mach/SA-1100.h +++ b/arch/arm/mach-sa1100/include/mach/SA-1100.h | |||
@@ -1794,7 +1794,7 @@ | |||
1794 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ | 1794 | (DDAR_DevRd + DDAR_Brst4 + DDAR_16BitDev + \ |
1795 | DDAR_Ser4SSPRc + DDAR_DevAdd (__PREG(Ser4SSDR))) | 1795 | DDAR_Ser4SSPRc + DDAR_DevAdd (__PREG(Ser4SSDR))) |
1796 | 1796 | ||
1797 | #define DCSR_RUN 0x00000001 /* DMA RUNing */ | 1797 | #define DCSR_RUN 0x00000001 /* DMA running */ |
1798 | #define DCSR_IE 0x00000002 /* DMA Interrupt Enable */ | 1798 | #define DCSR_IE 0x00000002 /* DMA Interrupt Enable */ |
1799 | #define DCSR_ERROR 0x00000004 /* DMA ERROR */ | 1799 | #define DCSR_ERROR 0x00000004 /* DMA ERROR */ |
1800 | #define DCSR_DONEA 0x00000008 /* DONE DMA transfer buffer A */ | 1800 | #define DCSR_DONEA 0x00000008 /* DONE DMA transfer buffer A */ |
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index 9d490c66891c..f50b00bd18a0 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
@@ -29,7 +29,7 @@ static unsigned long jornada_ssp_flags; | |||
29 | /** | 29 | /** |
30 | * jornada_ssp_reverse - reverses input byte | 30 | * jornada_ssp_reverse - reverses input byte |
31 | * | 31 | * |
32 | * we need to reverse all data we recieve from the mcu due to its physical location | 32 | * we need to reverse all data we receive from the mcu due to its physical location |
33 | * returns : 01110111 -> 11101110 | 33 | * returns : 01110111 -> 11101110 |
34 | */ | 34 | */ |
35 | u8 inline jornada_ssp_reverse(u8 byte) | 35 | u8 inline jornada_ssp_reverse(u8 byte) |
@@ -179,7 +179,7 @@ static int __devinit jornada_ssp_probe(struct platform_device *dev) | |||
179 | 179 | ||
180 | static int jornada_ssp_remove(struct platform_device *dev) | 180 | static int jornada_ssp_remove(struct platform_device *dev) |
181 | { | 181 | { |
182 | /* Note that this doesnt actually remove the driver, since theres nothing to remove | 182 | /* Note that this doesn't actually remove the driver, since theres nothing to remove |
183 | * It just makes sure everything is turned off */ | 183 | * It just makes sure everything is turned off */ |
184 | GPSR = GPIO_GPIO25; | 184 | GPSR = GPIO_GPIO25; |
185 | ssp_exit(); | 185 | ssp_exit(); |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 783b66fa95fb..1e35fa976d64 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -947,7 +947,7 @@ static struct platform_device *ap4evb_devices[] __initdata = { | |||
947 | &ap4evb_camera, | 947 | &ap4evb_camera, |
948 | }; | 948 | }; |
949 | 949 | ||
950 | static int __init hdmi_init_pm_clock(void) | 950 | static void __init hdmi_init_pm_clock(void) |
951 | { | 951 | { |
952 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); | 952 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); |
953 | int ret; | 953 | int ret; |
@@ -988,20 +988,15 @@ static int __init hdmi_init_pm_clock(void) | |||
988 | pr_debug("PLLC2 set frequency %lu\n", rate); | 988 | pr_debug("PLLC2 set frequency %lu\n", rate); |
989 | 989 | ||
990 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 990 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
991 | if (ret < 0) { | 991 | if (ret < 0) |
992 | pr_err("Cannot set HDMI parent: %d\n", ret); | 992 | pr_err("Cannot set HDMI parent: %d\n", ret); |
993 | goto out; | ||
994 | } | ||
995 | 993 | ||
996 | out: | 994 | out: |
997 | if (!IS_ERR(hdmi_ick)) | 995 | if (!IS_ERR(hdmi_ick)) |
998 | clk_put(hdmi_ick); | 996 | clk_put(hdmi_ick); |
999 | return ret; | ||
1000 | } | 997 | } |
1001 | 998 | ||
1002 | device_initcall(hdmi_init_pm_clock); | 999 | static void __init fsi_init_pm_clock(void) |
1003 | |||
1004 | static int __init fsi_init_pm_clock(void) | ||
1005 | { | 1000 | { |
1006 | struct clk *fsia_ick; | 1001 | struct clk *fsia_ick; |
1007 | int ret; | 1002 | int ret; |
@@ -1010,7 +1005,7 @@ static int __init fsi_init_pm_clock(void) | |||
1010 | if (IS_ERR(fsia_ick)) { | 1005 | if (IS_ERR(fsia_ick)) { |
1011 | ret = PTR_ERR(fsia_ick); | 1006 | ret = PTR_ERR(fsia_ick); |
1012 | pr_err("Cannot get FSI ICK: %d\n", ret); | 1007 | pr_err("Cannot get FSI ICK: %d\n", ret); |
1013 | return ret; | 1008 | return; |
1014 | } | 1009 | } |
1015 | 1010 | ||
1016 | ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); | 1011 | ret = clk_set_parent(fsia_ick, &sh7372_fsiack_clk); |
@@ -1018,10 +1013,7 @@ static int __init fsi_init_pm_clock(void) | |||
1018 | pr_err("Cannot set FSI-A parent: %d\n", ret); | 1013 | pr_err("Cannot set FSI-A parent: %d\n", ret); |
1019 | 1014 | ||
1020 | clk_put(fsia_ick); | 1015 | clk_put(fsia_ick); |
1021 | |||
1022 | return ret; | ||
1023 | } | 1016 | } |
1024 | device_initcall(fsi_init_pm_clock); | ||
1025 | 1017 | ||
1026 | /* | 1018 | /* |
1027 | * FIXME !! | 1019 | * FIXME !! |
@@ -1348,6 +1340,9 @@ static void __init ap4evb_init(void) | |||
1348 | __raw_writel(srcr4 & ~(1 << 13), SRCR4); | 1340 | __raw_writel(srcr4 & ~(1 << 13), SRCR4); |
1349 | 1341 | ||
1350 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); | 1342 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |
1343 | |||
1344 | hdmi_init_pm_clock(); | ||
1345 | fsi_init_pm_clock(); | ||
1351 | } | 1346 | } |
1352 | 1347 | ||
1353 | static void __init ap4evb_timer_init(void) | 1348 | static void __init ap4evb_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 8184d4d4f234..7da2ca24229d 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -423,7 +423,7 @@ static struct platform_device fsi_hdmi_device = { | |||
423 | .name = "sh_fsi2_b_hdmi", | 423 | .name = "sh_fsi2_b_hdmi", |
424 | }; | 424 | }; |
425 | 425 | ||
426 | static int __init hdmi_init_pm_clock(void) | 426 | static void __init hdmi_init_pm_clock(void) |
427 | { | 427 | { |
428 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); | 428 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); |
429 | int ret; | 429 | int ret; |
@@ -467,17 +467,13 @@ static int __init hdmi_init_pm_clock(void) | |||
467 | pr_debug("PLLC2 set frequency %lu\n", rate); | 467 | pr_debug("PLLC2 set frequency %lu\n", rate); |
468 | 468 | ||
469 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); | 469 | ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk); |
470 | if (ret < 0) { | 470 | if (ret < 0) |
471 | pr_err("Cannot set HDMI parent: %d\n", ret); | 471 | pr_err("Cannot set HDMI parent: %d\n", ret); |
472 | goto out; | ||
473 | } | ||
474 | 472 | ||
475 | out: | 473 | out: |
476 | if (!IS_ERR(hdmi_ick)) | 474 | if (!IS_ERR(hdmi_ick)) |
477 | clk_put(hdmi_ick); | 475 | clk_put(hdmi_ick); |
478 | return ret; | ||
479 | } | 476 | } |
480 | device_initcall(hdmi_init_pm_clock); | ||
481 | 477 | ||
482 | /* USB1 (Host) */ | 478 | /* USB1 (Host) */ |
483 | static void usb1_host_port_power(int port, int power) | 479 | static void usb1_host_port_power(int port, int power) |
@@ -1218,6 +1214,8 @@ static void __init mackerel_init(void) | |||
1218 | sh7372_add_standard_devices(); | 1214 | sh7372_add_standard_devices(); |
1219 | 1215 | ||
1220 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); | 1216 | platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices)); |
1217 | |||
1218 | hdmi_init_pm_clock(); | ||
1221 | } | 1219 | } |
1222 | 1220 | ||
1223 | static void __init mackerel_timer_init(void) | 1221 | static void __init mackerel_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h index e11560a525a1..21a59db638bb 100644 --- a/arch/arm/mach-shmobile/include/mach/mmc.h +++ b/arch/arm/mach-shmobile/include/mach/mmc.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #ifdef CONFIG_MACH_AP4EVB | 10 | #ifdef CONFIG_MACH_AP4EVB |
11 | #include "mach/mmc-ap4eb.h" | 11 | #include "mach/mmc-ap4eb.h" |
12 | #elif CONFIG_MACH_MACKEREL | 12 | #elif defined(CONFIG_MACH_MACKEREL) |
13 | #include "mach/mmc-mackerel.h" | 13 | #include "mach/mmc-mackerel.h" |
14 | #else | 14 | #else |
15 | #error "unsupported board." | 15 | #error "unsupported board." |
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h index 6d6a205bcf90..9320aff0a20f 100644 --- a/arch/arm/mach-shmobile/include/mach/zboot.h +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifdef CONFIG_MACH_AP4EVB | 13 | #ifdef CONFIG_MACH_AP4EVB |
14 | #define MACH_TYPE MACH_TYPE_AP4EVB | 14 | #define MACH_TYPE MACH_TYPE_AP4EVB |
15 | #include "mach/head-ap4evb.txt" | 15 | #include "mach/head-ap4evb.txt" |
16 | #elif CONFIG_MACH_MACKEREL | 16 | #elif defined(CONFIG_MACH_MACKEREL) |
17 | #define MACH_TYPE MACH_TYPE_MACKEREL | 17 | #define MACH_TYPE MACH_TYPE_MACKEREL |
18 | #include "mach/head-mackerel.txt" | 18 | #include "mach/head-mackerel.txt" |
19 | #else | 19 | #else |
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c index e945ae28ee77..f4ef5eb317bd 100644 --- a/arch/arm/mach-tegra/dma.c +++ b/arch/arm/mach-tegra/dma.c | |||
@@ -223,7 +223,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch, | |||
223 | * - Change the source selector to invalid to stop the DMA from | 223 | * - Change the source selector to invalid to stop the DMA from |
224 | * FIFO to memory. | 224 | * FIFO to memory. |
225 | * - Read the status register to know the number of pending | 225 | * - Read the status register to know the number of pending |
226 | * bytes to be transfered. | 226 | * bytes to be transferred. |
227 | * - Finally stop or program the DMA to the next buffer in the | 227 | * - Finally stop or program the DMA to the next buffer in the |
228 | * list. | 228 | * list. |
229 | */ | 229 | */ |
@@ -244,7 +244,7 @@ int tegra_dma_dequeue_req(struct tegra_dma_channel *ch, | |||
244 | if (status & STA_BUSY) | 244 | if (status & STA_BUSY) |
245 | req->bytes_transferred -= to_transfer; | 245 | req->bytes_transferred -= to_transfer; |
246 | 246 | ||
247 | /* In continous transfer mode, DMA only tracks the count of the | 247 | /* In continuous transfer mode, DMA only tracks the count of the |
248 | * half DMA buffer. So, if the DMA already finished half the DMA | 248 | * half DMA buffer. So, if the DMA already finished half the DMA |
249 | * then add the half buffer to the completed count. | 249 | * then add the half buffer to the completed count. |
250 | * | 250 | * |
diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c index 76a3f654220f..65a1aba6823d 100644 --- a/arch/arm/mach-tegra/gpio.c +++ b/arch/arm/mach-tegra/gpio.c | |||
@@ -257,7 +257,8 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
257 | void tegra_gpio_resume(void) | 257 | void tegra_gpio_resume(void) |
258 | { | 258 | { |
259 | unsigned long flags; | 259 | unsigned long flags; |
260 | int b, p, i; | 260 | int b; |
261 | int p; | ||
261 | 262 | ||
262 | local_irq_save(flags); | 263 | local_irq_save(flags); |
263 | 264 | ||
@@ -280,7 +281,8 @@ void tegra_gpio_resume(void) | |||
280 | void tegra_gpio_suspend(void) | 281 | void tegra_gpio_suspend(void) |
281 | { | 282 | { |
282 | unsigned long flags; | 283 | unsigned long flags; |
283 | int b, p, i; | 284 | int b; |
285 | int p; | ||
284 | 286 | ||
285 | local_irq_save(flags); | 287 | local_irq_save(flags); |
286 | for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) { | 288 | for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) { |
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h index 39011bd9a925..d0132e8031a1 100644 --- a/arch/arm/mach-tegra/include/mach/dma.h +++ b/arch/arm/mach-tegra/include/mach/dma.h | |||
@@ -92,11 +92,11 @@ struct tegra_dma_req { | |||
92 | /* This is a called from the DMA ISR context when the DMA is still in | 92 | /* This is a called from the DMA ISR context when the DMA is still in |
93 | * progress and is actively filling same buffer. | 93 | * progress and is actively filling same buffer. |
94 | * | 94 | * |
95 | * In case of continous mode receive, this threshold is 1/2 the buffer | 95 | * In case of continuous mode receive, this threshold is 1/2 the buffer |
96 | * size. In other cases, this will not even be called as there is no | 96 | * size. In other cases, this will not even be called as there is no |
97 | * hardware support for it. | 97 | * hardware support for it. |
98 | * | 98 | * |
99 | * In the case of continous mode receive, if there is next req already | 99 | * In the case of continuous mode receive, if there is next req already |
100 | * queued, DMA programs the HW to use that req when this req is | 100 | * queued, DMA programs the HW to use that req when this req is |
101 | * completed. If there is no "next req" queued, then DMA ISR doesn't do | 101 | * completed. If there is no "next req" queued, then DMA ISR doesn't do |
102 | * anything before calling this callback. | 102 | * anything before calling this callback. |
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 6d7c4eea4dcb..4459470c052d 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c | |||
@@ -1362,14 +1362,15 @@ static int tegra_clk_shared_bus_set_rate(struct clk *c, unsigned long rate) | |||
1362 | { | 1362 | { |
1363 | unsigned long flags; | 1363 | unsigned long flags; |
1364 | int ret; | 1364 | int ret; |
1365 | long new_rate = rate; | ||
1365 | 1366 | ||
1366 | rate = clk_round_rate(c->parent, rate); | 1367 | new_rate = clk_round_rate(c->parent, new_rate); |
1367 | if (rate < 0) | 1368 | if (new_rate < 0) |
1368 | return rate; | 1369 | return new_rate; |
1369 | 1370 | ||
1370 | spin_lock_irqsave(&c->parent->spinlock, flags); | 1371 | spin_lock_irqsave(&c->parent->spinlock, flags); |
1371 | 1372 | ||
1372 | c->u.shared_bus_user.rate = rate; | 1373 | c->u.shared_bus_user.rate = new_rate; |
1373 | ret = tegra_clk_shared_bus_update(c->parent); | 1374 | ret = tegra_clk_shared_bus_update(c->parent); |
1374 | 1375 | ||
1375 | spin_unlock_irqrestore(&c->parent->spinlock, flags); | 1376 | spin_unlock_irqrestore(&c->parent->spinlock, flags); |
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index fabcc49abe80..5535dd0a78c9 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -263,7 +263,7 @@ static void disable_i2s0_vcxo(void) | |||
263 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); | 263 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); |
264 | val &= ~U300_SYSCON_CCR_I2S0_USE_VCXO; | 264 | val &= ~U300_SYSCON_CCR_I2S0_USE_VCXO; |
265 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 265 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
266 | /* Deactivate VCXO if noone else is using VCXO */ | 266 | /* Deactivate VCXO if no one else is using VCXO */ |
267 | if (!(val & U300_SYSCON_CCR_I2S1_USE_VCXO)) | 267 | if (!(val & U300_SYSCON_CCR_I2S1_USE_VCXO)) |
268 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; | 268 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; |
269 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 269 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
@@ -283,7 +283,7 @@ static void disable_i2s1_vcxo(void) | |||
283 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); | 283 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_CCR); |
284 | val &= ~U300_SYSCON_CCR_I2S1_USE_VCXO; | 284 | val &= ~U300_SYSCON_CCR_I2S1_USE_VCXO; |
285 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 285 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
286 | /* Deactivate VCXO if noone else is using VCXO */ | 286 | /* Deactivate VCXO if no one else is using VCXO */ |
287 | if (!(val & U300_SYSCON_CCR_I2S0_USE_VCXO)) | 287 | if (!(val & U300_SYSCON_CCR_I2S0_USE_VCXO)) |
288 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; | 288 | val &= ~U300_SYSCON_CCR_TURN_VCXO_ON; |
289 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); | 289 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_CCR); |
@@ -649,7 +649,7 @@ static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) | |||
649 | */ | 649 | */ |
650 | long clk_round_rate(struct clk *clk, unsigned long rate) | 650 | long clk_round_rate(struct clk *clk, unsigned long rate) |
651 | { | 651 | { |
652 | /* TODO: get apropriate switches for EMIFCLK, AHBCLK and MCLK */ | 652 | /* TODO: get appropriate switches for EMIFCLK, AHBCLK and MCLK */ |
653 | /* Else default to fixed value */ | 653 | /* Else default to fixed value */ |
654 | 654 | ||
655 | if (clk->round_rate) { | 655 | if (clk->round_rate) { |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index dc8746d7826e..6e1907fa94f0 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -52,7 +52,7 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { | |||
52 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction | 52 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction |
53 | * register. This is the array of 7 configuration settings. | 53 | * register. This is the array of 7 configuration settings. |
54 | * One has to compile time decide these settings. Below is the | 54 | * One has to compile time decide these settings. Below is the |
55 | * explaination of these setting | 55 | * explanation of these setting |
56 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO | 56 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO |
57 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO | 57 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO |
58 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO | 58 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO |
@@ -178,16 +178,15 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = { | |||
178 | .irq = NOMADIK_GPIO_TO_IRQ(217), | 178 | .irq = NOMADIK_GPIO_TO_IRQ(217), |
179 | .platform_data = &mop500_tc35892_data, | 179 | .platform_data = &mop500_tc35892_data, |
180 | }, | 180 | }, |
181 | }; | 181 | /* I2C0 devices only available prior to HREFv60 */ |
182 | |||
183 | /* I2C0 devices only available prior to HREFv60 */ | ||
184 | static struct i2c_board_info __initdata mop500_i2c0_old_devices[] = { | ||
185 | { | 182 | { |
186 | I2C_BOARD_INFO("tps61052", 0x33), | 183 | I2C_BOARD_INFO("tps61052", 0x33), |
187 | .platform_data = &mop500_tps61052_data, | 184 | .platform_data = &mop500_tps61052_data, |
188 | }, | 185 | }, |
189 | }; | 186 | }; |
190 | 187 | ||
188 | #define NUM_PRE_V60_I2C0_DEVICES 1 | ||
189 | |||
191 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { | 190 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { |
192 | { | 191 | { |
193 | /* lp5521 LED driver, 1st device */ | 192 | /* lp5521 LED driver, 1st device */ |
@@ -425,6 +424,8 @@ static void __init mop500_uart_init(void) | |||
425 | 424 | ||
426 | static void __init mop500_init_machine(void) | 425 | static void __init mop500_init_machine(void) |
427 | { | 426 | { |
427 | int i2c0_devs; | ||
428 | |||
428 | /* | 429 | /* |
429 | * The HREFv60 board removed a GPIO expander and routed | 430 | * The HREFv60 board removed a GPIO expander and routed |
430 | * all these GPIO pins to the internal GPIO controller | 431 | * all these GPIO pins to the internal GPIO controller |
@@ -448,11 +449,11 @@ static void __init mop500_init_machine(void) | |||
448 | 449 | ||
449 | platform_device_register(&ab8500_device); | 450 | platform_device_register(&ab8500_device); |
450 | 451 | ||
451 | i2c_register_board_info(0, mop500_i2c0_devices, | 452 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
452 | ARRAY_SIZE(mop500_i2c0_devices)); | 453 | if (machine_is_hrefv60()) |
453 | if (!machine_is_hrefv60()) | 454 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; |
454 | i2c_register_board_info(0, mop500_i2c0_old_devices, | 455 | |
455 | ARRAY_SIZE(mop500_i2c0_old_devices)); | 456 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); |
456 | i2c_register_board_info(2, mop500_i2c2_devices, | 457 | i2c_register_board_info(2, mop500_i2c2_devices, |
457 | ARRAY_SIZE(mop500_i2c2_devices)); | 458 | ARRAY_SIZE(mop500_i2c2_devices)); |
458 | } | 459 | } |
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h index 0fefb34c11e4..16647b255378 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) | 58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) |
59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) | 59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) |
60 | 60 | ||
61 | /* per7 base addressess */ | 61 | /* per7 base addresses */ |
62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) | 62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) |
63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) | 63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) |
64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) | 64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) |
@@ -68,7 +68,7 @@ | |||
68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | 68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) |
69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | 69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) |
70 | 70 | ||
71 | /* per6 base addressess */ | 71 | /* per6 base addresses */ |
72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) | 72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) |
73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) | 73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) |
74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | 74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) |
@@ -79,11 +79,11 @@ | |||
79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | 79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) |
80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) | 80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) |
81 | 81 | ||
82 | /* per5 base addressess */ | 82 | /* per5 base addresses */ |
83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | 83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) |
84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) | 84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) |
85 | 85 | ||
86 | /* per4 base addressess */ | 86 | /* per4 base addresses */ |
87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) | 87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) |
88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) | 88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) |
89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) | 89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) |
@@ -106,7 +106,7 @@ | |||
106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | 106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) |
107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) | 107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) |
108 | 108 | ||
109 | /* per2 base addressess */ | 109 | /* per2 base addresses */ |
110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | 110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) |
111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) | 111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) |
112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) | 112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 96e59e3ee4f5..eb7ffa0ee8b5 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -314,7 +314,7 @@ static struct mmci_platform_data mmc0_plat_data = { | |||
314 | .gpio_cd = -1, | 314 | .gpio_cd = -1, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static struct resource chalcd_resources[] = { | 317 | static struct resource char_lcd_resources[] = { |
318 | { | 318 | { |
319 | .start = VERSATILE_CHAR_LCD_BASE, | 319 | .start = VERSATILE_CHAR_LCD_BASE, |
320 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), | 320 | .end = (VERSATILE_CHAR_LCD_BASE + SZ_4K - 1), |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index d3644db467b7..f40c69656d8d 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
@@ -32,7 +32,7 @@ | |||
32 | /* | 32 | /* |
33 | * This is the size at which it becomes more efficient to | 33 | * This is the size at which it becomes more efficient to |
34 | * clean the whole cache, rather than using the individual | 34 | * clean the whole cache, rather than using the individual |
35 | * cache line maintainence instructions. | 35 | * cache line maintenance instructions. |
36 | * | 36 | * |
37 | * Size Clean (ticks) Dirty (ticks) | 37 | * Size Clean (ticks) Dirty (ticks) |
38 | * 4096 21 20 21 53 55 54 | 38 | * 4096 21 20 21 53 55 54 |
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index 49c2b66cf3dd..a7b276dbda11 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
@@ -34,7 +34,7 @@ | |||
34 | /* | 34 | /* |
35 | * This is the size at which it becomes more efficient to | 35 | * This is the size at which it becomes more efficient to |
36 | * clean the whole cache, rather than using the individual | 36 | * clean the whole cache, rather than using the individual |
37 | * cache line maintainence instructions. | 37 | * cache line maintenance instructions. |
38 | * | 38 | * |
39 | * *** This needs benchmarking | 39 | * *** This needs benchmarking |
40 | */ | 40 | */ |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 6136e68ce953..dc18d81ef8ce 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -96,7 +96,7 @@ ENDPROC(v7_flush_dcache_all) | |||
96 | * Flush the entire cache system. | 96 | * Flush the entire cache system. |
97 | * The data cache flush is now achieved using atomic clean / invalidates | 97 | * The data cache flush is now achieved using atomic clean / invalidates |
98 | * working outwards from L1 cache. This is done using Set/Way based cache | 98 | * working outwards from L1 cache. This is done using Set/Way based cache |
99 | * maintainance instructions. | 99 | * maintenance instructions. |
100 | * The instruction cache can still be invalidated back to the point of | 100 | * The instruction cache can still be invalidated back to the point of |
101 | * unification in a single instruction. | 101 | * unification in a single instruction. |
102 | * | 102 | * |
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index afe209e1e1f8..74be05f3e03a 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/shm.h> | 7 | #include <linux/shm.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/personality.h> | ||
10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
12 | #include <asm/system.h> | 13 | #include <asm/system.h> |
@@ -82,7 +83,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
82 | mm->cached_hole_size = 0; | 83 | mm->cached_hole_size = 0; |
83 | } | 84 | } |
84 | /* 8 bits of randomness in 20 address space bits */ | 85 | /* 8 bits of randomness in 20 address space bits */ |
85 | if (current->flags & PF_RANDOMIZE) | 86 | if ((current->flags & PF_RANDOMIZE) && |
87 | !(current->personality & ADDR_NO_RANDOMIZE)) | ||
86 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; | 88 | addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT; |
87 | 89 | ||
88 | full_search: | 90 | full_search: |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 226e3d8351c2..6c4e7fd6c8af 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -64,7 +64,7 @@ | |||
64 | /* | 64 | /* |
65 | * This is the size at which it becomes more efficient to | 65 | * This is the size at which it becomes more efficient to |
66 | * clean the whole cache, rather than using the individual | 66 | * clean the whole cache, rather than using the individual |
67 | * cache line maintainence instructions. | 67 | * cache line maintenance instructions. |
68 | */ | 68 | */ |
69 | #define CACHE_DLIMIT 32768 | 69 | #define CACHE_DLIMIT 32768 |
70 | 70 | ||
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 86d9c2cf0bce..4ce947c19623 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -64,7 +64,7 @@ | |||
64 | /* | 64 | /* |
65 | * This is the size at which it becomes more efficient to | 65 | * This is the size at which it becomes more efficient to |
66 | * clean the whole cache, rather than using the individual | 66 | * clean the whole cache, rather than using the individual |
67 | * cache line maintainence instructions. | 67 | * cache line maintenance instructions. |
68 | */ | 68 | */ |
69 | #define CACHE_DLIMIT 32768 | 69 | #define CACHE_DLIMIT 32768 |
70 | 70 | ||
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 83d3dd34f846..c8884c5413a2 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -53,7 +53,7 @@ | |||
53 | /* | 53 | /* |
54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
57 | */ | 57 | */ |
58 | #define CACHE_DLIMIT 32768 | 58 | #define CACHE_DLIMIT 32768 |
59 | 59 | ||
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 686043ee7281..413684660aad 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -53,7 +53,7 @@ | |||
53 | /* | 53 | /* |
54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
57 | */ | 57 | */ |
58 | #define CACHE_DLIMIT 32768 | 58 | #define CACHE_DLIMIT 32768 |
59 | 59 | ||
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 665266da143c..7a06e5964f59 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -63,7 +63,7 @@ ENTRY(cpu_arm720_proc_fin) | |||
63 | /* | 63 | /* |
64 | * Function: arm720_proc_do_idle(void) | 64 | * Function: arm720_proc_do_idle(void) |
65 | * Params : r0 = unused | 65 | * Params : r0 = unused |
66 | * Purpose : put the processer in proper idle mode | 66 | * Purpose : put the processor in proper idle mode |
67 | */ | 67 | */ |
68 | ENTRY(cpu_arm720_do_idle) | 68 | ENTRY(cpu_arm720_do_idle) |
69 | mov pc, lr | 69 | mov pc, lr |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 219980ec8b6e..bf8a1d1cccb6 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -53,7 +53,7 @@ | |||
53 | /* | 53 | /* |
54 | * This is the size at which it becomes more efficient to | 54 | * This is the size at which it becomes more efficient to |
55 | * clean the whole cache, rather than using the individual | 55 | * clean the whole cache, rather than using the individual |
56 | * cache line maintainence instructions. | 56 | * cache line maintenance instructions. |
57 | */ | 57 | */ |
58 | #define CACHE_DLIMIT 65536 | 58 | #define CACHE_DLIMIT 65536 |
59 | 59 | ||
@@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 390 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
391 | .globl cpu_arm920_suspend_size | 391 | .globl cpu_arm920_suspend_size |
392 | .equ cpu_arm920_suspend_size, 4 * 3 | 392 | .equ cpu_arm920_suspend_size, 4 * 3 |
393 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM_SLEEP |
394 | ENTRY(cpu_arm920_do_suspend) | 394 | ENTRY(cpu_arm920_do_suspend) |
395 | stmfd sp!, {r4 - r7, lr} | 395 | stmfd sp!, {r4 - r7, lr} |
396 | mrc p15, 0, r4, c13, c0, 0 @ PID | 396 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 36154b1e792a..95ba1fc56e4d 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -54,7 +54,7 @@ | |||
54 | /* | 54 | /* |
55 | * This is the size at which it becomes more efficient to | 55 | * This is the size at which it becomes more efficient to |
56 | * clean the whole cache, rather than using the individual | 56 | * clean the whole cache, rather than using the individual |
57 | * cache line maintainence instructions. (I think this should | 57 | * cache line maintenance instructions. (I think this should |
58 | * be 32768). | 58 | * be 32768). |
59 | */ | 59 | */ |
60 | #define CACHE_DLIMIT 8192 | 60 | #define CACHE_DLIMIT 8192 |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 89c5e0009c4c..541e4774eea1 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -77,7 +77,7 @@ | |||
77 | /* | 77 | /* |
78 | * This is the size at which it becomes more efficient to | 78 | * This is the size at which it becomes more efficient to |
79 | * clean the whole cache, rather than using the individual | 79 | * clean the whole cache, rather than using the individual |
80 | * cache line maintainence instructions. | 80 | * cache line maintenance instructions. |
81 | */ | 81 | */ |
82 | #define CACHE_DLIMIT 8192 | 82 | #define CACHE_DLIMIT 8192 |
83 | 83 | ||
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 6a4bdb2c94a7..0ed85d930c09 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 404 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
405 | .globl cpu_arm926_suspend_size | 405 | .globl cpu_arm926_suspend_size |
406 | .equ cpu_arm926_suspend_size, 4 * 3 | 406 | .equ cpu_arm926_suspend_size, 4 * 3 |
407 | #ifdef CONFIG_PM | 407 | #ifdef CONFIG_PM_SLEEP |
408 | ENTRY(cpu_arm926_do_suspend) | 408 | ENTRY(cpu_arm926_do_suspend) |
409 | stmfd sp!, {r4 - r7, lr} | 409 | stmfd sp!, {r4 - r7, lr} |
410 | mrc p15, 0, r4, c13, c0, 0 @ PID | 410 | mrc p15, 0, r4, c13, c0, 0 @ PID |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index e32fa499194c..34261f9486b9 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -85,7 +85,7 @@ | |||
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Sanity check the PTE configuration for the code below - which makes | 87 | * Sanity check the PTE configuration for the code below - which makes |
88 | * certain assumptions about how these bits are layed out. | 88 | * certain assumptions about how these bits are laid out. |
89 | */ | 89 | */ |
90 | #ifdef CONFIG_MMU | 90 | #ifdef CONFIG_MMU |
91 | #if L_PTE_SHARED != PTE_EXT_SHARED | 91 | #if L_PTE_SHARED != PTE_EXT_SHARED |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 74483d1977fe..184a9c997e36 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext) | |||
171 | 171 | ||
172 | .globl cpu_sa1100_suspend_size | 172 | .globl cpu_sa1100_suspend_size |
173 | .equ cpu_sa1100_suspend_size, 4*4 | 173 | .equ cpu_sa1100_suspend_size, 4*4 |
174 | #ifdef CONFIG_PM | 174 | #ifdef CONFIG_PM_SLEEP |
175 | ENTRY(cpu_sa1100_do_suspend) | 175 | ENTRY(cpu_sa1100_do_suspend) |
176 | stmfd sp!, {r4 - r7, lr} | 176 | stmfd sp!, {r4 - r7, lr} |
177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID | 177 | mrc p15, 0, r4, c3, c0, 0 @ domain ID |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 832b6bdc192c..7c99cb4c8e4f 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext) | |||
124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ | 124 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ |
125 | .globl cpu_v6_suspend_size | 125 | .globl cpu_v6_suspend_size |
126 | .equ cpu_v6_suspend_size, 4 * 8 | 126 | .equ cpu_v6_suspend_size, 4 * 8 |
127 | #ifdef CONFIG_PM | 127 | #ifdef CONFIG_PM_SLEEP |
128 | ENTRY(cpu_v6_do_suspend) | 128 | ENTRY(cpu_v6_do_suspend) |
129 | stmfd sp!, {r4 - r11, lr} | 129 | stmfd sp!, {r4 - r11, lr} |
130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 130 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
@@ -132,7 +132,7 @@ ENTRY(cpu_v6_do_suspend) | |||
132 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 132 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
133 | mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 133 | mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 |
134 | mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 134 | mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 |
135 | mrc p15, 0, r9, c1, c0, 1 @ auxillary control register | 135 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control register |
136 | mrc p15, 0, r10, c1, c0, 2 @ co-processor access control | 136 | mrc p15, 0, r10, c1, c0, 2 @ co-processor access control |
137 | mrc p15, 0, r11, c1, c0, 0 @ control register | 137 | mrc p15, 0, r11, c1, c0, 0 @ control register |
138 | stmia r0, {r4 - r11} | 138 | stmia r0, {r4 - r11} |
@@ -151,7 +151,7 @@ ENTRY(cpu_v6_do_resume) | |||
151 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 151 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
152 | mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 152 | mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 |
153 | mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 153 | mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 |
154 | mcr p15, 0, r9, c1, c0, 1 @ auxillary control register | 154 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control register |
155 | mcr p15, 0, r10, c1, c0, 2 @ co-processor access control | 155 | mcr p15, 0, r10, c1, c0, 2 @ co-processor access control |
156 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 156 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
157 | mcr p15, 0, ip, c7, c5, 4 @ ISB | 157 | mcr p15, 0, ip, c7, c5, 4 @ ISB |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 262fa88a7439..babfba09c89f 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -211,7 +211,7 @@ cpu_v7_name: | |||
211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 211 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
212 | .globl cpu_v7_suspend_size | 212 | .globl cpu_v7_suspend_size |
213 | .equ cpu_v7_suspend_size, 4 * 8 | 213 | .equ cpu_v7_suspend_size, 4 * 8 |
214 | #ifdef CONFIG_PM | 214 | #ifdef CONFIG_PM_SLEEP |
215 | ENTRY(cpu_v7_do_suspend) | 215 | ENTRY(cpu_v7_do_suspend) |
216 | stmfd sp!, {r4 - r11, lr} | 216 | stmfd sp!, {r4 - r11, lr} |
217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 217 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
@@ -237,7 +237,7 @@ ENTRY(cpu_v7_do_resume) | |||
237 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 237 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 |
238 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 238 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 |
239 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 239 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
240 | mcr p15, 0, r10, c1, c0, 1 @ Auxillary control register | 240 | mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register |
241 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 241 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control |
242 | ldr r4, =PRRR @ PRRR | 242 | ldr r4, =PRRR @ PRRR |
243 | ldr r5, =NMRR @ NMRR | 243 | ldr r5, =NMRR @ NMRR |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 63d8b2044e84..596213699f37 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
417 | 417 | ||
418 | .globl cpu_xsc3_suspend_size | 418 | .globl cpu_xsc3_suspend_size |
419 | .equ cpu_xsc3_suspend_size, 4 * 8 | 419 | .equ cpu_xsc3_suspend_size, 4 * 8 |
420 | #ifdef CONFIG_PM | 420 | #ifdef CONFIG_PM_SLEEP |
421 | ENTRY(cpu_xsc3_do_suspend) | 421 | ENTRY(cpu_xsc3_do_suspend) |
422 | stmfd sp!, {r4 - r10, lr} | 422 | stmfd sp!, {r4 - r10, lr} |
423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 423 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 086038cd86ab..42af97664c9d 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -395,7 +395,7 @@ ENTRY(xscale_dma_a0_map_area) | |||
395 | teq r2, #DMA_TO_DEVICE | 395 | teq r2, #DMA_TO_DEVICE |
396 | beq xscale_dma_clean_range | 396 | beq xscale_dma_clean_range |
397 | b xscale_dma_flush_range | 397 | b xscale_dma_flush_range |
398 | ENDPROC(xscsale_dma_a0_map_area) | 398 | ENDPROC(xscale_dma_a0_map_area) |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * dma_unmap_area(start, size, dir) | 401 | * dma_unmap_area(start, size, dir) |
@@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext) | |||
518 | 518 | ||
519 | .globl cpu_xscale_suspend_size | 519 | .globl cpu_xscale_suspend_size |
520 | .equ cpu_xscale_suspend_size, 4 * 7 | 520 | .equ cpu_xscale_suspend_size, 4 * 7 |
521 | #ifdef CONFIG_PM | 521 | #ifdef CONFIG_PM_SLEEP |
522 | ENTRY(cpu_xscale_do_suspend) | 522 | ENTRY(cpu_xscale_do_suspend) |
523 | stmfd sp!, {r4 - r10, lr} | 523 | stmfd sp!, {r4 - r10, lr} |
524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode | 524 | mrc p14, 0, r4, c6, c0, 0 @ clock configuration, for turbo mode |
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index ce81481becf1..4268a2bdf145 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * A driver for the Freescale Semiconductor i.MXC CPUfreq module. | 15 | * A driver for the Freescale Semiconductor i.MXC CPUfreq module. |
16 | * The CPUFREQ driver is for controling CPU frequency. It allows you to change | 16 | * The CPUFREQ driver is for controlling CPU frequency. It allows you to change |
17 | * the CPU clock speed on the fly. | 17 | * the CPU clock speed on the fly. |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index 6561c9df5f0d..ccc789e21daa 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c | |||
@@ -53,7 +53,7 @@ struct platform_device *__init imx_add_fec( | |||
53 | struct resource res[] = { | 53 | struct resource res[] = { |
54 | { | 54 | { |
55 | .start = data->iobase, | 55 | .start = data->iobase, |
56 | .end = data->iobase + SZ_4K, | 56 | .end = data->iobase + SZ_4K - 1, |
57 | .flags = IORESOURCE_MEM, | 57 | .flags = IORESOURCE_MEM, |
58 | }, { | 58 | }, { |
59 | .start = data->irq, | 59 | .start = data->irq, |
diff --git a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c b/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c index 10653cc8d1fa..805336fdc252 100644 --- a/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c +++ b/arch/arm/plat-mxc/devices/platform-imxdi_rtc.c | |||
@@ -27,7 +27,7 @@ struct platform_device *__init imx_add_imxdi_rtc( | |||
27 | struct resource res[] = { | 27 | struct resource res[] = { |
28 | { | 28 | { |
29 | .start = data->iobase, | 29 | .start = data->iobase, |
30 | .end = data->iobase + SZ_16K, | 30 | .end = data->iobase + SZ_16K - 1, |
31 | .flags = IORESOURCE_MEM, | 31 | .flags = IORESOURCE_MEM, |
32 | }, { | 32 | }, { |
33 | .start = data->irq, | 33 | .start = data->irq, |
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index 7a107246fd98..6cd6d7f686f6 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -295,6 +295,12 @@ static int mxc_gpio_direction_output(struct gpio_chip *chip, | |||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||
298 | /* | ||
299 | * This lock class tells lockdep that GPIO irqs are in a different | ||
300 | * category than their parents, so it won't report false recursion. | ||
301 | */ | ||
302 | static struct lock_class_key gpio_lock_class; | ||
303 | |||
298 | int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | 304 | int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) |
299 | { | 305 | { |
300 | int i, j; | 306 | int i, j; |
@@ -311,6 +317,7 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | |||
311 | __raw_writel(~0, port[i].base + GPIO_ISR); | 317 | __raw_writel(~0, port[i].base + GPIO_ISR); |
312 | for (j = port[i].virtual_irq_start; | 318 | for (j = port[i].virtual_irq_start; |
313 | j < port[i].virtual_irq_start + 32; j++) { | 319 | j < port[i].virtual_irq_start + 32; j++) { |
320 | irq_set_lockdep_class(j, &gpio_lock_class); | ||
314 | irq_set_chip_and_handler(j, &gpio_irq_chip, | 321 | irq_set_chip_and_handler(j, &gpio_irq_chip, |
315 | handle_level_irq); | 322 | handle_level_irq); |
316 | set_irq_flags(j, IRQF_VALID); | 323 | set_irq_flags(j, IRQF_VALID); |
diff --git a/arch/arm/plat-mxc/include/mach/audmux.h b/arch/arm/plat-mxc/include/mach/audmux.h index 5cd6466964af..6fda788ed0e9 100644 --- a/arch/arm/plat-mxc/include/mach/audmux.h +++ b/arch/arm/plat-mxc/include/mach/audmux.h | |||
@@ -15,6 +15,14 @@ | |||
15 | #define MX31_AUDMUX_PORT5_SSI_PINS_5 4 | 15 | #define MX31_AUDMUX_PORT5_SSI_PINS_5 4 |
16 | #define MX31_AUDMUX_PORT6_SSI_PINS_6 5 | 16 | #define MX31_AUDMUX_PORT6_SSI_PINS_6 5 |
17 | 17 | ||
18 | #define MX51_AUDMUX_PORT1_SSI0 0 | ||
19 | #define MX51_AUDMUX_PORT2_SSI1 1 | ||
20 | #define MX51_AUDMUX_PORT3 2 | ||
21 | #define MX51_AUDMUX_PORT4 3 | ||
22 | #define MX51_AUDMUX_PORT5 4 | ||
23 | #define MX51_AUDMUX_PORT6 5 | ||
24 | #define MX51_AUDMUX_PORT7 6 | ||
25 | |||
18 | /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ | 26 | /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ |
19 | #define MXC_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) | 27 | #define MXC_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) |
20 | #define MXC_AUDMUX_V1_PCR_INMEN (1 << 8) | 28 | #define MXC_AUDMUX_V1_PCR_INMEN (1 << 8) |
@@ -28,7 +36,7 @@ | |||
28 | #define MXC_AUDMUX_V1_PCR_TCLKDIR (1 << 30) | 36 | #define MXC_AUDMUX_V1_PCR_TCLKDIR (1 << 30) |
29 | #define MXC_AUDMUX_V1_PCR_TFSDIR (1 << 31) | 37 | #define MXC_AUDMUX_V1_PCR_TFSDIR (1 << 31) |
30 | 38 | ||
31 | /* Register definitions for the i.MX25/31/35 Digital Audio Multiplexer */ | 39 | /* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */ |
32 | #define MXC_AUDMUX_V2_PTCR_TFSDIR (1 << 31) | 40 | #define MXC_AUDMUX_V2_PTCR_TFSDIR (1 << 31) |
33 | #define MXC_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) | 41 | #define MXC_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) |
34 | #define MXC_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) | 42 | #define MXC_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index bd9bb9799141..2e49e71b1b98 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -33,9 +33,9 @@ | |||
33 | .macro arch_ret_to_user, tmp1, tmp2 | 33 | .macro arch_ret_to_user, tmp1, tmp2 |
34 | .endm | 34 | .endm |
35 | 35 | ||
36 | @ this macro checks which interrupt occured | 36 | @ this macro checks which interrupt occurred |
37 | @ and returns its number in irqnr | 37 | @ and returns its number in irqnr |
38 | @ and returns if an interrupt occured in irqstat | 38 | @ and returns if an interrupt occurred in irqstat |
39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
40 | #ifndef CONFIG_MXC_TZIC | 40 | #ifndef CONFIG_MXC_TZIC |
41 | @ Load offset & priority of the highest priority | 41 | @ Load offset & priority of the highest priority |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h index c4f116d214f2..7a9b20abda09 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx2x.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx2x.h | |||
@@ -90,12 +90,12 @@ | |||
90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) | 90 | #define PC31_PF_SSI3_CLK (GPIO_PORTC | GPIO_PF | GPIO_IN | 31) |
91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) | 91 | #define PD17_PF_I2C_DATA (GPIO_PORTD | GPIO_PF | GPIO_OUT | 17) |
92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) | 92 | #define PD18_PF_I2C_CLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 18) |
93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | 19) | 93 | #define PD19_PF_CSPI2_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 19) |
94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | 20) | 94 | #define PD20_PF_CSPI2_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 20) |
95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | 21) | 95 | #define PD21_PF_CSPI2_SS0 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 21) |
96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | 22) | 96 | #define PD22_PF_CSPI2_SCLK (GPIO_PORTD | GPIO_PF | GPIO_OUT | 22) |
97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | 23) | 97 | #define PD23_PF_CSPI2_MISO (GPIO_PORTD | GPIO_PF | GPIO_IN | 23) |
98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | 24) | 98 | #define PD24_PF_CSPI2_MOSI (GPIO_PORTD | GPIO_PF | GPIO_OUT | 24) |
99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) | 99 | #define PD25_PF_CSPI1_RDY (GPIO_PORTD | GPIO_PF | GPIO_OUT | 25) |
100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) | 100 | #define PD26_PF_CSPI1_SS2 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 26) |
101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) | 101 | #define PD27_PF_CSPI1_SS1 (GPIO_PORTD | GPIO_PF | GPIO_OUT | 27) |
diff --git a/arch/arm/plat-mxc/include/mach/mx50.h b/arch/arm/plat-mxc/include/mach/mx50.h index aaec2a6e7b3a..5f2da75a47f4 100644 --- a/arch/arm/plat-mxc/include/mach/mx50.h +++ b/arch/arm/plat-mxc/include/mach/mx50.h | |||
@@ -282,4 +282,8 @@ | |||
282 | #define MX50_INT_APBHDMA_CHAN6 116 | 282 | #define MX50_INT_APBHDMA_CHAN6 116 |
283 | #define MX50_INT_APBHDMA_CHAN7 117 | 283 | #define MX50_INT_APBHDMA_CHAN7 117 |
284 | 284 | ||
285 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | ||
286 | extern int mx50_revision(void); | ||
287 | #endif | ||
288 | |||
285 | #endif /* ifndef __MACH_MX50_H__ */ | 289 | #endif /* ifndef __MACH_MX50_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 1eb339e6c857..dede19a766ff 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
@@ -347,6 +347,7 @@ | |||
347 | 347 | ||
348 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) | 348 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
349 | extern int mx51_revision(void); | 349 | extern int mx51_revision(void); |
350 | extern void mx51_display_revision(void); | ||
350 | #endif | 351 | #endif |
351 | 352 | ||
352 | /* tape-out 1 defines */ | 353 | /* tape-out 1 defines */ |
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 7e072637eefa..1aea818d9d31 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
@@ -51,6 +51,20 @@ | |||
51 | #define IMX_CHIP_REVISION_3_3 0x33 | 51 | #define IMX_CHIP_REVISION_3_3 0x33 |
52 | #define IMX_CHIP_REVISION_UNKNOWN 0xff | 52 | #define IMX_CHIP_REVISION_UNKNOWN 0xff |
53 | 53 | ||
54 | #define IMX_CHIP_REVISION_1_0_STRING "1.0" | ||
55 | #define IMX_CHIP_REVISION_1_1_STRING "1.1" | ||
56 | #define IMX_CHIP_REVISION_1_2_STRING "1.2" | ||
57 | #define IMX_CHIP_REVISION_1_3_STRING "1.3" | ||
58 | #define IMX_CHIP_REVISION_2_0_STRING "2.0" | ||
59 | #define IMX_CHIP_REVISION_2_1_STRING "2.1" | ||
60 | #define IMX_CHIP_REVISION_2_2_STRING "2.2" | ||
61 | #define IMX_CHIP_REVISION_2_3_STRING "2.3" | ||
62 | #define IMX_CHIP_REVISION_3_0_STRING "3.0" | ||
63 | #define IMX_CHIP_REVISION_3_1_STRING "3.1" | ||
64 | #define IMX_CHIP_REVISION_3_2_STRING "3.2" | ||
65 | #define IMX_CHIP_REVISION_3_3_STRING "3.3" | ||
66 | #define IMX_CHIP_REVISION_UNKNOWN_STRING "unknown" | ||
67 | |||
54 | #ifndef __ASSEMBLY__ | 68 | #ifndef __ASSEMBLY__ |
55 | extern unsigned int __mxc_cpu_type; | 69 | extern unsigned int __mxc_cpu_type; |
56 | #endif | 70 | #endif |
@@ -181,6 +195,15 @@ struct cpu_op { | |||
181 | u32 cpu_rate; | 195 | u32 cpu_rate; |
182 | }; | 196 | }; |
183 | 197 | ||
198 | int tzic_enable_wake(int is_idle); | ||
199 | enum mxc_cpu_pwr_mode { | ||
200 | WAIT_CLOCKED, /* wfi only */ | ||
201 | WAIT_UNCLOCKED, /* WAIT */ | ||
202 | WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ | ||
203 | STOP_POWER_ON, /* just STOP */ | ||
204 | STOP_POWER_OFF, /* STOP + SRPG */ | ||
205 | }; | ||
206 | |||
184 | extern struct cpu_op *(*get_cpu_op)(int *op); | 207 | extern struct cpu_op *(*get_cpu_op)(int *op); |
185 | #endif | 208 | #endif |
186 | 209 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h index 04c0d060d814..6bb96ef1600b 100644 --- a/arch/arm/plat-mxc/include/mach/mxc_nand.h +++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | struct mxc_nand_platform_data { | 25 | struct mxc_nand_platform_data { |
26 | unsigned int width; /* data bus width in bytes */ | 26 | unsigned int width; /* data bus width in bytes */ |
27 | unsigned int hw_ecc:1; /* 0 if supress hardware ECC */ | 27 | unsigned int hw_ecc:1; /* 0 if suppress hardware ECC */ |
28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ | 28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ |
29 | struct mtd_partition *parts; /* partition table */ | 29 | struct mtd_partition *parts; /* partition table */ |
30 | int nr_parts; /* size of parts */ | 30 | int nr_parts; /* size of parts */ |
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h index 95be51bfe9a9..0417da9f710d 100644 --- a/arch/arm/plat-mxc/include/mach/system.h +++ b/arch/arm/plat-mxc/include/mach/system.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <mach/common.h> | 21 | #include <mach/common.h> |
22 | 22 | ||
23 | extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); | ||
24 | |||
23 | static inline void arch_idle(void) | 25 | static inline void arch_idle(void) |
24 | { | 26 | { |
25 | #ifdef CONFIG_ARCH_MXC91231 | 27 | #ifdef CONFIG_ARCH_MXC91231 |
@@ -54,7 +56,9 @@ static inline void arch_idle(void) | |||
54 | "orr %0, %0, #0x00000004\n" | 56 | "orr %0, %0, #0x00000004\n" |
55 | "mcr p15, 0, %0, c1, c0, 0\n" | 57 | "mcr p15, 0, %0, c1, c0, 0\n" |
56 | : "=r" (reg)); | 58 | : "=r" (reg)); |
57 | } else | 59 | } else if (cpu_is_mx51()) |
60 | mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF); | ||
61 | else | ||
58 | cpu_do_idle(); | 62 | cpu_do_idle(); |
59 | } | 63 | } |
60 | 64 | ||
diff --git a/arch/arm/plat-mxc/ssi-fiq.S b/arch/arm/plat-mxc/ssi-fiq.S index 4ddce565b353..8397a2dd19f2 100644 --- a/arch/arm/plat-mxc/ssi-fiq.S +++ b/arch/arm/plat-mxc/ssi-fiq.S | |||
@@ -124,6 +124,8 @@ imx_ssi_fiq_start: | |||
124 | 1: | 124 | 1: |
125 | @ return from FIQ | 125 | @ return from FIQ |
126 | subs pc, lr, #4 | 126 | subs pc, lr, #4 |
127 | |||
128 | .align | ||
127 | imx_ssi_fiq_base: | 129 | imx_ssi_fiq_base: |
128 | .word 0x0 | 130 | .word 0x0 |
129 | imx_ssi_fiq_rx_buffer: | 131 | imx_ssi_fiq_rx_buffer: |
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 9f0c2610595e..2237ff8b434f 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <asm/sched_clock.h> | ||
30 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
31 | #include <mach/common.h> | 32 | #include <mach/common.h> |
32 | 33 | ||
@@ -105,6 +106,11 @@ static void gpt_irq_acknowledge(void) | |||
105 | __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT); | 106 | __raw_writel(V2_TSTAT_OF1, timer_base + V2_TSTAT); |
106 | } | 107 | } |
107 | 108 | ||
109 | static cycle_t dummy_get_cycles(struct clocksource *cs) | ||
110 | { | ||
111 | return 0; | ||
112 | } | ||
113 | |||
108 | static cycle_t mx1_2_get_cycles(struct clocksource *cs) | 114 | static cycle_t mx1_2_get_cycles(struct clocksource *cs) |
109 | { | 115 | { |
110 | return __raw_readl(timer_base + MX1_2_TCN); | 116 | return __raw_readl(timer_base + MX1_2_TCN); |
@@ -118,18 +124,35 @@ static cycle_t v2_get_cycles(struct clocksource *cs) | |||
118 | static struct clocksource clocksource_mxc = { | 124 | static struct clocksource clocksource_mxc = { |
119 | .name = "mxc_timer1", | 125 | .name = "mxc_timer1", |
120 | .rating = 200, | 126 | .rating = 200, |
121 | .read = mx1_2_get_cycles, | 127 | .read = dummy_get_cycles, |
122 | .mask = CLOCKSOURCE_MASK(32), | 128 | .mask = CLOCKSOURCE_MASK(32), |
123 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 129 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
124 | }; | 130 | }; |
125 | 131 | ||
132 | static DEFINE_CLOCK_DATA(cd); | ||
133 | unsigned long long notrace sched_clock(void) | ||
134 | { | ||
135 | cycle_t cyc = clocksource_mxc.read(&clocksource_mxc); | ||
136 | |||
137 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
138 | } | ||
139 | |||
140 | static void notrace mxc_update_sched_clock(void) | ||
141 | { | ||
142 | cycle_t cyc = clocksource_mxc.read(&clocksource_mxc); | ||
143 | update_sched_clock(&cd, cyc, (u32)~0); | ||
144 | } | ||
145 | |||
126 | static int __init mxc_clocksource_init(struct clk *timer_clk) | 146 | static int __init mxc_clocksource_init(struct clk *timer_clk) |
127 | { | 147 | { |
128 | unsigned int c = clk_get_rate(timer_clk); | 148 | unsigned int c = clk_get_rate(timer_clk); |
129 | 149 | ||
130 | if (timer_is_v2()) | 150 | if (timer_is_v2()) |
131 | clocksource_mxc.read = v2_get_cycles; | 151 | clocksource_mxc.read = v2_get_cycles; |
152 | else | ||
153 | clocksource_mxc.read = mx1_2_get_cycles; | ||
132 | 154 | ||
155 | init_sched_clock(&cd, mxc_update_sched_clock, 32, c); | ||
133 | clocksource_register_hz(&clocksource_mxc, c); | 156 | clocksource_register_hz(&clocksource_mxc, c); |
134 | 157 | ||
135 | return 0; | 158 | return 0; |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 7d9f815cedec..ea28f98d5d6a 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -280,7 +280,7 @@ EXPORT_SYMBOL(omap_dsp_get_mempool_base); | |||
280 | * Claiming GPIOs, and setting their direction and initial values, is the | 280 | * Claiming GPIOs, and setting their direction and initial values, is the |
281 | * responsibility of the device drivers. So is responding to probe(). | 281 | * responsibility of the device drivers. So is responding to probe(). |
282 | * | 282 | * |
283 | * Board-specific knowlege like creating devices or pin setup is to be | 283 | * Board-specific knowledge like creating devices or pin setup is to be |
284 | * kept out of drivers as much as possible. In particular, pin setup | 284 | * kept out of drivers as much as possible. In particular, pin setup |
285 | * may be handled by the boot loader, and drivers should expect it will | 285 | * may be handled by the boot loader, and drivers should expect it will |
286 | * normally have been done by the time they're probed. | 286 | * normally have been done by the time they're probed. |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 2ec3b5d9f214..c22217c2ee5f 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -1019,7 +1019,7 @@ EXPORT_SYMBOL(omap_set_dma_callback); | |||
1019 | * If the channel is running the caller must disable interrupts prior calling | 1019 | * If the channel is running the caller must disable interrupts prior calling |
1020 | * this function and process the returned value before re-enabling interrupt to | 1020 | * this function and process the returned value before re-enabling interrupt to |
1021 | * prevent races with the interrupt handler. Note that in continuous mode there | 1021 | * prevent races with the interrupt handler. Note that in continuous mode there |
1022 | * is a chance for CSSA_L register overflow inbetween the two reads resulting | 1022 | * is a chance for CSSA_L register overflow between the two reads resulting |
1023 | * in incorrect return value. | 1023 | * in incorrect return value. |
1024 | */ | 1024 | */ |
1025 | dma_addr_t omap_get_dma_src_pos(int lch) | 1025 | dma_addr_t omap_get_dma_src_pos(int lch) |
@@ -1046,7 +1046,7 @@ EXPORT_SYMBOL(omap_get_dma_src_pos); | |||
1046 | * If the channel is running the caller must disable interrupts prior calling | 1046 | * If the channel is running the caller must disable interrupts prior calling |
1047 | * this function and process the returned value before re-enabling interrupt to | 1047 | * this function and process the returned value before re-enabling interrupt to |
1048 | * prevent races with the interrupt handler. Note that in continuous mode there | 1048 | * prevent races with the interrupt handler. Note that in continuous mode there |
1049 | * is a chance for CDSA_L register overflow inbetween the two reads resulting | 1049 | * is a chance for CDSA_L register overflow between the two reads resulting |
1050 | * in incorrect return value. | 1050 | * in incorrect return value. |
1051 | */ | 1051 | */ |
1052 | dma_addr_t omap_get_dma_dst_pos(int lch) | 1052 | dma_addr_t omap_get_dma_dst_pos(int lch) |
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index d6f9fa0f62af..cac2e8ac6968 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -93,7 +93,7 @@ extern void omap_gpio_restore_context(void); | |||
93 | /* Wrappers for "new style" GPIO calls, using the new infrastructure | 93 | /* Wrappers for "new style" GPIO calls, using the new infrastructure |
94 | * which lets us plug in FPGA, I2C, and other implementations. | 94 | * which lets us plug in FPGA, I2C, and other implementations. |
95 | * * | 95 | * * |
96 | * The original OMAP-specfic calls should eventually be removed. | 96 | * The original OMAP-specific calls should eventually be removed. |
97 | */ | 97 | */ |
98 | 98 | ||
99 | #include <linux/errno.h> | 99 | #include <linux/errno.h> |
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 12b316165037..1527929b445a 100644 --- a/arch/arm/plat-omap/include/plat/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h | |||
@@ -90,7 +90,7 @@ enum omap_ecc { | |||
90 | /* 1-bit ecc: stored at end of spare area */ | 90 | /* 1-bit ecc: stored at end of spare area */ |
91 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | 91 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ |
92 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | 92 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ |
93 | /* 1-bit ecc: stored at begining of spare area as romcode */ | 93 | /* 1-bit ecc: stored at beginning of spare area as romcode */ |
94 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | 94 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ |
95 | }; | 95 | }; |
96 | 96 | ||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index d598d9fd65ac..5587acf0eb2c 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -1103,7 +1103,7 @@ int omap_mcbsp_pollread(unsigned int id, u16 *buf) | |||
1103 | /* resend */ | 1103 | /* resend */ |
1104 | return -1; | 1104 | return -1; |
1105 | } else { | 1105 | } else { |
1106 | /* wait for recieve confirmation */ | 1106 | /* wait for receive confirmation */ |
1107 | int attemps = 0; | 1107 | int attemps = 0; |
1108 | while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) { | 1108 | while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) { |
1109 | if (attemps++ > 1000) { | 1109 | if (attemps++ > 1000) { |
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 75f656471240..89e68e07b0a8 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
@@ -434,7 +434,7 @@ typedef unsigned long mfp_cfg_t; | |||
434 | * | 434 | * |
435 | * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which | 435 | * mfp_init_addr() - accepts a table of "mfp_addr_map" structure, which |
436 | * represents a range of MFP pins from "start" to "end", with the offset | 436 | * represents a range of MFP pins from "start" to "end", with the offset |
437 | * begining at "offset", to define a single pin, let "end" = -1. | 437 | * beginning at "offset", to define a single pin, let "end" = -1. |
438 | * | 438 | * |
439 | * use | 439 | * use |
440 | * | 440 | * |
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile index c2064c308719..0291bd6e236e 100644 --- a/arch/arm/plat-s3c24xx/Makefile +++ b/arch/arm/plat-s3c24xx/Makefile | |||
@@ -23,7 +23,7 @@ obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o | |||
23 | obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o | 23 | obj-$(CONFIG_CPU_FREQ_S3C24XX) += cpu-freq.o |
24 | obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o | 24 | obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o |
25 | 25 | ||
26 | # Architecture dependant builds | 26 | # Architecture dependent builds |
27 | 27 | ||
28 | obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | 28 | obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o |
29 | obj-$(CONFIG_PM) += pm.o | 29 | obj-$(CONFIG_PM) += pm.o |
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c index eea75ff81d15..b3d3d0278997 100644 --- a/arch/arm/plat-s3c24xx/cpu-freq.c +++ b/arch/arm/plat-s3c24xx/cpu-freq.c | |||
@@ -455,7 +455,7 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy) | |||
455 | 455 | ||
456 | /* whilst we will be called later on, we try and re-set the | 456 | /* whilst we will be called later on, we try and re-set the |
457 | * cpu frequencies as soon as possible so that we do not end | 457 | * cpu frequencies as soon as possible so that we do not end |
458 | * up resuming devices and then immediatley having to re-set | 458 | * up resuming devices and then immediately having to re-set |
459 | * a number of settings once these devices have restarted. | 459 | * a number of settings once these devices have restarted. |
460 | * | 460 | * |
461 | * as a note, it is expected devices are not used until they | 461 | * as a note, it is expected devices are not used until they |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 6ad274e7593d..27ea852e3370 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -557,7 +557,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) | |||
557 | break; | 557 | break; |
558 | 558 | ||
559 | case S3C2410_DMALOAD_1LOADED_1RUNNING: | 559 | case S3C2410_DMALOAD_1LOADED_1RUNNING: |
560 | /* I belive in this case we do not have anything to do | 560 | /* I believe in this case we do not have anything to do |
561 | * until the next buffer comes along, and we turn off the | 561 | * until the next buffer comes along, and we turn off the |
562 | * reload */ | 562 | * reload */ |
563 | return; | 563 | return; |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 46dd078147d8..cd6d67c8382a 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -208,7 +208,7 @@ static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | /* | 210 | /* |
211 | * chained GPIO irq has been sucessfully registered, allocate new gpio | 211 | * chained GPIO irq has been successfully registered, allocate new gpio |
212 | * int group and assign irq nubmers | 212 | * int group and assign irq nubmers |
213 | */ | 213 | */ |
214 | 214 | ||
diff --git a/arch/arm/plat-s5p/pm.c b/arch/arm/plat-s5p/pm.c index d592b6304b48..d15dc47b0e3d 100644 --- a/arch/arm/plat-s5p/pm.c +++ b/arch/arm/plat-s5p/pm.c | |||
@@ -19,17 +19,6 @@ | |||
19 | 19 | ||
20 | #define PFX "s5p pm: " | 20 | #define PFX "s5p pm: " |
21 | 21 | ||
22 | /* s3c_pm_check_resume_pin | ||
23 | * | ||
24 | * check to see if the pin is configured correctly for sleep mode, and | ||
25 | * make any necessary adjustments if it is not | ||
26 | */ | ||
27 | |||
28 | static void s3c_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs) | ||
29 | { | ||
30 | /* nothing here yet */ | ||
31 | } | ||
32 | |||
33 | /* s3c_pm_configure_extint | 22 | /* s3c_pm_configure_extint |
34 | * | 23 | * |
35 | * configure all external interrupt pins | 24 | * configure all external interrupt pins |
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 9a82b8874918..983c578b8276 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -21,7 +21,7 @@ struct clk; | |||
21 | * @set_parent: set the clock's parent, see clk_set_parent(). | 21 | * @set_parent: set the clock's parent, see clk_set_parent(). |
22 | * | 22 | * |
23 | * Group the common clock implementations together so that we | 23 | * Group the common clock implementations together so that we |
24 | * don't have to keep setting the same fiels again. We leave | 24 | * don't have to keep setting the same fields again. We leave |
25 | * enable in struct clk. | 25 | * enable in struct clk. |
26 | * | 26 | * |
27 | * Adding an extra layer of indirection into the process should | 27 | * Adding an extra layer of indirection into the process should |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index 5603db0b79bc..3ad8386599c3 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
@@ -114,7 +114,7 @@ extern unsigned s3c_gpio_getcfg_s3c24xx_a(struct s3c_gpio_chip *chip, | |||
114 | * of control per GPIO, generally in the form of: | 114 | * of control per GPIO, generally in the form of: |
115 | * 0000 = Input | 115 | * 0000 = Input |
116 | * 0001 = Output | 116 | * 0001 = Output |
117 | * others = Special functions (dependant on bank) | 117 | * others = Special functions (dependent on bank) |
118 | * | 118 | * |
119 | * Note, since the code to deal with the case where there are two control | 119 | * Note, since the code to deal with the case where there are two control |
120 | * registers instead of one, we do not have a separate set of functions for | 120 | * registers instead of one, we do not have a separate set of functions for |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 5e04fa6eda74..1762dcb4cb9e 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -125,7 +125,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | |||
125 | * | 125 | * |
126 | * These values control the state of the weak pull-{up,down} resistors | 126 | * These values control the state of the weak pull-{up,down} resistors |
127 | * available on most pins on the S3C series. Not all chips support both | 127 | * available on most pins on the S3C series. Not all chips support both |
128 | * up or down settings, and it may be dependant on the chip that is being | 128 | * up or down settings, and it may be dependent on the chip that is being |
129 | * used to whether the particular mode is available. | 129 | * used to whether the particular mode is available. |
130 | */ | 130 | */ |
131 | #define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00) | 131 | #define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00) |
@@ -138,7 +138,7 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr, | |||
138 | * @pull: The configuration for the pull resistor. | 138 | * @pull: The configuration for the pull resistor. |
139 | * | 139 | * |
140 | * This function sets the state of the pull-{up,down} resistor for the | 140 | * This function sets the state of the pull-{up,down} resistor for the |
141 | * specified pin. It will return 0 if successfull, or a negative error | 141 | * specified pin. It will return 0 if successful, or a negative error |
142 | * code if the pin cannot support the requested pull setting. | 142 | * code if the pin cannot support the requested pull setting. |
143 | * | 143 | * |
144 | * @pull is one of S3C_GPIO_PULL_NONE, S3C_GPIO_PULL_DOWN or S3C_GPIO_PULL_UP. | 144 | * @pull is one of S3C_GPIO_PULL_NONE, S3C_GPIO_PULL_DOWN or S3C_GPIO_PULL_UP. |
@@ -202,7 +202,7 @@ extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin); | |||
202 | * @drvstr: The new value of the driver strength | 202 | * @drvstr: The new value of the driver strength |
203 | * | 203 | * |
204 | * This function sets the driver strength value for the specified pin. | 204 | * This function sets the driver strength value for the specified pin. |
205 | * It will return 0 if successfull, or a negative error code if the pin | 205 | * It will return 0 if successful, or a negative error code if the pin |
206 | * cannot support the requested setting. | 206 | * cannot support the requested setting. |
207 | */ | 207 | */ |
208 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); | 208 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index dac35d0a711d..8cad4cf19c3c 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h | |||
@@ -108,7 +108,7 @@ extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip); | |||
108 | * of control per GPIO, generally in the form of: | 108 | * of control per GPIO, generally in the form of: |
109 | * 0000 = Input | 109 | * 0000 = Input |
110 | * 0001 = Output | 110 | * 0001 = Output |
111 | * others = Special functions (dependant on bank) | 111 | * others = Special functions (dependent on bank) |
112 | * | 112 | * |
113 | * Note, since the code to deal with the case where there are two control | 113 | * Note, since the code to deal with the case where there are two control |
114 | * registers instead of one, we do not have a separate set of function | 114 | * registers instead of one, we do not have a separate set of function |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index b0bdf16549d5..058e09654fe8 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -57,7 +57,7 @@ enum clk_types { | |||
57 | * @cfg_gpio: Configure the GPIO for a specific card bit-width | 57 | * @cfg_gpio: Configure the GPIO for a specific card bit-width |
58 | * @cfg_card: Configure the interface for a specific card and speed. This | 58 | * @cfg_card: Configure the interface for a specific card and speed. This |
59 | * is necessary the controllers and/or GPIO blocks require the | 59 | * is necessary the controllers and/or GPIO blocks require the |
60 | * changing of driver-strength and other controls dependant on | 60 | * changing of driver-strength and other controls dependent on |
61 | * the card and speed of operation. | 61 | * the card and speed of operation. |
62 | * | 62 | * |
63 | * Initialisation data specific to either the machine or the platform | 63 | * Initialisation data specific to either the machine or the platform |
@@ -108,7 +108,7 @@ extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | |||
108 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | 108 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
109 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | 109 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; |
110 | 110 | ||
111 | /* Helper function availablity */ | 111 | /* Helper function availability */ |
112 | 112 | ||
113 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 113 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
114 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 114 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c index e4baf76f374a..6b733fafe7cd 100644 --- a/arch/arm/plat-samsung/pm-check.c +++ b/arch/arm/plat-samsung/pm-check.c | |||
@@ -164,7 +164,6 @@ static inline int in_region(void *ptr, int size, void *what, size_t whatsz) | |||
164 | */ | 164 | */ |
165 | static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) | 165 | static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) |
166 | { | 166 | { |
167 | void *save_at = phys_to_virt(s3c_sleep_save_phys); | ||
168 | unsigned long addr; | 167 | unsigned long addr; |
169 | unsigned long left; | 168 | unsigned long left; |
170 | void *stkpage; | 169 | void *stkpage; |
@@ -192,11 +191,6 @@ static u32 *s3c_pm_runcheck(struct resource *res, u32 *val) | |||
192 | goto skip_check; | 191 | goto skip_check; |
193 | } | 192 | } |
194 | 193 | ||
195 | if (in_region(ptr, left, save_at, 32*4 )) { | ||
196 | S3C_PMDBG("skipping %08lx, has save block in\n", addr); | ||
197 | goto skip_check; | ||
198 | } | ||
199 | |||
200 | /* calculate and check the checksum */ | 194 | /* calculate and check the checksum */ |
201 | 195 | ||
202 | calc = crc32_le(~0, ptr, left); | 196 | calc = crc32_le(~0, ptr, left); |
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index d5b58d31903c..5c0a440d6e16 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -214,8 +214,9 @@ void s3c_pm_do_restore_core(struct sleep_save *ptr, int count) | |||
214 | * | 214 | * |
215 | * print any IRQs asserted at resume time (ie, we woke from) | 215 | * print any IRQs asserted at resume time (ie, we woke from) |
216 | */ | 216 | */ |
217 | static void s3c_pm_show_resume_irqs(int start, unsigned long which, | 217 | static void __maybe_unused s3c_pm_show_resume_irqs(int start, |
218 | unsigned long mask) | 218 | unsigned long which, |
219 | unsigned long mask) | ||
219 | { | 220 | { |
220 | int i; | 221 | int i; |
221 | 222 | ||
diff --git a/arch/arm/plat-samsung/s3c-pl330.c b/arch/arm/plat-samsung/s3c-pl330.c index b4ff8d74ac40..f85638c6f5ae 100644 --- a/arch/arm/plat-samsung/s3c-pl330.c +++ b/arch/arm/plat-samsung/s3c-pl330.c | |||
@@ -68,7 +68,7 @@ struct s3c_pl330_xfer { | |||
68 | * @req: Two requests to communicate with the PL330 engine. | 68 | * @req: Two requests to communicate with the PL330 engine. |
69 | * @callback_fn: Callback function to the client. | 69 | * @callback_fn: Callback function to the client. |
70 | * @rqcfg: Channel configuration for the xfers. | 70 | * @rqcfg: Channel configuration for the xfers. |
71 | * @xfer_head: Pointer to the xfer to be next excecuted. | 71 | * @xfer_head: Pointer to the xfer to be next executed. |
72 | * @dmac: Pointer to the DMAC that manages this channel, NULL if the | 72 | * @dmac: Pointer to the DMAC that manages this channel, NULL if the |
73 | * channel is available to be acquired. | 73 | * channel is available to be acquired. |
74 | * @client: Client of this channel. NULL if the | 74 | * @client: Client of this channel. NULL if the |
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h index 2ae6606930a6..fcc0d0ad4a1f 100644 --- a/arch/arm/plat-spear/include/plat/clock.h +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
@@ -89,7 +89,7 @@ struct rate_config { | |||
89 | * @sibling: node for list of clocks having same parents | 89 | * @sibling: node for list of clocks having same parents |
90 | * @private_data: clock specific private data | 90 | * @private_data: clock specific private data |
91 | * @node: list to maintain clocks linearly | 91 | * @node: list to maintain clocks linearly |
92 | * @cl: clocklook up assoicated with this clock | 92 | * @cl: clocklook up associated with this clock |
93 | * @dent: object for debugfs | 93 | * @dent: object for debugfs |
94 | */ | 94 | */ |
95 | struct clk { | 95 | struct clk { |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index bbf3da012afd..f74695075e64 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -78,6 +78,14 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
78 | put_cpu(); | 78 | put_cpu(); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void vfp_thread_copy(struct thread_info *thread) | ||
82 | { | ||
83 | struct thread_info *parent = current_thread_info(); | ||
84 | |||
85 | vfp_sync_hwstate(parent); | ||
86 | thread->vfpstate = parent->vfpstate; | ||
87 | } | ||
88 | |||
81 | /* | 89 | /* |
82 | * When this function is called with the following 'cmd's, the following | 90 | * When this function is called with the following 'cmd's, the following |
83 | * is true while this function is being run: | 91 | * is true while this function is being run: |
@@ -104,12 +112,17 @@ static void vfp_thread_exit(struct thread_info *thread) | |||
104 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | 112 | static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) |
105 | { | 113 | { |
106 | struct thread_info *thread = v; | 114 | struct thread_info *thread = v; |
115 | u32 fpexc; | ||
116 | #ifdef CONFIG_SMP | ||
117 | unsigned int cpu; | ||
118 | #endif | ||
107 | 119 | ||
108 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { | 120 | switch (cmd) { |
109 | u32 fpexc = fmrx(FPEXC); | 121 | case THREAD_NOTIFY_SWITCH: |
122 | fpexc = fmrx(FPEXC); | ||
110 | 123 | ||
111 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
112 | unsigned int cpu = thread->cpu; | 125 | cpu = thread->cpu; |
113 | 126 | ||
114 | /* | 127 | /* |
115 | * On SMP, if VFP is enabled, save the old state in | 128 | * On SMP, if VFP is enabled, save the old state in |
@@ -134,13 +147,20 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
134 | * old state. | 147 | * old state. |
135 | */ | 148 | */ |
136 | fmxr(FPEXC, fpexc & ~FPEXC_EN); | 149 | fmxr(FPEXC, fpexc & ~FPEXC_EN); |
137 | return NOTIFY_DONE; | 150 | break; |
138 | } | ||
139 | 151 | ||
140 | if (cmd == THREAD_NOTIFY_FLUSH) | 152 | case THREAD_NOTIFY_FLUSH: |
141 | vfp_thread_flush(thread); | 153 | vfp_thread_flush(thread); |
142 | else | 154 | break; |
155 | |||
156 | case THREAD_NOTIFY_EXIT: | ||
143 | vfp_thread_exit(thread); | 157 | vfp_thread_exit(thread); |
158 | break; | ||
159 | |||
160 | case THREAD_NOTIFY_COPY: | ||
161 | vfp_thread_copy(thread); | ||
162 | break; | ||
163 | } | ||
144 | 164 | ||
145 | return NOTIFY_DONE; | 165 | return NOTIFY_DONE; |
146 | } | 166 | } |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 49642b59f73d..e9d689b7c833 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -10,7 +10,6 @@ config AVR32 | |||
10 | select GENERIC_IRQ_PROBE | 10 | select GENERIC_IRQ_PROBE |
11 | select HARDIRQS_SW_RESEND | 11 | select HARDIRQS_SW_RESEND |
12 | select GENERIC_IRQ_SHOW | 12 | select GENERIC_IRQ_SHOW |
13 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
14 | help | 13 | help |
15 | AVR32 is a high-performance 32-bit RISC microprocessor core, | 14 | AVR32 is a high-performance 32-bit RISC microprocessor core, |
16 | designed for cost-sensitive embedded applications, with particular | 15 | designed for cost-sensitive embedded applications, with particular |
diff --git a/arch/avr32/include/asm/setup.h b/arch/avr32/include/asm/setup.h index ff5b7cf6be4d..160543dbec7e 100644 --- a/arch/avr32/include/asm/setup.h +++ b/arch/avr32/include/asm/setup.h | |||
@@ -94,6 +94,13 @@ struct tag_ethernet { | |||
94 | 94 | ||
95 | #define ETH_INVALID_PHY 0xff | 95 | #define ETH_INVALID_PHY 0xff |
96 | 96 | ||
97 | /* board information */ | ||
98 | #define ATAG_BOARDINFO 0x54410008 | ||
99 | |||
100 | struct tag_boardinfo { | ||
101 | u32 board_number; | ||
102 | }; | ||
103 | |||
97 | struct tag { | 104 | struct tag { |
98 | struct tag_header hdr; | 105 | struct tag_header hdr; |
99 | union { | 106 | union { |
@@ -102,6 +109,7 @@ struct tag { | |||
102 | struct tag_cmdline cmdline; | 109 | struct tag_cmdline cmdline; |
103 | struct tag_clock clock; | 110 | struct tag_clock clock; |
104 | struct tag_ethernet ethernet; | 111 | struct tag_ethernet ethernet; |
112 | struct tag_boardinfo boardinfo; | ||
105 | } u; | 113 | } u; |
106 | }; | 114 | }; |
107 | 115 | ||
@@ -128,6 +136,7 @@ extern struct tag *bootloader_tags; | |||
128 | 136 | ||
129 | extern resource_size_t fbmem_start; | 137 | extern resource_size_t fbmem_start; |
130 | extern resource_size_t fbmem_size; | 138 | extern resource_size_t fbmem_size; |
139 | extern u32 board_number; | ||
131 | 140 | ||
132 | void setup_processor(void); | 141 | void setup_processor(void); |
133 | 142 | ||
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 5c7083916c33..bb0974cce4ac 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -391,6 +391,21 @@ static int __init parse_tag_clock(struct tag *tag) | |||
391 | __tagtable(ATAG_CLOCK, parse_tag_clock); | 391 | __tagtable(ATAG_CLOCK, parse_tag_clock); |
392 | 392 | ||
393 | /* | 393 | /* |
394 | * The board_number correspond to the bd->bi_board_number in U-Boot. This | ||
395 | * parameter is only available during initialisation and can be used in some | ||
396 | * kind of board identification. | ||
397 | */ | ||
398 | u32 __initdata board_number; | ||
399 | |||
400 | static int __init parse_tag_boardinfo(struct tag *tag) | ||
401 | { | ||
402 | board_number = tag->u.boardinfo.board_number; | ||
403 | |||
404 | return 0; | ||
405 | } | ||
406 | __tagtable(ATAG_BOARDINFO, parse_tag_boardinfo); | ||
407 | |||
408 | /* | ||
394 | * Scan the tag table for this tag, and call its parse function. The | 409 | * Scan the tag table for this tag, and call its parse function. The |
395 | * tag table is built by the linker from all the __tagtable | 410 | * tag table is built by the linker from all the __tagtable |
396 | * declarations. | 411 | * declarations. |
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index b91b2044af9c..7aa25756412f 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -95,28 +95,6 @@ void _exception(long signr, struct pt_regs *regs, int code, | |||
95 | info.si_code = code; | 95 | info.si_code = code; |
96 | info.si_addr = (void __user *)addr; | 96 | info.si_addr = (void __user *)addr; |
97 | force_sig_info(signr, &info, current); | 97 | force_sig_info(signr, &info, current); |
98 | |||
99 | /* | ||
100 | * Init gets no signals that it doesn't have a handler for. | ||
101 | * That's all very well, but if it has caused a synchronous | ||
102 | * exception and we ignore the resulting signal, it will just | ||
103 | * generate the same exception over and over again and we get | ||
104 | * nowhere. Better to kill it and let the kernel panic. | ||
105 | */ | ||
106 | if (is_global_init(current)) { | ||
107 | __sighandler_t handler; | ||
108 | |||
109 | spin_lock_irq(¤t->sighand->siglock); | ||
110 | handler = current->sighand->action[signr-1].sa.sa_handler; | ||
111 | spin_unlock_irq(¤t->sighand->siglock); | ||
112 | if (handler == SIG_DFL) { | ||
113 | /* init has generated a synchronous exception | ||
114 | and it doesn't have a handler for the signal */ | ||
115 | printk(KERN_CRIT "init has generated signal %ld " | ||
116 | "but has no handler for it\n", signr); | ||
117 | do_exit(signr); | ||
118 | } | ||
119 | } | ||
120 | } | 98 | } |
121 | 99 | ||
122 | asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) | 100 | asmlinkage void do_nmi(unsigned long ecr, struct pt_regs *regs) |
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c index 442f08c5e641..86925fd6ea5b 100644 --- a/arch/avr32/mach-at32ap/clock.c +++ b/arch/avr32/mach-at32ap/clock.c | |||
@@ -35,22 +35,30 @@ void at32_clk_register(struct clk *clk) | |||
35 | spin_unlock(&clk_list_lock); | 35 | spin_unlock(&clk_list_lock); |
36 | } | 36 | } |
37 | 37 | ||
38 | struct clk *clk_get(struct device *dev, const char *id) | 38 | static struct clk *__clk_get(struct device *dev, const char *id) |
39 | { | 39 | { |
40 | struct clk *clk; | 40 | struct clk *clk; |
41 | 41 | ||
42 | spin_lock(&clk_list_lock); | ||
43 | |||
44 | list_for_each_entry(clk, &at32_clock_list, list) { | 42 | list_for_each_entry(clk, &at32_clock_list, list) { |
45 | if (clk->dev == dev && strcmp(id, clk->name) == 0) { | 43 | if (clk->dev == dev && strcmp(id, clk->name) == 0) { |
46 | spin_unlock(&clk_list_lock); | ||
47 | return clk; | 44 | return clk; |
48 | } | 45 | } |
49 | } | 46 | } |
50 | 47 | ||
51 | spin_unlock(&clk_list_lock); | ||
52 | return ERR_PTR(-ENOENT); | 48 | return ERR_PTR(-ENOENT); |
53 | } | 49 | } |
50 | |||
51 | struct clk *clk_get(struct device *dev, const char *id) | ||
52 | { | ||
53 | struct clk *clk; | ||
54 | |||
55 | spin_lock(&clk_list_lock); | ||
56 | clk = __clk_get(dev, id); | ||
57 | spin_unlock(&clk_list_lock); | ||
58 | |||
59 | return clk; | ||
60 | } | ||
61 | |||
54 | EXPORT_SYMBOL(clk_get); | 62 | EXPORT_SYMBOL(clk_get); |
55 | 63 | ||
56 | void clk_put(struct clk *clk) | 64 | void clk_put(struct clk *clk) |
@@ -257,15 +265,15 @@ static int clk_show(struct seq_file *s, void *unused) | |||
257 | spin_lock(&clk_list_lock); | 265 | spin_lock(&clk_list_lock); |
258 | 266 | ||
259 | /* show clock tree as derived from the three oscillators */ | 267 | /* show clock tree as derived from the three oscillators */ |
260 | clk = clk_get(NULL, "osc32k"); | 268 | clk = __clk_get(NULL, "osc32k"); |
261 | dump_clock(clk, &r); | 269 | dump_clock(clk, &r); |
262 | clk_put(clk); | 270 | clk_put(clk); |
263 | 271 | ||
264 | clk = clk_get(NULL, "osc0"); | 272 | clk = __clk_get(NULL, "osc0"); |
265 | dump_clock(clk, &r); | 273 | dump_clock(clk, &r); |
266 | clk_put(clk); | 274 | clk_put(clk); |
267 | 275 | ||
268 | clk = clk_get(NULL, "osc1"); | 276 | clk = __clk_get(NULL, "osc1"); |
269 | dump_clock(clk, &r); | 277 | dump_clock(clk, &r); |
270 | clk_put(clk); | 278 | clk_put(clk); |
271 | 279 | ||
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 47ba4b9b6db1..fbc2aeaebddb 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -61,34 +61,34 @@ struct eic { | |||
61 | static struct eic *nmi_eic; | 61 | static struct eic *nmi_eic; |
62 | static bool nmi_enabled; | 62 | static bool nmi_enabled; |
63 | 63 | ||
64 | static void eic_ack_irq(struct irq_chip *d) | 64 | static void eic_ack_irq(struct irq_data *d) |
65 | { | 65 | { |
66 | struct eic *eic = irq_data_get_irq_chip_data(data); | 66 | struct eic *eic = irq_data_get_irq_chip_data(d); |
67 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | 67 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void eic_mask_irq(struct irq_chip *d) | 70 | static void eic_mask_irq(struct irq_data *d) |
71 | { | 71 | { |
72 | struct eic *eic = irq_data_get_irq_chip_data(data); | 72 | struct eic *eic = irq_data_get_irq_chip_data(d); |
73 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | 73 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void eic_mask_ack_irq(struct irq_chip *d) | 76 | static void eic_mask_ack_irq(struct irq_data *d) |
77 | { | 77 | { |
78 | struct eic *eic = irq_data_get_irq_chip_data(data); | 78 | struct eic *eic = irq_data_get_irq_chip_data(d); |
79 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); | 79 | eic_writel(eic, ICR, 1 << (d->irq - eic->first_irq)); |
80 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); | 80 | eic_writel(eic, IDR, 1 << (d->irq - eic->first_irq)); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void eic_unmask_irq(struct irq_chip *d) | 83 | static void eic_unmask_irq(struct irq_data *d) |
84 | { | 84 | { |
85 | struct eic *eic = irq_data_get_irq_chip_data(data); | 85 | struct eic *eic = irq_data_get_irq_chip_data(d); |
86 | eic_writel(eic, IER, 1 << (d->irq - eic->first_irq)); | 86 | eic_writel(eic, IER, 1 << (d->irq - eic->first_irq)); |
87 | } | 87 | } |
88 | 88 | ||
89 | static int eic_set_irq_type(struct irq_chip *d, unsigned int flow_type) | 89 | static int eic_set_irq_type(struct irq_data *d, unsigned int flow_type) |
90 | { | 90 | { |
91 | struct eic *eic = irq_data_get_irq_chip_data(data); | 91 | struct eic *eic = irq_data_get_irq_chip_data(d); |
92 | unsigned int irq = d->irq; | 92 | unsigned int irq = d->irq; |
93 | unsigned int i = irq - eic->first_irq; | 93 | unsigned int i = irq - eic->first_irq; |
94 | u32 mode, edge, level; | 94 | u32 mode, edge, level; |
@@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev) | |||
191 | 191 | ||
192 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 192 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
193 | int_irq = platform_get_irq(pdev, 0); | 193 | int_irq = platform_get_irq(pdev, 0); |
194 | if (!regs || !int_irq) { | 194 | if (!regs || (int)int_irq <= 0) { |
195 | dev_dbg(&pdev->dev, "missing regs and/or irq resource\n"); | 195 | dev_dbg(&pdev->dev, "missing regs and/or irq resource\n"); |
196 | return -ENXIO; | 196 | return -ENXIO; |
197 | } | 197 | } |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 37534103574e..2e0aa853a4bc 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -257,7 +257,7 @@ static void gpio_irq_mask(struct irq_data *d) | |||
257 | pio_writel(pio, IDR, 1 << (gpio & 0x1f)); | 257 | pio_writel(pio, IDR, 1 << (gpio & 0x1f)); |
258 | } | 258 | } |
259 | 259 | ||
260 | static void gpio_irq_unmask(struct irq_data *d)) | 260 | static void gpio_irq_unmask(struct irq_data *d) |
261 | { | 261 | { |
262 | unsigned gpio = irq_to_gpio(d->irq); | 262 | unsigned gpio = irq_to_gpio(d->irq); |
263 | struct pio_device *pio = &pio_dev[gpio >> 5]; | 263 | struct pio_device *pio = &pio_dev[gpio >> 5]; |
@@ -282,7 +282,7 @@ static struct irq_chip gpio_irqchip = { | |||
282 | 282 | ||
283 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 283 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) |
284 | { | 284 | { |
285 | struct pio_device *pio = get_irq_desc_chip_data(desc); | 285 | struct pio_device *pio = irq_desc_get_chip_data(desc); |
286 | unsigned gpio_irq; | 286 | unsigned gpio_irq; |
287 | 287 | ||
288 | gpio_irq = (unsigned) irq_get_handler_data(irq); | 288 | gpio_irq = (unsigned) irq_get_handler_data(irq); |
diff --git a/arch/avr32/mach-at32ap/pm-at32ap700x.S b/arch/avr32/mach-at32ap/pm-at32ap700x.S index 17503b0ed6c9..f868f4ce761b 100644 --- a/arch/avr32/mach-at32ap/pm-at32ap700x.S +++ b/arch/avr32/mach-at32ap/pm-at32ap700x.S | |||
@@ -53,7 +53,7 @@ cpu_enter_idle: | |||
53 | st.w r8[TI_flags], r9 | 53 | st.w r8[TI_flags], r9 |
54 | unmask_interrupts | 54 | unmask_interrupts |
55 | sleep CPU_SLEEP_IDLE | 55 | sleep CPU_SLEEP_IDLE |
56 | .size cpu_idle_sleep, . - cpu_idle_sleep | 56 | .size cpu_enter_idle, . - cpu_enter_idle |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Common return path for PM functions that don't run from | 59 | * Common return path for PM functions that don't run from |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 672c21632f2f..8addb1220b4f 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -34,7 +34,6 @@ config BLACKFIN | |||
34 | select GENERIC_ATOMIC64 | 34 | select GENERIC_ATOMIC64 |
35 | select GENERIC_IRQ_PROBE | 35 | select GENERIC_IRQ_PROBE |
36 | select IRQ_PER_CPU if SMP | 36 | select IRQ_PER_CPU if SMP |
37 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
38 | 37 | ||
39 | config GENERIC_CSUM | 38 | config GENERIC_CSUM |
40 | def_bool y | 39 | def_bool y |
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index acb83799a215..2641731f24cd 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug | |||
@@ -59,7 +59,7 @@ config EXACT_HWERR | |||
59 | be reported multiple cycles after the error happens. This delay | 59 | be reported multiple cycles after the error happens. This delay |
60 | can cause the wrong application, or even the kernel to receive a | 60 | can cause the wrong application, or even the kernel to receive a |
61 | signal to be killed. If you are getting HW errors in your system, | 61 | signal to be killed. If you are getting HW errors in your system, |
62 | try turning this on to ensure they are at least comming from the | 62 | try turning this on to ensure they are at least coming from the |
63 | proper thread. | 63 | proper thread. |
64 | 64 | ||
65 | On production systems, it is safe (and a small optimization) to say N. | 65 | On production systems, it is safe (and a small optimization) to say N. |
diff --git a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig index 362f59dd5228..ad0881ba30af 100644 --- a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig +++ b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig | |||
@@ -46,7 +46,6 @@ CONFIG_UNIX=y | |||
46 | # CONFIG_WIRELESS is not set | 46 | # CONFIG_WIRELESS is not set |
47 | CONFIG_BLK_DEV_LOOP=y | 47 | CONFIG_BLK_DEV_LOOP=y |
48 | CONFIG_BLK_DEV_RAM=y | 48 | CONFIG_BLK_DEV_RAM=y |
49 | # CONFIG_MISC_DEVICES is not set | ||
50 | # CONFIG_INPUT_MOUSEDEV is not set | 49 | # CONFIG_INPUT_MOUSEDEV is not set |
51 | CONFIG_INPUT_EVDEV=y | 50 | CONFIG_INPUT_EVDEV=y |
52 | # CONFIG_INPUT_KEYBOARD is not set | 51 | # CONFIG_INPUT_KEYBOARD is not set |
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig index 6883803e6ca8..580bf4296a14 100644 --- a/arch/blackfin/configs/BF538-EZKIT_defconfig +++ b/arch/blackfin/configs/BF538-EZKIT_defconfig | |||
@@ -70,7 +70,6 @@ CONFIG_MTD_ROM=m | |||
70 | CONFIG_MTD_PHYSMAP=m | 70 | CONFIG_MTD_PHYSMAP=m |
71 | CONFIG_MTD_NAND=m | 71 | CONFIG_MTD_NAND=m |
72 | CONFIG_BLK_DEV_RAM=y | 72 | CONFIG_BLK_DEV_RAM=y |
73 | # CONFIG_MISC_DEVICES is not set | ||
74 | CONFIG_NETDEVICES=y | 73 | CONFIG_NETDEVICES=y |
75 | CONFIG_PHYLIB=y | 74 | CONFIG_PHYLIB=y |
76 | CONFIG_SMSC_PHY=y | 75 | CONFIG_SMSC_PHY=y |
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig index b7c8451f26ac..77a27e31d6d1 100644 --- a/arch/blackfin/configs/BF561-ACVILON_defconfig +++ b/arch/blackfin/configs/BF561-ACVILON_defconfig | |||
@@ -63,7 +63,6 @@ CONFIG_BLK_DEV_LOOP=y | |||
63 | CONFIG_BLK_DEV_RAM=y | 63 | CONFIG_BLK_DEV_RAM=y |
64 | CONFIG_BLK_DEV_RAM_COUNT=2 | 64 | CONFIG_BLK_DEV_RAM_COUNT=2 |
65 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 65 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
66 | # CONFIG_MISC_DEVICES is not set | ||
67 | CONFIG_SCSI=y | 66 | CONFIG_SCSI=y |
68 | # CONFIG_SCSI_PROC_FS is not set | 67 | # CONFIG_SCSI_PROC_FS is not set |
69 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig index 97ebe09a7370..85014319672c 100644 --- a/arch/blackfin/configs/BlackStamp_defconfig +++ b/arch/blackfin/configs/BlackStamp_defconfig | |||
@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y | |||
58 | CONFIG_BLK_DEV_LOOP=y | 58 | CONFIG_BLK_DEV_LOOP=y |
59 | CONFIG_BLK_DEV_NBD=y | 59 | CONFIG_BLK_DEV_NBD=y |
60 | CONFIG_BLK_DEV_RAM=y | 60 | CONFIG_BLK_DEV_RAM=y |
61 | CONFIG_MISC_DEVICES=y | ||
61 | CONFIG_EEPROM_AT25=y | 62 | CONFIG_EEPROM_AT25=y |
62 | CONFIG_NETDEVICES=y | 63 | CONFIG_NETDEVICES=y |
63 | CONFIG_NET_ETHERNET=y | 64 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig index c2457543e58c..dbf750cd2db8 100644 --- a/arch/blackfin/configs/CM-BF527_defconfig +++ b/arch/blackfin/configs/CM-BF527_defconfig | |||
@@ -64,7 +64,6 @@ CONFIG_MTD_ROM=m | |||
64 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 64 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
65 | CONFIG_MTD_GPIO_ADDR=y | 65 | CONFIG_MTD_GPIO_ADDR=y |
66 | CONFIG_BLK_DEV_RAM=y | 66 | CONFIG_BLK_DEV_RAM=y |
67 | # CONFIG_MISC_DEVICES is not set | ||
68 | CONFIG_SCSI=y | 67 | CONFIG_SCSI=y |
69 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
70 | # CONFIG_SCSI_LOWLEVEL is not set | 69 | # CONFIG_SCSI_LOWLEVEL is not set |
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig index baf1c1573e5e..07ffbdae34ee 100644 --- a/arch/blackfin/configs/CM-BF533_defconfig +++ b/arch/blackfin/configs/CM-BF533_defconfig | |||
@@ -44,7 +44,6 @@ CONFIG_MTD_CFI=y | |||
44 | CONFIG_MTD_CFI_INTELEXT=y | 44 | CONFIG_MTD_CFI_INTELEXT=y |
45 | CONFIG_MTD_RAM=y | 45 | CONFIG_MTD_RAM=y |
46 | CONFIG_MTD_PHYSMAP=y | 46 | CONFIG_MTD_PHYSMAP=y |
47 | # CONFIG_MISC_DEVICES is not set | ||
48 | CONFIG_NETDEVICES=y | 47 | CONFIG_NETDEVICES=y |
49 | # CONFIG_NETDEV_1000 is not set | 48 | # CONFIG_NETDEV_1000 is not set |
50 | # CONFIG_NETDEV_10000 is not set | 49 | # CONFIG_NETDEV_10000 is not set |
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig index df267588efec..31d954216c05 100644 --- a/arch/blackfin/configs/CM-BF548_defconfig +++ b/arch/blackfin/configs/CM-BF548_defconfig | |||
@@ -63,7 +63,6 @@ CONFIG_MTD_RAM=y | |||
63 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 63 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
64 | CONFIG_MTD_PHYSMAP=y | 64 | CONFIG_MTD_PHYSMAP=y |
65 | CONFIG_BLK_DEV_RAM=y | 65 | CONFIG_BLK_DEV_RAM=y |
66 | # CONFIG_MISC_DEVICES is not set | ||
67 | CONFIG_SCSI=m | 66 | CONFIG_SCSI=m |
68 | CONFIG_BLK_DEV_SD=m | 67 | CONFIG_BLK_DEV_SD=m |
69 | # CONFIG_SCSI_LOWLEVEL is not set | 68 | # CONFIG_SCSI_LOWLEVEL is not set |
diff --git a/arch/blackfin/configs/DNP5370_defconfig b/arch/blackfin/configs/DNP5370_defconfig index f50313657f3e..b192acfae386 100644 --- a/arch/blackfin/configs/DNP5370_defconfig +++ b/arch/blackfin/configs/DNP5370_defconfig | |||
@@ -55,7 +55,6 @@ CONFIG_MTD_NAND=y | |||
55 | CONFIG_MTD_NAND_PLATFORM=y | 55 | CONFIG_MTD_NAND_PLATFORM=y |
56 | CONFIG_BLK_DEV_LOOP=y | 56 | CONFIG_BLK_DEV_LOOP=y |
57 | CONFIG_BLK_DEV_RAM=y | 57 | CONFIG_BLK_DEV_RAM=y |
58 | # CONFIG_MISC_DEVICES is not set | ||
59 | CONFIG_NETDEVICES=y | 58 | CONFIG_NETDEVICES=y |
60 | CONFIG_DAVICOM_PHY=y | 59 | CONFIG_DAVICOM_PHY=y |
61 | CONFIG_NET_ETHERNET=y | 60 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig index 7450127b6455..06e9f497faed 100644 --- a/arch/blackfin/configs/H8606_defconfig +++ b/arch/blackfin/configs/H8606_defconfig | |||
@@ -45,6 +45,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
45 | CONFIG_MTD_M25P80=y | 45 | CONFIG_MTD_M25P80=y |
46 | # CONFIG_M25PXX_USE_FAST_READ is not set | 46 | # CONFIG_M25PXX_USE_FAST_READ is not set |
47 | CONFIG_BLK_DEV_RAM=y | 47 | CONFIG_BLK_DEV_RAM=y |
48 | CONFIG_MISC_DEVICES=y | ||
48 | CONFIG_EEPROM_AT25=y | 49 | CONFIG_EEPROM_AT25=y |
49 | CONFIG_NETDEVICES=y | 50 | CONFIG_NETDEVICES=y |
50 | CONFIG_NET_ETHERNET=y | 51 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig index 853809510ee9..12e66cd7cdaa 100644 --- a/arch/blackfin/configs/SRV1_defconfig +++ b/arch/blackfin/configs/SRV1_defconfig | |||
@@ -48,6 +48,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
48 | CONFIG_MTD_UCLINUX=y | 48 | CONFIG_MTD_UCLINUX=y |
49 | CONFIG_MTD_NAND=m | 49 | CONFIG_MTD_NAND=m |
50 | CONFIG_BLK_DEV_RAM=y | 50 | CONFIG_BLK_DEV_RAM=y |
51 | CONFIG_MISC_DEVICES=y | ||
51 | CONFIG_EEPROM_AT25=m | 52 | CONFIG_EEPROM_AT25=m |
52 | CONFIG_NETDEVICES=y | 53 | CONFIG_NETDEVICES=y |
53 | # CONFIG_NETDEV_1000 is not set | 54 | # CONFIG_NETDEV_1000 is not set |
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h index 49762c6bb0d5..8a0fed16058f 100644 --- a/arch/blackfin/include/asm/bitops.h +++ b/arch/blackfin/include/asm/bitops.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm-generic/bitops/const_hweight.h> | 25 | #include <asm-generic/bitops/const_hweight.h> |
26 | #include <asm-generic/bitops/lock.h> | 26 | #include <asm-generic/bitops/lock.h> |
27 | 27 | ||
28 | #include <asm-generic/bitops/le.h> | ||
29 | #include <asm-generic/bitops/ext2-atomic.h> | 28 | #include <asm-generic/bitops/ext2-atomic.h> |
30 | 29 | ||
31 | #ifndef CONFIG_SMP | 30 | #ifndef CONFIG_SMP |
@@ -113,6 +112,9 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) | |||
113 | 112 | ||
114 | #endif /* CONFIG_SMP */ | 113 | #endif /* CONFIG_SMP */ |
115 | 114 | ||
115 | /* Needs to be after test_bit and friends */ | ||
116 | #include <asm-generic/bitops/le.h> | ||
117 | |||
116 | /* | 118 | /* |
117 | * hweightN: returns the hamming weight (i.e. the number | 119 | * hweightN: returns the hamming weight (i.e. the number |
118 | * of bits set) of a N-bit word | 120 | * of bits set) of a N-bit word |
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index 19e2c7c3e63a..44bd0cced725 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
@@ -19,11 +19,11 @@ | |||
19 | * Force strict CPU ordering. | 19 | * Force strict CPU ordering. |
20 | */ | 20 | */ |
21 | #define nop() __asm__ __volatile__ ("nop;\n\t" : : ) | 21 | #define nop() __asm__ __volatile__ ("nop;\n\t" : : ) |
22 | #define mb() __asm__ __volatile__ ("" : : : "memory") | 22 | #define smp_mb() mb() |
23 | #define rmb() __asm__ __volatile__ ("" : : : "memory") | 23 | #define smp_rmb() rmb() |
24 | #define wmb() __asm__ __volatile__ ("" : : : "memory") | 24 | #define smp_wmb() wmb() |
25 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) | 25 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
26 | #define read_barrier_depends() do { } while(0) | 26 | #define smp_read_barrier_depends() read_barrier_depends() |
27 | 27 | ||
28 | #ifdef CONFIG_SMP | 28 | #ifdef CONFIG_SMP |
29 | asmlinkage unsigned long __raw_xchg_1_asm(volatile void *ptr, unsigned long value); | 29 | asmlinkage unsigned long __raw_xchg_1_asm(volatile void *ptr, unsigned long value); |
@@ -37,16 +37,16 @@ asmlinkage unsigned long __raw_cmpxchg_4_asm(volatile void *ptr, | |||
37 | unsigned long new, unsigned long old); | 37 | unsigned long new, unsigned long old); |
38 | 38 | ||
39 | #ifdef __ARCH_SYNC_CORE_DCACHE | 39 | #ifdef __ARCH_SYNC_CORE_DCACHE |
40 | # define smp_mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) | 40 | /* Force Core data cache coherence */ |
41 | # define smp_rmb() do { barrier(); smp_check_barrier(); } while (0) | 41 | # define mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) |
42 | # define smp_wmb() do { barrier(); smp_mark_barrier(); } while (0) | 42 | # define rmb() do { barrier(); smp_check_barrier(); } while (0) |
43 | #define smp_read_barrier_depends() do { barrier(); smp_check_barrier(); } while (0) | 43 | # define wmb() do { barrier(); smp_mark_barrier(); } while (0) |
44 | 44 | # define read_barrier_depends() do { barrier(); smp_check_barrier(); } while (0) | |
45 | #else | 45 | #else |
46 | # define smp_mb() barrier() | 46 | # define mb() barrier() |
47 | # define smp_rmb() barrier() | 47 | # define rmb() barrier() |
48 | # define smp_wmb() barrier() | 48 | # define wmb() barrier() |
49 | #define smp_read_barrier_depends() barrier() | 49 | # define read_barrier_depends() do { } while (0) |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | 52 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |
@@ -99,10 +99,10 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
99 | 99 | ||
100 | #else /* !CONFIG_SMP */ | 100 | #else /* !CONFIG_SMP */ |
101 | 101 | ||
102 | #define smp_mb() barrier() | 102 | #define mb() barrier() |
103 | #define smp_rmb() barrier() | 103 | #define rmb() barrier() |
104 | #define smp_wmb() barrier() | 104 | #define wmb() barrier() |
105 | #define smp_read_barrier_depends() do { } while(0) | 105 | #define read_barrier_depends() do { } while (0) |
106 | 106 | ||
107 | struct __xchg_dummy { | 107 | struct __xchg_dummy { |
108 | unsigned long a[100]; | 108 | unsigned long a[100]; |
diff --git a/arch/blackfin/include/asm/traps.h b/arch/blackfin/include/asm/traps.h index 9fe0da612c09..70c4e511cae6 100644 --- a/arch/blackfin/include/asm/traps.h +++ b/arch/blackfin/include/asm/traps.h | |||
@@ -57,7 +57,7 @@ | |||
57 | #define HWC_x3(level) \ | 57 | #define HWC_x3(level) \ |
58 | "External Memory Addressing Error\n" | 58 | "External Memory Addressing Error\n" |
59 | #define EXC_0x04(level) \ | 59 | #define EXC_0x04(level) \ |
60 | "Unimplmented exception occured\n" \ | 60 | "Unimplmented exception occurred\n" \ |
61 | level " - Maybe you forgot to install a custom exception handler?\n" | 61 | level " - Maybe you forgot to install a custom exception handler?\n" |
62 | #define HWC_x12(level) \ | 62 | #define HWC_x12(level) \ |
63 | "Performance Monitor Overflow\n" | 63 | "Performance Monitor Overflow\n" |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index cdbe075de1dc..8b81dc04488a 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c | |||
@@ -268,7 +268,7 @@ void disable_gptimers(uint16_t mask) | |||
268 | _disable_gptimers(mask); | 268 | _disable_gptimers(mask); |
269 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) | 269 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) |
270 | if (mask & (1 << i)) | 270 | if (mask & (1 << i)) |
271 | group_regs[BFIN_TIMER_OCTET(i)]->status |= trun_mask[i]; | 271 | group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i]; |
272 | SSYNC(); | 272 | SSYNC(); |
273 | } | 273 | } |
274 | EXPORT_SYMBOL(disable_gptimers); | 274 | EXPORT_SYMBOL(disable_gptimers); |
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index b8cfe34989e4..9b80b152435e 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c | |||
@@ -181,7 +181,7 @@ static int bfin_set_hw_break(unsigned long addr, int len, enum kgdb_bptype type) | |||
181 | return -ENOSPC; | 181 | return -ENOSPC; |
182 | } | 182 | } |
183 | 183 | ||
184 | /* Becasue hardware data watchpoint impelemented in current | 184 | /* Because hardware data watchpoint impelemented in current |
185 | * Blackfin can not trigger an exception event as the hardware | 185 | * Blackfin can not trigger an exception event as the hardware |
186 | * instrction watchpoint does, we ignaore all data watch point here. | 186 | * instrction watchpoint does, we ignaore all data watch point here. |
187 | * They can be turned on easily after future blackfin design | 187 | * They can be turned on easily after future blackfin design |
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index a6dfa6b71e63..35e350cad9d9 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Licensed under the GPL-2 or later | 4 | * Licensed under the GPL-2 or later |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define pr_fmt(fmt) "module %s: " fmt | 7 | #define pr_fmt(fmt) "module %s: " fmt, mod->name |
8 | 8 | ||
9 | #include <linux/moduleloader.h> | 9 | #include <linux/moduleloader.h> |
10 | #include <linux/elf.h> | 10 | #include <linux/elf.h> |
@@ -57,8 +57,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
57 | dest = l1_inst_sram_alloc(s->sh_size); | 57 | dest = l1_inst_sram_alloc(s->sh_size); |
58 | mod->arch.text_l1 = dest; | 58 | mod->arch.text_l1 = dest; |
59 | if (dest == NULL) { | 59 | if (dest == NULL) { |
60 | pr_err("L1 inst memory allocation failed\n", | 60 | pr_err("L1 inst memory allocation failed\n"); |
61 | mod->name); | ||
62 | return -1; | 61 | return -1; |
63 | } | 62 | } |
64 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); | 63 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -70,8 +69,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
70 | dest = l1_data_sram_alloc(s->sh_size); | 69 | dest = l1_data_sram_alloc(s->sh_size); |
71 | mod->arch.data_a_l1 = dest; | 70 | mod->arch.data_a_l1 = dest; |
72 | if (dest == NULL) { | 71 | if (dest == NULL) { |
73 | pr_err("L1 data memory allocation failed\n", | 72 | pr_err("L1 data memory allocation failed\n"); |
74 | mod->name); | ||
75 | return -1; | 73 | return -1; |
76 | } | 74 | } |
77 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 75 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -83,8 +81,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
83 | dest = l1_data_sram_zalloc(s->sh_size); | 81 | dest = l1_data_sram_zalloc(s->sh_size); |
84 | mod->arch.bss_a_l1 = dest; | 82 | mod->arch.bss_a_l1 = dest; |
85 | if (dest == NULL) { | 83 | if (dest == NULL) { |
86 | pr_err("L1 data memory allocation failed\n", | 84 | pr_err("L1 data memory allocation failed\n"); |
87 | mod->name); | ||
88 | return -1; | 85 | return -1; |
89 | } | 86 | } |
90 | 87 | ||
@@ -93,8 +90,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
93 | dest = l1_data_B_sram_alloc(s->sh_size); | 90 | dest = l1_data_B_sram_alloc(s->sh_size); |
94 | mod->arch.data_b_l1 = dest; | 91 | mod->arch.data_b_l1 = dest; |
95 | if (dest == NULL) { | 92 | if (dest == NULL) { |
96 | pr_err("L1 data memory allocation failed\n", | 93 | pr_err("L1 data memory allocation failed\n"); |
97 | mod->name); | ||
98 | return -1; | 94 | return -1; |
99 | } | 95 | } |
100 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 96 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -104,8 +100,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
104 | dest = l1_data_B_sram_alloc(s->sh_size); | 100 | dest = l1_data_B_sram_alloc(s->sh_size); |
105 | mod->arch.bss_b_l1 = dest; | 101 | mod->arch.bss_b_l1 = dest; |
106 | if (dest == NULL) { | 102 | if (dest == NULL) { |
107 | pr_err("L1 data memory allocation failed\n", | 103 | pr_err("L1 data memory allocation failed\n"); |
108 | mod->name); | ||
109 | return -1; | 104 | return -1; |
110 | } | 105 | } |
111 | memset(dest, 0, s->sh_size); | 106 | memset(dest, 0, s->sh_size); |
@@ -117,8 +112,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
117 | dest = l2_sram_alloc(s->sh_size); | 112 | dest = l2_sram_alloc(s->sh_size); |
118 | mod->arch.text_l2 = dest; | 113 | mod->arch.text_l2 = dest; |
119 | if (dest == NULL) { | 114 | if (dest == NULL) { |
120 | pr_err("L2 SRAM allocation failed\n", | 115 | pr_err("L2 SRAM allocation failed\n"); |
121 | mod->name); | ||
122 | return -1; | 116 | return -1; |
123 | } | 117 | } |
124 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 118 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -130,8 +124,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
130 | dest = l2_sram_alloc(s->sh_size); | 124 | dest = l2_sram_alloc(s->sh_size); |
131 | mod->arch.data_l2 = dest; | 125 | mod->arch.data_l2 = dest; |
132 | if (dest == NULL) { | 126 | if (dest == NULL) { |
133 | pr_err("L2 SRAM allocation failed\n", | 127 | pr_err("L2 SRAM allocation failed\n"); |
134 | mod->name); | ||
135 | return -1; | 128 | return -1; |
136 | } | 129 | } |
137 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 130 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -143,8 +136,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
143 | dest = l2_sram_zalloc(s->sh_size); | 136 | dest = l2_sram_zalloc(s->sh_size); |
144 | mod->arch.bss_l2 = dest; | 137 | mod->arch.bss_l2 = dest; |
145 | if (dest == NULL) { | 138 | if (dest == NULL) { |
146 | pr_err("L2 SRAM allocation failed\n", | 139 | pr_err("L2 SRAM allocation failed\n"); |
147 | mod->name); | ||
148 | return -1; | 140 | return -1; |
149 | } | 141 | } |
150 | 142 | ||
@@ -160,9 +152,9 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
160 | 152 | ||
161 | int | 153 | int |
162 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, | 154 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, |
163 | unsigned int symindex, unsigned int relsec, struct module *me) | 155 | unsigned int symindex, unsigned int relsec, struct module *mod) |
164 | { | 156 | { |
165 | pr_err(".rel unsupported\n", me->name); | 157 | pr_err(".rel unsupported\n"); |
166 | return -ENOEXEC; | 158 | return -ENOEXEC; |
167 | } | 159 | } |
168 | 160 | ||
@@ -186,7 +178,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
186 | Elf32_Sym *sym; | 178 | Elf32_Sym *sym; |
187 | unsigned long location, value, size; | 179 | unsigned long location, value, size; |
188 | 180 | ||
189 | pr_debug("applying relocate section %u to %u\n", mod->name, | 181 | pr_debug("applying relocate section %u to %u\n", |
190 | relsec, sechdrs[relsec].sh_info); | 182 | relsec, sechdrs[relsec].sh_info); |
191 | 183 | ||
192 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { | 184 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { |
@@ -203,14 +195,14 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
203 | 195 | ||
204 | #ifdef CONFIG_SMP | 196 | #ifdef CONFIG_SMP |
205 | if (location >= COREB_L1_DATA_A_START) { | 197 | if (location >= COREB_L1_DATA_A_START) { |
206 | pr_err("cannot relocate in L1: %u (SMP kernel)", | 198 | pr_err("cannot relocate in L1: %u (SMP kernel)\n", |
207 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 199 | ELF32_R_TYPE(rel[i].r_info)); |
208 | return -ENOEXEC; | 200 | return -ENOEXEC; |
209 | } | 201 | } |
210 | #endif | 202 | #endif |
211 | 203 | ||
212 | pr_debug("location is %lx, value is %lx type is %d\n", | 204 | pr_debug("location is %lx, value is %lx type is %d\n", |
213 | mod->name, location, value, ELF32_R_TYPE(rel[i].r_info)); | 205 | location, value, ELF32_R_TYPE(rel[i].r_info)); |
214 | 206 | ||
215 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 207 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
216 | 208 | ||
@@ -230,11 +222,11 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
230 | case R_BFIN_PCREL12_JUMP_S: | 222 | case R_BFIN_PCREL12_JUMP_S: |
231 | case R_BFIN_PCREL10: | 223 | case R_BFIN_PCREL10: |
232 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", | 224 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", |
233 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 225 | ELF32_R_TYPE(rel[i].r_info)); |
234 | return -ENOEXEC; | 226 | return -ENOEXEC; |
235 | 227 | ||
236 | default: | 228 | default: |
237 | pr_err("unknown relocation: %u\n", mod->name, | 229 | pr_err("unknown relocation: %u\n", |
238 | ELF32_R_TYPE(rel[i].r_info)); | 230 | ELF32_R_TYPE(rel[i].r_info)); |
239 | return -ENOEXEC; | 231 | return -ENOEXEC; |
240 | } | 232 | } |
@@ -251,8 +243,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
251 | isram_memcpy((void *)location, &value, size); | 243 | isram_memcpy((void *)location, &value, size); |
252 | break; | 244 | break; |
253 | default: | 245 | default: |
254 | pr_err("invalid relocation for %#lx\n", | 246 | pr_err("invalid relocation for %#lx\n", location); |
255 | mod->name, location); | ||
256 | return -ENOEXEC; | 247 | return -ENOEXEC; |
257 | } | 248 | } |
258 | } | 249 | } |
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index 8c9a43daf80f..cdb4beb6bc8f 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
@@ -206,8 +206,14 @@ irqreturn_t bfin_gptmr0_interrupt(int irq, void *dev_id) | |||
206 | { | 206 | { |
207 | struct clock_event_device *evt = dev_id; | 207 | struct clock_event_device *evt = dev_id; |
208 | smp_mb(); | 208 | smp_mb(); |
209 | evt->event_handler(evt); | 209 | /* |
210 | * We want to ACK before we handle so that we can handle smaller timer | ||
211 | * intervals. This way if the timer expires again while we're handling | ||
212 | * things, we're more likely to see that 2nd int rather than swallowing | ||
213 | * it by ACKing the int at the end of this handler. | ||
214 | */ | ||
210 | bfin_gptmr0_ack(); | 215 | bfin_gptmr0_ack(); |
216 | evt->event_handler(evt); | ||
211 | return IRQ_HANDLED; | 217 | return IRQ_HANDLED; |
212 | } | 218 | } |
213 | 219 | ||
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 59c1df75e4de..655f25d139a7 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -98,7 +98,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) | |||
98 | /* send the appropriate signal to the user program */ | 98 | /* send the appropriate signal to the user program */ |
99 | switch (trapnr) { | 99 | switch (trapnr) { |
100 | 100 | ||
101 | /* This table works in conjuction with the one in ./mach-common/entry.S | 101 | /* This table works in conjunction with the one in ./mach-common/entry.S |
102 | * Some exceptions are handled there (in assembly, in exception space) | 102 | * Some exceptions are handled there (in assembly, in exception space) |
103 | * Some are handled here, (in C, in interrupt space) | 103 | * Some are handled here, (in C, in interrupt space) |
104 | * Some, like CPLB, are handled in both, where the normal path is | 104 | * Some, like CPLB, are handled in both, where the normal path is |
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index 3edbd8db6598..79caccea85ca 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S | |||
@@ -67,7 +67,7 @@ | |||
67 | * - DMA version, which do not suffer from this issue. DMA versions have | 67 | * - DMA version, which do not suffer from this issue. DMA versions have |
68 | * different name (prefixed by dma_ ), and are located in | 68 | * different name (prefixed by dma_ ), and are located in |
69 | * ../kernel/bfin_dma_5xx.c | 69 | * ../kernel/bfin_dma_5xx.c |
70 | * Using the dma related functions are recommended for transfering large | 70 | * Using the dma related functions are recommended for transferring large |
71 | * buffers in/out of FIFOs. | 71 | * buffers in/out of FIFOs. |
72 | */ | 72 | */ |
73 | 73 | ||
diff --git a/arch/blackfin/lib/memmove.S b/arch/blackfin/lib/memmove.S index 80c240acac60..4eca566237a4 100644 --- a/arch/blackfin/lib/memmove.S +++ b/arch/blackfin/lib/memmove.S | |||
@@ -60,7 +60,7 @@ ENTRY(_memmove) | |||
60 | [P0++] = R1; | 60 | [P0++] = R1; |
61 | 61 | ||
62 | CC = P2 == 0; /* any remaining bytes? */ | 62 | CC = P2 == 0; /* any remaining bytes? */ |
63 | P3 = I0; /* Ammend P3 to updated ptr. */ | 63 | P3 = I0; /* Amend P3 to updated ptr. */ |
64 | IF !CC JUMP .Lbytes; | 64 | IF !CC JUMP .Lbytes; |
65 | P3 = I1; | 65 | P3 = I1; |
66 | RTS; | 66 | RTS; |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 2c69785a7bbe..3fa335405b31 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -2530,7 +2530,7 @@ static struct resource bfin_pata_resources[] = { | |||
2530 | static struct pata_platform_info bfin_pata_platform_data = { | 2530 | static struct pata_platform_info bfin_pata_platform_data = { |
2531 | .ioport_shift = 0, | 2531 | .ioport_shift = 0, |
2532 | }; | 2532 | }; |
2533 | /* CompactFlash Storage Card Memory Mapped Adressing | 2533 | /* CompactFlash Storage Card Memory Mapped Addressing |
2534 | * /REG = A11 = 1 | 2534 | * /REG = A11 = 1 |
2535 | */ | 2535 | */ |
2536 | static struct resource bfin_pata_resources[] = { | 2536 | static struct resource bfin_pata_resources[] = { |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 46ab45704c89..f96933f48a7f 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -268,7 +268,7 @@ ENTRY(_handle_bad_cplb) | |||
268 | /* To get here, we just tried and failed to change a CPLB | 268 | /* To get here, we just tried and failed to change a CPLB |
269 | * so, handle things in trap_c (C code), by lowering to | 269 | * so, handle things in trap_c (C code), by lowering to |
270 | * IRQ5, just like we normally do. Since this is not a | 270 | * IRQ5, just like we normally do. Since this is not a |
271 | * "normal" return path, we have a do alot of stuff to | 271 | * "normal" return path, we have a do a lot of stuff to |
272 | * the stack to get ready so, we can fall through - we | 272 | * the stack to get ready so, we can fall through - we |
273 | * need to make a CPLB exception look like a normal exception | 273 | * need to make a CPLB exception look like a normal exception |
274 | */ | 274 | */ |
@@ -817,7 +817,7 @@ _new_old_task: | |||
817 | rets = [sp++]; | 817 | rets = [sp++]; |
818 | 818 | ||
819 | /* | 819 | /* |
820 | * When we come out of resume, r0 carries "old" task, becuase we are | 820 | * When we come out of resume, r0 carries "old" task, because we are |
821 | * in "new" task. | 821 | * in "new" task. |
822 | */ | 822 | */ |
823 | rts; | 823 | rts; |
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 581e2b0a71ac..76de5724c1e3 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -174,7 +174,7 @@ ENTRY(__start) | |||
174 | sp.l = lo(KERNEL_CLOCK_STACK); | 174 | sp.l = lo(KERNEL_CLOCK_STACK); |
175 | sp.h = hi(KERNEL_CLOCK_STACK); | 175 | sp.h = hi(KERNEL_CLOCK_STACK); |
176 | call _init_clocks; | 176 | call _init_clocks; |
177 | sp = usp; /* usp hasnt been touched, so restore from there */ | 177 | sp = usp; /* usp hasn't been touched, so restore from there */ |
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* This section keeps the processor in supervisor mode | 180 | /* This section keeps the processor in supervisor mode |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 6e17a265c4d3..8bce5ed031e4 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -109,10 +109,23 @@ static void ipi_flush_icache(void *info) | |||
109 | struct blackfin_flush_data *fdata = info; | 109 | struct blackfin_flush_data *fdata = info; |
110 | 110 | ||
111 | /* Invalidate the memory holding the bounds of the flushed region. */ | 111 | /* Invalidate the memory holding the bounds of the flushed region. */ |
112 | invalidate_dcache_range((unsigned long)fdata, | 112 | blackfin_dcache_invalidate_range((unsigned long)fdata, |
113 | (unsigned long)fdata + sizeof(*fdata)); | 113 | (unsigned long)fdata + sizeof(*fdata)); |
114 | |||
115 | /* Make sure all write buffers in the data side of the core | ||
116 | * are flushed before trying to invalidate the icache. This | ||
117 | * needs to be after the data flush and before the icache | ||
118 | * flush so that the SSYNC does the right thing in preventing | ||
119 | * the instruction prefetcher from hitting things in cached | ||
120 | * memory at the wrong time -- it runs much further ahead than | ||
121 | * the pipeline. | ||
122 | */ | ||
123 | SSYNC(); | ||
114 | 124 | ||
115 | flush_icache_range(fdata->start, fdata->end); | 125 | /* ipi_flaush_icache is invoked by generic flush_icache_range, |
126 | * so call blackfin arch icache flush directly here. | ||
127 | */ | ||
128 | blackfin_icache_flush_range(fdata->start, fdata->end); | ||
116 | } | 129 | } |
117 | 130 | ||
118 | static void ipi_call_function(unsigned int cpu, struct ipi_message *msg) | 131 | static void ipi_call_function(unsigned int cpu, struct ipi_message *msg) |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 617925ddd142..a6d03069d0ff 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -55,7 +55,6 @@ config CRIS | |||
55 | default y | 55 | default y |
56 | select HAVE_IDE | 56 | select HAVE_IDE |
57 | select HAVE_GENERIC_HARDIRQS | 57 | select HAVE_GENERIC_HARDIRQS |
58 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
59 | select GENERIC_IRQ_SHOW | 58 | select GENERIC_IRQ_SHOW |
60 | 59 | ||
61 | config HZ | 60 | config HZ |
diff --git a/arch/cris/arch-v10/README.mm b/arch/cris/arch-v10/README.mm index 517d1f027fe8..67731d75cb51 100644 --- a/arch/cris/arch-v10/README.mm +++ b/arch/cris/arch-v10/README.mm | |||
@@ -38,7 +38,7 @@ space. We also use it to keep the user-mode virtual mapping in the same | |||
38 | map during kernel-mode, so that the kernel easily can access the corresponding | 38 | map during kernel-mode, so that the kernel easily can access the corresponding |
39 | user-mode process' data. | 39 | user-mode process' data. |
40 | 40 | ||
41 | As a comparision, the Linux/i386 2.0 puts the kernel and physical RAM at | 41 | As a comparison, the Linux/i386 2.0 puts the kernel and physical RAM at |
42 | address 0, overlapping with the user-mode virtual space, so that descriptor | 42 | address 0, overlapping with the user-mode virtual space, so that descriptor |
43 | registers are needed for each memory access to specify which MMU space to | 43 | registers are needed for each memory access to specify which MMU space to |
44 | map through. That changed in 2.2, putting the kernel/physical RAM at | 44 | map through. That changed in 2.2, putting the kernel/physical RAM at |
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index 399dc1ec8e6f..850265373611 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/sync_serial.h> | 31 | #include <asm/sync_serial.h> |
32 | #include <arch/io_interface_mux.h> | 32 | #include <arch/io_interface_mux.h> |
33 | 33 | ||
34 | /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ | 34 | /* The receiver is a bit tricky because of the continuous stream of data.*/ |
35 | /* */ | 35 | /* */ |
36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ | 36 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ |
37 | /* responsible for port->bufchunk of a common buffer. */ | 37 | /* responsible for port->bufchunk of a common buffer. */ |
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 3d751250271b..7b155f8203b8 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c | |||
@@ -215,7 +215,7 @@ static struct mtd_partition main_partition = { | |||
215 | }; | 215 | }; |
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | /* Auxilliary partition if we find another flash */ | 218 | /* Auxiliary partition if we find another flash */ |
219 | static struct mtd_partition aux_partition = { | 219 | static struct mtd_partition aux_partition = { |
220 | .name = "aux", | 220 | .name = "aux", |
221 | .size = 0, | 221 | .size = 0, |
diff --git a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c index 25d6f2b3a721..f58f2c1c5295 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-a3/nandflash.c | |||
@@ -165,7 +165,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
165 | /* Enable the following for a flash based bad block table */ | 165 | /* Enable the following for a flash based bad block table */ |
166 | /* this->options = NAND_USE_FLASH_BBT; */ | 166 | /* this->options = NAND_USE_FLASH_BBT; */ |
167 | 167 | ||
168 | /* Scan to find existance of the device */ | 168 | /* Scan to find existence of the device */ |
169 | if (nand_scan(crisv32_mtd, 1)) { | 169 | if (nand_scan(crisv32_mtd, 1)) { |
170 | err = -ENXIO; | 170 | err = -ENXIO; |
171 | goto out_mtd; | 171 | goto out_mtd; |
diff --git a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c index c5a0f54763cc..d5b0cc9f976b 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/nandflash.c +++ b/arch/cris/arch-v32/drivers/mach-fs/nandflash.c | |||
@@ -156,7 +156,7 @@ struct mtd_info *__init crisv32_nand_flash_probe(void) | |||
156 | /* Enable the following for a flash based bad block table */ | 156 | /* Enable the following for a flash based bad block table */ |
157 | /* this->options = NAND_USE_FLASH_BBT; */ | 157 | /* this->options = NAND_USE_FLASH_BBT; */ |
158 | 158 | ||
159 | /* Scan to find existance of the device */ | 159 | /* Scan to find existence of the device */ |
160 | if (nand_scan(crisv32_mtd, 1)) { | 160 | if (nand_scan(crisv32_mtd, 1)) { |
161 | err = -ENXIO; | 161 | err = -ENXIO; |
162 | goto out_ior; | 162 | goto out_ior; |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index c8637a9195ea..a6a180bc566f 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/sync_serial.h> | 33 | #include <asm/sync_serial.h> |
34 | 34 | ||
35 | 35 | ||
36 | /* The receiver is a bit tricky beacuse of the continuous stream of data.*/ | 36 | /* The receiver is a bit tricky because of the continuous stream of data.*/ |
37 | /* */ | 37 | /* */ |
38 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ | 38 | /* Three DMA descriptors are linked together. Each DMA descriptor is */ |
39 | /* responsible for port->bufchunk of a common buffer. */ | 39 | /* responsible for port->bufchunk of a common buffer. */ |
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 0ecb50b8f0d9..3abf12c23e5f 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
@@ -182,7 +182,7 @@ _syscall_traced: | |||
182 | move.d $r0, [$sp] | 182 | move.d $r0, [$sp] |
183 | 183 | ||
184 | ;; The registers carrying parameters (R10-R13) are intact. The optional | 184 | ;; The registers carrying parameters (R10-R13) are intact. The optional |
185 | ;; fifth and sixth parameters is in MOF and SRP respectivly. Put them | 185 | ;; fifth and sixth parameters is in MOF and SRP respectively. Put them |
186 | ;; back on the stack. | 186 | ;; back on the stack. |
187 | subq 4, $sp | 187 | subq 4, $sp |
188 | move $srp, [$sp] | 188 | move $srp, [$sp] |
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index 8023176e19b2..68a1a5901ca5 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
@@ -374,7 +374,7 @@ crisv32_do_multiple(struct pt_regs* regs) | |||
374 | irq_enter(); | 374 | irq_enter(); |
375 | 375 | ||
376 | for (i = 0; i < NBR_REGS; i++) { | 376 | for (i = 0; i < NBR_REGS; i++) { |
377 | /* Get which IRQs that happend. */ | 377 | /* Get which IRQs that happened. */ |
378 | masked[i] = REG_RD_INT_VECT(intr_vect, irq_regs[cpu], | 378 | masked[i] = REG_RD_INT_VECT(intr_vect, irq_regs[cpu], |
379 | r_masked_vect, i); | 379 | r_masked_vect, i); |
380 | 380 | ||
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index 6b653323d796..c0343c3ea7f8 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
@@ -925,7 +925,7 @@ stub_is_stopped(int sigval) | |||
925 | 925 | ||
926 | if (reg.eda >= bp_d_regs[bp * 2] && | 926 | if (reg.eda >= bp_d_regs[bp * 2] && |
927 | reg.eda <= bp_d_regs[bp * 2 + 1]) { | 927 | reg.eda <= bp_d_regs[bp * 2 + 1]) { |
928 | /* EDA withing range for this BP; it must be the one | 928 | /* EDA within range for this BP; it must be the one |
929 | we're looking for. */ | 929 | we're looking for. */ |
930 | stopped_data_address = reg.eda; | 930 | stopped_data_address = reg.eda; |
931 | break; | 931 | break; |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 562f84718906..0570e8ce603d 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -149,7 +149,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp, | |||
149 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ | 149 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ |
150 | 150 | ||
151 | /* Set a new TLS ? | 151 | /* Set a new TLS ? |
152 | * The TLS is in $mof beacuse it is the 5th argument to sys_clone. | 152 | * The TLS is in $mof because it is the 5th argument to sys_clone. |
153 | */ | 153 | */ |
154 | if (p->mm && (clone_flags & CLONE_SETTLS)) { | 154 | if (p->mm && (clone_flags & CLONE_SETTLS)) { |
155 | task_thread_info(p)->tls = regs->mof; | 155 | task_thread_info(p)->tls = regs->mof; |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index b3a05ae56214..ce4ab1a5552c 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -610,7 +610,7 @@ ugdb_trap_user(struct thread_info *ti, int sig) | |||
610 | user_regs(ti)->spc = 0; | 610 | user_regs(ti)->spc = 0; |
611 | } | 611 | } |
612 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA | 612 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA |
613 | not withing any configured h/w breakpoint range). Synchronize with | 613 | not within any configured h/w breakpoint range). Synchronize with |
614 | what already exists for kernel debugging. */ | 614 | what already exists for kernel debugging. */ |
615 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { | 615 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { |
616 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ | 616 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ |
diff --git a/arch/cris/arch-v32/mach-a3/arbiter.c b/arch/cris/arch-v32/mach-a3/arbiter.c index 8b924db71c9a..15f5c9de2639 100644 --- a/arch/cris/arch-v32/mach-a3/arbiter.c +++ b/arch/cris/arch-v32/mach-a3/arbiter.c | |||
@@ -568,7 +568,7 @@ crisv32_foo_arbiter_irq(int irq, void *dev_id) | |||
568 | REG_WR(marb_foo_bp, watch->instance, rw_ack, ack); | 568 | REG_WR(marb_foo_bp, watch->instance, rw_ack, ack); |
569 | REG_WR(marb_foo, regi_marb_foo, rw_ack_intr, ack_intr); | 569 | REG_WR(marb_foo, regi_marb_foo, rw_ack_intr, ack_intr); |
570 | 570 | ||
571 | printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs()); | 571 | printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs()); |
572 | 572 | ||
573 | if (watch->cb) | 573 | if (watch->cb) |
574 | watch->cb(); | 574 | watch->cb(); |
@@ -624,7 +624,7 @@ crisv32_bar_arbiter_irq(int irq, void *dev_id) | |||
624 | REG_WR(marb_bar_bp, watch->instance, rw_ack, ack); | 624 | REG_WR(marb_bar_bp, watch->instance, rw_ack, ack); |
625 | REG_WR(marb_bar, regi_marb_bar, rw_ack_intr, ack_intr); | 625 | REG_WR(marb_bar, regi_marb_bar, rw_ack_intr, ack_intr); |
626 | 626 | ||
627 | printk(KERN_DEBUG "IRQ occured at %X\n", (unsigned)get_irq_regs()->erp); | 627 | printk(KERN_DEBUG "IRQ occurred at %X\n", (unsigned)get_irq_regs()->erp); |
628 | 628 | ||
629 | if (watch->cb) | 629 | if (watch->cb) |
630 | watch->cb(); | 630 | watch->cb(); |
diff --git a/arch/cris/arch-v32/mach-fs/arbiter.c b/arch/cris/arch-v32/mach-fs/arbiter.c index 82ef293c4c81..3f8ebb5c1477 100644 --- a/arch/cris/arch-v32/mach-fs/arbiter.c +++ b/arch/cris/arch-v32/mach-fs/arbiter.c | |||
@@ -395,7 +395,7 @@ static irqreturn_t crisv32_arbiter_irq(int irq, void *dev_id) | |||
395 | REG_WR(marb_bp, watch->instance, rw_ack, ack); | 395 | REG_WR(marb_bp, watch->instance, rw_ack, ack); |
396 | REG_WR(marb, regi_marb, rw_ack_intr, ack_intr); | 396 | REG_WR(marb, regi_marb, rw_ack_intr, ack_intr); |
397 | 397 | ||
398 | printk(KERN_INFO "IRQ occured at %lX\n", get_irq_regs()->erp); | 398 | printk(KERN_INFO "IRQ occurred at %lX\n", get_irq_regs()->erp); |
399 | 399 | ||
400 | if (watch->cb) | 400 | if (watch->cb) |
401 | watch->cb(); | 401 | watch->cb(); |
diff --git a/arch/cris/boot/rescue/head_v10.S b/arch/cris/boot/rescue/head_v10.S index 2fafe247a25b..af55df0994b3 100644 --- a/arch/cris/boot/rescue/head_v10.S +++ b/arch/cris/boot/rescue/head_v10.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * for each partition that this code should check. | 7 | * for each partition that this code should check. |
8 | * | 8 | * |
9 | * If any of the checksums fail, we assume the flash is so | 9 | * If any of the checksums fail, we assume the flash is so |
10 | * corrupt that we cant use it to boot into the ftp flash | 10 | * corrupt that we can't use it to boot into the ftp flash |
11 | * loader, and instead we initialize the serial port to | 11 | * loader, and instead we initialize the serial port to |
12 | * receive a flash-loader and new flash image. we dont include | 12 | * receive a flash-loader and new flash image. we dont include |
13 | * any flash code here, but just accept a certain amount of | 13 | * any flash code here, but just accept a certain amount of |
diff --git a/arch/cris/include/arch-v32/arch/hwregs/Makefile b/arch/cris/include/arch-v32/arch/hwregs/Makefile index f9a05d2aa061..b8b3f8d666e4 100644 --- a/arch/cris/include/arch-v32/arch/hwregs/Makefile +++ b/arch/cris/include/arch-v32/arch/hwregs/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile to generate or copy the latest register definitions | 1 | # Makefile to generate or copy the latest register definitions |
2 | # and related datastructures and helpermacros. | 2 | # and related datastructures and helpermacros. |
3 | # The offical place for these files is at: | 3 | # The official place for these files is at: |
4 | RELEASE ?= r1_alfa5 | 4 | RELEASE ?= r1_alfa5 |
5 | OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ | 5 | OFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ |
6 | 6 | ||
diff --git a/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile b/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile index a90056a095e3..0747a22e3c07 100644 --- a/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile +++ b/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $ | 1 | # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $ |
2 | # Makefile to generate or copy the latest register definitions | 2 | # Makefile to generate or copy the latest register definitions |
3 | # and related datastructures and helpermacros. | 3 | # and related datastructures and helpermacros. |
4 | # The offical place for these files is probably at: | 4 | # The official place for these files is probably at: |
5 | RELEASE ?= r1_alfa5 | 5 | RELEASE ?= r1_alfa5 |
6 | IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ | 6 | IOPOFFICIAL_INCDIR = /n/asic/projects/guinness/releases/$(RELEASE)/design/top/sw/include/ |
7 | 7 | ||
diff --git a/arch/cris/include/asm/pgtable.h b/arch/cris/include/asm/pgtable.h index 9eaae217b21b..7df430138355 100644 --- a/arch/cris/include/asm/pgtable.h +++ b/arch/cris/include/asm/pgtable.h | |||
@@ -97,7 +97,7 @@ extern unsigned long empty_zero_page; | |||
97 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) | 97 | #define pte_clear(mm,addr,xp) do { pte_val(*(xp)) = 0; } while (0) |
98 | 98 | ||
99 | #define pmd_none(x) (!pmd_val(x)) | 99 | #define pmd_none(x) (!pmd_val(x)) |
100 | /* by removing the _PAGE_KERNEL bit from the comparision, the same pmd_bad | 100 | /* by removing the _PAGE_KERNEL bit from the comparison, the same pmd_bad |
101 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. | 101 | * works for both _PAGE_TABLE and _KERNPG_TABLE pmd entries. |
102 | */ | 102 | */ |
103 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) | 103 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_KERNEL)) != _PAGE_TABLE) |
diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c index 541efbf09371..8da53f34c7a7 100644 --- a/arch/cris/kernel/traps.c +++ b/arch/cris/kernel/traps.c | |||
@@ -183,7 +183,7 @@ __initcall(oops_nmi_register); | |||
183 | 183 | ||
184 | /* | 184 | /* |
185 | * This gets called from entry.S when the watchdog has bitten. Show something | 185 | * This gets called from entry.S when the watchdog has bitten. Show something |
186 | * similiar to an Oops dump, and if the kernel is configured to be a nice | 186 | * similar to an Oops dump, and if the kernel is configured to be a nice |
187 | * doggy, then halt instead of reboot. | 187 | * doggy, then halt instead of reboot. |
188 | */ | 188 | */ |
189 | void | 189 | void |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 6db8aea5667f..064f62196745 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -7,7 +7,6 @@ config FRV | |||
7 | select HAVE_PERF_EVENTS | 7 | select HAVE_PERF_EVENTS |
8 | select HAVE_GENERIC_HARDIRQS | 8 | select HAVE_GENERIC_HARDIRQS |
9 | select GENERIC_IRQ_SHOW | 9 | select GENERIC_IRQ_SHOW |
10 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
11 | 10 | ||
12 | config ZONE_DMA | 11 | config ZONE_DMA |
13 | bool | 12 | bool |
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h index 0d5997909850..ef03baf5d89d 100644 --- a/arch/frv/include/asm/pci.h +++ b/arch/frv/include/asm/pci.h | |||
@@ -54,7 +54,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | /* | 56 | /* |
57 | * These are pretty much arbitary with the CoMEM implementation. | 57 | * These are pretty much arbitrary with the CoMEM implementation. |
58 | * We have the whole address space to ourselves. | 58 | * We have the whole address space to ourselves. |
59 | */ | 59 | */ |
60 | #define PCIBIOS_MIN_IO 0x100 | 60 | #define PCIBIOS_MIN_IO 0x100 |
diff --git a/arch/frv/include/asm/spr-regs.h b/arch/frv/include/asm/spr-regs.h index 01e6af5e99b8..d3883021f236 100644 --- a/arch/frv/include/asm/spr-regs.h +++ b/arch/frv/include/asm/spr-regs.h | |||
@@ -274,7 +274,7 @@ | |||
274 | #define MSR0_RD 0xc0000000 /* rounding mode */ | 274 | #define MSR0_RD 0xc0000000 /* rounding mode */ |
275 | #define MSR0_RD_NEAREST 0x00000000 /* - nearest */ | 275 | #define MSR0_RD_NEAREST 0x00000000 /* - nearest */ |
276 | #define MSR0_RD_ZERO 0x40000000 /* - zero */ | 276 | #define MSR0_RD_ZERO 0x40000000 /* - zero */ |
277 | #define MSR0_RD_POS_INF 0x80000000 /* - postive infinity */ | 277 | #define MSR0_RD_POS_INF 0x80000000 /* - positive infinity */ |
278 | #define MSR0_RD_NEG_INF 0xc0000000 /* - negative infinity */ | 278 | #define MSR0_RD_NEG_INF 0xc0000000 /* - negative infinity */ |
279 | 279 | ||
280 | /* | 280 | /* |
diff --git a/arch/frv/include/asm/virtconvert.h b/arch/frv/include/asm/virtconvert.h index 59788fa2a813..b26d70ab9111 100644 --- a/arch/frv/include/asm/virtconvert.h +++ b/arch/frv/include/asm/virtconvert.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* virtconvert.h: virtual/physical/page address convertion | 1 | /* virtconvert.h: virtual/physical/page address conversion |
2 | * | 2 | * |
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
diff --git a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S index bf35f33e48c9..06c5ae191e59 100644 --- a/arch/frv/kernel/entry-table.S +++ b/arch/frv/kernel/entry-table.S | |||
@@ -86,7 +86,7 @@ __break_usertrap_fixup_table: | |||
86 | .globl __break_kerneltrap_fixup_table | 86 | .globl __break_kerneltrap_fixup_table |
87 | __break_kerneltrap_fixup_table: | 87 | __break_kerneltrap_fixup_table: |
88 | 88 | ||
89 | # handler declaration for a sofware or program interrupt | 89 | # handler declaration for a software or program interrupt |
90 | .macro VECTOR_SOFTPROG tbr_tt, vec | 90 | .macro VECTOR_SOFTPROG tbr_tt, vec |
91 | .section .trap.user | 91 | .section .trap.user |
92 | .org \tbr_tt | 92 | .org \tbr_tt |
@@ -145,7 +145,7 @@ __break_kerneltrap_fixup_table: | |||
145 | .long \vec | 145 | .long \vec |
146 | .endm | 146 | .endm |
147 | 147 | ||
148 | # handler declaration for an MMU only sofware or program interrupt | 148 | # handler declaration for an MMU only software or program interrupt |
149 | .macro VECTOR_SP_MMU tbr_tt, vec | 149 | .macro VECTOR_SP_MMU tbr_tt, vec |
150 | #ifdef CONFIG_MMU | 150 | #ifdef CONFIG_MMU |
151 | VECTOR_SOFTPROG \tbr_tt, \vec | 151 | VECTOR_SOFTPROG \tbr_tt, \vec |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 931a1ac99ff1..e20322ffcaf8 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -3,7 +3,6 @@ config H8300 | |||
3 | default y | 3 | default y |
4 | select HAVE_IDE | 4 | select HAVE_IDE |
5 | select HAVE_GENERIC_HARDIRQS | 5 | select HAVE_GENERIC_HARDIRQS |
6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
7 | select GENERIC_IRQ_SHOW | 6 | select GENERIC_IRQ_SHOW |
8 | 7 | ||
9 | config SYMBOL_PREFIX | 8 | config SYMBOL_PREFIX |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index c4ea0925cdbd..e5cc56ae6ce3 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -414,11 +414,11 @@ config PERMIT_BSP_REMOVE | |||
414 | support. | 414 | support. |
415 | 415 | ||
416 | config FORCE_CPEI_RETARGET | 416 | config FORCE_CPEI_RETARGET |
417 | bool "Force assumption that CPEI can be re-targetted" | 417 | bool "Force assumption that CPEI can be re-targeted" |
418 | depends on PERMIT_BSP_REMOVE | 418 | depends on PERMIT_BSP_REMOVE |
419 | default n | 419 | default n |
420 | ---help--- | 420 | ---help--- |
421 | Say Y if you need to force the assumption that CPEI can be re-targetted to | 421 | Say Y if you need to force the assumption that CPEI can be re-targeted to |
422 | any cpu in the system. This hint is available via ACPI 3.0 specifications. | 422 | any cpu in the system. This hint is available via ACPI 3.0 specifications. |
423 | Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP. | 423 | Tiger4 systems are capable of re-directing CPEI to any CPU other than BSP. |
424 | This option it useful to enable this feature on older BIOS's as well. | 424 | This option it useful to enable this feature on older BIOS's as well. |
diff --git a/arch/ia64/include/asm/pal.h b/arch/ia64/include/asm/pal.h index 6a292505b396..2e69284df8e7 100644 --- a/arch/ia64/include/asm/pal.h +++ b/arch/ia64/include/asm/pal.h | |||
@@ -1669,7 +1669,7 @@ typedef union pal_vp_info_u { | |||
1669 | } pal_vp_info_u_t; | 1669 | } pal_vp_info_u_t; |
1670 | 1670 | ||
1671 | /* | 1671 | /* |
1672 | * Returns infomation about virtual processor features | 1672 | * Returns information about virtual processor features |
1673 | */ | 1673 | */ |
1674 | static inline s64 | 1674 | static inline s64 |
1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) | 1675 | ia64_pal_vp_info (u64 feature_set, u64 vp_buffer, u64 *vp_info, u64 *vmm_id) |
diff --git a/arch/ia64/include/asm/perfmon_default_smpl.h b/arch/ia64/include/asm/perfmon_default_smpl.h index 74724b24c2b7..a2d560c67230 100644 --- a/arch/ia64/include/asm/perfmon_default_smpl.h +++ b/arch/ia64/include/asm/perfmon_default_smpl.h | |||
@@ -67,8 +67,8 @@ typedef struct { | |||
67 | unsigned long ip; /* where did the overflow interrupt happened */ | 67 | unsigned long ip; /* where did the overflow interrupt happened */ |
68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ | 68 | unsigned long tstamp; /* ar.itc when entering perfmon intr. handler */ |
69 | 69 | ||
70 | unsigned short cpu; /* cpu on which the overflow occured */ | 70 | unsigned short cpu; /* cpu on which the overflow occurred */ |
71 | unsigned short set; /* event set active when overflow ocurred */ | 71 | unsigned short set; /* event set active when overflow occurred */ |
72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ | 72 | int tgid; /* thread group id (for NPTL, this is getpid()) */ |
73 | } pfm_default_smpl_entry_t; | 73 | } pfm_default_smpl_entry_t; |
74 | 74 | ||
diff --git a/arch/ia64/include/asm/sn/bte.h b/arch/ia64/include/asm/sn/bte.h index 96798d2da7c2..cc6c4dbf53af 100644 --- a/arch/ia64/include/asm/sn/bte.h +++ b/arch/ia64/include/asm/sn/bte.h | |||
@@ -216,7 +216,7 @@ extern void bte_error_handler(unsigned long); | |||
216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) | 216 | bte_copy(0, dest, len, ((mode) | BTE_ZERO_FILL), notification) |
217 | 217 | ||
218 | /* | 218 | /* |
219 | * The following is the prefered way of calling bte_unaligned_copy | 219 | * The following is the preferred way of calling bte_unaligned_copy |
220 | * If the copy is fully cache line aligned, then bte_copy is | 220 | * If the copy is fully cache line aligned, then bte_copy is |
221 | * used instead. Since bte_copy is inlined, this saves a call | 221 | * used instead. Since bte_copy is inlined, this saves a call |
222 | * stack. NOTE: bte_copy is called synchronously and does block | 222 | * stack. NOTE: bte_copy is called synchronously and does block |
diff --git a/arch/ia64/include/asm/sn/shub_mmr.h b/arch/ia64/include/asm/sn/shub_mmr.h index 7de1d1d4b71a..a84d870f4294 100644 --- a/arch/ia64/include/asm/sn/shub_mmr.h +++ b/arch/ia64/include/asm/sn/shub_mmr.h | |||
@@ -459,7 +459,7 @@ | |||
459 | /* ==================================================================== */ | 459 | /* ==================================================================== */ |
460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ | 460 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ |
461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ | 461 | /* and SHUB2 that it makes sense to define a geberic name for the MMR. */ |
462 | /* It is acceptible to use (for example) SH_IPI_INT to reference the */ | 462 | /* It is acceptable to use (for example) SH_IPI_INT to reference the */ |
463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ | 463 | /* the IPI MMR. The value of SH_IPI_INT is determined at runtime based */ |
464 | /* on the type of the SHUB. Do not use these #defines in performance */ | 464 | /* on the type of the SHUB. Do not use these #defines in performance */ |
465 | /* critical code or loops - there is a small performance penalty. */ | 465 | /* critical code or loops - there is a small performance penalty. */ |
diff --git a/arch/ia64/include/asm/sn/shubio.h b/arch/ia64/include/asm/sn/shubio.h index 6052422a22b3..ecb8a49476b6 100644 --- a/arch/ia64/include/asm/sn/shubio.h +++ b/arch/ia64/include/asm/sn/shubio.h | |||
@@ -1383,7 +1383,7 @@ typedef union ii_ibcr_u { | |||
1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * | 1383 | * response is capture in IXSM and IXSS, and IXSS[VALID] is set. The * |
1384 | * errant header is thereby captured, and no further spurious read * | 1384 | * errant header is thereby captured, and no further spurious read * |
1385 | * respones are captured until IXSS[VALID] is cleared by setting the * | 1385 | * respones are captured until IXSS[VALID] is cleared by setting the * |
1386 | * appropriate bit in IECLR.Everytime a spurious read response is * | 1386 | * appropriate bit in IECLR. Every time a spurious read response is * |
1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * | 1387 | * detected, the SPUR_RD bit of the PRB corresponding to the incoming * |
1388 | * message's SIDN field is set. This always happens, regarless of * | 1388 | * message's SIDN field is set. This always happens, regarless of * |
1389 | * whether a header is captured. The programmer should check * | 1389 | * whether a header is captured. The programmer should check * |
@@ -2738,7 +2738,7 @@ typedef union ii_ippr_u { | |||
2738 | /************************************************************************ | 2738 | /************************************************************************ |
2739 | * * | 2739 | * * |
2740 | * The following defines which were not formed into structures are * | 2740 | * The following defines which were not formed into structures are * |
2741 | * probably indentical to another register, and the name of the * | 2741 | * probably identical to another register, and the name of the * |
2742 | * register is provided against each of these registers. This * | 2742 | * register is provided against each of these registers. This * |
2743 | * information needs to be checked carefully * | 2743 | * information needs to be checked carefully * |
2744 | * * | 2744 | * * |
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c index d52f1f78eff2..1b811c61bdc6 100644 --- a/arch/ia64/kernel/cyclone.c +++ b/arch/ia64/kernel/cyclone.c | |||
@@ -31,7 +31,7 @@ static struct clocksource clocksource_cyclone = { | |||
31 | .rating = 300, | 31 | .rating = 300, |
32 | .read = read_cyclone, | 32 | .read = read_cyclone, |
33 | .mask = (1LL << 40) - 1, | 33 | .mask = (1LL << 40) - 1, |
34 | .mult = 0, /*to be caluclated*/ | 34 | .mult = 0, /*to be calculated*/ |
35 | .shift = 16, | 35 | .shift = 16, |
36 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 36 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
37 | }; | 37 | }; |
diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c index 5f637bbfcccd..30c644ea44c9 100644 --- a/arch/ia64/kernel/perfmon_default_smpl.c +++ b/arch/ia64/kernel/perfmon_default_smpl.c | |||
@@ -150,7 +150,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct | |||
150 | * current = task running at the time of the overflow. | 150 | * current = task running at the time of the overflow. |
151 | * | 151 | * |
152 | * per-task mode: | 152 | * per-task mode: |
153 | * - this is ususally the task being monitored. | 153 | * - this is usually the task being monitored. |
154 | * Under certain conditions, it might be a different task | 154 | * Under certain conditions, it might be a different task |
155 | * | 155 | * |
156 | * system-wide: | 156 | * system-wide: |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 44f11ee411c0..14ec641003da 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -703,7 +703,7 @@ int migrate_platform_irqs(unsigned int cpu) | |||
703 | data->chip->irq_disable(data); | 703 | data->chip->irq_disable(data); |
704 | data->chip->irq_set_affinity(data, mask, false); | 704 | data->chip->irq_set_affinity(data, mask, false); |
705 | data->chip->irq_enable(data); | 705 | data->chip->irq_enable(data); |
706 | printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); | 706 | printk ("Re-targeting CPEI to cpu %d\n", new_cpei_cpu); |
707 | } | 707 | } |
708 | } | 708 | } |
709 | if (!data) { | 709 | if (!data) { |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 0baa1bbb65fe..0e0e0cc9e392 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -43,7 +43,7 @@ int __ref arch_register_cpu(int num) | |||
43 | { | 43 | { |
44 | #ifdef CONFIG_ACPI | 44 | #ifdef CONFIG_ACPI |
45 | /* | 45 | /* |
46 | * If CPEI can be re-targetted or if this is not | 46 | * If CPEI can be re-targeted or if this is not |
47 | * CPEI target, then it is hotpluggable | 47 | * CPEI target, then it is hotpluggable |
48 | */ | 48 | */ |
49 | if (can_cpei_retarget() || !is_cpu_cpei_target(num)) | 49 | if (can_cpei_retarget() || !is_cpu_cpei_target(num)) |
diff --git a/arch/ia64/kvm/process.c b/arch/ia64/kvm/process.c index bb862fb224f2..b0398740b48d 100644 --- a/arch/ia64/kvm/process.c +++ b/arch/ia64/kvm/process.c | |||
@@ -987,7 +987,7 @@ static void vmm_sanity_check(struct kvm_vcpu *vcpu) | |||
987 | 987 | ||
988 | static void kvm_do_resume_op(struct kvm_vcpu *vcpu) | 988 | static void kvm_do_resume_op(struct kvm_vcpu *vcpu) |
989 | { | 989 | { |
990 | vmm_sanity_check(vcpu); /*Guarantee vcpu runing on healthy vmm!*/ | 990 | vmm_sanity_check(vcpu); /*Guarantee vcpu running on healthy vmm!*/ |
991 | 991 | ||
992 | if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) { | 992 | if (test_and_clear_bit(KVM_REQ_RESUME, &vcpu->requests)) { |
993 | vcpu_do_resume(vcpu); | 993 | vcpu_do_resume(vcpu); |
diff --git a/arch/ia64/lib/do_csum.S b/arch/ia64/lib/do_csum.S index 6bec2fc9f5b2..1a431a5cf86f 100644 --- a/arch/ia64/lib/do_csum.S +++ b/arch/ia64/lib/do_csum.S | |||
@@ -201,7 +201,7 @@ GLOBAL_ENTRY(do_csum) | |||
201 | ;; | 201 | ;; |
202 | (p6) adds result1[0]=1,result1[0] | 202 | (p6) adds result1[0]=1,result1[0] |
203 | (p9) br.cond.sptk .do_csum_exit // if (count == 1) exit | 203 | (p9) br.cond.sptk .do_csum_exit // if (count == 1) exit |
204 | // Fall through to caluculate the checksum, feeding result1[0] as | 204 | // Fall through to calculate the checksum, feeding result1[0] as |
205 | // the initial value in result1[0]. | 205 | // the initial value in result1[0]. |
206 | // | 206 | // |
207 | // Calculate the checksum loading two 8-byte words per loop. | 207 | // Calculate the checksum loading two 8-byte words per loop. |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 7f399f9d99c7..81a1f4e6bcd8 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -227,7 +227,7 @@ void sn_set_err_irq_affinity(unsigned int irq) | |||
227 | { | 227 | { |
228 | /* | 228 | /* |
229 | * On systems which support CPU disabling (SHub2), all error interrupts | 229 | * On systems which support CPU disabling (SHub2), all error interrupts |
230 | * are targetted at the boot CPU. | 230 | * are targeted at the boot CPU. |
231 | */ | 231 | */ |
232 | if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) | 232 | if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) |
233 | set_irq_affinity_info(irq, cpu_physical_id(0), 0); | 233 | set_irq_affinity_info(irq, cpu_physical_id(0), 0); |
@@ -412,7 +412,7 @@ sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info) | |||
412 | pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type]; | 412 | pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type]; |
413 | 413 | ||
414 | /* Don't force an interrupt if the irq has been disabled */ | 414 | /* Don't force an interrupt if the irq has been disabled */ |
415 | if (!irqd_irq_disabled(sn_irq_info->irq_irq) && | 415 | if (!irqd_irq_disabled(irq_get_irq_data(sn_irq_info->irq_irq)) && |
416 | pci_provider && pci_provider->force_interrupt) | 416 | pci_provider && pci_provider->force_interrupt) |
417 | (*pci_provider->force_interrupt)(sn_irq_info); | 417 | (*pci_provider->force_interrupt)(sn_irq_info); |
418 | } | 418 | } |
@@ -435,7 +435,7 @@ static void sn_check_intr(int irq, struct sn_irq_info *sn_irq_info) | |||
435 | /* | 435 | /* |
436 | * Bridge types attached to TIO (anything but PIC) do not need this WAR | 436 | * Bridge types attached to TIO (anything but PIC) do not need this WAR |
437 | * since they do not target Shub II interrupt registers. If that | 437 | * since they do not target Shub II interrupt registers. If that |
438 | * ever changes, this check needs to accomodate. | 438 | * ever changes, this check needs to accommodate. |
439 | */ | 439 | */ |
440 | if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC) | 440 | if (sn_irq_info->irq_bridge_type != PCIIO_ASIC_TYPE_PIC) |
441 | return; | 441 | return; |
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index c76d8dc3aea3..7aab87f48060 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -45,38 +45,6 @@ static int licenseID_open(struct inode *inode, struct file *file) | |||
45 | return single_open(file, licenseID_show, NULL); | 45 | return single_open(file, licenseID_show, NULL); |
46 | } | 46 | } |
47 | 47 | ||
48 | /* | ||
49 | * Enable forced interrupt by default. | ||
50 | * When set, the sn interrupt handler writes the force interrupt register on | ||
51 | * the bridge chip. The hardware will then send an interrupt message if the | ||
52 | * interrupt line is active. This mimics a level sensitive interrupt. | ||
53 | */ | ||
54 | extern int sn_force_interrupt_flag; | ||
55 | |||
56 | static int sn_force_interrupt_show(struct seq_file *s, void *p) | ||
57 | { | ||
58 | seq_printf(s, "Force interrupt is %s\n", | ||
59 | sn_force_interrupt_flag ? "enabled" : "disabled"); | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | static ssize_t sn_force_interrupt_write_proc(struct file *file, | ||
64 | const char __user *buffer, size_t count, loff_t *data) | ||
65 | { | ||
66 | char val; | ||
67 | |||
68 | if (copy_from_user(&val, buffer, 1)) | ||
69 | return -EFAULT; | ||
70 | |||
71 | sn_force_interrupt_flag = (val == '0') ? 0 : 1; | ||
72 | return count; | ||
73 | } | ||
74 | |||
75 | static int sn_force_interrupt_open(struct inode *inode, struct file *file) | ||
76 | { | ||
77 | return single_open(file, sn_force_interrupt_show, NULL); | ||
78 | } | ||
79 | |||
80 | static int coherence_id_show(struct seq_file *s, void *p) | 48 | static int coherence_id_show(struct seq_file *s, void *p) |
81 | { | 49 | { |
82 | seq_printf(s, "%d\n", partition_coherence_id()); | 50 | seq_printf(s, "%d\n", partition_coherence_id()); |
@@ -114,14 +82,6 @@ static const struct file_operations proc_license_id_fops = { | |||
114 | .release = single_release, | 82 | .release = single_release, |
115 | }; | 83 | }; |
116 | 84 | ||
117 | static const struct file_operations proc_sn_force_intr_fops = { | ||
118 | .open = sn_force_interrupt_open, | ||
119 | .read = seq_read, | ||
120 | .write = sn_force_interrupt_write_proc, | ||
121 | .llseek = seq_lseek, | ||
122 | .release = single_release, | ||
123 | }; | ||
124 | |||
125 | static const struct file_operations proc_coherence_id_fops = { | 85 | static const struct file_operations proc_coherence_id_fops = { |
126 | .open = coherence_id_open, | 86 | .open = coherence_id_open, |
127 | .read = seq_read, | 87 | .read = seq_read, |
@@ -149,8 +109,6 @@ void register_sn_procfs(void) | |||
149 | proc_create("system_serial_number", 0444, sgi_proc_dir, | 109 | proc_create("system_serial_number", 0444, sgi_proc_dir, |
150 | &proc_system_sn_fops); | 110 | &proc_system_sn_fops); |
151 | proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); | 111 | proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops); |
152 | proc_create("sn_force_interrupt", 0644, sgi_proc_dir, | ||
153 | &proc_sn_force_intr_fops); | ||
154 | proc_create("coherence_id", 0444, sgi_proc_dir, | 112 | proc_create("coherence_id", 0444, sgi_proc_dir, |
155 | &proc_coherence_id_fops); | 113 | &proc_coherence_id_fops); |
156 | proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); | 114 | proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c index c659ad5613a0..33def666a664 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c | |||
@@ -227,7 +227,7 @@ pcibr_dma_unmap(struct pci_dev *hwdev, dma_addr_t dma_handle, int direction) | |||
227 | * after doing the read. For PIC this routine then forces a fake interrupt | 227 | * after doing the read. For PIC this routine then forces a fake interrupt |
228 | * on another line, which is logically associated with the slot that the PIO | 228 | * on another line, which is logically associated with the slot that the PIO |
229 | * is addressed to. It then spins while watching the memory location that | 229 | * is addressed to. It then spins while watching the memory location that |
230 | * the interrupt is targetted to. When the interrupt response arrives, we | 230 | * the interrupt is targeted to. When the interrupt response arrives, we |
231 | * are sure that the DMA has landed in memory and it is safe for the driver | 231 | * are sure that the DMA has landed in memory and it is safe for the driver |
232 | * to proceed. For TIOCP use the Device(x) Write Request Buffer Flush | 232 | * to proceed. For TIOCP use the Device(x) Write Request Buffer Flush |
233 | * Bridge register since it ensures the data has entered the coherence domain, | 233 | * Bridge register since it ensures the data has entered the coherence domain, |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index b28d0908a402..736b808d2291 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -8,7 +8,6 @@ config M32R | |||
8 | select HAVE_KERNEL_BZIP2 | 8 | select HAVE_KERNEL_BZIP2 |
9 | select HAVE_KERNEL_LZMA | 9 | select HAVE_KERNEL_LZMA |
10 | select HAVE_GENERIC_HARDIRQS | 10 | select HAVE_GENERIC_HARDIRQS |
11 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
12 | select GENERIC_IRQ_PROBE | 11 | select GENERIC_IRQ_PROBE |
13 | select GENERIC_IRQ_SHOW | 12 | select GENERIC_IRQ_SHOW |
14 | 13 | ||
diff --git a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h index 2dc89d68b6d9..1feae9709f24 100644 --- a/arch/m32r/include/asm/m32104ut/m32104ut_pld.h +++ b/arch/m32r/include/asm/m32104ut/m32104ut_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on M32104UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32104UT board. |
8 | * Based on m32700ut_pld.h | 8 | * Based on m32700ut_pld.h |
9 | * | 9 | * |
10 | * Copyright (c) 2002 Takeo Takahashi | 10 | * Copyright (c) 2002 Takeo Takahashi |
diff --git a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h index 57623beb44cb..35294670b187 100644 --- a/arch/m32r/include/asm/m32700ut/m32700ut_pld.h +++ b/arch/m32r/include/asm/m32700ut/m32700ut_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on M32700UT board. | 7 | * Definitions for Programmable Logic Device(PLD) on M32700UT board. |
8 | * | 8 | * |
9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/opsput/opsput_pld.h b/arch/m32r/include/asm/opsput/opsput_pld.h index 3f11ea1aac2d..6901401fe9eb 100644 --- a/arch/m32r/include/asm/opsput/opsput_pld.h +++ b/arch/m32r/include/asm/opsput/opsput_pld.h | |||
@@ -4,7 +4,7 @@ | |||
4 | /* | 4 | /* |
5 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
6 | * | 6 | * |
7 | * Definitions for Programable Logic Device(PLD) on OPSPUT board. | 7 | * Definitions for Programmable Logic Device(PLD) on OPSPUT board. |
8 | * | 8 | * |
9 | * Copyright (c) 2002 Takeo Takahashi | 9 | * Copyright (c) 2002 Takeo Takahashi |
10 | * | 10 | * |
diff --git a/arch/m32r/include/asm/pgtable-2level.h b/arch/m32r/include/asm/pgtable-2level.h index bca3475f9595..9cdaf7350ef6 100644 --- a/arch/m32r/include/asm/pgtable-2level.h +++ b/arch/m32r/include/asm/pgtable-2level.h | |||
@@ -44,7 +44,7 @@ static inline int pgd_present(pgd_t pgd) { return 1; } | |||
44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 44 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * (pmds are folded into pgds so this doesnt get actually called, | 47 | * (pmds are folded into pgds so this doesn't get actually called, |
48 | * but the define is needed for a generic inline function.) | 48 | * but the define is needed for a generic inline function.) |
49 | */ | 49 | */ |
50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) | 50 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) |
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index b8ec002aef8e..2c9aeb453847 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -120,7 +120,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
120 | 120 | ||
121 | /* When running in the kernel we expect faults to occur only to | 121 | /* When running in the kernel we expect faults to occur only to |
122 | * addresses in user space. All other faults represent errors in the | 122 | * addresses in user space. All other faults represent errors in the |
123 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 123 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
124 | * erroneous fault occurring in a code path which already holds mmap_sem | 124 | * erroneous fault occurring in a code path which already holds mmap_sem |
125 | * we will deadlock attempting to validate the fault against the | 125 | * we will deadlock attempting to validate the fault against the |
126 | * address space. Luckily the kernel only validly references user | 126 | * address space. Luckily the kernel only validly references user |
@@ -128,7 +128,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, | |||
128 | * exceptions table. | 128 | * exceptions table. |
129 | * | 129 | * |
130 | * As the vast majority of faults will be valid we will only perform | 130 | * As the vast majority of faults will be valid we will only perform |
131 | * the source reference check when there is a possibilty of a deadlock. | 131 | * the source reference check when there is a possibility of a deadlock. |
132 | * Attempt to lock the address space, if we cannot we then validate the | 132 | * Attempt to lock the address space, if we cannot we then validate the |
133 | * source. If this is invalid we can skip the address space check, | 133 | * source. If this is invalid we can skip the address space check, |
134 | * thus avoiding the deadlock. | 134 | * thus avoiding the deadlock. |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 6e056d3c5d01..75531da02a40 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -5,7 +5,6 @@ config M68K | |||
5 | select HAVE_AOUT if MMU | 5 | select HAVE_AOUT if MMU |
6 | select GENERIC_ATOMIC64 if MMU | 6 | select GENERIC_ATOMIC64 if MMU |
7 | select HAVE_GENERIC_HARDIRQS if !MMU | 7 | select HAVE_GENERIC_HARDIRQS if !MMU |
8 | select GENERIC_HARDIRQS_NO_DEPRECATED if !MMU | ||
9 | 8 | ||
10 | config RWSEM_GENERIC_SPINLOCK | 9 | config RWSEM_GENERIC_SPINLOCK |
11 | bool | 10 | bool |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 5890897d28bf..b995513d527f 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -130,7 +130,7 @@ KEYBOARD_STATE kb_state; | |||
130 | * it's really hard to decide whether they're mouse or keyboard bytes. Since | 130 | * it's really hard to decide whether they're mouse or keyboard bytes. Since |
131 | * overruns usually occur when moving the Atari mouse rapidly, they're seen as | 131 | * overruns usually occur when moving the Atari mouse rapidly, they're seen as |
132 | * mouse bytes here. If this is wrong, only a make code of the keyboard gets | 132 | * mouse bytes here. If this is wrong, only a make code of the keyboard gets |
133 | * lost, which isn't too bad. Loosing a break code would be disastrous, | 133 | * lost, which isn't too bad. Losing a break code would be disastrous, |
134 | * because then the keyboard repeat strikes... | 134 | * because then the keyboard repeat strikes... |
135 | */ | 135 | */ |
136 | 136 | ||
diff --git a/arch/m68k/fpsp040/bindec.S b/arch/m68k/fpsp040/bindec.S index 72f1159cb804..f2e795231046 100644 --- a/arch/m68k/fpsp040/bindec.S +++ b/arch/m68k/fpsp040/bindec.S | |||
@@ -609,7 +609,7 @@ do_fint: | |||
609 | | A6. This test occurs only on the first pass. If the | 609 | | A6. This test occurs only on the first pass. If the |
610 | | result is exactly 10^LEN, decrement ILOG and divide | 610 | | result is exactly 10^LEN, decrement ILOG and divide |
611 | | the mantissa by 10. The calculation of 10^LEN cannot | 611 | | the mantissa by 10. The calculation of 10^LEN cannot |
612 | | be inexact, since all powers of ten upto 10^27 are exact | 612 | | be inexact, since all powers of ten up to 10^27 are exact |
613 | | in extended precision, so the use of a previous power-of-ten | 613 | | in extended precision, so the use of a previous power-of-ten |
614 | | table will introduce no error. | 614 | | table will introduce no error. |
615 | | | 615 | | |
diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S index 26e85e2b7a5e..78cb60f5bb4d 100644 --- a/arch/m68k/ifpsp060/src/fpsp.S +++ b/arch/m68k/ifpsp060/src/fpsp.S | |||
@@ -11813,7 +11813,7 @@ fmul_unfl_ena: | |||
11813 | bne.b fmul_unfl_ena_sd # no, sgl or dbl | 11813 | bne.b fmul_unfl_ena_sd # no, sgl or dbl |
11814 | 11814 | ||
11815 | # if the rnd mode is anything but RZ, then we have to re-do the above | 11815 | # if the rnd mode is anything but RZ, then we have to re-do the above |
11816 | # multiplication becuase we used RZ for all. | 11816 | # multiplication because we used RZ for all. |
11817 | fmov.l L_SCR3(%a6),%fpcr # set FPCR | 11817 | fmov.l L_SCR3(%a6),%fpcr # set FPCR |
11818 | 11818 | ||
11819 | fmul_unfl_ena_cont: | 11819 | fmul_unfl_ena_cont: |
@@ -18095,7 +18095,7 @@ fscc_mem_op: | |||
18095 | 18095 | ||
18096 | rts | 18096 | rts |
18097 | 18097 | ||
18098 | # addresing mode is post-increment. write the result byte. if the write | 18098 | # addressing mode is post-increment. write the result byte. if the write |
18099 | # fails then don't update the address register. if write passes then | 18099 | # fails then don't update the address register. if write passes then |
18100 | # call inc_areg() to update the address register. | 18100 | # call inc_areg() to update the address register. |
18101 | fscc_mem_inc: | 18101 | fscc_mem_inc: |
@@ -20876,7 +20876,7 @@ dst_get_dupper: | |||
20876 | swap %d0 # d0 now in upper word | 20876 | swap %d0 # d0 now in upper word |
20877 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp | 20877 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp |
20878 | tst.b FTEMP_EX(%a0) # test sign | 20878 | tst.b FTEMP_EX(%a0) # test sign |
20879 | bpl.b dst_get_dman # if postive, go process mantissa | 20879 | bpl.b dst_get_dman # if positive, go process mantissa |
20880 | bset &0x1f,%d0 # if negative, set sign | 20880 | bset &0x1f,%d0 # if negative, set sign |
20881 | dst_get_dman: | 20881 | dst_get_dman: |
20882 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa | 20882 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa |
@@ -22943,7 +22943,7 @@ tbl_ovfl_result: | |||
22943 | # FP_SRC(a6) = packed operand now as a binary FP number # | 22943 | # FP_SRC(a6) = packed operand now as a binary FP number # |
22944 | # # | 22944 | # # |
22945 | # ALGORITHM *********************************************************** # | 22945 | # ALGORITHM *********************************************************** # |
22946 | # Get the correct <ea> whihc is the value on the exception stack # | 22946 | # Get the correct <ea> which is the value on the exception stack # |
22947 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # | 22947 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # |
22948 | # Then, fetch the operand from memory. If the fetch fails, exit # | 22948 | # Then, fetch the operand from memory. If the fetch fails, exit # |
22949 | # through facc_in_x(). # | 22949 | # through facc_in_x(). # |
@@ -24096,7 +24096,7 @@ do_fint12: | |||
24096 | # A6. This test occurs only on the first pass. If the | 24096 | # A6. This test occurs only on the first pass. If the |
24097 | # result is exactly 10^LEN, decrement ILOG and divide | 24097 | # result is exactly 10^LEN, decrement ILOG and divide |
24098 | # the mantissa by 10. The calculation of 10^LEN cannot | 24098 | # the mantissa by 10. The calculation of 10^LEN cannot |
24099 | # be inexact, since all powers of ten upto 10^27 are exact | 24099 | # be inexact, since all powers of ten up to 10^27 are exact |
24100 | # in extended precision, so the use of a previous power-of-ten | 24100 | # in extended precision, so the use of a previous power-of-ten |
24101 | # table will introduce no error. | 24101 | # table will introduce no error. |
24102 | # | 24102 | # |
diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S index e71ba0ab013c..4aedef973cf6 100644 --- a/arch/m68k/ifpsp060/src/pfpsp.S +++ b/arch/m68k/ifpsp060/src/pfpsp.S | |||
@@ -7777,7 +7777,7 @@ dst_get_dupper: | |||
7777 | swap %d0 # d0 now in upper word | 7777 | swap %d0 # d0 now in upper word |
7778 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp | 7778 | lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp |
7779 | tst.b FTEMP_EX(%a0) # test sign | 7779 | tst.b FTEMP_EX(%a0) # test sign |
7780 | bpl.b dst_get_dman # if postive, go process mantissa | 7780 | bpl.b dst_get_dman # if positive, go process mantissa |
7781 | bset &0x1f,%d0 # if negative, set sign | 7781 | bset &0x1f,%d0 # if negative, set sign |
7782 | dst_get_dman: | 7782 | dst_get_dman: |
7783 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa | 7783 | mov.l FTEMP_HI(%a0),%d1 # get ms mantissa |
@@ -8244,7 +8244,7 @@ fmul_unfl_ena: | |||
8244 | bne.b fmul_unfl_ena_sd # no, sgl or dbl | 8244 | bne.b fmul_unfl_ena_sd # no, sgl or dbl |
8245 | 8245 | ||
8246 | # if the rnd mode is anything but RZ, then we have to re-do the above | 8246 | # if the rnd mode is anything but RZ, then we have to re-do the above |
8247 | # multiplication becuase we used RZ for all. | 8247 | # multiplication because we used RZ for all. |
8248 | fmov.l L_SCR3(%a6),%fpcr # set FPCR | 8248 | fmov.l L_SCR3(%a6),%fpcr # set FPCR |
8249 | 8249 | ||
8250 | fmul_unfl_ena_cont: | 8250 | fmul_unfl_ena_cont: |
@@ -12903,7 +12903,7 @@ store_fpreg_7: | |||
12903 | # FP_SRC(a6) = packed operand now as a binary FP number # | 12903 | # FP_SRC(a6) = packed operand now as a binary FP number # |
12904 | # # | 12904 | # # |
12905 | # ALGORITHM *********************************************************** # | 12905 | # ALGORITHM *********************************************************** # |
12906 | # Get the correct <ea> whihc is the value on the exception stack # | 12906 | # Get the correct <ea> which is the value on the exception stack # |
12907 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # | 12907 | # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. # |
12908 | # Then, fetch the operand from memory. If the fetch fails, exit # | 12908 | # Then, fetch the operand from memory. If the fetch fails, exit # |
12909 | # through facc_in_x(). # | 12909 | # through facc_in_x(). # |
@@ -14056,7 +14056,7 @@ do_fint12: | |||
14056 | # A6. This test occurs only on the first pass. If the | 14056 | # A6. This test occurs only on the first pass. If the |
14057 | # result is exactly 10^LEN, decrement ILOG and divide | 14057 | # result is exactly 10^LEN, decrement ILOG and divide |
14058 | # the mantissa by 10. The calculation of 10^LEN cannot | 14058 | # the mantissa by 10. The calculation of 10^LEN cannot |
14059 | # be inexact, since all powers of ten upto 10^27 are exact | 14059 | # be inexact, since all powers of ten up to 10^27 are exact |
14060 | # in extended precision, so the use of a previous power-of-ten | 14060 | # in extended precision, so the use of a previous power-of-ten |
14061 | # table will introduce no error. | 14061 | # table will introduce no error. |
14062 | # | 14062 | # |
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index f597892e43a0..656bbbf5a6ff 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h | |||
@@ -146,7 +146,7 @@ static inline void clear_mfp_bit( unsigned irq, int type ) | |||
146 | 146 | ||
147 | /* | 147 | /* |
148 | * {en,dis}able_irq have the usual semantics of temporary blocking the | 148 | * {en,dis}able_irq have the usual semantics of temporary blocking the |
149 | * interrupt, but not loosing requests that happen between disabling and | 149 | * interrupt, but not losing requests that happen between disabling and |
150 | * enabling. This is done with the MFP mask registers. | 150 | * enabling. This is done with the MFP mask registers. |
151 | */ | 151 | */ |
152 | 152 | ||
diff --git a/arch/m68k/include/asm/bootstd.h b/arch/m68k/include/asm/bootstd.h index bdc1a4ac4fe9..e518f5a575b7 100644 --- a/arch/m68k/include/asm/bootstd.h +++ b/arch/m68k/include/asm/bootstd.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define __BN_flash_write_range 20 | 31 | #define __BN_flash_write_range 20 |
32 | 32 | ||
33 | /* Calling conventions compatible to (uC)linux/68k | 33 | /* Calling conventions compatible to (uC)linux/68k |
34 | * We use simmilar macros to call into the bootloader as for uClinux | 34 | * We use similar macros to call into the bootloader as for uClinux |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #define __bsc_return(type, res) \ | 37 | #define __bsc_return(type, res) \ |
diff --git a/arch/m68k/include/asm/commproc.h b/arch/m68k/include/asm/commproc.h index edf5eb6c08d2..a73998528d26 100644 --- a/arch/m68k/include/asm/commproc.h +++ b/arch/m68k/include/asm/commproc.h | |||
@@ -88,7 +88,7 @@ typedef struct cpm_buf_desc { | |||
88 | 88 | ||
89 | 89 | ||
90 | /* rx bd status/control bits */ | 90 | /* rx bd status/control bits */ |
91 | #define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */ | 91 | #define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */ |
92 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor in table */ | 92 | #define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor in table */ |
93 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ | 93 | #define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */ |
94 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame OR control char */ | 94 | #define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame OR control char */ |
@@ -96,7 +96,7 @@ typedef struct cpm_buf_desc { | |||
96 | #define BD_SC_FIRST ((ushort)0x0400) /* 1st buffer in an HDLC frame */ | 96 | #define BD_SC_FIRST ((ushort)0x0400) /* 1st buffer in an HDLC frame */ |
97 | #define BD_SC_ADDR ((ushort)0x0400) /* 1st byte is a multidrop address */ | 97 | #define BD_SC_ADDR ((ushort)0x0400) /* 1st byte is a multidrop address */ |
98 | 98 | ||
99 | #define BD_SC_CM ((ushort)0x0200) /* Continous mode */ | 99 | #define BD_SC_CM ((ushort)0x0200) /* Continuous mode */ |
100 | #define BD_SC_ID ((ushort)0x0100) /* Received too many idles */ | 100 | #define BD_SC_ID ((ushort)0x0100) /* Received too many idles */ |
101 | 101 | ||
102 | #define BD_SC_AM ((ushort)0x0080) /* Multidrop address match */ | 102 | #define BD_SC_AM ((ushort)0x0080) /* Multidrop address match */ |
diff --git a/arch/m68k/include/asm/delay_no.h b/arch/m68k/include/asm/delay_no.h index 55cbd6294ab6..c3a0edc90f21 100644 --- a/arch/m68k/include/asm/delay_no.h +++ b/arch/m68k/include/asm/delay_no.h | |||
@@ -16,7 +16,7 @@ static inline void __delay(unsigned long loops) | |||
16 | * long word alignment which is the faster version. | 16 | * long word alignment which is the faster version. |
17 | * The 0x4a8e is of course a 'tstl %fp' instruction. This is better | 17 | * The 0x4a8e is of course a 'tstl %fp' instruction. This is better |
18 | * than using a NOP (0x4e71) instruction because it executes in one | 18 | * than using a NOP (0x4e71) instruction because it executes in one |
19 | * cycle not three and doesn't allow for an arbitary delay waiting | 19 | * cycle not three and doesn't allow for an arbitrary delay waiting |
20 | * for bus cycles to finish. Also fp/a6 isn't likely to cause a | 20 | * for bus cycles to finish. Also fp/a6 isn't likely to cause a |
21 | * stall waiting for the register to become valid if such is added | 21 | * stall waiting for the register to become valid if such is added |
22 | * to the coldfire at some stage. | 22 | * to the coldfire at some stage. |
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h index c64c7b74cf86..b2046839f4b2 100644 --- a/arch/m68k/include/asm/gpio.h +++ b/arch/m68k/include/asm/gpio.h | |||
@@ -31,7 +31,7 @@ | |||
31 | * GPIOs in a single control area, others have some GPIOs implemented in | 31 | * GPIOs in a single control area, others have some GPIOs implemented in |
32 | * different modules. | 32 | * different modules. |
33 | * | 33 | * |
34 | * This implementation attempts accomodate the differences while presenting | 34 | * This implementation attempts accommodate the differences while presenting |
35 | * a generic interface that will optimize to as few instructions as possible. | 35 | * a generic interface that will optimize to as few instructions as possible. |
36 | */ | 36 | */ |
37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ | 37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ |
diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h index 55d5a4c5fe0b..b6bf2c518bac 100644 --- a/arch/m68k/include/asm/m520xsim.h +++ b/arch/m68k/include/asm/m520xsim.h | |||
@@ -157,7 +157,7 @@ | |||
157 | #define MCFFEC_SIZE 0x800 /* Register set size */ | 157 | #define MCFFEC_SIZE 0x800 /* Register set size */ |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Reset Controll Unit. | 160 | * Reset Control Unit. |
161 | */ | 161 | */ |
162 | #define MCF_RCR 0xFC0A0000 | 162 | #define MCF_RCR 0xFC0A0000 |
163 | #define MCF_RSR 0xFC0A0001 | 163 | #define MCF_RSR 0xFC0A0001 |
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h index 8996df62ede4..6235921eca4e 100644 --- a/arch/m68k/include/asm/m523xsim.h +++ b/arch/m68k/include/asm/m523xsim.h | |||
@@ -48,7 +48,7 @@ | |||
48 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ | 48 | #define MCFSIM_DMR1 (MCF_IPSBAR + 0x54) /* Address mask 1 */ |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Reset Controll Unit (relative to IPSBAR). | 51 | * Reset Control Unit (relative to IPSBAR). |
52 | */ | 52 | */ |
53 | #define MCF_RCR 0x110000 | 53 | #define MCF_RCR 0x110000 |
54 | #define MCF_RSR 0x110001 | 54 | #define MCF_RSR 0x110001 |
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h index 74855a66c050..758810ef91ec 100644 --- a/arch/m68k/include/asm/m527xsim.h +++ b/arch/m68k/include/asm/m527xsim.h | |||
@@ -283,7 +283,7 @@ | |||
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * Reset Controll Unit (relative to IPSBAR). | 286 | * Reset Control Unit (relative to IPSBAR). |
287 | */ | 287 | */ |
288 | #define MCF_RCR 0x110000 | 288 | #define MCF_RCR 0x110000 |
289 | #define MCF_RSR 0x110001 | 289 | #define MCF_RSR 0x110001 |
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h index 4c94c01f36c4..8f8609fcc9b8 100644 --- a/arch/m68k/include/asm/m5307sim.h +++ b/arch/m68k/include/asm/m5307sim.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ | 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ |
30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ | 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ |
31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ | 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ |
32 | #define MCFSIM_PLLCR 0x08 /* PLL Controll Reg*/ | 32 | #define MCFSIM_PLLCR 0x08 /* PLL Control Reg*/ |
33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ | 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ |
34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ | 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ |
35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ | 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ |
diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h index 762c58c89050..51e00b00b8a6 100644 --- a/arch/m68k/include/asm/m5407sim.h +++ b/arch/m68k/include/asm/m5407sim.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ | 29 | #define MCFSIM_SWSR 0x03 /* SW Watchdog service (r/w) */ |
30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ | 30 | #define MCFSIM_PAR 0x04 /* Pin Assignment reg (r/w) */ |
31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ | 31 | #define MCFSIM_IRQPAR 0x06 /* Interrupt Assignment reg (r/w) */ |
32 | #define MCFSIM_PLLCR 0x08 /* PLL Controll Reg*/ | 32 | #define MCFSIM_PLLCR 0x08 /* PLL Control Reg*/ |
33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ | 33 | #define MCFSIM_MPARK 0x0C /* BUS Master Control Reg*/ |
34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ | 34 | #define MCFSIM_IPR 0x40 /* Interrupt Pend reg (r/w) */ |
35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ | 35 | #define MCFSIM_IMR 0x44 /* Interrupt Mask reg (r/w) */ |
diff --git a/arch/m68k/include/asm/m68360_quicc.h b/arch/m68k/include/asm/m68360_quicc.h index 6d40f4d18e10..59414cc108d3 100644 --- a/arch/m68k/include/asm/m68360_quicc.h +++ b/arch/m68k/include/asm/m68360_quicc.h | |||
@@ -32,7 +32,7 @@ struct user_data { | |||
32 | /* BASE + 0x000: user data memory */ | 32 | /* BASE + 0x000: user data memory */ |
33 | volatile unsigned char udata_bd_ucode[0x400]; /*user data bd's Ucode*/ | 33 | volatile unsigned char udata_bd_ucode[0x400]; /*user data bd's Ucode*/ |
34 | volatile unsigned char udata_bd[0x200]; /*user data Ucode */ | 34 | volatile unsigned char udata_bd[0x200]; /*user data Ucode */ |
35 | volatile unsigned char ucode_ext[0x100]; /*Ucode Extention ram */ | 35 | volatile unsigned char ucode_ext[0x100]; /*Ucode Extension ram */ |
36 | volatile unsigned char RESERVED1[0x500]; /* Reserved area */ | 36 | volatile unsigned char RESERVED1[0x500]; /* Reserved area */ |
37 | }; | 37 | }; |
38 | #else | 38 | #else |
diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 7221f7251934..3cf2b6ed685a 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h | |||
@@ -61,7 +61,7 @@ | |||
61 | /* | 61 | /* |
62 | * OSS Interrupt levels for various sub-systems | 62 | * OSS Interrupt levels for various sub-systems |
63 | * | 63 | * |
64 | * This mapping is layed out with two things in mind: first, we try to keep | 64 | * This mapping is laid out with two things in mind: first, we try to keep |
65 | * things on their own levels to avoid having to do double-dispatches. Second, | 65 | * things on their own levels to avoid having to do double-dispatches. Second, |
66 | * the levels match as closely as possible the alternate IRQ mapping mode (aka | 66 | * the levels match as closely as possible the alternate IRQ mapping mode (aka |
67 | * "A/UX mode") available on some VIA machines. | 67 | * "A/UX mode") available on some VIA machines. |
diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 39afb438b656..a59665e1d41b 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h | |||
@@ -204,7 +204,7 @@ | |||
204 | #define vT2CL 0x1000 /* [VIA only] Timer two counter low. */ | 204 | #define vT2CL 0x1000 /* [VIA only] Timer two counter low. */ |
205 | #define vT2CH 0x1200 /* [VIA only] Timer two counter high. */ | 205 | #define vT2CH 0x1200 /* [VIA only] Timer two counter high. */ |
206 | #define vSR 0x1400 /* [VIA only] Shift register. */ | 206 | #define vSR 0x1400 /* [VIA only] Shift register. */ |
207 | #define vACR 0x1600 /* [VIA only] Auxilary control register. */ | 207 | #define vACR 0x1600 /* [VIA only] Auxiliary control register. */ |
208 | #define vPCR 0x1800 /* [VIA only] Peripheral control register. */ | 208 | #define vPCR 0x1800 /* [VIA only] Peripheral control register. */ |
209 | /* CHRP sez never ever to *write* this. | 209 | /* CHRP sez never ever to *write* this. |
210 | * Mac family says never to *change* this. | 210 | * Mac family says never to *change* this. |
diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 50db3591ca15..c2a1c5eac1a6 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h | |||
@@ -14,7 +14,7 @@ extern void mac_init_IRQ(void); | |||
14 | extern int mac_irq_pending(unsigned int); | 14 | extern int mac_irq_pending(unsigned int); |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Floppy driver magic hook - probably shouldnt be here | 17 | * Floppy driver magic hook - probably shouldn't be here |
18 | */ | 18 | */ |
19 | 19 | ||
20 | extern void via1_set_head(int); | 20 | extern void via1_set_head(int); |
diff --git a/arch/m68k/include/asm/mcftimer.h b/arch/m68k/include/asm/mcftimer.h index 92b276fe8240..351c27237874 100644 --- a/arch/m68k/include/asm/mcftimer.h +++ b/arch/m68k/include/asm/mcftimer.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Bit definitions for the Timer Mode Register (TMR). | 29 | * Bit definitions for the Timer Mode Register (TMR). |
30 | * Register bit flags are common accross ColdFires. | 30 | * Register bit flags are common across ColdFires. |
31 | */ | 31 | */ |
32 | #define MCFTIMER_TMR_PREMASK 0xff00 /* Prescalar mask */ | 32 | #define MCFTIMER_TMR_PREMASK 0xff00 /* Prescalar mask */ |
33 | #define MCFTIMER_TMR_DISCE 0x0000 /* Disable capture */ | 33 | #define MCFTIMER_TMR_DISCE 0x0000 /* Disable capture */ |
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 26d851d385bb..29e17907d9f2 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -343,10 +343,14 @@ | |||
343 | #define __NR_fanotify_init 337 | 343 | #define __NR_fanotify_init 337 |
344 | #define __NR_fanotify_mark 338 | 344 | #define __NR_fanotify_mark 338 |
345 | #define __NR_prlimit64 339 | 345 | #define __NR_prlimit64 339 |
346 | #define __NR_name_to_handle_at 340 | ||
347 | #define __NR_open_by_handle_at 341 | ||
348 | #define __NR_clock_adjtime 342 | ||
349 | #define __NR_syncfs 343 | ||
346 | 350 | ||
347 | #ifdef __KERNEL__ | 351 | #ifdef __KERNEL__ |
348 | 352 | ||
349 | #define NR_syscalls 340 | 353 | #define NR_syscalls 344 |
350 | 354 | ||
351 | #define __ARCH_WANT_IPC_PARSE_VERSION | 355 | #define __ARCH_WANT_IPC_PARSE_VERSION |
352 | #define __ARCH_WANT_OLD_READDIR | 356 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/m68k/kernel/entry_mm.S b/arch/m68k/kernel/entry_mm.S index 1559dea36e55..1359ee659574 100644 --- a/arch/m68k/kernel/entry_mm.S +++ b/arch/m68k/kernel/entry_mm.S | |||
@@ -750,4 +750,8 @@ sys_call_table: | |||
750 | .long sys_fanotify_init | 750 | .long sys_fanotify_init |
751 | .long sys_fanotify_mark | 751 | .long sys_fanotify_mark |
752 | .long sys_prlimit64 | 752 | .long sys_prlimit64 |
753 | .long sys_name_to_handle_at /* 340 */ | ||
754 | .long sys_open_by_handle_at | ||
755 | .long sys_clock_adjtime | ||
756 | .long sys_syncfs | ||
753 | 757 | ||
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index ef54128baa0b..27622b3273c1 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S | |||
@@ -134,7 +134,7 @@ | |||
134 | * Thanks to a small helping routine enabling the mmu got quite simple | 134 | * Thanks to a small helping routine enabling the mmu got quite simple |
135 | * and there is only one way left. mmu_engage makes a complete a new mapping | 135 | * and there is only one way left. mmu_engage makes a complete a new mapping |
136 | * that only includes the absolute necessary to be able to jump to the final | 136 | * that only includes the absolute necessary to be able to jump to the final |
137 | * postion and to restore the original mapping. | 137 | * position and to restore the original mapping. |
138 | * As this code doesn't need a transparent translation register anymore this | 138 | * As this code doesn't need a transparent translation register anymore this |
139 | * means all registers are free to be used by machines that needs them for | 139 | * means all registers are free to be used by machines that needs them for |
140 | * other purposes. | 140 | * other purposes. |
@@ -969,7 +969,7 @@ L(mmu_init_amiga): | |||
969 | is_not_040_or_060(1f) | 969 | is_not_040_or_060(1f) |
970 | 970 | ||
971 | /* | 971 | /* |
972 | * 040: Map the 16Meg range physical 0x0 upto logical 0x8000.0000 | 972 | * 040: Map the 16Meg range physical 0x0 up to logical 0x8000.0000 |
973 | */ | 973 | */ |
974 | mmu_map #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S | 974 | mmu_map #0x80000000,#0,#0x01000000,#_PAGE_NOCACHE_S |
975 | /* | 975 | /* |
@@ -982,7 +982,7 @@ L(mmu_init_amiga): | |||
982 | 982 | ||
983 | 1: | 983 | 1: |
984 | /* | 984 | /* |
985 | * 030: Map the 32Meg range physical 0x0 upto logical 0x8000.0000 | 985 | * 030: Map the 32Meg range physical 0x0 up to logical 0x8000.0000 |
986 | */ | 986 | */ |
987 | mmu_map #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030 | 987 | mmu_map #0x80000000,#0,#0x02000000,#_PAGE_NOCACHE030 |
988 | mmu_map_tt #1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030 | 988 | mmu_map_tt #1,#0x40000000,#0x20000000,#_PAGE_NOCACHE030 |
@@ -1074,7 +1074,7 @@ L(notq40): | |||
1074 | is_040(1f) | 1074 | is_040(1f) |
1075 | 1075 | ||
1076 | /* | 1076 | /* |
1077 | * 030: Map the 32Meg range physical 0x0 upto logical 0xf000.0000 | 1077 | * 030: Map the 32Meg range physical 0x0 up to logical 0xf000.0000 |
1078 | */ | 1078 | */ |
1079 | mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 | 1079 | mmu_map #0xf0000000,#0,#0x02000000,#_PAGE_NOCACHE030 |
1080 | 1080 | ||
@@ -1082,7 +1082,7 @@ L(notq40): | |||
1082 | 1082 | ||
1083 | 1: | 1083 | 1: |
1084 | /* | 1084 | /* |
1085 | * 040: Map the 16Meg range physical 0x0 upto logical 0xf000.0000 | 1085 | * 040: Map the 16Meg range physical 0x0 up to logical 0xf000.0000 |
1086 | */ | 1086 | */ |
1087 | mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S | 1087 | mmu_map #0xf0000000,#0,#0x01000000,#_PAGE_NOCACHE_S |
1088 | 1088 | ||
@@ -3078,7 +3078,7 @@ func_start serial_putc,%d0/%d1/%a0/%a1 | |||
3078 | /* | 3078 | /* |
3079 | * If the loader gave us a board type then we can use that to | 3079 | * If the loader gave us a board type then we can use that to |
3080 | * select an appropriate output routine; otherwise we just use | 3080 | * select an appropriate output routine; otherwise we just use |
3081 | * the Bug code. If we haev to use the Bug that means the Bug | 3081 | * the Bug code. If we have to use the Bug that means the Bug |
3082 | * workspace has to be valid, which means the Bug has to use | 3082 | * workspace has to be valid, which means the Bug has to use |
3083 | * the SRAM, which is non-standard. | 3083 | * the SRAM, which is non-standard. |
3084 | */ | 3084 | */ |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index 79b1ed198c07..9b8393d8adb8 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
@@ -358,6 +358,10 @@ ENTRY(sys_call_table) | |||
358 | .long sys_fanotify_init | 358 | .long sys_fanotify_init |
359 | .long sys_fanotify_mark | 359 | .long sys_fanotify_mark |
360 | .long sys_prlimit64 | 360 | .long sys_prlimit64 |
361 | .long sys_name_to_handle_at /* 340 */ | ||
362 | .long sys_open_by_handle_at | ||
363 | .long sys_clock_adjtime | ||
364 | .long sys_syncfs | ||
361 | 365 | ||
362 | .rept NR_syscalls-(.-sys_call_table)/4 | 366 | .rept NR_syscalls-(.-sys_call_table)/4 |
363 | .long sys_ni_syscall | 367 | .long sys_ni_syscall |
diff --git a/arch/m68k/kernel/vmlinux.lds_no.S b/arch/m68k/kernel/vmlinux.lds_no.S index 47e15ebfd893..f4d715cdca0e 100644 --- a/arch/m68k/kernel/vmlinux.lds_no.S +++ b/arch/m68k/kernel/vmlinux.lds_no.S | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> | 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> |
5 | * | 5 | * |
6 | * This linker script is equiped to build either ROM loaded or RAM | 6 | * This linker script is equipped to build either ROM loaded or RAM |
7 | * run kernels. | 7 | * run kernels. |
8 | */ | 8 | */ |
9 | 9 | ||
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 02b7a03e4226..8b3db1c587fc 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c | |||
@@ -300,6 +300,8 @@ void __init paging_init(void) | |||
300 | zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; | 300 | zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; |
301 | free_area_init_node(i, zones_size, | 301 | free_area_init_node(i, zones_size, |
302 | m68k_memory[i].addr >> PAGE_SHIFT, NULL); | 302 | m68k_memory[i].addr >> PAGE_SHIFT, NULL); |
303 | if (node_present_pages(i)) | ||
304 | node_set_state(i, N_NORMAL_MEMORY); | ||
303 | } | 305 | } |
304 | } | 306 | } |
305 | 307 | ||
diff --git a/arch/m68k/platform/523x/config.c b/arch/m68k/platform/523x/config.c index 418a76feb1e3..71f4436ec809 100644 --- a/arch/m68k/platform/523x/config.c +++ b/arch/m68k/platform/523x/config.c | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * linux/arch/m68knommu/platform/523x/config.c | 4 | * linux/arch/m68knommu/platform/523x/config.c |
5 | * | 5 | * |
6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
7 | * 523x CPUs. | 7 | * 523x CPUs. |
8 | * | 8 | * |
9 | * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/5272/intc.c b/arch/m68k/platform/5272/intc.c index 43e6e96f087f..7e715dfe2819 100644 --- a/arch/m68k/platform/5272/intc.c +++ b/arch/m68k/platform/5272/intc.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * | 33 | * |
34 | * Note that the external interrupts are edge triggered (unlike the | 34 | * Note that the external interrupts are edge triggered (unlike the |
35 | * internal interrupt sources which are level triggered). Which means | 35 | * internal interrupt sources which are level triggered). Which means |
36 | * they also need acknowledgeing via acknowledge bits. | 36 | * they also need acknowledging via acknowledge bits. |
37 | */ | 37 | */ |
38 | struct irqmap { | 38 | struct irqmap { |
39 | unsigned char icr; | 39 | unsigned char icr; |
diff --git a/arch/m68k/platform/527x/config.c b/arch/m68k/platform/527x/config.c index fa359593b613..3ebc769cefda 100644 --- a/arch/m68k/platform/527x/config.c +++ b/arch/m68k/platform/527x/config.c | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * linux/arch/m68knommu/platform/527x/config.c | 4 | * linux/arch/m68knommu/platform/527x/config.c |
5 | * | 5 | * |
6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
7 | * 5270/5271 CPUs. | 7 | * 5270/5271 CPUs. |
8 | * | 8 | * |
9 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/528x/config.c b/arch/m68k/platform/528x/config.c index ac39fc661219..7abe77a2f3e3 100644 --- a/arch/m68k/platform/528x/config.c +++ b/arch/m68k/platform/528x/config.c | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * linux/arch/m68knommu/platform/528x/config.c | 4 | * linux/arch/m68knommu/platform/528x/config.c |
5 | * | 5 | * |
6 | * Sub-architcture dependant initialization code for the Freescale | 6 | * Sub-architcture dependent initialization code for the Freescale |
7 | * 5280, 5281 and 5282 CPUs. | 7 | * 5280, 5281 and 5282 CPUs. |
8 | * | 8 | * |
9 | * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) | 9 | * Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com) |
diff --git a/arch/m68k/platform/coldfire/cache.c b/arch/m68k/platform/coldfire/cache.c index 235d3c4f4f0f..71beeaf0c5c4 100644 --- a/arch/m68k/platform/coldfire/cache.c +++ b/arch/m68k/platform/coldfire/cache.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /***************************************************************************/ | 1 | /***************************************************************************/ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * cache.c -- general ColdFire Cache maintainence code | 4 | * cache.c -- general ColdFire Cache maintenance code |
5 | * | 5 | * |
6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) | 6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) |
7 | */ | 7 | */ |
diff --git a/arch/m68k/platform/coldfire/entry.S b/arch/m68k/platform/coldfire/entry.S index 5837cf080b6d..eab63f09965b 100644 --- a/arch/m68k/platform/coldfire/entry.S +++ b/arch/m68k/platform/coldfire/entry.S | |||
@@ -163,7 +163,7 @@ Lsignal_return: | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | * This is the generic interrupt handler (for all hardware interrupt | 165 | * This is the generic interrupt handler (for all hardware interrupt |
166 | * sources). Calls upto high level code to do all the work. | 166 | * sources). Calls up to high level code to do all the work. |
167 | */ | 167 | */ |
168 | ENTRY(inthandler) | 168 | ENTRY(inthandler) |
169 | SAVE_ALL | 169 | SAVE_ALL |
diff --git a/arch/m68k/platform/coldfire/head.S b/arch/m68k/platform/coldfire/head.S index 129bff4956b5..6ae91a499184 100644 --- a/arch/m68k/platform/coldfire/head.S +++ b/arch/m68k/platform/coldfire/head.S | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /* | 21 | /* |
22 | * If we don't have a fixed memory size, then lets build in code | 22 | * If we don't have a fixed memory size, then lets build in code |
23 | * to auto detect the DRAM size. Obviously this is the prefered | 23 | * to auto detect the DRAM size. Obviously this is the preferred |
24 | * method, and should work for most boards. It won't work for those | 24 | * method, and should work for most boards. It won't work for those |
25 | * that do not have their RAM starting at address 0, and it only | 25 | * that do not have their RAM starting at address 0, and it only |
26 | * works on SDRAM (not boards fitted with SRAM). | 26 | * works on SDRAM (not boards fitted with SRAM). |
diff --git a/arch/m68k/platform/coldfire/intc.c b/arch/m68k/platform/coldfire/intc.c index c28a6ed6cb23..0bbb414856eb 100644 --- a/arch/m68k/platform/coldfire/intc.c +++ b/arch/m68k/platform/coldfire/intc.c | |||
@@ -37,7 +37,7 @@ unsigned char mcf_irq2imr[NR_IRQS]; | |||
37 | /* | 37 | /* |
38 | * In the early version 2 core ColdFire parts the IMR register was 16 bits | 38 | * In the early version 2 core ColdFire parts the IMR register was 16 bits |
39 | * in size. Version 3 (and later version 2) core parts have a 32 bit | 39 | * in size. Version 3 (and later version 2) core parts have a 32 bit |
40 | * sized IMR register. Provide some size independant methods to access the | 40 | * sized IMR register. Provide some size independent methods to access the |
41 | * IMR register. | 41 | * IMR register. |
42 | */ | 42 | */ |
43 | #ifdef MCFSIM_IMR_IS_16BITS | 43 | #ifdef MCFSIM_IMR_IS_16BITS |
diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c index 0a1b937c3e18..6a85daf9a7fd 100644 --- a/arch/m68k/platform/coldfire/sltimers.c +++ b/arch/m68k/platform/coldfire/sltimers.c | |||
@@ -106,7 +106,7 @@ static cycle_t mcfslt_read_clk(struct clocksource *cs) | |||
106 | cycles = mcfslt_cnt; | 106 | cycles = mcfslt_cnt; |
107 | local_irq_restore(flags); | 107 | local_irq_restore(flags); |
108 | 108 | ||
109 | /* substract because slice timers count down */ | 109 | /* subtract because slice timers count down */ |
110 | return cycles - scnt; | 110 | return cycles - scnt; |
111 | } | 111 | } |
112 | 112 | ||
diff --git a/arch/m68k/q40/README b/arch/m68k/q40/README index f877b7249790..b26d5f55e91d 100644 --- a/arch/m68k/q40/README +++ b/arch/m68k/q40/README | |||
@@ -89,7 +89,7 @@ The main interrupt register IIRQ_REG will indicate whether an IRQ was internal | |||
89 | or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs. | 89 | or from some ISA devices, EIRQ_REG can distinguish up to 8 ISA IRQs. |
90 | 90 | ||
91 | The Q40 custom chip is programmable to provide 2 periodic timers: | 91 | The Q40 custom chip is programmable to provide 2 periodic timers: |
92 | - 50 or 200 Hz - level 2, !!THIS CANT BE DISABLED!! | 92 | - 50 or 200 Hz - level 2, !!THIS CAN'T BE DISABLED!! |
93 | - 10 or 20 KHz - level 4, used for dma-sound | 93 | - 10 or 20 KHz - level 4, used for dma-sound |
94 | 94 | ||
95 | Linux uses the 200 Hz interrupt for timer and beep by default. | 95 | Linux uses the 200 Hz interrupt for timer and beep by default. |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index c49c326e7af1..eccdefe70d4e 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -6,7 +6,6 @@ config MICROBLAZE | |||
6 | select HAVE_FUNCTION_GRAPH_TRACER | 6 | select HAVE_FUNCTION_GRAPH_TRACER |
7 | select HAVE_DYNAMIC_FTRACE | 7 | select HAVE_DYNAMIC_FTRACE |
8 | select HAVE_FTRACE_MCOUNT_RECORD | 8 | select HAVE_FTRACE_MCOUNT_RECORD |
9 | select USB_ARCH_HAS_EHCI | ||
10 | select ARCH_WANT_OPTIONAL_GPIOLIB | 9 | select ARCH_WANT_OPTIONAL_GPIOLIB |
11 | select HAVE_OPROFILE | 10 | select HAVE_OPROFILE |
12 | select HAVE_ARCH_KGDB | 11 | select HAVE_ARCH_KGDB |
@@ -17,7 +16,6 @@ config MICROBLAZE | |||
17 | select OF_EARLY_FLATTREE | 16 | select OF_EARLY_FLATTREE |
18 | select HAVE_GENERIC_HARDIRQS | 17 | select HAVE_GENERIC_HARDIRQS |
19 | select GENERIC_IRQ_PROBE | 18 | select GENERIC_IRQ_PROBE |
20 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
21 | select GENERIC_IRQ_SHOW | 19 | select GENERIC_IRQ_SHOW |
22 | 20 | ||
23 | config SWAP | 21 | config SWAP |
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 6f432e6df9af..b23c40eb7a52 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -18,7 +18,7 @@ export CPU_VER CPU_MAJOR CPU_MINOR CPU_REV | |||
18 | # rather than bools y/n | 18 | # rather than bools y/n |
19 | 19 | ||
20 | # Work out HW multipler support. This is tricky. | 20 | # Work out HW multipler support. This is tricky. |
21 | # 1. Spartan2 has no HW multiplers. | 21 | # 1. Spartan2 has no HW multipliers. |
22 | # 2. MicroBlaze v3.x always uses them, except in Spartan 2 | 22 | # 2. MicroBlaze v3.x always uses them, except in Spartan 2 |
23 | # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings | 23 | # 3. All other FPGa/CPU ver combos, we can trust the CONFIG_ settings |
24 | ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) | 24 | ifeq (,$(findstring spartan2,$(CONFIG_XILINX_MICROBLAZE0_FAMILY))) |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index eae32220f447..8cdac14b55b0 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -70,7 +70,7 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) | |||
70 | 70 | ||
71 | /* | 71 | /* |
72 | * read (readb, readw, readl, readq) and write (writeb, writew, | 72 | * read (readb, readw, readl, readq) and write (writeb, writew, |
73 | * writel, writeq) accessors are for PCI and thus littel endian. | 73 | * writel, writeq) accessors are for PCI and thus little endian. |
74 | * Linux 2.4 for Microblaze had this wrong. | 74 | * Linux 2.4 for Microblaze had this wrong. |
75 | */ | 75 | */ |
76 | static inline unsigned char readb(const volatile void __iomem *addr) | 76 | static inline unsigned char readb(const volatile void __iomem *addr) |
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 10717669e0c2..746df91e5796 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
@@ -76,7 +76,7 @@ struct pci_controller { | |||
76 | * Used for variants of PCI indirect handling and possible quirks: | 76 | * Used for variants of PCI indirect handling and possible quirks: |
77 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 | 77 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 |
78 | * EXT_REG - provides access to PCI-e extended registers | 78 | * EXT_REG - provides access to PCI-e extended registers |
79 | * SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS | 79 | * SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS |
80 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 80 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
81 | * to determine which bus number to match on when generating type0 | 81 | * to determine which bus number to match on when generating type0 |
82 | * config cycles | 82 | * config cycles |
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index 2232ff942ba9..ba65cf472544 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
@@ -158,7 +158,7 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
158 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); | 158 | extern void pcibios_setup_bus_devices(struct pci_bus *bus); |
159 | extern void pcibios_setup_bus_self(struct pci_bus *bus); | 159 | extern void pcibios_setup_bus_self(struct pci_bus *bus); |
160 | 160 | ||
161 | /* This part of code was originaly in xilinx-pci.h */ | 161 | /* This part of code was originally in xilinx-pci.h */ |
162 | #ifdef CONFIG_PCI_XILINX | 162 | #ifdef CONFIG_PCI_XILINX |
163 | extern void __init xilinx_pci_init(void); | 163 | extern void __init xilinx_pci_init(void); |
164 | #else | 164 | #else |
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h index d770b00ec6b1..30edd61a6b8f 100644 --- a/arch/microblaze/include/asm/unistd.h +++ b/arch/microblaze/include/asm/unistd.h | |||
@@ -386,8 +386,12 @@ | |||
386 | #define __NR_fanotify_init 368 | 386 | #define __NR_fanotify_init 368 |
387 | #define __NR_fanotify_mark 369 | 387 | #define __NR_fanotify_mark 369 |
388 | #define __NR_prlimit64 370 | 388 | #define __NR_prlimit64 370 |
389 | #define __NR_name_to_handle_at 371 | ||
390 | #define __NR_open_by_handle_at 372 | ||
391 | #define __NR_clock_adjtime 373 | ||
392 | #define __NR_syncfs 374 | ||
389 | 393 | ||
390 | #define __NR_syscalls 371 | 394 | #define __NR_syscalls 375 |
391 | 395 | ||
392 | #ifdef __KERNEL__ | 396 | #ifdef __KERNEL__ |
393 | #ifndef __ASSEMBLY__ | 397 | #ifndef __ASSEMBLY__ |
diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index f0cb5c26c81c..494b63b72dd7 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile | |||
@@ -10,6 +10,7 @@ CFLAGS_REMOVE_early_printk.o = -pg | |||
10 | CFLAGS_REMOVE_selfmod.o = -pg | 10 | CFLAGS_REMOVE_selfmod.o = -pg |
11 | CFLAGS_REMOVE_heartbeat.o = -pg | 11 | CFLAGS_REMOVE_heartbeat.o = -pg |
12 | CFLAGS_REMOVE_ftrace.o = -pg | 12 | CFLAGS_REMOVE_ftrace.o = -pg |
13 | CFLAGS_REMOVE_process.o = -pg | ||
13 | endif | 14 | endif |
14 | 15 | ||
15 | extra-y := head.o vmlinux.lds | 16 | extra-y := head.o vmlinux.lds |
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index cf0afd90a2c0..4b7d8a3f4aef 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
@@ -129,7 +129,7 @@ do { \ | |||
129 | * to use for simple wdc or wic. | 129 | * to use for simple wdc or wic. |
130 | * | 130 | * |
131 | * start address is cache aligned | 131 | * start address is cache aligned |
132 | * end address is not aligned, if end is aligned then I have to substract | 132 | * end address is not aligned, if end is aligned then I have to subtract |
133 | * cacheline length because I can't flush/invalidate the next cacheline. | 133 | * cacheline length because I can't flush/invalidate the next cacheline. |
134 | * If is not, I align it because I will flush/invalidate whole line. | 134 | * If is not, I align it because I will flush/invalidate whole line. |
135 | */ | 135 | */ |
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 515feb404555..357d56abe24a 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c | |||
@@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
51 | : "r" (parent), "r" (return_hooker) | 51 | : "r" (parent), "r" (return_hooker) |
52 | ); | 52 | ); |
53 | 53 | ||
54 | flush_dcache_range((u32)parent, (u32)parent + 4); | ||
55 | flush_icache_range((u32)parent, (u32)parent + 4); | ||
56 | |||
54 | if (unlikely(faulted)) { | 57 | if (unlikely(faulted)) { |
55 | ftrace_graph_stop(); | 58 | ftrace_graph_stop(); |
56 | WARN_ON(1); | 59 | WARN_ON(1); |
@@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value) | |||
95 | if (unlikely(faulted)) | 98 | if (unlikely(faulted)) |
96 | return -EFAULT; | 99 | return -EFAULT; |
97 | 100 | ||
101 | flush_dcache_range(addr, addr + 4); | ||
102 | flush_icache_range(addr, addr + 4); | ||
103 | |||
98 | return 0; | 104 | return 0; |
99 | } | 105 | } |
100 | 106 | ||
@@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
195 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, | 201 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, |
196 | MICROBLAZE_NOP); | 202 | MICROBLAZE_NOP); |
197 | 203 | ||
198 | /* All changes are done - lets do caches consistent */ | ||
199 | flush_icache(); | ||
200 | return ret; | 204 | return ret; |
201 | } | 205 | } |
202 | 206 | ||
@@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void) | |||
210 | 214 | ||
211 | old_jump = *(unsigned int *)ip; /* save jump over instruction */ | 215 | old_jump = *(unsigned int *)ip; /* save jump over instruction */ |
212 | ret = ftrace_modify_code(ip, MICROBLAZE_NOP); | 216 | ret = ftrace_modify_code(ip, MICROBLAZE_NOP); |
213 | flush_icache(); | ||
214 | 217 | ||
215 | pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); | 218 | pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); |
216 | return ret; | 219 | return ret; |
@@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void) | |||
222 | unsigned long ip = (unsigned long)(&ftrace_call_graph); | 225 | unsigned long ip = (unsigned long)(&ftrace_call_graph); |
223 | 226 | ||
224 | ret = ftrace_modify_code(ip, old_jump); | 227 | ret = ftrace_modify_code(ip, old_jump); |
225 | flush_icache(); | ||
226 | 228 | ||
227 | pr_debug("%s\n", __func__); | 229 | pr_debug("%s\n", __func__); |
228 | return ret; | 230 | return ret; |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index 5ba7e162833b..c88f066f41bd 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
@@ -158,11 +158,11 @@ void __init init_IRQ(void) | |||
158 | for (i = 0; i < nr_irq; ++i) { | 158 | for (i = 0; i < nr_irq; ++i) { |
159 | if (intr_type & (0x00000001 << i)) { | 159 | if (intr_type & (0x00000001 << i)) { |
160 | irq_set_chip_and_handler_name(i, &intc_dev, | 160 | irq_set_chip_and_handler_name(i, &intc_dev, |
161 | handle_edge_irq, intc_dev.name); | 161 | handle_edge_irq, "edge"); |
162 | irq_clear_status_flags(i, IRQ_LEVEL); | 162 | irq_clear_status_flags(i, IRQ_LEVEL); |
163 | } else { | 163 | } else { |
164 | irq_set_chip_and_handler_name(i, &intc_dev, | 164 | irq_set_chip_and_handler_name(i, &intc_dev, |
165 | handle_level_irq, intc_dev.name); | 165 | handle_level_irq, "level"); |
166 | irq_set_status_flags(i, IRQ_LEVEL); | 166 | irq_set_status_flags(i, IRQ_LEVEL); |
167 | } | 167 | } |
168 | } | 168 | } |
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index e88a930fd1e3..85cea81d1ca1 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
@@ -375,3 +375,7 @@ ENTRY(sys_call_table) | |||
375 | .long sys_fanotify_init | 375 | .long sys_fanotify_init |
376 | .long sys_fanotify_mark | 376 | .long sys_fanotify_mark |
377 | .long sys_prlimit64 /* 370 */ | 377 | .long sys_prlimit64 /* 370 */ |
378 | .long sys_name_to_handle_at | ||
379 | .long sys_open_by_handle_at | ||
380 | .long sys_clock_adjtime | ||
381 | .long sys_syncfs | ||
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index f1fcbff3da25..10c320aa908b 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile | |||
@@ -2,6 +2,12 @@ | |||
2 | # Makefile | 2 | # Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | ifdef CONFIG_FUNCTION_TRACER | ||
6 | CFLAGS_REMOVE_ashldi3.o = -pg | ||
7 | CFLAGS_REMOVE_ashrdi3.o = -pg | ||
8 | CFLAGS_REMOVE_lshrdi3.o = -pg | ||
9 | endif | ||
10 | |||
5 | lib-y := memset.o | 11 | lib-y := memset.o |
6 | 12 | ||
7 | ifeq ($(CONFIG_OPT_LIB_ASM),y) | 13 | ifeq ($(CONFIG_OPT_LIB_ASM),y) |
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c index cc495d7d99cc..52746e718dfa 100644 --- a/arch/microblaze/lib/memcpy.c +++ b/arch/microblaze/lib/memcpy.c | |||
@@ -63,8 +63,8 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
63 | if (likely(c >= 4)) { | 63 | if (likely(c >= 4)) { |
64 | unsigned value, buf_hold; | 64 | unsigned value, buf_hold; |
65 | 65 | ||
66 | /* Align the dstination to a word boundry. */ | 66 | /* Align the destination to a word boundary. */ |
67 | /* This is done in an endian independant manner. */ | 67 | /* This is done in an endian independent manner. */ |
68 | switch ((unsigned long)dst & 3) { | 68 | switch ((unsigned long)dst & 3) { |
69 | case 1: | 69 | case 1: |
70 | *dst++ = *src++; | 70 | *dst++ = *src++; |
@@ -80,7 +80,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
80 | i_dst = (void *)dst; | 80 | i_dst = (void *)dst; |
81 | 81 | ||
82 | /* Choose a copy scheme based on the source */ | 82 | /* Choose a copy scheme based on the source */ |
83 | /* alignment relative to dstination. */ | 83 | /* alignment relative to destination. */ |
84 | switch ((unsigned long)src & 3) { | 84 | switch ((unsigned long)src & 3) { |
85 | case 0x0: /* Both byte offsets are aligned */ | 85 | case 0x0: /* Both byte offsets are aligned */ |
86 | i_src = (const void *)src; | 86 | i_src = (const void *)src; |
@@ -173,7 +173,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | /* Finish off any remaining bytes */ | 175 | /* Finish off any remaining bytes */ |
176 | /* simple fast copy, ... unless a cache boundry is crossed */ | 176 | /* simple fast copy, ... unless a cache boundary is crossed */ |
177 | switch (c) { | 177 | switch (c) { |
178 | case 3: | 178 | case 3: |
179 | *dst++ = *src++; | 179 | *dst++ = *src++; |
diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c index 810fd68775e3..2146c3752a80 100644 --- a/arch/microblaze/lib/memmove.c +++ b/arch/microblaze/lib/memmove.c | |||
@@ -83,8 +83,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c) | |||
83 | if (c >= 4) { | 83 | if (c >= 4) { |
84 | unsigned value, buf_hold; | 84 | unsigned value, buf_hold; |
85 | 85 | ||
86 | /* Align the destination to a word boundry. */ | 86 | /* Align the destination to a word boundary. */ |
87 | /* This is done in an endian independant manner. */ | 87 | /* This is done in an endian independent manner. */ |
88 | 88 | ||
89 | switch ((unsigned long)dst & 3) { | 89 | switch ((unsigned long)dst & 3) { |
90 | case 3: | 90 | case 3: |
@@ -193,7 +193,7 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c) | |||
193 | dst = (void *)i_dst; | 193 | dst = (void *)i_dst; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* simple fast copy, ... unless a cache boundry is crossed */ | 196 | /* simple fast copy, ... unless a cache boundary is crossed */ |
197 | /* Finish off any remaining bytes */ | 197 | /* Finish off any remaining bytes */ |
198 | switch (c) { | 198 | switch (c) { |
199 | case 4: | 199 | case 4: |
diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c index 834565d1607e..ddf67939576d 100644 --- a/arch/microblaze/lib/memset.c +++ b/arch/microblaze/lib/memset.c | |||
@@ -64,7 +64,7 @@ void *memset(void *v_src, int c, __kernel_size_t n) | |||
64 | 64 | ||
65 | if (likely(n >= 4)) { | 65 | if (likely(n >= 4)) { |
66 | /* Align the destination to a word boundary */ | 66 | /* Align the destination to a word boundary */ |
67 | /* This is done in an endian independant manner */ | 67 | /* This is done in an endian independent manner */ |
68 | switch ((unsigned) src & 3) { | 68 | switch ((unsigned) src & 3) { |
69 | case 1: | 69 | case 1: |
70 | *src++ = c; | 70 | *src++ = c; |
diff --git a/arch/microblaze/pci/indirect_pci.c b/arch/microblaze/pci/indirect_pci.c index 25f18f017f21..4196eb6bd764 100644 --- a/arch/microblaze/pci/indirect_pci.c +++ b/arch/microblaze/pci/indirect_pci.c | |||
@@ -108,7 +108,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | | 108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | |
109 | (devfn << 8) | reg | cfg_type)); | 109 | (devfn << 8) | reg | cfg_type)); |
110 | 110 | ||
111 | /* surpress setting of PCI_PRIMARY_BUS */ | 111 | /* suppress setting of PCI_PRIMARY_BUS */ |
112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) | 112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) |
113 | if ((offset == PCI_PRIMARY_BUS) && | 113 | if ((offset == PCI_PRIMARY_BUS) && |
114 | (bus->number == hose->first_busno)) | 114 | (bus->number == hose->first_busno)) |
diff --git a/arch/microblaze/platform/generic/Kconfig.auto b/arch/microblaze/platform/generic/Kconfig.auto index 5d86fc19029d..25a6f019e94d 100644 --- a/arch/microblaze/platform/generic/Kconfig.auto +++ b/arch/microblaze/platform/generic/Kconfig.auto | |||
@@ -29,7 +29,7 @@ config KERNEL_BASE_ADDR | |||
29 | BASE Address for kernel | 29 | BASE Address for kernel |
30 | 30 | ||
31 | config XILINX_MICROBLAZE0_FAMILY | 31 | config XILINX_MICROBLAZE0_FAMILY |
32 | string "Targetted FPGA family" | 32 | string "Targeted FPGA family" |
33 | default "virtex5" | 33 | default "virtex5" |
34 | 34 | ||
35 | config XILINX_MICROBLAZE0_USE_MSR_INSTR | 35 | config XILINX_MICROBLAZE0_USE_MSR_INSTR |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 83aa5fb8e8f1..8e256cc5dcd9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1135,7 +1135,7 @@ config CPU_LOONGSON2E | |||
1135 | The Loongson 2E processor implements the MIPS III instruction set | 1135 | The Loongson 2E processor implements the MIPS III instruction set |
1136 | with many extensions. | 1136 | with many extensions. |
1137 | 1137 | ||
1138 | It has an internal FPGA northbridge, which is compatiable to | 1138 | It has an internal FPGA northbridge, which is compatible to |
1139 | bonito64. | 1139 | bonito64. |
1140 | 1140 | ||
1141 | config CPU_LOONGSON2F | 1141 | config CPU_LOONGSON2F |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index ac1d5b611a27..53e3514ba10e 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -101,7 +101,7 @@ cflags-y += -ffreestanding | |||
101 | # carefully avoid to add it redundantly because gcc 3.3/3.4 complains | 101 | # carefully avoid to add it redundantly because gcc 3.3/3.4 complains |
102 | # when fed the toolchain default! | 102 | # when fed the toolchain default! |
103 | # | 103 | # |
104 | # Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of | 104 | # Certain gcc versions up to gcc 4.1.1 (probably 4.2-subversion as of |
105 | # 2006-10-10 don't properly change the predefined symbols if -EB / -EL | 105 | # 2006-10-10 don't properly change the predefined symbols if -EB / -EL |
106 | # are used, so we kludge that here. A bug has been filed at | 106 | # are used, so we kludge that here. A bug has been filed at |
107 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413. | 107 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413. |
@@ -314,5 +314,5 @@ define archhelp | |||
314 | echo ' vmlinuz.bin - Raw binary zboot image' | 314 | echo ' vmlinuz.bin - Raw binary zboot image' |
315 | echo ' vmlinuz.srec - SREC zboot image' | 315 | echo ' vmlinuz.srec - SREC zboot image' |
316 | echo | 316 | echo |
317 | echo ' These will be default as apropriate for a configured platform.' | 317 | echo ' These will be default as appropriate for a configured platform.' |
318 | endef | 318 | endef |
diff --git a/arch/mips/alchemy/common/clocks.c b/arch/mips/alchemy/common/clocks.c index af0fe41055af..f38298a8b98c 100644 --- a/arch/mips/alchemy/common/clocks.c +++ b/arch/mips/alchemy/common/clocks.c | |||
@@ -75,7 +75,7 @@ void set_au1x00_uart_baud_base(unsigned long new_baud_base) | |||
75 | * counter, if it exists. If we don't have an accurate processor | 75 | * counter, if it exists. If we don't have an accurate processor |
76 | * speed, all of the peripherals that derive their clocks based on | 76 | * speed, all of the peripherals that derive their clocks based on |
77 | * this advertised speed will introduce error and sometimes not work | 77 | * this advertised speed will introduce error and sometimes not work |
78 | * properly. This function is futher convoluted to still allow configurations | 78 | * properly. This function is further convoluted to still allow configurations |
79 | * to do that in case they have really, really old silicon with a | 79 | * to do that in case they have really, really old silicon with a |
80 | * write-only PLL register. -- Dan | 80 | * write-only PLL register. -- Dan |
81 | */ | 81 | */ |
diff --git a/arch/mips/cavium-octeon/executive/octeon-model.c b/arch/mips/cavium-octeon/executive/octeon-model.c index 9afc3794ed1b..c8d35684504e 100644 --- a/arch/mips/cavium-octeon/executive/octeon-model.c +++ b/arch/mips/cavium-octeon/executive/octeon-model.c | |||
@@ -75,7 +75,7 @@ const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer) | |||
75 | 75 | ||
76 | num_cores = cvmx_octeon_num_cores(); | 76 | num_cores = cvmx_octeon_num_cores(); |
77 | 77 | ||
78 | /* Make sure the non existant devices look disabled */ | 78 | /* Make sure the non existent devices look disabled */ |
79 | switch ((chip_id >> 8) & 0xff) { | 79 | switch ((chip_id >> 8) & 0xff) { |
80 | case 6: /* CN50XX */ | 80 | case 6: /* CN50XX */ |
81 | case 2: /* CN30XX */ | 81 | case 2: /* CN30XX */ |
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index cecaf62aef32..cd61d7281d91 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
@@ -75,7 +75,7 @@ static int __init octeon_cf_device_init(void) | |||
75 | * zero. | 75 | * zero. |
76 | */ | 76 | */ |
77 | 77 | ||
78 | /* Asume that CS1 immediately follows. */ | 78 | /* Assume that CS1 immediately follows. */ |
79 | mio_boot_reg_cfg.u64 = | 79 | mio_boot_reg_cfg.u64 = |
80 | cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1)); | 80 | cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(i + 1)); |
81 | region_base = mio_boot_reg_cfg.s.base << 16; | 81 | region_base = mio_boot_reg_cfg.s.base << 16; |
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index 8b139bf4a1b5..0707fae3f0ee 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -662,7 +662,7 @@ void __init plat_mem_setup(void) | |||
662 | * some memory vectors. When SPARSEMEM is in use, it doesn't | 662 | * some memory vectors. When SPARSEMEM is in use, it doesn't |
663 | * verify that the size is big enough for the final | 663 | * verify that the size is big enough for the final |
664 | * vectors. Making the smallest chuck 4MB seems to be enough | 664 | * vectors. Making the smallest chuck 4MB seems to be enough |
665 | * to consistantly work. | 665 | * to consistently work. |
666 | */ | 666 | */ |
667 | mem_alloc_size = 4 << 20; | 667 | mem_alloc_size = 4 << 20; |
668 | if (mem_alloc_size > MAX_MEMORY) | 668 | if (mem_alloc_size > MAX_MEMORY) |
diff --git a/arch/mips/fw/arc/promlib.c b/arch/mips/fw/arc/promlib.c index c508c00dbb64..b7f9dd3c93c6 100644 --- a/arch/mips/fw/arc/promlib.c +++ b/arch/mips/fw/arc/promlib.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1996 David S. Miller (dm@sgi.com) | 6 | * Copyright (C) 1996 David S. Miller (dm@sgi.com) |
7 | * Compability with board caches, Ulf Carlsson | 7 | * Compatibility with board caches, Ulf Carlsson |
8 | */ | 8 | */ |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <asm/sgialib.h> | 10 | #include <asm/sgialib.h> |
diff --git a/arch/mips/include/asm/dec/prom.h b/arch/mips/include/asm/dec/prom.h index b9c8203688d5..c0ead6313845 100644 --- a/arch/mips/include/asm/dec/prom.h +++ b/arch/mips/include/asm/dec/prom.h | |||
@@ -108,7 +108,7 @@ extern int (*__pmax_close)(int); | |||
108 | 108 | ||
109 | /* | 109 | /* |
110 | * On MIPS64 we have to call PROM functions via a helper | 110 | * On MIPS64 we have to call PROM functions via a helper |
111 | * dispatcher to accomodate ABI incompatibilities. | 111 | * dispatcher to accommodate ABI incompatibilities. |
112 | */ | 112 | */ |
113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ | 113 | #define __DEC_PROM_O32(fun, arg) fun arg __asm__(#fun); \ |
114 | __asm__(#fun " = call_o32") | 114 | __asm__(#fun " = call_o32") |
diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h index 992d232adc83..c5c7c0e6064c 100644 --- a/arch/mips/include/asm/floppy.h +++ b/arch/mips/include/asm/floppy.h | |||
@@ -24,7 +24,7 @@ static inline void fd_cacheflush(char * addr, long size) | |||
24 | * And on Mips's the CMOS info fails also ... | 24 | * And on Mips's the CMOS info fails also ... |
25 | * | 25 | * |
26 | * FIXME: This information should come from the ARC configuration tree | 26 | * FIXME: This information should come from the ARC configuration tree |
27 | * or whereever a particular machine has stored this ... | 27 | * or wherever a particular machine has stored this ... |
28 | */ | 28 | */ |
29 | #define FLOPPY0_TYPE fd_drive_type(0) | 29 | #define FLOPPY0_TYPE fd_drive_type(0) |
30 | #define FLOPPY1_TYPE fd_drive_type(1) | 30 | #define FLOPPY1_TYPE fd_drive_type(1) |
diff --git a/arch/mips/include/asm/hw_irq.h b/arch/mips/include/asm/hw_irq.h index aca05a43a97b..77adda297ad9 100644 --- a/arch/mips/include/asm/hw_irq.h +++ b/arch/mips/include/asm/hw_irq.h | |||
@@ -13,7 +13,7 @@ | |||
13 | extern atomic_t irq_err_count; | 13 | extern atomic_t irq_err_count; |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * interrupt-retrigger: NOP for now. This may not be apropriate for all | 16 | * interrupt-retrigger: NOP for now. This may not be appropriate for all |
17 | * machines, we'll see ... | 17 | * machines, we'll see ... |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 5b017f23e243..b04e4de5dd2e 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
@@ -242,7 +242,7 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
242 | * This version of ioremap ensures that the memory is marked uncachable | 242 | * This version of ioremap ensures that the memory is marked uncachable |
243 | * on the CPU as well as honouring existing caching rules from things like | 243 | * on the CPU as well as honouring existing caching rules from things like |
244 | * the PCI bus. Note that there are other caches and buffers on many | 244 | * the PCI bus. Note that there are other caches and buffers on many |
245 | * busses. In paticular driver authors should read up on PCI writes | 245 | * busses. In particular driver authors should read up on PCI writes |
246 | * | 246 | * |
247 | * It's useful if some control registers are in such an area and | 247 | * It's useful if some control registers are in such an area and |
248 | * write combining or read caching is not desirable: | 248 | * write combining or read caching is not desirable: |
diff --git a/arch/mips/include/asm/irqflags.h b/arch/mips/include/asm/irqflags.h index 9ef3b0d17896..309cbcd6909c 100644 --- a/arch/mips/include/asm/irqflags.h +++ b/arch/mips/include/asm/irqflags.h | |||
@@ -174,7 +174,7 @@ __asm__( | |||
174 | "mtc0 \\flags, $2, 1 \n" | 174 | "mtc0 \\flags, $2, 1 \n" |
175 | #elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | 175 | #elif defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) |
176 | /* | 176 | /* |
177 | * Slow, but doesn't suffer from a relativly unlikely race | 177 | * Slow, but doesn't suffer from a relatively unlikely race |
178 | * condition we're having since days 1. | 178 | * condition we're having since days 1. |
179 | */ | 179 | */ |
180 | " beqz \\flags, 1f \n" | 180 | " beqz \\flags, 1f \n" |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h index 5325084d5c48..32978d32561a 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #define TAGVER_LEN 4 /* Length of Tag Version */ | 4 | #define TAGVER_LEN 4 /* Length of Tag Version */ |
5 | #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ | 5 | #define TAGLAYOUT_LEN 4 /* Length of FlashLayoutVer */ |
6 | #define SIG1_LEN 20 /* Company Signature 1 Length */ | 6 | #define SIG1_LEN 20 /* Company Signature 1 Length */ |
7 | #define SIG2_LEN 14 /* Company Signature 2 Lenght */ | 7 | #define SIG2_LEN 14 /* Company Signature 2 Length */ |
8 | #define BOARDID_LEN 16 /* Length of BoardId */ | 8 | #define BOARDID_LEN 16 /* Length of BoardId */ |
9 | #define ENDIANFLAG_LEN 2 /* Endian Flag Length */ | 9 | #define ENDIANFLAG_LEN 2 /* Endian Flag Length */ |
10 | #define CHIPID_LEN 6 /* Chip Id Length */ | 10 | #define CHIPID_LEN 6 /* Chip Id Length */ |
diff --git a/arch/mips/include/asm/mach-ip32/mc146818rtc.h b/arch/mips/include/asm/mach-ip32/mc146818rtc.h index c28ba8d84076..6b6bab43d5c1 100644 --- a/arch/mips/include/asm/mach-ip32/mc146818rtc.h +++ b/arch/mips/include/asm/mach-ip32/mc146818rtc.h | |||
@@ -26,7 +26,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned long addr) | |||
26 | } | 26 | } |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * FIXME: Do it right. For now just assume that noone lives in 20th century | 29 | * FIXME: Do it right. For now just assume that no one lives in 20th century |
30 | * and no O2 user in 22th century ;-) | 30 | * and no O2 user in 22th century ;-) |
31 | */ | 31 | */ |
32 | #define mc146818_decode_year(year) ((year) + 2000) | 32 | #define mc146818_decode_year(year) ((year) + 2000) |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h index 021f77ca59ec..2a8e2bb5d539 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * The header file of cs5536 sourth bridge. | 2 | * The header file of cs5536 south bridge. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Lemote, Inc. | 4 | * Copyright (C) 2007 Lemote, Inc. |
5 | * Author : jlliu <liujl@lemote.com> | 5 | * Author : jlliu <liujl@lemote.com> |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1000.h b/arch/mips/include/asm/mach-pb1x00/pb1000.h index 6d1ff9060e44..65059255dc1e 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1000.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1000.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Alchemy Semi Pb1000 Referrence Board | 2 | * Alchemy Semi Pb1000 Reference Board |
3 | * | 3 | * |
4 | * Copyright 2001, 2008 MontaVista Software Inc. | 4 | * Copyright 2001, 2008 MontaVista Software Inc. |
5 | * Author: MontaVista Software, Inc. <source@mvista.com> | 5 | * Author: MontaVista Software, Inc. <source@mvista.com> |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1200.h b/arch/mips/include/asm/mach-pb1x00/pb1200.h index 962eb55dc880..fce4332ebb7f 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1200.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1200.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * AMD Alchemy Pb1200 Referrence Board | 2 | * AMD Alchemy Pb1200 Reference Board |
3 | * Board Registers defines. | 3 | * Board Registers defines. |
4 | * | 4 | * |
5 | * ######################################################################## | 5 | * ######################################################################## |
diff --git a/arch/mips/include/asm/mach-pb1x00/pb1550.h b/arch/mips/include/asm/mach-pb1x00/pb1550.h index fc4d766641ce..f835c88e9593 100644 --- a/arch/mips/include/asm/mach-pb1x00/pb1550.h +++ b/arch/mips/include/asm/mach-pb1x00/pb1550.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * AMD Alchemy Semi PB1550 Referrence Board | 2 | * AMD Alchemy Semi PB1550 Reference Board |
3 | * Board Registers defines. | 3 | * Board Registers defines. |
4 | * | 4 | * |
5 | * Copyright 2004 Embedded Edge LLC. | 5 | * Copyright 2004 Embedded Edge LLC. |
diff --git a/arch/mips/include/asm/mach-powertv/dma-coherence.h b/arch/mips/include/asm/mach-powertv/dma-coherence.h index f76029c2406e..a8e72cf12142 100644 --- a/arch/mips/include/asm/mach-powertv/dma-coherence.h +++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h | |||
@@ -48,7 +48,7 @@ static inline unsigned long virt_to_phys_from_pte(void *addr) | |||
48 | /* check for a valid page */ | 48 | /* check for a valid page */ |
49 | if (pte_present(pte)) { | 49 | if (pte_present(pte)) { |
50 | /* get the physical address the page is | 50 | /* get the physical address the page is |
51 | * refering to */ | 51 | * referring to */ |
52 | phys_addr = (unsigned long) | 52 | phys_addr = (unsigned long) |
53 | page_to_phys(pte_page(pte)); | 53 | page_to_phys(pte_page(pte)); |
54 | /* add the offset within the page */ | 54 | /* add the offset within the page */ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 4d9870975382..6a6f8a8f542d 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -922,7 +922,7 @@ do { \ | |||
922 | #define write_c0_config7(val) __write_32bit_c0_register($16, 7, val) | 922 | #define write_c0_config7(val) __write_32bit_c0_register($16, 7, val) |
923 | 923 | ||
924 | /* | 924 | /* |
925 | * The WatchLo register. There may be upto 8 of them. | 925 | * The WatchLo register. There may be up to 8 of them. |
926 | */ | 926 | */ |
927 | #define read_c0_watchlo0() __read_ulong_c0_register($18, 0) | 927 | #define read_c0_watchlo0() __read_ulong_c0_register($18, 0) |
928 | #define read_c0_watchlo1() __read_ulong_c0_register($18, 1) | 928 | #define read_c0_watchlo1() __read_ulong_c0_register($18, 1) |
@@ -942,7 +942,7 @@ do { \ | |||
942 | #define write_c0_watchlo7(val) __write_ulong_c0_register($18, 7, val) | 942 | #define write_c0_watchlo7(val) __write_ulong_c0_register($18, 7, val) |
943 | 943 | ||
944 | /* | 944 | /* |
945 | * The WatchHi register. There may be upto 8 of them. | 945 | * The WatchHi register. There may be up to 8 of them. |
946 | */ | 946 | */ |
947 | #define read_c0_watchhi0() __read_32bit_c0_register($19, 0) | 947 | #define read_c0_watchhi0() __read_32bit_c0_register($19, 0) |
948 | #define read_c0_watchhi1() __read_32bit_c0_register($19, 1) | 948 | #define read_c0_watchhi1() __read_32bit_c0_register($19, 1) |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h index f3c23a43f845..4e4c3a8282d6 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h | |||
@@ -200,7 +200,7 @@ enum cvmx_chip_types_enum { | |||
200 | CVMX_CHIP_TYPE_MAX, | 200 | CVMX_CHIP_TYPE_MAX, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* Compatability alias for NAC38 name change, planned to be removed | 203 | /* Compatibility alias for NAC38 name change, planned to be removed |
204 | * from SDK 1.7 */ | 204 | * from SDK 1.7 */ |
205 | #define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38 | 205 | #define CVMX_BOARD_TYPE_NAO38 CVMX_BOARD_TYPE_NAC38 |
206 | 206 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h index 8e708bdb43f7..877845b84b14 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootmem.h +++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h | |||
@@ -67,7 +67,7 @@ struct cvmx_bootmem_block_header { | |||
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Structure for named memory blocks. Number of descriptors available | 69 | * Structure for named memory blocks. Number of descriptors available |
70 | * can be changed without affecting compatiblity, but name length | 70 | * can be changed without affecting compatibility, but name length |
71 | * changes require a bump in the bootmem descriptor version Note: This | 71 | * changes require a bump in the bootmem descriptor version Note: This |
72 | * structure must be naturally 64 bit aligned, as a single memory | 72 | * structure must be naturally 64 bit aligned, as a single memory |
73 | * image will be used by both 32 and 64 bit programs. | 73 | * image will be used by both 32 and 64 bit programs. |
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c.h b/arch/mips/include/asm/octeon/cvmx-l2c.h index 0b32c5b118e2..2c8ff9e33ec3 100644 --- a/arch/mips/include/asm/octeon/cvmx-l2c.h +++ b/arch/mips/include/asm/octeon/cvmx-l2c.h | |||
@@ -157,7 +157,7 @@ enum cvmx_l2c_tad_event { | |||
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Configure one of the four L2 Cache performance counters to capture event | 159 | * Configure one of the four L2 Cache performance counters to capture event |
160 | * occurences. | 160 | * occurrences. |
161 | * | 161 | * |
162 | * @counter: The counter to configure. Range 0..3. | 162 | * @counter: The counter to configure. Range 0..3. |
163 | * @event: The type of L2 Cache event occurrence to count. | 163 | * @event: The type of L2 Cache event occurrence to count. |
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h index 9d9381e2e3d8..7e1286706d46 100644 --- a/arch/mips/include/asm/octeon/cvmx.h +++ b/arch/mips/include/asm/octeon/cvmx.h | |||
@@ -151,7 +151,7 @@ enum cvmx_mips_space { | |||
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * Convert a memory pointer (void*) into a hardware compatable | 154 | * Convert a memory pointer (void*) into a hardware compatible |
155 | * memory address (uint64_t). Octeon hardware widgets don't | 155 | * memory address (uint64_t). Octeon hardware widgets don't |
156 | * understand logical addresses. | 156 | * understand logical addresses. |
157 | * | 157 | * |
diff --git a/arch/mips/include/asm/paccess.h b/arch/mips/include/asm/paccess.h index c2394f8b0fe1..9ce5a1e7e14c 100644 --- a/arch/mips/include/asm/paccess.h +++ b/arch/mips/include/asm/paccess.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | * | 8 | * |
9 | * Protected memory access. Used for everything that might take revenge | 9 | * Protected memory access. Used for everything that might take revenge |
10 | * by sending a DBE error like accessing possibly non-existant memory or | 10 | * by sending a DBE error like accessing possibly non-existent memory or |
11 | * devices. | 11 | * devices. |
12 | */ | 12 | */ |
13 | #ifndef _ASM_PACCESS_H | 13 | #ifndef _ASM_PACCESS_H |
diff --git a/arch/mips/include/asm/pci/bridge.h b/arch/mips/include/asm/pci/bridge.h index f1f508e4f971..be44fb0266da 100644 --- a/arch/mips/include/asm/pci/bridge.h +++ b/arch/mips/include/asm/pci/bridge.h | |||
@@ -262,7 +262,7 @@ typedef volatile struct bridge_s { | |||
262 | } bridge_t; | 262 | } bridge_t; |
263 | 263 | ||
264 | /* | 264 | /* |
265 | * Field formats for Error Command Word and Auxillary Error Command Word | 265 | * Field formats for Error Command Word and Auxiliary Error Command Word |
266 | * of bridge. | 266 | * of bridge. |
267 | */ | 267 | */ |
268 | typedef struct bridge_err_cmdword_s { | 268 | typedef struct bridge_err_cmdword_s { |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h index 60a5a38dd5b2..7d41474e5488 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h | |||
@@ -205,7 +205,7 @@ static inline u32 blocking_read_reg32(volatile u32 *const addr) | |||
205 | * custom_read_reg32(address, tmp); <-- Reads the address and put the value | 205 | * custom_read_reg32(address, tmp); <-- Reads the address and put the value |
206 | * in the 'tmp' variable given | 206 | * in the 'tmp' variable given |
207 | * | 207 | * |
208 | * From here on out, you are (basicly) atomic, so don't do anything too | 208 | * From here on out, you are (basically) atomic, so don't do anything too |
209 | * fancy! | 209 | * fancy! |
210 | * Also, this code may loop if the end of this block fails to write | 210 | * Also, this code may loop if the end of this block fails to write |
211 | * everything back safely due do the other CPU, so do NOT do anything | 211 | * everything back safely due do the other CPU, so do NOT do anything |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index ead6928fa6b8..c104f1039a69 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -337,7 +337,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
337 | /* | 337 | /* |
338 | * Return_address is a replacement for __builtin_return_address(count) | 338 | * Return_address is a replacement for __builtin_return_address(count) |
339 | * which on certain architectures cannot reasonably be implemented in GCC | 339 | * which on certain architectures cannot reasonably be implemented in GCC |
340 | * (MIPS, Alpha) or is unuseable with -fomit-frame-pointer (i386). | 340 | * (MIPS, Alpha) or is unusable with -fomit-frame-pointer (i386). |
341 | * Note that __builtin_return_address(x>=1) is forbidden because GCC | 341 | * Note that __builtin_return_address(x>=1) is forbidden because GCC |
342 | * aborts compilation on some CPUs. It's simply not possible to unwind | 342 | * aborts compilation on some CPUs. It's simply not possible to unwind |
343 | * some CPU's stackframes. | 343 | * some CPU's stackframes. |
diff --git a/arch/mips/include/asm/sgi/ioc.h b/arch/mips/include/asm/sgi/ioc.h index 57a971904cfe..380347b648e2 100644 --- a/arch/mips/include/asm/sgi/ioc.h +++ b/arch/mips/include/asm/sgi/ioc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <asm/sgi/pi1.h> | 17 | #include <asm/sgi/pi1.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things | 20 | * All registers are 8-bit wide aligned on 32-bit boundary. Bad things |
21 | * happen if you try word access them. You have been warned. | 21 | * happen if you try word access them. You have been warned. |
22 | */ | 22 | */ |
23 | 23 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_mac.h b/arch/mips/include/asm/sibyte/sb1250_mac.h index 591b9061fd8e..77f787284235 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mac.h +++ b/arch/mips/include/asm/sibyte/sb1250_mac.h | |||
@@ -520,7 +520,7 @@ | |||
520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) | 520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) |
521 | 521 | ||
522 | /* | 522 | /* |
523 | * MAC Recieve Address Filter Exact Match Registers (Table 9-21) | 523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) |
524 | * Registers: MAC_ADDR0_0 through MAC_ADDR7_0 | 524 | * Registers: MAC_ADDR0_0 through MAC_ADDR7_0 |
525 | * Registers: MAC_ADDR0_1 through MAC_ADDR7_1 | 525 | * Registers: MAC_ADDR0_1 through MAC_ADDR7_1 |
526 | * Registers: MAC_ADDR0_2 through MAC_ADDR7_2 | 526 | * Registers: MAC_ADDR0_2 through MAC_ADDR7_2 |
@@ -538,7 +538,7 @@ | |||
538 | /* No bitfields */ | 538 | /* No bitfields */ |
539 | 539 | ||
540 | /* | 540 | /* |
541 | * MAC Recieve Address Filter Hash Match Registers (Table 9-22) | 541 | * MAC Receive Address Filter Hash Match Registers (Table 9-22) |
542 | * Registers: MAC_HASH0_0 through MAC_HASH7_0 | 542 | * Registers: MAC_HASH0_0 through MAC_HASH7_0 |
543 | * Registers: MAC_HASH0_1 through MAC_HASH7_1 | 543 | * Registers: MAC_HASH0_1 through MAC_HASH7_1 |
544 | * Registers: MAC_HASH0_2 through MAC_HASH7_2 | 544 | * Registers: MAC_HASH0_2 through MAC_HASH7_2 |
diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h index 1ca64b4d33d9..20ebeb875ee6 100644 --- a/arch/mips/include/asm/siginfo.h +++ b/arch/mips/include/asm/siginfo.h | |||
@@ -101,7 +101,7 @@ typedef struct siginfo { | |||
101 | 101 | ||
102 | /* | 102 | /* |
103 | * si_code values | 103 | * si_code values |
104 | * Again these have been choosen to be IRIX compatible. | 104 | * Again these have been chosen to be IRIX compatible. |
105 | */ | 105 | */ |
106 | #undef SI_ASYNCIO | 106 | #undef SI_ASYNCIO |
107 | #undef SI_TIMER | 107 | #undef SI_TIMER |
diff --git a/arch/mips/include/asm/sn/klconfig.h b/arch/mips/include/asm/sn/klconfig.h index 09e590daca17..fe02900b930d 100644 --- a/arch/mips/include/asm/sn/klconfig.h +++ b/arch/mips/include/asm/sn/klconfig.h | |||
@@ -78,7 +78,7 @@ typedef s32 klconf_off_t; | |||
78 | */ | 78 | */ |
79 | #define MAX_SLOTS_PER_NODE (1 + 2 + 6 + 2) | 79 | #define MAX_SLOTS_PER_NODE (1 + 2 + 6 + 2) |
80 | 80 | ||
81 | /* XXX if each node is guranteed to have some memory */ | 81 | /* XXX if each node is guaranteed to have some memory */ |
82 | 82 | ||
83 | #define MAX_PCI_DEVS 8 | 83 | #define MAX_PCI_DEVS 8 |
84 | 84 | ||
@@ -539,7 +539,7 @@ typedef struct klinfo_s { /* Generic info */ | |||
539 | #define KLSTRUCT_IOC3_TTY 24 | 539 | #define KLSTRUCT_IOC3_TTY 24 |
540 | 540 | ||
541 | /* Early Access IO proms are compatible | 541 | /* Early Access IO proms are compatible |
542 | only with KLSTRUCT values upto 24. */ | 542 | only with KLSTRUCT values up to 24. */ |
543 | 543 | ||
544 | #define KLSTRUCT_FIBERCHANNEL 25 | 544 | #define KLSTRUCT_FIBERCHANNEL 25 |
545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 | 545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 |
diff --git a/arch/mips/include/asm/sn/sn0/hubio.h b/arch/mips/include/asm/sn/sn0/hubio.h index 31c76c021bb6..46286d8302a7 100644 --- a/arch/mips/include/asm/sn/sn0/hubio.h +++ b/arch/mips/include/asm/sn/sn0/hubio.h | |||
@@ -622,7 +622,7 @@ typedef union h1_icrbb_u { | |||
622 | */ | 622 | */ |
623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ | 623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ |
624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ | 624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ |
625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guranteed BW request */ | 625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ |
626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ | 626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ |
627 | 627 | ||
628 | /* | 628 | /* |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index 58730c5ce4bf..b4ba2449444b 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -346,7 +346,7 @@ | |||
346 | * we can't dispatch it directly without trashing | 346 | * we can't dispatch it directly without trashing |
347 | * some registers, so we'll try to detect this unlikely | 347 | * some registers, so we'll try to detect this unlikely |
348 | * case and program a software interrupt in the VPE, | 348 | * case and program a software interrupt in the VPE, |
349 | * as would be done for a cross-VPE IPI. To accomodate | 349 | * as would be done for a cross-VPE IPI. To accommodate |
350 | * the handling of that case, we're doing a DVPE instead | 350 | * the handling of that case, we're doing a DVPE instead |
351 | * of just a DMT here to protect against other threads. | 351 | * of just a DMT here to protect against other threads. |
352 | * This is a lot of cruft to cover a tiny window. | 352 | * This is a lot of cruft to cover a tiny window. |
diff --git a/arch/mips/include/asm/war.h b/arch/mips/include/asm/war.h index 22361d5e3bf0..fa133c1bc1f9 100644 --- a/arch/mips/include/asm/war.h +++ b/arch/mips/include/asm/war.h | |||
@@ -227,7 +227,7 @@ | |||
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | /* | 229 | /* |
230 | * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that | 230 | * On the R10000 up to version 2.6 (not sure about 2.7) there is a bug that |
231 | * may cause ll / sc and lld / scd sequences to execute non-atomically. | 231 | * may cause ll / sc and lld / scd sequences to execute non-atomically. |
232 | */ | 232 | */ |
233 | #ifndef R10000_LLSC_WAR | 233 | #ifndef R10000_LLSC_WAR |
diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index bc18daaa8f84..c3b04be3fb2b 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c | |||
@@ -65,7 +65,7 @@ static struct nand_ecclayout qi_lb60_ecclayout_1gb = { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* Early prototypes of the QI LB60 had only 1GB of NAND. | 67 | /* Early prototypes of the QI LB60 had only 1GB of NAND. |
68 | * In order to support these devices aswell the partition and ecc layout is | 68 | * In order to support these devices as well the partition and ecc layout is |
69 | * initialized depending on the NAND size */ | 69 | * initialized depending on the NAND size */ |
70 | static struct mtd_partition qi_lb60_partitions_1gb[] = { | 70 | static struct mtd_partition qi_lb60_partitions_1gb[] = { |
71 | { | 71 | { |
@@ -439,7 +439,7 @@ static struct platform_device *jz_platform_devices[] __initdata = { | |||
439 | static void __init board_gpio_setup(void) | 439 | static void __init board_gpio_setup(void) |
440 | { | 440 | { |
441 | /* We only need to enable/disable pullup here for pins used in generic | 441 | /* We only need to enable/disable pullup here for pins used in generic |
442 | * drivers. Everything else is done by the drivers themselfs. */ | 442 | * drivers. Everything else is done by the drivers themselves. */ |
443 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_VCC_EN_N); | 443 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_VCC_EN_N); |
444 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_CD); | 444 | jz_gpio_disable_pullup(QI_LB60_GPIO_SD_CD); |
445 | } | 445 | } |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index b8bb8ba60869..f305ca14351b 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -73,7 +73,7 @@ static inline void mult_sh_align_mod(long *v1, long *v2, long *w, | |||
73 | : "0" (5), "1" (8), "2" (5)); | 73 | : "0" (5), "1" (8), "2" (5)); |
74 | align_mod(align, mod); | 74 | align_mod(align, mod); |
75 | /* | 75 | /* |
76 | * The trailing nop is needed to fullfill the two-instruction | 76 | * The trailing nop is needed to fulfill the two-instruction |
77 | * requirement between reading hi/lo and staring a mult/div. | 77 | * requirement between reading hi/lo and staring a mult/div. |
78 | * Leaving it out may cause gas insert a nop itself breaking | 78 | * Leaving it out may cause gas insert a nop itself breaking |
79 | * the desired alignment of the next chunk. | 79 | * the desired alignment of the next chunk. |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index d9a7db78ed62..75266ff4cc33 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -721,7 +721,7 @@ static void mipsxx_pmu_start(void) | |||
721 | 721 | ||
722 | /* | 722 | /* |
723 | * MIPS performance counters can be per-TC. The control registers can | 723 | * MIPS performance counters can be per-TC. The control registers can |
724 | * not be directly accessed accross CPUs. Hence if we want to do global | 724 | * not be directly accessed across CPUs. Hence if we want to do global |
725 | * control, we need cross CPU calls. on_each_cpu() can help us, but we | 725 | * control, we need cross CPU calls. on_each_cpu() can help us, but we |
726 | * can not make sure this function is called with interrupts enabled. So | 726 | * can not make sure this function is called with interrupts enabled. So |
727 | * here we pause local counters and then grab a rwlock and leave the | 727 | * here we pause local counters and then grab a rwlock and leave the |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index ae167df73ddd..d2112d3cf115 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -410,7 +410,7 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | |||
410 | if (!kallsyms_lookup_size_offset(pc, &size, &ofs)) | 410 | if (!kallsyms_lookup_size_offset(pc, &size, &ofs)) |
411 | return 0; | 411 | return 0; |
412 | /* | 412 | /* |
413 | * Return ra if an exception occured at the first instruction | 413 | * Return ra if an exception occurred at the first instruction |
414 | */ | 414 | */ |
415 | if (unlikely(ofs == 0)) { | 415 | if (unlikely(ofs == 0)) { |
416 | pc = *ra; | 416 | pc = *ra; |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index c0e81418ba21..1ec56e635d04 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -120,7 +120,7 @@ static void vsmp_send_ipi_single(int cpu, unsigned int action) | |||
120 | 120 | ||
121 | local_irq_save(flags); | 121 | local_irq_save(flags); |
122 | 122 | ||
123 | vpflags = dvpe(); /* cant access the other CPU's registers whilst MVPE enabled */ | 123 | vpflags = dvpe(); /* can't access the other CPU's registers whilst MVPE enabled */ |
124 | 124 | ||
125 | switch (action) { | 125 | switch (action) { |
126 | case SMP_CALL_FUNCTION: | 126 | case SMP_CALL_FUNCTION: |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index fb7497405510..1083ad4e1017 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -102,7 +102,7 @@ static __init int cpu_has_mfc0_count_bug(void) | |||
102 | case CPU_R4400SC: | 102 | case CPU_R4400SC: |
103 | case CPU_R4400MC: | 103 | case CPU_R4400MC: |
104 | /* | 104 | /* |
105 | * The published errata for the R4400 upto 3.0 say the CPU | 105 | * The published errata for the R4400 up to 3.0 say the CPU |
106 | * has the mfc0 from count bug. | 106 | * has the mfc0 from count bug. |
107 | */ | 107 | */ |
108 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) | 108 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index ab52b7cf3b6b..dbb6b408f001 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * VPE support module | 19 | * VPE support module |
20 | * | 20 | * |
21 | * Provides support for loading a MIPS SP program on VPE1. | 21 | * Provides support for loading a MIPS SP program on VPE1. |
22 | * The SP enviroment is rather simple, no tlb's. It needs to be relocatable | 22 | * The SP environment is rather simple, no tlb's. It needs to be relocatable |
23 | * (or partially linked). You should initialise your stack in the startup | 23 | * (or partially linked). You should initialise your stack in the startup |
24 | * code. This loader looks for the symbol __start and sets up | 24 | * code. This loader looks for the symbol __start and sets up |
25 | * execution to resume from there. The MIPS SDE kit contains suitable examples. | 25 | * execution to resume from there. The MIPS SDE kit contains suitable examples. |
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index c768e3000616..64457162f7e0 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
@@ -17,7 +17,7 @@ | |||
17 | .previous | 17 | .previous |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Return the size of a string including the ending NUL character upto a | 20 | * Return the size of a string including the ending NUL character up to a |
21 | * maximum of a1 or 0 in case of error. | 21 | * maximum of a1 or 0 in case of error. |
22 | * | 22 | * |
23 | * Note: for performance reasons we deliberately accept that a user may | 23 | * Note: for performance reasons we deliberately accept that a user may |
diff --git a/arch/mips/math-emu/dp_fsp.c b/arch/mips/math-emu/dp_fsp.c index 1dfbd92ba9d0..daed6834dc15 100644 --- a/arch/mips/math-emu/dp_fsp.c +++ b/arch/mips/math-emu/dp_fsp.c | |||
@@ -62,7 +62,7 @@ ieee754dp ieee754dp_fsp(ieee754sp x) | |||
62 | break; | 62 | break; |
63 | } | 63 | } |
64 | 64 | ||
65 | /* CANT possibly overflow,underflow, or need rounding | 65 | /* CAN'T possibly overflow,underflow, or need rounding |
66 | */ | 66 | */ |
67 | 67 | ||
68 | /* drop the hidden bit */ | 68 | /* drop the hidden bit */ |
diff --git a/arch/mips/math-emu/dp_mul.c b/arch/mips/math-emu/dp_mul.c index aa566e785f5a..09175f461920 100644 --- a/arch/mips/math-emu/dp_mul.c +++ b/arch/mips/math-emu/dp_mul.c | |||
@@ -104,7 +104,7 @@ ieee754dp ieee754dp_mul(ieee754dp x, ieee754dp y) | |||
104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): | 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): |
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | /* rm = xm * ym, re = xe+ye basicly */ | 107 | /* rm = xm * ym, re = xe+ye basically */ |
108 | assert(xm & DP_HIDDEN_BIT); | 108 | assert(xm & DP_HIDDEN_BIT); |
109 | assert(ym & DP_HIDDEN_BIT); | 109 | assert(ym & DP_HIDDEN_BIT); |
110 | { | 110 | { |
diff --git a/arch/mips/math-emu/dsemul.c b/arch/mips/math-emu/dsemul.c index 36d975ae08f8..3c4a8c5ba7f2 100644 --- a/arch/mips/math-emu/dsemul.c +++ b/arch/mips/math-emu/dsemul.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * not change cp0_epc due to the instruction | 32 | * not change cp0_epc due to the instruction |
33 | * | 33 | * |
34 | * According to the spec: | 34 | * According to the spec: |
35 | * 1) it shouldnt be a branch :-) | 35 | * 1) it shouldn't be a branch :-) |
36 | * 2) it can be a COP instruction :-( | 36 | * 2) it can be a COP instruction :-( |
37 | * 3) if we are tring to run a protected memory space we must take | 37 | * 3) if we are tring to run a protected memory space we must take |
38 | * special care on memory access instructions :-( | 38 | * special care on memory access instructions :-( |
diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c index c06bb4022be5..2722a2570ea4 100644 --- a/arch/mips/math-emu/sp_mul.c +++ b/arch/mips/math-emu/sp_mul.c | |||
@@ -104,7 +104,7 @@ ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y) | |||
104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): | 104 | case CLPAIR(IEEE754_CLASS_NORM, IEEE754_CLASS_NORM): |
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | /* rm = xm * ym, re = xe+ye basicly */ | 107 | /* rm = xm * ym, re = xe+ye basically */ |
108 | assert(xm & SP_HIDDEN_BIT); | 108 | assert(xm & SP_HIDDEN_BIT); |
109 | assert(ym & SP_HIDDEN_BIT); | 109 | assert(ym & SP_HIDDEN_BIT); |
110 | 110 | ||
diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S index 2d08268bb705..89c412bc4b64 100644 --- a/arch/mips/mm/cex-sb1.S +++ b/arch/mips/mm/cex-sb1.S | |||
@@ -79,7 +79,7 @@ LEAF(except_vec2_sb1) | |||
79 | recovered_dcache: | 79 | recovered_dcache: |
80 | /* | 80 | /* |
81 | * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA). | 81 | * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA). |
82 | * Ought to log the occurence of this recovered dcache error. | 82 | * Ought to log the occurrence of this recovered dcache error. |
83 | */ | 83 | */ |
84 | b recovered | 84 | b recovered |
85 | mtc0 $0,C0_CERR_D | 85 | mtc0 $0,C0_CERR_D |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 04f9e17db9d0..5ef294fbb6e7 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -352,7 +352,7 @@ static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) | |||
352 | 352 | ||
353 | /* | 353 | /* |
354 | * Write random or indexed TLB entry, and care about the hazards from | 354 | * Write random or indexed TLB entry, and care about the hazards from |
355 | * the preceeding mtc0 and for the following eret. | 355 | * the preceding mtc0 and for the following eret. |
356 | */ | 356 | */ |
357 | enum tlb_write_entry { tlb_random, tlb_indexed }; | 357 | enum tlb_write_entry { tlb_random, tlb_indexed }; |
358 | 358 | ||
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c index e67891521ac1..49a38b09a488 100644 --- a/arch/mips/mti-malta/malta-smtc.c +++ b/arch/mips/mti-malta/malta-smtc.c | |||
@@ -130,7 +130,7 @@ int plat_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity, | |||
130 | * cleared in the affinity mask, there will never be any | 130 | * cleared in the affinity mask, there will never be any |
131 | * interrupt forwarding. But as soon as a program or operator | 131 | * interrupt forwarding. But as soon as a program or operator |
132 | * sets affinity for one of the related IRQs, we need to make | 132 | * sets affinity for one of the related IRQs, we need to make |
133 | * sure that we don't ever try to forward across the VPE boundry, | 133 | * sure that we don't ever try to forward across the VPE boundary, |
134 | * at least not until we engineer a system where the interrupt | 134 | * at least not until we engineer a system where the interrupt |
135 | * _ack() or _end() function can somehow know that it corresponds | 135 | * _ack() or _end() function can somehow know that it corresponds |
136 | * to an interrupt taken on another VPE, and perform the appropriate | 136 | * to an interrupt taken on another VPE, and perform the appropriate |
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 68798f869c0f..8fbfbf2b931c 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c | |||
@@ -344,7 +344,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id) | |||
344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. | 344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. |
345 | * | 345 | * |
346 | * bus - pointer to the bus number of the device to | 346 | * bus - pointer to the bus number of the device to |
347 | * be targetted for the configuration cycle. | 347 | * be targeted for the configuration cycle. |
348 | * The only element of the pci_bus structure | 348 | * The only element of the pci_bus structure |
349 | * used is bus->number. This argument determines | 349 | * used is bus->number. This argument determines |
350 | * if the configuration access will be Type 0 or | 350 | * if the configuration access will be Type 0 or |
@@ -354,7 +354,7 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id) | |||
354 | * | 354 | * |
355 | * devfn - this is an 8-bit field. The lower three bits | 355 | * devfn - this is an 8-bit field. The lower three bits |
356 | * specify the function number of the device to | 356 | * specify the function number of the device to |
357 | * be targetted for the configuration cycle, with | 357 | * be targeted for the configuration cycle, with |
358 | * all three-bit combinations being legal. The | 358 | * all three-bit combinations being legal. The |
359 | * upper five bits specify the device number, | 359 | * upper five bits specify the device number, |
360 | * with legal values being 10 to 31. | 360 | * with legal values being 10 to 31. |
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 6f5e24c6ae67..af8c31996965 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -210,7 +210,7 @@ static int __init bcm1480_pcibios_init(void) | |||
210 | PCIBIOS_MIN_IO = 0x00008000UL; | 210 | PCIBIOS_MIN_IO = 0x00008000UL; |
211 | PCIBIOS_MIN_MEM = 0x01000000UL; | 211 | PCIBIOS_MIN_MEM = 0x01000000UL; |
212 | 212 | ||
213 | /* Set I/O resource limits. - unlimited for now to accomodate HT */ | 213 | /* Set I/O resource limits. - unlimited for now to accommodate HT */ |
214 | ioport_resource.end = 0xffffffffUL; | 214 | ioport_resource.end = 0xffffffffUL; |
215 | iomem_resource.end = 0xffffffffUL; | 215 | iomem_resource.end = 0xffffffffUL; |
216 | 216 | ||
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c index 2d74fc9ae3ba..ed1c54284b8f 100644 --- a/arch/mips/pci/pci-octeon.c +++ b/arch/mips/pci/pci-octeon.c | |||
@@ -441,7 +441,7 @@ static void octeon_pci_initialize(void) | |||
441 | 441 | ||
442 | /* | 442 | /* |
443 | * TDOMC must be set to one in PCI mode. TDOMC should be set to 4 | 443 | * TDOMC must be set to one in PCI mode. TDOMC should be set to 4 |
444 | * in PCI-X mode to allow four oustanding splits. Otherwise, | 444 | * in PCI-X mode to allow four outstanding splits. Otherwise, |
445 | * should not change from its reset value. Don't write PCI_CFG19 | 445 | * should not change from its reset value. Don't write PCI_CFG19 |
446 | * in PCI mode (0x82000001 reset value), write it to 0x82000004 | 446 | * in PCI mode (0x82000001 reset value), write it to 0x82000004 |
447 | * after PCI-X mode is known. MRBCI,MDWE,MDRE -> must be zero. | 447 | * after PCI-X mode is known. MRBCI,MDWE,MDRE -> must be zero. |
@@ -515,7 +515,7 @@ static void octeon_pci_initialize(void) | |||
515 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ | 515 | #endif /* USE_OCTEON_INTERNAL_ARBITER */ |
516 | 516 | ||
517 | /* | 517 | /* |
518 | * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE, | 518 | * Preferably written to 1 to set MLTD. [RDSATI,TRTAE, |
519 | * TWTAE,TMAE,DPPMR -> must be zero. TILT -> must not be set to | 519 | * TWTAE,TMAE,DPPMR -> must be zero. TILT -> must not be set to |
520 | * 1..7. | 520 | * 1..7. |
521 | */ | 521 | */ |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 38bc28005b4a..33bba7bff258 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -125,7 +125,7 @@ void __devinit register_pci_controller(struct pci_controller *hose) | |||
125 | hose_tail = &hose->next; | 125 | hose_tail = &hose->next; |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Do not panic here but later - this might hapen before console init. | 128 | * Do not panic here but later - this might happen before console init. |
129 | */ | 129 | */ |
130 | if (!hose->io_map_base) { | 130 | if (!hose->io_map_base) { |
131 | printk(KERN_WARNING | 131 | printk(KERN_WARNING |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c index fb37a10e0309..2413ea67877e 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c | |||
@@ -239,7 +239,7 @@ void __init prom_init(void) | |||
239 | #ifdef CONFIG_PMCTWILED | 239 | #ifdef CONFIG_PMCTWILED |
240 | /* | 240 | /* |
241 | * Setup LED states before the subsys_initcall loads other | 241 | * Setup LED states before the subsys_initcall loads other |
242 | * dependant drivers/modules. | 242 | * dependent drivers/modules. |
243 | */ | 243 | */ |
244 | pmctwiled_setup(); | 244 | pmctwiled_setup(); |
245 | #endif | 245 | #endif |
diff --git a/arch/mips/pnx833x/common/platform.c b/arch/mips/pnx833x/common/platform.c index ce45df17fd09..87167dcc79fa 100644 --- a/arch/mips/pnx833x/common/platform.c +++ b/arch/mips/pnx833x/common/platform.c | |||
@@ -165,7 +165,7 @@ static struct i2c_pnx0105_dev pnx833x_i2c_dev[] = { | |||
165 | { | 165 | { |
166 | .base = PNX833X_I2C0_PORTS_START, | 166 | .base = PNX833X_I2C0_PORTS_START, |
167 | .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */ | 167 | .irq = -1, /* should be PNX833X_PIC_I2C0_INT but polling is faster */ |
168 | .clock = 6, /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Prefered HDCP) */ | 168 | .clock = 6, /* 0 == 400 kHz, 4 == 100 kHz(Maximum HDMI), 6 = 50kHz(Preferred HDCP) */ |
169 | .bus_addr = 0, /* no slave support */ | 169 | .bus_addr = 0, /* no slave support */ |
170 | }, | 170 | }, |
171 | { | 171 | { |
diff --git a/arch/mips/sgi-ip27/Kconfig b/arch/mips/sgi-ip27/Kconfig index 5e960ae9735a..bc5e9769bb73 100644 --- a/arch/mips/sgi-ip27/Kconfig +++ b/arch/mips/sgi-ip27/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | #config SGI_SN0_XXL | 1 | #config SGI_SN0_XXL |
2 | # bool "IP27 XXL" | 2 | # bool "IP27 XXL" |
3 | # depends on SGI_IP27 | 3 | # depends on SGI_IP27 |
4 | # This options adds support for userspace processes upto 16TB size. | 4 | # This options adds support for userspace processes up to 16TB size. |
5 | # Normally the limit is just .5TB. | 5 | # Normally the limit is just .5TB. |
6 | 6 | ||
7 | choice | 7 | choice |
diff --git a/arch/mips/sgi-ip27/TODO b/arch/mips/sgi-ip27/TODO index 19f1512c8f2e..160857ff1483 100644 --- a/arch/mips/sgi-ip27/TODO +++ b/arch/mips/sgi-ip27/TODO | |||
@@ -13,7 +13,7 @@ being invoked on all nodes in ip27-memory.c. | |||
13 | 9. start_thread must turn off UX64 ... and define tlb_refill_debug. | 13 | 9. start_thread must turn off UX64 ... and define tlb_refill_debug. |
14 | 10. Need a bad pmd table, bad pte table. __bad_pmd_table/__bad_pagetable | 14 | 10. Need a bad pmd table, bad pte table. __bad_pmd_table/__bad_pagetable |
15 | does not agree with pgd_bad/pmd_bad. | 15 | does not agree with pgd_bad/pmd_bad. |
16 | 11. All intrs (ip27_do_irq handlers) are targetted at cpu A on the node. | 16 | 11. All intrs (ip27_do_irq handlers) are targeted at cpu A on the node. |
17 | This might need to change later. Only the timer intr is set up to be | 17 | This might need to change later. Only the timer intr is set up to be |
18 | received on both Cpu A and B. (ip27_do_irq()/bridge_startup()) | 18 | received on both Cpu A and B. (ip27_do_irq()/bridge_startup()) |
19 | 13. Cache flushing (specially the SMP version) has to be investigated. | 19 | 13. Cache flushing (specially the SMP version) has to be investigated. |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 51d3a4f2d7e1..923c080f77bd 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -93,7 +93,7 @@ static void __cpuinit per_hub_init(cnodeid_t cnode) | |||
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Some interrupts are reserved by hardware or by software convention. | 95 | * Some interrupts are reserved by hardware or by software convention. |
96 | * Mark these as reserved right away so they won't be used accidently | 96 | * Mark these as reserved right away so they won't be used accidentally |
97 | * later. | 97 | * later. |
98 | */ | 98 | */ |
99 | for (i = 0; i <= BASE_PCI_IRQ; i++) { | 99 | for (i = 0; i <= BASE_PCI_IRQ; i++) { |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 11488719dd97..0a04603d577c 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * Linux has a controller-independent x86 interrupt architecture. | 41 | * Linux has a controller-independent x86 interrupt architecture. |
42 | * every controller has a 'controller-template', that is used | 42 | * every controller has a 'controller-template', that is used |
43 | * by the main code to do the right thing. Each driver-visible | 43 | * by the main code to do the right thing. Each driver-visible |
44 | * interrupt source is transparently wired to the apropriate | 44 | * interrupt source is transparently wired to the appropriate |
45 | * controller. Thus drivers need not be aware of the | 45 | * controller. Thus drivers need not be aware of the |
46 | * interrupt-controller. | 46 | * interrupt-controller. |
47 | * | 47 | * |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index a523c94fa698..feaf09cc8632 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
@@ -2,7 +2,6 @@ config MN10300 | |||
2 | def_bool y | 2 | def_bool y |
3 | select HAVE_OPROFILE | 3 | select HAVE_OPROFILE |
4 | select HAVE_GENERIC_HARDIRQS | 4 | select HAVE_GENERIC_HARDIRQS |
5 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
6 | select GENERIC_IRQ_SHOW | 5 | select GENERIC_IRQ_SHOW |
7 | select HAVE_ARCH_TRACEHOOK | 6 | select HAVE_ARCH_TRACEHOOK |
8 | select HAVE_ARCH_KGDB | 7 | select HAVE_ARCH_KGDB |
diff --git a/arch/mn10300/include/asm/cpu-regs.h b/arch/mn10300/include/asm/cpu-regs.h index 90ed4a365c97..c54effae2202 100644 --- a/arch/mn10300/include/asm/cpu-regs.h +++ b/arch/mn10300/include/asm/cpu-regs.h | |||
@@ -49,7 +49,7 @@ asm(" .am33_2\n"); | |||
49 | #define EPSW_IM_6 0x00000600 /* interrupt mode 6 */ | 49 | #define EPSW_IM_6 0x00000600 /* interrupt mode 6 */ |
50 | #define EPSW_IM_7 0x00000700 /* interrupt mode 7 */ | 50 | #define EPSW_IM_7 0x00000700 /* interrupt mode 7 */ |
51 | #define EPSW_IE 0x00000800 /* interrupt enable */ | 51 | #define EPSW_IE 0x00000800 /* interrupt enable */ |
52 | #define EPSW_S 0x00003000 /* software auxilliary bits */ | 52 | #define EPSW_S 0x00003000 /* software auxiliary bits */ |
53 | #define EPSW_T 0x00008000 /* trace enable */ | 53 | #define EPSW_T 0x00008000 /* trace enable */ |
54 | #define EPSW_nSL 0x00010000 /* not supervisor level */ | 54 | #define EPSW_nSL 0x00010000 /* not supervisor level */ |
55 | #define EPSW_NMID 0x00020000 /* nonmaskable interrupt disable */ | 55 | #define EPSW_NMID 0x00020000 /* nonmaskable interrupt disable */ |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9b1f427cdc37..69ff049c8571 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -15,7 +15,6 @@ config PARISC | |||
15 | select HAVE_GENERIC_HARDIRQS | 15 | select HAVE_GENERIC_HARDIRQS |
16 | select GENERIC_IRQ_PROBE | 16 | select GENERIC_IRQ_PROBE |
17 | select IRQ_PER_CPU | 17 | select IRQ_PER_CPU |
18 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
19 | 18 | ||
20 | help | 19 | help |
21 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/include/asm/eisa_eeprom.h b/arch/parisc/include/asm/eisa_eeprom.h index 9c9da980402a..8ce8b85ca588 100644 --- a/arch/parisc/include/asm/eisa_eeprom.h +++ b/arch/parisc/include/asm/eisa_eeprom.h | |||
@@ -27,7 +27,7 @@ struct eeprom_header | |||
27 | u_int8_t ver_maj; | 27 | u_int8_t ver_maj; |
28 | u_int8_t ver_min; | 28 | u_int8_t ver_min; |
29 | u_int8_t num_slots; /* number of EISA slots in system */ | 29 | u_int8_t num_slots; /* number of EISA slots in system */ |
30 | u_int16_t csum; /* checksum, I don't know how to calulate this */ | 30 | u_int16_t csum; /* checksum, I don't know how to calculate this */ |
31 | u_int8_t pad[10]; | 31 | u_int8_t pad[10]; |
32 | } __attribute__ ((packed)); | 32 | } __attribute__ ((packed)); |
33 | 33 | ||
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index e5477092a5d4..ead8d2a1034c 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -187,8 +187,8 @@ | |||
187 | 187 | ||
188 | /* Register definitions for tlb miss handler macros */ | 188 | /* Register definitions for tlb miss handler macros */ |
189 | 189 | ||
190 | va = r8 /* virtual address for which the trap occured */ | 190 | va = r8 /* virtual address for which the trap occurred */ |
191 | spc = r24 /* space for which the trap occured */ | 191 | spc = r24 /* space for which the trap occurred */ |
192 | 192 | ||
193 | #ifndef CONFIG_64BIT | 193 | #ifndef CONFIG_64BIT |
194 | 194 | ||
@@ -882,7 +882,7 @@ ENTRY(syscall_exit_rfi) | |||
882 | * (we don't store them in the sigcontext), so set them | 882 | * (we don't store them in the sigcontext), so set them |
883 | * to "proper" values now (otherwise we'll wind up restoring | 883 | * to "proper" values now (otherwise we'll wind up restoring |
884 | * whatever was last stored in the task structure, which might | 884 | * whatever was last stored in the task structure, which might |
885 | * be inconsistent if an interrupt occured while on the gateway | 885 | * be inconsistent if an interrupt occurred while on the gateway |
886 | * page). Note that we may be "trashing" values the user put in | 886 | * page). Note that we may be "trashing" values the user put in |
887 | * them, but we don't support the user changing them. | 887 | * them, but we don't support the user changing them. |
888 | */ | 888 | */ |
@@ -1156,11 +1156,11 @@ ENDPROC(intr_save) | |||
1156 | */ | 1156 | */ |
1157 | 1157 | ||
1158 | t0 = r1 /* temporary register 0 */ | 1158 | t0 = r1 /* temporary register 0 */ |
1159 | va = r8 /* virtual address for which the trap occured */ | 1159 | va = r8 /* virtual address for which the trap occurred */ |
1160 | t1 = r9 /* temporary register 1 */ | 1160 | t1 = r9 /* temporary register 1 */ |
1161 | pte = r16 /* pte/phys page # */ | 1161 | pte = r16 /* pte/phys page # */ |
1162 | prot = r17 /* prot bits */ | 1162 | prot = r17 /* prot bits */ |
1163 | spc = r24 /* space for which the trap occured */ | 1163 | spc = r24 /* space for which the trap occurred */ |
1164 | ptp = r25 /* page directory/page table pointer */ | 1164 | ptp = r25 /* page directory/page table pointer */ |
1165 | 1165 | ||
1166 | #ifdef CONFIG_64BIT | 1166 | #ifdef CONFIG_64BIT |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 4dbdf0ed6fa0..145c5e4caaa0 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -131,7 +131,7 @@ $pgt_fill_loop: | |||
131 | ldo THREAD_SZ_ALGN(%r6),%sp | 131 | ldo THREAD_SZ_ALGN(%r6),%sp |
132 | 132 | ||
133 | #ifdef CONFIG_SMP | 133 | #ifdef CONFIG_SMP |
134 | /* Set the smp rendevous address into page zero. | 134 | /* Set the smp rendezvous address into page zero. |
135 | ** It would be safer to do this in init_smp_config() but | 135 | ** It would be safer to do this in init_smp_config() but |
136 | ** it's just way easier to deal with here because | 136 | ** it's just way easier to deal with here because |
137 | ** of 64-bit function ptrs and the address is local to this file. | 137 | ** of 64-bit function ptrs and the address is local to this file. |
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index d228d8237879..08324aac3544 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
@@ -93,7 +93,7 @@ void __init setup_pdc(void) | |||
93 | case 0x6: /* 705, 710 */ | 93 | case 0x6: /* 705, 710 */ |
94 | case 0x7: /* 715, 725 */ | 94 | case 0x7: /* 715, 725 */ |
95 | case 0x8: /* 745, 747, 742 */ | 95 | case 0x8: /* 745, 747, 742 */ |
96 | case 0xA: /* 712 and similiar */ | 96 | case 0xA: /* 712 and similar */ |
97 | case 0xC: /* 715/64, at least */ | 97 | case 0xC: /* 715/64, at least */ |
98 | 98 | ||
99 | pdc_type = PDC_TYPE_SNAKE; | 99 | pdc_type = PDC_TYPE_SNAKE; |
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 609a331878e7..12c1ed33dc18 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c | |||
@@ -291,7 +291,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
291 | DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc); | 291 | DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc); |
292 | DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); | 292 | DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); |
293 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); | 293 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); |
294 | /* FIXME: Should probably be converted aswell for the compat case */ | 294 | /* FIXME: Should probably be converted as well for the compat case */ |
295 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 295 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |
296 | } | 296 | } |
297 | 297 | ||
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 68e75ce838d6..82a52b2fb13f 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -605,7 +605,7 @@ cas_action: | |||
605 | copy %r0, %r21 | 605 | copy %r0, %r21 |
606 | 606 | ||
607 | 3: | 607 | 3: |
608 | /* Error occured on load or store */ | 608 | /* Error occurred on load or store */ |
609 | /* Free lock */ | 609 | /* Free lock */ |
610 | stw %r20, 0(%sr2,%r20) | 610 | stw %r20, 0(%sr2,%r20) |
611 | #if ENABLE_LWS_DEBUG | 611 | #if ENABLE_LWS_DEBUG |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 74867dfdabe5..4be85ee10b85 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -34,7 +34,7 @@ | |||
34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and | 34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and |
35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific | 35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific |
36 | * implementation is required on wide palinux. Use ENTRY_COMP where | 36 | * implementation is required on wide palinux. Use ENTRY_COMP where |
37 | * the compatability layer has a useful 32-bit implementation. | 37 | * the compatibility layer has a useful 32-bit implementation. |
38 | */ | 38 | */ |
39 | #define ENTRY_SAME(_name_) .dword sys_##_name_ | 39 | #define ENTRY_SAME(_name_) .dword sys_##_name_ |
40 | #define ENTRY_DIFF(_name_) .dword sys32_##_name_ | 40 | #define ENTRY_DIFF(_name_) .dword sys32_##_name_ |
diff --git a/arch/parisc/math-emu/dfadd.c b/arch/parisc/math-emu/dfadd.c index e147d7d3b0f4..d37e2d2cb6fe 100644 --- a/arch/parisc/math-emu/dfadd.c +++ b/arch/parisc/math-emu/dfadd.c | |||
@@ -303,7 +303,7 @@ dbl_fadd( | |||
303 | if(Dbl_iszero_hidden(resultp1)) | 303 | if(Dbl_iszero_hidden(resultp1)) |
304 | { | 304 | { |
305 | /* Handle normalization */ | 305 | /* Handle normalization */ |
306 | /* A straight foward algorithm would now shift the result | 306 | /* A straight forward algorithm would now shift the result |
307 | * and extension left until the hidden bit becomes one. Not | 307 | * and extension left until the hidden bit becomes one. Not |
308 | * all of the extension bits need participate in the shift. | 308 | * all of the extension bits need participate in the shift. |
309 | * Only the two most significant bits (round and guard) are | 309 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/dfsub.c b/arch/parisc/math-emu/dfsub.c index 87ebc60d465b..2e8b5a79bff7 100644 --- a/arch/parisc/math-emu/dfsub.c +++ b/arch/parisc/math-emu/dfsub.c | |||
@@ -306,7 +306,7 @@ dbl_fsub( | |||
306 | if(Dbl_iszero_hidden(resultp1)) | 306 | if(Dbl_iszero_hidden(resultp1)) |
307 | { | 307 | { |
308 | /* Handle normalization */ | 308 | /* Handle normalization */ |
309 | /* A straight foward algorithm would now shift the result | 309 | /* A straight forward algorithm would now shift the result |
310 | * and extension left until the hidden bit becomes one. Not | 310 | * and extension left until the hidden bit becomes one. Not |
311 | * all of the extension bits need participate in the shift. | 311 | * all of the extension bits need participate in the shift. |
312 | * Only the two most significant bits (round and guard) are | 312 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/fmpyfadd.c b/arch/parisc/math-emu/fmpyfadd.c index 5dd7f93a89be..b067c45c872d 100644 --- a/arch/parisc/math-emu/fmpyfadd.c +++ b/arch/parisc/math-emu/fmpyfadd.c | |||
@@ -531,7 +531,7 @@ dbl_fmpyfadd( | |||
531 | sign_save = Dbl_signextendedsign(resultp1); | 531 | sign_save = Dbl_signextendedsign(resultp1); |
532 | if (Dbl_iszero_hidden(resultp1)) { | 532 | if (Dbl_iszero_hidden(resultp1)) { |
533 | /* Handle normalization */ | 533 | /* Handle normalization */ |
534 | /* A straight foward algorithm would now shift the | 534 | /* A straightforward algorithm would now shift the |
535 | * result and extension left until the hidden bit | 535 | * result and extension left until the hidden bit |
536 | * becomes one. Not all of the extension bits need | 536 | * becomes one. Not all of the extension bits need |
537 | * participate in the shift. Only the two most | 537 | * participate in the shift. Only the two most |
@@ -1191,7 +1191,7 @@ unsigned int *status; | |||
1191 | sign_save = Dbl_signextendedsign(resultp1); | 1191 | sign_save = Dbl_signextendedsign(resultp1); |
1192 | if (Dbl_iszero_hidden(resultp1)) { | 1192 | if (Dbl_iszero_hidden(resultp1)) { |
1193 | /* Handle normalization */ | 1193 | /* Handle normalization */ |
1194 | /* A straight foward algorithm would now shift the | 1194 | /* A straightforward algorithm would now shift the |
1195 | * result and extension left until the hidden bit | 1195 | * result and extension left until the hidden bit |
1196 | * becomes one. Not all of the extension bits need | 1196 | * becomes one. Not all of the extension bits need |
1197 | * participate in the shift. Only the two most | 1197 | * participate in the shift. Only the two most |
@@ -1841,7 +1841,7 @@ unsigned int *status; | |||
1841 | sign_save = Sgl_signextendedsign(resultp1); | 1841 | sign_save = Sgl_signextendedsign(resultp1); |
1842 | if (Sgl_iszero_hidden(resultp1)) { | 1842 | if (Sgl_iszero_hidden(resultp1)) { |
1843 | /* Handle normalization */ | 1843 | /* Handle normalization */ |
1844 | /* A straight foward algorithm would now shift the | 1844 | /* A straightforward algorithm would now shift the |
1845 | * result and extension left until the hidden bit | 1845 | * result and extension left until the hidden bit |
1846 | * becomes one. Not all of the extension bits need | 1846 | * becomes one. Not all of the extension bits need |
1847 | * participate in the shift. Only the two most | 1847 | * participate in the shift. Only the two most |
@@ -2483,7 +2483,7 @@ unsigned int *status; | |||
2483 | sign_save = Sgl_signextendedsign(resultp1); | 2483 | sign_save = Sgl_signextendedsign(resultp1); |
2484 | if (Sgl_iszero_hidden(resultp1)) { | 2484 | if (Sgl_iszero_hidden(resultp1)) { |
2485 | /* Handle normalization */ | 2485 | /* Handle normalization */ |
2486 | /* A straight foward algorithm would now shift the | 2486 | /* A straightforward algorithm would now shift the |
2487 | * result and extension left until the hidden bit | 2487 | * result and extension left until the hidden bit |
2488 | * becomes one. Not all of the extension bits need | 2488 | * becomes one. Not all of the extension bits need |
2489 | * participate in the shift. Only the two most | 2489 | * participate in the shift. Only the two most |
diff --git a/arch/parisc/math-emu/sfadd.c b/arch/parisc/math-emu/sfadd.c index 008d721b5d22..f802cd6c7869 100644 --- a/arch/parisc/math-emu/sfadd.c +++ b/arch/parisc/math-emu/sfadd.c | |||
@@ -298,7 +298,7 @@ sgl_fadd( | |||
298 | if(Sgl_iszero_hidden(result)) | 298 | if(Sgl_iszero_hidden(result)) |
299 | { | 299 | { |
300 | /* Handle normalization */ | 300 | /* Handle normalization */ |
301 | /* A straight foward algorithm would now shift the result | 301 | /* A straightforward algorithm would now shift the result |
302 | * and extension left until the hidden bit becomes one. Not | 302 | * and extension left until the hidden bit becomes one. Not |
303 | * all of the extension bits need participate in the shift. | 303 | * all of the extension bits need participate in the shift. |
304 | * Only the two most significant bits (round and guard) are | 304 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/math-emu/sfsub.c b/arch/parisc/math-emu/sfsub.c index 24eef61c8e3b..5f90d0f31a52 100644 --- a/arch/parisc/math-emu/sfsub.c +++ b/arch/parisc/math-emu/sfsub.c | |||
@@ -301,7 +301,7 @@ sgl_fsub( | |||
301 | if(Sgl_iszero_hidden(result)) | 301 | if(Sgl_iszero_hidden(result)) |
302 | { | 302 | { |
303 | /* Handle normalization */ | 303 | /* Handle normalization */ |
304 | /* A straight foward algorithm would now shift the result | 304 | /* A straightforward algorithm would now shift the result |
305 | * and extension left until the hidden bit becomes one. Not | 305 | * and extension left until the hidden bit becomes one. Not |
306 | * all of the extension bits need participate in the shift. | 306 | * all of the extension bits need participate in the shift. |
307 | * Only the two most significant bits (round and guard) are | 307 | * Only the two most significant bits (round and guard) are |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b7ed8d7a9b33..b1d126258dee 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -266,8 +266,10 @@ static void __init setup_bootmem(void) | |||
266 | } | 266 | } |
267 | memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); | 267 | memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); |
268 | 268 | ||
269 | for (i = 0; i < npmem_ranges; i++) | 269 | for (i = 0; i < npmem_ranges; i++) { |
270 | node_set_state(i, N_NORMAL_MEMORY); | ||
270 | node_set_online(i); | 271 | node_set_online(i); |
272 | } | ||
271 | #endif | 273 | #endif |
272 | 274 | ||
273 | /* | 275 | /* |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index d0e8a1dbf822..8f4d50b0adfa 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -138,7 +138,6 @@ config PPC | |||
138 | select HAVE_GENERIC_HARDIRQS | 138 | select HAVE_GENERIC_HARDIRQS |
139 | select HAVE_SPARSE_IRQ | 139 | select HAVE_SPARSE_IRQ |
140 | select IRQ_PER_CPU | 140 | select IRQ_PER_CPU |
141 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
142 | select GENERIC_IRQ_SHOW | 141 | select GENERIC_IRQ_SHOW |
143 | select GENERIC_IRQ_SHOW_LEVEL | 142 | select GENERIC_IRQ_SHOW_LEVEL |
144 | 143 | ||
@@ -210,7 +209,7 @@ config ARCH_HIBERNATION_POSSIBLE | |||
210 | config ARCH_SUSPEND_POSSIBLE | 209 | config ARCH_SUSPEND_POSSIBLE |
211 | def_bool y | 210 | def_bool y |
212 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ | 211 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \ |
213 | PPC_85xx || PPC_86xx || PPC_PSERIES || 44x || 40x | 212 | (PPC_85xx && !SMP) || PPC_86xx || PPC_PSERIES || 44x || 40x |
214 | 213 | ||
215 | config PPC_DCR_NATIVE | 214 | config PPC_DCR_NATIVE |
216 | bool | 215 | bool |
diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/p1020rdb.dts index 22f64b62d7f6..e0668f877794 100644 --- a/arch/powerpc/boot/dts/p1020rdb.dts +++ b/arch/powerpc/boot/dts/p1020rdb.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * P1020 RDB Device Tree Source | 2 | * P1020 RDB Device Tree Source |
3 | * | 3 | * |
4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -553,7 +553,7 @@ | |||
553 | reg = <0 0xffe09000 0 0x1000>; | 553 | reg = <0 0xffe09000 0 0x1000>; |
554 | bus-range = <0 255>; | 554 | bus-range = <0 255>; |
555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 555 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
556 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 556 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
557 | clock-frequency = <33333333>; | 557 | clock-frequency = <33333333>; |
558 | interrupt-parent = <&mpic>; | 558 | interrupt-parent = <&mpic>; |
559 | interrupts = <16 2>; | 559 | interrupts = <16 2>; |
@@ -580,8 +580,8 @@ | |||
580 | #address-cells = <3>; | 580 | #address-cells = <3>; |
581 | reg = <0 0xffe0a000 0 0x1000>; | 581 | reg = <0 0xffe0a000 0 0x1000>; |
582 | bus-range = <0 255>; | 582 | bus-range = <0 255>; |
583 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 583 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
584 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 584 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
585 | clock-frequency = <33333333>; | 585 | clock-frequency = <33333333>; |
586 | interrupt-parent = <&mpic>; | 586 | interrupt-parent = <&mpic>; |
587 | interrupts = <16 2>; | 587 | interrupts = <16 2>; |
@@ -590,8 +590,8 @@ | |||
590 | #size-cells = <2>; | 590 | #size-cells = <2>; |
591 | #address-cells = <3>; | 591 | #address-cells = <3>; |
592 | device_type = "pci"; | 592 | device_type = "pci"; |
593 | ranges = <0x2000000 0x0 0xc0000000 | 593 | ranges = <0x2000000 0x0 0x80000000 |
594 | 0x2000000 0x0 0xc0000000 | 594 | 0x2000000 0x0 0x80000000 |
595 | 0x0 0x20000000 | 595 | 0x0 0x20000000 |
596 | 596 | ||
597 | 0x1000000 0x0 0x0 | 597 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/p2020rdb.dts index da4cb0d8d215..e2d48fd4416e 100644 --- a/arch/powerpc/boot/dts/p2020rdb.dts +++ b/arch/powerpc/boot/dts/p2020rdb.dts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * P2020 RDB Device Tree Source | 2 | * P2020 RDB Device Tree Source |
3 | * | 3 | * |
4 | * Copyright 2009 Freescale Semiconductor Inc. | 4 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -537,7 +537,7 @@ | |||
537 | reg = <0 0xffe09000 0 0x1000>; | 537 | reg = <0 0xffe09000 0 0x1000>; |
538 | bus-range = <0 255>; | 538 | bus-range = <0 255>; |
539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 539 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
540 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 540 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
541 | clock-frequency = <33333333>; | 541 | clock-frequency = <33333333>; |
542 | interrupt-parent = <&mpic>; | 542 | interrupt-parent = <&mpic>; |
543 | interrupts = <25 2>; | 543 | interrupts = <25 2>; |
@@ -564,8 +564,8 @@ | |||
564 | #address-cells = <3>; | 564 | #address-cells = <3>; |
565 | reg = <0 0xffe0a000 0 0x1000>; | 565 | reg = <0 0xffe0a000 0 0x1000>; |
566 | bus-range = <0 255>; | 566 | bus-range = <0 255>; |
567 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 567 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
568 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 568 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
569 | clock-frequency = <33333333>; | 569 | clock-frequency = <33333333>; |
570 | interrupt-parent = <&mpic>; | 570 | interrupt-parent = <&mpic>; |
571 | interrupts = <26 2>; | 571 | interrupts = <26 2>; |
@@ -574,8 +574,8 @@ | |||
574 | #size-cells = <2>; | 574 | #size-cells = <2>; |
575 | #address-cells = <3>; | 575 | #address-cells = <3>; |
576 | device_type = "pci"; | 576 | device_type = "pci"; |
577 | ranges = <0x2000000 0x0 0xc0000000 | 577 | ranges = <0x2000000 0x0 0x80000000 |
578 | 0x2000000 0x0 0xc0000000 | 578 | 0x2000000 0x0 0x80000000 |
579 | 0x0 0x20000000 | 579 | 0x0 0x20000000 |
580 | 580 | ||
581 | 0x1000000 0x0 0x0 | 581 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts index 0fe93d0c8b2e..b69c3a5dc858 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | |||
@@ -6,7 +6,7 @@ | |||
6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, | 6 | * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, |
7 | * eth1, eth2, sdhc, crypto, global-util, pci0. | 7 | * eth1, eth2, sdhc, crypto, global-util, pci0. |
8 | * | 8 | * |
9 | * Copyright 2009 Freescale Semiconductor Inc. | 9 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the | 12 | * under the terms of the GNU General Public License as published by the |
@@ -342,7 +342,7 @@ | |||
342 | reg = <0 0xffe09000 0 0x1000>; | 342 | reg = <0 0xffe09000 0 0x1000>; |
343 | bus-range = <0 255>; | 343 | bus-range = <0 255>; |
344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 | 344 | ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 |
345 | 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; | 345 | 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; |
346 | clock-frequency = <33333333>; | 346 | clock-frequency = <33333333>; |
347 | interrupt-parent = <&mpic>; | 347 | interrupt-parent = <&mpic>; |
348 | interrupts = <25 2>; | 348 | interrupts = <25 2>; |
diff --git a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts index e95a51285328..7a31d46c01b0 100644 --- a/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts +++ b/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Please note to add "-b 1" for core1's dts compiling. | 8 | * Please note to add "-b 1" for core1's dts compiling. |
9 | * | 9 | * |
10 | * Copyright 2009 Freescale Semiconductor Inc. | 10 | * Copyright 2009-2011 Freescale Semiconductor Inc. |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
@@ -162,8 +162,8 @@ | |||
162 | #address-cells = <3>; | 162 | #address-cells = <3>; |
163 | reg = <0 0xffe0a000 0 0x1000>; | 163 | reg = <0 0xffe0a000 0 0x1000>; |
164 | bus-range = <0 255>; | 164 | bus-range = <0 255>; |
165 | ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 | 165 | ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 |
166 | 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; | 166 | 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; |
167 | clock-frequency = <33333333>; | 167 | clock-frequency = <33333333>; |
168 | interrupt-parent = <&mpic>; | 168 | interrupt-parent = <&mpic>; |
169 | interrupts = <26 2>; | 169 | interrupts = <26 2>; |
@@ -172,8 +172,8 @@ | |||
172 | #size-cells = <2>; | 172 | #size-cells = <2>; |
173 | #address-cells = <3>; | 173 | #address-cells = <3>; |
174 | device_type = "pci"; | 174 | device_type = "pci"; |
175 | ranges = <0x2000000 0x0 0xc0000000 | 175 | ranges = <0x2000000 0x0 0x80000000 |
176 | 0x2000000 0x0 0xc0000000 | 176 | 0x2000000 0x0 0x80000000 |
177 | 0x0 0x20000000 | 177 | 0x0 0x20000000 |
178 | 178 | ||
179 | 0x1000000 0x0 0x0 | 179 | 0x1000000 0x0 0x0 |
diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig index 6cf9d6614805..abf74dc1f79c 100644 --- a/arch/powerpc/configs/44x/warp_defconfig +++ b/arch/powerpc/configs/44x/warp_defconfig | |||
@@ -47,6 +47,7 @@ CONFIG_MTD_NAND_NDFC=y | |||
47 | CONFIG_MTD_UBI=y | 47 | CONFIG_MTD_UBI=y |
48 | CONFIG_PROC_DEVICETREE=y | 48 | CONFIG_PROC_DEVICETREE=y |
49 | CONFIG_BLK_DEV_RAM=y | 49 | CONFIG_BLK_DEV_RAM=y |
50 | CONFIG_MISC_DEVICES=y | ||
50 | CONFIG_EEPROM_AT24=y | 51 | CONFIG_EEPROM_AT24=y |
51 | CONFIG_SCSI=y | 52 | CONFIG_SCSI=y |
52 | CONFIG_BLK_DEV_SD=y | 53 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index 6828eda02bdc..0c7de9620ea6 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
@@ -43,6 +43,7 @@ CONFIG_PROC_DEVICETREE=y | |||
43 | CONFIG_BLK_DEV_LOOP=y | 43 | CONFIG_BLK_DEV_LOOP=y |
44 | CONFIG_BLK_DEV_RAM=y | 44 | CONFIG_BLK_DEV_RAM=y |
45 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 45 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
46 | CONFIG_MISC_DEVICES=y | ||
46 | CONFIG_EEPROM_LEGACY=y | 47 | CONFIG_EEPROM_LEGACY=y |
47 | CONFIG_SCSI_TGT=y | 48 | CONFIG_SCSI_TGT=y |
48 | CONFIG_BLK_DEV_SD=y | 49 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig index 4b2441244eab..d41857a5152d 100644 --- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig +++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig | |||
@@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
85 | CONFIG_BLK_DEV_NBD=m | 85 | CONFIG_BLK_DEV_NBD=m |
86 | CONFIG_BLK_DEV_RAM=y | 86 | CONFIG_BLK_DEV_RAM=y |
87 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
88 | CONFIG_MISC_DEVICES=y | ||
88 | CONFIG_DS1682=y | 89 | CONFIG_DS1682=y |
89 | CONFIG_IDE=y | 90 | CONFIG_IDE=y |
90 | CONFIG_BLK_DEV_IDECS=y | 91 | CONFIG_BLK_DEV_IDECS=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig index a360ba44b928..38303ec11bcd 100644 --- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig | |||
@@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
85 | CONFIG_BLK_DEV_NBD=m | 85 | CONFIG_BLK_DEV_NBD=m |
86 | CONFIG_BLK_DEV_RAM=y | 86 | CONFIG_BLK_DEV_RAM=y |
87 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 87 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
88 | CONFIG_MISC_DEVICES=y | ||
88 | CONFIG_DS1682=y | 89 | CONFIG_DS1682=y |
89 | CONFIG_IDE=y | 90 | CONFIG_IDE=y |
90 | CONFIG_BLK_DEV_IDECS=y | 91 | CONFIG_BLK_DEV_IDECS=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig index be2829dd129f..98533973d20f 100644 --- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig | |||
@@ -138,6 +138,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m | |||
138 | CONFIG_BLK_DEV_NBD=m | 138 | CONFIG_BLK_DEV_NBD=m |
139 | CONFIG_BLK_DEV_RAM=y | 139 | CONFIG_BLK_DEV_RAM=y |
140 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 140 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
141 | CONFIG_MISC_DEVICES=y | ||
141 | CONFIG_DS1682=y | 142 | CONFIG_DS1682=y |
142 | CONFIG_BLK_DEV_SD=y | 143 | CONFIG_BLK_DEV_SD=y |
143 | CONFIG_CHR_DEV_ST=y | 144 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig index 0c9c7ed7ec75..b614508d6fd2 100644 --- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig +++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | |||
@@ -63,6 +63,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
63 | CONFIG_BLK_DEV_NBD=y | 63 | CONFIG_BLK_DEV_NBD=y |
64 | CONFIG_BLK_DEV_RAM=y | 64 | CONFIG_BLK_DEV_RAM=y |
65 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 65 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
66 | CONFIG_MISC_DEVICES=y | ||
66 | CONFIG_EEPROM_LEGACY=y | 67 | CONFIG_EEPROM_LEGACY=y |
67 | CONFIG_BLK_DEV_SD=y | 68 | CONFIG_BLK_DEV_SD=y |
68 | CONFIG_CHR_DEV_ST=y | 69 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/e55xx_smp_defconfig b/arch/powerpc/configs/e55xx_smp_defconfig index 06f95492afc7..9fa1613e5e2b 100644 --- a/arch/powerpc/configs/e55xx_smp_defconfig +++ b/arch/powerpc/configs/e55xx_smp_defconfig | |||
@@ -32,6 +32,7 @@ CONFIG_PROC_DEVICETREE=y | |||
32 | CONFIG_BLK_DEV_LOOP=y | 32 | CONFIG_BLK_DEV_LOOP=y |
33 | CONFIG_BLK_DEV_RAM=y | 33 | CONFIG_BLK_DEV_RAM=y |
34 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 34 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
35 | CONFIG_MISC_DEVICES=y | ||
35 | CONFIG_EEPROM_LEGACY=y | 36 | CONFIG_EEPROM_LEGACY=y |
36 | CONFIG_INPUT_FF_MEMLESS=m | 37 | CONFIG_INPUT_FF_MEMLESS=m |
37 | # CONFIG_INPUT_MOUSEDEV is not set | 38 | # CONFIG_INPUT_MOUSEDEV is not set |
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig index f39d0cf876dd..8a874b999867 100644 --- a/arch/powerpc/configs/linkstation_defconfig +++ b/arch/powerpc/configs/linkstation_defconfig | |||
@@ -78,6 +78,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
78 | CONFIG_BLK_DEV_RAM=y | 78 | CONFIG_BLK_DEV_RAM=y |
79 | CONFIG_BLK_DEV_RAM_COUNT=2 | 79 | CONFIG_BLK_DEV_RAM_COUNT=2 |
80 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 80 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
81 | CONFIG_MISC_DEVICES=y | ||
81 | CONFIG_EEPROM_LEGACY=m | 82 | CONFIG_EEPROM_LEGACY=m |
82 | CONFIG_BLK_DEV_SD=y | 83 | CONFIG_BLK_DEV_SD=y |
83 | CONFIG_CHR_DEV_SG=y | 84 | CONFIG_CHR_DEV_SG=y |
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig index 62db8a3df162..c02bbb2fddf8 100644 --- a/arch/powerpc/configs/mpc512x_defconfig +++ b/arch/powerpc/configs/mpc512x_defconfig | |||
@@ -61,6 +61,7 @@ CONFIG_BLK_DEV_RAM=y | |||
61 | CONFIG_BLK_DEV_RAM_COUNT=1 | 61 | CONFIG_BLK_DEV_RAM_COUNT=1 |
62 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 62 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
63 | CONFIG_BLK_DEV_XIP=y | 63 | CONFIG_BLK_DEV_XIP=y |
64 | CONFIG_MISC_DEVICES=y | ||
64 | CONFIG_EEPROM_AT24=y | 65 | CONFIG_EEPROM_AT24=y |
65 | CONFIG_SCSI=y | 66 | CONFIG_SCSI=y |
66 | # CONFIG_SCSI_PROC_FS is not set | 67 | # CONFIG_SCSI_PROC_FS is not set |
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 7376e27b8ed4..e63f537b854a 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig | |||
@@ -52,6 +52,7 @@ CONFIG_PROC_DEVICETREE=y | |||
52 | CONFIG_BLK_DEV_LOOP=y | 52 | CONFIG_BLK_DEV_LOOP=y |
53 | CONFIG_BLK_DEV_RAM=y | 53 | CONFIG_BLK_DEV_RAM=y |
54 | CONFIG_BLK_DEV_RAM_SIZE=32768 | 54 | CONFIG_BLK_DEV_RAM_SIZE=32768 |
55 | CONFIG_MISC_DEVICES=y | ||
55 | CONFIG_EEPROM_AT24=y | 56 | CONFIG_EEPROM_AT24=y |
56 | CONFIG_SCSI_TGT=y | 57 | CONFIG_SCSI_TGT=y |
57 | CONFIG_BLK_DEV_SD=y | 58 | CONFIG_BLK_DEV_SD=y |
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 99a19d1e9bf8..c06a86c33098 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
@@ -82,6 +82,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
82 | CONFIG_BLK_DEV_NBD=y | 82 | CONFIG_BLK_DEV_NBD=y |
83 | CONFIG_BLK_DEV_RAM=y | 83 | CONFIG_BLK_DEV_RAM=y |
84 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 84 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
85 | CONFIG_MISC_DEVICES=y | ||
85 | CONFIG_EEPROM_LEGACY=y | 86 | CONFIG_EEPROM_LEGACY=y |
86 | CONFIG_BLK_DEV_SD=y | 87 | CONFIG_BLK_DEV_SD=y |
87 | CONFIG_CHR_DEV_ST=y | 88 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index c636f23f8c92..942ced90557c 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig | |||
@@ -84,6 +84,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
84 | CONFIG_BLK_DEV_NBD=y | 84 | CONFIG_BLK_DEV_NBD=y |
85 | CONFIG_BLK_DEV_RAM=y | 85 | CONFIG_BLK_DEV_RAM=y |
86 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 86 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
87 | CONFIG_MISC_DEVICES=y | ||
87 | CONFIG_EEPROM_LEGACY=y | 88 | CONFIG_EEPROM_LEGACY=y |
88 | CONFIG_BLK_DEV_SD=y | 89 | CONFIG_BLK_DEV_SD=y |
89 | CONFIG_CHR_DEV_ST=y | 90 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/mpc86xx_defconfig b/arch/powerpc/configs/mpc86xx_defconfig index 55b54318fef6..038a308cbfc4 100644 --- a/arch/powerpc/configs/mpc86xx_defconfig +++ b/arch/powerpc/configs/mpc86xx_defconfig | |||
@@ -66,6 +66,7 @@ CONFIG_BLK_DEV_LOOP=y | |||
66 | CONFIG_BLK_DEV_NBD=y | 66 | CONFIG_BLK_DEV_NBD=y |
67 | CONFIG_BLK_DEV_RAM=y | 67 | CONFIG_BLK_DEV_RAM=y |
68 | CONFIG_BLK_DEV_RAM_SIZE=131072 | 68 | CONFIG_BLK_DEV_RAM_SIZE=131072 |
69 | CONFIG_MISC_DEVICES=y | ||
69 | CONFIG_EEPROM_LEGACY=y | 70 | CONFIG_EEPROM_LEGACY=y |
70 | CONFIG_BLK_DEV_SD=y | 71 | CONFIG_BLK_DEV_SD=y |
71 | CONFIG_CHR_DEV_ST=y | 72 | CONFIG_CHR_DEV_ST=y |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index edd2d54c8196..f4deb0b78cf0 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
@@ -59,6 +59,7 @@ CONFIG_PROC_DEVICETREE=y | |||
59 | CONFIG_BLK_DEV_LOOP=y | 59 | CONFIG_BLK_DEV_LOOP=y |
60 | CONFIG_BLK_DEV_RAM=y | 60 | CONFIG_BLK_DEV_RAM=y |
61 | CONFIG_BLK_DEV_RAM_SIZE=16384 | 61 | CONFIG_BLK_DEV_RAM_SIZE=16384 |
62 | CONFIG_MISC_DEVICES=y | ||
62 | CONFIG_EEPROM_LEGACY=y | 63 | CONFIG_EEPROM_LEGACY=y |
63 | CONFIG_IDE=y | 64 | CONFIG_IDE=y |
64 | CONFIG_BLK_DEV_IDECD=y | 65 | CONFIG_BLK_DEV_IDECD=y |
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig index 9d64a6822d86..0a10fb009ef7 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig | |||
@@ -398,6 +398,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 | |||
398 | CONFIG_CDROM_PKTCDVD=m | 398 | CONFIG_CDROM_PKTCDVD=m |
399 | CONFIG_VIRTIO_BLK=m | 399 | CONFIG_VIRTIO_BLK=m |
400 | CONFIG_BLK_DEV_HD=y | 400 | CONFIG_BLK_DEV_HD=y |
401 | CONFIG_MISC_DEVICES=y | ||
401 | CONFIG_ENCLOSURE_SERVICES=m | 402 | CONFIG_ENCLOSURE_SERVICES=m |
402 | CONFIG_SENSORS_TSL2550=m | 403 | CONFIG_SENSORS_TSL2550=m |
403 | CONFIG_EEPROM_AT24=m | 404 | CONFIG_EEPROM_AT24=m |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 9c3f22c6cde1..249ddd0a27cd 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -189,6 +189,7 @@ CONFIG_TIGON3=y | |||
189 | CONFIG_BNX2=m | 189 | CONFIG_BNX2=m |
190 | CONFIG_CHELSIO_T1=m | 190 | CONFIG_CHELSIO_T1=m |
191 | CONFIG_CHELSIO_T3=m | 191 | CONFIG_CHELSIO_T3=m |
192 | CONFIG_CHELSIO_T4=m | ||
192 | CONFIG_EHEA=y | 193 | CONFIG_EHEA=y |
193 | CONFIG_IXGBE=m | 194 | CONFIG_IXGBE=m |
194 | CONFIG_IXGB=m | 195 | CONFIG_IXGB=m |
@@ -255,6 +256,8 @@ CONFIG_INFINIBAND_USER_MAD=m | |||
255 | CONFIG_INFINIBAND_USER_ACCESS=m | 256 | CONFIG_INFINIBAND_USER_ACCESS=m |
256 | CONFIG_INFINIBAND_MTHCA=m | 257 | CONFIG_INFINIBAND_MTHCA=m |
257 | CONFIG_INFINIBAND_EHCA=m | 258 | CONFIG_INFINIBAND_EHCA=m |
259 | CONFIG_INFINIBAND_CXGB3=m | ||
260 | CONFIG_INFINIBAND_CXGB4=m | ||
258 | CONFIG_MLX4_INFINIBAND=m | 261 | CONFIG_MLX4_INFINIBAND=m |
259 | CONFIG_INFINIBAND_IPOIB=m | 262 | CONFIG_INFINIBAND_IPOIB=m |
260 | CONFIG_INFINIBAND_IPOIB_CM=y | 263 | CONFIG_INFINIBAND_IPOIB_CM=y |
diff --git a/arch/powerpc/include/asm/8xx_immap.h b/arch/powerpc/include/asm/8xx_immap.h index 6b6dc20b0beb..bdf0563ba423 100644 --- a/arch/powerpc/include/asm/8xx_immap.h +++ b/arch/powerpc/include/asm/8xx_immap.h | |||
@@ -393,8 +393,8 @@ typedef struct fec { | |||
393 | uint fec_addr_low; /* lower 32 bits of station address */ | 393 | uint fec_addr_low; /* lower 32 bits of station address */ |
394 | ushort fec_addr_high; /* upper 16 bits of station address */ | 394 | ushort fec_addr_high; /* upper 16 bits of station address */ |
395 | ushort res1; /* reserved */ | 395 | ushort res1; /* reserved */ |
396 | uint fec_hash_table_high; /* upper 32-bits of hash table */ | 396 | uint fec_grp_hash_table_high; /* upper 32-bits of hash table */ |
397 | uint fec_hash_table_low; /* lower 32-bits of hash table */ | 397 | uint fec_grp_hash_table_low; /* lower 32-bits of hash table */ |
398 | uint fec_r_des_start; /* beginning of Rx descriptor ring */ | 398 | uint fec_r_des_start; /* beginning of Rx descriptor ring */ |
399 | uint fec_x_des_start; /* beginning of Tx descriptor ring */ | 399 | uint fec_x_des_start; /* beginning of Tx descriptor ring */ |
400 | uint fec_r_buff_size; /* Rx buffer size */ | 400 | uint fec_r_buff_size; /* Rx buffer size */ |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index 2e561876fc89..f18c6d9b9510 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -209,8 +209,8 @@ static __inline__ unsigned long ffz(unsigned long x) | |||
209 | return BITS_PER_LONG; | 209 | return BITS_PER_LONG; |
210 | 210 | ||
211 | /* | 211 | /* |
212 | * Calculate the bit position of the least signficant '1' bit in x | 212 | * Calculate the bit position of the least significant '1' bit in x |
213 | * (since x has been changed this will actually be the least signficant | 213 | * (since x has been changed this will actually be the least significant |
214 | * '0' bit in * the original x). Note: (x & -x) gives us a mask that | 214 | * '0' bit in * the original x). Note: (x & -x) gives us a mask that |
215 | * is the least significant * (RIGHT-most) 1-bit of the value in x. | 215 | * is the least significant * (RIGHT-most) 1-bit of the value in x. |
216 | */ | 216 | */ |
diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h index 2296112e247b..91010e8f8479 100644 --- a/arch/powerpc/include/asm/compat.h +++ b/arch/powerpc/include/asm/compat.h | |||
@@ -140,7 +140,7 @@ static inline void __user *arch_compat_alloc_user_space(long len) | |||
140 | unsigned long usp = regs->gpr[1]; | 140 | unsigned long usp = regs->gpr[1]; |
141 | 141 | ||
142 | /* | 142 | /* |
143 | * We cant access below the stack pointer in the 32bit ABI and | 143 | * We can't access below the stack pointer in the 32bit ABI and |
144 | * can access 288 bytes in the 64bit ABI | 144 | * can access 288 bytes in the 64bit ABI |
145 | */ | 145 | */ |
146 | if (!is_32bit_task()) | 146 | if (!is_32bit_task()) |
diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h index e50323fe941f..4398a6cdcf53 100644 --- a/arch/powerpc/include/asm/cpm.h +++ b/arch/powerpc/include/asm/cpm.h | |||
@@ -98,7 +98,7 @@ typedef struct cpm_buf_desc { | |||
98 | #define BD_SC_INTRPT (0x1000) /* Interrupt on change */ | 98 | #define BD_SC_INTRPT (0x1000) /* Interrupt on change */ |
99 | #define BD_SC_LAST (0x0800) /* Last buffer in frame */ | 99 | #define BD_SC_LAST (0x0800) /* Last buffer in frame */ |
100 | #define BD_SC_TC (0x0400) /* Transmit CRC */ | 100 | #define BD_SC_TC (0x0400) /* Transmit CRC */ |
101 | #define BD_SC_CM (0x0200) /* Continous mode */ | 101 | #define BD_SC_CM (0x0200) /* Continuous mode */ |
102 | #define BD_SC_ID (0x0100) /* Rec'd too many idles */ | 102 | #define BD_SC_ID (0x0100) /* Rec'd too many idles */ |
103 | #define BD_SC_P (0x0100) /* xmt preamble */ | 103 | #define BD_SC_P (0x0100) /* xmt preamble */ |
104 | #define BD_SC_BR (0x0020) /* Break received */ | 104 | #define BD_SC_BR (0x0020) /* Break received */ |
diff --git a/arch/powerpc/include/asm/cpm1.h b/arch/powerpc/include/asm/cpm1.h index bd07650dca56..8ee4211ca0c6 100644 --- a/arch/powerpc/include/asm/cpm1.h +++ b/arch/powerpc/include/asm/cpm1.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * This file contains structures and information for the communication | 5 | * This file contains structures and information for the communication |
6 | * processor channels. Some CPM control and status is available | 6 | * processor channels. Some CPM control and status is available |
7 | * throught the MPC8xx internal memory map. See immap.h for details. | 7 | * through the MPC8xx internal memory map. See immap.h for details. |
8 | * This file only contains what I need for the moment, not the total | 8 | * This file only contains what I need for the moment, not the total |
9 | * CPM capabilities. I (or someone else) will add definitions as they | 9 | * CPM capabilities. I (or someone else) will add definitions as they |
10 | * are needed. -- Dan | 10 | * are needed. -- Dan |
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index be3cdf9134ce..1833d1a07e79 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -382,10 +382,12 @@ extern const char *powerpc_base_platform; | |||
382 | #define CPU_FTRS_E500_2 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ | 382 | #define CPU_FTRS_E500_2 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ |
383 | CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \ | 383 | CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | \ |
384 | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) | 384 | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) |
385 | #define CPU_FTRS_E500MC (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ | 385 | #define CPU_FTRS_E500MC (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ |
386 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \ | ||
387 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ | 386 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ |
388 | CPU_FTR_DBELL) | 387 | CPU_FTR_DBELL) |
388 | #define CPU_FTRS_E5500 (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | \ | ||
389 | CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE | \ | ||
390 | CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD) | ||
389 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) | 391 | #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) |
390 | 392 | ||
391 | /* 64-bit CPUs */ | 393 | /* 64-bit CPUs */ |
@@ -435,11 +437,15 @@ extern const char *powerpc_base_platform; | |||
435 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) | 437 | #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2) |
436 | 438 | ||
437 | #ifdef __powerpc64__ | 439 | #ifdef __powerpc64__ |
440 | #ifdef CONFIG_PPC_BOOK3E | ||
441 | #define CPU_FTRS_POSSIBLE (CPU_FTRS_E5500) | ||
442 | #else | ||
438 | #define CPU_FTRS_POSSIBLE \ | 443 | #define CPU_FTRS_POSSIBLE \ |
439 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ | 444 | (CPU_FTRS_POWER3 | CPU_FTRS_RS64 | CPU_FTRS_POWER4 | \ |
440 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ | 445 | CPU_FTRS_PPC970 | CPU_FTRS_POWER5 | CPU_FTRS_POWER6 | \ |
441 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ | 446 | CPU_FTRS_POWER7 | CPU_FTRS_CELL | CPU_FTRS_PA6T | \ |
442 | CPU_FTR_1T_SEGMENT | CPU_FTR_VSX) | 447 | CPU_FTR_1T_SEGMENT | CPU_FTR_VSX) |
448 | #endif | ||
443 | #else | 449 | #else |
444 | enum { | 450 | enum { |
445 | CPU_FTRS_POSSIBLE = | 451 | CPU_FTRS_POSSIBLE = |
@@ -473,16 +479,21 @@ enum { | |||
473 | #endif | 479 | #endif |
474 | #ifdef CONFIG_E500 | 480 | #ifdef CONFIG_E500 |
475 | CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC | | 481 | CPU_FTRS_E500 | CPU_FTRS_E500_2 | CPU_FTRS_E500MC | |
482 | CPU_FTRS_E5500 | | ||
476 | #endif | 483 | #endif |
477 | 0, | 484 | 0, |
478 | }; | 485 | }; |
479 | #endif /* __powerpc64__ */ | 486 | #endif /* __powerpc64__ */ |
480 | 487 | ||
481 | #ifdef __powerpc64__ | 488 | #ifdef __powerpc64__ |
489 | #ifdef CONFIG_PPC_BOOK3E | ||
490 | #define CPU_FTRS_ALWAYS (CPU_FTRS_E5500) | ||
491 | #else | ||
482 | #define CPU_FTRS_ALWAYS \ | 492 | #define CPU_FTRS_ALWAYS \ |
483 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ | 493 | (CPU_FTRS_POWER3 & CPU_FTRS_RS64 & CPU_FTRS_POWER4 & \ |
484 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ | 494 | CPU_FTRS_PPC970 & CPU_FTRS_POWER5 & CPU_FTRS_POWER6 & \ |
485 | CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) | 495 | CPU_FTRS_POWER7 & CPU_FTRS_CELL & CPU_FTRS_PA6T & CPU_FTRS_POSSIBLE) |
496 | #endif | ||
486 | #else | 497 | #else |
487 | enum { | 498 | enum { |
488 | CPU_FTRS_ALWAYS = | 499 | CPU_FTRS_ALWAYS = |
@@ -513,6 +524,7 @@ enum { | |||
513 | #endif | 524 | #endif |
514 | #ifdef CONFIG_E500 | 525 | #ifdef CONFIG_E500 |
515 | CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC & | 526 | CPU_FTRS_E500 & CPU_FTRS_E500_2 & CPU_FTRS_E500MC & |
527 | CPU_FTRS_E5500 & | ||
516 | #endif | 528 | #endif |
517 | CPU_FTRS_POSSIBLE, | 529 | CPU_FTRS_POSSIBLE, |
518 | }; | 530 | }; |
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 6d2416a85709..dd70fac57ec8 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h | |||
@@ -42,6 +42,7 @@ extern void __dma_free_coherent(size_t size, void *vaddr); | |||
42 | extern void __dma_sync(void *vaddr, size_t size, int direction); | 42 | extern void __dma_sync(void *vaddr, size_t size, int direction); |
43 | extern void __dma_sync_page(struct page *page, unsigned long offset, | 43 | extern void __dma_sync_page(struct page *page, unsigned long offset, |
44 | size_t size, int direction); | 44 | size_t size, int direction); |
45 | extern unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr); | ||
45 | 46 | ||
46 | #else /* ! CONFIG_NOT_COHERENT_CACHE */ | 47 | #else /* ! CONFIG_NOT_COHERENT_CACHE */ |
47 | /* | 48 | /* |
@@ -198,6 +199,11 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) | |||
198 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 199 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
199 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 200 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
200 | 201 | ||
202 | extern int dma_mmap_coherent(struct device *, struct vm_area_struct *, | ||
203 | void *, dma_addr_t, size_t); | ||
204 | #define ARCH_HAS_DMA_MMAP_COHERENT | ||
205 | |||
206 | |||
201 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 207 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
202 | enum dma_data_direction direction) | 208 | enum dma_data_direction direction) |
203 | { | 209 | { |
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index ec089acfa56b..8edec710cc6d 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
@@ -122,7 +122,7 @@ | |||
122 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 122 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
123 | #define H_DABRX_USER (1UL<<(63-63)) | 123 | #define H_DABRX_USER (1UL<<(63-63)) |
124 | 124 | ||
125 | /* Each control block has to be on a 4K bondary */ | 125 | /* Each control block has to be on a 4K boundary */ |
126 | #define H_CB_ALIGNMENT 4096 | 126 | #define H_CB_ALIGNMENT 4096 |
127 | 127 | ||
128 | /* pSeries hypervisor opcodes */ | 128 | /* pSeries hypervisor opcodes */ |
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index d0e7701fa1f6..be0171afdc0f 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h | |||
@@ -50,7 +50,7 @@ typedef unsigned int kprobe_opcode_t; | |||
50 | * Handle cases where: | 50 | * Handle cases where: |
51 | * - User passes a <.symbol> or <module:.symbol> | 51 | * - User passes a <.symbol> or <module:.symbol> |
52 | * - User passes a <symbol> or <module:symbol> | 52 | * - User passes a <symbol> or <module:symbol> |
53 | * - User passes a non-existant symbol, kallsyms_lookup_name | 53 | * - User passes a non-existent symbol, kallsyms_lookup_name |
54 | * returns 0. Don't deref the NULL pointer in that case | 54 | * returns 0. Don't deref the NULL pointer in that case |
55 | */ | 55 | */ |
56 | #define kprobe_lookup_name(name, addr) \ | 56 | #define kprobe_lookup_name(name, addr) \ |
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h index 26b8c807f8f1..a077adc0b35e 100644 --- a/arch/powerpc/include/asm/lppaca.h +++ b/arch/powerpc/include/asm/lppaca.h | |||
@@ -105,7 +105,7 @@ struct lppaca { | |||
105 | // processing of external interrupts. Note that PLIC will store the | 105 | // processing of external interrupts. Note that PLIC will store the |
106 | // XIRR directly into the xXirrValue field so that another XIRR will | 106 | // XIRR directly into the xXirrValue field so that another XIRR will |
107 | // not be presented until this one clears. The layout of the low | 107 | // not be presented until this one clears. The layout of the low |
108 | // 4-bytes of this Dword is upto SLIC - PLIC just checks whether the | 108 | // 4-bytes of this Dword is up to SLIC - PLIC just checks whether the |
109 | // entire Dword is zero or not. A non-zero value in the low order | 109 | // entire Dword is zero or not. A non-zero value in the low order |
110 | // 2-bytes will result in SLIC being granted the highest thread | 110 | // 2-bytes will result in SLIC being granted the highest thread |
111 | // priority upon return. A 0 will return to SLIC as medium priority. | 111 | // priority upon return. A 0 will return to SLIC as medium priority. |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index fe56a23e1ff0..e4f01915fbb0 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -35,9 +35,9 @@ struct smp_ops_t { | |||
35 | int (*probe)(void); | 35 | int (*probe)(void); |
36 | void (*kick_cpu)(int nr); | 36 | void (*kick_cpu)(int nr); |
37 | void (*setup_cpu)(int nr); | 37 | void (*setup_cpu)(int nr); |
38 | void (*bringup_done)(void); | ||
38 | void (*take_timebase)(void); | 39 | void (*take_timebase)(void); |
39 | void (*give_timebase)(void); | 40 | void (*give_timebase)(void); |
40 | int (*cpu_enable)(unsigned int nr); | ||
41 | int (*cpu_disable)(void); | 41 | int (*cpu_disable)(void); |
42 | void (*cpu_die)(unsigned int nr); | 42 | void (*cpu_die)(unsigned int nr); |
43 | int (*cpu_bootable)(unsigned int nr); | 43 | int (*cpu_bootable)(unsigned int nr); |
@@ -267,7 +267,6 @@ struct machdep_calls { | |||
267 | 267 | ||
268 | extern void e500_idle(void); | 268 | extern void e500_idle(void); |
269 | extern void power4_idle(void); | 269 | extern void power4_idle(void); |
270 | extern void power4_cpu_offline_powersave(void); | ||
271 | extern void ppc6xx_idle(void); | 270 | extern void ppc6xx_idle(void); |
272 | extern void book3e_idle(void); | 271 | extern void book3e_idle(void); |
273 | 272 | ||
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index acac35d5b382..ae7b3efec8e5 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define STE_VSID_SHIFT 12 | 27 | #define STE_VSID_SHIFT 12 |
28 | 28 | ||
29 | /* Location of cpu0's segment table */ | 29 | /* Location of cpu0's segment table */ |
30 | #define STAB0_PAGE 0x6 | 30 | #define STAB0_PAGE 0x8 |
31 | #define STAB0_OFFSET (STAB0_PAGE << 12) | 31 | #define STAB0_OFFSET (STAB0_PAGE << 12) |
32 | #define STAB0_PHYS_ADDR (STAB0_OFFSET + PHYSICAL_START) | 32 | #define STAB0_PHYS_ADDR (STAB0_OFFSET + PHYSICAL_START) |
33 | 33 | ||
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index da4b20008541..2cd664ef0a5e 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -100,7 +100,7 @@ extern phys_addr_t kernstart_addr; | |||
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_FLATMEM | 102 | #ifdef CONFIG_FLATMEM |
103 | #define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT) | 103 | #define ARCH_PFN_OFFSET ((unsigned long)(MEMORY_START >> PAGE_SHIFT)) |
104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) | 104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) |
105 | #endif | 105 | #endif |
106 | 106 | ||
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index 932f88dcf6fa..812b2cd80aed 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h | |||
@@ -169,7 +169,7 @@ do { \ | |||
169 | /* | 169 | /* |
170 | * This is the default if a program doesn't have a PT_GNU_STACK | 170 | * This is the default if a program doesn't have a PT_GNU_STACK |
171 | * program header entry. The PPC64 ELF ABI has a non executable stack | 171 | * program header entry. The PPC64 ELF ABI has a non executable stack |
172 | * stack by default, so in the absense of a PT_GNU_STACK program header | 172 | * stack by default, so in the absence of a PT_GNU_STACK program header |
173 | * we turn execute permission off. | 173 | * we turn execute permission off. |
174 | */ | 174 | */ |
175 | #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \ | 175 | #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \ |
diff --git a/arch/powerpc/include/asm/pasemi_dma.h b/arch/powerpc/include/asm/pasemi_dma.h index 19fd7933e2d9..eafa5a5f56de 100644 --- a/arch/powerpc/include/asm/pasemi_dma.h +++ b/arch/powerpc/include/asm/pasemi_dma.h | |||
@@ -522,7 +522,7 @@ extern void *pasemi_dma_alloc_buf(struct pasemi_dmachan *chan, int size, | |||
522 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | 522 | extern void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, |
523 | dma_addr_t *handle); | 523 | dma_addr_t *handle); |
524 | 524 | ||
525 | /* Routines to allocate flags (events) for channel syncronization */ | 525 | /* Routines to allocate flags (events) for channel synchronization */ |
526 | extern int pasemi_dma_alloc_flag(void); | 526 | extern int pasemi_dma_alloc_flag(void); |
527 | extern void pasemi_dma_free_flag(int flag); | 527 | extern void pasemi_dma_free_flag(int flag); |
528 | extern void pasemi_dma_set_flag(int flag); | 528 | extern void pasemi_dma_set_flag(int flag); |
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 5e156e034fe2..b90dbf8e5cd9 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -106,7 +106,7 @@ struct pci_controller { | |||
106 | * Used for variants of PCI indirect handling and possible quirks: | 106 | * Used for variants of PCI indirect handling and possible quirks: |
107 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 | 107 | * SET_CFG_TYPE - used on 4xx or any PHB that does explicit type0/1 |
108 | * EXT_REG - provides access to PCI-e extended registers | 108 | * EXT_REG - provides access to PCI-e extended registers |
109 | * SURPRESS_PRIMARY_BUS - we surpress the setting of PCI_PRIMARY_BUS | 109 | * SURPRESS_PRIMARY_BUS - we suppress the setting of PCI_PRIMARY_BUS |
110 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 110 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
111 | * to determine which bus number to match on when generating type0 | 111 | * to determine which bus number to match on when generating type0 |
112 | * config cycles | 112 | * config cycles |
diff --git a/arch/powerpc/include/asm/pmac_feature.h b/arch/powerpc/include/asm/pmac_feature.h index 00eedc5a4e61..10902c9375d0 100644 --- a/arch/powerpc/include/asm/pmac_feature.h +++ b/arch/powerpc/include/asm/pmac_feature.h | |||
@@ -53,8 +53,8 @@ | |||
53 | 53 | ||
54 | /* Here is the infamous serie of OHare based machines | 54 | /* Here is the infamous serie of OHare based machines |
55 | */ | 55 | */ |
56 | #define PMAC_TYPE_COMET 0x20 /* Beleived to be PowerBook 2400 */ | 56 | #define PMAC_TYPE_COMET 0x20 /* Believed to be PowerBook 2400 */ |
57 | #define PMAC_TYPE_HOOPER 0x21 /* Beleived to be PowerBook 3400 */ | 57 | #define PMAC_TYPE_HOOPER 0x21 /* Believed to be PowerBook 3400 */ |
58 | #define PMAC_TYPE_KANGA 0x22 /* PowerBook 3500 (first G3) */ | 58 | #define PMAC_TYPE_KANGA 0x22 /* PowerBook 3500 (first G3) */ |
59 | #define PMAC_TYPE_ALCHEMY 0x23 /* Alchemy motherboard base */ | 59 | #define PMAC_TYPE_ALCHEMY 0x23 /* Alchemy motherboard base */ |
60 | #define PMAC_TYPE_GAZELLE 0x24 /* Spartacus, some 5xxx/6xxx */ | 60 | #define PMAC_TYPE_GAZELLE 0x24 /* Spartacus, some 5xxx/6xxx */ |
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 76bb195e4f24..8d1569c29042 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
@@ -86,7 +86,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
86 | #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1)) | 86 | #define PTE_RPN_MASK (~((1UL<<PTE_RPN_SHIFT)-1)) |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /* _PAGE_CHG_MASK masks of bits that are to be preserved accross | 89 | /* _PAGE_CHG_MASK masks of bits that are to be preserved across |
90 | * pgprot changes | 90 | * pgprot changes |
91 | */ | 91 | */ |
92 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ | 92 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ |
@@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
162 | * on platforms where such control is possible. | 162 | * on platforms where such control is possible. |
163 | */ | 163 | */ |
164 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ | 164 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ |
165 | defined(CONFIG_KPROBES) | 165 | defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE) |
166 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_X | 166 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_X |
167 | #else | 167 | #else |
168 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX | 168 | #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX |
@@ -174,7 +174,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
174 | /* | 174 | /* |
175 | * Don't just check for any non zero bits in __PAGE_USER, since for book3e | 175 | * Don't just check for any non zero bits in __PAGE_USER, since for book3e |
176 | * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in | 176 | * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in |
177 | * _PAGE_USER. Need to explictly match _PAGE_BAP_UR bit in that case too. | 177 | * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too. |
178 | */ | 178 | */ |
179 | #define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER) | 179 | #define pte_user(val) ((val & _PAGE_USER) == _PAGE_USER) |
180 | 180 | ||
diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h index 9e2cb2019161..f706164b0bd0 100644 --- a/arch/powerpc/include/asm/qe_ic.h +++ b/arch/powerpc/include/asm/qe_ic.h | |||
@@ -81,7 +81,7 @@ int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); | |||
81 | static inline void qe_ic_cascade_low_ipic(unsigned int irq, | 81 | static inline void qe_ic_cascade_low_ipic(unsigned int irq, |
82 | struct irq_desc *desc) | 82 | struct irq_desc *desc) |
83 | { | 83 | { |
84 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 84 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
85 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 85 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
86 | 86 | ||
87 | if (cascade_irq != NO_IRQ) | 87 | if (cascade_irq != NO_IRQ) |
@@ -91,7 +91,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq, | |||
91 | static inline void qe_ic_cascade_high_ipic(unsigned int irq, | 91 | static inline void qe_ic_cascade_high_ipic(unsigned int irq, |
92 | struct irq_desc *desc) | 92 | struct irq_desc *desc) |
93 | { | 93 | { |
94 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 94 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
95 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 95 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
96 | 96 | ||
97 | if (cascade_irq != NO_IRQ) | 97 | if (cascade_irq != NO_IRQ) |
@@ -101,9 +101,9 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq, | |||
101 | static inline void qe_ic_cascade_low_mpic(unsigned int irq, | 101 | static inline void qe_ic_cascade_low_mpic(unsigned int irq, |
102 | struct irq_desc *desc) | 102 | struct irq_desc *desc) |
103 | { | 103 | { |
104 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 104 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
105 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); | 105 | unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); |
106 | struct irq_chip *chip = get_irq_desc_chip(desc); | 106 | struct irq_chip *chip = irq_desc_get_chip(desc); |
107 | 107 | ||
108 | if (cascade_irq != NO_IRQ) | 108 | if (cascade_irq != NO_IRQ) |
109 | generic_handle_irq(cascade_irq); | 109 | generic_handle_irq(cascade_irq); |
@@ -114,9 +114,9 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq, | |||
114 | static inline void qe_ic_cascade_high_mpic(unsigned int irq, | 114 | static inline void qe_ic_cascade_high_mpic(unsigned int irq, |
115 | struct irq_desc *desc) | 115 | struct irq_desc *desc) |
116 | { | 116 | { |
117 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 117 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
118 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); | 118 | unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); |
119 | struct irq_chip *chip = get_irq_desc_chip(desc); | 119 | struct irq_chip *chip = irq_desc_get_chip(desc); |
120 | 120 | ||
121 | if (cascade_irq != NO_IRQ) | 121 | if (cascade_irq != NO_IRQ) |
122 | generic_handle_irq(cascade_irq); | 122 | generic_handle_irq(cascade_irq); |
@@ -127,9 +127,9 @@ static inline void qe_ic_cascade_high_mpic(unsigned int irq, | |||
127 | static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, | 127 | static inline void qe_ic_cascade_muxed_mpic(unsigned int irq, |
128 | struct irq_desc *desc) | 128 | struct irq_desc *desc) |
129 | { | 129 | { |
130 | struct qe_ic *qe_ic = get_irq_desc_data(desc); | 130 | struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); |
131 | unsigned int cascade_irq; | 131 | unsigned int cascade_irq; |
132 | struct irq_chip *chip = get_irq_desc_chip(desc); | 132 | struct irq_chip *chip = irq_desc_get_chip(desc); |
133 | 133 | ||
134 | cascade_irq = qe_ic_get_high_irq(qe_ic); | 134 | cascade_irq = qe_ic_get_high_irq(qe_ic); |
135 | if (cascade_irq == NO_IRQ) | 135 | if (cascade_irq == NO_IRQ) |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 86ad8128963a..b316794aa2b5 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Contains register definitions common to the Book E PowerPC | 2 | * Contains register definitions common to the Book E PowerPC |
3 | * specification. Notice that while the IBM-40x series of CPUs | 3 | * specification. Notice that while the IBM-40x series of CPUs |
4 | * are not true Book E PowerPCs, they borrowed a number of features | 4 | * are not true Book E PowerPCs, they borrowed a number of features |
5 | * before Book E was finalized, and are included here as well. Unfortunatly, | 5 | * before Book E was finalized, and are included here as well. Unfortunately, |
6 | * they sometimes used different locations than true Book E CPUs did. | 6 | * they sometimes used different locations than true Book E CPUs did. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -110,7 +110,7 @@ | |||
110 | #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */ | 110 | #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */ |
111 | #define SPRN_MAS3 0x273 /* MMU Assist Register 3 */ | 111 | #define SPRN_MAS3 0x273 /* MMU Assist Register 3 */ |
112 | #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */ | 112 | #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */ |
113 | #define SPRN_MAS5 0x275 /* MMU Assist Register 5 */ | 113 | #define SPRN_MAS5 0x153 /* MMU Assist Register 5 */ |
114 | #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */ | 114 | #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */ |
115 | #define SPRN_PID1 0x279 /* Process ID Register 1 */ | 115 | #define SPRN_PID1 0x279 /* Process ID Register 1 */ |
116 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ | 116 | #define SPRN_PID2 0x27A /* Process ID Register 2 */ |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 66e237bbe15f..a902a0d3ae0d 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
@@ -36,15 +36,16 @@ extern void cpu_die(void); | |||
36 | 36 | ||
37 | extern void smp_send_debugger_break(int cpu); | 37 | extern void smp_send_debugger_break(int cpu); |
38 | extern void smp_message_recv(int); | 38 | extern void smp_message_recv(int); |
39 | extern void start_secondary_resume(void); | ||
39 | 40 | ||
40 | DECLARE_PER_CPU(unsigned int, cpu_pvr); | 41 | DECLARE_PER_CPU(unsigned int, cpu_pvr); |
41 | 42 | ||
42 | #ifdef CONFIG_HOTPLUG_CPU | 43 | #ifdef CONFIG_HOTPLUG_CPU |
43 | extern void fixup_irqs(const struct cpumask *map); | 44 | extern void migrate_irqs(void); |
44 | int generic_cpu_disable(void); | 45 | int generic_cpu_disable(void); |
45 | int generic_cpu_enable(unsigned int cpu); | ||
46 | void generic_cpu_die(unsigned int cpu); | 46 | void generic_cpu_die(unsigned int cpu); |
47 | void generic_mach_cpu_die(void); | 47 | void generic_mach_cpu_die(void); |
48 | void generic_set_cpu_dead(unsigned int cpu); | ||
48 | #endif | 49 | #endif |
49 | 50 | ||
50 | #ifdef CONFIG_PPC64 | 51 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/include/asm/spu_priv1.h b/arch/powerpc/include/asm/spu_priv1.h index 25020a34ce7f..d8f5c60f61c1 100644 --- a/arch/powerpc/include/asm/spu_priv1.h +++ b/arch/powerpc/include/asm/spu_priv1.h | |||
@@ -223,7 +223,7 @@ spu_disable_spu (struct spu_context *ctx) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * The declarations folowing are put here for convenience | 226 | * The declarations following are put here for convenience |
227 | * and only intended to be used by the platform setup code. | 227 | * and only intended to be used by the platform setup code. |
228 | */ | 228 | */ |
229 | 229 | ||
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index aa0f1ebb4aaf..60f64b132bd4 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -348,3 +348,7 @@ COMPAT_SYS_SPU(sendmsg) | |||
348 | COMPAT_SYS_SPU(recvmsg) | 348 | COMPAT_SYS_SPU(recvmsg) |
349 | COMPAT_SYS_SPU(recvmmsg) | 349 | COMPAT_SYS_SPU(recvmmsg) |
350 | SYSCALL_SPU(accept4) | 350 | SYSCALL_SPU(accept4) |
351 | SYSCALL_SPU(name_to_handle_at) | ||
352 | COMPAT_SYS_SPU(open_by_handle_at) | ||
353 | COMPAT_SYS_SPU(clock_adjtime) | ||
354 | SYSCALL_SPU(syncfs) | ||
diff --git a/arch/powerpc/include/asm/uninorth.h b/arch/powerpc/include/asm/uninorth.h index f737732c3861..d12b11d7641e 100644 --- a/arch/powerpc/include/asm/uninorth.h +++ b/arch/powerpc/include/asm/uninorth.h | |||
@@ -60,7 +60,7 @@ | |||
60 | * | 60 | * |
61 | * Obviously, the GART is not cache coherent and so any change to it | 61 | * Obviously, the GART is not cache coherent and so any change to it |
62 | * must be flushed to memory (or maybe just make the GART space non | 62 | * must be flushed to memory (or maybe just make the GART space non |
63 | * cachable). AGP memory itself doens't seem to be cache coherent neither. | 63 | * cachable). AGP memory itself doesn't seem to be cache coherent neither. |
64 | * | 64 | * |
65 | * In order to invalidate the GART (which is probably necessary to inval | 65 | * In order to invalidate the GART (which is probably necessary to inval |
66 | * the bridge internal TLBs), the following sequence has to be written, | 66 | * the bridge internal TLBs), the following sequence has to be written, |
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index 6151937657f6..3c215648ce6d 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -367,10 +367,14 @@ | |||
367 | #define __NR_recvmsg 342 | 367 | #define __NR_recvmsg 342 |
368 | #define __NR_recvmmsg 343 | 368 | #define __NR_recvmmsg 343 |
369 | #define __NR_accept4 344 | 369 | #define __NR_accept4 344 |
370 | #define __NR_name_to_handle_at 345 | ||
371 | #define __NR_open_by_handle_at 346 | ||
372 | #define __NR_clock_adjtime 347 | ||
373 | #define __NR_syncfs 348 | ||
370 | 374 | ||
371 | #ifdef __KERNEL__ | 375 | #ifdef __KERNEL__ |
372 | 376 | ||
373 | #define __NR_syscalls 345 | 377 | #define __NR_syscalls 349 |
374 | 378 | ||
375 | #define __NR__exit __NR_exit | 379 | #define __NR__exit __NR_exit |
376 | #define NR_syscalls __NR_syscalls | 380 | #define NR_syscalls __NR_syscalls |
diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h index 25e39220e89c..b73a8199f161 100644 --- a/arch/powerpc/include/asm/vdso_datapage.h +++ b/arch/powerpc/include/asm/vdso_datapage.h | |||
@@ -57,7 +57,7 @@ struct vdso_data { | |||
57 | } version; | 57 | } version; |
58 | 58 | ||
59 | /* Note about the platform flags: it now only contains the lpar | 59 | /* Note about the platform flags: it now only contains the lpar |
60 | * bit. The actual platform number is dead and burried | 60 | * bit. The actual platform number is dead and buried |
61 | */ | 61 | */ |
62 | __u32 platform; /* Platform flags 0x18 */ | 62 | __u32 platform; /* Platform flags 0x18 */ |
63 | __u32 processor; /* Processor type 0x1C */ | 63 | __u32 processor; /* Processor type 0x1C */ |
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index 625942ae5585..60b3e377b1e4 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c | |||
@@ -99,7 +99,7 @@ void __init btext_prepare_BAT(void) | |||
99 | 99 | ||
100 | /* This function can be used to enable the early boot text when doing | 100 | /* This function can be used to enable the early boot text when doing |
101 | * OF booting or within bootx init. It must be followed by a btext_unmap() | 101 | * OF booting or within bootx init. It must be followed by a btext_unmap() |
102 | * call before the logical address becomes unuseable | 102 | * call before the logical address becomes unusable |
103 | */ | 103 | */ |
104 | void __init btext_setup_display(int width, int height, int depth, int pitch, | 104 | void __init btext_setup_display(int width, int height, int depth, int pitch, |
105 | unsigned long address) | 105 | unsigned long address) |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index c9b68d07ac4f..b9602ee06deb 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -1973,7 +1973,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
1973 | .pvr_mask = 0xffff0000, | 1973 | .pvr_mask = 0xffff0000, |
1974 | .pvr_value = 0x80240000, | 1974 | .pvr_value = 0x80240000, |
1975 | .cpu_name = "e5500", | 1975 | .cpu_name = "e5500", |
1976 | .cpu_features = CPU_FTRS_E500MC, | 1976 | .cpu_features = CPU_FTRS_E5500, |
1977 | .cpu_user_features = COMMON_USER_BOOKE, | 1977 | .cpu_user_features = COMMON_USER_BOOKE, |
1978 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | | 1978 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | |
1979 | MMU_FTR_USE_TLBILX, | 1979 | MMU_FTR_USE_TLBILX, |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 3d569e2aff18..5b5e1f002a8e 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -188,7 +188,7 @@ static void crash_kexec_wait_realmode(int cpu) | |||
188 | } | 188 | } |
189 | mb(); | 189 | mb(); |
190 | } | 190 | } |
191 | #endif | 191 | #endif /* CONFIG_PPC_STD_MMU_64 */ |
192 | 192 | ||
193 | /* | 193 | /* |
194 | * This function will be called by secondary cpus or by kexec cpu | 194 | * This function will be called by secondary cpus or by kexec cpu |
@@ -233,7 +233,9 @@ void crash_kexec_secondary(struct pt_regs *regs) | |||
233 | crash_ipi_callback(regs); | 233 | crash_ipi_callback(regs); |
234 | } | 234 | } |
235 | 235 | ||
236 | #else | 236 | #else /* ! CONFIG_SMP */ |
237 | static inline void crash_kexec_wait_realmode(int cpu) {} | ||
238 | |||
237 | static void crash_kexec_prepare_cpus(int cpu) | 239 | static void crash_kexec_prepare_cpus(int cpu) |
238 | { | 240 | { |
239 | /* | 241 | /* |
@@ -253,7 +255,7 @@ void crash_kexec_secondary(struct pt_regs *regs) | |||
253 | { | 255 | { |
254 | cpus_in_sr = CPU_MASK_NONE; | 256 | cpus_in_sr = CPU_MASK_NONE; |
255 | } | 257 | } |
256 | #endif | 258 | #endif /* CONFIG_SMP */ |
257 | 259 | ||
258 | /* | 260 | /* |
259 | * Register a function to be called on shutdown. Only use this if you | 261 | * Register a function to be called on shutdown. Only use this if you |
@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
344 | crash_save_cpu(regs, crashing_cpu); | 346 | crash_save_cpu(regs, crashing_cpu); |
345 | crash_kexec_prepare_cpus(crashing_cpu); | 347 | crash_kexec_prepare_cpus(crashing_cpu); |
346 | cpu_set(crashing_cpu, cpus_in_crash); | 348 | cpu_set(crashing_cpu, cpus_in_crash); |
347 | #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) | ||
348 | crash_kexec_wait_realmode(crashing_cpu); | 349 | crash_kexec_wait_realmode(crashing_cpu); |
349 | #endif | ||
350 | 350 | ||
351 | machine_kexec_mask_interrupts(); | 351 | machine_kexec_mask_interrupts(); |
352 | 352 | ||
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index cf02cad62d9a..d238c082c3c5 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -179,3 +179,21 @@ static int __init dma_init(void) | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | fs_initcall(dma_init); | 181 | fs_initcall(dma_init); |
182 | |||
183 | int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma, | ||
184 | void *cpu_addr, dma_addr_t handle, size_t size) | ||
185 | { | ||
186 | unsigned long pfn; | ||
187 | |||
188 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
189 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | ||
190 | pfn = __dma_get_coherent_pfn((unsigned long)cpu_addr); | ||
191 | #else | ||
192 | pfn = page_to_pfn(virt_to_page(cpu_addr)); | ||
193 | #endif | ||
194 | return remap_pfn_range(vma, vma->vm_start, | ||
195 | pfn + vma->vm_pgoff, | ||
196 | vma->vm_end - vma->vm_start, | ||
197 | vma->vm_page_prot); | ||
198 | } | ||
199 | EXPORT_SYMBOL_GPL(dma_mmap_coherent); | ||
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S index 5c43063d2506..9651acc3504a 100644 --- a/arch/powerpc/kernel/exceptions-64e.S +++ b/arch/powerpc/kernel/exceptions-64e.S | |||
@@ -379,7 +379,7 @@ interrupt_end_book3e: | |||
379 | mfspr r13,SPRN_SPRG_PACA /* get our PACA */ | 379 | mfspr r13,SPRN_SPRG_PACA /* get our PACA */ |
380 | b system_call_common | 380 | b system_call_common |
381 | 381 | ||
382 | /* Auxillary Processor Unavailable Interrupt */ | 382 | /* Auxiliary Processor Unavailable Interrupt */ |
383 | START_EXCEPTION(ap_unavailable); | 383 | START_EXCEPTION(ap_unavailable); |
384 | NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE) | 384 | NORMAL_EXCEPTION_PROLOG(0xf20, PROLOG_ADDITION_NONE) |
385 | EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP) | 385 | EXCEPTION_COMMON(0xf20, PACA_EXGEN, INTS_KEEP) |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 8a817995b4cd..aeb739e18769 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -5,7 +5,7 @@ | |||
5 | * handling and other fixed offset specific things. | 5 | * handling and other fixed offset specific things. |
6 | * | 6 | * |
7 | * This file is meant to be #included from head_64.S due to | 7 | * This file is meant to be #included from head_64.S due to |
8 | * position dependant assembly. | 8 | * position dependent assembly. |
9 | * | 9 | * |
10 | * Most of this originates from head_64.S and thus has the same | 10 | * Most of this originates from head_64.S and thus has the same |
11 | * copyright history. | 11 | * copyright history. |
@@ -977,20 +977,6 @@ _GLOBAL(do_stab_bolted) | |||
977 | rfid | 977 | rfid |
978 | b . /* prevent speculative execution */ | 978 | b . /* prevent speculative execution */ |
979 | 979 | ||
980 | /* | ||
981 | * Space for CPU0's segment table. | ||
982 | * | ||
983 | * On iSeries, the hypervisor must fill in at least one entry before | ||
984 | * we get control (with relocate on). The address is given to the hv | ||
985 | * as a page number (see xLparMap below), so this must be at a | ||
986 | * fixed address (the linker can't compute (u64)&initial_stab >> | ||
987 | * PAGE_SHIFT). | ||
988 | */ | ||
989 | . = STAB0_OFFSET /* 0x6000 */ | ||
990 | .globl initial_stab | ||
991 | initial_stab: | ||
992 | .space 4096 | ||
993 | |||
994 | #ifdef CONFIG_PPC_PSERIES | 980 | #ifdef CONFIG_PPC_PSERIES |
995 | /* | 981 | /* |
996 | * Data area reserved for FWNMI option. | 982 | * Data area reserved for FWNMI option. |
@@ -1027,3 +1013,17 @@ xLparMap: | |||
1027 | #ifdef CONFIG_PPC_PSERIES | 1013 | #ifdef CONFIG_PPC_PSERIES |
1028 | . = 0x8000 | 1014 | . = 0x8000 |
1029 | #endif /* CONFIG_PPC_PSERIES */ | 1015 | #endif /* CONFIG_PPC_PSERIES */ |
1016 | |||
1017 | /* | ||
1018 | * Space for CPU0's segment table. | ||
1019 | * | ||
1020 | * On iSeries, the hypervisor must fill in at least one entry before | ||
1021 | * we get control (with relocate on). The address is given to the hv | ||
1022 | * as a page number (see xLparMap above), so this must be at a | ||
1023 | * fixed address (the linker can't compute (u64)&initial_stab >> | ||
1024 | * PAGE_SHIFT). | ||
1025 | */ | ||
1026 | . = STAB0_OFFSET /* 0x8000 */ | ||
1027 | .globl initial_stab | ||
1028 | initial_stab: | ||
1029 | .space 4096 | ||
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 98c4b29a56f4..c5c24beb8387 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -890,6 +890,15 @@ __secondary_start: | |||
890 | mtspr SPRN_SRR1,r4 | 890 | mtspr SPRN_SRR1,r4 |
891 | SYNC | 891 | SYNC |
892 | RFI | 892 | RFI |
893 | |||
894 | _GLOBAL(start_secondary_resume) | ||
895 | /* Reset stack */ | ||
896 | rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ | ||
897 | addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD | ||
898 | li r3,0 | ||
899 | std r3,0(r1) /* Zero the stack frame pointer */ | ||
900 | bl start_secondary | ||
901 | b . | ||
893 | #endif /* CONFIG_SMP */ | 902 | #endif /* CONFIG_SMP */ |
894 | 903 | ||
895 | #ifdef CONFIG_KVM_BOOK3S_HANDLER | 904 | #ifdef CONFIG_KVM_BOOK3S_HANDLER |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 9dd21a8c4d52..a91626d87fc9 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -766,7 +766,7 @@ DataAccess: | |||
766 | * miss get to this point to load the TLB. | 766 | * miss get to this point to load the TLB. |
767 | * r10 - TLB_TAG value | 767 | * r10 - TLB_TAG value |
768 | * r11 - Linux PTE | 768 | * r11 - Linux PTE |
769 | * r12, r9 - avilable to use | 769 | * r12, r9 - available to use |
770 | * PID - loaded with proper value when we get here | 770 | * PID - loaded with proper value when we get here |
771 | * Upon exit, we reload everything and RFI. | 771 | * Upon exit, we reload everything and RFI. |
772 | * Actually, it will fit now, but oh well.....a common place | 772 | * Actually, it will fit now, but oh well.....a common place |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index cbb3436b592d..5e12b741ba5f 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -178,7 +178,7 @@ interrupt_base: | |||
178 | NORMAL_EXCEPTION_PROLOG | 178 | NORMAL_EXCEPTION_PROLOG |
179 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 179 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
180 | 180 | ||
181 | /* Auxillary Processor Unavailable Interrupt */ | 181 | /* Auxiliary Processor Unavailable Interrupt */ |
182 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 182 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
183 | 183 | ||
184 | /* Decrementer Interrupt */ | 184 | /* Decrementer Interrupt */ |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 782f23df7c85..3a319f9c9d3e 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/kvm_book3s_asm.h> | 40 | #include <asm/kvm_book3s_asm.h> |
41 | #include <asm/ptrace.h> | 41 | #include <asm/ptrace.h> |
42 | 42 | ||
43 | /* The physical memory is layed out such that the secondary processor | 43 | /* The physical memory is laid out such that the secondary processor |
44 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow | 44 | * spin code sits at 0x0000...0x00ff. On server, the vectors follow |
45 | * using the layout described in exceptions-64s.S | 45 | * using the layout described in exceptions-64s.S |
46 | */ | 46 | */ |
@@ -536,6 +536,13 @@ _GLOBAL(pmac_secondary_start) | |||
536 | add r13,r13,r4 /* for this processor. */ | 536 | add r13,r13,r4 /* for this processor. */ |
537 | mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ | 537 | mtspr SPRN_SPRG_PACA,r13 /* Save vaddr of paca in an SPRG*/ |
538 | 538 | ||
539 | /* Mark interrupts soft and hard disabled (they might be enabled | ||
540 | * in the PACA when doing hotplug) | ||
541 | */ | ||
542 | li r0,0 | ||
543 | stb r0,PACASOFTIRQEN(r13) | ||
544 | stb r0,PACAHARDIRQEN(r13) | ||
545 | |||
539 | /* Create a temp kernel stack for use before relocation is on. */ | 546 | /* Create a temp kernel stack for use before relocation is on. */ |
540 | ld r1,PACAEMERGSP(r13) | 547 | ld r1,PACAEMERGSP(r13) |
541 | subi r1,r1,STACK_FRAME_OVERHEAD | 548 | subi r1,r1,STACK_FRAME_OVERHEAD |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 3e02710d9562..5ecf54cfa7d4 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -326,7 +326,7 @@ interrupt_base: | |||
326 | NORMAL_EXCEPTION_PROLOG | 326 | NORMAL_EXCEPTION_PROLOG |
327 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 327 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
328 | 328 | ||
329 | /* Auxillary Processor Unavailable Interrupt */ | 329 | /* Auxiliary Processor Unavailable Interrupt */ |
330 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 330 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
331 | 331 | ||
332 | /* Decrementer Interrupt */ | 332 | /* Decrementer Interrupt */ |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index c00d4ca1ee15..28581f1ad2c0 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -527,7 +527,7 @@ static int ibmebus_bus_pm_resume_noirq(struct device *dev) | |||
527 | 527 | ||
528 | #endif /* !CONFIG_SUSPEND */ | 528 | #endif /* !CONFIG_SUSPEND */ |
529 | 529 | ||
530 | #ifdef CONFIG_HIBERNATION | 530 | #ifdef CONFIG_HIBERNATE_CALLBACKS |
531 | 531 | ||
532 | static int ibmebus_bus_pm_freeze(struct device *dev) | 532 | static int ibmebus_bus_pm_freeze(struct device *dev) |
533 | { | 533 | { |
@@ -665,7 +665,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev) | |||
665 | return ret; | 665 | return ret; |
666 | } | 666 | } |
667 | 667 | ||
668 | #else /* !CONFIG_HIBERNATION */ | 668 | #else /* !CONFIG_HIBERNATE_CALLBACKS */ |
669 | 669 | ||
670 | #define ibmebus_bus_pm_freeze NULL | 670 | #define ibmebus_bus_pm_freeze NULL |
671 | #define ibmebus_bus_pm_thaw NULL | 671 | #define ibmebus_bus_pm_thaw NULL |
@@ -676,7 +676,7 @@ static int ibmebus_bus_pm_restore_noirq(struct device *dev) | |||
676 | #define ibmebus_bus_pm_poweroff_noirq NULL | 676 | #define ibmebus_bus_pm_poweroff_noirq NULL |
677 | #define ibmebus_bus_pm_restore_noirq NULL | 677 | #define ibmebus_bus_pm_restore_noirq NULL |
678 | 678 | ||
679 | #endif /* !CONFIG_HIBERNATION */ | 679 | #endif /* !CONFIG_HIBERNATE_CALLBACKS */ |
680 | 680 | ||
681 | static struct dev_pm_ops ibmebus_bus_dev_pm_ops = { | 681 | static struct dev_pm_ops ibmebus_bus_dev_pm_ops = { |
682 | .prepare = ibmebus_bus_pm_prepare, | 682 | .prepare = ibmebus_bus_pm_prepare, |
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index 5328709eeedc..ba3195478600 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S | |||
@@ -53,24 +53,3 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
53 | isync | 53 | isync |
54 | b 1b | 54 | b 1b |
55 | 55 | ||
56 | _GLOBAL(power4_cpu_offline_powersave) | ||
57 | /* Go to NAP now */ | ||
58 | mfmsr r7 | ||
59 | rldicl r0,r7,48,1 | ||
60 | rotldi r0,r0,16 | ||
61 | mtmsrd r0,1 /* hard-disable interrupts */ | ||
62 | li r0,1 | ||
63 | li r6,0 | ||
64 | stb r0,PACAHARDIRQEN(r13) /* we'll hard-enable shortly */ | ||
65 | stb r6,PACASOFTIRQEN(r13) /* soft-disable irqs */ | ||
66 | BEGIN_FTR_SECTION | ||
67 | DSSALL | ||
68 | sync | ||
69 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | ||
70 | ori r7,r7,MSR_EE | ||
71 | oris r7,r7,MSR_POW@h | ||
72 | sync | ||
73 | isync | ||
74 | mtmsrd r7 | ||
75 | isync | ||
76 | blr | ||
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 63625e0650b5..f621b7d2d869 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -246,12 +246,13 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
246 | } | 246 | } |
247 | 247 | ||
248 | #ifdef CONFIG_HOTPLUG_CPU | 248 | #ifdef CONFIG_HOTPLUG_CPU |
249 | void fixup_irqs(const struct cpumask *map) | 249 | void migrate_irqs(void) |
250 | { | 250 | { |
251 | struct irq_desc *desc; | 251 | struct irq_desc *desc; |
252 | unsigned int irq; | 252 | unsigned int irq; |
253 | static int warned; | 253 | static int warned; |
254 | cpumask_var_t mask; | 254 | cpumask_var_t mask; |
255 | const struct cpumask *map = cpu_online_mask; | ||
255 | 256 | ||
256 | alloc_cpumask_var(&mask, GFP_KERNEL); | 257 | alloc_cpumask_var(&mask, GFP_KERNEL); |
257 | 258 | ||
diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S index 2a2f3c3f6d80..97ec8557f974 100644 --- a/arch/powerpc/kernel/l2cr_6xx.S +++ b/arch/powerpc/kernel/l2cr_6xx.S | |||
@@ -151,7 +151,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
151 | /**** Might be a good idea to set L2DO here - to prevent instructions | 151 | /**** Might be a good idea to set L2DO here - to prevent instructions |
152 | from getting into the cache. But since we invalidate | 152 | from getting into the cache. But since we invalidate |
153 | the next time we enable the cache it doesn't really matter. | 153 | the next time we enable the cache it doesn't really matter. |
154 | Don't do this unless you accomodate all processor variations. | 154 | Don't do this unless you accommodate all processor variations. |
155 | The bit moved on the 7450..... | 155 | The bit moved on the 7450..... |
156 | ****/ | 156 | ****/ |
157 | 157 | ||
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index c834757bebc0..2b97b80d6d7d 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -330,9 +330,11 @@ void __init find_legacy_serial_ports(void) | |||
330 | if (!parent) | 330 | if (!parent) |
331 | continue; | 331 | continue; |
332 | if (of_match_node(legacy_serial_parents, parent) != NULL) { | 332 | if (of_match_node(legacy_serial_parents, parent) != NULL) { |
333 | index = add_legacy_soc_port(np, np); | 333 | if (of_device_is_available(np)) { |
334 | if (index >= 0 && np == stdout) | 334 | index = add_legacy_soc_port(np, np); |
335 | legacy_serial_console = index; | 335 | if (index >= 0 && np == stdout) |
336 | legacy_serial_console = index; | ||
337 | } | ||
336 | } | 338 | } |
337 | of_node_put(parent); | 339 | of_node_put(parent); |
338 | } | 340 | } |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 16468362ad57..301db65f05a1 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -262,7 +262,7 @@ static void parse_ppp_data(struct seq_file *m) | |||
262 | seq_printf(m, "system_active_processors=%d\n", | 262 | seq_printf(m, "system_active_processors=%d\n", |
263 | ppp_data.active_system_procs); | 263 | ppp_data.active_system_procs); |
264 | 264 | ||
265 | /* pool related entries are apropriate for shared configs */ | 265 | /* pool related entries are appropriate for shared configs */ |
266 | if (lppaca_of(0).shared_proc) { | 266 | if (lppaca_of(0).shared_proc) { |
267 | unsigned long pool_idle_time, pool_procs; | 267 | unsigned long pool_idle_time, pool_procs; |
268 | 268 | ||
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index f4adf89d7614..10f0aadee95b 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void) | |||
203 | { | 203 | { |
204 | int new_size; | 204 | int new_size; |
205 | 205 | ||
206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus()); | 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); |
207 | 207 | ||
208 | if (new_size >= paca_size) | 208 | if (new_size >= paca_size) |
209 | return; | 209 | return; |
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 97e0ae414940..822f63008ae1 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
@@ -398,6 +398,25 @@ static int check_excludes(struct perf_event **ctrs, unsigned int cflags[], | |||
398 | return 0; | 398 | return 0; |
399 | } | 399 | } |
400 | 400 | ||
401 | static u64 check_and_compute_delta(u64 prev, u64 val) | ||
402 | { | ||
403 | u64 delta = (val - prev) & 0xfffffffful; | ||
404 | |||
405 | /* | ||
406 | * POWER7 can roll back counter values, if the new value is smaller | ||
407 | * than the previous value it will cause the delta and the counter to | ||
408 | * have bogus values unless we rolled a counter over. If a coutner is | ||
409 | * rolled back, it will be smaller, but within 256, which is the maximum | ||
410 | * number of events to rollback at once. If we dectect a rollback | ||
411 | * return 0. This can lead to a small lack of precision in the | ||
412 | * counters. | ||
413 | */ | ||
414 | if (prev > val && (prev - val) < 256) | ||
415 | delta = 0; | ||
416 | |||
417 | return delta; | ||
418 | } | ||
419 | |||
401 | static void power_pmu_read(struct perf_event *event) | 420 | static void power_pmu_read(struct perf_event *event) |
402 | { | 421 | { |
403 | s64 val, delta, prev; | 422 | s64 val, delta, prev; |
@@ -416,10 +435,11 @@ static void power_pmu_read(struct perf_event *event) | |||
416 | prev = local64_read(&event->hw.prev_count); | 435 | prev = local64_read(&event->hw.prev_count); |
417 | barrier(); | 436 | barrier(); |
418 | val = read_pmc(event->hw.idx); | 437 | val = read_pmc(event->hw.idx); |
438 | delta = check_and_compute_delta(prev, val); | ||
439 | if (!delta) | ||
440 | return; | ||
419 | } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); | 441 | } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); |
420 | 442 | ||
421 | /* The counters are only 32 bits wide */ | ||
422 | delta = (val - prev) & 0xfffffffful; | ||
423 | local64_add(delta, &event->count); | 443 | local64_add(delta, &event->count); |
424 | local64_sub(delta, &event->hw.period_left); | 444 | local64_sub(delta, &event->hw.period_left); |
425 | } | 445 | } |
@@ -449,8 +469,9 @@ static void freeze_limited_counters(struct cpu_hw_events *cpuhw, | |||
449 | val = (event->hw.idx == 5) ? pmc5 : pmc6; | 469 | val = (event->hw.idx == 5) ? pmc5 : pmc6; |
450 | prev = local64_read(&event->hw.prev_count); | 470 | prev = local64_read(&event->hw.prev_count); |
451 | event->hw.idx = 0; | 471 | event->hw.idx = 0; |
452 | delta = (val - prev) & 0xfffffffful; | 472 | delta = check_and_compute_delta(prev, val); |
453 | local64_add(delta, &event->count); | 473 | if (delta) |
474 | local64_add(delta, &event->count); | ||
454 | } | 475 | } |
455 | } | 476 | } |
456 | 477 | ||
@@ -458,14 +479,16 @@ static void thaw_limited_counters(struct cpu_hw_events *cpuhw, | |||
458 | unsigned long pmc5, unsigned long pmc6) | 479 | unsigned long pmc5, unsigned long pmc6) |
459 | { | 480 | { |
460 | struct perf_event *event; | 481 | struct perf_event *event; |
461 | u64 val; | 482 | u64 val, prev; |
462 | int i; | 483 | int i; |
463 | 484 | ||
464 | for (i = 0; i < cpuhw->n_limited; ++i) { | 485 | for (i = 0; i < cpuhw->n_limited; ++i) { |
465 | event = cpuhw->limited_counter[i]; | 486 | event = cpuhw->limited_counter[i]; |
466 | event->hw.idx = cpuhw->limited_hwidx[i]; | 487 | event->hw.idx = cpuhw->limited_hwidx[i]; |
467 | val = (event->hw.idx == 5) ? pmc5 : pmc6; | 488 | val = (event->hw.idx == 5) ? pmc5 : pmc6; |
468 | local64_set(&event->hw.prev_count, val); | 489 | prev = local64_read(&event->hw.prev_count); |
490 | if (check_and_compute_delta(prev, val)) | ||
491 | local64_set(&event->hw.prev_count, val); | ||
469 | perf_event_update_userpage(event); | 492 | perf_event_update_userpage(event); |
470 | } | 493 | } |
471 | } | 494 | } |
@@ -759,7 +782,7 @@ static int power_pmu_add(struct perf_event *event, int ef_flags) | |||
759 | 782 | ||
760 | /* | 783 | /* |
761 | * If group events scheduling transaction was started, | 784 | * If group events scheduling transaction was started, |
762 | * skip the schedulability test here, it will be peformed | 785 | * skip the schedulability test here, it will be performed |
763 | * at commit time(->commit_txn) as a whole | 786 | * at commit time(->commit_txn) as a whole |
764 | */ | 787 | */ |
765 | if (cpuhw->group_flag & PERF_EVENT_TXN) | 788 | if (cpuhw->group_flag & PERF_EVENT_TXN) |
@@ -1197,7 +1220,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
1197 | 1220 | ||
1198 | /* we don't have to worry about interrupts here */ | 1221 | /* we don't have to worry about interrupts here */ |
1199 | prev = local64_read(&event->hw.prev_count); | 1222 | prev = local64_read(&event->hw.prev_count); |
1200 | delta = (val - prev) & 0xfffffffful; | 1223 | delta = check_and_compute_delta(prev, val); |
1201 | local64_add(delta, &event->count); | 1224 | local64_add(delta, &event->count); |
1202 | 1225 | ||
1203 | /* | 1226 | /* |
diff --git a/arch/powerpc/kernel/ppc_save_regs.S b/arch/powerpc/kernel/ppc_save_regs.S index e83ba3f078e4..1b1787d52896 100644 --- a/arch/powerpc/kernel/ppc_save_regs.S +++ b/arch/powerpc/kernel/ppc_save_regs.S | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Grab the register values as they are now. | 17 | * Grab the register values as they are now. |
18 | * This won't do a particularily good job because we really | 18 | * This won't do a particularly good job because we really |
19 | * want our caller's caller's registers, and our caller has | 19 | * want our caller's caller's registers, and our caller has |
20 | * already executed its prologue. | 20 | * already executed its prologue. |
21 | * ToDo: We could reach back into the caller's save area to do | 21 | * ToDo: We could reach back into the caller's save area to do |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 05b7139d6a27..e74fa12afc82 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -683,7 +683,7 @@ void __init early_init_devtree(void *params) | |||
683 | #endif | 683 | #endif |
684 | 684 | ||
685 | #ifdef CONFIG_PHYP_DUMP | 685 | #ifdef CONFIG_PHYP_DUMP |
686 | /* scan tree to see if dump occured during last boot */ | 686 | /* scan tree to see if dump occurred during last boot */ |
687 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); | 687 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); |
688 | #endif | 688 | #endif |
689 | 689 | ||
@@ -739,7 +739,7 @@ void __init early_init_devtree(void *params) | |||
739 | 739 | ||
740 | DBG("Scanning CPUs ...\n"); | 740 | DBG("Scanning CPUs ...\n"); |
741 | 741 | ||
742 | /* Retreive CPU related informations from the flat tree | 742 | /* Retrieve CPU related informations from the flat tree |
743 | * (altivec support, boot CPU ID, ...) | 743 | * (altivec support, boot CPU ID, ...) |
744 | */ | 744 | */ |
745 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); | 745 | of_scan_flat_dt(early_init_dt_scan_cpus, NULL); |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 895b082f1e48..55613e33e263 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -463,7 +463,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset, | |||
463 | #ifdef CONFIG_VSX | 463 | #ifdef CONFIG_VSX |
464 | /* | 464 | /* |
465 | * Currently to set and and get all the vsx state, you need to call | 465 | * Currently to set and and get all the vsx state, you need to call |
466 | * the fp and VMX calls aswell. This only get/sets the lower 32 | 466 | * the fp and VMX calls as well. This only get/sets the lower 32 |
467 | * 128bit VSX registers. | 467 | * 128bit VSX registers. |
468 | */ | 468 | */ |
469 | 469 | ||
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 7980ec0e1e1a..67f6c3b51357 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -465,7 +465,7 @@ static void start_event_scan(void) | |||
465 | pr_debug("rtasd: will sleep for %d milliseconds\n", | 465 | pr_debug("rtasd: will sleep for %d milliseconds\n", |
466 | (30000 / rtas_event_scan_rate)); | 466 | (30000 / rtas_event_scan_rate)); |
467 | 467 | ||
468 | /* Retreive errors from nvram if any */ | 468 | /* Retrieve errors from nvram if any */ |
469 | retreive_nvram_error_log(); | 469 | retreive_nvram_error_log(); |
470 | 470 | ||
471 | schedule_delayed_work_on(cpumask_first(cpu_online_mask), | 471 | schedule_delayed_work_on(cpumask_first(cpu_online_mask), |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9d4882a46647..21f30cb68077 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void) | |||
509 | */ | 509 | */ |
510 | cpu_init_thread_core_maps(nthreads); | 510 | cpu_init_thread_core_maps(nthreads); |
511 | 511 | ||
512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ | ||
513 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | ||
514 | |||
512 | free_unused_pacas(); | 515 | free_unused_pacas(); |
513 | } | 516 | } |
514 | #endif /* CONFIG_SMP */ | 517 | #endif /* CONFIG_SMP */ |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 981360509172..cbdbb14be4b0 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -57,6 +57,25 @@ | |||
57 | #define DBG(fmt...) | 57 | #define DBG(fmt...) |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | |||
61 | /* Store all idle threads, this can be reused instead of creating | ||
62 | * a new thread. Also avoids complicated thread destroy functionality | ||
63 | * for idle threads. | ||
64 | */ | ||
65 | #ifdef CONFIG_HOTPLUG_CPU | ||
66 | /* | ||
67 | * Needed only for CONFIG_HOTPLUG_CPU because __cpuinitdata is | ||
68 | * removed after init for !CONFIG_HOTPLUG_CPU. | ||
69 | */ | ||
70 | static DEFINE_PER_CPU(struct task_struct *, idle_thread_array); | ||
71 | #define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x)) | ||
72 | #define set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p)) | ||
73 | #else | ||
74 | static struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ; | ||
75 | #define get_idle_for_cpu(x) (idle_thread_array[(x)]) | ||
76 | #define set_idle_for_cpu(x, p) (idle_thread_array[(x)] = (p)) | ||
77 | #endif | ||
78 | |||
60 | struct thread_info *secondary_ti; | 79 | struct thread_info *secondary_ti; |
61 | 80 | ||
62 | DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map); | 81 | DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map); |
@@ -238,23 +257,6 @@ static void __devinit smp_store_cpu_info(int id) | |||
238 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); | 257 | per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); |
239 | } | 258 | } |
240 | 259 | ||
241 | static void __init smp_create_idle(unsigned int cpu) | ||
242 | { | ||
243 | struct task_struct *p; | ||
244 | |||
245 | /* create a process for the processor */ | ||
246 | p = fork_idle(cpu); | ||
247 | if (IS_ERR(p)) | ||
248 | panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); | ||
249 | #ifdef CONFIG_PPC64 | ||
250 | paca[cpu].__current = p; | ||
251 | paca[cpu].kstack = (unsigned long) task_thread_info(p) | ||
252 | + THREAD_SIZE - STACK_FRAME_OVERHEAD; | ||
253 | #endif | ||
254 | current_set[cpu] = task_thread_info(p); | ||
255 | task_thread_info(p)->cpu = cpu; | ||
256 | } | ||
257 | |||
258 | void __init smp_prepare_cpus(unsigned int max_cpus) | 260 | void __init smp_prepare_cpus(unsigned int max_cpus) |
259 | { | 261 | { |
260 | unsigned int cpu; | 262 | unsigned int cpu; |
@@ -288,10 +290,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
288 | max_cpus = NR_CPUS; | 290 | max_cpus = NR_CPUS; |
289 | else | 291 | else |
290 | max_cpus = 1; | 292 | max_cpus = 1; |
291 | |||
292 | for_each_possible_cpu(cpu) | ||
293 | if (cpu != boot_cpuid) | ||
294 | smp_create_idle(cpu); | ||
295 | } | 293 | } |
296 | 294 | ||
297 | void __devinit smp_prepare_boot_cpu(void) | 295 | void __devinit smp_prepare_boot_cpu(void) |
@@ -305,7 +303,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
305 | 303 | ||
306 | #ifdef CONFIG_HOTPLUG_CPU | 304 | #ifdef CONFIG_HOTPLUG_CPU |
307 | /* State of each CPU during hotplug phases */ | 305 | /* State of each CPU during hotplug phases */ |
308 | DEFINE_PER_CPU(int, cpu_state) = { 0 }; | 306 | static DEFINE_PER_CPU(int, cpu_state) = { 0 }; |
309 | 307 | ||
310 | int generic_cpu_disable(void) | 308 | int generic_cpu_disable(void) |
311 | { | 309 | { |
@@ -317,30 +315,8 @@ int generic_cpu_disable(void) | |||
317 | set_cpu_online(cpu, false); | 315 | set_cpu_online(cpu, false); |
318 | #ifdef CONFIG_PPC64 | 316 | #ifdef CONFIG_PPC64 |
319 | vdso_data->processorCount--; | 317 | vdso_data->processorCount--; |
320 | fixup_irqs(cpu_online_mask); | ||
321 | #endif | ||
322 | return 0; | ||
323 | } | ||
324 | |||
325 | int generic_cpu_enable(unsigned int cpu) | ||
326 | { | ||
327 | /* Do the normal bootup if we haven't | ||
328 | * already bootstrapped. */ | ||
329 | if (system_state != SYSTEM_RUNNING) | ||
330 | return -ENOSYS; | ||
331 | |||
332 | /* get the target out of it's holding state */ | ||
333 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
334 | smp_wmb(); | ||
335 | |||
336 | while (!cpu_online(cpu)) | ||
337 | cpu_relax(); | ||
338 | |||
339 | #ifdef CONFIG_PPC64 | ||
340 | fixup_irqs(cpu_online_mask); | ||
341 | /* counter the irq disable in fixup_irqs */ | ||
342 | local_irq_enable(); | ||
343 | #endif | 318 | #endif |
319 | migrate_irqs(); | ||
344 | return 0; | 320 | return 0; |
345 | } | 321 | } |
346 | 322 | ||
@@ -362,37 +338,89 @@ void generic_mach_cpu_die(void) | |||
362 | unsigned int cpu; | 338 | unsigned int cpu; |
363 | 339 | ||
364 | local_irq_disable(); | 340 | local_irq_disable(); |
341 | idle_task_exit(); | ||
365 | cpu = smp_processor_id(); | 342 | cpu = smp_processor_id(); |
366 | printk(KERN_DEBUG "CPU%d offline\n", cpu); | 343 | printk(KERN_DEBUG "CPU%d offline\n", cpu); |
367 | __get_cpu_var(cpu_state) = CPU_DEAD; | 344 | __get_cpu_var(cpu_state) = CPU_DEAD; |
368 | smp_wmb(); | 345 | smp_wmb(); |
369 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) | 346 | while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) |
370 | cpu_relax(); | 347 | cpu_relax(); |
371 | set_cpu_online(cpu, true); | 348 | } |
372 | local_irq_enable(); | 349 | |
350 | void generic_set_cpu_dead(unsigned int cpu) | ||
351 | { | ||
352 | per_cpu(cpu_state, cpu) = CPU_DEAD; | ||
373 | } | 353 | } |
374 | #endif | 354 | #endif |
375 | 355 | ||
376 | static int __devinit cpu_enable(unsigned int cpu) | 356 | struct create_idle { |
357 | struct work_struct work; | ||
358 | struct task_struct *idle; | ||
359 | struct completion done; | ||
360 | int cpu; | ||
361 | }; | ||
362 | |||
363 | static void __cpuinit do_fork_idle(struct work_struct *work) | ||
377 | { | 364 | { |
378 | if (smp_ops && smp_ops->cpu_enable) | 365 | struct create_idle *c_idle = |
379 | return smp_ops->cpu_enable(cpu); | 366 | container_of(work, struct create_idle, work); |
367 | |||
368 | c_idle->idle = fork_idle(c_idle->cpu); | ||
369 | complete(&c_idle->done); | ||
370 | } | ||
371 | |||
372 | static int __cpuinit create_idle(unsigned int cpu) | ||
373 | { | ||
374 | struct thread_info *ti; | ||
375 | struct create_idle c_idle = { | ||
376 | .cpu = cpu, | ||
377 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), | ||
378 | }; | ||
379 | INIT_WORK_ONSTACK(&c_idle.work, do_fork_idle); | ||
380 | |||
381 | c_idle.idle = get_idle_for_cpu(cpu); | ||
382 | |||
383 | /* We can't use kernel_thread since we must avoid to | ||
384 | * reschedule the child. We use a workqueue because | ||
385 | * we want to fork from a kernel thread, not whatever | ||
386 | * userspace process happens to be trying to online us. | ||
387 | */ | ||
388 | if (!c_idle.idle) { | ||
389 | schedule_work(&c_idle.work); | ||
390 | wait_for_completion(&c_idle.done); | ||
391 | } else | ||
392 | init_idle(c_idle.idle, cpu); | ||
393 | if (IS_ERR(c_idle.idle)) { | ||
394 | pr_err("Failed fork for CPU %u: %li", cpu, PTR_ERR(c_idle.idle)); | ||
395 | return PTR_ERR(c_idle.idle); | ||
396 | } | ||
397 | ti = task_thread_info(c_idle.idle); | ||
398 | |||
399 | #ifdef CONFIG_PPC64 | ||
400 | paca[cpu].__current = c_idle.idle; | ||
401 | paca[cpu].kstack = (unsigned long)ti + THREAD_SIZE - STACK_FRAME_OVERHEAD; | ||
402 | #endif | ||
403 | ti->cpu = cpu; | ||
404 | current_set[cpu] = ti; | ||
380 | 405 | ||
381 | return -ENOSYS; | 406 | return 0; |
382 | } | 407 | } |
383 | 408 | ||
384 | int __cpuinit __cpu_up(unsigned int cpu) | 409 | int __cpuinit __cpu_up(unsigned int cpu) |
385 | { | 410 | { |
386 | int c; | 411 | int rc, c; |
387 | 412 | ||
388 | secondary_ti = current_set[cpu]; | 413 | secondary_ti = current_set[cpu]; |
389 | if (!cpu_enable(cpu)) | ||
390 | return 0; | ||
391 | 414 | ||
392 | if (smp_ops == NULL || | 415 | if (smp_ops == NULL || |
393 | (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) | 416 | (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) |
394 | return -EINVAL; | 417 | return -EINVAL; |
395 | 418 | ||
419 | /* Make sure we have an idle thread */ | ||
420 | rc = create_idle(cpu); | ||
421 | if (rc) | ||
422 | return rc; | ||
423 | |||
396 | /* Make sure callin-map entry is 0 (can be leftover a CPU | 424 | /* Make sure callin-map entry is 0 (can be leftover a CPU |
397 | * hotplug | 425 | * hotplug |
398 | */ | 426 | */ |
@@ -502,7 +530,7 @@ static struct device_node *cpu_to_l2cache(int cpu) | |||
502 | } | 530 | } |
503 | 531 | ||
504 | /* Activate a secondary processor. */ | 532 | /* Activate a secondary processor. */ |
505 | int __devinit start_secondary(void *unused) | 533 | void __devinit start_secondary(void *unused) |
506 | { | 534 | { |
507 | unsigned int cpu = smp_processor_id(); | 535 | unsigned int cpu = smp_processor_id(); |
508 | struct device_node *l2_cache; | 536 | struct device_node *l2_cache; |
@@ -523,6 +551,10 @@ int __devinit start_secondary(void *unused) | |||
523 | 551 | ||
524 | secondary_cpu_time_init(); | 552 | secondary_cpu_time_init(); |
525 | 553 | ||
554 | #ifdef CONFIG_PPC64 | ||
555 | if (system_state == SYSTEM_RUNNING) | ||
556 | vdso_data->processorCount++; | ||
557 | #endif | ||
526 | ipi_call_lock(); | 558 | ipi_call_lock(); |
527 | notify_cpu_starting(cpu); | 559 | notify_cpu_starting(cpu); |
528 | set_cpu_online(cpu, true); | 560 | set_cpu_online(cpu, true); |
@@ -558,7 +590,8 @@ int __devinit start_secondary(void *unused) | |||
558 | local_irq_enable(); | 590 | local_irq_enable(); |
559 | 591 | ||
560 | cpu_idle(); | 592 | cpu_idle(); |
561 | return 0; | 593 | |
594 | BUG(); | ||
562 | } | 595 | } |
563 | 596 | ||
564 | int setup_profiling_timer(unsigned int multiplier) | 597 | int setup_profiling_timer(unsigned int multiplier) |
@@ -585,7 +618,11 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
585 | 618 | ||
586 | free_cpumask_var(old_mask); | 619 | free_cpumask_var(old_mask); |
587 | 620 | ||
621 | if (smp_ops && smp_ops->bringup_done) | ||
622 | smp_ops->bringup_done(); | ||
623 | |||
588 | dump_numa_cpu_topology(); | 624 | dump_numa_cpu_topology(); |
625 | |||
589 | } | 626 | } |
590 | 627 | ||
591 | int arch_sd_sibling_asym_packing(void) | 628 | int arch_sd_sibling_asym_packing(void) |
@@ -660,5 +697,9 @@ void cpu_die(void) | |||
660 | { | 697 | { |
661 | if (ppc_md.cpu_die) | 698 | if (ppc_md.cpu_die) |
662 | ppc_md.cpu_die(); | 699 | ppc_md.cpu_die(); |
700 | |||
701 | /* If we return, we re-enter start_secondary */ | ||
702 | start_secondary_resume(); | ||
663 | } | 703 | } |
704 | |||
664 | #endif | 705 | #endif |
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S index b0754e237438..ba4dee3d233f 100644 --- a/arch/powerpc/kernel/swsusp_32.S +++ b/arch/powerpc/kernel/swsusp_32.S | |||
@@ -143,7 +143,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
143 | 143 | ||
144 | /* Disable MSR:DR to make sure we don't take a TLB or | 144 | /* Disable MSR:DR to make sure we don't take a TLB or |
145 | * hash miss during the copy, as our hash table will | 145 | * hash miss during the copy, as our hash table will |
146 | * for a while be unuseable. For .text, we assume we are | 146 | * for a while be unusable. For .text, we assume we are |
147 | * covered by a BAT. This works only for non-G5 at this | 147 | * covered by a BAT. This works only for non-G5 at this |
148 | * point. G5 will need a better approach, possibly using | 148 | * point. G5 will need a better approach, possibly using |
149 | * a small temporary hash table filled with large mappings, | 149 | * a small temporary hash table filled with large mappings, |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 09d31dbf43f9..f33acfd872ad 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -229,6 +229,9 @@ static u64 scan_dispatch_log(u64 stop_tb) | |||
229 | u64 stolen = 0; | 229 | u64 stolen = 0; |
230 | u64 dtb; | 230 | u64 dtb; |
231 | 231 | ||
232 | if (!dtl) | ||
233 | return 0; | ||
234 | |||
232 | if (i == vpa->dtl_idx) | 235 | if (i == vpa->dtl_idx) |
233 | return 0; | 236 | return 0; |
234 | while (i < vpa->dtl_idx) { | 237 | while (i < vpa->dtl_idx) { |
@@ -356,7 +359,7 @@ void account_system_vtime(struct task_struct *tsk) | |||
356 | } | 359 | } |
357 | get_paca()->user_time_scaled += user_scaled; | 360 | get_paca()->user_time_scaled += user_scaled; |
358 | 361 | ||
359 | if (in_irq() || idle_task(smp_processor_id()) != tsk) { | 362 | if (in_interrupt() || idle_task(smp_processor_id()) != tsk) { |
360 | account_system_time(tsk, 0, delta, sys_scaled); | 363 | account_system_time(tsk, 0, delta, sys_scaled); |
361 | if (stolen) | 364 | if (stolen) |
362 | account_steal_time(stolen); | 365 | account_steal_time(stolen); |
@@ -577,14 +580,21 @@ void timer_interrupt(struct pt_regs * regs) | |||
577 | struct clock_event_device *evt = &decrementer->event; | 580 | struct clock_event_device *evt = &decrementer->event; |
578 | u64 now; | 581 | u64 now; |
579 | 582 | ||
583 | /* Ensure a positive value is written to the decrementer, or else | ||
584 | * some CPUs will continue to take decrementer exceptions. | ||
585 | */ | ||
586 | set_dec(DECREMENTER_MAX); | ||
587 | |||
588 | /* Some implementations of hotplug will get timer interrupts while | ||
589 | * offline, just ignore these | ||
590 | */ | ||
591 | if (!cpu_online(smp_processor_id())) | ||
592 | return; | ||
593 | |||
580 | trace_timer_interrupt_entry(regs); | 594 | trace_timer_interrupt_entry(regs); |
581 | 595 | ||
582 | __get_cpu_var(irq_stat).timer_irqs++; | 596 | __get_cpu_var(irq_stat).timer_irqs++; |
583 | 597 | ||
584 | /* Ensure a positive value is written to the decrementer, or else | ||
585 | * some CPUs will continuue to take decrementer exceptions */ | ||
586 | set_dec(DECREMENTER_MAX); | ||
587 | |||
588 | #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) | 598 | #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) |
589 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 599 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
590 | do_IRQ(regs); | 600 | do_IRQ(regs); |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index bd74fac169be..5ddb801bc154 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -959,7 +959,7 @@ void __kprobes program_check_exception(struct pt_regs *regs) | |||
959 | * ESR_DST (!?) or 0. In the process of chasing this with the | 959 | * ESR_DST (!?) or 0. In the process of chasing this with the |
960 | * hardware people - not sure if it can happen on any illegal | 960 | * hardware people - not sure if it can happen on any illegal |
961 | * instruction or only on FP instructions, whether there is a | 961 | * instruction or only on FP instructions, whether there is a |
962 | * pattern to occurences etc. -dgibson 31/Mar/2003 */ | 962 | * pattern to occurrences etc. -dgibson 31/Mar/2003 */ |
963 | switch (do_mathemu(regs)) { | 963 | switch (do_mathemu(regs)) { |
964 | case 0: | 964 | case 0: |
965 | emulate_single_step(regs); | 965 | emulate_single_step(regs); |
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index b4b167b33643..baa33a7517bc 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * udbg for NS16550 compatable serial ports | 2 | * udbg for NS16550 compatible serial ports |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp | 4 | * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp |
5 | * | 5 | * |
diff --git a/arch/powerpc/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S index 68d49dd71dcc..cf0c9c9c24f9 100644 --- a/arch/powerpc/kernel/vdso32/sigtramp.S +++ b/arch/powerpc/kernel/vdso32/sigtramp.S | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from | 20 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from |
21 | the return address to get an address in the middle of the presumed | 21 | the return address to get an address in the middle of the presumed |
22 | call instruction. Since we don't have a call here, we artifically | 22 | call instruction. Since we don't have a call here, we artificially |
23 | extend the range covered by the unwind info by adding a nop before | 23 | extend the range covered by the unwind info by adding a nop before |
24 | the real start. */ | 24 | the real start. */ |
25 | nop | 25 | nop |
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 59eb59bb4082..45ea281e9a21 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from | 21 | /* The nop here is a hack. The dwarf2 unwind routines subtract 1 from |
22 | the return address to get an address in the middle of the presumed | 22 | the return address to get an address in the middle of the presumed |
23 | call instruction. Since we don't have a call here, we artifically | 23 | call instruction. Since we don't have a call here, we artificially |
24 | extend the range covered by the unwind info by padding before the | 24 | extend the range covered by the unwind info by padding before the |
25 | real start. */ | 25 | real start. */ |
26 | nop | 26 | nop |
diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c index 757c0bed9a91..b42f76c4948d 100644 --- a/arch/powerpc/mm/dma-noncoherent.c +++ b/arch/powerpc/mm/dma-noncoherent.c | |||
@@ -399,3 +399,23 @@ void __dma_sync_page(struct page *page, unsigned long offset, | |||
399 | #endif | 399 | #endif |
400 | } | 400 | } |
401 | EXPORT_SYMBOL(__dma_sync_page); | 401 | EXPORT_SYMBOL(__dma_sync_page); |
402 | |||
403 | /* | ||
404 | * Return the PFN for a given cpu virtual address returned by | ||
405 | * __dma_alloc_coherent. This is used by dma_mmap_coherent() | ||
406 | */ | ||
407 | unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr) | ||
408 | { | ||
409 | /* This should always be populated, so we don't test every | ||
410 | * level. If that fails, we'll have a nice crash which | ||
411 | * will be as good as a BUG_ON() | ||
412 | */ | ||
413 | pgd_t *pgd = pgd_offset_k(cpu_addr); | ||
414 | pud_t *pud = pud_offset(pgd, cpu_addr); | ||
415 | pmd_t *pmd = pmd_offset(pud, cpu_addr); | ||
416 | pte_t *ptep = pte_offset_kernel(pmd, cpu_addr); | ||
417 | |||
418 | if (pte_none(*ptep) || !pte_present(*ptep)) | ||
419 | return 0; | ||
420 | return pte_pfn(*ptep); | ||
421 | } | ||
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index 3079f6b44cf5..5b7dd4ea02b5 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
@@ -192,8 +192,8 @@ htab_insert_pte: | |||
192 | rldicr r3,r0,3,63-3 /* r3 = (hash & mask) << 3 */ | 192 | rldicr r3,r0,3,63-3 /* r3 = (hash & mask) << 3 */ |
193 | 193 | ||
194 | /* Call ppc_md.hpte_insert */ | 194 | /* Call ppc_md.hpte_insert */ |
195 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 195 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
196 | mr r4,r29 /* Retreive va */ | 196 | mr r4,r29 /* Retrieve va */ |
197 | li r7,0 /* !bolted, !secondary */ | 197 | li r7,0 /* !bolted, !secondary */ |
198 | li r8,MMU_PAGE_4K /* page size */ | 198 | li r8,MMU_PAGE_4K /* page size */ |
199 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 199 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
@@ -215,8 +215,8 @@ _GLOBAL(htab_call_hpte_insert1) | |||
215 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 215 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
216 | 216 | ||
217 | /* Call ppc_md.hpte_insert */ | 217 | /* Call ppc_md.hpte_insert */ |
218 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 218 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
219 | mr r4,r29 /* Retreive va */ | 219 | mr r4,r29 /* Retrieve va */ |
220 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 220 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
221 | li r8,MMU_PAGE_4K /* page size */ | 221 | li r8,MMU_PAGE_4K /* page size */ |
222 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 222 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
@@ -495,8 +495,8 @@ htab_special_pfn: | |||
495 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 495 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ |
496 | 496 | ||
497 | /* Call ppc_md.hpte_insert */ | 497 | /* Call ppc_md.hpte_insert */ |
498 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 498 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
499 | mr r4,r29 /* Retreive va */ | 499 | mr r4,r29 /* Retrieve va */ |
500 | li r7,0 /* !bolted, !secondary */ | 500 | li r7,0 /* !bolted, !secondary */ |
501 | li r8,MMU_PAGE_4K /* page size */ | 501 | li r8,MMU_PAGE_4K /* page size */ |
502 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 502 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
@@ -522,8 +522,8 @@ _GLOBAL(htab_call_hpte_insert1) | |||
522 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 522 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
523 | 523 | ||
524 | /* Call ppc_md.hpte_insert */ | 524 | /* Call ppc_md.hpte_insert */ |
525 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 525 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
526 | mr r4,r29 /* Retreive va */ | 526 | mr r4,r29 /* Retrieve va */ |
527 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 527 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
528 | li r8,MMU_PAGE_4K /* page size */ | 528 | li r8,MMU_PAGE_4K /* page size */ |
529 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 529 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
@@ -813,8 +813,8 @@ ht64_insert_pte: | |||
813 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ | 813 | rldicr r3,r0,3,63-3 /* r0 = (hash & mask) << 3 */ |
814 | 814 | ||
815 | /* Call ppc_md.hpte_insert */ | 815 | /* Call ppc_md.hpte_insert */ |
816 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 816 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
817 | mr r4,r29 /* Retreive va */ | 817 | mr r4,r29 /* Retrieve va */ |
818 | li r7,0 /* !bolted, !secondary */ | 818 | li r7,0 /* !bolted, !secondary */ |
819 | li r8,MMU_PAGE_64K | 819 | li r8,MMU_PAGE_64K |
820 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 820 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
@@ -836,8 +836,8 @@ _GLOBAL(ht64_call_hpte_insert1) | |||
836 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ | 836 | rldicr r3,r0,3,63-3 /* r0 = (~hash & mask) << 3 */ |
837 | 837 | ||
838 | /* Call ppc_md.hpte_insert */ | 838 | /* Call ppc_md.hpte_insert */ |
839 | ld r6,STK_PARM(r4)(r1) /* Retreive new pp bits */ | 839 | ld r6,STK_PARM(r4)(r1) /* Retrieve new pp bits */ |
840 | mr r4,r29 /* Retreive va */ | 840 | mr r4,r29 /* Retrieve va */ |
841 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ | 841 | li r7,HPTE_V_SECONDARY /* !bolted, secondary */ |
842 | li r8,MMU_PAGE_64K | 842 | li r8,MMU_PAGE_64K |
843 | ld r9,STK_PARM(r9)(r1) /* segment size */ | 843 | ld r9,STK_PARM(r9)(r1) /* segment size */ |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a5991facddce..58a022d0f463 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -753,7 +753,7 @@ void __cpuinit early_init_mmu_secondary(void) | |||
753 | mtspr(SPRN_SDR1, _SDR1); | 753 | mtspr(SPRN_SDR1, _SDR1); |
754 | 754 | ||
755 | /* Initialize STAB/SLB. We use a virtual address as it works | 755 | /* Initialize STAB/SLB. We use a virtual address as it works |
756 | * in real mode on pSeries and we want a virutal address on | 756 | * in real mode on pSeries and we want a virtual address on |
757 | * iSeries anyway | 757 | * iSeries anyway |
758 | */ | 758 | */ |
759 | if (cpu_has_feature(CPU_FTR_SLB)) | 759 | if (cpu_has_feature(CPU_FTR_SLB)) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index a66499650909..57e545b84bf1 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -424,7 +424,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg) | |||
424 | clear_page(page); | 424 | clear_page(page); |
425 | 425 | ||
426 | /* | 426 | /* |
427 | * We shouldnt have to do this, but some versions of glibc | 427 | * We shouldn't have to do this, but some versions of glibc |
428 | * require it (ld.so assumes zero filled pages are icache clean) | 428 | * require it (ld.so assumes zero filled pages are icache clean) |
429 | * - Anton | 429 | * - Anton |
430 | */ | 430 | */ |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 0dc95c0aa3be..5ec1dad2a19d 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -440,11 +440,11 @@ static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp) | |||
440 | } | 440 | } |
441 | 441 | ||
442 | /* | 442 | /* |
443 | * Retreive and validate the ibm,dynamic-memory property of the device tree. | 443 | * Retrieve and validate the ibm,dynamic-memory property of the device tree. |
444 | * | 444 | * |
445 | * The layout of the ibm,dynamic-memory property is a number N of memblock | 445 | * The layout of the ibm,dynamic-memory property is a number N of memblock |
446 | * list entries followed by N memblock list entries. Each memblock list entry | 446 | * list entries followed by N memblock list entries. Each memblock list entry |
447 | * contains information as layed out in the of_drconf_cell struct above. | 447 | * contains information as laid out in the of_drconf_cell struct above. |
448 | */ | 448 | */ |
449 | static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | 449 | static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) |
450 | { | 450 | { |
@@ -468,7 +468,7 @@ static int of_get_drconf_memory(struct device_node *memory, const u32 **dm) | |||
468 | } | 468 | } |
469 | 469 | ||
470 | /* | 470 | /* |
471 | * Retreive and validate the ibm,lmb-size property for drconf memory | 471 | * Retrieve and validate the ibm,lmb-size property for drconf memory |
472 | * from the device tree. | 472 | * from the device tree. |
473 | */ | 473 | */ |
474 | static u64 of_get_lmb_size(struct device_node *memory) | 474 | static u64 of_get_lmb_size(struct device_node *memory) |
@@ -490,7 +490,7 @@ struct assoc_arrays { | |||
490 | }; | 490 | }; |
491 | 491 | ||
492 | /* | 492 | /* |
493 | * Retreive and validate the list of associativity arrays for drconf | 493 | * Retrieve and validate the list of associativity arrays for drconf |
494 | * memory from the ibm,associativity-lookup-arrays property of the | 494 | * memory from the ibm,associativity-lookup-arrays property of the |
495 | * device tree.. | 495 | * device tree.. |
496 | * | 496 | * |
@@ -604,7 +604,7 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb, | |||
604 | * Returns the size the region should have to enforce the memory limit. | 604 | * Returns the size the region should have to enforce the memory limit. |
605 | * This will either be the original value of size, a truncated value, | 605 | * This will either be the original value of size, a truncated value, |
606 | * or zero. If the returned value of size is 0 the region should be | 606 | * or zero. If the returned value of size is 0 the region should be |
607 | * discarded as it lies wholy above the memory limit. | 607 | * discarded as it lies wholly above the memory limit. |
608 | */ | 608 | */ |
609 | static unsigned long __init numa_enforce_memory_limit(unsigned long start, | 609 | static unsigned long __init numa_enforce_memory_limit(unsigned long start, |
610 | unsigned long size) | 610 | unsigned long size) |
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index 8526bd9d2aa3..af0892209417 100644 --- a/arch/powerpc/mm/tlb_low_64e.S +++ b/arch/powerpc/mm/tlb_low_64e.S | |||
@@ -192,7 +192,7 @@ normal_tlb_miss: | |||
192 | or r10,r15,r14 | 192 | or r10,r15,r14 |
193 | 193 | ||
194 | BEGIN_MMU_FTR_SECTION | 194 | BEGIN_MMU_FTR_SECTION |
195 | /* Set the TLB reservation and seach for existing entry. Then load | 195 | /* Set the TLB reservation and search for existing entry. Then load |
196 | * the entry. | 196 | * the entry. |
197 | */ | 197 | */ |
198 | PPC_TLBSRX_DOT(0,r16) | 198 | PPC_TLBSRX_DOT(0,r16) |
@@ -425,13 +425,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_TLBRSRV) | |||
425 | 425 | ||
426 | virt_page_table_tlb_miss_fault: | 426 | virt_page_table_tlb_miss_fault: |
427 | /* If we fault here, things are a little bit tricky. We need to call | 427 | /* If we fault here, things are a little bit tricky. We need to call |
428 | * either data or instruction store fault, and we need to retreive | 428 | * either data or instruction store fault, and we need to retrieve |
429 | * the original fault address and ESR (for data). | 429 | * the original fault address and ESR (for data). |
430 | * | 430 | * |
431 | * The thing is, we know that in normal circumstances, this is | 431 | * The thing is, we know that in normal circumstances, this is |
432 | * always called as a second level tlb miss for SW load or as a first | 432 | * always called as a second level tlb miss for SW load or as a first |
433 | * level TLB miss for HW load, so we should be able to peek at the | 433 | * level TLB miss for HW load, so we should be able to peek at the |
434 | * relevant informations in the first exception frame in the PACA. | 434 | * relevant information in the first exception frame in the PACA. |
435 | * | 435 | * |
436 | * However, we do need to double check that, because we may just hit | 436 | * However, we do need to double check that, because we may just hit |
437 | * a stray kernel pointer or a userland attack trying to hit those | 437 | * a stray kernel pointer or a userland attack trying to hit those |
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index c4d2b7167568..cb515cff745c 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c | |||
@@ -67,7 +67,7 @@ | |||
67 | 67 | ||
68 | #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */ | 68 | #define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */ |
69 | 69 | ||
70 | /* Minumum HW interval timer setting to send value to trace buffer is 10 cycle. | 70 | /* Minimum HW interval timer setting to send value to trace buffer is 10 cycle. |
71 | * To configure counter to send value every N cycles set counter to | 71 | * To configure counter to send value every N cycles set counter to |
72 | * 2^32 - 1 - N. | 72 | * 2^32 - 1 - N. |
73 | */ | 73 | */ |
@@ -1470,7 +1470,7 @@ static int cell_global_start(struct op_counter_config *ctr) | |||
1470 | * trace buffer at the maximum rate possible. The trace buffer is configured | 1470 | * trace buffer at the maximum rate possible. The trace buffer is configured |
1471 | * to store the PCs, wrapping when it is full. The performance counter is | 1471 | * to store the PCs, wrapping when it is full. The performance counter is |
1472 | * initialized to the max hardware count minus the number of events, N, between | 1472 | * initialized to the max hardware count minus the number of events, N, between |
1473 | * samples. Once the N events have occured, a HW counter overflow occurs | 1473 | * samples. Once the N events have occurred, a HW counter overflow occurs |
1474 | * causing the generation of a HW counter interrupt which also stops the | 1474 | * causing the generation of a HW counter interrupt which also stops the |
1475 | * writing of the SPU PC values to the trace buffer. Hence the last PC | 1475 | * writing of the SPU PC values to the trace buffer. Hence the last PC |
1476 | * written to the trace buffer is the SPU PC that we want. Unfortunately, | 1476 | * written to the trace buffer is the SPU PC that we want. Unfortunately, |
@@ -1656,7 +1656,7 @@ static void cell_handle_interrupt_ppu(struct pt_regs *regs, | |||
1656 | * The counters were frozen by the interrupt. | 1656 | * The counters were frozen by the interrupt. |
1657 | * Reenable the interrupt and restart the counters. | 1657 | * Reenable the interrupt and restart the counters. |
1658 | * If there was a race between the interrupt handler and | 1658 | * If there was a race between the interrupt handler and |
1659 | * the virtual counter routine. The virutal counter | 1659 | * the virtual counter routine. The virtual counter |
1660 | * routine may have cleared the interrupts. Hence must | 1660 | * routine may have cleared the interrupts. Hence must |
1661 | * use the virt_cntr_inter_mask to re-enable the interrupts. | 1661 | * use the virt_cntr_inter_mask to re-enable the interrupts. |
1662 | */ | 1662 | */ |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 80774092db77..8ee51a252cf1 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -207,7 +207,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
207 | unsigned long mmcra; | 207 | unsigned long mmcra; |
208 | unsigned long slot; | 208 | unsigned long slot; |
209 | 209 | ||
210 | /* Cant do much about it */ | 210 | /* Can't do much about it */ |
211 | if (!cur_cpu_spec->oprofile_mmcra_sihv) | 211 | if (!cur_cpu_spec->oprofile_mmcra_sihv) |
212 | return pc; | 212 | return pc; |
213 | 213 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 6385d883cb8d..9940ce8a2d4e 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -57,7 +57,7 @@ struct mpc52xx_lpbfifo { | |||
57 | static struct mpc52xx_lpbfifo lpbfifo; | 57 | static struct mpc52xx_lpbfifo lpbfifo; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transfered | 60 | * mpc52xx_lpbfifo_kick - Trigger the next block of data to be transferred |
61 | */ | 61 | */ |
62 | static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | 62 | static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) |
63 | { | 63 | { |
@@ -179,7 +179,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | |||
179 | * | 179 | * |
180 | * On transmit, the dma completion irq triggers before the fifo completion | 180 | * On transmit, the dma completion irq triggers before the fifo completion |
181 | * triggers. Handle the dma completion here instead of the LPB FIFO Bestcomm | 181 | * triggers. Handle the dma completion here instead of the LPB FIFO Bestcomm |
182 | * task completion irq becuase everyting is not really done until the LPB FIFO | 182 | * task completion irq because everything is not really done until the LPB FIFO |
183 | * completion irq triggers. | 183 | * completion irq triggers. |
184 | * | 184 | * |
185 | * In other words: | 185 | * In other words: |
@@ -195,7 +195,7 @@ static void mpc52xx_lpbfifo_kick(struct mpc52xx_lpbfifo_request *req) | |||
195 | * Exit conditions: | 195 | * Exit conditions: |
196 | * 1) Transfer aborted | 196 | * 1) Transfer aborted |
197 | * 2) FIFO complete without DMA; more data to do | 197 | * 2) FIFO complete without DMA; more data to do |
198 | * 3) FIFO complete without DMA; all data transfered | 198 | * 3) FIFO complete without DMA; all data transferred |
199 | * 4) FIFO complete using DMA | 199 | * 4) FIFO complete using DMA |
200 | * | 200 | * |
201 | * Condition 1 can occur regardless of whether or not DMA is used. | 201 | * Condition 1 can occur regardless of whether or not DMA is used. |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 3ddea96273ca..1dd15400f6f0 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -512,7 +512,7 @@ void __init mpc52xx_init_irq(void) | |||
512 | /** | 512 | /** |
513 | * mpc52xx_get_irq - Get pending interrupt number hook function | 513 | * mpc52xx_get_irq - Get pending interrupt number hook function |
514 | * | 514 | * |
515 | * Called by the interupt handler to determine what IRQ handler needs to be | 515 | * Called by the interrupt handler to determine what IRQ handler needs to be |
516 | * executed. | 516 | * executed. |
517 | * | 517 | * |
518 | * Status of pending interrupts is determined by reading the encoded status | 518 | * Status of pending interrupts is determined by reading the encoded status |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 20576829eca5..f7b07720aa30 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -46,7 +46,7 @@ config PPC_OF_BOOT_TRAMPOLINE | |||
46 | help | 46 | help |
47 | Support from booting from Open Firmware or yaboot using an | 47 | Support from booting from Open Firmware or yaboot using an |
48 | Open Firmware client interface. This enables the kernel to | 48 | Open Firmware client interface. This enables the kernel to |
49 | communicate with open firmware to retrieve system informations | 49 | communicate with open firmware to retrieve system information |
50 | such as the device tree. | 50 | such as the device tree. |
51 | 51 | ||
52 | In case of doubt, say Y | 52 | In case of doubt, say Y |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index a19bec078703..44cfd1bef89b 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -244,7 +244,7 @@ static int iic_host_map(struct irq_host *h, unsigned int virq, | |||
244 | break; | 244 | break; |
245 | case IIC_IRQ_TYPE_IOEXC: | 245 | case IIC_IRQ_TYPE_IOEXC: |
246 | irq_set_chip_and_handler(virq, &iic_ioexc_chip, | 246 | irq_set_chip_and_handler(virq, &iic_ioexc_chip, |
247 | handle_iic_irq); | 247 | handle_edge_eoi_irq); |
248 | break; | 248 | break; |
249 | default: | 249 | default: |
250 | irq_set_chip_and_handler(virq, &iic_chip, handle_edge_eoi_irq); | 250 | irq_set_chip_and_handler(virq, &iic_chip, handle_edge_eoi_irq); |
diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index 3b894f585280..147069938cfe 100644 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c | |||
@@ -90,7 +90,7 @@ int spu_alloc_lscsa(struct spu_state *csa) | |||
90 | */ | 90 | */ |
91 | for (i = 0; i < SPU_LSCSA_NUM_BIG_PAGES; i++) { | 91 | for (i = 0; i < SPU_LSCSA_NUM_BIG_PAGES; i++) { |
92 | /* XXX This is likely to fail, we should use a special pool | 92 | /* XXX This is likely to fail, we should use a special pool |
93 | * similiar to what hugetlbfs does. | 93 | * similar to what hugetlbfs does. |
94 | */ | 94 | */ |
95 | csa->lscsa_pages[i] = alloc_pages(GFP_KERNEL, | 95 | csa->lscsa_pages[i] = alloc_pages(GFP_KERNEL, |
96 | SPU_64K_PAGE_ORDER); | 96 | SPU_64K_PAGE_ORDER); |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 0b0466284932..65203857b0ce 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -846,7 +846,7 @@ static struct spu_context *grab_runnable_context(int prio, int node) | |||
846 | struct list_head *rq = &spu_prio->runq[best]; | 846 | struct list_head *rq = &spu_prio->runq[best]; |
847 | 847 | ||
848 | list_for_each_entry(ctx, rq, rq) { | 848 | list_for_each_entry(ctx, rq, rq) { |
849 | /* XXX(hch): check for affinity here aswell */ | 849 | /* XXX(hch): check for affinity here as well */ |
850 | if (__node_allowed(ctx, node)) { | 850 | if (__node_allowed(ctx, node)) { |
851 | __spu_del_from_rq(ctx); | 851 | __spu_del_from_rq(ctx); |
852 | goto found; | 852 | goto found; |
diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore.c b/arch/powerpc/platforms/cell/spufs/spu_restore.c index 21a9c952d88b..72c905f1ee7a 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore.c +++ b/arch/powerpc/platforms/cell/spufs/spu_restore.c | |||
@@ -284,7 +284,7 @@ static inline void restore_complete(void) | |||
284 | exit_instrs[3] = BR_INSTR; | 284 | exit_instrs[3] = BR_INSTR; |
285 | break; | 285 | break; |
286 | default: | 286 | default: |
287 | /* SPU_Status[R]=1. No additonal instructions. */ | 287 | /* SPU_Status[R]=1. No additional instructions. */ |
288 | break; | 288 | break; |
289 | } | 289 | } |
290 | spu_sync(); | 290 | spu_sync(); |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index b5e026bdca21..62dabe3c2bfa 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -51,7 +51,7 @@ | |||
51 | static int mf_initialized; | 51 | static int mf_initialized; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * This is the structure layout for the Machine Facilites LPAR event | 54 | * This is the structure layout for the Machine Facilities LPAR event |
55 | * flows. | 55 | * flows. |
56 | */ | 56 | */ |
57 | struct vsp_cmd_data { | 57 | struct vsp_cmd_data { |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index b5f05d943a90..2376069cdc14 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -396,7 +396,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
396 | viopathStatus[remoteLp].mTargetInst)) { | 396 | viopathStatus[remoteLp].mTargetInst)) { |
397 | printk(VIOPATH_KERN_WARN | 397 | printk(VIOPATH_KERN_WARN |
398 | "message from invalid partition. " | 398 | "message from invalid partition. " |
399 | "int msg rcvd, source inst (%d) doesnt match (%d)\n", | 399 | "int msg rcvd, source inst (%d) doesn't match (%d)\n", |
400 | viopathStatus[remoteLp].mTargetInst, | 400 | viopathStatus[remoteLp].mTargetInst, |
401 | event->xSourceInstanceId); | 401 | event->xSourceInstanceId); |
402 | return; | 402 | return; |
@@ -407,7 +407,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
407 | viopathStatus[remoteLp].mSourceInst)) { | 407 | viopathStatus[remoteLp].mSourceInst)) { |
408 | printk(VIOPATH_KERN_WARN | 408 | printk(VIOPATH_KERN_WARN |
409 | "message from invalid partition. " | 409 | "message from invalid partition. " |
410 | "int msg rcvd, target inst (%d) doesnt match (%d)\n", | 410 | "int msg rcvd, target inst (%d) doesn't match (%d)\n", |
411 | viopathStatus[remoteLp].mSourceInst, | 411 | viopathStatus[remoteLp].mSourceInst, |
412 | event->xTargetInstanceId); | 412 | event->xTargetInstanceId); |
413 | return; | 413 | return; |
@@ -418,7 +418,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
418 | viopathStatus[remoteLp].mSourceInst) { | 418 | viopathStatus[remoteLp].mSourceInst) { |
419 | printk(VIOPATH_KERN_WARN | 419 | printk(VIOPATH_KERN_WARN |
420 | "message from invalid partition. " | 420 | "message from invalid partition. " |
421 | "ack msg rcvd, source inst (%d) doesnt match (%d)\n", | 421 | "ack msg rcvd, source inst (%d) doesn't match (%d)\n", |
422 | viopathStatus[remoteLp].mSourceInst, | 422 | viopathStatus[remoteLp].mSourceInst, |
423 | event->xSourceInstanceId); | 423 | event->xSourceInstanceId); |
424 | return; | 424 | return; |
@@ -428,7 +428,7 @@ static void vio_handleEvent(struct HvLpEvent *event) | |||
428 | viopathStatus[remoteLp].mTargetInst) { | 428 | viopathStatus[remoteLp].mTargetInst) { |
429 | printk(VIOPATH_KERN_WARN | 429 | printk(VIOPATH_KERN_WARN |
430 | "message from invalid partition. " | 430 | "message from invalid partition. " |
431 | "viopath: ack msg rcvd, target inst (%d) doesnt match (%d)\n", | 431 | "viopath: ack msg rcvd, target inst (%d) doesn't match (%d)\n", |
432 | viopathStatus[remoteLp].mTargetInst, | 432 | viopathStatus[remoteLp].mTargetInst, |
433 | event->xTargetInstanceId); | 433 | event->xTargetInstanceId); |
434 | return; | 434 | return; |
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index 09695ae50f91..321a9b3a2d00 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c | |||
@@ -379,9 +379,9 @@ void pasemi_dma_free_buf(struct pasemi_dmachan *chan, int size, | |||
379 | } | 379 | } |
380 | EXPORT_SYMBOL(pasemi_dma_free_buf); | 380 | EXPORT_SYMBOL(pasemi_dma_free_buf); |
381 | 381 | ||
382 | /* pasemi_dma_alloc_flag - Allocate a flag (event) for channel syncronization | 382 | /* pasemi_dma_alloc_flag - Allocate a flag (event) for channel synchronization |
383 | * | 383 | * |
384 | * Allocates a flag for use with channel syncronization (event descriptors). | 384 | * Allocates a flag for use with channel synchronization (event descriptors). |
385 | * Returns allocated flag (0-63), < 0 on error. | 385 | * Returns allocated flag (0-63), < 0 on error. |
386 | */ | 386 | */ |
387 | int pasemi_dma_alloc_flag(void) | 387 | int pasemi_dma_alloc_flag(void) |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 50f169392551..ea47df66fee5 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
@@ -11,7 +11,7 @@ obj-y += pic.o setup.o time.o feature.o pci.o \ | |||
11 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o | 11 | obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o |
12 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o | 12 | obj-$(CONFIG_CPU_FREQ_PMAC) += cpufreq_32.o |
13 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o | 13 | obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o |
14 | # CONFIG_NVRAM is an arch. independant tristate symbol, for pmac32 we really | 14 | # CONFIG_NVRAM is an arch. independent tristate symbol, for pmac32 we really |
15 | # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really | 15 | # need this to be a bool. Cheat here and pretend CONFIG_NVRAM=m is really |
16 | # CONFIG_NVRAM=y | 16 | # CONFIG_NVRAM=y |
17 | obj-$(CONFIG_NVRAM:m=y) += nvram.o | 17 | obj-$(CONFIG_NVRAM:m=y) += nvram.o |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 480567e5fa9a..e9c8a607268e 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -904,7 +904,7 @@ static void __init smu_i2c_probe(void) | |||
904 | printk(KERN_INFO "SMU i2c %s\n", controller->full_name); | 904 | printk(KERN_INFO "SMU i2c %s\n", controller->full_name); |
905 | 905 | ||
906 | /* Look for childs, note that they might not be of the right | 906 | /* Look for childs, note that they might not be of the right |
907 | * type as older device trees mix i2c busses and other thigns | 907 | * type as older device trees mix i2c busses and other things |
908 | * at the same level | 908 | * at the same level |
909 | */ | 909 | */ |
910 | for (busnode = NULL; | 910 | for (busnode = NULL; |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index ab6898942700..f33e08d573ce 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -299,7 +299,7 @@ static void __init setup_chaos(struct pci_controller *hose, | |||
299 | * This function deals with some "special cases" devices. | 299 | * This function deals with some "special cases" devices. |
300 | * | 300 | * |
301 | * 0 -> No special case | 301 | * 0 -> No special case |
302 | * 1 -> Skip the device but act as if the access was successfull | 302 | * 1 -> Skip the device but act as if the access was successful |
303 | * (return 0xff's on reads, eventually, cache config space | 303 | * (return 0xff's on reads, eventually, cache config space |
304 | * accesses in a later version) | 304 | * accesses in a later version) |
305 | * -1 -> Hide the device (unsuccessful access) | 305 | * -1 -> Hide the device (unsuccessful access) |
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index f0bc08f6c1f0..20468f49aec0 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h | |||
@@ -33,7 +33,6 @@ extern void pmac_setup_pci_dma(void); | |||
33 | extern void pmac_check_ht_link(void); | 33 | extern void pmac_check_ht_link(void); |
34 | 34 | ||
35 | extern void pmac_setup_smp(void); | 35 | extern void pmac_setup_smp(void); |
36 | extern void pmac32_cpu_die(void); | ||
37 | extern void low_cpu_die(void) __attribute__((noreturn)); | 36 | extern void low_cpu_die(void) __attribute__((noreturn)); |
38 | 37 | ||
39 | extern int pmac_nvram_init(void); | 38 | extern int pmac_nvram_init(void); |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index d5aceb7fb125..aa45281bd296 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -650,51 +650,6 @@ static int pmac_pci_probe_mode(struct pci_bus *bus) | |||
650 | return PCI_PROBE_NORMAL; | 650 | return PCI_PROBE_NORMAL; |
651 | return PCI_PROBE_DEVTREE; | 651 | return PCI_PROBE_DEVTREE; |
652 | } | 652 | } |
653 | |||
654 | #ifdef CONFIG_HOTPLUG_CPU | ||
655 | /* access per cpu vars from generic smp.c */ | ||
656 | DECLARE_PER_CPU(int, cpu_state); | ||
657 | |||
658 | static void pmac64_cpu_die(void) | ||
659 | { | ||
660 | /* | ||
661 | * turn off as much as possible, we'll be | ||
662 | * kicked out as this will only be invoked | ||
663 | * on core99 platforms for now ... | ||
664 | */ | ||
665 | |||
666 | printk(KERN_INFO "CPU#%d offline\n", smp_processor_id()); | ||
667 | __get_cpu_var(cpu_state) = CPU_DEAD; | ||
668 | smp_wmb(); | ||
669 | |||
670 | /* | ||
671 | * during the path that leads here preemption is disabled, | ||
672 | * reenable it now so that when coming up preempt count is | ||
673 | * zero correctly | ||
674 | */ | ||
675 | preempt_enable(); | ||
676 | |||
677 | /* | ||
678 | * hard-disable interrupts for the non-NAP case, the NAP code | ||
679 | * needs to re-enable interrupts (but soft-disables them) | ||
680 | */ | ||
681 | hard_irq_disable(); | ||
682 | |||
683 | while (1) { | ||
684 | /* let's not take timer interrupts too often ... */ | ||
685 | set_dec(0x7fffffff); | ||
686 | |||
687 | /* should always be true at this point */ | ||
688 | if (cpu_has_feature(CPU_FTR_CAN_NAP)) | ||
689 | power4_cpu_offline_powersave(); | ||
690 | else { | ||
691 | HMT_low(); | ||
692 | HMT_very_low(); | ||
693 | } | ||
694 | } | ||
695 | } | ||
696 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
697 | |||
698 | #endif /* CONFIG_PPC64 */ | 653 | #endif /* CONFIG_PPC64 */ |
699 | 654 | ||
700 | define_machine(powermac) { | 655 | define_machine(powermac) { |
@@ -726,15 +681,4 @@ define_machine(powermac) { | |||
726 | .pcibios_after_init = pmac_pcibios_after_init, | 681 | .pcibios_after_init = pmac_pcibios_after_init, |
727 | .phys_mem_access_prot = pci_phys_mem_access_prot, | 682 | .phys_mem_access_prot = pci_phys_mem_access_prot, |
728 | #endif | 683 | #endif |
729 | #ifdef CONFIG_HOTPLUG_CPU | ||
730 | #ifdef CONFIG_PPC64 | ||
731 | .cpu_die = pmac64_cpu_die, | ||
732 | #endif | ||
733 | #ifdef CONFIG_PPC32 | ||
734 | .cpu_die = pmac32_cpu_die, | ||
735 | #endif | ||
736 | #endif | ||
737 | #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) | ||
738 | .cpu_die = generic_mach_cpu_die, | ||
739 | #endif | ||
740 | }; | 684 | }; |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index c95215f4f8b6..bc5f0dc6ae1e 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -840,92 +840,151 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr) | |||
840 | 840 | ||
841 | /* Setup openpic */ | 841 | /* Setup openpic */ |
842 | mpic_setup_this_cpu(); | 842 | mpic_setup_this_cpu(); |
843 | } | ||
843 | 844 | ||
844 | if (cpu_nr == 0) { | ||
845 | #ifdef CONFIG_PPC64 | 845 | #ifdef CONFIG_PPC64 |
846 | extern void g5_phy_disable_cpu1(void); | 846 | #ifdef CONFIG_HOTPLUG_CPU |
847 | static int smp_core99_cpu_notify(struct notifier_block *self, | ||
848 | unsigned long action, void *hcpu) | ||
849 | { | ||
850 | int rc; | ||
847 | 851 | ||
848 | /* Close i2c bus if it was used for tb sync */ | 852 | switch(action) { |
853 | case CPU_UP_PREPARE: | ||
854 | case CPU_UP_PREPARE_FROZEN: | ||
855 | /* Open i2c bus if it was used for tb sync */ | ||
849 | if (pmac_tb_clock_chip_host) { | 856 | if (pmac_tb_clock_chip_host) { |
850 | pmac_i2c_close(pmac_tb_clock_chip_host); | 857 | rc = pmac_i2c_open(pmac_tb_clock_chip_host, 1); |
851 | pmac_tb_clock_chip_host = NULL; | 858 | if (rc) { |
859 | pr_err("Failed to open i2c bus for time sync\n"); | ||
860 | return notifier_from_errno(rc); | ||
861 | } | ||
852 | } | 862 | } |
863 | break; | ||
864 | case CPU_ONLINE: | ||
865 | case CPU_UP_CANCELED: | ||
866 | /* Close i2c bus if it was used for tb sync */ | ||
867 | if (pmac_tb_clock_chip_host) | ||
868 | pmac_i2c_close(pmac_tb_clock_chip_host); | ||
869 | break; | ||
870 | default: | ||
871 | break; | ||
872 | } | ||
873 | return NOTIFY_OK; | ||
874 | } | ||
853 | 875 | ||
854 | /* If we didn't start the second CPU, we must take | 876 | static struct notifier_block __cpuinitdata smp_core99_cpu_nb = { |
855 | * it off the bus | 877 | .notifier_call = smp_core99_cpu_notify, |
856 | */ | 878 | }; |
857 | if (of_machine_is_compatible("MacRISC4") && | 879 | #endif /* CONFIG_HOTPLUG_CPU */ |
858 | num_online_cpus() < 2) | 880 | |
859 | g5_phy_disable_cpu1(); | 881 | static void __init smp_core99_bringup_done(void) |
860 | #endif /* CONFIG_PPC64 */ | 882 | { |
883 | extern void g5_phy_disable_cpu1(void); | ||
861 | 884 | ||
862 | if (ppc_md.progress) | 885 | /* Close i2c bus if it was used for tb sync */ |
863 | ppc_md.progress("core99_setup_cpu 0 done", 0x349); | 886 | if (pmac_tb_clock_chip_host) |
887 | pmac_i2c_close(pmac_tb_clock_chip_host); | ||
888 | |||
889 | /* If we didn't start the second CPU, we must take | ||
890 | * it off the bus. | ||
891 | */ | ||
892 | if (of_machine_is_compatible("MacRISC4") && | ||
893 | num_online_cpus() < 2) { | ||
894 | set_cpu_present(1, false); | ||
895 | g5_phy_disable_cpu1(); | ||
864 | } | 896 | } |
865 | } | 897 | #ifdef CONFIG_HOTPLUG_CPU |
898 | register_cpu_notifier(&smp_core99_cpu_nb); | ||
899 | #endif | ||
866 | 900 | ||
901 | if (ppc_md.progress) | ||
902 | ppc_md.progress("smp_core99_bringup_done", 0x349); | ||
903 | } | ||
904 | #endif /* CONFIG_PPC64 */ | ||
867 | 905 | ||
868 | #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32) | 906 | #ifdef CONFIG_HOTPLUG_CPU |
869 | 907 | ||
870 | int smp_core99_cpu_disable(void) | 908 | static int smp_core99_cpu_disable(void) |
871 | { | 909 | { |
872 | set_cpu_online(smp_processor_id(), false); | 910 | int rc = generic_cpu_disable(); |
911 | if (rc) | ||
912 | return rc; | ||
873 | 913 | ||
874 | /* XXX reset cpu affinity here */ | ||
875 | mpic_cpu_set_priority(0xf); | 914 | mpic_cpu_set_priority(0xf); |
876 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | 915 | |
877 | mb(); | ||
878 | udelay(20); | ||
879 | asm volatile("mtdec %0" : : "r" (0x7fffffff)); | ||
880 | return 0; | 916 | return 0; |
881 | } | 917 | } |
882 | 918 | ||
883 | static int cpu_dead[NR_CPUS]; | 919 | #ifdef CONFIG_PPC32 |
884 | 920 | ||
885 | void pmac32_cpu_die(void) | 921 | static void pmac_cpu_die(void) |
886 | { | 922 | { |
923 | int cpu = smp_processor_id(); | ||
924 | |||
887 | local_irq_disable(); | 925 | local_irq_disable(); |
888 | cpu_dead[smp_processor_id()] = 1; | 926 | idle_task_exit(); |
927 | pr_debug("CPU%d offline\n", cpu); | ||
928 | generic_set_cpu_dead(cpu); | ||
929 | smp_wmb(); | ||
889 | mb(); | 930 | mb(); |
890 | low_cpu_die(); | 931 | low_cpu_die(); |
891 | } | 932 | } |
892 | 933 | ||
893 | void smp_core99_cpu_die(unsigned int cpu) | 934 | #else /* CONFIG_PPC32 */ |
935 | |||
936 | static void pmac_cpu_die(void) | ||
894 | { | 937 | { |
895 | int timeout; | 938 | int cpu = smp_processor_id(); |
896 | 939 | ||
897 | timeout = 1000; | 940 | local_irq_disable(); |
898 | while (!cpu_dead[cpu]) { | 941 | idle_task_exit(); |
899 | if (--timeout == 0) { | 942 | |
900 | printk("CPU %u refused to die!\n", cpu); | 943 | /* |
901 | break; | 944 | * turn off as much as possible, we'll be |
902 | } | 945 | * kicked out as this will only be invoked |
903 | msleep(1); | 946 | * on core99 platforms for now ... |
947 | */ | ||
948 | |||
949 | printk(KERN_INFO "CPU#%d offline\n", cpu); | ||
950 | generic_set_cpu_dead(cpu); | ||
951 | smp_wmb(); | ||
952 | |||
953 | /* | ||
954 | * Re-enable interrupts. The NAP code needs to enable them | ||
955 | * anyways, do it now so we deal with the case where one already | ||
956 | * happened while soft-disabled. | ||
957 | * We shouldn't get any external interrupts, only decrementer, and the | ||
958 | * decrementer handler is safe for use on offline CPUs | ||
959 | */ | ||
960 | local_irq_enable(); | ||
961 | |||
962 | while (1) { | ||
963 | /* let's not take timer interrupts too often ... */ | ||
964 | set_dec(0x7fffffff); | ||
965 | |||
966 | /* Enter NAP mode */ | ||
967 | power4_idle(); | ||
904 | } | 968 | } |
905 | cpu_dead[cpu] = 0; | ||
906 | } | 969 | } |
907 | 970 | ||
908 | #endif /* CONFIG_HOTPLUG_CPU && CONFIG_PP32 */ | 971 | #endif /* else CONFIG_PPC32 */ |
972 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
909 | 973 | ||
910 | /* Core99 Macs (dual G4s and G5s) */ | 974 | /* Core99 Macs (dual G4s and G5s) */ |
911 | struct smp_ops_t core99_smp_ops = { | 975 | struct smp_ops_t core99_smp_ops = { |
912 | .message_pass = smp_mpic_message_pass, | 976 | .message_pass = smp_mpic_message_pass, |
913 | .probe = smp_core99_probe, | 977 | .probe = smp_core99_probe, |
978 | #ifdef CONFIG_PPC64 | ||
979 | .bringup_done = smp_core99_bringup_done, | ||
980 | #endif | ||
914 | .kick_cpu = smp_core99_kick_cpu, | 981 | .kick_cpu = smp_core99_kick_cpu, |
915 | .setup_cpu = smp_core99_setup_cpu, | 982 | .setup_cpu = smp_core99_setup_cpu, |
916 | .give_timebase = smp_core99_give_timebase, | 983 | .give_timebase = smp_core99_give_timebase, |
917 | .take_timebase = smp_core99_take_timebase, | 984 | .take_timebase = smp_core99_take_timebase, |
918 | #if defined(CONFIG_HOTPLUG_CPU) | 985 | #if defined(CONFIG_HOTPLUG_CPU) |
919 | # if defined(CONFIG_PPC32) | ||
920 | .cpu_disable = smp_core99_cpu_disable, | 986 | .cpu_disable = smp_core99_cpu_disable, |
921 | .cpu_die = smp_core99_cpu_die, | ||
922 | # endif | ||
923 | # if defined(CONFIG_PPC64) | ||
924 | .cpu_disable = generic_cpu_disable, | ||
925 | .cpu_die = generic_cpu_die, | 987 | .cpu_die = generic_cpu_die, |
926 | /* intentionally do *NOT* assign cpu_enable, | ||
927 | * the generic code will use kick_cpu then! */ | ||
928 | # endif | ||
929 | #endif | 988 | #endif |
930 | }; | 989 | }; |
931 | 990 | ||
@@ -957,5 +1016,10 @@ void __init pmac_setup_smp(void) | |||
957 | smp_ops = &psurge_smp_ops; | 1016 | smp_ops = &psurge_smp_ops; |
958 | } | 1017 | } |
959 | #endif /* CONFIG_PPC32 */ | 1018 | #endif /* CONFIG_PPC32 */ |
1019 | |||
1020 | #ifdef CONFIG_HOTPLUG_CPU | ||
1021 | ppc_md.cpu_die = pmac_cpu_die; | ||
1022 | #endif | ||
960 | } | 1023 | } |
961 | 1024 | ||
1025 | |||
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index b74a9230edc9..57ceb92b2288 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
@@ -74,7 +74,7 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa) | |||
74 | return NULL; | 74 | return NULL; |
75 | 75 | ||
76 | /* The configure connector reported name does not contain a | 76 | /* The configure connector reported name does not contain a |
77 | * preceeding '/', so we allocate a buffer large enough to | 77 | * preceding '/', so we allocate a buffer large enough to |
78 | * prepend this to the full_name. | 78 | * prepend this to the full_name. |
79 | */ | 79 | */ |
80 | name = (char *)ccwa + ccwa->name_offset; | 80 | name = (char *)ccwa + ccwa->name_offset; |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3cc4d102b1f1..89649173d3a3 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -65,7 +65,7 @@ | |||
65 | * with EEH. | 65 | * with EEH. |
66 | * | 66 | * |
67 | * Ideally, a PCI device driver, when suspecting that an isolation | 67 | * Ideally, a PCI device driver, when suspecting that an isolation |
68 | * event has occured (e.g. by reading 0xff's), will then ask EEH | 68 | * event has occurred (e.g. by reading 0xff's), will then ask EEH |
69 | * whether this is the case, and then take appropriate steps to | 69 | * whether this is the case, and then take appropriate steps to |
70 | * reset the PCI slot, the PCI device, and then resume operations. | 70 | * reset the PCI slot, the PCI device, and then resume operations. |
71 | * However, until that day, the checking is done here, with the | 71 | * However, until that day, the checking is done here, with the |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index fd50ccd4bac1..ef8c45489e20 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -216,7 +216,7 @@ static void pseries_cpu_die(unsigned int cpu) | |||
216 | cpu, pcpu, cpu_status); | 216 | cpu, pcpu, cpu_status); |
217 | } | 217 | } |
218 | 218 | ||
219 | /* Isolation and deallocation are definatly done by | 219 | /* Isolation and deallocation are definitely done by |
220 | * drslot_chrp_cpu. If they were not they would be | 220 | * drslot_chrp_cpu. If they were not they would be |
221 | * done here. Change isolate state to Isolate and | 221 | * done here. Change isolate state to Isolate and |
222 | * change allocation-state to Unusable. | 222 | * change allocation-state to Unusable. |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 154c464cdca5..6d5412a18b26 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -272,7 +272,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) | |||
272 | return tce_ret; | 272 | return tce_ret; |
273 | } | 273 | } |
274 | 274 | ||
275 | /* this is compatable with cells for the device tree property */ | 275 | /* this is compatible with cells for the device tree property */ |
276 | struct dynamic_dma_window_prop { | 276 | struct dynamic_dma_window_prop { |
277 | __be32 liobn; /* tce table number */ | 277 | __be32 liobn; /* tce table number */ |
278 | __be64 dma_base; /* address hi,lo */ | 278 | __be64 dma_base; /* address hi,lo */ |
@@ -976,7 +976,7 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
976 | pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); | 976 | pr_debug("pci_dma_dev_setup_pSeriesLP: %s\n", pci_name(dev)); |
977 | 977 | ||
978 | /* dev setup for LPAR is a little tricky, since the device tree might | 978 | /* dev setup for LPAR is a little tricky, since the device tree might |
979 | * contain the dma-window properties per-device and not neccesarily | 979 | * contain the dma-window properties per-device and not necessarily |
980 | * for the bus. So we need to search upwards in the tree until we | 980 | * for the bus. So we need to search upwards in the tree until we |
981 | * either hit a dma-window property, OR find a parent with a table | 981 | * either hit a dma-window property, OR find a parent with a table |
982 | * already allocated. | 982 | * already allocated. |
@@ -1033,7 +1033,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask) | |||
1033 | 1033 | ||
1034 | /* | 1034 | /* |
1035 | * the device tree might contain the dma-window properties | 1035 | * the device tree might contain the dma-window properties |
1036 | * per-device and not neccesarily for the bus. So we need to | 1036 | * per-device and not necessarily for the bus. So we need to |
1037 | * search upwards in the tree until we either hit a dma-window | 1037 | * search upwards in the tree until we either hit a dma-window |
1038 | * property, OR find a parent with a table already allocated. | 1038 | * property, OR find a parent with a table already allocated. |
1039 | */ | 1039 | */ |
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 419707b07248..00cc3a094885 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
@@ -480,8 +480,32 @@ static void oops_to_nvram(struct kmsg_dumper *dumper, | |||
480 | const char *new_msgs, unsigned long new_len) | 480 | const char *new_msgs, unsigned long new_len) |
481 | { | 481 | { |
482 | static unsigned int oops_count = 0; | 482 | static unsigned int oops_count = 0; |
483 | static bool panicking = false; | ||
483 | size_t text_len; | 484 | size_t text_len; |
484 | 485 | ||
486 | switch (reason) { | ||
487 | case KMSG_DUMP_RESTART: | ||
488 | case KMSG_DUMP_HALT: | ||
489 | case KMSG_DUMP_POWEROFF: | ||
490 | /* These are almost always orderly shutdowns. */ | ||
491 | return; | ||
492 | case KMSG_DUMP_OOPS: | ||
493 | case KMSG_DUMP_KEXEC: | ||
494 | break; | ||
495 | case KMSG_DUMP_PANIC: | ||
496 | panicking = true; | ||
497 | break; | ||
498 | case KMSG_DUMP_EMERG: | ||
499 | if (panicking) | ||
500 | /* Panic report already captured. */ | ||
501 | return; | ||
502 | break; | ||
503 | default: | ||
504 | pr_err("%s: ignoring unrecognized KMSG_DUMP_* reason %d\n", | ||
505 | __FUNCTION__, (int) reason); | ||
506 | return; | ||
507 | } | ||
508 | |||
485 | if (clobbering_unread_rtas_event()) | 509 | if (clobbering_unread_rtas_event()) |
486 | return; | 510 | return; |
487 | 511 | ||
diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h index 75a6f480d931..08672d9136ab 100644 --- a/arch/powerpc/platforms/pseries/offline_states.h +++ b/arch/powerpc/platforms/pseries/offline_states.h | |||
@@ -34,6 +34,4 @@ static inline void set_default_offline_state(int cpu) | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); | 36 | extern enum cpu_state_vals get_preferred_offline_state(int cpu); |
37 | extern int start_secondary(void); | ||
38 | extern void start_secondary_resume(void); | ||
39 | #endif | 37 | #endif |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c319d04aa799..6c42cfde8415 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -287,14 +287,22 @@ static int alloc_dispatch_logs(void) | |||
287 | int cpu, ret; | 287 | int cpu, ret; |
288 | struct paca_struct *pp; | 288 | struct paca_struct *pp; |
289 | struct dtl_entry *dtl; | 289 | struct dtl_entry *dtl; |
290 | struct kmem_cache *dtl_cache; | ||
290 | 291 | ||
291 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) | 292 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
292 | return 0; | 293 | return 0; |
293 | 294 | ||
295 | dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES, | ||
296 | DISPATCH_LOG_BYTES, 0, NULL); | ||
297 | if (!dtl_cache) { | ||
298 | pr_warn("Failed to create dispatch trace log buffer cache\n"); | ||
299 | pr_warn("Stolen time statistics will be unreliable\n"); | ||
300 | return 0; | ||
301 | } | ||
302 | |||
294 | for_each_possible_cpu(cpu) { | 303 | for_each_possible_cpu(cpu) { |
295 | pp = &paca[cpu]; | 304 | pp = &paca[cpu]; |
296 | dtl = kmalloc_node(DISPATCH_LOG_BYTES, GFP_KERNEL, | 305 | dtl = kmem_cache_alloc(dtl_cache, GFP_KERNEL); |
297 | cpu_to_node(cpu)); | ||
298 | if (!dtl) { | 306 | if (!dtl) { |
299 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", | 307 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", |
300 | cpu); | 308 | cpu); |
@@ -378,7 +386,7 @@ static int __init pSeries_init_panel(void) | |||
378 | 386 | ||
379 | return 0; | 387 | return 0; |
380 | } | 388 | } |
381 | arch_initcall(pSeries_init_panel); | 389 | machine_arch_initcall(pseries, pSeries_init_panel); |
382 | 390 | ||
383 | static int pseries_set_dabr(unsigned long dabr) | 391 | static int pseries_set_dabr(unsigned long dabr) |
384 | { | 392 | { |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 0317cce877c6..a509c5292a67 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -64,8 +64,8 @@ int smp_query_cpu_stopped(unsigned int pcpu) | |||
64 | int qcss_tok = rtas_token("query-cpu-stopped-state"); | 64 | int qcss_tok = rtas_token("query-cpu-stopped-state"); |
65 | 65 | ||
66 | if (qcss_tok == RTAS_UNKNOWN_SERVICE) { | 66 | if (qcss_tok == RTAS_UNKNOWN_SERVICE) { |
67 | printk(KERN_INFO "Firmware doesn't support " | 67 | printk_once(KERN_INFO |
68 | "query-cpu-stopped-state\n"); | 68 | "Firmware doesn't support query-cpu-stopped-state\n"); |
69 | return QCSS_HARDWARE_ERROR; | 69 | return QCSS_HARDWARE_ERROR; |
70 | } | 70 | } |
71 | 71 | ||
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
112 | 112 | ||
113 | /* Fixup atomic count: it exited inside IRQ handler. */ | 113 | /* Fixup atomic count: it exited inside IRQ handler. */ |
114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; | 114 | task_thread_info(paca[lcpu].__current)->preempt_count = 0; |
115 | 115 | #ifdef CONFIG_HOTPLUG_CPU | |
116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) | 116 | if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) |
117 | goto out; | 117 | goto out; |
118 | 118 | #endif | |
119 | /* | 119 | /* |
120 | * If the RTAS start-cpu token does not exist then presume the | 120 | * If the RTAS start-cpu token does not exist then presume the |
121 | * cpu is already spinning. | 121 | * cpu is already spinning. |
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | #ifdef CONFIG_HOTPLUG_CPU | ||
133 | out: | 134 | out: |
135 | #endif | ||
134 | return 1; | 136 | return 1; |
135 | } | 137 | } |
136 | 138 | ||
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu) | |||
144 | vpa_init(cpu); | 146 | vpa_init(cpu); |
145 | 147 | ||
146 | cpumask_clear_cpu(cpu, of_spin_mask); | 148 | cpumask_clear_cpu(cpu, of_spin_mask); |
149 | #ifdef CONFIG_HOTPLUG_CPU | ||
147 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); | 150 | set_cpu_current_state(cpu, CPU_STATE_ONLINE); |
148 | set_default_offline_state(cpu); | 151 | set_default_offline_state(cpu); |
149 | 152 | #endif | |
150 | } | 153 | } |
151 | #endif /* CONFIG_XICS */ | 154 | #endif /* CONFIG_XICS */ |
152 | 155 | ||
153 | static void __devinit smp_pSeries_kick_cpu(int nr) | 156 | static void __devinit smp_pSeries_kick_cpu(int nr) |
154 | { | 157 | { |
155 | long rc; | ||
156 | unsigned long hcpuid; | ||
157 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 158 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
158 | 159 | ||
159 | if (!smp_startup_cpu(nr)) | 160 | if (!smp_startup_cpu(nr)) |
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr) | |||
165 | * the processor will continue on to secondary_start | 166 | * the processor will continue on to secondary_start |
166 | */ | 167 | */ |
167 | paca[nr].cpu_start = 1; | 168 | paca[nr].cpu_start = 1; |
168 | 169 | #ifdef CONFIG_HOTPLUG_CPU | |
169 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); | 170 | set_preferred_offline_state(nr, CPU_STATE_ONLINE); |
170 | 171 | ||
171 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { | 172 | if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { |
173 | long rc; | ||
174 | unsigned long hcpuid; | ||
175 | |||
172 | hcpuid = get_hard_smp_processor_id(nr); | 176 | hcpuid = get_hard_smp_processor_id(nr); |
173 | rc = plpar_hcall_norets(H_PROD, hcpuid); | 177 | rc = plpar_hcall_norets(H_PROD, hcpuid); |
174 | if (rc != H_SUCCESS) | 178 | if (rc != H_SUCCESS) |
175 | printk(KERN_ERR "Error: Prod to wake up processor %d " | 179 | printk(KERN_ERR "Error: Prod to wake up processor %d " |
176 | "Ret= %ld\n", nr, rc); | 180 | "Ret= %ld\n", nr, rc); |
177 | } | 181 | } |
182 | #endif | ||
178 | } | 183 | } |
179 | 184 | ||
180 | static int smp_pSeries_cpu_bootable(unsigned int nr) | 185 | static int smp_pSeries_cpu_bootable(unsigned int nr) |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 6c1e638f0ce9..d6901334d66e 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -204,33 +204,33 @@ static int get_irq_server(unsigned int virq, const struct cpumask *cpumask, | |||
204 | 204 | ||
205 | static void xics_unmask_irq(struct irq_data *d) | 205 | static void xics_unmask_irq(struct irq_data *d) |
206 | { | 206 | { |
207 | unsigned int irq; | 207 | unsigned int hwirq; |
208 | int call_status; | 208 | int call_status; |
209 | int server; | 209 | int server; |
210 | 210 | ||
211 | pr_devel("xics: unmask virq %d\n", d->irq); | 211 | pr_devel("xics: unmask virq %d\n", d->irq); |
212 | 212 | ||
213 | irq = (unsigned int)irq_map[d->irq].hwirq; | 213 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
214 | pr_devel(" -> map to hwirq 0x%x\n", irq); | 214 | pr_devel(" -> map to hwirq 0x%x\n", hwirq); |
215 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 215 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
216 | return; | 216 | return; |
217 | 217 | ||
218 | server = get_irq_server(d->irq, d->affinity, 0); | 218 | server = get_irq_server(d->irq, d->affinity, 0); |
219 | 219 | ||
220 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, | 220 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hwirq, server, |
221 | DEFAULT_PRIORITY); | 221 | DEFAULT_PRIORITY); |
222 | if (call_status != 0) { | 222 | if (call_status != 0) { |
223 | printk(KERN_ERR | 223 | printk(KERN_ERR |
224 | "%s: ibm_set_xive irq %u server %x returned %d\n", | 224 | "%s: ibm_set_xive irq %u server %x returned %d\n", |
225 | __func__, irq, server, call_status); | 225 | __func__, hwirq, server, call_status); |
226 | return; | 226 | return; |
227 | } | 227 | } |
228 | 228 | ||
229 | /* Now unmask the interrupt (often a no-op) */ | 229 | /* Now unmask the interrupt (often a no-op) */ |
230 | call_status = rtas_call(ibm_int_on, 1, 1, NULL, irq); | 230 | call_status = rtas_call(ibm_int_on, 1, 1, NULL, hwirq); |
231 | if (call_status != 0) { | 231 | if (call_status != 0) { |
232 | printk(KERN_ERR "%s: ibm_int_on irq=%u returned %d\n", | 232 | printk(KERN_ERR "%s: ibm_int_on irq=%u returned %d\n", |
233 | __func__, irq, call_status); | 233 | __func__, hwirq, call_status); |
234 | return; | 234 | return; |
235 | } | 235 | } |
236 | } | 236 | } |
@@ -250,46 +250,46 @@ static unsigned int xics_startup(struct irq_data *d) | |||
250 | return 0; | 250 | return 0; |
251 | } | 251 | } |
252 | 252 | ||
253 | static void xics_mask_real_irq(struct irq_data *d) | 253 | static void xics_mask_real_irq(unsigned int hwirq) |
254 | { | 254 | { |
255 | int call_status; | 255 | int call_status; |
256 | 256 | ||
257 | if (d->irq == XICS_IPI) | 257 | if (hwirq == XICS_IPI) |
258 | return; | 258 | return; |
259 | 259 | ||
260 | call_status = rtas_call(ibm_int_off, 1, 1, NULL, d->irq); | 260 | call_status = rtas_call(ibm_int_off, 1, 1, NULL, hwirq); |
261 | if (call_status != 0) { | 261 | if (call_status != 0) { |
262 | printk(KERN_ERR "%s: ibm_int_off irq=%u returned %d\n", | 262 | printk(KERN_ERR "%s: ibm_int_off irq=%u returned %d\n", |
263 | __func__, d->irq, call_status); | 263 | __func__, hwirq, call_status); |
264 | return; | 264 | return; |
265 | } | 265 | } |
266 | 266 | ||
267 | /* Have to set XIVE to 0xff to be able to remove a slot */ | 267 | /* Have to set XIVE to 0xff to be able to remove a slot */ |
268 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, d->irq, | 268 | call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hwirq, |
269 | default_server, 0xff); | 269 | default_server, 0xff); |
270 | if (call_status != 0) { | 270 | if (call_status != 0) { |
271 | printk(KERN_ERR "%s: ibm_set_xive(0xff) irq=%u returned %d\n", | 271 | printk(KERN_ERR "%s: ibm_set_xive(0xff) irq=%u returned %d\n", |
272 | __func__, d->irq, call_status); | 272 | __func__, hwirq, call_status); |
273 | return; | 273 | return; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
277 | static void xics_mask_irq(struct irq_data *d) | 277 | static void xics_mask_irq(struct irq_data *d) |
278 | { | 278 | { |
279 | unsigned int irq; | 279 | unsigned int hwirq; |
280 | 280 | ||
281 | pr_devel("xics: mask virq %d\n", d->irq); | 281 | pr_devel("xics: mask virq %d\n", d->irq); |
282 | 282 | ||
283 | irq = (unsigned int)irq_map[d->irq].hwirq; | 283 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
284 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 284 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
285 | return; | 285 | return; |
286 | xics_mask_real_irq(d); | 286 | xics_mask_real_irq(hwirq); |
287 | } | 287 | } |
288 | 288 | ||
289 | static void xics_mask_unknown_vec(unsigned int vec) | 289 | static void xics_mask_unknown_vec(unsigned int vec) |
290 | { | 290 | { |
291 | printk(KERN_ERR "Interrupt %u (real) is invalid, disabling it.\n", vec); | 291 | printk(KERN_ERR "Interrupt %u (real) is invalid, disabling it.\n", vec); |
292 | xics_mask_real_irq(irq_get_irq_data(vec)); | 292 | xics_mask_real_irq(vec); |
293 | } | 293 | } |
294 | 294 | ||
295 | static inline unsigned int xics_xirr_vector(unsigned int xirr) | 295 | static inline unsigned int xics_xirr_vector(unsigned int xirr) |
@@ -373,37 +373,37 @@ static unsigned char pop_cppr(void) | |||
373 | 373 | ||
374 | static void xics_eoi_direct(struct irq_data *d) | 374 | static void xics_eoi_direct(struct irq_data *d) |
375 | { | 375 | { |
376 | unsigned int irq = (unsigned int)irq_map[d->irq].hwirq; | 376 | unsigned int hwirq = (unsigned int)irq_map[d->irq].hwirq; |
377 | 377 | ||
378 | iosync(); | 378 | iosync(); |
379 | direct_xirr_info_set((pop_cppr() << 24) | irq); | 379 | direct_xirr_info_set((pop_cppr() << 24) | hwirq); |
380 | } | 380 | } |
381 | 381 | ||
382 | static void xics_eoi_lpar(struct irq_data *d) | 382 | static void xics_eoi_lpar(struct irq_data *d) |
383 | { | 383 | { |
384 | unsigned int irq = (unsigned int)irq_map[d->irq].hwirq; | 384 | unsigned int hwirq = (unsigned int)irq_map[d->irq].hwirq; |
385 | 385 | ||
386 | iosync(); | 386 | iosync(); |
387 | lpar_xirr_info_set((pop_cppr() << 24) | irq); | 387 | lpar_xirr_info_set((pop_cppr() << 24) | hwirq); |
388 | } | 388 | } |
389 | 389 | ||
390 | static int | 390 | static int |
391 | xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) | 391 | xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) |
392 | { | 392 | { |
393 | unsigned int irq; | 393 | unsigned int hwirq; |
394 | int status; | 394 | int status; |
395 | int xics_status[2]; | 395 | int xics_status[2]; |
396 | int irq_server; | 396 | int irq_server; |
397 | 397 | ||
398 | irq = (unsigned int)irq_map[d->irq].hwirq; | 398 | hwirq = (unsigned int)irq_map[d->irq].hwirq; |
399 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 399 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
400 | return -1; | 400 | return -1; |
401 | 401 | ||
402 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); | 402 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, hwirq); |
403 | 403 | ||
404 | if (status) { | 404 | if (status) { |
405 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", | 405 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", |
406 | __func__, irq, status); | 406 | __func__, hwirq, status); |
407 | return -1; | 407 | return -1; |
408 | } | 408 | } |
409 | 409 | ||
@@ -418,11 +418,11 @@ xics_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool force) | |||
418 | } | 418 | } |
419 | 419 | ||
420 | status = rtas_call(ibm_set_xive, 3, 1, NULL, | 420 | status = rtas_call(ibm_set_xive, 3, 1, NULL, |
421 | irq, irq_server, xics_status[1]); | 421 | hwirq, irq_server, xics_status[1]); |
422 | 422 | ||
423 | if (status) { | 423 | if (status) { |
424 | printk(KERN_ERR "%s: ibm,set-xive irq=%u returns %d\n", | 424 | printk(KERN_ERR "%s: ibm,set-xive irq=%u returns %d\n", |
425 | __func__, irq, status); | 425 | __func__, hwirq, status); |
426 | return -1; | 426 | return -1; |
427 | } | 427 | } |
428 | 428 | ||
@@ -874,7 +874,7 @@ void xics_kexec_teardown_cpu(int secondary) | |||
874 | void xics_migrate_irqs_away(void) | 874 | void xics_migrate_irqs_away(void) |
875 | { | 875 | { |
876 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); | 876 | int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id(); |
877 | unsigned int irq, virq; | 877 | int virq; |
878 | 878 | ||
879 | /* If we used to be the default server, move to the new "boot_cpuid" */ | 879 | /* If we used to be the default server, move to the new "boot_cpuid" */ |
880 | if (hw_cpu == default_server) | 880 | if (hw_cpu == default_server) |
@@ -892,18 +892,19 @@ void xics_migrate_irqs_away(void) | |||
892 | for_each_irq(virq) { | 892 | for_each_irq(virq) { |
893 | struct irq_desc *desc; | 893 | struct irq_desc *desc; |
894 | struct irq_chip *chip; | 894 | struct irq_chip *chip; |
895 | unsigned int hwirq; | ||
895 | int xics_status[2]; | 896 | int xics_status[2]; |
896 | int status; | 897 | int status; |
897 | unsigned long flags; | 898 | unsigned long flags; |
898 | 899 | ||
899 | /* We cant set affinity on ISA interrupts */ | 900 | /* We can't set affinity on ISA interrupts */ |
900 | if (virq < NUM_ISA_INTERRUPTS) | 901 | if (virq < NUM_ISA_INTERRUPTS) |
901 | continue; | 902 | continue; |
902 | if (irq_map[virq].host != xics_host) | 903 | if (irq_map[virq].host != xics_host) |
903 | continue; | 904 | continue; |
904 | irq = (unsigned int)irq_map[virq].hwirq; | 905 | hwirq = (unsigned int)irq_map[virq].hwirq; |
905 | /* We need to get IPIs still. */ | 906 | /* We need to get IPIs still. */ |
906 | if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) | 907 | if (hwirq == XICS_IPI || hwirq == XICS_IRQ_SPURIOUS) |
907 | continue; | 908 | continue; |
908 | 909 | ||
909 | desc = irq_to_desc(virq); | 910 | desc = irq_to_desc(virq); |
@@ -918,10 +919,10 @@ void xics_migrate_irqs_away(void) | |||
918 | 919 | ||
919 | raw_spin_lock_irqsave(&desc->lock, flags); | 920 | raw_spin_lock_irqsave(&desc->lock, flags); |
920 | 921 | ||
921 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); | 922 | status = rtas_call(ibm_get_xive, 1, 3, xics_status, hwirq); |
922 | if (status) { | 923 | if (status) { |
923 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", | 924 | printk(KERN_ERR "%s: ibm,get-xive irq=%u returns %d\n", |
924 | __func__, irq, status); | 925 | __func__, hwirq, status); |
925 | goto unlock; | 926 | goto unlock; |
926 | } | 927 | } |
927 | 928 | ||
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 27402c7d309d..1636dd896707 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -95,7 +95,7 @@ axon_ram_irq_handler(int irq, void *dev) | |||
95 | 95 | ||
96 | BUG_ON(!bank); | 96 | BUG_ON(!bank); |
97 | 97 | ||
98 | dev_err(&device->dev, "Correctable memory error occured\n"); | 98 | dev_err(&device->dev, "Correctable memory error occurred\n"); |
99 | bank->ecc_counter++; | 99 | bank->ecc_counter++; |
100 | return IRQ_HANDLED; | 100 | return IRQ_HANDLED; |
101 | } | 101 | } |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.h b/arch/powerpc/sysdev/bestcomm/bestcomm.h index 23a95f80dfdb..a0e2e6b19b57 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.h +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * struct bcom_bd - Structure describing a generic BestComm buffer descriptor | 20 | * struct bcom_bd - Structure describing a generic BestComm buffer descriptor |
21 | * @status: The current status of this buffer. Exact meaning depends on the | 21 | * @status: The current status of this buffer. Exact meaning depends on the |
22 | * task type | 22 | * task type |
23 | * @data: An array of u32 extra data. Size of array is task dependant. | 23 | * @data: An array of u32 extra data. Size of array is task dependent. |
24 | * | 24 | * |
25 | * Note: Don't dereference a bcom_bd pointer as an array. The size of the | 25 | * Note: Don't dereference a bcom_bd pointer as an array. The size of the |
26 | * bcom_bd is variable. Use bcom_get_bd() instead. | 26 | * bcom_bd is variable. Use bcom_get_bd() instead. |
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h index eb0d1c883c31..3b52f3ffbdf8 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h +++ b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h | |||
@@ -97,7 +97,7 @@ struct bcom_task_header { | |||
97 | u8 reserved[8]; | 97 | u8 reserved[8]; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Descriptors stucture & co */ | 100 | /* Descriptors structure & co */ |
101 | #define BCOM_DESC_NOP 0x000001f8 | 101 | #define BCOM_DESC_NOP 0x000001f8 |
102 | #define BCOM_LCD_MASK 0x80000000 | 102 | #define BCOM_LCD_MASK 0x80000000 |
103 | #define BCOM_DRD_EXTENDED 0x40000000 | 103 | #define BCOM_DRD_EXTENDED 0x40000000 |
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index 8b5aba263323..e0bc944eb23f 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
@@ -223,7 +223,7 @@ void __init cpm_reset(void) | |||
223 | 223 | ||
224 | /* Set SDMA Bus Request priority 5. | 224 | /* Set SDMA Bus Request priority 5. |
225 | * On 860T, this also enables FEC priority 6. I am not sure | 225 | * On 860T, this also enables FEC priority 6. I am not sure |
226 | * this is what we realy want for some applications, but the | 226 | * this is what we really want for some applications, but the |
227 | * manual recommends it. | 227 | * manual recommends it. |
228 | * Bit 25, FAM can also be set to use FEC aggressive mode (860T). | 228 | * Bit 25, FAM can also be set to use FEC aggressive mode (860T). |
229 | */ | 229 | */ |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index f8f7f28c6343..68ca9290df94 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -324,6 +324,11 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) | |||
324 | struct resource rsrc; | 324 | struct resource rsrc; |
325 | const int *bus_range; | 325 | const int *bus_range; |
326 | 326 | ||
327 | if (!of_device_is_available(dev)) { | ||
328 | pr_warning("%s: disabled\n", dev->full_name); | ||
329 | return -ENODEV; | ||
330 | } | ||
331 | |||
327 | pr_debug("Adding PCI host bridge %s\n", dev->full_name); | 332 | pr_debug("Adding PCI host bridge %s\n", dev->full_name); |
328 | 333 | ||
329 | /* Fetch host bridge registers address */ | 334 | /* Fetch host bridge registers address */ |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 14232d57369c..49798532b477 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1457,7 +1457,6 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1457 | port->ops = ops; | 1457 | port->ops = ops; |
1458 | port->priv = priv; | 1458 | port->priv = priv; |
1459 | port->phys_efptr = 0x100; | 1459 | port->phys_efptr = 0x100; |
1460 | rio_register_mport(port); | ||
1461 | 1460 | ||
1462 | priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); | 1461 | priv->regs_win = ioremap(regs.start, regs.end - regs.start + 1); |
1463 | rio_regs_win = priv->regs_win; | 1462 | rio_regs_win = priv->regs_win; |
@@ -1504,6 +1503,9 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1504 | dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", | 1503 | dev_info(&dev->dev, "RapidIO Common Transport System size: %d\n", |
1505 | port->sys_size ? 65536 : 256); | 1504 | port->sys_size ? 65536 : 256); |
1506 | 1505 | ||
1506 | if (rio_register_mport(port)) | ||
1507 | goto err; | ||
1508 | |||
1507 | if (port->host_deviceid >= 0) | 1509 | if (port->host_deviceid >= 0) |
1508 | out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST | | 1510 | out_be32(priv->regs_win + RIO_GCCSR, RIO_PORT_GEN_HOST | |
1509 | RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED); | 1511 | RIO_PORT_GEN_MASTER | RIO_PORT_GEN_DISCOVERED); |
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index 7ed809676642..82fdad885d20 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -117,7 +117,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
117 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | | 117 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | |
118 | (devfn << 8) | reg | cfg_type)); | 118 | (devfn << 8) | reg | cfg_type)); |
119 | 119 | ||
120 | /* surpress setting of PCI_PRIMARY_BUS */ | 120 | /* suppress setting of PCI_PRIMARY_BUS */ |
121 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) | 121 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) |
122 | if ((offset == PCI_PRIMARY_BUS) && | 122 | if ((offset == PCI_PRIMARY_BUS) && |
123 | (bus->number == hose->first_busno)) | 123 | (bus->number == hose->first_busno)) |
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c index f550e23632f8..a88800ff4d01 100644 --- a/arch/powerpc/sysdev/mpc8xx_pic.c +++ b/arch/powerpc/sysdev/mpc8xx_pic.c | |||
@@ -80,7 +80,7 @@ static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type) | |||
80 | if ((hw & 1) == 0) { | 80 | if ((hw & 1) == 0) { |
81 | siel |= (0x80000000 >> hw); | 81 | siel |= (0x80000000 >> hw); |
82 | out_be32(&siu_reg->sc_siel, siel); | 82 | out_be32(&siu_reg->sc_siel, siel); |
83 | __irq_set_handler_locked(irq, handle_edge_irq); | 83 | __irq_set_handler_locked(d->irq, handle_edge_irq); |
84 | } | 84 | } |
85 | } | 85 | } |
86 | return 0; | 86 | return 0; |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h index 56d9e5deccbf..c39a134e8684 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.h +++ b/arch/powerpc/sysdev/ppc4xx_pci.h | |||
@@ -324,7 +324,7 @@ | |||
324 | #define PESDR0_460EX_IHS2 0x036D | 324 | #define PESDR0_460EX_IHS2 0x036D |
325 | 325 | ||
326 | /* | 326 | /* |
327 | * 460SX addtional DCRs | 327 | * 460SX additional DCRs |
328 | */ | 328 | */ |
329 | #define PESDRn_460SX_RCEI 0x02 | 329 | #define PESDRn_460SX_RCEI 0x02 |
330 | 330 | ||
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index 975e3ab13cb5..8b16c479585b 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c | |||
@@ -76,7 +76,7 @@ static void prng_seed(int nbytes) | |||
76 | 76 | ||
77 | /* Add the entropy */ | 77 | /* Add the entropy */ |
78 | while (nbytes >= 8) { | 78 | while (nbytes >= 8) { |
79 | *((__u64 *)parm_block) ^= *((__u64 *)buf+i*8); | 79 | *((__u64 *)parm_block) ^= *((__u64 *)(buf+i)); |
80 | prng_add_entropy(); | 80 | prng_add_entropy(); |
81 | i += 8; | 81 | i += 8; |
82 | nbytes -= 8; | 82 | nbytes -= 8; |
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h index 5c5ba10384c2..d9db13810d15 100644 --- a/arch/s390/include/asm/atomic.h +++ b/arch/s390/include/asm/atomic.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Atomic operations that C can't guarantee us. | 10 | * Atomic operations that C can't guarantee us. |
11 | * Useful for resource counting etc. | 11 | * Useful for resource counting etc. |
12 | * s390 uses 'Compare And Swap' for atomicity in SMP enviroment. | 12 | * s390 uses 'Compare And Swap' for atomicity in SMP environment. |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
diff --git a/arch/s390/include/asm/cio.h b/arch/s390/include/asm/cio.h index e34347d567a6..fc50a3342da3 100644 --- a/arch/s390/include/asm/cio.h +++ b/arch/s390/include/asm/cio.h | |||
@@ -183,7 +183,7 @@ struct esw3 { | |||
183 | * The irb that is handed to the device driver when an interrupt occurs. For | 183 | * The irb that is handed to the device driver when an interrupt occurs. For |
184 | * solicited interrupts, the common I/O layer already performs checks whether | 184 | * solicited interrupts, the common I/O layer already performs checks whether |
185 | * a field is valid; a field not being valid is always passed as %0. | 185 | * a field is valid; a field not being valid is always passed as %0. |
186 | * If a unit check occured, @ecw may contain sense data; this is retrieved | 186 | * If a unit check occurred, @ecw may contain sense data; this is retrieved |
187 | * by the common I/O layer itself if the device doesn't support concurrent | 187 | * by the common I/O layer itself if the device doesn't support concurrent |
188 | * sense (so that the device driver never needs to perform basic sene itself). | 188 | * sense (so that the device driver never needs to perform basic sene itself). |
189 | * For unsolicited interrupts, the irb is passed as-is (expect for sense data, | 189 | * For unsolicited interrupts, the irb is passed as-is (expect for sense data, |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 7061398341d5..fb317bf2c378 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -460,7 +460,7 @@ startup: | |||
460 | #ifndef CONFIG_MARCH_G5 | 460 | #ifndef CONFIG_MARCH_G5 |
461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} | 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} |
462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST |
463 | stfl __LC_STFL_FAC_LIST # store facility list | 463 | .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list |
464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? | 464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? |
465 | jz 0f | 465 | jz 0f |
466 | la %r0,0 | 466 | la %r0,0 |
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S index 5e73dee63baa..9eabbc90795d 100644 --- a/arch/s390/kernel/reipl64.S +++ b/arch/s390/kernel/reipl64.S | |||
@@ -78,7 +78,7 @@ do_reipl_asm: basr %r13,0 | |||
78 | * in the ESA psw. | 78 | * in the ESA psw. |
79 | * Bit 31 of the addresses has to be 0 for the | 79 | * Bit 31 of the addresses has to be 0 for the |
80 | * 31bit lpswe instruction a fact they appear to have | 80 | * 31bit lpswe instruction a fact they appear to have |
81 | * ommited from the pop. | 81 | * omitted from the pop. |
82 | */ | 82 | */ |
83 | .Lnewpsw: .quad 0x0000000080000000 | 83 | .Lnewpsw: .quad 0x0000000080000000 |
84 | .quad .Lpg1 | 84 | .quad .Lpg1 |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index ed183c2c6168..f5434d1ecb31 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -708,7 +708,7 @@ static void __init setup_hwcaps(void) | |||
708 | * and 1ULL<<0 as bit 63. Bits 0-31 contain the same information | 708 | * and 1ULL<<0 as bit 63. Bits 0-31 contain the same information |
709 | * as stored by stfl, bits 32-xxx contain additional facilities. | 709 | * as stored by stfl, bits 32-xxx contain additional facilities. |
710 | * How many facility words are stored depends on the number of | 710 | * How many facility words are stored depends on the number of |
711 | * doublewords passed to the instruction. The additional facilites | 711 | * doublewords passed to the instruction. The additional facilities |
712 | * are: | 712 | * are: |
713 | * Bit 42: decimal floating point facility is installed | 713 | * Bit 42: decimal floating point facility is installed |
714 | * Bit 44: perform floating point operation facility is installed | 714 | * Bit 44: perform floating point operation facility is installed |
diff --git a/arch/s390/kernel/switch_cpu.S b/arch/s390/kernel/switch_cpu.S index 469f11b574fa..20530dd2eab1 100644 --- a/arch/s390/kernel/switch_cpu.S +++ b/arch/s390/kernel/switch_cpu.S | |||
@@ -46,7 +46,9 @@ smp_restart_cpu: | |||
46 | ltr %r4,%r4 /* New stack ? */ | 46 | ltr %r4,%r4 /* New stack ? */ |
47 | jz 1f | 47 | jz 1f |
48 | lr %r15,%r4 | 48 | lr %r15,%r4 |
49 | 1: basr %r14,%r2 | 49 | 1: lr %r14,%r2 /* r14: Function to call */ |
50 | lr %r2,%r3 /* r2 : Parameter for function*/ | ||
51 | basr %r14,%r14 /* Call function */ | ||
50 | 52 | ||
51 | .gprregs_addr: | 53 | .gprregs_addr: |
52 | .long .gprregs | 54 | .long .gprregs |
diff --git a/arch/s390/kernel/switch_cpu64.S b/arch/s390/kernel/switch_cpu64.S index d94aacc898cb..5be3f43898f9 100644 --- a/arch/s390/kernel/switch_cpu64.S +++ b/arch/s390/kernel/switch_cpu64.S | |||
@@ -42,7 +42,9 @@ smp_restart_cpu: | |||
42 | ltgr %r4,%r4 /* New stack ? */ | 42 | ltgr %r4,%r4 /* New stack ? */ |
43 | jz 1f | 43 | jz 1f |
44 | lgr %r15,%r4 | 44 | lgr %r15,%r4 |
45 | 1: basr %r14,%r2 | 45 | 1: lgr %r14,%r2 /* r14: Function to call */ |
46 | lgr %r2,%r3 /* r2 : Parameter for function*/ | ||
47 | basr %r14,%r14 /* Call function */ | ||
46 | 48 | ||
47 | .section .data,"aw",@progbits | 49 | .section .data,"aw",@progbits |
48 | .gprregs: | 50 | .gprregs: |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 9e7b039458da..87be655557aa 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -724,7 +724,7 @@ static void clock_sync_cpu(struct clock_sync_data *sync) | |||
724 | } | 724 | } |
725 | 725 | ||
726 | /* | 726 | /* |
727 | * Sync the TOD clock using the port refered to by aibp. This port | 727 | * Sync the TOD clock using the port referred to by aibp. This port |
728 | * has to be enabled and the other port has to be disabled. The | 728 | * has to be enabled and the other port has to be disabled. The |
729 | * last eacr update has to be more than 1.6 seconds in the past. | 729 | * last eacr update has to be more than 1.6 seconds in the past. |
730 | */ | 730 | */ |
@@ -1012,7 +1012,7 @@ static void etr_work_fn(struct work_struct *work) | |||
1012 | eacr = etr_handle_update(&aib, eacr); | 1012 | eacr = etr_handle_update(&aib, eacr); |
1013 | 1013 | ||
1014 | /* | 1014 | /* |
1015 | * Select ports to enable. The prefered synchronization mode is PPS. | 1015 | * Select ports to enable. The preferred synchronization mode is PPS. |
1016 | * If a port can be enabled depends on a number of things: | 1016 | * If a port can be enabled depends on a number of things: |
1017 | * 1) The port needs to be online and uptodate. A port is not | 1017 | * 1) The port needs to be online and uptodate. A port is not |
1018 | * disabled just because it is not uptodate, but it is only | 1018 | * disabled just because it is not uptodate, but it is only |
@@ -1091,7 +1091,7 @@ static void etr_work_fn(struct work_struct *work) | |||
1091 | /* | 1091 | /* |
1092 | * Update eacr and try to synchronize the clock. If the update | 1092 | * Update eacr and try to synchronize the clock. If the update |
1093 | * of eacr caused a stepping port switch (or if we have to | 1093 | * of eacr caused a stepping port switch (or if we have to |
1094 | * assume that a stepping port switch has occured) or the | 1094 | * assume that a stepping port switch has occurred) or the |
1095 | * clock syncing failed, reset the sync check control bit | 1095 | * clock syncing failed, reset the sync check control bit |
1096 | * and set up a timer to try again after 0.5 seconds | 1096 | * and set up a timer to try again after 0.5 seconds |
1097 | */ | 1097 | */ |
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 1ccdf4d8aa85..5e8ead4b4aba 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -44,7 +44,7 @@ static inline void set_vtimer(__u64 expires) | |||
44 | __u64 timer; | 44 | __u64 timer; |
45 | 45 | ||
46 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ | 46 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ |
47 | " SPT %1" /* Set new value immediatly afterwards */ | 47 | " SPT %1" /* Set new value immediately afterwards */ |
48 | : "=m" (timer) : "m" (expires) ); | 48 | : "=m" (timer) : "m" (expires) ); |
49 | S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer; | 49 | S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer; |
50 | S390_lowcore.last_update_timer = expires; | 50 | S390_lowcore.last_update_timer = expires; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index bade533ba288..30ca85cce314 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -721,7 +721,7 @@ static int __init kvm_s390_init(void) | |||
721 | 721 | ||
722 | /* | 722 | /* |
723 | * guests can ask for up to 255+1 double words, we need a full page | 723 | * guests can ask for up to 255+1 double words, we need a full page |
724 | * to hold the maximum amount of facilites. On the other hand, we | 724 | * to hold the maximum amount of facilities. On the other hand, we |
725 | * only set facilities that are known to work in KVM. | 725 | * only set facilities that are known to work in KVM. |
726 | */ | 726 | */ |
727 | facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA); | 727 | facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA); |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 9194a4b52b22..73c47bd95db3 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -311,7 +311,7 @@ int kvm_s390_handle_b2(struct kvm_vcpu *vcpu) | |||
311 | 311 | ||
312 | /* | 312 | /* |
313 | * a lot of B2 instructions are priviledged. We first check for | 313 | * a lot of B2 instructions are priviledged. We first check for |
314 | * the priviledges ones, that we can handle in the kernel. If the | 314 | * the privileged ones, that we can handle in the kernel. If the |
315 | * kernel can handle this instruction, we check for the problem | 315 | * kernel can handle this instruction, we check for the problem |
316 | * state bit and (a) handle the instruction or (b) send a code 2 | 316 | * state bit and (a) handle the instruction or (b) send a code 2 |
317 | * program check. | 317 | * program check. |
diff --git a/arch/s390/kvm/sie64a.S b/arch/s390/kvm/sie64a.S index 7e9d30d567b0..ab0e041ac54c 100644 --- a/arch/s390/kvm/sie64a.S +++ b/arch/s390/kvm/sie64a.S | |||
@@ -48,10 +48,10 @@ sie_irq_handler: | |||
48 | tm __TI_flags+7(%r2),_TIF_EXIT_SIE | 48 | tm __TI_flags+7(%r2),_TIF_EXIT_SIE |
49 | jz 0f | 49 | jz 0f |
50 | larl %r2,sie_exit # work pending, leave sie | 50 | larl %r2,sie_exit # work pending, leave sie |
51 | stg %r2,__LC_RETURN_PSW+8 | 51 | stg %r2,SPI_PSW+8(0,%r15) |
52 | br %r14 | 52 | br %r14 |
53 | 0: larl %r2,sie_reenter # re-enter with guest id | 53 | 0: larl %r2,sie_reenter # re-enter with guest id |
54 | stg %r2,__LC_RETURN_PSW+8 | 54 | stg %r2,SPI_PSW+8(0,%r15) |
55 | 1: br %r14 | 55 | 1: br %r14 |
56 | 56 | ||
57 | /* | 57 | /* |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 2c57806c0858..ab988135e5c6 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -392,7 +392,7 @@ void __kprobes do_protection_exception(struct pt_regs *regs, long pgm_int_code, | |||
392 | { | 392 | { |
393 | int fault; | 393 | int fault; |
394 | 394 | ||
395 | /* Protection exception is supressing, decrement psw address. */ | 395 | /* Protection exception is suppressing, decrement psw address. */ |
396 | regs->psw.addr -= (pgm_int_code >> 16); | 396 | regs->psw.addr -= (pgm_int_code >> 16); |
397 | /* | 397 | /* |
398 | * Check for low-address protection. This needs to be treated | 398 | * Check for low-address protection. This needs to be treated |
@@ -543,7 +543,6 @@ static void pfault_interrupt(unsigned int ext_int_code, | |||
543 | struct task_struct *tsk; | 543 | struct task_struct *tsk; |
544 | __u16 subcode; | 544 | __u16 subcode; |
545 | 545 | ||
546 | kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; | ||
547 | /* | 546 | /* |
548 | * Get the external interruption subcode & pfault | 547 | * Get the external interruption subcode & pfault |
549 | * initial/completion signal bit. VM stores this | 548 | * initial/completion signal bit. VM stores this |
@@ -553,14 +552,15 @@ static void pfault_interrupt(unsigned int ext_int_code, | |||
553 | subcode = ext_int_code >> 16; | 552 | subcode = ext_int_code >> 16; |
554 | if ((subcode & 0xff00) != __SUBCODE_MASK) | 553 | if ((subcode & 0xff00) != __SUBCODE_MASK) |
555 | return; | 554 | return; |
555 | kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; | ||
556 | 556 | ||
557 | /* | 557 | /* |
558 | * Get the token (= address of the task structure of the affected task). | 558 | * Get the token (= address of the task structure of the affected task). |
559 | */ | 559 | */ |
560 | #ifdef CONFIG_64BIT | 560 | #ifdef CONFIG_64BIT |
561 | tsk = *(struct task_struct **) param64; | 561 | tsk = (struct task_struct *) param64; |
562 | #else | 562 | #else |
563 | tsk = *(struct task_struct **) param32; | 563 | tsk = (struct task_struct *) param32; |
564 | #endif | 564 | #endif |
565 | 565 | ||
566 | if (subcode & 0x0080) { | 566 | if (subcode & 0x0080) { |
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c index 122ffbd08ce0..0607e4b14b27 100644 --- a/arch/s390/mm/pageattr.c +++ b/arch/s390/mm/pageattr.c | |||
@@ -24,12 +24,13 @@ static void change_page_attr(unsigned long addr, int numpages, | |||
24 | WARN_ON_ONCE(1); | 24 | WARN_ON_ONCE(1); |
25 | continue; | 25 | continue; |
26 | } | 26 | } |
27 | ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE); | 27 | ptep = pte_offset_kernel(pmdp, addr); |
28 | 28 | ||
29 | pte = *ptep; | 29 | pte = *ptep; |
30 | pte = set(pte); | 30 | pte = set(pte); |
31 | ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep); | 31 | ptep_invalidate(&init_mm, addr, ptep); |
32 | *ptep = pte; | 32 | *ptep = pte; |
33 | addr += PAGE_SIZE; | ||
33 | } | 34 | } |
34 | } | 35 | } |
35 | 36 | ||
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 3d48f4db246d..4952872d6f0a 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c | |||
@@ -517,12 +517,8 @@ stop_exit: | |||
517 | 517 | ||
518 | static int check_hardware_prerequisites(void) | 518 | static int check_hardware_prerequisites(void) |
519 | { | 519 | { |
520 | unsigned long long facility_bits[2]; | 520 | if (!test_facility(68)) |
521 | |||
522 | memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32); | ||
523 | if (!(facility_bits[1] & (1ULL << 59))) | ||
524 | return -EOPNOTSUPP; | 521 | return -EOPNOTSUPP; |
525 | |||
526 | return 0; | 522 | return 0; |
527 | } | 523 | } |
528 | /* | 524 | /* |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 4278bbc032ce..e73bc781cc14 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
@@ -3,7 +3,6 @@ menu "Machine selection" | |||
3 | config SCORE | 3 | config SCORE |
4 | def_bool y | 4 | def_bool y |
5 | select HAVE_GENERIC_HARDIRQS | 5 | select HAVE_GENERIC_HARDIRQS |
6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
7 | select GENERIC_IRQ_SHOW | 6 | select GENERIC_IRQ_SHOW |
8 | 7 | ||
9 | choice | 8 | choice |
diff --git a/arch/score/Makefile b/arch/score/Makefile index d77dc639d8e3..974aefe86123 100644 --- a/arch/score/Makefile +++ b/arch/score/Makefile | |||
@@ -40,5 +40,5 @@ archclean: | |||
40 | define archhelp | 40 | define archhelp |
41 | echo ' vmlinux.bin - Raw binary boot image' | 41 | echo ' vmlinux.bin - Raw binary boot image' |
42 | echo | 42 | echo |
43 | echo ' These will be default as apropriate for a configured platform.' | 43 | echo ' These will be default as appropriate for a configured platform.' |
44 | endef | 44 | endef |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 9af3c8d0776b..4b89da248d17 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -23,8 +23,8 @@ config SUPERH | |||
23 | select HAVE_SPARSE_IRQ | 23 | select HAVE_SPARSE_IRQ |
24 | select RTC_LIB | 24 | select RTC_LIB |
25 | select GENERIC_ATOMIC64 | 25 | select GENERIC_ATOMIC64 |
26 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
27 | select GENERIC_IRQ_SHOW | 26 | select GENERIC_IRQ_SHOW |
27 | select ARCH_NO_SYSDEV_OPS | ||
28 | help | 28 | help |
29 | The SuperH is a RISC processor targeted for use in embedded systems | 29 | The SuperH is a RISC processor targeted for use in embedded systems |
30 | and consumer electronics; it was also used in the Sega Dreamcast | 30 | and consumer electronics; it was also used in the Sega Dreamcast |
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 12fec72fec5f..1553d56cf4e0 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -82,7 +82,7 @@ config SH_NO_BSS_INIT | |||
82 | help | 82 | help |
83 | If running in painfully slow environments, such as an RTL | 83 | If running in painfully slow environments, such as an RTL |
84 | simulation or from remote memory via SHdebug, where the memory | 84 | simulation or from remote memory via SHdebug, where the memory |
85 | can already be gauranteed to ber zeroed on boot, say Y. | 85 | can already be guaranteed to ber zeroed on boot, say Y. |
86 | 86 | ||
87 | For all other cases, say N. If this option seems perplexing, or | 87 | For all other cases, say N. If this option seems perplexing, or |
88 | you aren't sure, say N. | 88 | you aren't sure, say N. |
diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index a9e33569ad38..fa2a208ec6cb 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/mmc/host.h> | 18 | #include <linux/mmc/host.h> |
19 | #include <linux/mmc/sh_mmcif.h> | 19 | #include <linux/mmc/sh_mmcif.h> |
20 | #include <linux/mfd/sh_mobile_sdhi.h> | 20 | #include <linux/mmc/sh_mobile_sdhi.h> |
21 | #include <cpu/sh7757.h> | 21 | #include <cpu/sh7757.h> |
22 | #include <asm/sh_eth.h> | 22 | #include <asm/sh_eth.h> |
23 | #include <asm/heartbeat.h> | 23 | #include <asm/heartbeat.h> |
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 636d8318a72a..618bd566cf53 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -156,24 +156,34 @@ static struct platform_device nand_flash_device = { | |||
156 | #define PORT_DRVCRA 0xA405018A | 156 | #define PORT_DRVCRA 0xA405018A |
157 | #define PORT_DRVCRB 0xA405018C | 157 | #define PORT_DRVCRB 0xA405018C |
158 | 158 | ||
159 | static int ap320_wvga_set_brightness(void *board_data, int brightness) | ||
160 | { | ||
161 | if (brightness) { | ||
162 | gpio_set_value(GPIO_PTS3, 0); | ||
163 | __raw_writew(0x100, FPGA_BKLREG); | ||
164 | } else { | ||
165 | __raw_writew(0, FPGA_BKLREG); | ||
166 | gpio_set_value(GPIO_PTS3, 1); | ||
167 | } | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | static int ap320_wvga_get_brightness(void *board_data) | ||
173 | { | ||
174 | return gpio_get_value(GPIO_PTS3); | ||
175 | } | ||
176 | |||
159 | static void ap320_wvga_power_on(void *board_data, struct fb_info *info) | 177 | static void ap320_wvga_power_on(void *board_data, struct fb_info *info) |
160 | { | 178 | { |
161 | msleep(100); | 179 | msleep(100); |
162 | 180 | ||
163 | /* ASD AP-320/325 LCD ON */ | 181 | /* ASD AP-320/325 LCD ON */ |
164 | __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG); | 182 | __raw_writew(FPGA_LCDREG_VAL, FPGA_LCDREG); |
165 | |||
166 | /* backlight */ | ||
167 | gpio_set_value(GPIO_PTS3, 0); | ||
168 | __raw_writew(0x100, FPGA_BKLREG); | ||
169 | } | 183 | } |
170 | 184 | ||
171 | static void ap320_wvga_power_off(void *board_data) | 185 | static void ap320_wvga_power_off(void *board_data) |
172 | { | 186 | { |
173 | /* backlight */ | ||
174 | __raw_writew(0, FPGA_BKLREG); | ||
175 | gpio_set_value(GPIO_PTS3, 1); | ||
176 | |||
177 | /* ASD AP-320/325 LCD OFF */ | 187 | /* ASD AP-320/325 LCD OFF */ |
178 | __raw_writew(0, FPGA_LCDREG); | 188 | __raw_writew(0, FPGA_LCDREG); |
179 | } | 189 | } |
@@ -209,6 +219,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
209 | .board_cfg = { | 219 | .board_cfg = { |
210 | .display_on = ap320_wvga_power_on, | 220 | .display_on = ap320_wvga_power_on, |
211 | .display_off = ap320_wvga_power_off, | 221 | .display_off = ap320_wvga_power_off, |
222 | .set_brightness = ap320_wvga_set_brightness, | ||
223 | .get_brightness = ap320_wvga_get_brightness, | ||
224 | }, | ||
225 | .bl_info = { | ||
226 | .name = "sh_mobile_lcdc_bl", | ||
227 | .max_brightness = 1, | ||
212 | }, | 228 | }, |
213 | } | 229 | } |
214 | }; | 230 | }; |
diff --git a/arch/sh/boards/mach-dreamcast/irq.c b/arch/sh/boards/mach-dreamcast/irq.c index 78cf2ab89d7a..f63d323f411f 100644 --- a/arch/sh/boards/mach-dreamcast/irq.c +++ b/arch/sh/boards/mach-dreamcast/irq.c | |||
@@ -51,7 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | #define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32) | 52 | #define LEVEL(event) (((event) - HW_EVENT_IRQ_BASE) / 32) |
53 | 53 | ||
54 | /* Return the hardware event's bit positon within the EMR/ESR */ | 54 | /* Return the hardware event's bit position within the EMR/ESR */ |
55 | #define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31) | 55 | #define EVENT_BIT(event) (((event) - HW_EVENT_IRQ_BASE) & 31) |
56 | 56 | ||
57 | /* | 57 | /* |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index fd4ff25f23b2..86a0d565aded 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -263,6 +263,18 @@ const static struct fb_videomode ecovec_dvi_modes[] = { | |||
263 | }, | 263 | }, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | static int ecovec24_set_brightness(void *board_data, int brightness) | ||
267 | { | ||
268 | gpio_set_value(GPIO_PTR1, brightness); | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | static int ecovec24_get_brightness(void *board_data) | ||
274 | { | ||
275 | return gpio_get_value(GPIO_PTR1); | ||
276 | } | ||
277 | |||
266 | static struct sh_mobile_lcdc_info lcdc_info = { | 278 | static struct sh_mobile_lcdc_info lcdc_info = { |
267 | .ch[0] = { | 279 | .ch[0] = { |
268 | .interface_type = RGB18, | 280 | .interface_type = RGB18, |
@@ -273,6 +285,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
273 | .height = 91, | 285 | .height = 91, |
274 | }, | 286 | }, |
275 | .board_cfg = { | 287 | .board_cfg = { |
288 | .set_brightness = ecovec24_set_brightness, | ||
289 | .get_brightness = ecovec24_get_brightness, | ||
290 | }, | ||
291 | .bl_info = { | ||
292 | .name = "sh_mobile_lcdc_bl", | ||
293 | .max_brightness = 1, | ||
276 | }, | 294 | }, |
277 | } | 295 | } |
278 | }; | 296 | }; |
@@ -936,7 +954,7 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) | |||
936 | return; | 954 | return; |
937 | } | 955 | } |
938 | 956 | ||
939 | /* read MAC address frome EEPROM */ | 957 | /* read MAC address from EEPROM */ |
940 | for (i = 0; i < sizeof(pd->mac_addr); i++) { | 958 | for (i = 0; i < sizeof(pd->mac_addr); i++) { |
941 | pd->mac_addr[i] = mac_read(a, 0x10 + i); | 959 | pd->mac_addr[i] = mac_read(a, 0x10 + i); |
942 | msleep(10); | 960 | msleep(10); |
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index 94186cf079b6..f1147caebacf 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | static void landisk_power_off(void) | 24 | static void landisk_power_off(void) |
25 | { | 25 | { |
26 | __raw_writeb(0x01, PA_SHUTDOWN); | 26 | __raw_writeb(0x01, PA_SHUTDOWN); |
27 | } | 27 | } |
28 | 28 | ||
29 | static struct resource cf_ide_resources[3]; | 29 | static struct resource cf_ide_resources[3]; |
@@ -85,7 +85,7 @@ device_initcall(landisk_devices_setup); | |||
85 | 85 | ||
86 | static void __init landisk_setup(char **cmdline_p) | 86 | static void __init landisk_setup(char **cmdline_p) |
87 | { | 87 | { |
88 | /* LED ON */ | 88 | /* LED ON */ |
89 | __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); | 89 | __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); |
90 | 90 | ||
91 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); | 91 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); |
@@ -97,7 +97,6 @@ static void __init landisk_setup(char **cmdline_p) | |||
97 | */ | 97 | */ |
98 | static struct sh_machine_vector mv_landisk __initmv = { | 98 | static struct sh_machine_vector mv_landisk __initmv = { |
99 | .mv_name = "LANDISK", | 99 | .mv_name = "LANDISK", |
100 | .mv_nr_irqs = 72, | ||
101 | .mv_setup = landisk_setup, | 100 | .mv_setup = landisk_setup, |
102 | .mv_init_irq = init_landisk_IRQ, | 101 | .mv_init_irq = init_landisk_IRQ, |
103 | }; | 102 | }; |
diff --git a/arch/sh/drivers/pci/pci-sh7751.h b/arch/sh/drivers/pci/pci-sh7751.h index 4983a4d20355..5ede38c330d3 100644 --- a/arch/sh/drivers/pci/pci-sh7751.h +++ b/arch/sh/drivers/pci/pci-sh7751.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */ | 61 | #define SH7751_PCICONF3_BIST7 0x80000000 /* Bist Supported */ |
62 | #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */ | 62 | #define SH7751_PCICONF3_BIST6 0x40000000 /* Bist Executing */ |
63 | #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */ | 63 | #define SH7751_PCICONF3_BIST3_0 0x0F000000 /* Bist Passed */ |
64 | #define SH7751_PCICONF3_HD7 0x00800000 /* Single Funtion device */ | 64 | #define SH7751_PCICONF3_HD7 0x00800000 /* Single Function device */ |
65 | #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */ | 65 | #define SH7751_PCICONF3_HD6_0 0x007F0000 /* Configuration Layout */ |
66 | #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */ | 66 | #define SH7751_PCICONF3_LAT 0x0000FF00 /* Latency Timer */ |
67 | #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */ | 67 | #define SH7751_PCICONF3_CLS 0x000000FF /* Cache Line Size */ |
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index a09c77dd09db..194231cb5a70 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -84,7 +84,7 @@ int __devinit register_pci_controller(struct pci_channel *hose) | |||
84 | hose_tail = &hose->next; | 84 | hose_tail = &hose->next; |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Do not panic here but later - this might hapen before console init. | 87 | * Do not panic here but later - this might happen before console init. |
88 | */ | 88 | */ |
89 | if (!hose->io_map_base) { | 89 | if (!hose->io_map_base) { |
90 | printk(KERN_WARNING | 90 | printk(KERN_WARNING |
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index c4e0b3d472b9..822d6084195b 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h | |||
@@ -186,7 +186,7 @@ typedef struct page *pgtable_t; | |||
186 | /* | 186 | /* |
187 | * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still | 187 | * While BYTES_PER_WORD == 4 on the current sh64 ABI, GCC will still |
188 | * happily generate {ld/st}.q pairs, requiring us to have 8-byte | 188 | * happily generate {ld/st}.q pairs, requiring us to have 8-byte |
189 | * alignment to avoid traps. The kmalloc alignment is gauranteed by | 189 | * alignment to avoid traps. The kmalloc alignment is guaranteed by |
190 | * virtue of L1_CACHE_BYTES, requiring this to only be special cased | 190 | * virtue of L1_CACHE_BYTES, requiring this to only be special cased |
191 | * for slab caches. | 191 | * for slab caches. |
192 | */ | 192 | */ |
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index b799fe71114c..0bce3d81569e 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -167,7 +167,7 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) | |||
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | /* | 169 | /* |
170 | * Mask of bits that are to be preserved accross pgprot changes. | 170 | * Mask of bits that are to be preserved across pgprot changes. |
171 | */ | 171 | */ |
172 | #define _PAGE_CHG_MASK \ | 172 | #define _PAGE_CHG_MASK \ |
173 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ | 173 | (PTE_MASK | _PAGE_ACCESSED | _PAGE_CACHABLE | \ |
diff --git a/arch/sh/include/asm/unaligned-sh4a.h b/arch/sh/include/asm/unaligned-sh4a.h index c48a9c3420da..95adc500cabc 100644 --- a/arch/sh/include/asm/unaligned-sh4a.h +++ b/arch/sh/include/asm/unaligned-sh4a.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * struct. | 9 | * struct. |
10 | * | 10 | * |
11 | * The same note as with the movli.l/movco.l pair applies here, as long | 11 | * The same note as with the movli.l/movco.l pair applies here, as long |
12 | * as the load is gauranteed to be inlined, nothing else will hook in to | 12 | * as the load is guaranteed to be inlined, nothing else will hook in to |
13 | * r0 and we get the return value for free. | 13 | * r0 and we get the return value for free. |
14 | * | 14 | * |
15 | * NOTE: Due to the fact we require r0 encoding, care should be taken to | 15 | * NOTE: Due to the fact we require r0 encoding, care should be taken to |
diff --git a/arch/sh/include/mach-common/mach/highlander.h b/arch/sh/include/mach-common/mach/highlander.h index 5d9d4d5154be..6ce944e33e59 100644 --- a/arch/sh/include/mach-common/mach/highlander.h +++ b/arch/sh/include/mach-common/mach/highlander.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */ | 24 | #define PA_OBLED (PA_BCR+0x001c) /* On Board LED control */ |
25 | #define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */ | 25 | #define PA_OBSW (PA_BCR+0x001e) /* On Board Switch control */ |
26 | #define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */ | 26 | #define PA_AUDIOSEL (PA_BCR+0x0020) /* Sound Interface Select control */ |
27 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ | 27 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */ |
28 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ | 28 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ |
29 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ | 29 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ |
30 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ | 30 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ |
@@ -89,7 +89,7 @@ | |||
89 | #define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */ | 89 | #define PA_OBLED (PA_BCR+0x0018) /* On Board LED control */ |
90 | #define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */ | 90 | #define PA_OBSW (PA_BCR+0x001a) /* On Board Switch control */ |
91 | #define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */ | 91 | #define PA_AUDIOSEL (PA_BCR+0x001c) /* Sound Interface Select control */ |
92 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extention Pin Polarity control */ | 92 | #define PA_EXTPLR (PA_BCR+0x001e) /* Extension Pin Polarity control */ |
93 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ | 93 | #define PA_TPCTL (PA_BCR+0x0100) /* Touch Panel Access control */ |
94 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ | 94 | #define PA_TPDCKCTL (PA_BCR+0x0102) /* Touch Panel Access data control */ |
95 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ | 95 | #define PA_TPCTLCLR (PA_BCR+0x0104) /* Touch Panel Access control */ |
diff --git a/arch/sh/include/mach-common/mach/r2d.h b/arch/sh/include/mach-common/mach/r2d.h index 0a800157b826..e04f75eaa153 100644 --- a/arch/sh/include/mach-common/mach/r2d.h +++ b/arch/sh/include/mach-common/mach/r2d.h | |||
@@ -18,18 +18,18 @@ | |||
18 | #define PA_DISPCTL 0xa4000008 /* Display Timing control */ | 18 | #define PA_DISPCTL 0xa4000008 /* Display Timing control */ |
19 | #define PA_SDMPOW 0xa400000a /* SD Power control */ | 19 | #define PA_SDMPOW 0xa400000a /* SD Power control */ |
20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ | 20 | #define PA_RTCCE 0xa400000c /* RTC(9701) Enable control */ |
21 | #define PA_PCICD 0xa400000e /* PCI Extention detect control */ | 21 | #define PA_PCICD 0xa400000e /* PCI Extension detect control */ |
22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ | 22 | #define PA_VOYAGERRTS 0xa4000020 /* VOYAGER Reset control */ |
23 | 23 | ||
24 | #define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ | 24 | #define PA_R2D1_AXRST 0xa4000022 /* AX_LAN Reset control */ |
25 | #define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ | 25 | #define PA_R2D1_CFRST 0xa4000024 /* CF Reset control */ |
26 | #define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ | 26 | #define PA_R2D1_ADMRTS 0xa4000026 /* SD Reset control */ |
27 | #define PA_R2D1_EXTRST 0xa4000028 /* Extention Reset control */ | 27 | #define PA_R2D1_EXTRST 0xa4000028 /* Extension Reset control */ |
28 | #define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ | 28 | #define PA_R2D1_CFCDINTCLR 0xa400002a /* CF Insert Interrupt clear */ |
29 | 29 | ||
30 | #define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ | 30 | #define PA_R2DPLUS_CFRST 0xa4000022 /* CF Reset control */ |
31 | #define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ | 31 | #define PA_R2DPLUS_ADMRTS 0xa4000024 /* SD Reset control */ |
32 | #define PA_R2DPLUS_EXTRST 0xa4000026 /* Extention Reset control */ | 32 | #define PA_R2DPLUS_EXTRST 0xa4000026 /* Extension Reset control */ |
33 | #define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ | 33 | #define PA_R2DPLUS_CFCDINTCLR 0xa4000028 /* CF Insert Interrupt clear */ |
34 | #define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ | 34 | #define PA_R2DPLUS_KEYCTLCLR 0xa400002a /* Key Interrupt clear */ |
35 | 35 | ||
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c index dd0e0f211359..8f63a264a842 100644 --- a/arch/sh/kernel/cpu/clock-cpg.c +++ b/arch/sh/kernel/cpu/clock-cpg.c | |||
@@ -67,7 +67,7 @@ int __init __deprecated cpg_clk_init(void) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Placeholder for compatability, until the lazy CPUs do this | 70 | * Placeholder for compatibility, until the lazy CPUs do this |
71 | * on their own. | 71 | * on their own. |
72 | */ | 72 | */ |
73 | int __init __weak arch_clk_init(void) | 73 | int __init __weak arch_clk_init(void) |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 1656b8c91faf..beba32beb6d9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
@@ -648,7 +648,7 @@ static void __init sh7786_usb_setup(void) | |||
648 | * The following settings are necessary | 648 | * The following settings are necessary |
649 | * for using the USB modules. | 649 | * for using the USB modules. |
650 | * | 650 | * |
651 | * see "USB Inital Settings" for detail | 651 | * see "USB Initial Settings" for detail |
652 | */ | 652 | */ |
653 | __raw_writel(USBINITVAL1, USBINITREG1); | 653 | __raw_writel(USBINITVAL1, USBINITREG1); |
654 | __raw_writel(USBINITVAL2, USBINITREG2); | 654 | __raw_writel(USBINITVAL2, USBINITREG2); |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 64ea0b165399..91971103b62b 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -183,7 +183,7 @@ asmlinkage void do_softirq(void) | |||
183 | ); | 183 | ); |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Shouldnt happen, we returned above if in_interrupt(): | 186 | * Shouldn't happen, we returned above if in_interrupt(): |
187 | */ | 187 | */ |
188 | WARN_ON_ONCE(softirq_count()); | 188 | WARN_ON_ONCE(softirq_count()); |
189 | } | 189 | } |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 4f267160c515..58bff45d1156 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -150,7 +150,7 @@ void __init check_for_initrd(void) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * If we got this far inspite of the boot loader's best efforts | 153 | * If we got this far in spite of the boot loader's best efforts |
154 | * to the contrary, assume we actually have a valid initrd and | 154 | * to the contrary, assume we actually have a valid initrd and |
155 | * fix up the root dev. | 155 | * fix up the root dev. |
156 | */ | 156 | */ |
diff --git a/arch/sh/lib64/copy_user_memcpy.S b/arch/sh/lib64/copy_user_memcpy.S index 2a62816d2ddd..49aeabeba2c2 100644 --- a/arch/sh/lib64/copy_user_memcpy.S +++ b/arch/sh/lib64/copy_user_memcpy.S | |||
@@ -27,7 +27,7 @@ | |||
27 | ! 2.: When there are two or three bytes in the last word of an 11-or-more | 27 | ! 2.: When there are two or three bytes in the last word of an 11-or-more |
28 | ! bytes memory chunk to b copied, the rest of the word can be read | 28 | ! bytes memory chunk to b copied, the rest of the word can be read |
29 | ! without side effects. | 29 | ! without side effects. |
30 | ! This could be easily changed by increasing the minumum size of | 30 | ! This could be easily changed by increasing the minimum size of |
31 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, | 31 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, |
32 | ! however, this would cost a few extra cyles on average. | 32 | ! however, this would cost a few extra cyles on average. |
33 | ! For SHmedia, the assumption is that any quadword can be read in its | 33 | ! For SHmedia, the assumption is that any quadword can be read in its |
diff --git a/arch/sh/lib64/memcpy.S b/arch/sh/lib64/memcpy.S index dd300c372ce1..5d682e0ee24f 100644 --- a/arch/sh/lib64/memcpy.S +++ b/arch/sh/lib64/memcpy.S | |||
@@ -29,7 +29,7 @@ | |||
29 | ! 2.: When there are two or three bytes in the last word of an 11-or-more | 29 | ! 2.: When there are two or three bytes in the last word of an 11-or-more |
30 | ! bytes memory chunk to b copied, the rest of the word can be read | 30 | ! bytes memory chunk to b copied, the rest of the word can be read |
31 | ! without side effects. | 31 | ! without side effects. |
32 | ! This could be easily changed by increasing the minumum size of | 32 | ! This could be easily changed by increasing the minimum size of |
33 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, | 33 | ! a fast memcpy and the amount subtracted from r7 before L_2l_loop be 2, |
34 | ! however, this would cost a few extra cyles on average. | 34 | ! however, this would cost a few extra cyles on average. |
35 | ! For SHmedia, the assumption is that any quadword can be read in its | 35 | ! For SHmedia, the assumption is that any quadword can be read in its |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 14b234631f5f..e560d102215a 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -51,7 +51,6 @@ config SPARC64 | |||
51 | select HAVE_PERF_EVENTS | 51 | select HAVE_PERF_EVENTS |
52 | select PERF_USE_VMALLOC | 52 | select PERF_USE_VMALLOC |
53 | select HAVE_GENERIC_HARDIRQS | 53 | select HAVE_GENERIC_HARDIRQS |
54 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
55 | select GENERIC_IRQ_SHOW | 54 | select GENERIC_IRQ_SHOW |
56 | select IRQ_PREFLOW_FASTEOI | 55 | select IRQ_PREFLOW_FASTEOI |
57 | 56 | ||
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index bafe5a631b6d..75686409be24 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h | |||
@@ -654,7 +654,7 @@ extern unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions, | |||
654 | * ARG3: mmu context | 654 | * ARG3: mmu context |
655 | * ARG4: flags (HV_MMU_{IMMU,DMMU}) | 655 | * ARG4: flags (HV_MMU_{IMMU,DMMU}) |
656 | * RET0: status | 656 | * RET0: status |
657 | * ERRORS: EINVAL Invalid virutal address, context, or | 657 | * ERRORS: EINVAL Invalid virtual address, context, or |
658 | * flags value | 658 | * flags value |
659 | * ENOTSUPPORTED ARG0 or ARG1 is non-zero | 659 | * ENOTSUPPORTED ARG0 or ARG1 is non-zero |
660 | * | 660 | * |
@@ -721,7 +721,7 @@ extern void sun4v_mmu_demap_all(void); | |||
721 | * ARG2: TTE | 721 | * ARG2: TTE |
722 | * ARG3: flags (HV_MMU_{IMMU,DMMU}) | 722 | * ARG3: flags (HV_MMU_{IMMU,DMMU}) |
723 | * RET0: status | 723 | * RET0: status |
724 | * ERRORS: EINVAL Invalid virutal address or flags value | 724 | * ERRORS: EINVAL Invalid virtual address or flags value |
725 | * EBADPGSZ Invalid page size value | 725 | * EBADPGSZ Invalid page size value |
726 | * ENORADDR Invalid real address in TTE | 726 | * ENORADDR Invalid real address in TTE |
727 | * ETOOMANY Too many mappings (max of 8 reached) | 727 | * ETOOMANY Too many mappings (max of 8 reached) |
@@ -800,7 +800,7 @@ extern unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, | |||
800 | * ARG1: reserved, must be zero | 800 | * ARG1: reserved, must be zero |
801 | * ARG2: flags (HV_MMU_{IMMU,DMMU}) | 801 | * ARG2: flags (HV_MMU_{IMMU,DMMU}) |
802 | * RET0: status | 802 | * RET0: status |
803 | * ERRORS: EINVAL Invalid virutal address or flags value | 803 | * ERRORS: EINVAL Invalid virtual address or flags value |
804 | * ENOMAP Specified mapping was not found | 804 | * ENOMAP Specified mapping was not found |
805 | * | 805 | * |
806 | * Demaps any permanent page mapping (established via | 806 | * Demaps any permanent page mapping (established via |
@@ -1205,7 +1205,7 @@ struct hv_trap_trace_control { | |||
1205 | * structure contents. Attempts to do so will result in undefined | 1205 | * structure contents. Attempts to do so will result in undefined |
1206 | * behavior for the guest. | 1206 | * behavior for the guest. |
1207 | * | 1207 | * |
1208 | * Each trap trace buffer entry is layed out as follows: | 1208 | * Each trap trace buffer entry is laid out as follows: |
1209 | */ | 1209 | */ |
1210 | #ifndef __ASSEMBLY__ | 1210 | #ifndef __ASSEMBLY__ |
1211 | struct hv_trap_trace_entry { | 1211 | struct hv_trap_trace_entry { |
@@ -1300,7 +1300,7 @@ struct hv_trap_trace_entry { | |||
1300 | * state in RET1. Future systems may define various flags for the | 1300 | * state in RET1. Future systems may define various flags for the |
1301 | * enable argument (ARG0), for the moment a guest should pass | 1301 | * enable argument (ARG0), for the moment a guest should pass |
1302 | * "(uint64_t) -1" to enable, and "(uint64_t) 0" to disable all | 1302 | * "(uint64_t) -1" to enable, and "(uint64_t) 0" to disable all |
1303 | * tracing - which will ensure future compatability. | 1303 | * tracing - which will ensure future compatibility. |
1304 | */ | 1304 | */ |
1305 | #define HV_FAST_TTRACE_ENABLE 0x92 | 1305 | #define HV_FAST_TTRACE_ENABLE 0x92 |
1306 | 1306 | ||
@@ -1880,7 +1880,7 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
1880 | * pci_device, at pci_config_offset from the beginning of the device's | 1880 | * pci_device, at pci_config_offset from the beginning of the device's |
1881 | * configuration space. If there was no error, RET1 is set to zero and | 1881 | * configuration space. If there was no error, RET1 is set to zero and |
1882 | * RET2 is set to the data read. Insignificant bits in RET2 are not | 1882 | * RET2 is set to the data read. Insignificant bits in RET2 are not |
1883 | * guarenteed to have any specific value and therefore must be ignored. | 1883 | * guaranteed to have any specific value and therefore must be ignored. |
1884 | * | 1884 | * |
1885 | * The data returned in RET2 is size based byte swapped. | 1885 | * The data returned in RET2 is size based byte swapped. |
1886 | * | 1886 | * |
@@ -1941,9 +1941,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
1941 | * and return the actual data read in RET2. The data returned is size based | 1941 | * and return the actual data read in RET2. The data returned is size based |
1942 | * byte swapped. | 1942 | * byte swapped. |
1943 | * | 1943 | * |
1944 | * Non-significant bits in RET2 are not guarenteed to have any specific value | 1944 | * Non-significant bits in RET2 are not guaranteed to have any specific value |
1945 | * and therefore must be ignored. If RET1 is returned as non-zero, the data | 1945 | * and therefore must be ignored. If RET1 is returned as non-zero, the data |
1946 | * value is not guarenteed to have any specific value and should be ignored. | 1946 | * value is not guaranteed to have any specific value and should be ignored. |
1947 | * | 1947 | * |
1948 | * The caller must have permission to read from the given devhandle, real | 1948 | * The caller must have permission to read from the given devhandle, real |
1949 | * address, which must be an IO address. The argument real address must be a | 1949 | * address, which must be an IO address. The argument real address must be a |
@@ -2456,9 +2456,9 @@ extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | |||
2456 | * | 2456 | * |
2457 | * As receive queue configuration causes a reset of the queue's head and | 2457 | * As receive queue configuration causes a reset of the queue's head and |
2458 | * tail pointers there is no way for a gues to determine how many entries | 2458 | * tail pointers there is no way for a gues to determine how many entries |
2459 | * have been received between a preceeding ldc_get_rx_state() API call | 2459 | * have been received between a preceding ldc_get_rx_state() API call |
2460 | * and the completion of the configuration operation. It should be noted | 2460 | * and the completion of the configuration operation. It should be noted |
2461 | * that datagram delivery is not guarenteed via domain channels anyway, | 2461 | * that datagram delivery is not guaranteed via domain channels anyway, |
2462 | * and therefore any higher protocol should be resilient to datagram | 2462 | * and therefore any higher protocol should be resilient to datagram |
2463 | * loss if necessary. However, to overcome this specific race potential | 2463 | * loss if necessary. However, to overcome this specific race potential |
2464 | * it is recommended, for example, that a higher level protocol be employed | 2464 | * it is recommended, for example, that a higher level protocol be employed |
diff --git a/arch/sparc/include/asm/ns87303.h b/arch/sparc/include/asm/ns87303.h index 686defe6aaa0..af755483e17d 100644 --- a/arch/sparc/include/asm/ns87303.h +++ b/arch/sparc/include/asm/ns87303.h | |||
@@ -37,7 +37,7 @@ | |||
37 | /* Power and Test Register (PTR) bits */ | 37 | /* Power and Test Register (PTR) bits */ |
38 | #define PTR_LPTB_IRQ7 0x08 | 38 | #define PTR_LPTB_IRQ7 0x08 |
39 | #define PTR_LEVEL_IRQ 0x80 /* When not ECP/EPP: Use level IRQ */ | 39 | #define PTR_LEVEL_IRQ 0x80 /* When not ECP/EPP: Use level IRQ */ |
40 | #define PTR_LPT_REG_DIR 0x80 /* When ECP/EPP: LPT CTR controlls direction */ | 40 | #define PTR_LPT_REG_DIR 0x80 /* When ECP/EPP: LPT CTR controls direction */ |
41 | /* of the parallel port */ | 41 | /* of the parallel port */ |
42 | 42 | ||
43 | /* Function Control Register (FCR) bits */ | 43 | /* Function Control Register (FCR) bits */ |
diff --git a/arch/sparc/include/asm/pcr.h b/arch/sparc/include/asm/pcr.h index 843e4faf6a50..288d7beba051 100644 --- a/arch/sparc/include/asm/pcr.h +++ b/arch/sparc/include/asm/pcr.h | |||
@@ -31,7 +31,7 @@ extern unsigned int picl_shift; | |||
31 | 31 | ||
32 | /* In order to commonize as much of the implementation as | 32 | /* In order to commonize as much of the implementation as |
33 | * possible, we use PICH as our counter. Mostly this is | 33 | * possible, we use PICH as our counter. Mostly this is |
34 | * to accomodate Niagara-1 which can only count insn cycles | 34 | * to accommodate Niagara-1 which can only count insn cycles |
35 | * in PICH. | 35 | * in PICH. |
36 | */ | 36 | */ |
37 | static inline u64 picl_value(unsigned int nmi_hz) | 37 | static inline u64 picl_value(unsigned int nmi_hz) |
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index 30b0b797dc0c..c7ad3fe2b252 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
@@ -33,7 +33,7 @@ struct pt_regs { | |||
33 | * things like "in a system call" etc. for an arbitray | 33 | * things like "in a system call" etc. for an arbitray |
34 | * process. | 34 | * process. |
35 | * | 35 | * |
36 | * The PT_REGS_MAGIC is choosen such that it can be | 36 | * The PT_REGS_MAGIC is chosen such that it can be |
37 | * loaded completely using just a sethi instruction. | 37 | * loaded completely using just a sethi instruction. |
38 | */ | 38 | */ |
39 | unsigned int magic; | 39 | unsigned int magic; |
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index 2f475d7c0b53..9d897b6db983 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
@@ -403,8 +403,9 @@ | |||
403 | #define __NR_name_to_handle_at 332 | 403 | #define __NR_name_to_handle_at 332 |
404 | #define __NR_open_by_handle_at 333 | 404 | #define __NR_open_by_handle_at 333 |
405 | #define __NR_clock_adjtime 334 | 405 | #define __NR_clock_adjtime 334 |
406 | #define __NR_syncfs 335 | ||
406 | 407 | ||
407 | #define NR_syscalls 335 | 408 | #define NR_syscalls 336 |
408 | 409 | ||
409 | #ifdef __32bit_syscall_numbers__ | 410 | #ifdef __32bit_syscall_numbers__ |
410 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 411 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 2abace076c7d..773091ac71a3 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -93,7 +93,7 @@ void auxio_set_lte(int on) | |||
93 | } | 93 | } |
94 | EXPORT_SYMBOL(auxio_set_lte); | 94 | EXPORT_SYMBOL(auxio_set_lte); |
95 | 95 | ||
96 | static struct of_device_id __initdata auxio_match[] = { | 96 | static const struct of_device_id auxio_match[] = { |
97 | { | 97 | { |
98 | .name = "auxio", | 98 | .name = "auxio", |
99 | }, | 99 | }, |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 136d3718a74a..7eef3f741963 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -140,7 +140,7 @@ out_free: | |||
140 | goto out; | 140 | goto out; |
141 | } | 141 | } |
142 | 142 | ||
143 | static struct of_device_id __initdata clock_board_match[] = { | 143 | static const struct of_device_id clock_board_match[] = { |
144 | { | 144 | { |
145 | .name = "clock-board", | 145 | .name = "clock-board", |
146 | }, | 146 | }, |
@@ -245,7 +245,7 @@ out_free: | |||
245 | goto out; | 245 | goto out; |
246 | } | 246 | } |
247 | 247 | ||
248 | static struct of_device_id __initdata fhc_match[] = { | 248 | static const struct of_device_id fhc_match[] = { |
249 | { | 249 | { |
250 | .name = "fhc", | 250 | .name = "fhc", |
251 | }, | 251 | }, |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 4a700f4b79ce..3add4de8a1a9 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev) | |||
1218 | return 0; | 1218 | return 0; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | static struct vio_device_id __initdata ds_match[] = { | 1221 | static const struct vio_device_id ds_match[] = { |
1222 | { | 1222 | { |
1223 | .type = "domain-services-port", | 1223 | .type = "domain-services-port", |
1224 | }, | 1224 | }, |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 1504df8ddf70..6da784a5612b 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -801,7 +801,7 @@ vac_linesize_patch_32: subcc %l7, 32, %l7 | |||
801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on | 801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on |
802 | 802 | ||
803 | /* | 803 | /* |
804 | * Ugly, but we cant use hardware flushing on the sun4 and we'd require | 804 | * Ugly, but we can't use hardware flushing on the sun4 and we'd require |
805 | * two instructions (Anton) | 805 | * two instructions (Anton) |
806 | */ | 806 | */ |
807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 | 807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 |
@@ -851,7 +851,7 @@ sun4c_fault: | |||
851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 | 851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 |
852 | 852 | ||
853 | /* If the kernel references a bum kernel pointer, or a pte which | 853 | /* If the kernel references a bum kernel pointer, or a pte which |
854 | * points to a non existant page in ram, we will run this code | 854 | * points to a non existent page in ram, we will run this code |
855 | * _forever_ and lock up the machine!!!!! So we must check for | 855 | * _forever_ and lock up the machine!!!!! So we must check for |
856 | * this condition, the AC_SYNC_ERR bits are what we must examine. | 856 | * this condition, the AC_SYNC_ERR bits are what we must examine. |
857 | * Also a parity error would make this happen as well. So we just | 857 | * Also a parity error would make this happen as well. So we just |
@@ -1283,7 +1283,7 @@ linux_syscall_trace: | |||
1283 | .globl ret_from_fork | 1283 | .globl ret_from_fork |
1284 | ret_from_fork: | 1284 | ret_from_fork: |
1285 | call schedule_tail | 1285 | call schedule_tail |
1286 | mov %g3, %o0 | 1286 | ld [%g3 + TI_TASK], %o0 |
1287 | b ret_sys_call | 1287 | b ret_sys_call |
1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 | 1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |
1289 | 1289 | ||
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index f8f21050448b..aa594c792d19 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -85,7 +85,7 @@ sparc_ramdisk_image64: | |||
85 | sparc64_boot: | 85 | sparc64_boot: |
86 | mov %o4, %l7 | 86 | mov %o4, %l7 |
87 | 87 | ||
88 | /* We need to remap the kernel. Use position independant | 88 | /* We need to remap the kernel. Use position independent |
89 | * code to remap us to KERNBASE. | 89 | * code to remap us to KERNBASE. |
90 | * | 90 | * |
91 | * SILO can invoke us with 32-bit address masking enabled, | 91 | * SILO can invoke us with 32-bit address masking enabled, |
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index 5fe3d65581f7..35f141a9f506 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c | |||
@@ -15,7 +15,7 @@ EXPORT_SYMBOL(init_task); | |||
15 | 15 | ||
16 | /* .text section in head.S is aligned at 8k boundary and this gets linked | 16 | /* .text section in head.S is aligned at 8k boundary and this gets linked |
17 | * right after that so that the init_thread_union is aligned properly as well. | 17 | * right after that so that the init_thread_union is aligned properly as well. |
18 | * If this is not aligned on a 8k boundry, then you should change code | 18 | * If this is not aligned on a 8k boundary, then you should change code |
19 | * in etrap.S which assumes it. | 19 | * in etrap.S which assumes it. |
20 | */ | 20 | */ |
21 | union thread_union init_thread_union __init_task_data = | 21 | union thread_union init_thread_union __init_task_data = |
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 6addb914fcc8..56db06432ce9 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size | |||
107 | return hp; | 107 | return hp; |
108 | } | 108 | } |
109 | 109 | ||
110 | static void mdesc_memblock_free(struct mdesc_handle *hp) | 110 | static void __init mdesc_memblock_free(struct mdesc_handle *hp) |
111 | { | 111 | { |
112 | unsigned int alloc_size; | 112 | unsigned int alloc_size; |
113 | unsigned long start; | 113 | unsigned long start; |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 63cd4e5d47c2..5c149689bb20 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -459,7 +459,7 @@ apply_interrupt_map(struct device_node *dp, struct device_node *pp, | |||
459 | * | 459 | * |
460 | * Handle this by deciding that, if we didn't get a | 460 | * Handle this by deciding that, if we didn't get a |
461 | * match in the parent's 'interrupt-map', and the | 461 | * match in the parent's 'interrupt-map', and the |
462 | * parent is an IRQ translater, then use the parent as | 462 | * parent is an IRQ translator, then use the parent as |
463 | * our IRQ controller. | 463 | * our IRQ controller. |
464 | */ | 464 | */ |
465 | if (pp->irq_trans) | 465 | if (pp->irq_trans) |
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 3d70f8326efd..d29a32fcc5e4 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -496,7 +496,7 @@ out_err: | |||
496 | return err; | 496 | return err; |
497 | } | 497 | } |
498 | 498 | ||
499 | static struct of_device_id __initdata fire_match[] = { | 499 | static const struct of_device_id fire_match[] = { |
500 | { | 500 | { |
501 | .name = "pci", | 501 | .name = "pci", |
502 | .compatible = "pciex108e,80f0", | 502 | .compatible = "pciex108e,80f0", |
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 56ee745064de..86ae08d9b6ee 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -592,7 +592,7 @@ out_err: | |||
592 | return err; | 592 | return err; |
593 | } | 593 | } |
594 | 594 | ||
595 | static struct of_device_id __initdata psycho_match[] = { | 595 | static const struct of_device_id psycho_match[] = { |
596 | { | 596 | { |
597 | .name = "pci", | 597 | .name = "pci", |
598 | .compatible = "pci108e,8000", | 598 | .compatible = "pci108e,8000", |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 2857073342d2..948068a083fc 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -581,7 +581,7 @@ out_err: | |||
581 | return err; | 581 | return err; |
582 | } | 582 | } |
583 | 583 | ||
584 | static struct of_device_id __initdata sabre_match[] = { | 584 | static const struct of_device_id sabre_match[] = { |
585 | { | 585 | { |
586 | .name = "pci", | 586 | .name = "pci", |
587 | .compatible = "pci108e,a001", | 587 | .compatible = "pci108e,a001", |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 1d41af73a92f..fecfcb2063c8 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op) | |||
1470 | * and pci108e,8001. So list the chips in reverse chronological | 1470 | * and pci108e,8001. So list the chips in reverse chronological |
1471 | * order. | 1471 | * order. |
1472 | */ | 1472 | */ |
1473 | static struct of_device_id __initdata schizo_match[] = { | 1473 | static const struct of_device_id schizo_match[] = { |
1474 | { | 1474 | { |
1475 | .name = "pci", | 1475 | .name = "pci", |
1476 | .compatible = "pci108e,a801", | 1476 | .compatible = "pci108e,a801", |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 6cf534681788..b01a06e9ae4e 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -998,7 +998,7 @@ out_err: | |||
998 | return err; | 998 | return err; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static struct of_device_id __initdata pci_sun4v_match[] = { | 1001 | static const struct of_device_id pci_sun4v_match[] = { |
1002 | { | 1002 | { |
1003 | .name = "pci", | 1003 | .name = "pci", |
1004 | .compatible = "SUNW,sun4v-pci", | 1004 | .compatible = "SUNW,sun4v-pci", |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 760578687e7c..ee8426ede7c7 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1027,7 +1027,7 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) | |||
1027 | 1027 | ||
1028 | /* | 1028 | /* |
1029 | * If group events scheduling transaction was started, | 1029 | * If group events scheduling transaction was started, |
1030 | * skip the schedulability test here, it will be peformed | 1030 | * skip the schedulability test here, it will be performed |
1031 | * at commit time(->commit_txn) as a whole | 1031 | * at commit time(->commit_txn) as a whole |
1032 | */ | 1032 | */ |
1033 | if (cpuc->group_flag & PERF_EVENT_TXN) | 1033 | if (cpuc->group_flag & PERF_EVENT_TXN) |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index cd725fe238b2..cb4c0f57c024 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static struct of_device_id __initdata power_match[] = { | 55 | static const struct of_device_id power_match[] = { |
56 | { | 56 | { |
57 | .name = "power", | 57 | .name = "power", |
58 | }, | 58 | }, |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 4b86eaf04fe5..47ac73c32e88 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -84,4 +84,4 @@ sys_call_table: | |||
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
87 | 87 | /*335*/ .long sys_syncfs | |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 0331bafdf3a3..4f3170c1ef47 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -85,6 +85,7 @@ sys_call_table32: | |||
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
88 | .word sys_syncfs | ||
88 | 89 | ||
89 | #endif /* CONFIG_COMPAT */ | 90 | #endif /* CONFIG_COMPAT */ |
90 | 91 | ||
@@ -161,3 +162,4 @@ sys_call_table: | |||
161 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 162 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
162 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 163 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
163 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime | 164 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
165 | .word sys_syncfs | ||
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 95ec25faba39..2b8d54b2d850 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) | |||
442 | return platform_device_register(&rtc_cmos_device); | 442 | return platform_device_register(&rtc_cmos_device); |
443 | } | 443 | } |
444 | 444 | ||
445 | static struct of_device_id __initdata rtc_match[] = { | 445 | static const struct of_device_id rtc_match[] = { |
446 | { | 446 | { |
447 | .name = "rtc", | 447 | .name = "rtc", |
448 | .compatible = "m5819", | 448 | .compatible = "m5819", |
@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) | |||
487 | return platform_device_register(&rtc_bq4802_device); | 487 | return platform_device_register(&rtc_bq4802_device); |
488 | } | 488 | } |
489 | 489 | ||
490 | static struct of_device_id __initdata bq4802_match[] = { | 490 | static const struct of_device_id bq4802_match[] = { |
491 | { | 491 | { |
492 | .name = "rtc", | 492 | .name = "rtc", |
493 | .compatible = "bq4802", | 493 | .compatible = "bq4802", |
@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) | |||
552 | return platform_device_register(&m48t59_rtc); | 552 | return platform_device_register(&m48t59_rtc); |
553 | } | 553 | } |
554 | 554 | ||
555 | static struct of_device_id __initdata mostek_match[] = { | 555 | static const struct of_device_id mostek_match[] = { |
556 | { | 556 | { |
557 | .name = "eeprom", | 557 | .name = "eeprom", |
558 | }, | 558 | }, |
diff --git a/arch/sparc/math-emu/Makefile b/arch/sparc/math-emu/Makefile index b9085ecbb27b..825dbee94d84 100644 --- a/arch/sparc/math-emu/Makefile +++ b/arch/sparc/math-emu/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the FPU instruction emulation. | 2 | # Makefile for the FPU instruction emulation. |
3 | # | 3 | # |
4 | 4 | ||
5 | # supress all warnings - as math.c produces a lot! | 5 | # suppress all warnings - as math.c produces a lot! |
6 | ccflags-y := -w | 6 | ccflags-y := -w |
7 | 7 | ||
8 | obj-y := math_$(BITS).o | 8 | obj-y := math_$(BITS).o |
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 5e34a9fee9b3..e32b0c23c4c8 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -11,7 +11,6 @@ config TILE | |||
11 | select HAVE_GENERIC_HARDIRQS | 11 | select HAVE_GENERIC_HARDIRQS |
12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
13 | select GENERIC_PENDING_IRQ if SMP | 13 | select GENERIC_PENDING_IRQ if SMP |
14 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
15 | select GENERIC_IRQ_SHOW | 14 | select GENERIC_IRQ_SHOW |
16 | 15 | ||
17 | # FIXME: investigate whether we need/want these options. | 16 | # FIXME: investigate whether we need/want these options. |
@@ -52,7 +51,7 @@ config GENERIC_TIME | |||
52 | config GENERIC_CLOCKEVENTS | 51 | config GENERIC_CLOCKEVENTS |
53 | def_bool y | 52 | def_bool y |
54 | 53 | ||
55 | # FIXME: tilegx can implement a more efficent rwsem. | 54 | # FIXME: tilegx can implement a more efficient rwsem. |
56 | config RWSEM_GENERIC_SPINLOCK | 55 | config RWSEM_GENERIC_SPINLOCK |
57 | def_bool y | 56 | def_bool y |
58 | 57 | ||
diff --git a/arch/tile/include/hv/drv_xgbe_intf.h b/arch/tile/include/hv/drv_xgbe_intf.h index 146e47d5334b..f13188ac281a 100644 --- a/arch/tile/include/hv/drv_xgbe_intf.h +++ b/arch/tile/include/hv/drv_xgbe_intf.h | |||
@@ -319,7 +319,7 @@ typedef union | |||
319 | * is an error code, or zero if no error. The val0 member is the | 319 | * is an error code, or zero if no error. The val0 member is the |
320 | * updated value of seqno; it has been incremented by 1 for each | 320 | * updated value of seqno; it has been incremented by 1 for each |
321 | * packet sent. That increment may be less than nentries if an | 321 | * packet sent. That increment may be less than nentries if an |
322 | * error occured, or if some of the entries in the vector contain | 322 | * error occurred, or if some of the entries in the vector contain |
323 | * handles equal to NETIO_PKT_HANDLE_NONE. The val1 member is the | 323 | * handles equal to NETIO_PKT_HANDLE_NONE. The val1 member is the |
324 | * updated value of nentries; it has been decremented by 1 for each | 324 | * updated value of nentries; it has been decremented by 1 for each |
325 | * vector entry processed. Again, that decrement may be less than | 325 | * vector entry processed. Again, that decrement may be less than |
diff --git a/arch/tile/include/hv/hypervisor.h b/arch/tile/include/hv/hypervisor.h index 1b8bf03d62a0..ee41bca4c8c4 100644 --- a/arch/tile/include/hv/hypervisor.h +++ b/arch/tile/include/hv/hypervisor.h | |||
@@ -1340,7 +1340,7 @@ typedef struct | |||
1340 | * this operation. If any permanent delivery errors were encountered, | 1340 | * this operation. If any permanent delivery errors were encountered, |
1341 | * the routine returns HV_ERECIP. In the event of permanent delivery | 1341 | * the routine returns HV_ERECIP. In the event of permanent delivery |
1342 | * errors, it may be the case that delivery was not attempted to all | 1342 | * errors, it may be the case that delivery was not attempted to all |
1343 | * recipients; if any messages were succesfully delivered, however, | 1343 | * recipients; if any messages were successfully delivered, however, |
1344 | * recipients' state values will be updated appropriately. | 1344 | * recipients' state values will be updated appropriately. |
1345 | * | 1345 | * |
1346 | * It is explicitly legal to specify a recipient structure whose state | 1346 | * It is explicitly legal to specify a recipient structure whose state |
@@ -1359,7 +1359,7 @@ typedef struct | |||
1359 | * never call hv_receive_message, or could register a different state | 1359 | * never call hv_receive_message, or could register a different state |
1360 | * buffer, losing the message. | 1360 | * buffer, losing the message. |
1361 | * | 1361 | * |
1362 | * Specifiying the same recipient more than once in the recipient list | 1362 | * Specifying the same recipient more than once in the recipient list |
1363 | * is an error, which will not result in an error return but which may | 1363 | * is an error, which will not result in an error return but which may |
1364 | * or may not result in more than one message being delivered to the | 1364 | * or may not result in more than one message being delivered to the |
1365 | * recipient tile. | 1365 | * recipient tile. |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index a1ee25be9ad9..ea38f0c9ec7c 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * Initialization flow and process | 36 | * Initialization flow and process |
37 | * ------------------------------- | 37 | * ------------------------------- |
38 | * | 38 | * |
39 | * This files containes the routines to search for PCI buses, | 39 | * This files contains the routines to search for PCI buses, |
40 | * enumerate the buses, and configure any attached devices. | 40 | * enumerate the buses, and configure any attached devices. |
41 | * | 41 | * |
42 | * There are two entry points here: | 42 | * There are two entry points here: |
@@ -519,7 +519,7 @@ static int __devinit tile_cfg_read(struct pci_bus *bus, | |||
519 | 519 | ||
520 | 520 | ||
521 | /* | 521 | /* |
522 | * See tile_cfg_read() for relevent comments. | 522 | * See tile_cfg_read() for relevant comments. |
523 | * Note that "val" is the value to write, not a pointer to that value. | 523 | * Note that "val" is the value to write, not a pointer to that value. |
524 | */ | 524 | */ |
525 | static int __devinit tile_cfg_write(struct pci_bus *bus, | 525 | static int __devinit tile_cfg_write(struct pci_bus *bus, |
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c index 758f597f488c..51f8663bf074 100644 --- a/arch/tile/mm/fault.c +++ b/arch/tile/mm/fault.c | |||
@@ -290,7 +290,7 @@ static int handle_page_fault(struct pt_regs *regs, | |||
290 | /* | 290 | /* |
291 | * Early on, we need to check for migrating PTE entries; | 291 | * Early on, we need to check for migrating PTE entries; |
292 | * see homecache.c. If we find a migrating PTE, we wait until | 292 | * see homecache.c. If we find a migrating PTE, we wait until |
293 | * the backing page claims to be done migrating, then we procede. | 293 | * the backing page claims to be done migrating, then we proceed. |
294 | * For kernel PTEs, we rewrite the PTE and return and retry. | 294 | * For kernel PTEs, we rewrite the PTE and return and retry. |
295 | * Otherwise, we treat the fault like a normal "no PTE" fault, | 295 | * Otherwise, we treat the fault like a normal "no PTE" fault, |
296 | * rather than trying to patch up the existing PTE. | 296 | * rather than trying to patch up the existing PTE. |
diff --git a/arch/tile/mm/hugetlbpage.c b/arch/tile/mm/hugetlbpage.c index 201a582c4137..42cfcba4e1ef 100644 --- a/arch/tile/mm/hugetlbpage.c +++ b/arch/tile/mm/hugetlbpage.c | |||
@@ -219,7 +219,7 @@ try_again: | |||
219 | if (mm->free_area_cache < len) | 219 | if (mm->free_area_cache < len) |
220 | goto fail; | 220 | goto fail; |
221 | 221 | ||
222 | /* either no address requested or cant fit in requested address hole */ | 222 | /* either no address requested or can't fit in requested address hole */ |
223 | addr = (mm->free_area_cache - len) & huge_page_mask(h); | 223 | addr = (mm->free_area_cache - len) & huge_page_mask(h); |
224 | do { | 224 | do { |
225 | /* | 225 | /* |
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 109ddc0071c6..a9234838e8a2 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common | |||
@@ -7,7 +7,6 @@ config UML | |||
7 | bool | 7 | bool |
8 | default y | 8 | default y |
9 | select HAVE_GENERIC_HARDIRQS | 9 | select HAVE_GENERIC_HARDIRQS |
10 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
11 | select GENERIC_IRQ_SHOW | 10 | select GENERIC_IRQ_SHOW |
12 | 11 | ||
13 | config MMU | 12 | config MMU |
diff --git a/arch/um/Kconfig.net b/arch/um/Kconfig.net index 9e9a4aaa703d..3160b1a5adb7 100644 --- a/arch/um/Kconfig.net +++ b/arch/um/Kconfig.net | |||
@@ -186,7 +186,7 @@ config UML_NET_SLIRP | |||
186 | other transports, SLiRP works without the need of root level | 186 | other transports, SLiRP works without the need of root level |
187 | privleges, setuid binaries, or SLIP devices on the host. This | 187 | privleges, setuid binaries, or SLIP devices on the host. This |
188 | also means not every type of connection is possible, but most | 188 | also means not every type of connection is possible, but most |
189 | situations can be accomodated with carefully crafted slirp | 189 | situations can be accommodated with carefully crafted slirp |
190 | commands that can be passed along as part of the network device's | 190 | commands that can be passed along as part of the network device's |
191 | setup string. The effect of this transport on the UML is similar | 191 | setup string. The effect of this transport on the UML is similar |
192 | that of a host behind a firewall that masquerades all network | 192 | that of a host behind a firewall that masquerades all network |
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index 90a438acbfaf..b5e675e370c6 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um | |||
@@ -47,7 +47,7 @@ config HOSTFS | |||
47 | 47 | ||
48 | config HPPFS | 48 | config HPPFS |
49 | tristate "HoneyPot ProcFS (EXPERIMENTAL)" | 49 | tristate "HoneyPot ProcFS (EXPERIMENTAL)" |
50 | depends on EXPERIMENTAL | 50 | depends on EXPERIMENTAL && PROC_FS |
51 | help | 51 | help |
52 | hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc | 52 | hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc |
53 | entries to be overridden, removed, or fabricated from the host. | 53 | entries to be overridden, removed, or fabricated from the host. |
diff --git a/arch/um/Kconfig.x86 b/arch/um/Kconfig.x86 index 02fb017fed47..a9da516a5274 100644 --- a/arch/um/Kconfig.x86 +++ b/arch/um/Kconfig.x86 | |||
@@ -4,6 +4,10 @@ menu "UML-specific options" | |||
4 | 4 | ||
5 | menu "Host processor type and features" | 5 | menu "Host processor type and features" |
6 | 6 | ||
7 | config CMPXCHG_LOCAL | ||
8 | bool | ||
9 | default n | ||
10 | |||
7 | source "arch/x86/Kconfig.cpu" | 11 | source "arch/x86/Kconfig.cpu" |
8 | 12 | ||
9 | endmenu | 13 | endmenu |
diff --git a/arch/um/include/asm/bug.h b/arch/um/include/asm/bug.h new file mode 100644 index 000000000000..9e33b864c359 --- /dev/null +++ b/arch/um/include/asm/bug.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_BUG_H | ||
2 | #define __UM_BUG_H | ||
3 | |||
4 | #include <asm-generic/bug.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index e2cf786bda0a..5bd1bad33fab 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -49,7 +49,10 @@ static inline struct thread_info *current_thread_info(void) | |||
49 | { | 49 | { |
50 | struct thread_info *ti; | 50 | struct thread_info *ti; |
51 | unsigned long mask = THREAD_SIZE - 1; | 51 | unsigned long mask = THREAD_SIZE - 1; |
52 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); | 52 | void *p; |
53 | |||
54 | asm volatile ("" : "=r" (p) : "0" (&ti)); | ||
55 | ti = (struct thread_info *) (((unsigned long)p) & ~mask); | ||
53 | return ti; | 56 | return ti; |
54 | } | 57 | } |
55 | 58 | ||
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 804b28dd0328..b1da91c1b200 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | 5 | obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ |
6 | ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \ | 6 | ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \ |
7 | sys_call_table.o tls.o | 7 | sys_call_table.o tls.o atomic64_cx8_32.o |
8 | 8 | ||
9 | obj-$(CONFIG_BINFMT_ELF) += elfcore.o | 9 | obj-$(CONFIG_BINFMT_ELF) += elfcore.o |
10 | 10 | ||
diff --git a/arch/um/sys-i386/atomic64_cx8_32.S b/arch/um/sys-i386/atomic64_cx8_32.S new file mode 100644 index 000000000000..1e901d3d4a95 --- /dev/null +++ b/arch/um/sys-i386/atomic64_cx8_32.S | |||
@@ -0,0 +1,225 @@ | |||
1 | /* | ||
2 | * atomic64_t for 586+ | ||
3 | * | ||
4 | * Copied from arch/x86/lib/atomic64_cx8_32.S | ||
5 | * | ||
6 | * Copyright © 2010 Luca Barbieri | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/linkage.h> | ||
16 | #include <asm/alternative-asm.h> | ||
17 | #include <asm/dwarf2.h> | ||
18 | |||
19 | .macro SAVE reg | ||
20 | pushl_cfi %\reg | ||
21 | CFI_REL_OFFSET \reg, 0 | ||
22 | .endm | ||
23 | |||
24 | .macro RESTORE reg | ||
25 | popl_cfi %\reg | ||
26 | CFI_RESTORE \reg | ||
27 | .endm | ||
28 | |||
29 | .macro read64 reg | ||
30 | movl %ebx, %eax | ||
31 | movl %ecx, %edx | ||
32 | /* we need LOCK_PREFIX since otherwise cmpxchg8b always does the write */ | ||
33 | LOCK_PREFIX | ||
34 | cmpxchg8b (\reg) | ||
35 | .endm | ||
36 | |||
37 | ENTRY(atomic64_read_cx8) | ||
38 | CFI_STARTPROC | ||
39 | |||
40 | read64 %ecx | ||
41 | ret | ||
42 | CFI_ENDPROC | ||
43 | ENDPROC(atomic64_read_cx8) | ||
44 | |||
45 | ENTRY(atomic64_set_cx8) | ||
46 | CFI_STARTPROC | ||
47 | |||
48 | 1: | ||
49 | /* we don't need LOCK_PREFIX since aligned 64-bit writes | ||
50 | * are atomic on 586 and newer */ | ||
51 | cmpxchg8b (%esi) | ||
52 | jne 1b | ||
53 | |||
54 | ret | ||
55 | CFI_ENDPROC | ||
56 | ENDPROC(atomic64_set_cx8) | ||
57 | |||
58 | ENTRY(atomic64_xchg_cx8) | ||
59 | CFI_STARTPROC | ||
60 | |||
61 | movl %ebx, %eax | ||
62 | movl %ecx, %edx | ||
63 | 1: | ||
64 | LOCK_PREFIX | ||
65 | cmpxchg8b (%esi) | ||
66 | jne 1b | ||
67 | |||
68 | ret | ||
69 | CFI_ENDPROC | ||
70 | ENDPROC(atomic64_xchg_cx8) | ||
71 | |||
72 | .macro addsub_return func ins insc | ||
73 | ENTRY(atomic64_\func\()_return_cx8) | ||
74 | CFI_STARTPROC | ||
75 | SAVE ebp | ||
76 | SAVE ebx | ||
77 | SAVE esi | ||
78 | SAVE edi | ||
79 | |||
80 | movl %eax, %esi | ||
81 | movl %edx, %edi | ||
82 | movl %ecx, %ebp | ||
83 | |||
84 | read64 %ebp | ||
85 | 1: | ||
86 | movl %eax, %ebx | ||
87 | movl %edx, %ecx | ||
88 | \ins\()l %esi, %ebx | ||
89 | \insc\()l %edi, %ecx | ||
90 | LOCK_PREFIX | ||
91 | cmpxchg8b (%ebp) | ||
92 | jne 1b | ||
93 | |||
94 | 10: | ||
95 | movl %ebx, %eax | ||
96 | movl %ecx, %edx | ||
97 | RESTORE edi | ||
98 | RESTORE esi | ||
99 | RESTORE ebx | ||
100 | RESTORE ebp | ||
101 | ret | ||
102 | CFI_ENDPROC | ||
103 | ENDPROC(atomic64_\func\()_return_cx8) | ||
104 | .endm | ||
105 | |||
106 | addsub_return add add adc | ||
107 | addsub_return sub sub sbb | ||
108 | |||
109 | .macro incdec_return func ins insc | ||
110 | ENTRY(atomic64_\func\()_return_cx8) | ||
111 | CFI_STARTPROC | ||
112 | SAVE ebx | ||
113 | |||
114 | read64 %esi | ||
115 | 1: | ||
116 | movl %eax, %ebx | ||
117 | movl %edx, %ecx | ||
118 | \ins\()l $1, %ebx | ||
119 | \insc\()l $0, %ecx | ||
120 | LOCK_PREFIX | ||
121 | cmpxchg8b (%esi) | ||
122 | jne 1b | ||
123 | |||
124 | 10: | ||
125 | movl %ebx, %eax | ||
126 | movl %ecx, %edx | ||
127 | RESTORE ebx | ||
128 | ret | ||
129 | CFI_ENDPROC | ||
130 | ENDPROC(atomic64_\func\()_return_cx8) | ||
131 | .endm | ||
132 | |||
133 | incdec_return inc add adc | ||
134 | incdec_return dec sub sbb | ||
135 | |||
136 | ENTRY(atomic64_dec_if_positive_cx8) | ||
137 | CFI_STARTPROC | ||
138 | SAVE ebx | ||
139 | |||
140 | read64 %esi | ||
141 | 1: | ||
142 | movl %eax, %ebx | ||
143 | movl %edx, %ecx | ||
144 | subl $1, %ebx | ||
145 | sbb $0, %ecx | ||
146 | js 2f | ||
147 | LOCK_PREFIX | ||
148 | cmpxchg8b (%esi) | ||
149 | jne 1b | ||
150 | |||
151 | 2: | ||
152 | movl %ebx, %eax | ||
153 | movl %ecx, %edx | ||
154 | RESTORE ebx | ||
155 | ret | ||
156 | CFI_ENDPROC | ||
157 | ENDPROC(atomic64_dec_if_positive_cx8) | ||
158 | |||
159 | ENTRY(atomic64_add_unless_cx8) | ||
160 | CFI_STARTPROC | ||
161 | SAVE ebp | ||
162 | SAVE ebx | ||
163 | /* these just push these two parameters on the stack */ | ||
164 | SAVE edi | ||
165 | SAVE esi | ||
166 | |||
167 | movl %ecx, %ebp | ||
168 | movl %eax, %esi | ||
169 | movl %edx, %edi | ||
170 | |||
171 | read64 %ebp | ||
172 | 1: | ||
173 | cmpl %eax, 0(%esp) | ||
174 | je 4f | ||
175 | 2: | ||
176 | movl %eax, %ebx | ||
177 | movl %edx, %ecx | ||
178 | addl %esi, %ebx | ||
179 | adcl %edi, %ecx | ||
180 | LOCK_PREFIX | ||
181 | cmpxchg8b (%ebp) | ||
182 | jne 1b | ||
183 | |||
184 | movl $1, %eax | ||
185 | 3: | ||
186 | addl $8, %esp | ||
187 | CFI_ADJUST_CFA_OFFSET -8 | ||
188 | RESTORE ebx | ||
189 | RESTORE ebp | ||
190 | ret | ||
191 | 4: | ||
192 | cmpl %edx, 4(%esp) | ||
193 | jne 2b | ||
194 | xorl %eax, %eax | ||
195 | jmp 3b | ||
196 | CFI_ENDPROC | ||
197 | ENDPROC(atomic64_add_unless_cx8) | ||
198 | |||
199 | ENTRY(atomic64_inc_not_zero_cx8) | ||
200 | CFI_STARTPROC | ||
201 | SAVE ebx | ||
202 | |||
203 | read64 %esi | ||
204 | 1: | ||
205 | testl %eax, %eax | ||
206 | je 4f | ||
207 | 2: | ||
208 | movl %eax, %ebx | ||
209 | movl %edx, %ecx | ||
210 | addl $1, %ebx | ||
211 | adcl $0, %ecx | ||
212 | LOCK_PREFIX | ||
213 | cmpxchg8b (%esi) | ||
214 | jne 1b | ||
215 | |||
216 | movl $1, %eax | ||
217 | 3: | ||
218 | RESTORE ebx | ||
219 | ret | ||
220 | 4: | ||
221 | testl %edx, %edx | ||
222 | jne 2b | ||
223 | jmp 3b | ||
224 | CFI_ENDPROC | ||
225 | ENDPROC(atomic64_inc_not_zero_cx8) | ||
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 04e024919b2b..d3a303246c9f 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig | |||
@@ -10,7 +10,6 @@ config UNICORE32 | |||
10 | select HAVE_KERNEL_LZMA | 10 | select HAVE_KERNEL_LZMA |
11 | select GENERIC_FIND_FIRST_BIT | 11 | select GENERIC_FIND_FIRST_BIT |
12 | select GENERIC_IRQ_PROBE | 12 | select GENERIC_IRQ_PROBE |
13 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
14 | select GENERIC_IRQ_SHOW | 13 | select GENERIC_IRQ_SHOW |
15 | select ARCH_WANT_FRAME_POINTERS | 14 | select ARCH_WANT_FRAME_POINTERS |
16 | help | 15 | help |
diff --git a/arch/unicore32/Makefile b/arch/unicore32/Makefile index e08d6d370a8a..76a8beec7d03 100644 --- a/arch/unicore32/Makefile +++ b/arch/unicore32/Makefile | |||
@@ -48,7 +48,7 @@ ASM_GENERIC_HEADERS += bitsperlong.h bug.h bugs.h | |||
48 | ASM_GENERIC_HEADERS += cputime.h current.h | 48 | ASM_GENERIC_HEADERS += cputime.h current.h |
49 | ASM_GENERIC_HEADERS += device.h div64.h | 49 | ASM_GENERIC_HEADERS += device.h div64.h |
50 | ASM_GENERIC_HEADERS += emergency-restart.h errno.h | 50 | ASM_GENERIC_HEADERS += emergency-restart.h errno.h |
51 | ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h | 51 | ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h futex.h |
52 | ASM_GENERIC_HEADERS += hardirq.h hw_irq.h | 52 | ASM_GENERIC_HEADERS += hardirq.h hw_irq.h |
53 | ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h | 53 | ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h |
54 | ASM_GENERIC_HEADERS += kdebug.h kmap_types.h | 54 | ASM_GENERIC_HEADERS += kdebug.h kmap_types.h |
diff --git a/arch/unicore32/include/asm/futex.h b/arch/unicore32/include/asm/futex.h deleted file mode 100644 index 07dea6170558..000000000000 --- a/arch/unicore32/include/asm/futex.h +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/unicore32/include/asm/futex.h | ||
3 | * | ||
4 | * Code specific to PKUnity SoC and UniCore ISA | ||
5 | * | ||
6 | * Copyright (C) 2001-2010 GUAN Xue-tao | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __UNICORE_FUTEX_H__ | ||
14 | #define __UNICORE_FUTEX_H__ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/futex.h> | ||
19 | #include <linux/preempt.h> | ||
20 | #include <linux/uaccess.h> | ||
21 | #include <linux/errno.h> | ||
22 | |||
23 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | ||
24 | __asm__ __volatile__( \ | ||
25 | "1: ldw.u %1, [%2]\n" \ | ||
26 | " " insn "\n" \ | ||
27 | "2: stw.u %0, [%2]\n" \ | ||
28 | " mov %0, #0\n" \ | ||
29 | "3:\n" \ | ||
30 | " .pushsection __ex_table,\"a\"\n" \ | ||
31 | " .align 3\n" \ | ||
32 | " .long 1b, 4f, 2b, 4f\n" \ | ||
33 | " .popsection\n" \ | ||
34 | " .pushsection .fixup,\"ax\"\n" \ | ||
35 | "4: mov %0, %4\n" \ | ||
36 | " b 3b\n" \ | ||
37 | " .popsection" \ | ||
38 | : "=&r" (ret), "=&r" (oldval) \ | ||
39 | : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ | ||
40 | : "cc", "memory") | ||
41 | |||
42 | static inline int | ||
43 | futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | ||
44 | { | ||
45 | int op = (encoded_op >> 28) & 7; | ||
46 | int cmp = (encoded_op >> 24) & 15; | ||
47 | int oparg = (encoded_op << 8) >> 20; | ||
48 | int cmparg = (encoded_op << 20) >> 20; | ||
49 | int oldval = 0, ret; | ||
50 | |||
51 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
52 | oparg = 1 << oparg; | ||
53 | |||
54 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
55 | return -EFAULT; | ||
56 | |||
57 | pagefault_disable(); /* implies preempt_disable() */ | ||
58 | |||
59 | switch (op) { | ||
60 | case FUTEX_OP_SET: | ||
61 | __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); | ||
62 | break; | ||
63 | case FUTEX_OP_ADD: | ||
64 | __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); | ||
65 | break; | ||
66 | case FUTEX_OP_OR: | ||
67 | __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); | ||
68 | break; | ||
69 | case FUTEX_OP_ANDN: | ||
70 | __futex_atomic_op("and %0, %1, %3", | ||
71 | ret, oldval, uaddr, ~oparg); | ||
72 | break; | ||
73 | case FUTEX_OP_XOR: | ||
74 | __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); | ||
75 | break; | ||
76 | default: | ||
77 | ret = -ENOSYS; | ||
78 | } | ||
79 | |||
80 | pagefault_enable(); /* subsumes preempt_enable() */ | ||
81 | |||
82 | if (!ret) { | ||
83 | switch (cmp) { | ||
84 | case FUTEX_OP_CMP_EQ: | ||
85 | ret = (oldval == cmparg); | ||
86 | break; | ||
87 | case FUTEX_OP_CMP_NE: | ||
88 | ret = (oldval != cmparg); | ||
89 | break; | ||
90 | case FUTEX_OP_CMP_LT: | ||
91 | ret = (oldval < cmparg); | ||
92 | break; | ||
93 | case FUTEX_OP_CMP_GE: | ||
94 | ret = (oldval >= cmparg); | ||
95 | break; | ||
96 | case FUTEX_OP_CMP_LE: | ||
97 | ret = (oldval <= cmparg); | ||
98 | break; | ||
99 | case FUTEX_OP_CMP_GT: | ||
100 | ret = (oldval > cmparg); | ||
101 | break; | ||
102 | default: | ||
103 | ret = -ENOSYS; | ||
104 | } | ||
105 | } | ||
106 | return ret; | ||
107 | } | ||
108 | |||
109 | static inline int | ||
110 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | ||
111 | { | ||
112 | int val; | ||
113 | |||
114 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
115 | return -EFAULT; | ||
116 | |||
117 | pagefault_disable(); /* implies preempt_disable() */ | ||
118 | |||
119 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" | ||
120 | "1: ldw.u %0, [%3]\n" | ||
121 | " cmpxor.a %0, %1\n" | ||
122 | " bne 3f\n" | ||
123 | "2: stw.u %2, [%3]\n" | ||
124 | "3:\n" | ||
125 | " .pushsection __ex_table,\"a\"\n" | ||
126 | " .align 3\n" | ||
127 | " .long 1b, 4f, 2b, 4f\n" | ||
128 | " .popsection\n" | ||
129 | " .pushsection .fixup,\"ax\"\n" | ||
130 | "4: mov %0, %4\n" | ||
131 | " b 3b\n" | ||
132 | " .popsection" | ||
133 | : "=&r" (val) | ||
134 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) | ||
135 | : "cc", "memory"); | ||
136 | |||
137 | pagefault_enable(); /* subsumes preempt_enable() */ | ||
138 | |||
139 | return val; | ||
140 | } | ||
141 | |||
142 | #endif /* __KERNEL__ */ | ||
143 | #endif /* __UNICORE_FUTEX_H__ */ | ||
diff --git a/arch/unicore32/include/mach/PKUnity.h b/arch/unicore32/include/mach/PKUnity.h index a18bdc3810e6..8040d575dddb 100644 --- a/arch/unicore32/include/mach/PKUnity.h +++ b/arch/unicore32/include/mach/PKUnity.h | |||
@@ -24,16 +24,6 @@ | |||
24 | #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ | 24 | #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB) | ||
28 | * 0x0D000000 - 0x0DFFFFFF 16MB: for UVC | ||
29 | * 0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX | ||
30 | */ | ||
31 | #define PKUNITY_UVC_MMAP_BASE 0x0D000000 | ||
32 | #define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */ | ||
33 | #define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 | ||
34 | #define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */ | ||
35 | |||
36 | /* | ||
37 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) | 27 | * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) |
38 | * 0x80000000 - 0x8000000B 12B PCI Configuration regs | 28 | * 0x80000000 - 0x8000000B 12B PCI Configuration regs |
39 | * 0x80010000 - 0x80010250 592B PCI Bridge Base | 29 | * 0x80010000 - 0x80010250 592B PCI Bridge Base |
diff --git a/arch/unicore32/include/mach/memory.h b/arch/unicore32/include/mach/memory.h index 0bf21c944710..4be72c21d491 100644 --- a/arch/unicore32/include/mach/memory.h +++ b/arch/unicore32/include/mach/memory.h | |||
@@ -50,7 +50,6 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes); | |||
50 | 50 | ||
51 | /* kuser area */ | 51 | /* kuser area */ |
52 | #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) | 52 | #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) |
53 | #define KUSER_UNIGFX_BASE (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE) | ||
54 | /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ | 53 | /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ |
55 | #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ | 54 | #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ |
56 | + (VECTORS_BASE)) | 55 | + (VECTORS_BASE)) |
diff --git a/arch/unicore32/include/mach/regs-umal.h b/arch/unicore32/include/mach/regs-umal.h index 885bb62fee71..aa22df74e11d 100644 --- a/arch/unicore32/include/mach/regs-umal.h +++ b/arch/unicore32/include/mach/regs-umal.h | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | #define UMAL_MIISTATUS (PKUNITY_UMAL_BASE + 0x0030) | 53 | #define UMAL_MIISTATUS (PKUNITY_UMAL_BASE + 0x0030) |
54 | /* | 54 | /* |
55 | * MII Managment Indicator UMAL_MIIIDCT | 55 | * MII Management Indicator UMAL_MIIIDCT |
56 | */ | 56 | */ |
57 | #define UMAL_MIIIDCT (PKUNITY_UMAL_BASE + 0x0034) | 57 | #define UMAL_MIIIDCT (PKUNITY_UMAL_BASE + 0x0034) |
58 | /* | 58 | /* |
@@ -91,7 +91,7 @@ | |||
91 | #define UMAL_FIFORAM6 (PKUNITY_UMAL_BASE + 0x0078) | 91 | #define UMAL_FIFORAM6 (PKUNITY_UMAL_BASE + 0x0078) |
92 | #define UMAL_FIFORAM7 (PKUNITY_UMAL_BASE + 0x007c) | 92 | #define UMAL_FIFORAM7 (PKUNITY_UMAL_BASE + 0x007c) |
93 | 93 | ||
94 | /* MAHBE MODUEL OF UMAL */ | 94 | /* MAHBE MODULE OF UMAL */ |
95 | /* UMAL's MAHBE module interfaces to the host system through 32-bit AHB Master | 95 | /* UMAL's MAHBE module interfaces to the host system through 32-bit AHB Master |
96 | * and Slave ports.Registers within the M-AHBE provide Control and Status | 96 | * and Slave ports.Registers within the M-AHBE provide Control and Status |
97 | * information concerning these transfers. | 97 | * information concerning these transfers. |
diff --git a/arch/unicore32/kernel/head.S b/arch/unicore32/kernel/head.S index 92255f3ab6a7..8caf322e110d 100644 --- a/arch/unicore32/kernel/head.S +++ b/arch/unicore32/kernel/head.S | |||
@@ -164,7 +164,7 @@ ENTRY(stext) | |||
164 | ENDPROC(stext) | 164 | ENDPROC(stext) |
165 | 165 | ||
166 | /* | 166 | /* |
167 | * Enable the MMU. This completely changes the stucture of the visible | 167 | * Enable the MMU. This completely changes the structure of the visible |
168 | * memory space. You will not be able to trace execution through this. | 168 | * memory space. You will not be able to trace execution through this. |
169 | * | 169 | * |
170 | * r0 = cp#0 control register | 170 | * r0 = cp#0 control register |
diff --git a/arch/unicore32/kernel/puv3-core.c b/arch/unicore32/kernel/puv3-core.c index 8b1b6beb858e..1a505a787765 100644 --- a/arch/unicore32/kernel/puv3-core.c +++ b/arch/unicore32/kernel/puv3-core.c | |||
@@ -99,11 +99,6 @@ static struct resource puv3_unigfx_resources[] = { | |||
99 | .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, | 99 | .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, |
100 | .flags = IORESOURCE_MEM, | 100 | .flags = IORESOURCE_MEM, |
101 | }, | 101 | }, |
102 | [1] = { | ||
103 | .start = PKUNITY_UNIGFX_MMAP_BASE, | ||
104 | .end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE, | ||
105 | .flags = IORESOURCE_MEM, | ||
106 | }, | ||
107 | }; | 102 | }; |
108 | 103 | ||
109 | static struct resource puv3_rtc_resources[] = { | 104 | static struct resource puv3_rtc_resources[] = { |
diff --git a/arch/unicore32/kernel/rtc.c b/arch/unicore32/kernel/rtc.c index c5f068295b51..8cad70b3302c 100644 --- a/arch/unicore32/kernel/rtc.c +++ b/arch/unicore32/kernel/rtc.c | |||
@@ -88,11 +88,6 @@ static int puv3_rtc_setpie(struct device *dev, int enabled) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static int puv3_rtc_setfreq(struct device *dev, int freq) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | /* Time read/write */ | 91 | /* Time read/write */ |
97 | 92 | ||
98 | static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | 93 | static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) |
@@ -214,8 +209,6 @@ static const struct rtc_class_ops puv3_rtcops = { | |||
214 | .set_time = puv3_rtc_settime, | 209 | .set_time = puv3_rtc_settime, |
215 | .read_alarm = puv3_rtc_getalarm, | 210 | .read_alarm = puv3_rtc_getalarm, |
216 | .set_alarm = puv3_rtc_setalarm, | 211 | .set_alarm = puv3_rtc_setalarm, |
217 | .irq_set_freq = puv3_rtc_setfreq, | ||
218 | .irq_set_state = puv3_rtc_setpie, | ||
219 | .proc = puv3_rtc_proc, | 212 | .proc = puv3_rtc_proc, |
220 | }; | 213 | }; |
221 | 214 | ||
@@ -294,8 +287,6 @@ static int puv3_rtc_probe(struct platform_device *pdev) | |||
294 | 287 | ||
295 | puv3_rtc_enable(pdev, 1); | 288 | puv3_rtc_enable(pdev, 1); |
296 | 289 | ||
297 | puv3_rtc_setfreq(&pdev->dev, 1); | ||
298 | |||
299 | /* register RTC and exit */ | 290 | /* register RTC and exit */ |
300 | 291 | ||
301 | rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops, | 292 | rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops, |
diff --git a/arch/unicore32/kernel/setup.c b/arch/unicore32/kernel/setup.c index 1e175a82844d..471b6bca8da4 100644 --- a/arch/unicore32/kernel/setup.c +++ b/arch/unicore32/kernel/setup.c | |||
@@ -64,12 +64,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | |||
64 | */ | 64 | */ |
65 | static struct resource mem_res[] = { | 65 | static struct resource mem_res[] = { |
66 | { | 66 | { |
67 | .name = "Video RAM", | ||
68 | .start = 0, | ||
69 | .end = 0, | ||
70 | .flags = IORESOURCE_MEM | ||
71 | }, | ||
72 | { | ||
73 | .name = "Kernel text", | 67 | .name = "Kernel text", |
74 | .start = 0, | 68 | .start = 0, |
75 | .end = 0, | 69 | .end = 0, |
@@ -83,9 +77,8 @@ static struct resource mem_res[] = { | |||
83 | } | 77 | } |
84 | }; | 78 | }; |
85 | 79 | ||
86 | #define video_ram mem_res[0] | 80 | #define kernel_code mem_res[0] |
87 | #define kernel_code mem_res[1] | 81 | #define kernel_data mem_res[1] |
88 | #define kernel_data mem_res[2] | ||
89 | 82 | ||
90 | /* | 83 | /* |
91 | * These functions re-use the assembly code in head.S, which | 84 | * These functions re-use the assembly code in head.S, which |
@@ -224,10 +217,6 @@ request_standard_resources(struct meminfo *mi) | |||
224 | kernel_data.end <= res->end) | 217 | kernel_data.end <= res->end) |
225 | request_resource(res, &kernel_data); | 218 | request_resource(res, &kernel_data); |
226 | } | 219 | } |
227 | |||
228 | video_ram.start = PKUNITY_UNIGFX_MMAP_BASE; | ||
229 | video_ram.end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE; | ||
230 | request_resource(&iomem_resource, &video_ram); | ||
231 | } | 220 | } |
232 | 221 | ||
233 | static void (*init_machine)(void) __initdata; | 222 | static void (*init_machine)(void) __initdata; |
diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c index 25abbb101729..254e36fa9513 100644 --- a/arch/unicore32/kernel/traps.c +++ b/arch/unicore32/kernel/traps.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/hardirq.h> | 23 | #include <linux/hardirq.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/uaccess.h> | ||
26 | #include <linux/atomic.h> | 25 | #include <linux/atomic.h> |
27 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
28 | 27 | ||
diff --git a/arch/unicore32/kernel/vmlinux.lds.S b/arch/unicore32/kernel/vmlinux.lds.S index 0b4eb89729e7..9bf7f7af52c5 100644 --- a/arch/unicore32/kernel/vmlinux.lds.S +++ b/arch/unicore32/kernel/vmlinux.lds.S | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
15 | #include <asm/memory.h> | 15 | #include <asm/memory.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/cache.h> | ||
17 | 18 | ||
18 | OUTPUT_ARCH(unicore32) | 19 | OUTPUT_ARCH(unicore32) |
19 | ENTRY(stext) | 20 | ENTRY(stext) |
@@ -29,7 +30,7 @@ SECTIONS | |||
29 | HEAD_TEXT_SECTION | 30 | HEAD_TEXT_SECTION |
30 | INIT_TEXT_SECTION(PAGE_SIZE) | 31 | INIT_TEXT_SECTION(PAGE_SIZE) |
31 | INIT_DATA_SECTION(16) | 32 | INIT_DATA_SECTION(16) |
32 | PERCPU(PAGE_SIZE) | 33 | PERCPU(L1_CACHE_BYTES, PAGE_SIZE) |
33 | __init_end = .; | 34 | __init_end = .; |
34 | 35 | ||
35 | _stext = .; | 36 | _stext = .; |
@@ -45,10 +46,10 @@ SECTIONS | |||
45 | 46 | ||
46 | _sdata = .; | 47 | _sdata = .; |
47 | RO_DATA_SECTION(PAGE_SIZE) | 48 | RO_DATA_SECTION(PAGE_SIZE) |
48 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) | 49 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
49 | _edata = .; | 50 | _edata = .; |
50 | 51 | ||
51 | EXCEPTION_TABLE(32) | 52 | EXCEPTION_TABLE(L1_CACHE_BYTES) |
52 | NOTES | 53 | NOTES |
53 | 54 | ||
54 | BSS_SECTION(0, 0, 0) | 55 | BSS_SECTION(0, 0, 0) |
diff --git a/arch/unicore32/mm/mmu.c b/arch/unicore32/mm/mmu.c index 7bf3d588631f..db2d334941b4 100644 --- a/arch/unicore32/mm/mmu.c +++ b/arch/unicore32/mm/mmu.c | |||
@@ -338,15 +338,6 @@ void __init uc32_mm_memblock_reserve(void) | |||
338 | * and can only be in node 0. | 338 | * and can only be in node 0. |
339 | */ | 339 | */ |
340 | memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); | 340 | memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); |
341 | |||
342 | #ifdef CONFIG_PUV3_UNIGFX | ||
343 | /* | ||
344 | * These should likewise go elsewhere. They pre-reserve the | ||
345 | * screen/video memory region at the 48M~64M of main system memory. | ||
346 | */ | ||
347 | memblock_reserve(PKUNITY_UNIGFX_MMAP_BASE, PKUNITY_UNIGFX_MMAP_SIZE); | ||
348 | memblock_reserve(PKUNITY_UVC_MMAP_BASE, PKUNITY_UVC_MMAP_SIZE); | ||
349 | #endif | ||
350 | } | 341 | } |
351 | 342 | ||
352 | /* | 343 | /* |
@@ -371,17 +362,6 @@ static void __init devicemaps_init(void) | |||
371 | pmd_clear(pmd_off_k(addr)); | 362 | pmd_clear(pmd_off_k(addr)); |
372 | 363 | ||
373 | /* | 364 | /* |
374 | * Create a mapping for UniGFX VRAM | ||
375 | */ | ||
376 | #ifdef CONFIG_PUV3_UNIGFX | ||
377 | map.pfn = __phys_to_pfn(PKUNITY_UNIGFX_MMAP_BASE); | ||
378 | map.virtual = KUSER_UNIGFX_BASE; | ||
379 | map.length = PKUNITY_UNIGFX_MMAP_SIZE; | ||
380 | map.type = MT_KUSER; | ||
381 | create_mapping(&map); | ||
382 | #endif | ||
383 | |||
384 | /* | ||
385 | * Create a mapping for the machine vectors at the high-vectors | 365 | * Create a mapping for the machine vectors at the high-vectors |
386 | * location (0xffff0000). If we aren't using high-vectors, also | 366 | * location (0xffff0000). If we aren't using high-vectors, also |
387 | * create a mapping at the low-vectors virtual address. | 367 | * create a mapping at the low-vectors virtual address. |
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index cae3feb1035e..db75d07c3645 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c | |||
@@ -91,7 +91,7 @@ static int detect_memory_e801(void) | |||
91 | if (oreg.ax > 15*1024) { | 91 | if (oreg.ax > 15*1024) { |
92 | return -1; /* Bogus! */ | 92 | return -1; /* Bogus! */ |
93 | } else if (oreg.ax == 15*1024) { | 93 | } else if (oreg.ax == 15*1024) { |
94 | boot_params.alt_mem_k = (oreg.dx << 6) + oreg.ax; | 94 | boot_params.alt_mem_k = (oreg.bx << 6) + oreg.ax; |
95 | } else { | 95 | } else { |
96 | /* | 96 | /* |
97 | * This ignores memory above 16MB if we have a memory | 97 | * This ignores memory above 16MB if we have a memory |
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index a279d98ea95e..2b7d573be549 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_X86_APIC_H | 2 | #define _ASM_X86_APIC_H |
3 | 3 | ||
4 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
5 | #include <linux/delay.h> | ||
6 | #include <linux/pm.h> | 5 | #include <linux/pm.h> |
7 | 6 | ||
8 | #include <asm/alternative.h> | 7 | #include <asm/alternative.h> |
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h index 97b6d8114a43..057099e5faba 100644 --- a/arch/x86/include/asm/dma.h +++ b/arch/x86/include/asm/dma.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/spinlock.h> /* And spinlocks */ | 11 | #include <linux/spinlock.h> /* And spinlocks */ |
12 | #include <asm/io.h> /* need byte IO */ | 12 | #include <asm/io.h> /* need byte IO */ |
13 | #include <linux/delay.h> | ||
14 | 13 | ||
15 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER | 14 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER |
16 | #define dma_outb outb_p | 15 | #define dma_outb outb_p |
diff --git a/arch/x86/include/asm/gart.h b/arch/x86/include/asm/gart.h index 43085bfc99c3..156cd5d18d2a 100644 --- a/arch/x86/include/asm/gart.h +++ b/arch/x86/include/asm/gart.h | |||
@@ -66,7 +66,7 @@ static inline void gart_set_size_and_enable(struct pci_dev *dev, u32 order) | |||
66 | * Don't enable translation but enable GART IO and CPU accesses. | 66 | * Don't enable translation but enable GART IO and CPU accesses. |
67 | * Also, set DISTLBWALKPRB since GART tables memory is UC. | 67 | * Also, set DISTLBWALKPRB since GART tables memory is UC. |
68 | */ | 68 | */ |
69 | ctl = DISTLBWALKPRB | order << 1; | 69 | ctl = order << 1; |
70 | 70 | ||
71 | pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl); | 71 | pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl); |
72 | } | 72 | } |
@@ -75,17 +75,17 @@ static inline void enable_gart_translation(struct pci_dev *dev, u64 addr) | |||
75 | { | 75 | { |
76 | u32 tmp, ctl; | 76 | u32 tmp, ctl; |
77 | 77 | ||
78 | /* address of the mappings table */ | 78 | /* address of the mappings table */ |
79 | addr >>= 12; | 79 | addr >>= 12; |
80 | tmp = (u32) addr<<4; | 80 | tmp = (u32) addr<<4; |
81 | tmp &= ~0xf; | 81 | tmp &= ~0xf; |
82 | pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp); | 82 | pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp); |
83 | 83 | ||
84 | /* Enable GART translation for this hammer. */ | 84 | /* Enable GART translation for this hammer. */ |
85 | pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl); | 85 | pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl); |
86 | ctl |= GARTEN; | 86 | ctl |= GARTEN | DISTLBWALKPRB; |
87 | ctl &= ~(DISGARTCPU | DISGARTIO); | 87 | ctl &= ~(DISGARTCPU | DISGARTIO); |
88 | pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl); | 88 | pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl); |
89 | } | 89 | } |
90 | 90 | ||
91 | static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size) | 91 | static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size) |
diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index ef328901c802..c9e09ea05644 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h | |||
@@ -237,7 +237,7 @@ static inline void fpu_save_init(struct fpu *fpu) | |||
237 | } else if (use_fxsr()) { | 237 | } else if (use_fxsr()) { |
238 | fpu_fxsave(fpu); | 238 | fpu_fxsave(fpu); |
239 | } else { | 239 | } else { |
240 | asm volatile("fsave %[fx]; fwait" | 240 | asm volatile("fnsave %[fx]; fwait" |
241 | : [fx] "=m" (fpu->state->fsave)); | 241 | : [fx] "=m" (fpu->state->fsave)); |
242 | return; | 242 | return; |
243 | } | 243 | } |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index c4bd267dfc50..a97a240f67f3 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -150,7 +150,7 @@ void setup_IO_APIC_irq_extra(u32 gsi); | |||
150 | extern void ioapic_and_gsi_init(void); | 150 | extern void ioapic_and_gsi_init(void); |
151 | extern void ioapic_insert_resources(void); | 151 | extern void ioapic_insert_resources(void); |
152 | 152 | ||
153 | int io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr); | 153 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); |
154 | 154 | ||
155 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); | 155 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); |
156 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); | 156 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index fd5a1f365c95..3cce71413d0b 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
@@ -96,11 +96,15 @@ | |||
96 | #define MSR_IA32_MC0_ADDR 0x00000402 | 96 | #define MSR_IA32_MC0_ADDR 0x00000402 |
97 | #define MSR_IA32_MC0_MISC 0x00000403 | 97 | #define MSR_IA32_MC0_MISC 0x00000403 |
98 | 98 | ||
99 | #define MSR_AMD64_MC0_MASK 0xc0010044 | ||
100 | |||
99 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) | 101 | #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) |
100 | #define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) | 102 | #define MSR_IA32_MCx_STATUS(x) (MSR_IA32_MC0_STATUS + 4*(x)) |
101 | #define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) | 103 | #define MSR_IA32_MCx_ADDR(x) (MSR_IA32_MC0_ADDR + 4*(x)) |
102 | #define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) | 104 | #define MSR_IA32_MCx_MISC(x) (MSR_IA32_MC0_MISC + 4*(x)) |
103 | 105 | ||
106 | #define MSR_AMD64_MCx_MASK(x) (MSR_AMD64_MC0_MASK + (x)) | ||
107 | |||
104 | /* These are consecutive and not in the normal 4er MCE bank block */ | 108 | /* These are consecutive and not in the normal 4er MCE bank block */ |
105 | #define MSR_IA32_MC0_CTL2 0x00000280 | 109 | #define MSR_IA32_MC0_CTL2 0x00000280 |
106 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) | 110 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) |
diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index 3d4dab43c994..a50fc9f493b3 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h | |||
@@ -51,7 +51,7 @@ static inline void numa_remove_cpu(int cpu) { } | |||
51 | #endif /* CONFIG_NUMA */ | 51 | #endif /* CONFIG_NUMA */ |
52 | 52 | ||
53 | #ifdef CONFIG_DEBUG_PER_CPU_MAPS | 53 | #ifdef CONFIG_DEBUG_PER_CPU_MAPS |
54 | struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable); | 54 | void debug_cpumask_set_cpu(int cpu, int node, bool enable); |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #endif /* _ASM_X86_NUMA_H */ | 57 | #endif /* _ASM_X86_NUMA_H */ |
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 6801959a8b2a..4c39baa8facc 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c | |||
@@ -21,7 +21,7 @@ const struct pci_device_id amd_nb_misc_ids[] = { | |||
21 | EXPORT_SYMBOL(amd_nb_misc_ids); | 21 | EXPORT_SYMBOL(amd_nb_misc_ids); |
22 | 22 | ||
23 | static struct pci_device_id amd_nb_link_ids[] = { | 23 | static struct pci_device_id amd_nb_link_ids[] = { |
24 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_LINK) }, | 24 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, |
25 | {} | 25 | {} |
26 | }; | 26 | }; |
27 | 27 | ||
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 1293c709ee85..cd1ffed4ee22 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
@@ -316,7 +316,7 @@ static void apbt_setup_irq(struct apbt_dev *adev) | |||
316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); | 316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); |
317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); | 317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); |
318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ | 318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ |
319 | __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge"); | 319 | __irq_set_handler(adev->irq, handle_edge_irq, 0, "edge"); |
320 | 320 | ||
321 | if (system_state == SYSTEM_BOOTING) { | 321 | if (system_state == SYSTEM_BOOTING) { |
322 | if (request_irq(adev->irq, apbt_interrupt_handler, | 322 | if (request_irq(adev->irq, apbt_interrupt_handler, |
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 86d1ad4962a7..73fb469908c6 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -499,7 +499,7 @@ out: | |||
499 | * Don't enable translation yet but enable GART IO and CPU | 499 | * Don't enable translation yet but enable GART IO and CPU |
500 | * accesses and set DISTLBWALKPRB since GART table memory is UC. | 500 | * accesses and set DISTLBWALKPRB since GART table memory is UC. |
501 | */ | 501 | */ |
502 | u32 ctl = DISTLBWALKPRB | aper_order << 1; | 502 | u32 ctl = aper_order << 1; |
503 | 503 | ||
504 | bus = amd_nb_bus_dev_ranges[i].bus; | 504 | bus = amd_nb_bus_dev_ranges[i].bus; |
505 | dev_base = amd_nb_bus_dev_ranges[i].dev_base; | 505 | dev_base = amd_nb_bus_dev_ranges[i].dev_base; |
diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c index c4e557a1ebb6..5260fe91bcb6 100644 --- a/arch/x86/kernel/apic/hw_nmi.c +++ b/arch/x86/kernel/apic/hw_nmi.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
17 | #include <linux/nmi.h> | 17 | #include <linux/nmi.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/delay.h> | ||
19 | 20 | ||
20 | #ifdef CONFIG_HARDLOCKUP_DETECTOR | 21 | #ifdef CONFIG_HARDLOCKUP_DETECTOR |
21 | u64 hw_nmi_get_sample_period(void) | 22 | u64 hw_nmi_get_sample_period(void) |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 68df09bba92e..45fd33d1fd3a 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -128,8 +128,8 @@ static int __init parse_noapic(char *str) | |||
128 | } | 128 | } |
129 | early_param("noapic", parse_noapic); | 129 | early_param("noapic", parse_noapic); |
130 | 130 | ||
131 | static int io_apic_setup_irq_pin_once(unsigned int irq, int node, | 131 | static int io_apic_setup_irq_pin(unsigned int irq, int node, |
132 | struct io_apic_irq_attr *attr); | 132 | struct io_apic_irq_attr *attr); |
133 | 133 | ||
134 | /* Will be called in mpparse/acpi/sfi codes for saving IRQ info */ | 134 | /* Will be called in mpparse/acpi/sfi codes for saving IRQ info */ |
135 | void mp_save_irq(struct mpc_intsrc *m) | 135 | void mp_save_irq(struct mpc_intsrc *m) |
@@ -3570,7 +3570,7 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
3570 | } | 3570 | } |
3571 | #endif /* CONFIG_HT_IRQ */ | 3571 | #endif /* CONFIG_HT_IRQ */ |
3572 | 3572 | ||
3573 | int | 3573 | static int |
3574 | io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr) | 3574 | io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr) |
3575 | { | 3575 | { |
3576 | struct irq_cfg *cfg = alloc_irq_and_cfg_at(irq, node); | 3576 | struct irq_cfg *cfg = alloc_irq_and_cfg_at(irq, node); |
@@ -3585,8 +3585,8 @@ io_apic_setup_irq_pin(unsigned int irq, int node, struct io_apic_irq_attr *attr) | |||
3585 | return ret; | 3585 | return ret; |
3586 | } | 3586 | } |
3587 | 3587 | ||
3588 | static int io_apic_setup_irq_pin_once(unsigned int irq, int node, | 3588 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, |
3589 | struct io_apic_irq_attr *attr) | 3589 | struct io_apic_irq_attr *attr) |
3590 | { | 3590 | { |
3591 | unsigned int id = attr->ioapic, pin = attr->ioapic_pin; | 3591 | unsigned int id = attr->ioapic, pin = attr->ioapic_pin; |
3592 | int ret; | 3592 | int ret; |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 3c289281394c..33b10a0fc095 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/kdebug.h> | 25 | #include <linux/kdebug.h> |
26 | #include <linux/delay.h> | ||
27 | #include <linux/crash_dump.h> | ||
26 | 28 | ||
27 | #include <asm/uv/uv_mmrs.h> | 29 | #include <asm/uv/uv_mmrs.h> |
28 | #include <asm/uv/uv_hub.h> | 30 | #include <asm/uv/uv_hub.h> |
@@ -34,6 +36,7 @@ | |||
34 | #include <asm/ipi.h> | 36 | #include <asm/ipi.h> |
35 | #include <asm/smp.h> | 37 | #include <asm/smp.h> |
36 | #include <asm/x86_init.h> | 38 | #include <asm/x86_init.h> |
39 | #include <asm/emergency-restart.h> | ||
37 | 40 | ||
38 | DEFINE_PER_CPU(int, x2apic_extra_bits); | 41 | DEFINE_PER_CPU(int, x2apic_extra_bits); |
39 | 42 | ||
@@ -810,4 +813,11 @@ void __init uv_system_init(void) | |||
810 | 813 | ||
811 | /* register Legacy VGA I/O redirection handler */ | 814 | /* register Legacy VGA I/O redirection handler */ |
812 | pci_register_set_vga_state(uv_set_vga_state); | 815 | pci_register_set_vga_state(uv_set_vga_state); |
816 | |||
817 | /* | ||
818 | * For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as | ||
819 | * EFI is not enabled in the kdump kernel. | ||
820 | */ | ||
821 | if (is_kdump_kernel()) | ||
822 | reboot_type = BOOT_ACPI; | ||
813 | } | 823 | } |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 0b4be431c620..adee12e0da1f 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -228,6 +228,7 @@ | |||
228 | #include <linux/kthread.h> | 228 | #include <linux/kthread.h> |
229 | #include <linux/jiffies.h> | 229 | #include <linux/jiffies.h> |
230 | #include <linux/acpi.h> | 230 | #include <linux/acpi.h> |
231 | #include <linux/syscore_ops.h> | ||
231 | 232 | ||
232 | #include <asm/system.h> | 233 | #include <asm/system.h> |
233 | #include <asm/uaccess.h> | 234 | #include <asm/uaccess.h> |
@@ -1238,6 +1239,7 @@ static int suspend(int vetoable) | |||
1238 | 1239 | ||
1239 | local_irq_disable(); | 1240 | local_irq_disable(); |
1240 | sysdev_suspend(PMSG_SUSPEND); | 1241 | sysdev_suspend(PMSG_SUSPEND); |
1242 | syscore_suspend(); | ||
1241 | 1243 | ||
1242 | local_irq_enable(); | 1244 | local_irq_enable(); |
1243 | 1245 | ||
@@ -1255,6 +1257,7 @@ static int suspend(int vetoable) | |||
1255 | apm_error("suspend", err); | 1257 | apm_error("suspend", err); |
1256 | err = (err == APM_SUCCESS) ? 0 : -EIO; | 1258 | err = (err == APM_SUCCESS) ? 0 : -EIO; |
1257 | 1259 | ||
1260 | syscore_resume(); | ||
1258 | sysdev_resume(); | 1261 | sysdev_resume(); |
1259 | local_irq_enable(); | 1262 | local_irq_enable(); |
1260 | 1263 | ||
@@ -1280,6 +1283,7 @@ static void standby(void) | |||
1280 | 1283 | ||
1281 | local_irq_disable(); | 1284 | local_irq_disable(); |
1282 | sysdev_suspend(PMSG_SUSPEND); | 1285 | sysdev_suspend(PMSG_SUSPEND); |
1286 | syscore_suspend(); | ||
1283 | local_irq_enable(); | 1287 | local_irq_enable(); |
1284 | 1288 | ||
1285 | err = set_system_power_state(APM_STATE_STANDBY); | 1289 | err = set_system_power_state(APM_STATE_STANDBY); |
@@ -1287,6 +1291,7 @@ static void standby(void) | |||
1287 | apm_error("standby", err); | 1291 | apm_error("standby", err); |
1288 | 1292 | ||
1289 | local_irq_disable(); | 1293 | local_irq_disable(); |
1294 | syscore_resume(); | ||
1290 | sysdev_resume(); | 1295 | sysdev_resume(); |
1291 | local_irq_enable(); | 1296 | local_irq_enable(); |
1292 | 1297 | ||
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 3ecece0217ef..bb9eb29a52dd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -615,6 +615,25 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
615 | /* As a rule processors have APIC timer running in deep C states */ | 615 | /* As a rule processors have APIC timer running in deep C states */ |
616 | if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400)) | 616 | if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400)) |
617 | set_cpu_cap(c, X86_FEATURE_ARAT); | 617 | set_cpu_cap(c, X86_FEATURE_ARAT); |
618 | |||
619 | /* | ||
620 | * Disable GART TLB Walk Errors on Fam10h. We do this here | ||
621 | * because this is always needed when GART is enabled, even in a | ||
622 | * kernel which has no MCE support built in. | ||
623 | */ | ||
624 | if (c->x86 == 0x10) { | ||
625 | /* | ||
626 | * BIOS should disable GartTlbWlk Errors themself. If | ||
627 | * it doesn't do it here as suggested by the BKDG. | ||
628 | * | ||
629 | * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012 | ||
630 | */ | ||
631 | u64 mask; | ||
632 | |||
633 | rdmsrl(MSR_AMD64_MCx_MASK(4), mask); | ||
634 | mask |= (1 << 10); | ||
635 | wrmsrl(MSR_AMD64_MCx_MASK(4), mask); | ||
636 | } | ||
618 | } | 637 | } |
619 | 638 | ||
620 | #ifdef CONFIG_X86_32 | 639 | #ifdef CONFIG_X86_32 |
@@ -679,7 +698,7 @@ cpu_dev_register(amd_cpu_dev); | |||
679 | */ | 698 | */ |
680 | 699 | ||
681 | const int amd_erratum_400[] = | 700 | const int amd_erratum_400[] = |
682 | AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf), | 701 | AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0x0f, 0x4, 0x2, 0xff, 0xf), |
683 | AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)); | 702 | AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf)); |
684 | EXPORT_SYMBOL_GPL(amd_erratum_400); | 703 | EXPORT_SYMBOL_GPL(amd_erratum_400); |
685 | 704 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 5a05ef63eb4a..3385ea26f684 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -1626,7 +1626,7 @@ out: | |||
1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) | 1626 | static unsigned int mce_poll(struct file *file, poll_table *wait) |
1627 | { | 1627 | { |
1628 | poll_wait(file, &mce_wait, wait); | 1628 | poll_wait(file, &mce_wait, wait); |
1629 | if (rcu_dereference_check_mce(mcelog.next)) | 1629 | if (rcu_access_index(mcelog.next)) |
1630 | return POLLIN | POLLRDNORM; | 1630 | return POLLIN | POLLRDNORM; |
1631 | if (!mce_apei_read_done && apei_check_mce()) | 1631 | if (!mce_apei_read_done && apei_check_mce()) |
1632 | return POLLIN | POLLRDNORM; | 1632 | return POLLIN | POLLRDNORM; |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 307dfbbf4a8e..929739a653d1 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -293,14 +293,24 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ | |||
293 | 293 | ||
294 | /* | 294 | /* |
295 | * HACK! | 295 | * HACK! |
296 | * We use this same function to initialize the mtrrs on boot. | 296 | * |
297 | * The state of the boot cpu's mtrrs has been saved, and we want | 297 | * We use this same function to initialize the mtrrs during boot, |
298 | * to replicate across all the APs. | 298 | * resume, runtime cpu online and on an explicit request to set a |
299 | * If we're doing that @reg is set to something special... | 299 | * specific MTRR. |
300 | * | ||
301 | * During boot or suspend, the state of the boot cpu's mtrrs has been | ||
302 | * saved, and we want to replicate that across all the cpus that come | ||
303 | * online (either at the end of boot or resume or during a runtime cpu | ||
304 | * online). If we're doing that, @reg is set to something special and on | ||
305 | * this cpu we still do mtrr_if->set_all(). During boot/resume, this | ||
306 | * is unnecessary if at this point we are still on the cpu that started | ||
307 | * the boot/resume sequence. But there is no guarantee that we are still | ||
308 | * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be | ||
309 | * sure that we are in sync with everyone else. | ||
300 | */ | 310 | */ |
301 | if (reg != ~0U) | 311 | if (reg != ~0U) |
302 | mtrr_if->set(reg, base, size, type); | 312 | mtrr_if->set(reg, base, size, type); |
303 | else if (!mtrr_aps_delayed_init) | 313 | else |
304 | mtrr_if->set_all(); | 314 | mtrr_if->set_all(); |
305 | 315 | ||
306 | /* Wait for the others */ | 316 | /* Wait for the others */ |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index eed3673a8656..e638689279d3 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -586,8 +586,12 @@ static int x86_setup_perfctr(struct perf_event *event) | |||
586 | return -EOPNOTSUPP; | 586 | return -EOPNOTSUPP; |
587 | } | 587 | } |
588 | 588 | ||
589 | /* | ||
590 | * Do not allow config1 (extended registers) to propagate, | ||
591 | * there's no sane user-space generalization yet: | ||
592 | */ | ||
589 | if (attr->type == PERF_TYPE_RAW) | 593 | if (attr->type == PERF_TYPE_RAW) |
590 | return x86_pmu_extra_regs(event->attr.config, event); | 594 | return 0; |
591 | 595 | ||
592 | if (attr->type == PERF_TYPE_HW_CACHE) | 596 | if (attr->type == PERF_TYPE_HW_CACHE) |
593 | return set_ext_hw_attr(hwc, event); | 597 | return set_ext_hw_attr(hwc, event); |
@@ -609,8 +613,8 @@ static int x86_setup_perfctr(struct perf_event *event) | |||
609 | /* | 613 | /* |
610 | * Branch tracing: | 614 | * Branch tracing: |
611 | */ | 615 | */ |
612 | if ((attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS) && | 616 | if (attr->config == PERF_COUNT_HW_BRANCH_INSTRUCTIONS && |
613 | (hwc->sample_period == 1)) { | 617 | !attr->freq && hwc->sample_period == 1) { |
614 | /* BTS is not supported by this architecture. */ | 618 | /* BTS is not supported by this architecture. */ |
615 | if (!x86_pmu.bts_active) | 619 | if (!x86_pmu.bts_active) |
616 | return -EOPNOTSUPP; | 620 | return -EOPNOTSUPP; |
@@ -1284,6 +1288,16 @@ static int x86_pmu_handle_irq(struct pt_regs *regs) | |||
1284 | 1288 | ||
1285 | cpuc = &__get_cpu_var(cpu_hw_events); | 1289 | cpuc = &__get_cpu_var(cpu_hw_events); |
1286 | 1290 | ||
1291 | /* | ||
1292 | * Some chipsets need to unmask the LVTPC in a particular spot | ||
1293 | * inside the nmi handler. As a result, the unmasking was pushed | ||
1294 | * into all the nmi handlers. | ||
1295 | * | ||
1296 | * This generic handler doesn't seem to have any issues where the | ||
1297 | * unmasking occurs so it was left at the top. | ||
1298 | */ | ||
1299 | apic_write(APIC_LVTPC, APIC_DM_NMI); | ||
1300 | |||
1287 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { | 1301 | for (idx = 0; idx < x86_pmu.num_counters; idx++) { |
1288 | if (!test_bit(idx, cpuc->active_mask)) { | 1302 | if (!test_bit(idx, cpuc->active_mask)) { |
1289 | /* | 1303 | /* |
@@ -1370,8 +1384,6 @@ perf_event_nmi_handler(struct notifier_block *self, | |||
1370 | return NOTIFY_DONE; | 1384 | return NOTIFY_DONE; |
1371 | } | 1385 | } |
1372 | 1386 | ||
1373 | apic_write(APIC_LVTPC, APIC_DM_NMI); | ||
1374 | |||
1375 | handled = x86_pmu.handle_irq(args->regs); | 1387 | handled = x86_pmu.handle_irq(args->regs); |
1376 | if (!handled) | 1388 | if (!handled) |
1377 | return NOTIFY_DONE; | 1389 | return NOTIFY_DONE; |
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index 461f62bbd774..cf4e369cea67 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -8,7 +8,7 @@ static __initconst const u64 amd_hw_cache_event_ids | |||
8 | [ C(L1D) ] = { | 8 | [ C(L1D) ] = { |
9 | [ C(OP_READ) ] = { | 9 | [ C(OP_READ) ] = { |
10 | [ C(RESULT_ACCESS) ] = 0x0040, /* Data Cache Accesses */ | 10 | [ C(RESULT_ACCESS) ] = 0x0040, /* Data Cache Accesses */ |
11 | [ C(RESULT_MISS) ] = 0x0041, /* Data Cache Misses */ | 11 | [ C(RESULT_MISS) ] = 0x0141, /* Data Cache Misses */ |
12 | }, | 12 | }, |
13 | [ C(OP_WRITE) ] = { | 13 | [ C(OP_WRITE) ] = { |
14 | [ C(RESULT_ACCESS) ] = 0x0142, /* Data Cache Refills :system */ | 14 | [ C(RESULT_ACCESS) ] = 0x0142, /* Data Cache Refills :system */ |
@@ -427,7 +427,9 @@ static __initconst const struct x86_pmu amd_pmu = { | |||
427 | * | 427 | * |
428 | * Exceptions: | 428 | * Exceptions: |
429 | * | 429 | * |
430 | * 0x000 FP PERF_CTL[3], PERF_CTL[5:3] (*) | ||
430 | * 0x003 FP PERF_CTL[3] | 431 | * 0x003 FP PERF_CTL[3] |
432 | * 0x004 FP PERF_CTL[3], PERF_CTL[5:3] (*) | ||
431 | * 0x00B FP PERF_CTL[3] | 433 | * 0x00B FP PERF_CTL[3] |
432 | * 0x00D FP PERF_CTL[3] | 434 | * 0x00D FP PERF_CTL[3] |
433 | * 0x023 DE PERF_CTL[2:0] | 435 | * 0x023 DE PERF_CTL[2:0] |
@@ -448,6 +450,8 @@ static __initconst const struct x86_pmu amd_pmu = { | |||
448 | * 0x0DF LS PERF_CTL[5:0] | 450 | * 0x0DF LS PERF_CTL[5:0] |
449 | * 0x1D6 EX PERF_CTL[5:0] | 451 | * 0x1D6 EX PERF_CTL[5:0] |
450 | * 0x1D8 EX PERF_CTL[5:0] | 452 | * 0x1D8 EX PERF_CTL[5:0] |
453 | * | ||
454 | * (*) depending on the umask all FPU counters may be used | ||
451 | */ | 455 | */ |
452 | 456 | ||
453 | static struct event_constraint amd_f15_PMC0 = EVENT_CONSTRAINT(0, 0x01, 0); | 457 | static struct event_constraint amd_f15_PMC0 = EVENT_CONSTRAINT(0, 0x01, 0); |
@@ -460,18 +464,28 @@ static struct event_constraint amd_f15_PMC53 = EVENT_CONSTRAINT(0, 0x38, 0); | |||
460 | static struct event_constraint * | 464 | static struct event_constraint * |
461 | amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, struct perf_event *event) | 465 | amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, struct perf_event *event) |
462 | { | 466 | { |
463 | unsigned int event_code = amd_get_event_code(&event->hw); | 467 | struct hw_perf_event *hwc = &event->hw; |
468 | unsigned int event_code = amd_get_event_code(hwc); | ||
464 | 469 | ||
465 | switch (event_code & AMD_EVENT_TYPE_MASK) { | 470 | switch (event_code & AMD_EVENT_TYPE_MASK) { |
466 | case AMD_EVENT_FP: | 471 | case AMD_EVENT_FP: |
467 | switch (event_code) { | 472 | switch (event_code) { |
473 | case 0x000: | ||
474 | if (!(hwc->config & 0x0000F000ULL)) | ||
475 | break; | ||
476 | if (!(hwc->config & 0x00000F00ULL)) | ||
477 | break; | ||
478 | return &amd_f15_PMC3; | ||
479 | case 0x004: | ||
480 | if (hweight_long(hwc->config & ARCH_PERFMON_EVENTSEL_UMASK) <= 1) | ||
481 | break; | ||
482 | return &amd_f15_PMC3; | ||
468 | case 0x003: | 483 | case 0x003: |
469 | case 0x00B: | 484 | case 0x00B: |
470 | case 0x00D: | 485 | case 0x00D: |
471 | return &amd_f15_PMC3; | 486 | return &amd_f15_PMC3; |
472 | default: | ||
473 | return &amd_f15_PMC53; | ||
474 | } | 487 | } |
488 | return &amd_f15_PMC53; | ||
475 | case AMD_EVENT_LS: | 489 | case AMD_EVENT_LS: |
476 | case AMD_EVENT_DC: | 490 | case AMD_EVENT_DC: |
477 | case AMD_EVENT_EX_LS: | 491 | case AMD_EVENT_EX_LS: |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 8fc2b2cee1da..e61539b07d2c 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -25,7 +25,7 @@ struct intel_percore { | |||
25 | /* | 25 | /* |
26 | * Intel PerfMon, used on Core and later. | 26 | * Intel PerfMon, used on Core and later. |
27 | */ | 27 | */ |
28 | static const u64 intel_perfmon_event_map[] = | 28 | static u64 intel_perfmon_event_map[PERF_COUNT_HW_MAX] __read_mostly = |
29 | { | 29 | { |
30 | [PERF_COUNT_HW_CPU_CYCLES] = 0x003c, | 30 | [PERF_COUNT_HW_CPU_CYCLES] = 0x003c, |
31 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, | 31 | [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, |
@@ -391,12 +391,12 @@ static __initconst const u64 nehalem_hw_cache_event_ids | |||
391 | { | 391 | { |
392 | [ C(L1D) ] = { | 392 | [ C(L1D) ] = { |
393 | [ C(OP_READ) ] = { | 393 | [ C(OP_READ) ] = { |
394 | [ C(RESULT_ACCESS) ] = 0x0f40, /* L1D_CACHE_LD.MESI */ | 394 | [ C(RESULT_ACCESS) ] = 0x010b, /* MEM_INST_RETIRED.LOADS */ |
395 | [ C(RESULT_MISS) ] = 0x0140, /* L1D_CACHE_LD.I_STATE */ | 395 | [ C(RESULT_MISS) ] = 0x0151, /* L1D.REPL */ |
396 | }, | 396 | }, |
397 | [ C(OP_WRITE) ] = { | 397 | [ C(OP_WRITE) ] = { |
398 | [ C(RESULT_ACCESS) ] = 0x0f41, /* L1D_CACHE_ST.MESI */ | 398 | [ C(RESULT_ACCESS) ] = 0x020b, /* MEM_INST_RETURED.STORES */ |
399 | [ C(RESULT_MISS) ] = 0x0141, /* L1D_CACHE_ST.I_STATE */ | 399 | [ C(RESULT_MISS) ] = 0x0251, /* L1D.M_REPL */ |
400 | }, | 400 | }, |
401 | [ C(OP_PREFETCH) ] = { | 401 | [ C(OP_PREFETCH) ] = { |
402 | [ C(RESULT_ACCESS) ] = 0x014e, /* L1D_PREFETCH.REQUESTS */ | 402 | [ C(RESULT_ACCESS) ] = 0x014e, /* L1D_PREFETCH.REQUESTS */ |
@@ -933,6 +933,16 @@ static int intel_pmu_handle_irq(struct pt_regs *regs) | |||
933 | 933 | ||
934 | cpuc = &__get_cpu_var(cpu_hw_events); | 934 | cpuc = &__get_cpu_var(cpu_hw_events); |
935 | 935 | ||
936 | /* | ||
937 | * Some chipsets need to unmask the LVTPC in a particular spot | ||
938 | * inside the nmi handler. As a result, the unmasking was pushed | ||
939 | * into all the nmi handlers. | ||
940 | * | ||
941 | * This handler doesn't seem to have any issues with the unmasking | ||
942 | * so it was left at the top. | ||
943 | */ | ||
944 | apic_write(APIC_LVTPC, APIC_DM_NMI); | ||
945 | |||
936 | intel_pmu_disable_all(); | 946 | intel_pmu_disable_all(); |
937 | handled = intel_pmu_drain_bts_buffer(); | 947 | handled = intel_pmu_drain_bts_buffer(); |
938 | status = intel_pmu_get_status(); | 948 | status = intel_pmu_get_status(); |
@@ -998,6 +1008,9 @@ intel_bts_constraints(struct perf_event *event) | |||
998 | struct hw_perf_event *hwc = &event->hw; | 1008 | struct hw_perf_event *hwc = &event->hw; |
999 | unsigned int hw_event, bts_event; | 1009 | unsigned int hw_event, bts_event; |
1000 | 1010 | ||
1011 | if (event->attr.freq) | ||
1012 | return NULL; | ||
1013 | |||
1001 | hw_event = hwc->config & INTEL_ARCH_EVENT_MASK; | 1014 | hw_event = hwc->config & INTEL_ARCH_EVENT_MASK; |
1002 | bts_event = x86_pmu.event_map(PERF_COUNT_HW_BRANCH_INSTRUCTIONS); | 1015 | bts_event = x86_pmu.event_map(PERF_COUNT_HW_BRANCH_INSTRUCTIONS); |
1003 | 1016 | ||
@@ -1305,7 +1318,7 @@ static void intel_clovertown_quirks(void) | |||
1305 | * AJ106 could possibly be worked around by not allowing LBR | 1318 | * AJ106 could possibly be worked around by not allowing LBR |
1306 | * usage from PEBS, including the fixup. | 1319 | * usage from PEBS, including the fixup. |
1307 | * AJ68 could possibly be worked around by always programming | 1320 | * AJ68 could possibly be worked around by always programming |
1308 | * a pebs_event_reset[0] value and coping with the lost events. | 1321 | * a pebs_event_reset[0] value and coping with the lost events. |
1309 | * | 1322 | * |
1310 | * But taken together it might just make sense to not enable PEBS on | 1323 | * But taken together it might just make sense to not enable PEBS on |
1311 | * these chips. | 1324 | * these chips. |
@@ -1409,6 +1422,18 @@ static __init int intel_pmu_init(void) | |||
1409 | x86_pmu.percore_constraints = intel_nehalem_percore_constraints; | 1422 | x86_pmu.percore_constraints = intel_nehalem_percore_constraints; |
1410 | x86_pmu.enable_all = intel_pmu_nhm_enable_all; | 1423 | x86_pmu.enable_all = intel_pmu_nhm_enable_all; |
1411 | x86_pmu.extra_regs = intel_nehalem_extra_regs; | 1424 | x86_pmu.extra_regs = intel_nehalem_extra_regs; |
1425 | |||
1426 | if (ebx & 0x40) { | ||
1427 | /* | ||
1428 | * Erratum AAJ80 detected, we work it around by using | ||
1429 | * the BR_MISP_EXEC.ANY event. This will over-count | ||
1430 | * branch-misses, but it's still much better than the | ||
1431 | * architectural event which is often completely bogus: | ||
1432 | */ | ||
1433 | intel_perfmon_event_map[PERF_COUNT_HW_BRANCH_MISSES] = 0x7f89; | ||
1434 | |||
1435 | pr_cont("erratum AAJ80 worked around, "); | ||
1436 | } | ||
1412 | pr_cont("Nehalem events, "); | 1437 | pr_cont("Nehalem events, "); |
1413 | break; | 1438 | break; |
1414 | 1439 | ||
@@ -1425,6 +1450,7 @@ static __init int intel_pmu_init(void) | |||
1425 | 1450 | ||
1426 | case 37: /* 32 nm nehalem, "Clarkdale" */ | 1451 | case 37: /* 32 nm nehalem, "Clarkdale" */ |
1427 | case 44: /* 32 nm nehalem, "Gulftown" */ | 1452 | case 44: /* 32 nm nehalem, "Gulftown" */ |
1453 | case 47: /* 32 nm Xeon E7 */ | ||
1428 | memcpy(hw_cache_event_ids, westmere_hw_cache_event_ids, | 1454 | memcpy(hw_cache_event_ids, westmere_hw_cache_event_ids, |
1429 | sizeof(hw_cache_event_ids)); | 1455 | sizeof(hw_cache_event_ids)); |
1430 | memcpy(hw_cache_extra_regs, nehalem_hw_cache_extra_regs, | 1456 | memcpy(hw_cache_extra_regs, nehalem_hw_cache_extra_regs, |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index c2520e178d32..e93fcd55fae1 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -947,14 +947,23 @@ static int p4_pmu_handle_irq(struct pt_regs *regs) | |||
947 | if (!x86_perf_event_set_period(event)) | 947 | if (!x86_perf_event_set_period(event)) |
948 | continue; | 948 | continue; |
949 | if (perf_event_overflow(event, 1, &data, regs)) | 949 | if (perf_event_overflow(event, 1, &data, regs)) |
950 | p4_pmu_disable_event(event); | 950 | x86_pmu_stop(event, 0); |
951 | } | 951 | } |
952 | 952 | ||
953 | if (handled) { | 953 | if (handled) |
954 | /* p4 quirk: unmask it again */ | ||
955 | apic_write(APIC_LVTPC, apic_read(APIC_LVTPC) & ~APIC_LVT_MASKED); | ||
956 | inc_irq_stat(apic_perf_irqs); | 954 | inc_irq_stat(apic_perf_irqs); |
957 | } | 955 | |
956 | /* | ||
957 | * When dealing with the unmasking of the LVTPC on P4 perf hw, it has | ||
958 | * been observed that the OVF bit flag has to be cleared first _before_ | ||
959 | * the LVTPC can be unmasked. | ||
960 | * | ||
961 | * The reason is the NMI line will continue to be asserted while the OVF | ||
962 | * bit is set. This causes a second NMI to generate if the LVTPC is | ||
963 | * unmasked before the OVF bit is cleared, leading to unknown NMI | ||
964 | * messages. | ||
965 | */ | ||
966 | apic_write(APIC_LVTPC, APIC_DM_NMI); | ||
958 | 967 | ||
959 | return handled; | 968 | return handled; |
960 | } | 969 | } |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 706a9fb46a58..e90f08458e6b 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -391,7 +391,7 @@ static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize, | |||
391 | 391 | ||
392 | set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); | 392 | set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity); |
393 | 393 | ||
394 | return io_apic_setup_irq_pin(*out_hwirq, cpu_to_node(0), &attr); | 394 | return io_apic_setup_irq_pin_once(*out_hwirq, cpu_to_node(0), &attr); |
395 | } | 395 | } |
396 | 396 | ||
397 | static void __init ioapic_add_ofnode(struct device_node *np) | 397 | static void __init ioapic_add_ofnode(struct device_node *np) |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 948a31eae75f..1cb0b9fc78dc 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/seq_file.h> | 8 | #include <linux/seq_file.h> |
9 | #include <linux/smp.h> | 9 | #include <linux/smp.h> |
10 | #include <linux/ftrace.h> | 10 | #include <linux/ftrace.h> |
11 | #include <linux/delay.h> | ||
11 | 12 | ||
12 | #include <asm/apic.h> | 13 | #include <asm/apic.h> |
13 | #include <asm/io_apic.h> | 14 | #include <asm/io_apic.h> |
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 5ed0ab549eb8..f9242800bc84 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -550,6 +550,7 @@ static void __exit microcode_exit(void) | |||
550 | microcode_dev_exit(); | 550 | microcode_dev_exit(); |
551 | 551 | ||
552 | unregister_hotcpu_notifier(&mc_cpu_notifier); | 552 | unregister_hotcpu_notifier(&mc_cpu_notifier); |
553 | unregister_syscore_ops(&mc_syscore_ops); | ||
553 | 554 | ||
554 | get_online_cpus(); | 555 | get_online_cpus(); |
555 | mutex_lock(µcode_mutex); | 556 | mutex_lock(µcode_mutex); |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 82ada01625b9..b117efd24f71 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -81,6 +81,9 @@ static u32 gart_unmapped_entry; | |||
81 | #define AGPEXTERN | 81 | #define AGPEXTERN |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | /* GART can only remap to physical addresses < 1TB */ | ||
85 | #define GART_MAX_PHYS_ADDR (1ULL << 40) | ||
86 | |||
84 | /* backdoor interface to AGP driver */ | 87 | /* backdoor interface to AGP driver */ |
85 | AGPEXTERN int agp_memory_reserved; | 88 | AGPEXTERN int agp_memory_reserved; |
86 | AGPEXTERN __u32 *agp_gatt_table; | 89 | AGPEXTERN __u32 *agp_gatt_table; |
@@ -212,9 +215,13 @@ static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem, | |||
212 | size_t size, int dir, unsigned long align_mask) | 215 | size_t size, int dir, unsigned long align_mask) |
213 | { | 216 | { |
214 | unsigned long npages = iommu_num_pages(phys_mem, size, PAGE_SIZE); | 217 | unsigned long npages = iommu_num_pages(phys_mem, size, PAGE_SIZE); |
215 | unsigned long iommu_page = alloc_iommu(dev, npages, align_mask); | 218 | unsigned long iommu_page; |
216 | int i; | 219 | int i; |
217 | 220 | ||
221 | if (unlikely(phys_mem + size > GART_MAX_PHYS_ADDR)) | ||
222 | return bad_dma_addr; | ||
223 | |||
224 | iommu_page = alloc_iommu(dev, npages, align_mask); | ||
218 | if (iommu_page == -1) { | 225 | if (iommu_page == -1) { |
219 | if (!nonforced_iommu(dev, phys_mem, size)) | 226 | if (!nonforced_iommu(dev, phys_mem, size)) |
220 | return phys_mem; | 227 | return phys_mem; |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d3ce37edb54d..08c44b08bf5b 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/dmi.h> | 6 | #include <linux/dmi.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/tboot.h> | 8 | #include <linux/tboot.h> |
9 | #include <linux/delay.h> | ||
9 | #include <acpi/reboot.h> | 10 | #include <acpi/reboot.h> |
10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
11 | #include <asm/apic.h> | 12 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/reboot_32.S b/arch/x86/kernel/reboot_32.S index 29092b38d816..1d5c46df0d78 100644 --- a/arch/x86/kernel/reboot_32.S +++ b/arch/x86/kernel/reboot_32.S | |||
@@ -21,26 +21,26 @@ r_base = . | |||
21 | /* Get our own relocated address */ | 21 | /* Get our own relocated address */ |
22 | call 1f | 22 | call 1f |
23 | 1: popl %ebx | 23 | 1: popl %ebx |
24 | subl $1b, %ebx | 24 | subl $(1b - r_base), %ebx |
25 | 25 | ||
26 | /* Compute the equivalent real-mode segment */ | 26 | /* Compute the equivalent real-mode segment */ |
27 | movl %ebx, %ecx | 27 | movl %ebx, %ecx |
28 | shrl $4, %ecx | 28 | shrl $4, %ecx |
29 | 29 | ||
30 | /* Patch post-real-mode segment jump */ | 30 | /* Patch post-real-mode segment jump */ |
31 | movw dispatch_table(%ebx,%eax,2),%ax | 31 | movw (dispatch_table - r_base)(%ebx,%eax,2),%ax |
32 | movw %ax, 101f(%ebx) | 32 | movw %ax, (101f - r_base)(%ebx) |
33 | movw %cx, 102f(%ebx) | 33 | movw %cx, (102f - r_base)(%ebx) |
34 | 34 | ||
35 | /* Set up the IDT for real mode. */ | 35 | /* Set up the IDT for real mode. */ |
36 | lidtl machine_real_restart_idt(%ebx) | 36 | lidtl (machine_real_restart_idt - r_base)(%ebx) |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Set up a GDT from which we can load segment descriptors for real | 39 | * Set up a GDT from which we can load segment descriptors for real |
40 | * mode. The GDT is not used in real mode; it is just needed here to | 40 | * mode. The GDT is not used in real mode; it is just needed here to |
41 | * prepare the descriptors. | 41 | * prepare the descriptors. |
42 | */ | 42 | */ |
43 | lgdtl machine_real_restart_gdt(%ebx) | 43 | lgdtl (machine_real_restart_gdt - r_base)(%ebx) |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Load the data segment registers with 16-bit compatible values | 46 | * Load the data segment registers with 16-bit compatible values |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 5a0484a95ad6..4be9b398470e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -976,6 +976,11 @@ void __init setup_arch(char **cmdline_p) | |||
976 | paging_init(); | 976 | paging_init(); |
977 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); | 977 | x86_init.paging.pagetable_setup_done(swapper_pg_dir); |
978 | 978 | ||
979 | if (boot_cpu_data.cpuid_level >= 0) { | ||
980 | /* A CPU has %cr4 if and only if it has CPUID */ | ||
981 | mmu_cr4_features = read_cr4(); | ||
982 | } | ||
983 | |||
979 | #ifdef CONFIG_X86_32 | 984 | #ifdef CONFIG_X86_32 |
980 | /* sync back kernel address range */ | 985 | /* sync back kernel address range */ |
981 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, | 986 | clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 58f517b59645..934b4c6b0bf9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2395,9 +2395,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
2395 | int i; | 2395 | int i; |
2396 | 2396 | ||
2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |
2398 | for (i = 1; *nent < maxnent; ++i) { | 2398 | for (i = 1; *nent < maxnent && i < 64; ++i) { |
2399 | if (entry[i - 1].eax == 0 && i != 2) | 2399 | if (entry[i].eax == 0) |
2400 | break; | 2400 | continue; |
2401 | do_cpuid_1_ent(&entry[i], function, i); | 2401 | do_cpuid_1_ent(&entry[i], function, i); |
2402 | entry[i].flags |= | 2402 | entry[i].flags |= |
2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |
@@ -4958,12 +4958,6 @@ struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu, | |||
4958 | best = e; | 4958 | best = e; |
4959 | break; | 4959 | break; |
4960 | } | 4960 | } |
4961 | /* | ||
4962 | * Both basic or both extended? | ||
4963 | */ | ||
4964 | if (((e->function ^ function) & 0x80000000) == 0) | ||
4965 | if (!best || e->function > best->function) | ||
4966 | best = e; | ||
4967 | } | 4961 | } |
4968 | return best; | 4962 | return best; |
4969 | } | 4963 | } |
@@ -4983,6 +4977,27 @@ not_found: | |||
4983 | return 36; | 4977 | return 36; |
4984 | } | 4978 | } |
4985 | 4979 | ||
4980 | /* | ||
4981 | * If no match is found, check whether we exceed the vCPU's limit | ||
4982 | * and return the content of the highest valid _standard_ leaf instead. | ||
4983 | * This is to satisfy the CPUID specification. | ||
4984 | */ | ||
4985 | static struct kvm_cpuid_entry2* check_cpuid_limit(struct kvm_vcpu *vcpu, | ||
4986 | u32 function, u32 index) | ||
4987 | { | ||
4988 | struct kvm_cpuid_entry2 *maxlevel; | ||
4989 | |||
4990 | maxlevel = kvm_find_cpuid_entry(vcpu, function & 0x80000000, 0); | ||
4991 | if (!maxlevel || maxlevel->eax >= function) | ||
4992 | return NULL; | ||
4993 | if (function & 0x80000000) { | ||
4994 | maxlevel = kvm_find_cpuid_entry(vcpu, 0, 0); | ||
4995 | if (!maxlevel) | ||
4996 | return NULL; | ||
4997 | } | ||
4998 | return kvm_find_cpuid_entry(vcpu, maxlevel->eax, index); | ||
4999 | } | ||
5000 | |||
4986 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | 5001 | void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) |
4987 | { | 5002 | { |
4988 | u32 function, index; | 5003 | u32 function, index; |
@@ -4995,6 +5010,10 @@ void kvm_emulate_cpuid(struct kvm_vcpu *vcpu) | |||
4995 | kvm_register_write(vcpu, VCPU_REGS_RCX, 0); | 5010 | kvm_register_write(vcpu, VCPU_REGS_RCX, 0); |
4996 | kvm_register_write(vcpu, VCPU_REGS_RDX, 0); | 5011 | kvm_register_write(vcpu, VCPU_REGS_RDX, 0); |
4997 | best = kvm_find_cpuid_entry(vcpu, function, index); | 5012 | best = kvm_find_cpuid_entry(vcpu, function, index); |
5013 | |||
5014 | if (!best) | ||
5015 | best = check_cpuid_limit(vcpu, function, index); | ||
5016 | |||
4998 | if (best) { | 5017 | if (best) { |
4999 | kvm_register_write(vcpu, VCPU_REGS_RAX, best->eax); | 5018 | kvm_register_write(vcpu, VCPU_REGS_RAX, best->eax); |
5000 | kvm_register_write(vcpu, VCPU_REGS_RBX, best->ebx); | 5019 | kvm_register_write(vcpu, VCPU_REGS_RBX, best->ebx); |
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 9559d360fde7..745258dfc4dc 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c | |||
@@ -213,53 +213,48 @@ int early_cpu_to_node(int cpu) | |||
213 | return per_cpu(x86_cpu_to_node_map, cpu); | 213 | return per_cpu(x86_cpu_to_node_map, cpu); |
214 | } | 214 | } |
215 | 215 | ||
216 | struct cpumask __cpuinit *debug_cpumask_set_cpu(int cpu, int enable) | 216 | void debug_cpumask_set_cpu(int cpu, int node, bool enable) |
217 | { | 217 | { |
218 | int node = early_cpu_to_node(cpu); | ||
219 | struct cpumask *mask; | 218 | struct cpumask *mask; |
220 | char buf[64]; | 219 | char buf[64]; |
221 | 220 | ||
222 | if (node == NUMA_NO_NODE) { | 221 | if (node == NUMA_NO_NODE) { |
223 | /* early_cpu_to_node() already emits a warning and trace */ | 222 | /* early_cpu_to_node() already emits a warning and trace */ |
224 | return NULL; | 223 | return; |
225 | } | 224 | } |
226 | mask = node_to_cpumask_map[node]; | 225 | mask = node_to_cpumask_map[node]; |
227 | if (!mask) { | 226 | if (!mask) { |
228 | pr_err("node_to_cpumask_map[%i] NULL\n", node); | 227 | pr_err("node_to_cpumask_map[%i] NULL\n", node); |
229 | dump_stack(); | 228 | dump_stack(); |
230 | return NULL; | 229 | return; |
231 | } | 230 | } |
232 | 231 | ||
232 | if (enable) | ||
233 | cpumask_set_cpu(cpu, mask); | ||
234 | else | ||
235 | cpumask_clear_cpu(cpu, mask); | ||
236 | |||
233 | cpulist_scnprintf(buf, sizeof(buf), mask); | 237 | cpulist_scnprintf(buf, sizeof(buf), mask); |
234 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", | 238 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", |
235 | enable ? "numa_add_cpu" : "numa_remove_cpu", | 239 | enable ? "numa_add_cpu" : "numa_remove_cpu", |
236 | cpu, node, buf); | 240 | cpu, node, buf); |
237 | return mask; | 241 | return; |
238 | } | 242 | } |
239 | 243 | ||
240 | # ifndef CONFIG_NUMA_EMU | 244 | # ifndef CONFIG_NUMA_EMU |
241 | static void __cpuinit numa_set_cpumask(int cpu, int enable) | 245 | static void __cpuinit numa_set_cpumask(int cpu, bool enable) |
242 | { | 246 | { |
243 | struct cpumask *mask; | 247 | debug_cpumask_set_cpu(cpu, early_cpu_to_node(cpu), enable); |
244 | |||
245 | mask = debug_cpumask_set_cpu(cpu, enable); | ||
246 | if (!mask) | ||
247 | return; | ||
248 | |||
249 | if (enable) | ||
250 | cpumask_set_cpu(cpu, mask); | ||
251 | else | ||
252 | cpumask_clear_cpu(cpu, mask); | ||
253 | } | 248 | } |
254 | 249 | ||
255 | void __cpuinit numa_add_cpu(int cpu) | 250 | void __cpuinit numa_add_cpu(int cpu) |
256 | { | 251 | { |
257 | numa_set_cpumask(cpu, 1); | 252 | numa_set_cpumask(cpu, true); |
258 | } | 253 | } |
259 | 254 | ||
260 | void __cpuinit numa_remove_cpu(int cpu) | 255 | void __cpuinit numa_remove_cpu(int cpu) |
261 | { | 256 | { |
262 | numa_set_cpumask(cpu, 0); | 257 | numa_set_cpumask(cpu, false); |
263 | } | 258 | } |
264 | # endif /* !CONFIG_NUMA_EMU */ | 259 | # endif /* !CONFIG_NUMA_EMU */ |
265 | 260 | ||
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index e8c00cc72033..85b52fc03084 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -306,7 +306,7 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi) | |||
306 | bi->end = min(bi->end, high); | 306 | bi->end = min(bi->end, high); |
307 | 307 | ||
308 | /* and there's no empty block */ | 308 | /* and there's no empty block */ |
309 | if (bi->start == bi->end) { | 309 | if (bi->start >= bi->end) { |
310 | numa_remove_memblk_from(i--, mi); | 310 | numa_remove_memblk_from(i--, mi); |
311 | continue; | 311 | continue; |
312 | } | 312 | } |
diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c index ad091e4cff17..de84cc140379 100644 --- a/arch/x86/mm/numa_emulation.c +++ b/arch/x86/mm/numa_emulation.c | |||
@@ -454,10 +454,9 @@ void __cpuinit numa_remove_cpu(int cpu) | |||
454 | cpumask_clear_cpu(cpu, node_to_cpumask_map[i]); | 454 | cpumask_clear_cpu(cpu, node_to_cpumask_map[i]); |
455 | } | 455 | } |
456 | #else /* !CONFIG_DEBUG_PER_CPU_MAPS */ | 456 | #else /* !CONFIG_DEBUG_PER_CPU_MAPS */ |
457 | static void __cpuinit numa_set_cpumask(int cpu, int enable) | 457 | static void __cpuinit numa_set_cpumask(int cpu, bool enable) |
458 | { | 458 | { |
459 | struct cpumask *mask; | 459 | int nid, physnid; |
460 | int nid, physnid, i; | ||
461 | 460 | ||
462 | nid = early_cpu_to_node(cpu); | 461 | nid = early_cpu_to_node(cpu); |
463 | if (nid == NUMA_NO_NODE) { | 462 | if (nid == NUMA_NO_NODE) { |
@@ -467,28 +466,21 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable) | |||
467 | 466 | ||
468 | physnid = emu_nid_to_phys[nid]; | 467 | physnid = emu_nid_to_phys[nid]; |
469 | 468 | ||
470 | for_each_online_node(i) { | 469 | for_each_online_node(nid) { |
471 | if (emu_nid_to_phys[nid] != physnid) | 470 | if (emu_nid_to_phys[nid] != physnid) |
472 | continue; | 471 | continue; |
473 | 472 | ||
474 | mask = debug_cpumask_set_cpu(cpu, enable); | 473 | debug_cpumask_set_cpu(cpu, nid, enable); |
475 | if (!mask) | ||
476 | return; | ||
477 | |||
478 | if (enable) | ||
479 | cpumask_set_cpu(cpu, mask); | ||
480 | else | ||
481 | cpumask_clear_cpu(cpu, mask); | ||
482 | } | 474 | } |
483 | } | 475 | } |
484 | 476 | ||
485 | void __cpuinit numa_add_cpu(int cpu) | 477 | void __cpuinit numa_add_cpu(int cpu) |
486 | { | 478 | { |
487 | numa_set_cpumask(cpu, 1); | 479 | numa_set_cpumask(cpu, true); |
488 | } | 480 | } |
489 | 481 | ||
490 | void __cpuinit numa_remove_cpu(int cpu) | 482 | void __cpuinit numa_remove_cpu(int cpu) |
491 | { | 483 | { |
492 | numa_set_cpumask(cpu, 0); | 484 | numa_set_cpumask(cpu, false); |
493 | } | 485 | } |
494 | #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ | 486 | #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ |
diff --git a/arch/x86/mm/srat_32.c b/arch/x86/mm/srat_32.c index 48651c6f657d..364f36bdfad8 100644 --- a/arch/x86/mm/srat_32.c +++ b/arch/x86/mm/srat_32.c | |||
@@ -211,10 +211,12 @@ int __init get_memcfg_from_srat(void) | |||
211 | { | 211 | { |
212 | int i, j, nid; | 212 | int i, j, nid; |
213 | 213 | ||
214 | |||
215 | if (srat_disabled()) | 214 | if (srat_disabled()) |
216 | goto out_fail; | 215 | goto out_fail; |
217 | 216 | ||
217 | if (acpi_numa_init() < 0) | ||
218 | goto out_fail; | ||
219 | |||
218 | if (num_memory_chunks == 0) { | 220 | if (num_memory_chunks == 0) { |
219 | printk(KERN_DEBUG | 221 | printk(KERN_DEBUG |
220 | "could not find any ACPI SRAT memory areas.\n"); | 222 | "could not find any ACPI SRAT memory areas.\n"); |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 8dace181c88e..cf9750004a08 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -49,6 +49,10 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model, | |||
49 | val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0; | 49 | val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0; |
50 | val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0; | 50 | val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0; |
51 | val |= (counter_config->unit_mask & 0xFF) << 8; | 51 | val |= (counter_config->unit_mask & 0xFF) << 8; |
52 | counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV | | ||
53 | ARCH_PERFMON_EVENTSEL_EDGE | | ||
54 | ARCH_PERFMON_EVENTSEL_CMASK); | ||
55 | val |= counter_config->extra; | ||
52 | event &= model->event_mask ? model->event_mask : 0xFF; | 56 | event &= model->event_mask ? model->event_mask : 0xFF; |
53 | val |= event & 0xFF; | 57 | val |= event & 0xFF; |
54 | val |= (event & 0x0F00) << 24; | 58 | val |= (event & 0x0F00) << 24; |
@@ -440,6 +444,7 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root) | |||
440 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | 444 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); |
441 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | 445 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); |
442 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | 446 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); |
447 | oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra); | ||
443 | } | 448 | } |
444 | 449 | ||
445 | return 0; | 450 | return 0; |
diff --git a/arch/x86/oprofile/op_counter.h b/arch/x86/oprofile/op_counter.h index e28398df0df2..0b7b7b179cbe 100644 --- a/arch/x86/oprofile/op_counter.h +++ b/arch/x86/oprofile/op_counter.h | |||
@@ -22,6 +22,7 @@ struct op_counter_config { | |||
22 | unsigned long kernel; | 22 | unsigned long kernel; |
23 | unsigned long user; | 23 | unsigned long user; |
24 | unsigned long unit_mask; | 24 | unsigned long unit_mask; |
25 | unsigned long extra; | ||
25 | }; | 26 | }; |
26 | 27 | ||
27 | extern struct op_counter_config counter_config[]; | 28 | extern struct op_counter_config counter_config[]; |
diff --git a/arch/x86/platform/ce4100/falconfalls.dts b/arch/x86/platform/ce4100/falconfalls.dts index dc701ea58546..e70be38ce039 100644 --- a/arch/x86/platform/ce4100/falconfalls.dts +++ b/arch/x86/platform/ce4100/falconfalls.dts | |||
@@ -74,6 +74,7 @@ | |||
74 | compatible = "intel,ce4100-pci", "pci"; | 74 | compatible = "intel,ce4100-pci", "pci"; |
75 | device_type = "pci"; | 75 | device_type = "pci"; |
76 | bus-range = <1 1>; | 76 | bus-range = <1 1>; |
77 | reg = <0x0800 0x0 0x0 0x0 0x0>; | ||
77 | ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>; | 78 | ranges = <0x2000000 0 0xdffe0000 0x2000000 0 0xdffe0000 0 0x1000>; |
78 | 79 | ||
79 | interrupt-parent = <&ioapic2>; | 80 | interrupt-parent = <&ioapic2>; |
@@ -346,7 +347,7 @@ | |||
346 | "pciclass0c03"; | 347 | "pciclass0c03"; |
347 | 348 | ||
348 | reg = <0x16800 0x0 0x0 0x0 0x0>; | 349 | reg = <0x16800 0x0 0x0 0x0 0x0>; |
349 | interrupts = <22 3>; | 350 | interrupts = <22 1>; |
350 | }; | 351 | }; |
351 | 352 | ||
352 | usb@d,1 { | 353 | usb@d,1 { |
@@ -356,7 +357,7 @@ | |||
356 | "pciclass0c03"; | 357 | "pciclass0c03"; |
357 | 358 | ||
358 | reg = <0x16900 0x0 0x0 0x0 0x0>; | 359 | reg = <0x16900 0x0 0x0 0x0 0x0>; |
359 | interrupts = <22 3>; | 360 | interrupts = <22 1>; |
360 | }; | 361 | }; |
361 | 362 | ||
362 | sata@e,0 { | 363 | sata@e,0 { |
@@ -366,7 +367,7 @@ | |||
366 | "pciclass0106"; | 367 | "pciclass0106"; |
367 | 368 | ||
368 | reg = <0x17000 0x0 0x0 0x0 0x0>; | 369 | reg = <0x17000 0x0 0x0 0x0 0x0>; |
369 | interrupts = <23 3>; | 370 | interrupts = <23 1>; |
370 | }; | 371 | }; |
371 | 372 | ||
372 | flash@f,0 { | 373 | flash@f,0 { |
@@ -412,6 +413,7 @@ | |||
412 | #address-cells = <2>; | 413 | #address-cells = <2>; |
413 | #size-cells = <1>; | 414 | #size-cells = <1>; |
414 | compatible = "isa"; | 415 | compatible = "isa"; |
416 | reg = <0xf800 0x0 0x0 0x0 0x0>; | ||
415 | ranges = <1 0 0 0 0 0x100>; | 417 | ranges = <1 0 0 0 0 0x100>; |
416 | 418 | ||
417 | rtc@70 { | 419 | rtc@70 { |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 5c0207bf959b..275dbc19e2cf 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -97,11 +97,11 @@ static int __init sfi_parse_mtmr(struct sfi_table_header *table) | |||
97 | pentry->freq_hz, pentry->irq); | 97 | pentry->freq_hz, pentry->irq); |
98 | if (!pentry->irq) | 98 | if (!pentry->irq) |
99 | continue; | 99 | continue; |
100 | mp_irq.type = MP_IOAPIC; | 100 | mp_irq.type = MP_INTSRC; |
101 | mp_irq.irqtype = mp_INT; | 101 | mp_irq.irqtype = mp_INT; |
102 | /* triggering mode edge bit 2-3, active high polarity bit 0-1 */ | 102 | /* triggering mode edge bit 2-3, active high polarity bit 0-1 */ |
103 | mp_irq.irqflag = 5; | 103 | mp_irq.irqflag = 5; |
104 | mp_irq.srcbus = 0; | 104 | mp_irq.srcbus = MP_BUS_ISA; |
105 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ | 105 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ |
106 | mp_irq.dstapic = MP_APIC_ALL; | 106 | mp_irq.dstapic = MP_APIC_ALL; |
107 | mp_irq.dstirq = pentry->irq; | 107 | mp_irq.dstirq = pentry->irq; |
@@ -168,10 +168,10 @@ int __init sfi_parse_mrtc(struct sfi_table_header *table) | |||
168 | for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) { | 168 | for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) { |
169 | pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n", | 169 | pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n", |
170 | totallen, (u32)pentry->phys_addr, pentry->irq); | 170 | totallen, (u32)pentry->phys_addr, pentry->irq); |
171 | mp_irq.type = MP_IOAPIC; | 171 | mp_irq.type = MP_INTSRC; |
172 | mp_irq.irqtype = mp_INT; | 172 | mp_irq.irqtype = mp_INT; |
173 | mp_irq.irqflag = 0xf; /* level trigger and active low */ | 173 | mp_irq.irqflag = 0xf; /* level trigger and active low */ |
174 | mp_irq.srcbus = 0; | 174 | mp_irq.srcbus = MP_BUS_ISA; |
175 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ | 175 | mp_irq.srcbusirq = pentry->irq; /* IRQ */ |
176 | mp_irq.dstapic = MP_APIC_ALL; | 176 | mp_irq.dstapic = MP_APIC_ALL; |
177 | mp_irq.dstirq = pentry->irq; | 177 | mp_irq.dstirq = pentry->irq; |
@@ -282,7 +282,7 @@ void __init x86_mrst_early_setup(void) | |||
282 | /* Avoid searching for BIOS MP tables */ | 282 | /* Avoid searching for BIOS MP tables */ |
283 | x86_init.mpparse.find_smp_config = x86_init_noop; | 283 | x86_init.mpparse.find_smp_config = x86_init_noop; |
284 | x86_init.mpparse.get_smp_config = x86_init_uint_noop; | 284 | x86_init.mpparse.get_smp_config = x86_init_uint_noop; |
285 | 285 | set_bit(MP_BUS_ISA, mp_bus_not_pci); | |
286 | } | 286 | } |
287 | 287 | ||
288 | /* | 288 | /* |
diff --git a/arch/x86/platform/mrst/vrtc.c b/arch/x86/platform/mrst/vrtc.c index 04cf645feb92..73d70d65e76e 100644 --- a/arch/x86/platform/mrst/vrtc.c +++ b/arch/x86/platform/mrst/vrtc.c | |||
@@ -100,9 +100,11 @@ int vrtc_set_mmss(unsigned long nowtime) | |||
100 | 100 | ||
101 | void __init mrst_rtc_init(void) | 101 | void __init mrst_rtc_init(void) |
102 | { | 102 | { |
103 | unsigned long vrtc_paddr = sfi_mrtc_array[0].phys_addr; | 103 | unsigned long vrtc_paddr; |
104 | 104 | ||
105 | sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc); | 105 | sfi_table_parse(SFI_SIG_MRTC, NULL, NULL, sfi_parse_mrtc); |
106 | |||
107 | vrtc_paddr = sfi_mrtc_array[0].phys_addr; | ||
106 | if (!sfi_mrtc_num || !vrtc_paddr) | 108 | if (!sfi_mrtc_num || !vrtc_paddr) |
107 | return; | 109 | return; |
108 | 110 | ||
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index a7b38d35c29a..7cb6424317f6 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/delay.h> | ||
14 | 15 | ||
15 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
16 | #include <asm/uv/uv.h> | 17 | #include <asm/uv/uv.h> |
diff --git a/arch/x86/platform/visws/visws_quirks.c b/arch/x86/platform/visws/visws_quirks.c index fe4cf8294878..c7abf13a213f 100644 --- a/arch/x86/platform/visws/visws_quirks.c +++ b/arch/x86/platform/visws/visws_quirks.c | |||
@@ -471,15 +471,7 @@ static unsigned int startup_piix4_master_irq(struct irq_data *data) | |||
471 | { | 471 | { |
472 | legacy_pic->init(0); | 472 | legacy_pic->init(0); |
473 | enable_cobalt_irq(data); | 473 | enable_cobalt_irq(data); |
474 | } | 474 | return 0; |
475 | |||
476 | static void end_piix4_master_irq(struct irq_data *data) | ||
477 | { | ||
478 | unsigned long flags; | ||
479 | |||
480 | spin_lock_irqsave(&cobalt_lock, flags); | ||
481 | enable_cobalt_irq(data); | ||
482 | spin_unlock_irqrestore(&cobalt_lock, flags); | ||
483 | } | 475 | } |
484 | 476 | ||
485 | static struct irq_chip piix4_master_irq_type = { | 477 | static struct irq_chip piix4_master_irq_type = { |
@@ -492,7 +484,7 @@ static void pii4_mask(struct irq_data *data) { } | |||
492 | 484 | ||
493 | static struct irq_chip piix4_virtual_irq_type = { | 485 | static struct irq_chip piix4_virtual_irq_type = { |
494 | .name = "PIIX4-virtual", | 486 | .name = "PIIX4-virtual", |
495 | .mask = pii4_mask, | 487 | .irq_mask = pii4_mask, |
496 | }; | 488 | }; |
497 | 489 | ||
498 | /* | 490 | /* |
@@ -580,9 +572,9 @@ static struct irqaction cascade_action = { | |||
580 | 572 | ||
581 | static inline void set_piix4_virtual_irq_type(void) | 573 | static inline void set_piix4_virtual_irq_type(void) |
582 | { | 574 | { |
583 | piix4_virtual_irq_type.enable = i8259A_chip.unmask; | 575 | piix4_virtual_irq_type.irq_enable = i8259A_chip.irq_unmask; |
584 | piix4_virtual_irq_type.disable = i8259A_chip.mask; | 576 | piix4_virtual_irq_type.irq_disable = i8259A_chip.irq_mask; |
585 | piix4_virtual_irq_type.unmask = i8259A_chip.unmask; | 577 | piix4_virtual_irq_type.irq_unmask = i8259A_chip.irq_unmask; |
586 | } | 578 | } |
587 | 579 | ||
588 | static void __init visws_pre_intr_init(void) | 580 | static void __init visws_pre_intr_init(void) |
@@ -599,7 +591,7 @@ static void __init visws_pre_intr_init(void) | |||
599 | else if (i == CO_IRQ_IDE0) | 591 | else if (i == CO_IRQ_IDE0) |
600 | chip = &cobalt_irq_type; | 592 | chip = &cobalt_irq_type; |
601 | else if (i == CO_IRQ_IDE1) | 593 | else if (i == CO_IRQ_IDE1) |
602 | >chip = &cobalt_irq_type; | 594 | chip = &cobalt_irq_type; |
603 | else if (i == CO_IRQ_8259) | 595 | else if (i == CO_IRQ_8259) |
604 | chip = &piix4_master_irq_type; | 596 | chip = &piix4_master_irq_type; |
605 | else if (i < CO_IRQ_APIC0) | 597 | else if (i < CO_IRQ_APIC0) |
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 1c7121ba18ff..5cc821cb2e09 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
@@ -39,6 +39,7 @@ config XEN_MAX_DOMAIN_MEMORY | |||
39 | config XEN_SAVE_RESTORE | 39 | config XEN_SAVE_RESTORE |
40 | bool | 40 | bool |
41 | depends on XEN | 41 | depends on XEN |
42 | select HIBERNATE_CALLBACKS | ||
42 | default y | 43 | default y |
43 | 44 | ||
44 | config XEN_DEBUG_FS | 45 | config XEN_DEBUG_FS |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 49dbd78ec3cb..e3c6a06cf725 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -238,6 +238,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, | |||
238 | static __init void xen_init_cpuid_mask(void) | 238 | static __init void xen_init_cpuid_mask(void) |
239 | { | 239 | { |
240 | unsigned int ax, bx, cx, dx; | 240 | unsigned int ax, bx, cx, dx; |
241 | unsigned int xsave_mask; | ||
241 | 242 | ||
242 | cpuid_leaf1_edx_mask = | 243 | cpuid_leaf1_edx_mask = |
243 | ~((1 << X86_FEATURE_MCE) | /* disable MCE */ | 244 | ~((1 << X86_FEATURE_MCE) | /* disable MCE */ |
@@ -249,24 +250,16 @@ static __init void xen_init_cpuid_mask(void) | |||
249 | cpuid_leaf1_edx_mask &= | 250 | cpuid_leaf1_edx_mask &= |
250 | ~((1 << X86_FEATURE_APIC) | /* disable local APIC */ | 251 | ~((1 << X86_FEATURE_APIC) | /* disable local APIC */ |
251 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ | 252 | (1 << X86_FEATURE_ACPI)); /* disable ACPI */ |
252 | |||
253 | ax = 1; | 253 | ax = 1; |
254 | cx = 0; | ||
255 | xen_cpuid(&ax, &bx, &cx, &dx); | 254 | xen_cpuid(&ax, &bx, &cx, &dx); |
256 | 255 | ||
257 | /* cpuid claims we support xsave; try enabling it to see what happens */ | 256 | xsave_mask = |
258 | if (cx & (1 << (X86_FEATURE_XSAVE % 32))) { | 257 | (1 << (X86_FEATURE_XSAVE % 32)) | |
259 | unsigned long cr4; | 258 | (1 << (X86_FEATURE_OSXSAVE % 32)); |
260 | |||
261 | set_in_cr4(X86_CR4_OSXSAVE); | ||
262 | |||
263 | cr4 = read_cr4(); | ||
264 | 259 | ||
265 | if ((cr4 & X86_CR4_OSXSAVE) == 0) | 260 | /* Xen will set CR4.OSXSAVE if supported and not disabled by force */ |
266 | cpuid_leaf1_ecx_mask &= ~(1 << (X86_FEATURE_XSAVE % 32)); | 261 | if ((cx & xsave_mask) != xsave_mask) |
267 | 262 | cpuid_leaf1_ecx_mask &= ~xsave_mask; /* disable XSAVE & OSXSAVE */ | |
268 | clear_in_cr4(X86_CR4_OSXSAVE); | ||
269 | } | ||
270 | } | 263 | } |
271 | 264 | ||
272 | static void xen_set_debugreg(int reg, unsigned long val) | 265 | static void xen_set_debugreg(int reg, unsigned long val) |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index c82df6c9c0f0..55c965b38c27 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -565,13 +565,13 @@ pte_t xen_make_pte_debug(pteval_t pte) | |||
565 | if (io_page && | 565 | if (io_page && |
566 | (xen_initial_domain() || addr >= ISA_END_ADDRESS)) { | 566 | (xen_initial_domain() || addr >= ISA_END_ADDRESS)) { |
567 | other_addr = pfn_to_mfn(addr >> PAGE_SHIFT) << PAGE_SHIFT; | 567 | other_addr = pfn_to_mfn(addr >> PAGE_SHIFT) << PAGE_SHIFT; |
568 | WARN(addr != other_addr, | 568 | WARN_ONCE(addr != other_addr, |
569 | "0x%lx is using VM_IO, but it is 0x%lx!\n", | 569 | "0x%lx is using VM_IO, but it is 0x%lx!\n", |
570 | (unsigned long)addr, (unsigned long)other_addr); | 570 | (unsigned long)addr, (unsigned long)other_addr); |
571 | } else { | 571 | } else { |
572 | pteval_t iomap_set = (_pte.pte & PTE_FLAGS_MASK) & _PAGE_IOMAP; | 572 | pteval_t iomap_set = (_pte.pte & PTE_FLAGS_MASK) & _PAGE_IOMAP; |
573 | other_addr = (_pte.pte & PTE_PFN_MASK); | 573 | other_addr = (_pte.pte & PTE_PFN_MASK); |
574 | WARN((addr == other_addr) && (!io_page) && (!iomap_set), | 574 | WARN_ONCE((addr == other_addr) && (!io_page) && (!iomap_set), |
575 | "0x%lx is missing VM_IO (and wasn't fixed)!\n", | 575 | "0x%lx is missing VM_IO (and wasn't fixed)!\n", |
576 | (unsigned long)addr); | 576 | (unsigned long)addr); |
577 | } | 577 | } |
@@ -1463,6 +1463,119 @@ static int xen_pgd_alloc(struct mm_struct *mm) | |||
1463 | return ret; | 1463 | return ret; |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | #ifdef CONFIG_X86_64 | ||
1467 | static __initdata u64 __last_pgt_set_rw = 0; | ||
1468 | static __initdata u64 __pgt_buf_start = 0; | ||
1469 | static __initdata u64 __pgt_buf_end = 0; | ||
1470 | static __initdata u64 __pgt_buf_top = 0; | ||
1471 | /* | ||
1472 | * As a consequence of the commit: | ||
1473 | * | ||
1474 | * commit 4b239f458c229de044d6905c2b0f9fe16ed9e01e | ||
1475 | * Author: Yinghai Lu <yinghai@kernel.org> | ||
1476 | * Date: Fri Dec 17 16:58:28 2010 -0800 | ||
1477 | * | ||
1478 | * x86-64, mm: Put early page table high | ||
1479 | * | ||
1480 | * at some point init_memory_mapping is going to reach the pagetable pages | ||
1481 | * area and map those pages too (mapping them as normal memory that falls | ||
1482 | * in the range of addresses passed to init_memory_mapping as argument). | ||
1483 | * Some of those pages are already pagetable pages (they are in the range | ||
1484 | * pgt_buf_start-pgt_buf_end) therefore they are going to be mapped RO and | ||
1485 | * everything is fine. | ||
1486 | * Some of these pages are not pagetable pages yet (they fall in the range | ||
1487 | * pgt_buf_end-pgt_buf_top; for example the page at pgt_buf_end) so they | ||
1488 | * are going to be mapped RW. When these pages become pagetable pages and | ||
1489 | * are hooked into the pagetable, xen will find that the guest has already | ||
1490 | * a RW mapping of them somewhere and fail the operation. | ||
1491 | * The reason Xen requires pagetables to be RO is that the hypervisor needs | ||
1492 | * to verify that the pagetables are valid before using them. The validation | ||
1493 | * operations are called "pinning". | ||
1494 | * | ||
1495 | * In order to fix the issue we mark all the pages in the entire range | ||
1496 | * pgt_buf_start-pgt_buf_top as RO, however when the pagetable allocation | ||
1497 | * is completed only the range pgt_buf_start-pgt_buf_end is reserved by | ||
1498 | * init_memory_mapping. Hence the kernel is going to crash as soon as one | ||
1499 | * of the pages in the range pgt_buf_end-pgt_buf_top is reused (b/c those | ||
1500 | * ranges are RO). | ||
1501 | * | ||
1502 | * For this reason, 'mark_rw_past_pgt' is introduced which is called _after_ | ||
1503 | * the init_memory_mapping has completed (in a perfect world we would | ||
1504 | * call this function from init_memory_mapping, but lets ignore that). | ||
1505 | * | ||
1506 | * Because we are called _after_ init_memory_mapping the pgt_buf_[start, | ||
1507 | * end,top] have all changed to new values (b/c init_memory_mapping | ||
1508 | * is called and setting up another new page-table). Hence, the first time | ||
1509 | * we enter this function, we save away the pgt_buf_start value and update | ||
1510 | * the pgt_buf_[end,top]. | ||
1511 | * | ||
1512 | * When we detect that the "old" pgt_buf_start through pgt_buf_end | ||
1513 | * PFNs have been reserved (so memblock_x86_reserve_range has been called), | ||
1514 | * we immediately set out to RW the "old" pgt_buf_end through pgt_buf_top. | ||
1515 | * | ||
1516 | * And then we update those "old" pgt_buf_[end|top] with the new ones | ||
1517 | * so that we can redo this on the next pagetable. | ||
1518 | */ | ||
1519 | static __init void mark_rw_past_pgt(void) { | ||
1520 | |||
1521 | if (pgt_buf_end > pgt_buf_start) { | ||
1522 | u64 addr, size; | ||
1523 | |||
1524 | /* Save it away. */ | ||
1525 | if (!__pgt_buf_start) { | ||
1526 | __pgt_buf_start = pgt_buf_start; | ||
1527 | __pgt_buf_end = pgt_buf_end; | ||
1528 | __pgt_buf_top = pgt_buf_top; | ||
1529 | return; | ||
1530 | } | ||
1531 | /* If we get the range that starts at __pgt_buf_end that means | ||
1532 | * the range is reserved, and that in 'init_memory_mapping' | ||
1533 | * the 'memblock_x86_reserve_range' has been called with the | ||
1534 | * outdated __pgt_buf_start, __pgt_buf_end (the "new" | ||
1535 | * pgt_buf_[start|end|top] refer now to a new pagetable. | ||
1536 | * Note: we are called _after_ the pgt_buf_[..] have been | ||
1537 | * updated.*/ | ||
1538 | |||
1539 | addr = memblock_x86_find_in_range_size(PFN_PHYS(__pgt_buf_start), | ||
1540 | &size, PAGE_SIZE); | ||
1541 | |||
1542 | /* Still not reserved, meaning 'memblock_x86_reserve_range' | ||
1543 | * hasn't been called yet. Update the _end and _top.*/ | ||
1544 | if (addr == PFN_PHYS(__pgt_buf_start)) { | ||
1545 | __pgt_buf_end = pgt_buf_end; | ||
1546 | __pgt_buf_top = pgt_buf_top; | ||
1547 | return; | ||
1548 | } | ||
1549 | |||
1550 | /* OK, the area is reserved, meaning it is time for us to | ||
1551 | * set RW for the old end->top PFNs. */ | ||
1552 | |||
1553 | /* ..unless we had already done this. */ | ||
1554 | if (__pgt_buf_end == __last_pgt_set_rw) | ||
1555 | return; | ||
1556 | |||
1557 | addr = PFN_PHYS(__pgt_buf_end); | ||
1558 | |||
1559 | /* set as RW the rest */ | ||
1560 | printk(KERN_DEBUG "xen: setting RW the range %llx - %llx\n", | ||
1561 | PFN_PHYS(__pgt_buf_end), PFN_PHYS(__pgt_buf_top)); | ||
1562 | |||
1563 | while (addr < PFN_PHYS(__pgt_buf_top)) { | ||
1564 | make_lowmem_page_readwrite(__va(addr)); | ||
1565 | addr += PAGE_SIZE; | ||
1566 | } | ||
1567 | /* And update everything so that we are ready for the next | ||
1568 | * pagetable (the one created for regions past 4GB) */ | ||
1569 | __last_pgt_set_rw = __pgt_buf_end; | ||
1570 | __pgt_buf_start = pgt_buf_start; | ||
1571 | __pgt_buf_end = pgt_buf_end; | ||
1572 | __pgt_buf_top = pgt_buf_top; | ||
1573 | } | ||
1574 | return; | ||
1575 | } | ||
1576 | #else | ||
1577 | static __init void mark_rw_past_pgt(void) { } | ||
1578 | #endif | ||
1466 | static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) | 1579 | static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) |
1467 | { | 1580 | { |
1468 | #ifdef CONFIG_X86_64 | 1581 | #ifdef CONFIG_X86_64 |
@@ -1473,30 +1586,43 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
1473 | #endif | 1586 | #endif |
1474 | } | 1587 | } |
1475 | 1588 | ||
1589 | #ifdef CONFIG_X86_32 | ||
1476 | static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | 1590 | static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) |
1477 | { | 1591 | { |
1478 | unsigned long pfn = pte_pfn(pte); | ||
1479 | |||
1480 | #ifdef CONFIG_X86_32 | ||
1481 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ | 1592 | /* If there's an existing pte, then don't allow _PAGE_RW to be set */ |
1482 | if (pte_val_ma(*ptep) & _PAGE_PRESENT) | 1593 | if (pte_val_ma(*ptep) & _PAGE_PRESENT) |
1483 | pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & | 1594 | pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & |
1484 | pte_val_ma(pte)); | 1595 | pte_val_ma(pte)); |
1485 | #endif | 1596 | |
1597 | return pte; | ||
1598 | } | ||
1599 | #else /* CONFIG_X86_64 */ | ||
1600 | static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | ||
1601 | { | ||
1602 | unsigned long pfn = pte_pfn(pte); | ||
1486 | 1603 | ||
1487 | /* | 1604 | /* |
1605 | * A bit of optimization. We do not need to call the workaround | ||
1606 | * when xen_set_pte_init is called with a PTE with 0 as PFN. | ||
1607 | * That is b/c the pagetable at that point are just being populated | ||
1608 | * with empty values and we can save some cycles by not calling | ||
1609 | * the 'memblock' code.*/ | ||
1610 | if (pfn) | ||
1611 | mark_rw_past_pgt(); | ||
1612 | /* | ||
1488 | * If the new pfn is within the range of the newly allocated | 1613 | * If the new pfn is within the range of the newly allocated |
1489 | * kernel pagetable, and it isn't being mapped into an | 1614 | * kernel pagetable, and it isn't being mapped into an |
1490 | * early_ioremap fixmap slot as a freshly allocated page, make sure | 1615 | * early_ioremap fixmap slot as a freshly allocated page, make sure |
1491 | * it is RO. | 1616 | * it is RO. |
1492 | */ | 1617 | */ |
1493 | if (((!is_early_ioremap_ptep(ptep) && | 1618 | if (((!is_early_ioremap_ptep(ptep) && |
1494 | pfn >= pgt_buf_start && pfn < pgt_buf_end)) || | 1619 | pfn >= pgt_buf_start && pfn < pgt_buf_top)) || |
1495 | (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1))) | 1620 | (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1))) |
1496 | pte = pte_wrprotect(pte); | 1621 | pte = pte_wrprotect(pte); |
1497 | 1622 | ||
1498 | return pte; | 1623 | return pte; |
1499 | } | 1624 | } |
1625 | #endif /* CONFIG_X86_64 */ | ||
1500 | 1626 | ||
1501 | /* Init-time set_pte while constructing initial pagetables, which | 1627 | /* Init-time set_pte while constructing initial pagetables, which |
1502 | doesn't allow RO pagetable pages to be remapped RW */ | 1628 | doesn't allow RO pagetable pages to be remapped RW */ |
@@ -1992,6 +2118,8 @@ __init void xen_ident_map_ISA(void) | |||
1992 | 2118 | ||
1993 | static __init void xen_post_allocator_init(void) | 2119 | static __init void xen_post_allocator_init(void) |
1994 | { | 2120 | { |
2121 | mark_rw_past_pgt(); | ||
2122 | |||
1995 | #ifdef CONFIG_XEN_DEBUG | 2123 | #ifdef CONFIG_XEN_DEBUG |
1996 | pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug); | 2124 | pv_mmu_ops.make_pte = PV_CALLEE_SAVE(xen_make_pte_debug); |
1997 | #endif | 2125 | #endif |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index fa0269a99377..90bac0aac3a5 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -227,7 +227,7 @@ char * __init xen_memory_setup(void) | |||
227 | 227 | ||
228 | memcpy(map_raw, map, sizeof(map)); | 228 | memcpy(map_raw, map, sizeof(map)); |
229 | e820.nr_map = 0; | 229 | e820.nr_map = 0; |
230 | xen_extra_mem_start = mem_end; | 230 | xen_extra_mem_start = max((1ULL << 32), mem_end); |
231 | for (i = 0; i < memmap.nr_entries; i++) { | 231 | for (i = 0; i < memmap.nr_entries; i++) { |
232 | unsigned long long end; | 232 | unsigned long long end; |
233 | 233 | ||
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 1d730b5579a0..7c275f5d0df0 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -9,7 +9,6 @@ config XTENSA | |||
9 | select HAVE_IDE | 9 | select HAVE_IDE |
10 | select HAVE_GENERIC_HARDIRQS | 10 | select HAVE_GENERIC_HARDIRQS |
11 | select GENERIC_IRQ_SHOW | 11 | select GENERIC_IRQ_SHOW |
12 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
13 | help | 12 | help |
14 | Xtensa processors are 32-bit RISC machines designed by Tensilica | 13 | Xtensa processors are 32-bit RISC machines designed by Tensilica |
15 | primarily for embedded systems. These processors are both | 14 | primarily for embedded systems. These processors are both |
diff --git a/arch/xtensa/include/asm/dma.h b/arch/xtensa/include/asm/dma.h index 137ca3945b07..bb099a373b5a 100644 --- a/arch/xtensa/include/asm/dma.h +++ b/arch/xtensa/include/asm/dma.h | |||
@@ -37,7 +37,7 @@ | |||
37 | * the size of the statically mapped kernel segment | 37 | * the size of the statically mapped kernel segment |
38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. | 38 | * (XCHAL_KSEG_{CACHED,BYPASS}_SIZE), ie. 128 MB. |
39 | * | 39 | * |
40 | * NOTE: When the entire KSEG area is DMA capable, we substract | 40 | * NOTE: When the entire KSEG area is DMA capable, we subtract |
41 | * one from the max address so that the virt_to_phys() macro | 41 | * one from the max address so that the virt_to_phys() macro |
42 | * works correctly on the address (otherwise the address | 42 | * works correctly on the address (otherwise the address |
43 | * enters another area, and virt_to_phys() may not return | 43 | * enters another area, and virt_to_phys() may not return |
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 5fd01f6aaf37..6223f3346b5c 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S | |||
@@ -1026,7 +1026,7 @@ ENTRY(fast_syscall_unrecoverable) | |||
1026 | * TRY adds an entry to the __ex_table fixup table for the immediately | 1026 | * TRY adds an entry to the __ex_table fixup table for the immediately |
1027 | * following instruction. | 1027 | * following instruction. |
1028 | * | 1028 | * |
1029 | * CATCH catches any exception that occurred at one of the preceeding TRY | 1029 | * CATCH catches any exception that occurred at one of the preceding TRY |
1030 | * statements and continues from there | 1030 | * statements and continues from there |
1031 | * | 1031 | * |
1032 | * Usage TRY l32i a0, a1, 0 | 1032 | * Usage TRY l32i a0, a1, 0 |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index d77089df412e..4340ee076bd5 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -64,47 +64,41 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | |||
64 | 64 | ||
65 | int arch_show_interrupts(struct seq_file *p, int prec) | 65 | int arch_show_interrupts(struct seq_file *p, int prec) |
66 | { | 66 | { |
67 | int j; | ||
68 | |||
69 | seq_printf(p, "%*s: ", prec, "NMI"); | ||
70 | for_each_online_cpu(j) | ||
71 | seq_printf(p, "%10u ", nmi_count(j)); | ||
72 | seq_putc(p, '\n'); | ||
73 | seq_printf(p, "%*s: ", prec, "ERR"); | 67 | seq_printf(p, "%*s: ", prec, "ERR"); |
74 | seq_printf(p, "%10u\n", atomic_read(&irq_err_count)); | 68 | seq_printf(p, "%10u\n", atomic_read(&irq_err_count)); |
75 | return 0; | 69 | return 0; |
76 | } | 70 | } |
77 | 71 | ||
78 | static void xtensa_irq_mask(struct irq_chip *d) | 72 | static void xtensa_irq_mask(struct irq_data *d) |
79 | { | 73 | { |
80 | cached_irq_mask &= ~(1 << d->irq); | 74 | cached_irq_mask &= ~(1 << d->irq); |
81 | set_sr (cached_irq_mask, INTENABLE); | 75 | set_sr (cached_irq_mask, INTENABLE); |
82 | } | 76 | } |
83 | 77 | ||
84 | static void xtensa_irq_unmask(struct irq_chip *d) | 78 | static void xtensa_irq_unmask(struct irq_data *d) |
85 | { | 79 | { |
86 | cached_irq_mask |= 1 << d->irq; | 80 | cached_irq_mask |= 1 << d->irq; |
87 | set_sr (cached_irq_mask, INTENABLE); | 81 | set_sr (cached_irq_mask, INTENABLE); |
88 | } | 82 | } |
89 | 83 | ||
90 | static void xtensa_irq_enable(struct irq_chip *d) | 84 | static void xtensa_irq_enable(struct irq_data *d) |
91 | { | 85 | { |
92 | variant_irq_enable(d->irq); | 86 | variant_irq_enable(d->irq); |
93 | xtensa_irq_unmask(d->irq); | 87 | xtensa_irq_unmask(d->irq); |
94 | } | 88 | } |
95 | 89 | ||
96 | static void xtensa_irq_disable(struct irq_chip *d) | 90 | static void xtensa_irq_disable(struct irq_data *d) |
97 | { | 91 | { |
98 | xtensa_irq_mask(d->irq); | 92 | xtensa_irq_mask(d->irq); |
99 | variant_irq_disable(d->irq); | 93 | variant_irq_disable(d->irq); |
100 | } | 94 | } |
101 | 95 | ||
102 | static void xtensa_irq_ack(struct irq_chip *d) | 96 | static void xtensa_irq_ack(struct irq_data *d) |
103 | { | 97 | { |
104 | set_sr(1 << d->irq, INTCLEAR); | 98 | set_sr(1 << d->irq, INTCLEAR); |
105 | } | 99 | } |
106 | 100 | ||
107 | static int xtensa_irq_retrigger(struct irq_chip *d) | 101 | static int xtensa_irq_retrigger(struct irq_data *d) |
108 | { | 102 | { |
109 | set_sr (1 << d->irq, INTSET); | 103 | set_sr (1 << d->irq, INTSET); |
110 | return 1; | 104 | return 1; |