Skip to content

Commit ae9222d

Browse files
committed
Merge remote-tracking branch 'stable/linux-3.10.y' into rpi-3.10.y
2 parents 8f3406f + bdec432 commit ae9222d

22 files changed

Lines changed: 176 additions & 64 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 3
22
PATCHLEVEL = 10
3-
SUBLEVEL = 37
3+
SUBLEVEL = 38
44
EXTRAVERSION =
55
NAME = TOSSUG Baby Fish
66

‎arch/sparc/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ config SPARC
2525
select RTC_DRV_M48T59
2626
select HAVE_DMA_ATTRS
2727
select HAVE_DMA_API_DEBUG
28-
select HAVE_ARCH_JUMP_LABEL
28+
select HAVE_ARCH_JUMP_LABEL if SPARC64
2929
select HAVE_GENERIC_HARDIRQS
3030
select GENERIC_IRQ_SHOW
3131
select ARCH_WANT_IPC_PARSE_VERSION

‎arch/sparc/include/asm/uaccess_64.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ extern unsigned long __must_check __clear_user(void __user *, unsigned long);
262262
extern __must_check long strlen_user(const char __user *str);
263263
extern __must_check long strnlen_user(const char __user *str, long n);
264264

265-
#define __copy_to_user_inatomic ___copy_to_user
266-
#define __copy_from_user_inatomic ___copy_from_user
265+
#define __copy_to_user_inatomic __copy_to_user
266+
#define __copy_from_user_inatomic __copy_from_user
267267

268268
struct pt_regs;
269269
extern unsigned long compute_effective_address(struct pt_regs *,

‎arch/sparc/kernel/pci.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ static void apb_fake_ranges(struct pci_dev *dev,
399399
apb_calc_first_last(map, &first, &last);
400400
res = bus->resource[1];
401401
res->flags = IORESOURCE_MEM;
402-
region.start = (first << 21);
403-
region.end = (last << 21) + ((1 << 21) - 1);
402+
region.start = (first << 29);
403+
region.end = (last << 29) + ((1 << 29) - 1);
404404
pcibios_bus_to_resource(dev, res, &region);
405405
}
406406

‎arch/sparc/kernel/process_64.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ void arch_cpu_idle(void)
5757
{
5858
if (tlb_type != hypervisor) {
5959
touch_nmi_watchdog();
60+
local_irq_enable();
6061
} else {
6162
unsigned long pstate;
6263

64+
local_irq_enable();
65+
6366
/* The sun4v sleeping code requires that we have PSTATE.IE cleared over
6467
* the cpu sleep hypervisor call.
6568
*/
@@ -81,7 +84,6 @@ void arch_cpu_idle(void)
8184
: "=&r" (pstate)
8285
: "i" (PSTATE_IE));
8386
}
84-
local_irq_enable();
8587
}
8688

8789
#ifdef CONFIG_HOTPLUG_CPU

‎arch/sparc/kernel/syscalls.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ linux_sparc_syscall32:
189189
mov %i0, %l5 ! IEU1
190190
5: call %l7 ! CTI Group brk forced
191191
srl %i5, 0, %o5 ! IEU1
192-
ba,a,pt %xcc, 3f
192+
ba,pt %xcc, 3f
193+
sra %o0, 0, %o0
193194

194195
/* Linux native system calls enter here... */
195196
.align 32
@@ -217,7 +218,6 @@ linux_sparc_syscall:
217218
3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0]
218219
ret_sys_call:
219220
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3
220-
sra %o0, 0, %o0
221221
mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
222222
sllx %g2, 32, %g2
223223

‎arch/x86/kernel/early-quirks.c‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,15 @@ static void __init intel_remapping_check(int num, int slot, int func)
202202
revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
203203

204204
/*
205-
* Revision 13 of all triggering devices id in this quirk have
206-
* a problem draining interrupts when irq remapping is enabled,
207-
* and should be flagged as broken. Additionally revisions 0x12
208-
* and 0x22 of device id 0x3405 has this problem.
205+
* Revision <= 13 of all triggering devices id in this quirk
206+
* have a problem draining interrupts when irq remapping is
207+
* enabled, and should be flagged as broken. Additionally
208+
* revision 0x22 of device id 0x3405 has this problem.
209209
*/
210-
if (revision == 0x13)
210+
if (revision <= 0x13)
211211
set_irq_remapping_broken();
212-
else if ((device == 0x3405) &&
213-
((revision == 0x12) ||
214-
(revision == 0x22)))
212+
else if (device == 0x3405 && revision == 0x22)
215213
set_irq_remapping_broken();
216-
217214
}
218215

219216
#define QFLAG_APPLY_ONCE 0x1

‎drivers/char/ipmi/ipmi_bt_sm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static inline void write_all_bytes(struct si_sm_data *bt)
352352

