Skip to content

Commit 7ce0171

Browse files
Trond MyklebustTrond Myklebust
authored andcommitted
Merge branch 'bugfixes' into nfs-for-next
2 parents 1fa8064 + 81d9bce commit 7ce0171

27 files changed

Lines changed: 122 additions & 96 deletions

‎arch/arm/include/asm/io.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
6464
static inline void __raw_writew(u16 val, volatile void __iomem *addr)
6565
{
6666
asm volatile("strh %1, %0"
67-
: "+Qo" (*(volatile u16 __force *)addr)
67+
: "+Q" (*(volatile u16 __force *)addr)
6868
: "r" (val));
6969
}
7070

7171
static inline u16 __raw_readw(const volatile void __iomem *addr)
7272
{
7373
u16 val;
7474
asm volatile("ldrh %1, %0"
75-
: "+Qo" (*(volatile u16 __force *)addr),
75+
: "+Q" (*(volatile u16 __force *)addr),
7676
"=r" (val));
7777
return val;
7878
}

‎arch/arm/include/asm/sched_clock.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@
1010

1111
extern void sched_clock_postinit(void);
1212
extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate);
13-
extern void setup_sched_clock_needs_suspend(u32 (*read)(void), int bits,
14-
unsigned long rate);
1513

1614
#endif

‎arch/arm/include/asm/vfpmacros.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#if __LINUX_ARM_ARCH__ <= 6
2828
ldr \tmp, =elf_hwcap @ may not have MVFR regs
2929
ldr \tmp, [\tmp, #0]
30-
tst \tmp, #HWCAP_VFPv3D16
31-
ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31}
32-
addne \base, \base, #32*4 @ step over unused register space
30+
tst \tmp, #HWCAP_VFPD32
31+
ldcnel p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31}
32+
addeq \base, \base, #32*4 @ step over unused register space
3333
#else
3434
VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
3535
and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field
@@ -51,9 +51,9 @@
5151
#if __LINUX_ARM_ARCH__ <= 6
5252
ldr \tmp, =elf_hwcap @ may not have MVFR regs
5353
ldr \tmp, [\tmp, #0]
54-
tst \tmp, #HWCAP_VFPv3D16
55-
stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31}
56-
addne \base, \base, #32*4 @ step over unused register space
54+
tst \tmp, #HWCAP_VFPD32
55+
stcnel p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31}
56+
addeq \base, \base, #32*4 @ step over unused register space
5757
#else
5858
VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
5959
and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field

‎arch/arm/include/uapi/asm/hwcap.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
#define HWCAP_THUMBEE (1 << 11)
1919
#define HWCAP_NEON (1 << 12)
2020
#define HWCAP_VFPv3 (1 << 13)
21-
#define HWCAP_VFPv3D16 (1 << 14)
21+
#define HWCAP_VFPv3D16 (1 << 14) /* also set for VFPv4-D16 */
2222
#define HWCAP_TLS (1 << 15)
2323
#define HWCAP_VFPv4 (1 << 16)
2424
#define HWCAP_IDIVA (1 << 17)
2525
#define HWCAP_IDIVT (1 << 18)
26+
#define HWCAP_VFPD32 (1 << 19) /* set if VFP has 32 regs (not 16) */
2627
#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT)
2728

2829

‎arch/arm/kernel/sched_clock.c‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ static void sched_clock_poll(unsigned long wrap_ticks)
107107
update_sched_clock();
108108
}
109109

