| 1 |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
|
| 2 |
index e8dfdbd..cadbed6 100644
|
| 3 |
--- a/arch/powerpc/kernel/pci-common.c
|
| 4 |
+++ b/arch/powerpc/kernel/pci-common.c
|
| 5 |
@@ -1107,6 +1107,12 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
|
| 6 |
list_for_each_entry(dev, &bus->devices, bus_list) {
|
| 7 |
struct dev_archdata *sd = &dev->dev.archdata;
|
| 8 |
|
| 9 |
+ /* Cardbus can call us to add new devices to a bus, so ignore
|
| 10 |
+ * those who are already fully discovered
|
| 11 |
+ */
|
| 12 |
+ if (dev->is_added)
|
| 13 |
+ continue;
|
| 14 |
+
|
| 15 |
/* Setup OF node pointer in archdata */
|
| 16 |
sd->of_node = pci_device_to_OF_node(dev);
|
| 17 |
|
| 18 |
@@ -1147,6 +1153,13 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
|
| 19 |
}
|
| 20 |
EXPORT_SYMBOL(pcibios_fixup_bus);
|
| 21 |
|
| 22 |
+void __devinit pci_fixup_cardbus(struct pci_bus *bus)
|
| 23 |
+{
|
| 24 |
+ /* Now fixup devices on that bus */
|
| 25 |
+ pcibios_setup_bus_devices(bus);
|
| 26 |
+}
|
| 27 |
+
|
| 28 |
+
|
| 29 |
static int skip_isa_ioresource_align(struct pci_dev *dev)
|
| 30 |
{
|
| 31 |
if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
|
| 32 |
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c
|
| 33 |
index b129611..4771274 100644
|
| 34 |
--- a/arch/sparc/kernel/nmi.c
|
| 35 |
+++ b/arch/sparc/kernel/nmi.c
|
| 36 |
@@ -96,7 +96,6 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
|
| 37 |
int cpu = smp_processor_id();
|
| 38 |
|
| 39 |
clear_softint(1 << irq);
|
| 40 |
- pcr_ops->write(PCR_PIC_PRIV);
|
| 41 |
|
| 42 |
local_cpu_data().__nmi_count++;
|
| 43 |
|
| 44 |
@@ -105,6 +104,8 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
|
| 45 |
if (notify_die(DIE_NMI, "nmi", regs, 0,
|
| 46 |
pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP)
|
| 47 |
touched = 1;
|
| 48 |
+ else
|
| 49 |
+ pcr_ops->write(PCR_PIC_PRIV);
|
| 50 |
|
| 51 |
sum = kstat_irqs_cpu(0, cpu);
|
| 52 |
if (__get_cpu_var(nmi_touch)) {
|
| 53 |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c
|
| 54 |
index fa5936e..198fb4e 100644
|
| 55 |
--- a/arch/sparc/kernel/perf_event.c
|
| 56 |
+++ b/arch/sparc/kernel/perf_event.c
|
| 57 |
@@ -986,6 +986,17 @@ static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
|
| 58 |
data.addr = 0;
|
| 59 |
|
| 60 |
cpuc = &__get_cpu_var(cpu_hw_events);
|
| 61 |
+
|
| 62 |
+ /* If the PMU has the TOE IRQ enable bits, we need to do a
|
| 63 |
+ * dummy write to the %pcr to clear the overflow bits and thus
|
| 64 |
+ * the interrupt.
|
| 65 |
+ *
|
| 66 |
+ * Do this before we peek at the counters to determine
|
| 67 |
+ * overflow so we don't lose any events.
|
| 68 |
+ */
|
| 69 |
+ if (sparc_pmu->irq_bit)
|
| 70 |
+ pcr_ops->write(cpuc->pcr);
|
| 71 |
+
|
| 72 |
for (idx = 0; idx < MAX_HWEVENTS; idx++) {
|
| 73 |
struct perf_event *event = cpuc->events[idx];
|
| 74 |
struct hw_perf_event *hwc;
|
| 75 |
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
|
| 76 |
index d0c99ab..873f81f 100644
|
| 77 |
--- a/arch/x86/kernel/apic/apic_flat_64.c
|
| 78 |
+++ b/arch/x86/kernel/apic/apic_flat_64.c
|
| 79 |
@@ -240,6 +240,11 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
| 80 |
printk(KERN_DEBUG "system APIC only can use physical flat");
|
| 81 |
return 1;
|
| 82 |
}
|
| 83 |
+
|
| 84 |
+ if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "EXA", 3)) {
|
| 85 |
+ printk(KERN_DEBUG "IBM Summit detected, will use apic physical");
|
| 86 |
+ return 1;
|
| 87 |
+ }
|
| 88 |
#endif
|
| 89 |
|
| 90 |
return 0;
|
| 91 |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
|
| 92 |
index 2ab3535..9ee87cf 100644
|
| 93 |
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
|
| 94 |
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
|
| 95 |
@@ -364,13 +364,13 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size)
|
| 96 |
|
| 97 |
enum map_type {map_wb, map_uc};
|
| 98 |
|
| 99 |
-static __init void map_high(char *id, unsigned long base, int shift,
|
| 100 |
- int max_pnode, enum map_type map_type)
|
| 101 |
+static __init void map_high(char *id, unsigned long base, int pshift,
|
| 102 |
+ int bshift, int max_pnode, enum map_type map_type)
|
| 103 |
{
|
| 104 |
unsigned long bytes, paddr;
|
| 105 |
|
| 106 |
- paddr = base << shift;
|
| 107 |
- bytes = (1UL << shift) * (max_pnode + 1);
|
| 108 |
+ paddr = base << pshift;
|
| 109 |
+ bytes = (1UL << bshift) * (max_pnode + 1);
|
| 110 |
printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr,
|
| 111 |
paddr + bytes);
|
| 112 |
if (map_type == map_uc)
|
| 113 |
@@ -386,7 +386,7 @@ static __init void map_gru_high(int max_pnode)
|
| 114 |
|
| 115 |
gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR);
|
| 116 |
if (gru.s.enable)
|
| 117 |
- map_high("GRU", gru.s.base, shift, max_pnode, map_wb);
|
| 118 |
+ map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb);
|
| 119 |
}
|
| 120 |
|
| 121 |
static __init void map_mmr_high(int max_pnode)
|
| 122 |
@@ -396,7 +396,7 @@ static __init void map_mmr_high(int max_pnode)
|
| 123 |
|
| 124 |
mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR);
|
| 125 |
if (mmr.s.enable)
|
| 126 |
- map_high("MMR", mmr.s.base, shift, max_pnode, map_uc);
|
| 127 |
+ map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc);
|
| 128 |
}
|
| 129 |
|
| 130 |
static __init void map_mmioh_high(int max_pnode)
|
| 131 |
@@ -406,7 +406,8 @@ static __init void map_mmioh_high(int max_pnode)
|
| 132 |
|
| 133 |
mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR);
|
| 134 |
if (mmioh.s.enable)
|
| 135 |
- map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc);
|
| 136 |
+ map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io,
|
| 137 |
+ max_pnode, map_uc);
|
| 138 |
}
|
| 139 |
|
| 140 |
static __init void uv_rtc_init(void)
|
| 141 |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
|
| 142 |
index 4fef985..687638e 100644
|
| 143 |
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
|
| 144 |
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
|
| 145 |
@@ -274,8 +274,9 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
|
| 146 |
int tm2 = 0;
|
| 147 |
u32 l, h;
|
| 148 |
|
| 149 |
- /* Thermal monitoring depends on ACPI and clock modulation*/
|
| 150 |
- if (!cpu_has(c, X86_FEATURE_ACPI) || !cpu_has(c, X86_FEATURE_ACC))
|
| 151 |
+ /* Thermal monitoring depends on APIC, ACPI and clock modulation */
|
| 152 |
+ if (!cpu_has_apic || !cpu_has(c, X86_FEATURE_ACPI) ||
|
| 153 |
+ !cpu_has(c, X86_FEATURE_ACC))
|
| 154 |
return;
|
| 155 |
|
| 156 |
/*
|
| 157 |
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
|
| 158 |
index 77a9579..adc10a2 100644
|
| 159 |
--- a/drivers/edac/i5000_edac.c
|
| 160 |
+++ b/drivers/edac/i5000_edac.c
|
| 161 |
@@ -577,7 +577,13 @@ static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,
|
| 162 |
debugf0("\tUncorrected bits= 0x%x\n", ue_errors);
|
| 163 |
|
| 164 |
branch = EXTRACT_FBDCHAN_INDX(info->ferr_nf_fbd);
|
| 165 |
- channel = branch;
|
| 166 |
+
|
| 167 |
+ /*
|
| 168 |
+ * According with i5000 datasheet, bit 28 has no significance
|
| 169 |
+ * for errors M4Err-M12Err and M17Err-M21Err, on FERR_NF_FBD
|
| 170 |
+ */
|
| 171 |
+ channel = branch & 2;
|
| 172 |
+
|
| 173 |
bank = NREC_BANK(info->nrecmema);
|
| 174 |
rank = NREC_RANK(info->nrecmema);
|
| 175 |
rdwr = NREC_RDWR(info->nrecmema);
|
| 176 |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
|
| 177 |
index aa7fd82..7d1357e 100644
|
| 178 |
--- a/drivers/gpu/drm/i915/i915_irq.c
|
| 179 |
+++ b/drivers/gpu/drm/i915/i915_irq.c
|
| 180 |
@@ -255,7 +255,6 @@ irqreturn_t igdng_irq_handler(struct drm_device *dev)
|
| 181 |
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
| 182 |
int ret = IRQ_NONE;
|
| 183 |
u32 de_iir, gt_iir, de_ier;
|
| 184 |
- u32 new_de_iir, new_gt_iir;
|
| 185 |
struct drm_i915_master_private *master_priv;
|
| 186 |
|
| 187 |
/* disable master interrupt before clearing iir */
|
| 188 |
@@ -266,35 +265,29 @@ irqreturn_t igdng_irq_handler(struct drm_device *dev)
|
| 189 |
de_iir = I915_READ(DEIIR);
|
| 190 |
gt_iir = I915_READ(GTIIR);
|
| 191 |
|
| 192 |
- for (;;) {
|
| 193 |
- if (de_iir == 0 && gt_iir == 0)
|
| 194 |
- break;
|
| 195 |
-
|
| 196 |
- ret = IRQ_HANDLED;
|
| 197 |
-
|
| 198 |
- I915_WRITE(DEIIR, de_iir);
|
| 199 |
- new_de_iir = I915_READ(DEIIR);
|
| 200 |
- I915_WRITE(GTIIR, gt_iir);
|
| 201 |
- new_gt_iir = I915_READ(GTIIR);
|
| 202 |
+ if (de_iir == 0 && gt_iir == 0)
|
| 203 |
+ goto done;
|
| 204 |
|
| 205 |
- if (dev->primary->master) {
|
| 206 |
- master_priv = dev->primary->master->driver_priv;
|
| 207 |
- if (master_priv->sarea_priv)
|
| 208 |
- master_priv->sarea_priv->last_dispatch =
|
| 209 |
- READ_BREADCRUMB(dev_priv);
|
| 210 |
- }
|
| 211 |
+ ret = IRQ_HANDLED;
|
| 212 |
|
| 213 |
- if (gt_iir & GT_USER_INTERRUPT) {
|
| 214 |
- u32 seqno = i915_get_gem_seqno(dev);
|
| 215 |
- dev_priv->mm.irq_gem_seqno = seqno;
|
| 216 |
- trace_i915_gem_request_complete(dev, seqno);
|
| 217 |
- DRM_WAKEUP(&dev_priv->irq_queue);
|
| 218 |
- }
|
| 219 |
+ if (dev->primary->master) {
|
| 220 |
+ master_priv = dev->primary->master->driver_priv;
|
| 221 |
+ if (master_priv->sarea_priv)
|
| 222 |
+ master_priv->sarea_priv->last_dispatch =
|
| 223 |
+ READ_BREADCRUMB(dev_priv);
|
| 224 |
+ }
|
| 225 |
|
| 226 |
- de_iir = new_de_iir;
|
| 227 |
- gt_iir = new_gt_iir;
|
| 228 |
+ if (gt_iir & GT_USER_INTERRUPT) {
|
| 229 |
+ u32 seqno = i915_get_gem_seqno(dev);
|
| 230 |
+ dev_priv->mm.irq_gem_seqno = seqno;
|
| 231 |
+ trace_i915_gem_request_complete(dev, seqno);
|
| 232 |
+ DRM_WAKEUP(&dev_priv->irq_queue);
|
| 233 |
}
|
| 234 |
|
| 235 |
+ I915_WRITE(GTIIR, gt_iir);
|
| 236 |
+ I915_WRITE(DEIIR, de_iir);
|
| 237 |
+
|
| 238 |
+done:
|
| 239 |
I915_WRITE(DEIER, de_ier);
|
| 240 |
(void)I915_READ(DEIER);
|
| 241 |
|
| 242 |
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
| 243 |
index 4b96e7a..5b4d66d 100644
|
| 244 |
--- a/drivers/hid/hid-apple.c
|
| 245 |
+++ b/drivers/hid/hid-apple.c
|
| 246 |
@@ -431,6 +431,13 @@ static const struct hid_device_id apple_devices[] = {
|
| 247 |
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
|
| 248 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
|
| 249 |
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
|
| 250 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
|
| 251 |
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
|
| 252 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
|
| 253 |
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
|
| 254 |
+ APPLE_ISO_KEYBOARD },
|
| 255 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS),
|
| 256 |
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
|
| 257 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY),
|
| 258 |
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
|
| 259 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
|
| 260 |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
| 261 |
index 7d05c4b..9678354 100644
|
| 262 |
--- a/drivers/hid/hid-core.c
|
| 263 |
+++ b/drivers/hid/hid-core.c
|
| 264 |
@@ -1287,6 +1287,9 @@ static const struct hid_device_id hid_blacklist[] = {
|
| 265 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
|
| 266 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
|
| 267 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
|
| 268 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
|
| 269 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
|
| 270 |
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
|
| 271 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
|
| 272 |
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
|
| 273 |
{ HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) },
|
| 274 |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
| 275 |
index adbef5d..e380e7b 100644
|
| 276 |
--- a/drivers/hid/hid-ids.h
|
| 277 |
+++ b/drivers/hid/hid-ids.h
|
| 278 |
@@ -88,6 +88,9 @@
|
| 279 |
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
|
| 280 |
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
|
| 281 |
#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
|
| 282 |
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
|
| 283 |
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
|
| 284 |
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
|
| 285 |
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
|
| 286 |
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
|
| 287 |
#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
|
| 288 |
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c
|
| 289 |
index 0ed68e2..f7346a9 100644
|
| 290 |
--- a/drivers/i2c/busses/i2c-pca-isa.c
|
| 291 |
+++ b/drivers/i2c/busses/i2c-pca-isa.c
|
| 292 |
@@ -75,7 +75,7 @@ static int pca_isa_waitforcompletion(void *pd)
|
| 293 |
unsigned long timeout;
|
| 294 |
|
| 295 |
if (irq > -1) {
|
| 296 |
- ret = wait_event_interruptible_timeout(pca_wait,
|
| 297 |
+ ret = wait_event_timeout(pca_wait,
|
| 298 |
pca_isa_readbyte(pd, I2C_PCA_CON)
|
| 299 |
& I2C_PCA_CON_SI, pca_isa_ops.timeout);
|
| 300 |
} else {
|
| 301 |
@@ -96,7 +96,7 @@ static void pca_isa_resetchip(void *pd)
|
| 302 |
}
|
| 303 |
|
| 304 |
static irqreturn_t pca_handler(int this_irq, void *dev_id) {
|
| 305 |
- wake_up_interruptible(&pca_wait);
|
| 306 |
+ wake_up(&pca_wait);
|
| 307 |
return IRQ_HANDLED;
|
| 308 |
}
|
| 309 |
|
| 310 |
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
|
| 311 |
index c4df9d4..5b2213d 100644
|
| 312 |
--- a/drivers/i2c/busses/i2c-pca-platform.c
|
| 313 |
+++ b/drivers/i2c/busses/i2c-pca-platform.c
|
| 314 |
@@ -84,7 +84,7 @@ static int i2c_pca_pf_waitforcompletion(void *pd)
|
| 315 |
unsigned long timeout;
|
| 316 |
|
| 317 |
if (i2c->irq) {
|
| 318 |
- ret = wait_event_interruptible_timeout(i2c->wait,
|
| 319 |
+ ret = wait_event_timeout(i2c->wait,
|
| 320 |
i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
|
| 321 |
& I2C_PCA_CON_SI, i2c->adap.timeout);
|
| 322 |
} else {
|
| 323 |
@@ -122,7 +122,7 @@ static irqreturn_t i2c_pca_pf_handler(int this_irq, void *dev_id)
|
| 324 |
if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
|
| 325 |
return IRQ_NONE;
|
| 326 |
|
| 327 |
- wake_up_interruptible(&i2c->wait);
|
| 328 |
+ wake_up(&i2c->wait);
|
| 329 |
|
| 330 |
return IRQ_HANDLED;
|
| 331 |
}
|
| 332 |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
|
| 333 |
index 2965043..3bf7b0a 100644
|
| 334 |
--- a/drivers/i2c/i2c-core.c
|
| 335 |
+++ b/drivers/i2c/i2c-core.c
|
| 336 |
@@ -801,6 +801,9 @@ int i2c_del_adapter(struct i2c_adapter *adap)
|
| 337 |
adap->dev.parent);
|
| 338 |
#endif
|
| 339 |
|
| 340 |
+ /* device name is gone after device_unregister */
|
| 341 |
+ dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
|
| 342 |
+
|
| 343 |
/* clean up the sysfs representation */
|
| 344 |
init_completion(&adap->dev_released);
|
| 345 |
device_unregister(&adap->dev);
|
| 346 |
@@ -813,8 +816,6 @@ int i2c_del_adapter(struct i2c_adapter *adap)
|
| 347 |
idr_remove(&i2c_adapter_idr, adap->nr);
|
| 348 |
mutex_unlock(&core_lock);
|
| 349 |
|
| 350 |
- dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
|
| 351 |
-
|
| 352 |
/* Clear the device structure in case this adapter is ever going to be
|
| 353 |
added again */
|
| 354 |
memset(&adap->dev, 0, sizeof(adap->dev));
|
| 355 |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
|
| 356 |
index 07c5379..0876d82 100644
|
| 357 |
--- a/drivers/input/mouse/psmouse-base.c
|
| 358 |
+++ b/drivers/input/mouse/psmouse-base.c
|
| 359 |
@@ -667,19 +667,6 @@ static int psmouse_extensions(struct psmouse *psmouse,
|
| 360 |
max_proto = PSMOUSE_IMEX;
|
| 361 |
}
|
| 362 |
|
| 363 |
-/*
|
| 364 |
- * Try Finger Sensing Pad
|
| 365 |
- */
|
| 366 |
- if (max_proto > PSMOUSE_IMEX) {
|
| 367 |
- if (fsp_detect(psmouse, set_properties) == 0) {
|
| 368 |
- if (!set_properties || fsp_init(psmouse) == 0)
|
| 369 |
- return PSMOUSE_FSP;
|
| 370 |
-/*
|
| 371 |
- * Init failed, try basic relative protocols
|
| 372 |
- */
|
| 373 |
- max_proto = PSMOUSE_IMEX;
|
| 374 |
- }
|
| 375 |
- }
|
| 376 |
|
| 377 |
if (max_proto > PSMOUSE_IMEX) {
|
| 378 |
if (genius_detect(psmouse, set_properties) == 0)
|
| 379 |
@@ -696,6 +683,21 @@ static int psmouse_extensions(struct psmouse *psmouse,
|
| 380 |
}
|
| 381 |
|
| 382 |
/*
|
| 383 |
+ * Try Finger Sensing Pad. We do it here because its probe upsets
|
| 384 |
+ * Trackpoint devices (causing TP_READ_ID command to time out).
|
| 385 |
+ */
|
| 386 |
+ if (max_proto > PSMOUSE_IMEX) {
|
| 387 |
+ if (fsp_detect(psmouse, set_properties) == 0) {
|
| 388 |
+ if (!set_properties || fsp_init(psmouse) == 0)
|
| 389 |
+ return PSMOUSE_FSP;
|
| 390 |
+/*
|
| 391 |
+ * Init failed, try basic relative protocols
|
| 392 |
+ */
|
| 393 |
+ max_proto = PSMOUSE_IMEX;
|
| 394 |
+ }
|
| 395 |
+ }
|
| 396 |
+
|
| 397 |
+/*
|
| 398 |
* Reset to defaults in case the device got confused by extended
|
| 399 |
* protocol probes. Note that we follow up with full reset because
|
| 400 |
* some mice put themselves to sleep when they see PSMOUSE_RESET_DIS.
|
| 401 |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c
|
| 402 |
index cdad3db..e0a3b75 100644
|
| 403 |
--- a/drivers/media/video/gspca/sn9c20x.c
|
| 404 |
+++ b/drivers/media/video/gspca/sn9c20x.c
|
| 405 |
@@ -2319,7 +2319,7 @@ static void do_autogain(struct gspca_dev *gspca_dev, u16 avg_lum)
|
| 406 |
}
|
| 407 |
}
|
| 408 |
if (avg_lum > MAX_AVG_LUM) {
|
| 409 |
- if (sd->gain - 1 >= 0) {
|
| 410 |
+ if (sd->gain >= 1) {
|
| 411 |
sd->gain--;
|
| 412 |
set_gain(gspca_dev);
|
| 413 |
}
|
| 414 |
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c
|
| 415 |
index ba27c9d..ca6b098 100644
|
| 416 |
--- a/drivers/mfd/wm8350-core.c
|
| 417 |
+++ b/drivers/mfd/wm8350-core.c
|
| 418 |
@@ -134,8 +134,7 @@ static inline int is_reg_locked(struct wm8350 *wm8350, u8 reg)
|
| 419 |
wm8350->reg_cache[WM8350_SECURITY] == WM8350_UNLOCK_KEY)
|
| 420 |
return 0;
|
| 421 |
|
| 422 |
- if ((reg == WM8350_GPIO_CONFIGURATION_I_O) ||
|
| 423 |
- (reg >= WM8350_GPIO_FUNCTION_SELECT_1 &&
|
| 424 |
+ if ((reg >= WM8350_GPIO_FUNCTION_SELECT_1 &&
|
| 425 |
reg <= WM8350_GPIO_FUNCTION_SELECT_4) ||
|
| 426 |
(reg >= WM8350_BATTERY_CHARGER_CONTROL_1 &&
|
| 427 |
reg <= WM8350_BATTERY_CHARGER_CONTROL_3))
|
| 428 |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
|
| 429 |
index 4e4c295..6477722 100644
|
| 430 |
--- a/drivers/pci/pci.c
|
| 431 |
+++ b/drivers/pci/pci.c
|
| 432 |
@@ -2723,6 +2723,11 @@ int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
|
| 433 |
return 1;
|
| 434 |
}
|
| 435 |
|
| 436 |
+void __weak pci_fixup_cardbus(struct pci_bus *bus)
|
| 437 |
+{
|
| 438 |
+}
|
| 439 |
+EXPORT_SYMBOL(pci_fixup_cardbus);
|
| 440 |
+
|
| 441 |
static int __init pci_setup(char *str)
|
| 442 |
{
|
| 443 |
while (str) {
|
| 444 |
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
|
| 445 |
index db77e1f..5c26793 100644
|
| 446 |
--- a/drivers/pcmcia/cardbus.c
|
| 447 |
+++ b/drivers/pcmcia/cardbus.c
|
| 448 |
@@ -214,7 +214,7 @@ int __ref cb_alloc(struct pcmcia_socket * s)
|
| 449 |
unsigned int max, pass;
|
| 450 |
|
| 451 |
s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
|
| 452 |
-// pcibios_fixup_bus(bus);
|
| 453 |
+ pci_fixup_cardbus(bus);
|
| 454 |
|
| 455 |
max = bus->secondary;
|
| 456 |
for (pass = 0; pass < 2; pass++)
|
| 457 |
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
|
| 458 |
index 849359a..767cb61 100644
|
| 459 |
--- a/drivers/platform/x86/asus-laptop.c
|
| 460 |
+++ b/drivers/platform/x86/asus-laptop.c
|
| 461 |
@@ -221,6 +221,7 @@ static struct asus_hotk *hotk;
|
| 462 |
*/
|
| 463 |
static const struct acpi_device_id asus_device_ids[] = {
|
| 464 |
{"ATK0100", 0},
|
| 465 |
+ {"ATK0101", 0},
|
| 466 |
{"", 0},
|
| 467 |
};
|
| 468 |
MODULE_DEVICE_TABLE(acpi, asus_device_ids);
|
| 469 |
@@ -293,6 +294,11 @@ struct key_entry {
|
| 470 |
enum { KE_KEY, KE_END };
|
| 471 |
|
| 472 |
static struct key_entry asus_keymap[] = {
|
| 473 |
+ {KE_KEY, 0x02, KEY_SCREENLOCK},
|
| 474 |
+ {KE_KEY, 0x05, KEY_WLAN},
|
| 475 |
+ {KE_KEY, 0x08, BTN_TOUCH},
|
| 476 |
+ {KE_KEY, 0x17, KEY_ZOOM},
|
| 477 |
+ {KE_KEY, 0x1f, KEY_BATTERY},
|
| 478 |
{KE_KEY, 0x30, KEY_VOLUMEUP},
|
| 479 |
{KE_KEY, 0x31, KEY_VOLUMEDOWN},
|
| 480 |
{KE_KEY, 0x32, KEY_MUTE},
|
| 481 |
@@ -312,6 +318,8 @@ static struct key_entry asus_keymap[] = {
|
| 482 |
{KE_KEY, 0x5F, KEY_WLAN},
|
| 483 |
{KE_KEY, 0x60, KEY_SWITCHVIDEOMODE},
|
| 484 |
{KE_KEY, 0x61, KEY_SWITCHVIDEOMODE},
|
| 485 |
+ {KE_KEY, 0x62, KEY_SWITCHVIDEOMODE},
|
| 486 |
+ {KE_KEY, 0x63, KEY_SWITCHVIDEOMODE},
|
| 487 |
{KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */
|
| 488 |
{KE_KEY, 0x82, KEY_CAMERA},
|
| 489 |
{KE_KEY, 0x8A, KEY_PROG1},
|
| 490 |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
|
| 491 |
index 507ccc6..518712c 100644
|
| 492 |
--- a/drivers/scsi/megaraid/megaraid_sas.c
|
| 493 |
+++ b/drivers/scsi/megaraid/megaraid_sas.c
|
| 494 |
@@ -3451,7 +3451,7 @@ out:
|
| 495 |
return retval;
|
| 496 |
}
|
| 497 |
|
| 498 |
-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO,
|
| 499 |
+static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR,
|
| 500 |
megasas_sysfs_show_poll_mode_io,
|
| 501 |
megasas_sysfs_set_poll_mode_io);
|
| 502 |
|
| 503 |
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
|
| 504 |
index d71dfe3..0cce8a4 100644
|
| 505 |
--- a/drivers/serial/8250_pnp.c
|
| 506 |
+++ b/drivers/serial/8250_pnp.c
|
| 507 |
@@ -354,6 +354,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
|
| 508 |
{ "FUJ02E5", 0 },
|
| 509 |
/* Fujitsu P-series tablet PC device */
|
| 510 |
{ "FUJ02E6", 0 },
|
| 511 |
+ /* Fujitsu Wacom 2FGT Tablet PC device */
|
| 512 |
+ { "FUJ02E7", 0 },
|
| 513 |
/*
|
| 514 |
* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
|
| 515 |
* disguise)
|
| 516 |
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
|
| 517 |
index adf9632..53cb722 100644
|
| 518 |
--- a/drivers/video/s3c-fb.c
|
| 519 |
+++ b/drivers/video/s3c-fb.c
|
| 520 |
@@ -211,21 +211,23 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
|
| 521 |
|
| 522 |
/**
|
| 523 |
* s3c_fb_calc_pixclk() - calculate the divider to create the pixel clock.
|
| 524 |
- * @id: window id.
|
| 525 |
* @sfb: The hardware state.
|
| 526 |
* @pixclock: The pixel clock wanted, in picoseconds.
|
| 527 |
*
|
| 528 |
* Given the specified pixel clock, work out the necessary divider to get
|
| 529 |
* close to the output frequency.
|
| 530 |
*/
|
| 531 |
-static int s3c_fb_calc_pixclk(unsigned char id, struct s3c_fb *sfb, unsigned int pixclk)
|
| 532 |
+static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
|
| 533 |
{
|
| 534 |
- struct s3c_fb_pd_win *win = sfb->pdata->win[id];
|
| 535 |
unsigned long clk = clk_get_rate(sfb->bus_clk);
|
| 536 |
+ unsigned long long tmp;
|
| 537 |
unsigned int result;
|
| 538 |
|
| 539 |
- pixclk *= win->win_mode.refresh;
|
| 540 |
- result = clk / pixclk;
|
| 541 |
+ tmp = (unsigned long long)clk;
|
| 542 |
+ tmp *= pixclk;
|
| 543 |
+
|
| 544 |
+ do_div(tmp, 1000000000UL);
|
| 545 |
+ result = (unsigned int)tmp / 1000;
|
| 546 |
|
| 547 |
dev_dbg(sfb->dev, "pixclk=%u, clk=%lu, div=%d (%lu)\n",
|
| 548 |
pixclk, clk, result, clk / result);
|
| 549 |
@@ -301,7 +303,7 @@ static int s3c_fb_set_par(struct fb_info *info)
|
| 550 |
/* use window 0 as the basis for the lcd output timings */
|
| 551 |
|
| 552 |
if (win_no == 0) {
|
| 553 |
- clkdiv = s3c_fb_calc_pixclk(win_no, sfb, var->pixclock);
|
| 554 |
+ clkdiv = s3c_fb_calc_pixclk(sfb, var->pixclock);
|
| 555 |
|
| 556 |
data = sfb->pdata->vidcon0;
|
| 557 |
data &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
|
| 558 |
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
|
| 559 |
index c9ee67b..1afb0a1 100644
|
| 560 |
--- a/fs/notify/inotify/inotify_fsnotify.c
|
| 561 |
+++ b/fs/notify/inotify/inotify_fsnotify.c
|
| 562 |
@@ -121,7 +121,7 @@ static int idr_callback(int id, void *p, void *data)
|
| 563 |
if (warned)
|
| 564 |
return 0;
|
| 565 |
|
| 566 |
- warned = false;
|
| 567 |
+ warned = true;
|
| 568 |
entry = p;
|
| 569 |
ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry);
|
| 570 |
|
| 571 |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
|
| 572 |
index dcd2040..ca44337 100644
|
| 573 |
--- a/fs/notify/inotify/inotify_user.c
|
| 574 |
+++ b/fs/notify/inotify/inotify_user.c
|
| 575 |
@@ -558,7 +558,7 @@ retry:
|
| 576 |
|
| 577 |
spin_lock(&group->inotify_data.idr_lock);
|
| 578 |
ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry,
|
| 579 |
- group->inotify_data.last_wd,
|
| 580 |
+ group->inotify_data.last_wd+1,
|
| 581 |
&tmp_ientry->wd);
|
| 582 |
spin_unlock(&group->inotify_data.idr_lock);
|
| 583 |
if (ret) {
|
| 584 |
@@ -638,7 +638,7 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign
|
| 585 |
|
| 586 |
spin_lock_init(&group->inotify_data.idr_lock);
|
| 587 |
idr_init(&group->inotify_data.idr);
|
| 588 |
- group->inotify_data.last_wd = 1;
|
| 589 |
+ group->inotify_data.last_wd = 0;
|
| 590 |
group->inotify_data.user = user;
|
| 591 |
group->inotify_data.fa = NULL;
|
| 592 |
|
| 593 |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
|
| 594 |
index a14d6cd..d240c15 100644
|
| 595 |
--- a/fs/reiserfs/inode.c
|
| 596 |
+++ b/fs/reiserfs/inode.c
|
| 597 |
@@ -2531,6 +2531,12 @@ static int reiserfs_writepage(struct page *page, struct writeback_control *wbc)
|
| 598 |
return reiserfs_write_full_page(page, wbc);
|
| 599 |
}
|
| 600 |
|
| 601 |
+static void reiserfs_truncate_failed_write(struct inode *inode)
|
| 602 |
+{
|
| 603 |
+ truncate_inode_pages(inode->i_mapping, inode->i_size);
|
| 604 |
+ reiserfs_truncate_file(inode, 0);
|
| 605 |
+}
|
| 606 |
+
|
| 607 |
static int reiserfs_write_begin(struct file *file,
|
| 608 |
struct address_space *mapping,
|
| 609 |
loff_t pos, unsigned len, unsigned flags,
|
| 610 |
@@ -2597,6 +2603,8 @@ static int reiserfs_write_begin(struct file *file,
|
| 611 |
if (ret) {
|
| 612 |
unlock_page(page);
|
| 613 |
page_cache_release(page);
|
| 614 |
+ /* Truncate allocated blocks */
|
| 615 |
+ reiserfs_truncate_failed_write(inode);
|
| 616 |
}
|
| 617 |
return ret;
|
| 618 |
}
|
| 619 |
@@ -2689,8 +2697,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
|
| 620 |
** transaction tracking stuff when the size changes. So, we have
|
| 621 |
** to do the i_size updates here.
|
| 622 |
*/
|
| 623 |
- pos += copied;
|
| 624 |
- if (pos > inode->i_size) {
|
| 625 |
+ if (pos + copied > inode->i_size) {
|
| 626 |
struct reiserfs_transaction_handle myth;
|
| 627 |
reiserfs_write_lock(inode->i_sb);
|
| 628 |
/* If the file have grown beyond the border where it
|
| 629 |
@@ -2708,7 +2715,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
|
| 630 |
goto journal_error;
|
| 631 |
}
|
| 632 |
reiserfs_update_inode_transaction(inode);
|
| 633 |
- inode->i_size = pos;
|
| 634 |
+ inode->i_size = pos + copied;
|
| 635 |
/*
|
| 636 |
* this will just nest into our transaction. It's important
|
| 637 |
* to use mark_inode_dirty so the inode gets pushed around on the
|
| 638 |
@@ -2735,6 +2742,10 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
|
| 639 |
out:
|
| 640 |
unlock_page(page);
|
| 641 |
page_cache_release(page);
|
| 642 |
+
|
| 643 |
+ if (pos + len > inode->i_size)
|
| 644 |
+ reiserfs_truncate_failed_write(inode);
|
| 645 |
+
|
| 646 |
return ret == 0 ? copied : ret;
|
| 647 |
|
| 648 |
journal_error:
|
| 649 |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
|
| 650 |
index 221cecd..adf99c6 100644
|
| 651 |
--- a/include/linux/blkdev.h
|
| 652 |
+++ b/include/linux/blkdev.h
|
| 653 |
@@ -1114,11 +1114,18 @@ static inline int queue_alignment_offset(struct request_queue *q)
|
| 654 |
return q->limits.alignment_offset;
|
| 655 |
}
|
| 656 |
|
| 657 |
+static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t offset)
|
| 658 |
+{
|
| 659 |
+ unsigned int granularity = max(lim->physical_block_size, lim->io_min);
|
| 660 |
+
|
| 661 |
+ offset &= granularity - 1;
|
| 662 |
+ return (granularity + lim->alignment_offset - offset) & (granularity - 1);
|
| 663 |
+}
|
| 664 |
+
|
| 665 |
static inline int queue_sector_alignment_offset(struct request_queue *q,
|
| 666 |
sector_t sector)
|
| 667 |
{
|
| 668 |
- return ((sector << 9) - q->limits.alignment_offset)
|
| 669 |
- & (q->limits.io_min - 1);
|
| 670 |
+ return queue_limit_alignment_offset(&q->limits, sector << 9);
|
| 671 |
}
|
| 672 |
|
| 673 |
static inline int bdev_alignment_offset(struct block_device *bdev)
|
| 674 |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h
|
| 675 |
index be3264e..e786fe9 100644
|
| 676 |
--- a/include/linux/mfd/wm8350/pmic.h
|
| 677 |
+++ b/include/linux/mfd/wm8350/pmic.h
|
| 678 |
@@ -666,20 +666,20 @@
|
| 679 |
#define WM8350_ISINK_FLASH_DUR_64MS (1 << 8)
|
| 680 |
#define WM8350_ISINK_FLASH_DUR_96MS (2 << 8)
|
| 681 |
#define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8)
|
| 682 |
-#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 4)
|
| 683 |
-#define WM8350_ISINK_FLASH_ON_0_25S (1 << 4)
|
| 684 |
-#define WM8350_ISINK_FLASH_ON_0_50S (2 << 4)
|
| 685 |
-#define WM8350_ISINK_FLASH_ON_1_00S (3 << 4)
|
| 686 |
-#define WM8350_ISINK_FLASH_ON_1_95S (1 << 4)
|
| 687 |
-#define WM8350_ISINK_FLASH_ON_3_91S (2 << 4)
|
| 688 |
-#define WM8350_ISINK_FLASH_ON_7_80S (3 << 4)
|
| 689 |
-#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 0)
|
| 690 |
-#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 0)
|
| 691 |
-#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 0)
|
| 692 |
-#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 0)
|
| 693 |
-#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 0)
|
| 694 |
-#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 0)
|
| 695 |
-#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 0)
|
| 696 |
+#define WM8350_ISINK_FLASH_ON_INSTANT (0 << 0)
|
| 697 |
+#define WM8350_ISINK_FLASH_ON_0_25S (1 << 0)
|
| 698 |
+#define WM8350_ISINK_FLASH_ON_0_50S (2 << 0)
|
| 699 |
+#define WM8350_ISINK_FLASH_ON_1_00S (3 << 0)
|
| 700 |
+#define WM8350_ISINK_FLASH_ON_1_95S (1 << 0)
|
| 701 |
+#define WM8350_ISINK_FLASH_ON_3_91S (2 << 0)
|
| 702 |
+#define WM8350_ISINK_FLASH_ON_7_80S (3 << 0)
|
| 703 |
+#define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 4)
|
| 704 |
+#define WM8350_ISINK_FLASH_OFF_0_25S (1 << 4)
|
| 705 |
+#define WM8350_ISINK_FLASH_OFF_0_50S (2 << 4)
|
| 706 |
+#define WM8350_ISINK_FLASH_OFF_1_00S (3 << 4)
|
| 707 |
+#define WM8350_ISINK_FLASH_OFF_1_95S (1 << 4)
|
| 708 |
+#define WM8350_ISINK_FLASH_OFF_3_91S (2 << 4)
|
| 709 |
+#define WM8350_ISINK_FLASH_OFF_7_80S (3 << 4)
|
| 710 |
|
| 711 |
/*
|
| 712 |
* Regulator Interrupts.
|
| 713 |
diff --git a/include/linux/pci.h b/include/linux/pci.h
|
| 714 |
index f5c7cd3..2547515 100644
|
| 715 |
--- a/include/linux/pci.h
|
| 716 |
+++ b/include/linux/pci.h
|
| 717 |
@@ -564,6 +564,9 @@ void pcibios_align_resource(void *, struct resource *, resource_size_t,
|
| 718 |
resource_size_t);
|
| 719 |
void pcibios_update_irq(struct pci_dev *, int irq);
|
| 720 |
|
| 721 |
+/* Weak but can be overriden by arch */
|
| 722 |
+void pci_fixup_cardbus(struct pci_bus *);
|
| 723 |
+
|
| 724 |
/* Generic PCI functions used internally */
|
| 725 |
|
| 726 |
extern struct pci_bus *pci_find_bus(int domain, int busnr);
|
| 727 |
diff --git a/kernel/futex.c b/kernel/futex.c
|
| 728 |
index d73ef1f..3b74909 100644
|
| 729 |
--- a/kernel/futex.c
|
| 730 |
+++ b/kernel/futex.c
|
| 731 |
@@ -203,8 +203,6 @@ static void drop_futex_key_refs(union futex_key *key)
|
| 732 |
* @uaddr: virtual address of the futex
|
| 733 |
* @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED
|
| 734 |
* @key: address where result is stored.
|
| 735 |
- * @rw: mapping needs to be read/write (values: VERIFY_READ,
|
| 736 |
- * VERIFY_WRITE)
|
| 737 |
*
|
| 738 |
* Returns a negative error code or 0
|
| 739 |
* The key words are stored in *key on success.
|
| 740 |
@@ -216,7 +214,7 @@ static void drop_futex_key_refs(union futex_key *key)
|
| 741 |
* lock_page() might sleep, the caller should not hold a spinlock.
|
| 742 |
*/
|
| 743 |
static int
|
| 744 |
-get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
|
| 745 |
+get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key)
|
| 746 |
{
|
| 747 |
unsigned long address = (unsigned long)uaddr;
|
| 748 |
struct mm_struct *mm = current->mm;
|
| 749 |
@@ -239,7 +237,7 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
|
| 750 |
* but access_ok() should be faster than find_vma()
|
| 751 |
*/
|
| 752 |
if (!fshared) {
|
| 753 |
- if (unlikely(!access_ok(rw, uaddr, sizeof(u32))))
|
| 754 |
+ if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))))
|
| 755 |
return -EFAULT;
|
| 756 |
key->private.mm = mm;
|
| 757 |
key->private.address = address;
|
| 758 |
@@ -248,7 +246,7 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
|
| 759 |
}
|
| 760 |
|
| 761 |
again:
|
| 762 |
- err = get_user_pages_fast(address, 1, rw == VERIFY_WRITE, &page);
|
| 763 |
+ err = get_user_pages_fast(address, 1, 1, &page);
|
| 764 |
if (err < 0)
|
| 765 |
return err;
|
| 766 |
|
| 767 |
@@ -867,7 +865,7 @@ static int futex_wake(u32 __user *uaddr, int fshared, int nr_wake, u32 bitset)
|
| 768 |
if (!bitset)
|
| 769 |
return -EINVAL;
|
| 770 |
|
| 771 |
- ret = get_futex_key(uaddr, fshared, &key, VERIFY_READ);
|
| 772 |
+ ret = get_futex_key(uaddr, fshared, &key);
|
| 773 |
if (unlikely(ret != 0))
|
| 774 |
goto out;
|
| 775 |
|
| 776 |
@@ -913,10 +911,10 @@ futex_wake_op(u32 __user *uaddr1, int fshared, u32 __user *uaddr2,
|
| 777 |
int ret, op_ret;
|
| 778 |
|
| 779 |
retry:
|
| 780 |
- ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ);
|
| 781 |
+ ret = get_futex_key(uaddr1, fshared, &key1);
|
| 782 |
if (unlikely(ret != 0))
|
| 783 |
goto out;
|
| 784 |
- ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE);
|
| 785 |
+ ret = get_futex_key(uaddr2, fshared, &key2);
|
| 786 |
if (unlikely(ret != 0))
|
| 787 |
goto out_put_key1;
|
| 788 |
|
| 789 |
@@ -1175,11 +1173,10 @@ retry:
|
| 790 |
pi_state = NULL;
|
| 791 |
}
|
| 792 |
|
| 793 |
- ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ);
|
| 794 |
+ ret = get_futex_key(uaddr1, fshared, &key1);
|
| 795 |
if (unlikely(ret != 0))
|
| 796 |
goto out;
|
| 797 |
- ret = get_futex_key(uaddr2, fshared, &key2,
|
| 798 |
- requeue_pi ? VERIFY_WRITE : VERIFY_READ);
|
| 799 |
+ ret = get_futex_key(uaddr2, fshared, &key2);
|
| 800 |
if (unlikely(ret != 0))
|
| 801 |
goto out_put_key1;
|
| 802 |
|
| 803 |
@@ -1738,7 +1735,7 @@ static int futex_wait_setup(u32 __user *uaddr, u32 val, int fshared,
|
| 804 |
*/
|
| 805 |
retry:
|
| 806 |
q->key = FUTEX_KEY_INIT;
|
| 807 |
- ret = get_futex_key(uaddr, fshared, &q->key, VERIFY_READ);
|
| 808 |
+ ret = get_futex_key(uaddr, fshared, &q->key);
|
| 809 |
if (unlikely(ret != 0))
|
| 810 |
return ret;
|
| 811 |
|
| 812 |
@@ -1904,7 +1901,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared,
|
| 813 |
q.requeue_pi_key = NULL;
|
| 814 |
retry:
|
| 815 |
q.key = FUTEX_KEY_INIT;
|
| 816 |
- ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_WRITE);
|
| 817 |
+ ret = get_futex_key(uaddr, fshared, &q.key);
|
| 818 |
if (unlikely(ret != 0))
|
| 819 |
goto out;
|
| 820 |
|
| 821 |
@@ -2023,7 +2020,7 @@ retry:
|
| 822 |
if ((uval & FUTEX_TID_MASK) != task_pid_vnr(current))
|
| 823 |
return -EPERM;
|
| 824 |
|
| 825 |
- ret = get_futex_key(uaddr, fshared, &key, VERIFY_WRITE);
|
| 826 |
+ ret = get_futex_key(uaddr, fshared, &key);
|
| 827 |
if (unlikely(ret != 0))
|
| 828 |
goto out;
|
| 829 |
|
| 830 |
@@ -2215,7 +2212,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
|
| 831 |
rt_waiter.task = NULL;
|
| 832 |
|
| 833 |
key2 = FUTEX_KEY_INIT;
|
| 834 |
- ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE);
|
| 835 |
+ ret = get_futex_key(uaddr2, fshared, &key2);
|
| 836 |
if (unlikely(ret != 0))
|
| 837 |
goto out;
|
| 838 |
|
| 839 |
diff --git a/kernel/sched.c b/kernel/sched.c
|
| 840 |
index dd0dccd..bf841d8 100644
|
| 841 |
--- a/kernel/sched.c
|
| 842 |
+++ b/kernel/sched.c
|
| 843 |
@@ -3177,10 +3177,6 @@ static void pull_task(struct rq *src_rq, struct task_struct *p,
|
| 844 |
deactivate_task(src_rq, p, 0);
|
| 845 |
set_task_cpu(p, this_cpu);
|
| 846 |
activate_task(this_rq, p, 0);
|
| 847 |
- /*
|
| 848 |
- * Note that idle threads have a prio of MAX_PRIO, for this test
|
| 849 |
- * to be always true for them.
|
| 850 |
- */
|
| 851 |
check_preempt_curr(this_rq, p, 0);
|
| 852 |
}
|
| 853 |
|
| 854 |
@@ -6982,7 +6978,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
|
| 855 |
__sched_fork(idle);
|
| 856 |
idle->se.exec_start = sched_clock();
|
| 857 |
|
| 858 |
- idle->prio = idle->normal_prio = MAX_PRIO;
|
| 859 |
cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu));
|
| 860 |
__set_task_cpu(idle, cpu);
|
| 861 |
|
| 862 |
@@ -7686,7 +7681,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
|
| 863 |
spin_lock_irq(&rq->lock);
|
| 864 |
update_rq_clock(rq);
|
| 865 |
deactivate_task(rq, rq->idle, 0);
|
| 866 |
- rq->idle->static_prio = MAX_PRIO;
|
| 867 |
__setscheduler(rq, rq->idle, SCHED_NORMAL, 0);
|
| 868 |
rq->idle->sched_class = &idle_sched_class;
|
| 869 |
migrate_dead_tasks(cpu);
|
| 870 |
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
|
| 871 |
index 479ce56..5b49613 100644
|
| 872 |
--- a/kernel/sched_clock.c
|
| 873 |
+++ b/kernel/sched_clock.c
|
| 874 |
@@ -236,6 +236,18 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)
|
| 875 |
}
|
| 876 |
EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);
|
| 877 |
|
| 878 |
+unsigned long long cpu_clock(int cpu)
|
| 879 |
+{
|
| 880 |
+ unsigned long long clock;
|
| 881 |
+ unsigned long flags;
|
| 882 |
+
|
| 883 |
+ local_irq_save(flags);
|
| 884 |
+ clock = sched_clock_cpu(cpu);
|
| 885 |
+ local_irq_restore(flags);
|
| 886 |
+
|
| 887 |
+ return clock;
|
| 888 |
+}
|
| 889 |
+
|
| 890 |
#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
|
| 891 |
|
| 892 |
void sched_clock_init(void)
|
| 893 |
@@ -251,17 +263,12 @@ u64 sched_clock_cpu(int cpu)
|
| 894 |
return sched_clock();
|
| 895 |
}
|
| 896 |
|
| 897 |
-#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
|
| 898 |
|
| 899 |
unsigned long long cpu_clock(int cpu)
|
| 900 |
{
|
| 901 |
- unsigned long long clock;
|
| 902 |
- unsigned long flags;
|
| 903 |
+ return sched_clock_cpu(cpu);
|
| 904 |
+}
|
| 905 |
|
| 906 |
- local_irq_save(flags);
|
| 907 |
- clock = sched_clock_cpu(cpu);
|
| 908 |
- local_irq_restore(flags);
|
| 909 |
+#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
|
| 910 |
|
| 911 |
- return clock;
|
| 912 |
-}
|
| 913 |
EXPORT_SYMBOL_GPL(cpu_clock);
|
| 914 |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
|
| 915 |
index 5dc1037..66035bf 100644
|
| 916 |
--- a/mm/memcontrol.c
|
| 917 |
+++ b/mm/memcontrol.c
|
| 918 |
@@ -2381,7 +2381,7 @@ static int mem_cgroup_force_empty(struct mem_cgroup *mem, bool free_all)
|
| 919 |
if (free_all)
|
| 920 |
goto try_to_free;
|
| 921 |
move_account:
|
| 922 |
- while (mem->res.usage > 0) {
|
| 923 |
+ do {
|
| 924 |
ret = -EBUSY;
|
| 925 |
if (cgroup_task_count(cgrp) || !list_empty(&cgrp->children))
|
| 926 |
goto out;
|
| 927 |
@@ -2408,8 +2408,8 @@ move_account:
|
| 928 |
if (ret == -ENOMEM)
|
| 929 |
goto try_to_free;
|
| 930 |
cond_resched();
|
| 931 |
- }
|
| 932 |
- ret = 0;
|
| 933 |
+ /* "ret" should also be checked to ensure all lists are empty. */
|
| 934 |
+ } while (mem->res.usage > 0 || ret);
|
| 935 |
out:
|
| 936 |
css_put(&mem->css);
|
| 937 |
return ret;
|
| 938 |
@@ -2442,10 +2442,7 @@ try_to_free:
|
| 939 |
}
|
| 940 |
lru_add_drain();
|
| 941 |
/* try move_account...there may be some *locked* pages. */
|
| 942 |
- if (mem->res.usage)
|
| 943 |
- goto move_account;
|
| 944 |
- ret = 0;
|
| 945 |
- goto out;
|
| 946 |
+ goto move_account;
|
| 947 |
}
|
| 948 |
|
| 949 |
int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event)
|
| 950 |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
| 951 |
index 2bc2ac6..3a78e2e 100644
|
| 952 |
--- a/mm/page_alloc.c
|
| 953 |
+++ b/mm/page_alloc.c
|
| 954 |
@@ -1225,10 +1225,10 @@ again:
|
| 955 |
}
|
| 956 |
spin_lock_irqsave(&zone->lock, flags);
|
| 957 |
page = __rmqueue(zone, order, migratetype);
|
| 958 |
- __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
|
| 959 |
spin_unlock(&zone->lock);
|
| 960 |
if (!page)
|
| 961 |
goto failed;
|
| 962 |
+ __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
|
| 963 |
}
|
| 964 |
|
| 965 |
__count_zone_vm_events(PGALLOC, zone, 1 << order);
|
| 966 |
diff --git a/mm/truncate.c b/mm/truncate.c
|
| 967 |
index 450cebd..258bda7 100644
|
| 968 |
--- a/mm/truncate.c
|
| 969 |
+++ b/mm/truncate.c
|
| 970 |
@@ -516,22 +516,20 @@ EXPORT_SYMBOL_GPL(invalidate_inode_pages2);
|
| 971 |
*/
|
| 972 |
void truncate_pagecache(struct inode *inode, loff_t old, loff_t new)
|
| 973 |
{
|
| 974 |
- if (new < old) {
|
| 975 |
- struct address_space *mapping = inode->i_mapping;
|
| 976 |
-
|
| 977 |
- /*
|
| 978 |
- * unmap_mapping_range is called twice, first simply for
|
| 979 |
- * efficiency so that truncate_inode_pages does fewer
|
| 980 |
- * single-page unmaps. However after this first call, and
|
| 981 |
- * before truncate_inode_pages finishes, it is possible for
|
| 982 |
- * private pages to be COWed, which remain after
|
| 983 |
- * truncate_inode_pages finishes, hence the second
|
| 984 |
- * unmap_mapping_range call must be made for correctness.
|
| 985 |
- */
|
| 986 |
- unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1);
|
| 987 |
- truncate_inode_pages(mapping, new);
|
| 988 |
- unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1);
|
| 989 |
- }
|
| 990 |
+ struct address_space *mapping = inode->i_mapping;
|
| 991 |
+
|
| 992 |
+ /*
|
| 993 |
+ * unmap_mapping_range is called twice, first simply for
|
| 994 |
+ * efficiency so that truncate_inode_pages does fewer
|
| 995 |
+ * single-page unmaps. However after this first call, and
|
| 996 |
+ * before truncate_inode_pages finishes, it is possible for
|
| 997 |
+ * private pages to be COWed, which remain after
|
| 998 |
+ * truncate_inode_pages finishes, hence the second
|
| 999 |
+ * unmap_mapping_range call must be made for correctness.
|
| 1000 |
+ */
|
| 1001 |
+ unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1);
|
| 1002 |
+ truncate_inode_pages(mapping, new);
|
| 1003 |
+ unmap_mapping_range(mapping, new + PAGE_SIZE - 1, 0, 1);
|
| 1004 |
}
|
| 1005 |
EXPORT_SYMBOL(truncate_pagecache);
|
| 1006 |
|
| 1007 |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
| 1008 |
index a4cb183..075c3a6 100644
|
| 1009 |
--- a/sound/pci/hda/patch_realtek.c
|
| 1010 |
+++ b/sound/pci/hda/patch_realtek.c
|
| 1011 |
@@ -14685,6 +14685,8 @@ static int patch_alc861(struct hda_codec *codec)
|
| 1012 |
spec->stream_digital_playback = &alc861_pcm_digital_playback;
|
| 1013 |
spec->stream_digital_capture = &alc861_pcm_digital_capture;
|
| 1014 |
|
| 1015 |
+ if (!spec->cap_mixer)
|
| 1016 |
+ set_capture_mixer(codec);
|
| 1017 |
set_beep_amp(spec, 0x23, 0, HDA_OUTPUT);
|
| 1018 |
|
| 1019 |
spec->vmaster_nid = 0x03;
|