Skip to content

Commit 528ba4e

Browse files
author
Linus Torvalds
committed
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] MIPS doesn't need compat_sys_getdents. [MIPS] JMR3927: Fixup another victim of the irq pt_regs cleanup. [MIPS] EMMA 2 / Markeins: struct resource takes physical addresses. [MIPS] EMMA 2 / Markeins: Convert to name struct resource initialization. [MIPS] EMMA 2 / Markeins: Formitting fixes split from actual address fixes. [MIPS] EMMA 2 / Markeins: Fix build wreckage due to genirq wreckage. [MIPS] Ocelot G: Fix build error and numerous warnings. [MIPS] Fix return value of TXX9 SPI interrupt handler [MIPS] Au1000: Fix warning about unused variable. [MIPS] Wire up getcpu(2) and epoll_wait(2) syscalls. [MIPS] Make SB1 cache flushes not to use on_each_cpu [MIPS] Fix warning about unused definition in c-sb1.c [MIPS] SMTC: Make 8 the default number of processors. [MIPS] Oprofile: Fix MIPSxx counter number detection. [MIPS] Au1xx0 code sets incorrect mips_hpt_frequency [MIPS] Oprofile: fix on non-VSMP / non-SMTC SMP configurations.
2 parents df6c0cd + 21e9ac7 commit 528ba4e

16 files changed

Lines changed: 121 additions & 63 deletions

File tree

‎arch/mips/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ config MOMENCO_OCELOT_C
408408
select SWAP_IO_SPACE
409409
select SYS_HAS_CPU_RM7000
410410
select SYS_SUPPORTS_32BIT_KERNEL
411-
select SYS_SUPPORTS_64BIT_KERNEL
411+
select SYS_SUPPORTS_64BIT_KERNEL if BROKEN
412412
select SYS_SUPPORTS_BIG_ENDIAN
413413
help
414414
The Ocelot is a MIPS-based Single Board Computer (SBC) made by
@@ -1690,6 +1690,7 @@ config NR_CPUS
16901690
depends on SMP
16911691
default "64" if SGI_IP27
16921692
default "2"
1693+
default "8" if MIPS_MT_SMTC
16931694
help
16941695
This allows you to specify the maximum number of CPUs which this
16951696
kernel will support. The maximum supported value is 32 for 32-bit

‎arch/mips/au1000/common/time.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ unsigned long wtimer;
8282
void mips_timer_interrupt(void)
8383
{
8484
int irq = 63;
85-
unsigned long count;
8685

8786
irq_enter();
8887
kstat_this_cpu.irqs[irq]++;
@@ -231,7 +230,6 @@ wakeup_counter0_set(int ticks)
231230
*/
232231
unsigned long cal_r4koff(void)
233232
{
234-
unsigned long count;
235233
unsigned long cpu_speed;
236234
unsigned long flags;
237235
unsigned long counter;
@@ -258,7 +256,7 @@ unsigned long cal_r4koff(void)
258256

259257
#if defined(CONFIG_AU1000_USE32K)
260258
{
261-
unsigned long start, end;
259+
unsigned long start, end, count;
262260

263261
start = au_readl(SYS_RTCREAD);
264262
start += 2;
@@ -282,7 +280,6 @@ unsigned long cal_r4koff(void)
282280
#else
283281
cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) *
284282
AU1000_SRC_CLK;
285-
count = cpu_speed / 2;
286283
#endif
287284
}
288285
else {
@@ -291,10 +288,9 @@ unsigned long cal_r4koff(void)
291288
* NOTE: some old silicon doesn't allow reading the PLL.
292289
*/
293290
cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * AU1000_SRC_CLK;
294-
count = cpu_speed / 2;
295291
no_au1xxx_32khz = 1;
296292
}
297-
mips_hpt_frequency = count;
293+
mips_hpt_frequency = cpu_speed;
298294
// Equation: Baudrate = CPU / (SD * 2 * CLKDIV * 16)
299295
set_au1x00_uart_baud_base(cpu_speed / (2 * ((int)(au_readl(SYS_POWERCTRL)&0x03) + 2) * 16));
300296
spin_unlock_irqrestore(&time_lock, flags);

‎arch/mips/emma2rh/common/irq_emma2rh.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void emma2rh_irq_init(u32 irq_base)
9797
irq_desc[i].status = IRQ_DISABLED;
9898
irq_desc[i].action = NULL;
9999
irq_desc[i].depth = 1;
100-
irq_desc[i].handler = &emma2rh_irq_controller;
100+
irq_desc[i].chip = &emma2rh_irq_controller;
101101
}
102102

