Skip to content

Commit 31c5b91

Browse files
committed
Merge tag 'v3.4.98' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidxu-3.4.y
This is the 3.4.98 stable release Conflicts: net/bluetooth/hci_conn.c
2 parents b48f142 + 0bbbf93 commit 31c5b91

File tree

46 files changed

+413
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+413
-188
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 3
22
PATCHLEVEL = 4
3-
SUBLEVEL = 97
3+
SUBLEVEL = 98
44
EXTRAVERSION =
55
NAME = Saber-toothed Squirrel
66

arch/arm/mach-omap2/mux.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
184184
m0_entry = mux->muxnames[0];
185185

186186
/* First check for full name in mode0.muxmode format */
187-
if (mode0_len && strncmp(muxname, m0_entry, mode0_len))
188-
continue;
187+
if (mode0_len)
188+
if (strncmp(muxname, m0_entry, mode0_len) ||
189+
(strlen(m0_entry) != mode0_len))
190+
continue;
189191

190192
/* Then check for muxmode only */
191193
for (i = 0; i < OMAP_MUX_NR_MODES; i++) {

arch/powerpc/kernel/exceptions-64s.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ machine_check_common:
491491
STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
492492
STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
493493
STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception)
494-
STD_EXCEPTION_COMMON(0xe40, emulation_assist, .program_check_exception)
494+
STD_EXCEPTION_COMMON(0xe40, emulation_assist, .emulation_assist_interrupt)
495495
STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception)
496496
STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception)
497497
STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception)

arch/powerpc/kernel/lparcfg.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535
#include <asm/vdso_datapage.h>
3636
#include <asm/vio.h>
3737
#include <asm/mmu.h>
38+
#include <asm/machdep.h>
3839

40+
41+
/*
42+
* This isn't a module but we expose that to userspace
43+
* via /proc so leave the definitions here
44+
*/
3945
#define MODULE_VERS "1.9"
4046
#define MODULE_NAME "lparcfg"
4147

@@ -301,6 +307,7 @@ static void parse_system_parameter_string(struct seq_file *m)
301307
__pa(rtas_data_buf),
302308
RTAS_DATA_BUF_SIZE);
303309
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
310+
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
304311
spin_unlock(&rtas_data_buf_lock);
305312

306313
if (call_status != 0) {
@@ -419,7 +426,8 @@ static void parse_em_data(struct seq_file *m)
419426
{
420427
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
421428

422-
if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
429+
if (firmware_has_feature(FW_FEATURE_LPAR) &&
430+
plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
423431
seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]);
424432
}
425433

@@ -678,7 +686,6 @@ static int lparcfg_open(struct inode *inode, struct file *file)
678686
}
679687

680688
static const struct file_operations lparcfg_fops = {
681-
.owner = THIS_MODULE,
682689
.read = seq_read,
683690
.write = lparcfg_write,
684691
.open = lparcfg_open,
@@ -704,15 +711,4 @@ static int __init lparcfg_init(void)
704711
proc_ppc64_lparcfg = ent;
705712
return 0;
706713
}
707-
708-
static void __exit lparcfg_cleanup(void)
709-
{
710-
if (proc_ppc64_lparcfg)
711-
remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
712-
}
713-
714-
module_init(lparcfg_init);
715-
module_exit(lparcfg_cleanup);
716-
MODULE_DESCRIPTION("Interface for LPAR configuration data");
717-
MODULE_AUTHOR("Dave Engebretsen");
718-
MODULE_LICENSE("GPL");
714+
machine_device_initcall(pseries, lparcfg_init);

arch/powerpc/kernel/setup_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
#endif
7777

7878
int boot_cpuid = 0;
79-
int __initdata spinning_secondaries;
79+
int spinning_secondaries;
8080
u64 ppc64_pft_size;
8181