110-
void __init setup_sched_clock_needs_suspend(u32 (*read)(void), int bits,
111-
unsigned long rate)
112-
{
113-
setup_sched_clock(read, bits, rate);
114-
cd.needs_suspend = true;
115-
}
116-
117110
void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
118111
{
119112
unsigned long r, w;
@@ -189,18 +182,15 @@ void __init sched_clock_postinit(void)
189182
static int sched_clock_suspend(void)
190183
{
191184
sched_clock_poll(sched_clock_timer.data);
192-
if (cd.needs_suspend)
193-
cd.suspended = true;
185+
cd.suspended = true;
194186
return 0;
195187
}
196188

197189
static void sched_clock_resume(void)
198190
{
199-
if (cd.needs_suspend) {
200-
cd.epoch_cyc = read_sched_clock();
201-
cd.epoch_cyc_copy = cd.epoch_cyc;
202-
cd.suspended = false;
203-
}
191+
cd.epoch_cyc = read_sched_clock();
192+
cd.epoch_cyc_copy = cd.epoch_cyc;
193+
cd.suspended = false;
204194
}
205195

206196
static struct syscore_ops sched_clock_ops = {

‎arch/arm/mm/alignment.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,
745745
static int
746746
do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
747747
{
748-
union offset_union offset;
748+
union offset_union uninitialized_var(offset);
749749
unsigned long instr = 0, instrptr;
750750
int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
751751
unsigned int type;

‎arch/arm/vfp/vfpmodule.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,11 +701,14 @@ static int __init vfp_init(void)
701701
elf_hwcap |= HWCAP_VFPv3;
702702

703703
/*
704-
* Check for VFPv3 D16. CPUs in this configuration
705-
* only have 16 x 64bit registers.
704+
* Check for VFPv3 D16 and VFPv4 D16. CPUs in
705+
* this configuration only have 16 x 64bit
706+
* registers.
706707
*/
707708
if (((fmrx(MVFR0) & MVFR0_A_SIMD_MASK)) == 1)
708-
elf_hwcap |= HWCAP_VFPv3D16;
709+
elf_hwcap |= HWCAP_VFPv3D16; /* also v4-D16 */
710+
else
711+
elf_hwcap |= HWCAP_VFPD32;
709712
}
710713
#endif
711714
/*

‎drivers/gpu/drm/drm_fops.c‎

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ int drm_open(struct inode *inode, struct file *filp)
121121
int minor_id = iminor(inode);
122122
struct drm_minor *minor;
123123
int retcode = 0;
124+
int need_setup = 0;
125+
struct address_space *old_mapping;
124126

125127
minor = idr_find(&drm_minors_idr, minor_id);
126128
if (!minor)
@@ -132,23 +134,37 @@ int drm_open(struct inode *inode, struct file *filp)
132134
if (drm_device_is_unplugged(dev))
133135
return -ENODEV;
134136

137+
if (!dev->open_count++)
138+
need_setup = 1;
139+
mutex_lock(&dev->struct_mutex);
140+
old_mapping = dev->dev_mapping;
141+
if (old_mapping == NULL)
142+
dev->dev_mapping = &inode->i_data;
143+
/* ihold ensures nobody can remove inode with our i_data */
144+
ihold(container_of(dev->dev_mapping, struct inode, i_data));
145+
inode->i_mapping = dev->dev_mapping;
146+
filp->f_mapping = dev->dev_mapping;
147+
mutex_unlock(&dev->struct_mutex);
148+
135149
retcode = drm_open_helper(inode, filp, dev);
136-
if (!retcode) {
137-
atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
138-
if (!dev->open_count++)
139-
retcode = drm_setup(dev);
140-
}
141-
if (!retcode) {
142-
mutex_lock(&dev->struct_mutex);
143-
if (dev->dev_mapping == NULL)
144-
dev->dev_mapping = &inode->i_data;
145-
/* ihold ensures nobody can remove inode with our i_data */
146-
ihold(container_of(dev->dev_mapping, struct inode, i_data));
147-
inode->i_mapping = dev->dev_mapping;
148-
filp->f_mapping = dev->dev_mapping;
149-
mutex_unlock(&dev->struct_mutex);
150+
if (retcode)
151+
goto err_undo;
152+
atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
153+
if (need_setup) {
154+
retcode = drm_setup(dev);
155+
if (retcode)
156+
goto err_undo;
150157
}
158+
return 0;
151159

160+
err_undo:
161+
mutex_lock(&dev->struct_mutex);
162+
filp->f_mapping = old_mapping;
163+
inode->i_mapping = old_mapping;
164+
iput(container_of(dev->dev_mapping, struct inode, i_data));
165+
dev->dev_mapping = old_mapping;
166+
mutex_unlock(&dev->struct_mutex);
167+
dev->open_count--;
152168
return retcode;
153169
}
154170
EXPORT_SYMBOL(drm_open);

‎drivers/gpu/drm/radeon/evergreen.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *s
13721372
WREG32(BIF_FB_EN, FB_READ_EN | FB_WRITE_EN);
13731373

13741374
for (i = 0; i < rdev->num_crtc; i++) {
1375-
if (save->crtc_enabled) {
1375+
if (save->crtc_enabled[i]) {
13761376
if (ASIC_IS_DCE6(rdev)) {
13771377
tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]);
13781378
tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;

‎drivers/hwmon/asb100.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* ASB100-A supports pwm1, while plain ASB100 does not. There is no known
3333
* way for the driver to tell which one is there.
3434
*
35-
* Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
35+
* Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
3636
* asb100 7 3 1 4 0x31 0x0694 yes no
3737
*/
3838

0 commit comments

Comments
 (0)