103103
emma2rh_irq_base = irq_base;

‎arch/mips/emma2rh/markeins/irq_markeins.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void emma2rh_sw_irq_init(u32 irq_base)
8686
irq_desc[i].status = IRQ_DISABLED;
8787
irq_desc[i].action = NULL;
8888
irq_desc[i].depth = 2;
89-
irq_desc[i].handler = &emma2rh_sw_irq_controller;
89+
irq_desc[i].chip = &emma2rh_sw_irq_controller;
9090
}
9191

9292
emma2rh_sw_irq_base = irq_base;
@@ -166,7 +166,7 @@ void emma2rh_gpio_irq_init(u32 irq_base)
166166
irq_desc[i].status = IRQ_DISABLED;
167167
irq_desc[i].action = NULL;
168168
irq_desc[i].depth = 2;
169-
irq_desc[i].handler = &emma2rh_gpio_irq_controller;
169+
irq_desc[i].chip = &emma2rh_gpio_irq_controller;
170170
}
171171

172172
emma2rh_gpio_irq_base = irq_base;

‎arch/mips/emma2rh/markeins/platform.c‎

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,45 @@
4444
#define I2C_EMMA2RH "emma2rh-iic" /* must be in sync with IIC driver */
4545

4646
static struct resource i2c_emma_resources_0[] = {
47-
{ NULL, EMMA2RH_IRQ_PIIC0, EMMA2RH_IRQ_PIIC0, IORESOURCE_IRQ },
48-
{ NULL, KSEG1ADDR(EMMA2RH_PIIC0_BASE), KSEG1ADDR(EMMA2RH_PIIC0_BASE + 0x1000), 0 },
47+
{
48+
.name = NULL,
49+
.start = EMMA2RH_IRQ_PIIC0,
50+
.end = EMMA2RH_IRQ_PIIC0,
51+
.flags = IORESOURCE_IRQ
52+
}, {
53+
.name = NULL,
54+
.start = EMMA2RH_PIIC0_BASE,
55+
.end = EMMA2RH_PIIC0_BASE + 0x1000,
56+
.flags = 0
57+
},
4958
};
5059

5160
struct resource i2c_emma_resources_1[] = {
52-
{ NULL, EMMA2RH_IRQ_PIIC1, EMMA2RH_IRQ_PIIC1, IORESOURCE_IRQ },
53-
{ NULL, KSEG1ADDR(EMMA2RH_PIIC1_BASE), KSEG1ADDR(EMMA2RH_PIIC1_BASE + 0x1000), 0 },
61+
{
62+
.name = NULL,
63+
.start = EMMA2RH_IRQ_PIIC1,
64+
.end = EMMA2RH_IRQ_PIIC1,
65+
.flags = IORESOURCE_IRQ
66+
}, {
67+
.name = NULL,
68+
.start = EMMA2RH_PIIC1_BASE,
69+
.end = EMMA2RH_PIIC1_BASE + 0x1000,
70+
.flags = 0
71+
},
5472
};
5573

5674
struct resource i2c_emma_resources_2[] = {
57-
{ NULL, EMMA2RH_IRQ_PIIC2, EMMA2RH_IRQ_PIIC2, IORESOURCE_IRQ },
58-
{ NULL, KSEG1ADDR(EMMA2RH_PIIC2_BASE), KSEG1ADDR(EMMA2RH_PIIC2_BASE + 0x1000), 0 },
75+
{
76+
.name = NULL,
77+
.start = EMMA2RH_IRQ_PIIC2,
78+
.end = EMMA2RH_IRQ_PIIC2,
79+
.flags = IORESOURCE_IRQ
80+
}, {
81+
.name = NULL,
82+
.start = EMMA2RH_PIIC2_BASE,
83+
.end = EMMA2RH_PIIC2_BASE + 0x1000,
84+
.flags = 0
85+
},
5986
};
6087