8282
/* Pick defaults since we might want to patch instructions

arch/powerpc/kernel/sysfs.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <asm/machdep.h>
1818
#include <asm/smp.h>
1919
#include <asm/pmc.h>
20+
#include <asm/firmware.h>
2021

2122
#include "cacheinfo.h"
2223

@@ -179,15 +180,25 @@ SYSFS_PMCSETUP(spurr, SPRN_SPURR);
179180
SYSFS_PMCSETUP(dscr, SPRN_DSCR);
180181
SYSFS_PMCSETUP(pir, SPRN_PIR);
181182

183+
/*
184+
Lets only enable read for phyp resources and
185+
enable write when needed with a separate function.
186+
Lets be conservative and default to pseries.
187+
*/
182188
static DEVICE_ATTR(mmcra, 0600, show_mmcra, store_mmcra);
183189
static DEVICE_ATTR(spurr, 0600, show_spurr, NULL);
184190
static DEVICE_ATTR(dscr, 0600, show_dscr, store_dscr);
185-
static DEVICE_ATTR(purr, 0600, show_purr, store_purr);
191+
static DEVICE_ATTR(purr, 0400, show_purr, store_purr);
186192
static DEVICE_ATTR(pir, 0400, show_pir, NULL);
187193

188194
unsigned long dscr_default = 0;
189195
EXPORT_SYMBOL(dscr_default);
190196

197+
static void add_write_permission_dev_attr(struct device_attribute *attr)
198+
{
199+
attr->attr.mode |= 0200;
200+
}
201+
191202
static ssize_t show_dscr_default(struct device *dev,
192203
struct device_attribute *attr, char *buf)
193204
{
@@ -394,8 +405,11 @@ static void __cpuinit register_cpu_online(unsigned int cpu)
394405
if (cpu_has_feature(CPU_FTR_MMCRA))
395406
device_create_file(s, &dev_attr_mmcra);
396407

397-
if (cpu_has_feature(CPU_FTR_PURR))
408+
if (cpu_has_feature(CPU_FTR_PURR)) {
409+
if (!firmware_has_feature(FW_FEATURE_LPAR))
410+
add_write_permission_dev_attr(&dev_attr_purr);
398411
device_create_file(s, &dev_attr_purr);
412+
}
399413

400414
if (cpu_has_feature(CPU_FTR_SPURR))
401415
device_create_file(s, &dev_attr_spurr);

arch/powerpc/kernel/time.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ static u64 scan_dispatch_log(u64 stop_tb)
212212
if (i == vpa->dtl_idx)
213213
return 0;
214214
while (i < vpa->dtl_idx) {
215-
if (dtl_consumer)
216-
dtl_consumer(dtl, i);
217215
dtb = dtl->timebase;
218216
tb_delta = dtl->enqueue_to_dispatch_time +
219217
dtl->ready_to_enqueue_time;
@@ -226,6 +224,8 @@ static u64 scan_dispatch_log(u64 stop_tb)
226224
}
227225
if (dtb > stop_tb)
228226
break;
227+
if (dtl_consumer)
228+
dtl_consumer(dtl, i);
229229
stolen += tb_delta;
230230
++i;
231231
++dtl;

arch/powerpc/kernel/traps.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,16 @@ void __kprobes program_check_exception(struct pt_regs *regs)
10741074
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
10751075
}
10761076