353353
static inline int read_all_bytes(struct si_sm_data *bt)
354354
{
355-
unsigned char i;
355+
unsigned int i;
356356

357357
/*
358358
* length is "framing info", minimum = 4: NetFn, Seq, Cmd, cCode.

‎drivers/staging/comedi/drivers/8255_pci.c‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Configuration Options: not applicable, uses PCI auto config
5959
#include "../comedidev.h"
6060

6161
#include "8255.h"
62+
#include "mite.h"
6263

6364
enum pci_8255_boardid {
6465
BOARD_ADLINK_PCI7224,
@@ -82,6 +83,7 @@ struct pci_8255_boardinfo {
8283
const char *name;
8384
int dio_badr;
8485
int n_8255;
86+
unsigned int has_mite:1;
8587
};
8688

8789
static const struct pci_8255_boardinfo pci_8255_boards[] = {
@@ -129,43 +131,69 @@ static const struct pci_8255_boardinfo pci_8255_boards[] = {
129131
.name = "ni_pci-dio-96",
130132
.dio_badr = 1,
131133
.n_8255 = 4,
134+
.has_mite = 1,
132135
},
133136
[BOARD_NI_PCIDIO96B] = {
134137
.name = "ni_pci-dio-96b",
135138
.dio_badr = 1,
136139
.n_8255 = 4,
140+
.has_mite = 1,
137141
},
138142
[BOARD_NI_PXI6508] = {
139143
.name = "ni_pxi-6508",
140144
.dio_badr = 1,
141145
.n_8255 = 4,
146+
.has_mite = 1,
142147
},
143148
[BOARD_NI_PCI6503] = {
144149
.name = "ni_pci-6503",
145150
.dio_badr = 1,
146151
.n_8255 = 1,
152+
.has_mite = 1,
147153
},
148154
[BOARD_NI_PCI6503B] = {
149155
.name = "ni_pci-6503b",
150156
.dio_badr = 1,
151157
.n_8255 = 1,
158+
.has_mite = 1,
152159
},
153160
[BOARD_NI_PCI6503X] = {
154161
.name = "ni_pci-6503x",
155162
.dio_badr = 1,
156163
.n_8255 = 1,
164+
.has_mite = 1,
157165
},
158166
[BOARD_NI_PXI_6503] = {
159167
.name = "ni_pxi-6503",
160168
.dio_badr = 1,
161169
.n_8255 = 1,
170+
.has_mite = 1,
162171
},
163172
};
164173

165174
struct pci_8255_private {
166175
void __iomem *mmio_base;
167176
};
168177

178+
static int pci_8255_mite_init(struct pci_dev *pcidev)
179+
{
180+
void __iomem *mite_base;
181+
u32 main_phys_addr;
182+
183+
/* ioremap the MITE registers (BAR 0) temporarily */
184+
mite_base = pci_ioremap_bar(pcidev, 0);
185+
if (!mite_base)
186+
return -ENOMEM;
187+
188+
/* set data window to main registers (BAR 1) */
189+
main_phys_addr = pci_resource_start(pcidev, 1);
190+
writel(main_phys_addr | WENAB, mite_base + MITE_IODWBSR);
191+
192+
/* finished with MITE registers */
193+
iounmap(mite_base);
194+
return 0;
195+
}
196+
169197
static int pci_8255_mmio(int dir, int port, int data, unsigned long iobase)
170198
{
171199
void __iomem *mmio_base = (void __iomem *)iobase;
@@ -205,6 +233,12 @@ static int pci_8255_auto_attach(struct comedi_device *dev,
205233
if (ret)
206234
return ret;
207235

236+
if (board->has_mite) {
237+
ret = pci_8255_mite_init(pcidev);
238+
if (ret)
239+
return ret;
240+
}
241+
208242
is_mmio = (pci_resource_flags(pcidev, board->dio_badr) &
209243
IORESOURCE_MEM) != 0;
210244
if (is_mmio) {

‎drivers/tty/tty_io.c‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,12 +1267,13 @@ static void pty_line_name(struct tty_driver *driver, int index, char *p)
12671267
*
12681268
* Locking: None
12691269
*/
1270-
static void tty_line_name(struct tty_driver *driver, int index, char *p)
1270+
static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
12711271
{
12721272
if (driver->flags & TTY_DRIVER_UNNUMBERED_NODE)
1273-
strcpy(p, driver->name);
1273+
return sprintf(p, "%s", driver->name);
12741274
else
1275-
sprintf(p, "%s%d", driver->name, index + driver->name_base);
1275+
return sprintf(p, "%s%d", driver->name,
1276+
index + driver->name_base);
12761277
}
12771278

12781279
/**
@@ -3538,9 +3539,19 @@ static ssize_t show_cons_active(struct device *dev,
35383539
if (i >= ARRAY_SIZE(cs))
35393540
break;
35403541
}
3541-
while (i--)
3542-
count += sprintf(buf + count, "%s%d%c",
3543-
cs[i]->name, cs[i]->index, i ? ' ':'\n');
3542+
while (i--) {
3543+
int index = cs[i]->index;
3544+
struct tty_driver *drv = cs[i]->device(cs[i], &index);
3545+
3546+
/* don't resolve tty0 as some programs depend on it */
3547+
if (drv && (cs[i]->index > 0 || drv->major != TTY_MAJOR))
3548+
count += tty_line_name(drv, index, buf + count);
3549+
else
3550+
count += sprintf(buf + count, "%s%d",
3551+
cs[i]->name, cs[i]->index);
3552+
3553+
count += sprintf(buf + count, "%c", i ? ' ':'\n');
3554+
}
35443555
console_unlock();
35453556

35463557
return count;

0 commit comments

Comments
 (0)