6188
struct platform_device i2c_emma_devices[] = {
@@ -83,32 +110,29 @@ struct platform_device i2c_emma_devices[] = {
83110
#define EMMA2RH_SERIAL_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST
84111

85112
static struct plat_serial8250_port platform_serial_ports[] = {
86-
[0] = {
87-
.membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3),
88-
.irq = EMMA2RH_IRQ_PFUR0,
89-
.uartclk = EMMA2RH_SERIAL_CLOCK,
90-
.regshift = 4,
91-
.iotype = UPIO_MEM,
92-
.flags = EMMA2RH_SERIAL_FLAGS,
93-
},
94-
[1] = {
95-
.membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3),
96-
.irq = EMMA2RH_IRQ_PFUR1,
97-
.uartclk = EMMA2RH_SERIAL_CLOCK,
98-
.regshift = 4,
99-
.iotype = UPIO_MEM,
100-
.flags = EMMA2RH_SERIAL_FLAGS,
101-
},
102-
[2] = {
103-
.membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3),
104-
.irq = EMMA2RH_IRQ_PFUR2,
105-
.uartclk = EMMA2RH_SERIAL_CLOCK,
106-
.regshift = 4,
107-
.iotype = UPIO_MEM,
108-
.flags = EMMA2RH_SERIAL_FLAGS,
109-
},
110-
[3] = {
111-
.flags = 0,
113+
[0] = {
114+
.membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3),
115+
.irq = EMMA2RH_IRQ_PFUR0,
116+
.uartclk = EMMA2RH_SERIAL_CLOCK,
117+
.regshift = 4,
118+
.iotype = UPIO_MEM,
119+
.flags = EMMA2RH_SERIAL_FLAGS,
120+
}, [1] = {
121+
.membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3),
122+
.irq = EMMA2RH_IRQ_PFUR1,
123+
.uartclk = EMMA2RH_SERIAL_CLOCK,
124+
.regshift = 4,
125+
.iotype = UPIO_MEM,
126+
.flags = EMMA2RH_SERIAL_FLAGS,
127+
}, [2] = {
128+
.membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3),
129+
.irq = EMMA2RH_IRQ_PFUR2,
130+
.uartclk = EMMA2RH_SERIAL_CLOCK,
131+
.regshift = 4,
132+
.iotype = UPIO_MEM,
133+
.flags = EMMA2RH_SERIAL_FLAGS,
134+
}, [3] = {
135+
.flags = 0,
112136
},
113137
};
114138

‎arch/mips/jmr3927/rbhma3100/irq.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ static void tx_branch_likely_bug_fixup(void)
288288

289289
static void jmr3927_spurious(void)
290290
{
291+
struct pt_regs * regs = get_irq_regs();
292+
291293
#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
292294
tx_branch_likely_bug_fixup();
293295
#endif
@@ -297,6 +299,7 @@ static void jmr3927_spurious(void)
297299

298300
asmlinkage void plat_irq_dispatch(void)
299301
{
302+
struct pt_regs * regs = get_irq_regs();
300303
int irq;
301304

302305
#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND

‎arch/mips/kernel/scall32-o32.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,8 @@ einval: li v0, -EINVAL
654654
sys sys_set_robust_list 2
655655
sys sys_get_robust_list 3 /* 4310 */
656656
sys sys_ni_syscall 0
657+
sys sys_getcpu 3
658+
sys sys_epoll_pwait 6
657659
.endm
658660

659661
/* We pre-compute the number of _instruction_ bytes needed to

‎arch/mips/kernel/scall64-64.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,5 @@ sys_call_table:
469469
PTR sys_set_robust_list
470470
PTR sys_get_robust_list
471471
PTR sys_ni_syscall /* 5270 */
472+
PTR sys_getcpu
473+
PTR sys_epoll_pwait

‎arch/mips/kernel/scall64-n32.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,3 +395,5 @@ EXPORT(sysn32_call_table)
395395
PTR compat_sys_set_robust_list
396396
PTR compat_sys_get_robust_list
397397
PTR sys_ni_syscall
398+
PTR sys_getcpu
399+
PTR sys_epoll_pwait

‎arch/mips/kernel/scall64-o32.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,4 +517,6 @@ sys_call_table:
517517
PTR compat_sys_set_robust_list
518518
PTR compat_sys_get_robust_list /* 4310 */
519519
PTR sys_ni_syscall
520+
PTR sys_getcpu
521+
PTR sys_epoll_pwait
520522
.size sys_call_table,.-sys_call_table

0 commit comments

Comments
 (0)