1077+
/*
1078+
* This occurs when running in hypervisor mode on POWER6 or later
1079+
* and an illegal instruction is encountered.
1080+
*/
1081+
void __kprobes emulation_assist_interrupt(struct pt_regs *regs)
1082+
{
1083+
regs->msr |= REASON_ILLEGAL;
1084+
program_check_exception(regs);
1085+
}
1086+
10771087
void alignment_exception(struct pt_regs *regs)
10781088
{
10791089
int sig, code, fixed = 0;

arch/powerpc/lib/checksum_64.S

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,35 @@ _GLOBAL(csum_partial)
229229
blr
230230

231231

232-
.macro source
232+
.macro srcnr
233233
100:
234234
.section __ex_table,"a"
235235
.align 3
236-
.llong 100b,.Lsrc_error
236+
.llong 100b,.Lsrc_error_nr
237237
.previous
238238
.endm
239239

240-
.macro dest
240+
.macro source
241+
150:
242+
.section __ex_table,"a"
243+
.align 3
244+
.llong 150b,.Lsrc_error
245+
.previous
246+
.endm
247+
248+
.macro dstnr
241249
200:
242250
.section __ex_table,"a"
243251
.align 3
244-
.llong 200b,.Ldest_error
252+
.llong 200b,.Ldest_error_nr
253+
.previous
254+
.endm
255+
256+
.macro dest
257+
250:
258+
.section __ex_table,"a"
259+
.align 3
260+
.llong 250b,.Ldest_error
245261
.previous
246262
.endm
247263

@@ -277,11 +293,11 @@ _GLOBAL(csum_partial_copy_generic)
277293
mtctr r6
278294

279295
1:
280-
source; lhz r6,0(r3) /* align to doubleword */
296+
srcnr; lhz r6,0(r3) /* align to doubleword */
281297
subi r5,r5,2
282298
addi r3,r3,2
283299
adde r0,r0,r6
284-
dest; sth r6,0(r4)
300+
dstnr; sth r6,0(r4)
285301
addi r4,r4,2
286302
bdnz 1b
287303

@@ -395,10 +411,10 @@ dest; std r16,56(r4)
395411

396412
mtctr r6
397413
3:
398-
source; ld r6,0(r3)
414+
srcnr; ld r6,0(r3)
399415
addi r3,r3,8
400416
adde r0,r0,r6
401-
dest; std r6,0(r4)
417+
dstnr; std r6,0(r4)
402418
addi r4,r4,8
403419
bdnz 3b
404420

@@ -408,32 +424,32 @@ dest; std r6,0(r4)
408424
srdi. r6,r5,2
409425
beq .Lcopy_tail_halfword
410426

411-
source; lwz r6,0(r3)
427+
srcnr; lwz r6,0(r3)
412428
addi r3,r3,4
413429
adde r0,r0,r6
414-
dest; stw r6,0(r4)
430+
dstnr; stw r6,0(r4)
415431
addi r4,r4,4
416432
subi r5,r5,4
417433

418434
.Lcopy_tail_halfword: /* Up to 3 bytes to go */
419435
srdi. r6,r5,1
420436
beq .Lcopy_tail_byte
421437

422-
source; lhz r6,0(r3)
438+
srcnr; lhz r6,0(r3)
423439
addi r3,r3,2
424440
adde r0,r0,r6
425-
dest; sth r6,0(r4)
441+
dstnr; sth r6,0(r4)
426442
addi r4,r4,2
427443
subi r5,r5,2
428444

429445
.Lcopy_tail_byte: /* Up to 1 byte to go */
430446
andi. r6,r5,1
431447
beq .Lcopy_finish
432448

433-
source; lbz r6,0(r3)
449+
srcnr; lbz r6,0(r3)
434450
sldi r9,r6,8 /* Pad the byte out to 16 bits */
435451
adde r0,r0,r9
436-
dest; stb r6,0(r4)
452+
dstnr; stb r6,0(r4)
437453

438454
.Lcopy_finish:
439455
addze r0,r0 /* add in final carry */
@@ -443,13 +459,23 @@ dest; stb r6,0(r4)
443459
blr
444460

445461
.Lsrc_error:
462+
ld r14,STK_REG(r14)(r1)
463+
ld r15,STK_REG(r15)(r1)
464+
ld r16,STK_REG(r16)(r1)
465+
addi r1,r1,STACKFRAMESIZE
466+
.Lsrc_error_nr:
446467
cmpdi 0,r7,0
447468
beqlr
448469
li r6,-EFAULT
449470
stw r6,0(r7)
450471
blr
451472

452473
.Ldest_error:
474+
ld r14,STK_REG(r14)(r1)
475+
ld r15,STK_REG(r15)(r1)
476+
ld r16,STK_REG(r16)(r1)
477+
addi r1,r1,STACKFRAMESIZE
478+
.Ldest_error_nr:
453479
cmpdi 0,r8,0
454480
beqlr
455481
li r6,-EFAULT

arch/x86/include/asm/kvm_host.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
#define KVM_REFILL_PAGES 25
103103
#define KVM_MAX_CPUID_ENTRIES 80
104104
#define KVM_NR_FIXED_MTRR_REGION 88
105-
#define KVM_NR_VAR_MTRR 8
105+
#define KVM_NR_VAR_MTRR 10
106106

107107
#define ASYNC_PF_PER_VCPU 64
108108

@@ -436,7 +436,7 @@ struct kvm_vcpu_arch {
436436
bool nmi_injected; /* Trying to inject an NMI this entry */
437437

438438
struct mtrr_state_type mtrr_state;
439-
u32 pat;
439+
u64 pat;
440440

441441
int switch_db_regs;
442442
unsigned long db[KVM_NR_DB_REGS];

0 commit comments

Comments
 (0)