F: drivers/edac/edac_*
F: include/linux/edac.h
+++++++++++++++++EDAC-AMD64
+++++++++++++++++P: Doug Thompson
+++++++++++++++++M: dougthompson@xmission.com
+++++++++++++++++P: Borislav Petkov
+++++++++++++++++M: borislav.petkov@amd.com
+++++++++++++++++L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
+++++++++++++++++W: bluesmoke.sourceforge.net
+++++++++++++++++S: Supported
+++++++++++++++++F: drivers/edac/amd64_edac*
+++++++++++++++++
EDAC-E752X
P: Mark Gross
-- -- P: Doug Thompson
M: mark.gross@intel.com
++ ++ P: Doug Thompson
M: dougthompson@xmission.com
L: bluesmoke-devel@lists.sourceforge.net (moderated for non-subscribers)
W: bluesmoke.sourceforge.net
M: leoli@freescale.com
P: Zhang Wei
M: zw@zh-kernel.org
-- -- L: linuxppc-embedded@ozlabs.org
-- -- L: linux-kernel@vger.kernel.org
++ ++ L: linuxppc-dev@ozlabs.org
-------- -- ---L: linux-kernel@vger.kernel.org
S: Maintained
F: drivers/dma/fsldma.*
ioapic_pin);
return gsi;
}
----------------- if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
----------------- pr_debug("Pin %d-%d already programmed\n",
----------------- mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-----------------#ifdef CONFIG_X86_32
----------------- return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
-----------------#else
----------------- return gsi;
-----------------#endif
----------------- }
----------------- set_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed);
-----------------#ifdef CONFIG_X86_32
----------------- /*
----------------- * For GSI >= 64, use IRQ compression
----------------- */
----------------- if ((gsi >= IRQ_COMPRESSION_START)
----------------- && (triggering == ACPI_LEVEL_SENSITIVE)) {
----------------- /*
----------------- * For PCI devices assign IRQs in order, avoiding gaps
----------------- * due to unused I/O APIC pins.
----------------- */
----------------- int irq = gsi;
----------------- if (gsi < MAX_GSI_NUM) {
----------------- /*
----------------- * Retain the VIA chipset work-around (gsi > 15), but
----------------- * avoid a problem where the 8254 timer (IRQ0) is setup
----------------- * via an override (so it's not on pin 0 of the ioapic),
----------------- * and at the same time, the pin 0 interrupt is a PCI
----------------- * type. The gsi > 15 test could cause these two pins
----------------- * to be shared as IRQ0, and they are not shareable.
----------------- * So test for this condition, and if necessary, avoid
----------------- * the pin collision.
----------------- */
----------------- gsi = pci_irq++;
----------------- /*
----------------- * Don't assign IRQ used by ACPI SCI
----------------- */
----------------- if (gsi == acpi_gbl_FADT.sci_interrupt)
----------------- gsi = pci_irq++;
----------------- gsi_to_irq[irq] = gsi;
----------------- } else {
----------------- printk(KERN_ERR "GSI %u is too high\n", gsi);
----------------- return gsi;
----------------- }
----------------- }
-----------------#endif
----------------- io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
----------------- triggering == ACPI_EDGE_SENSITIVE ? 0 : 1,
----------------- polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
----------------- return gsi;
-----------------}
+++++++++++++++++ if (enable_update_mptable)
+++++++++++++++++ mp_config_acpi_gsi(dev, gsi, trigger, polarity);
-----------------int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
----------------- u32 gsi, int triggering, int polarity)
-----------------{
-----------------#ifdef CONFIG_X86_MPPARSE
----------------- struct mpc_intsrc mp_irq;
----------------- int ioapic;
---------- ------
---------- ------ if (!acpi_ioapic)
---------- ------ return 0;
+++++++++++++++++ set_io_apic_irq_attr(&irq_attr, ioapic, ioapic_pin,
+++++++++++++++++ trigger == ACPI_EDGE_SENSITIVE ? 0 : 1,
+++++++++++++++++ polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
+++++++++++++++++ io_apic_set_pci_routing(dev, gsi, &irq_attr);
- if (!acpi_ioapic)
- return 0;
-
----------------- /* print the entry should happen on mptable identically */
----------------- mp_irq.type = MP_INTSRC;
----------------- mp_irq.irqtype = mp_INT;
----------------- mp_irq.irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) |
----------------- (polarity == ACPI_ACTIVE_HIGH ? 1 : 3);
----------------- mp_irq.srcbus = number;
----------------- mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3);
----------------- ioapic = mp_find_ioapic(gsi);
----------------- mp_irq.dstapic = mp_ioapic_routing[ioapic].apic_id;
----------------- mp_irq.dstirq = mp_find_ioapic_pin(ioapic, gsi);
-----------------
----------------- save_mp_irq(&mp_irq);
-----------------#endif
----------------- return 0;
+++++++++++++++++ return gsi;
}
/*
return 0;
}
--------- - --- acpi_state_timer_broadcast(pr, cx, 1);
+++++++++++ ++++++ lapic_timer_state_broadcast(pr, cx, 1);
kt1 = ktime_get_real();
acpi_idle_do_entry(cx);
kt2 = ktime_get_real();
local_irq_enable();
cx->usage++;
--------- - --- acpi_state_timer_broadcast(pr, cx, 0);
+++++++++++ ++++++ lapic_timer_state_broadcast(pr, cx, 0);
return idle_time;
}
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710Z"),
},
},
++ ++ {
++ ++ .callback = video_set_bqc_offset,
++ ++ .ident = "eMachines E510",
++ ++ .matches = {
++ ++ DMI_MATCH(DMI_BOARD_VENDOR, "EMACHINES"),
++ ++ DMI_MATCH(DMI_PRODUCT_NAME, "eMachines E510"),
++ ++ },
++ ++ },
++ ++ {
++ ++ .callback = video_set_bqc_offset,
++ ++ .ident = "Acer Aspire 5315",
++ ++ .matches = {
++ ++ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
++ ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"),
++ ++ },
++ ++ },
+++++ ++++++++++++ {
+++++ ++++++++++++ .callback = video_set_bqc_offset,
+++++ ++++++++++++ .ident = "Acer Aspire 7720",
+++++ ++++++++++++ .matches = {
+++++ ++++++++++++ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
+++++ ++++++++++++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"),
+++++ ++++++++++++ },
+++++ ++++++++++++ },
{}
};
return acpi_video_register();
}
------ -- -- ---void acpi_video_exit(void)
-- -- void __exit acpi_video_exit(void)
++++++ +++++++++++static void __exit acpi_video_exit(void)
{
------ -----------
------ ----------- acpi_bus_unregister_driver(&acpi_video_bus);
------ -----------
------ ----------- remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir);
++++++ +++++++++++ acpi_video_unregister();
return;
}
static int hp_wmi_dock_state(void)
{
----------------- return hp_wmi_perform_query(HPWMI_DOCK_QUERY, 0, 0);
---------------- }
+++++++++++++++++ int ret = hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, 0, 0);
+
---------------- static int hp_wmi_wifi_set(void *data, enum rfkill_state state)
---------------- {
---------------- if (state)
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x101);
---------------- else
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x100);
+++++++++++++++++ if (ret < 0)
+++++++++++++++++ return ret;
+++++++++++++++++
+++++++++++++++++ return ret & 0x1;
+ }
+
---------------- static int hp_wmi_bluetooth_set(void *data, enum rfkill_state state)
+++++++++++++++++ static int hp_wmi_tablet_state(void)
+ {
---------------- if (state)
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x202);
---------------- else
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x200);
+++++++++++++++++ int ret = hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, 0, 0);
+++++++++++++++++
+++++++++++++++++ if (ret < 0)
+++++++++++++++++ return ret;
+++++++++++++++++
+++++++++++++++++ return (ret & 0x4) ? 1 : 0;
}
---------------- static int hp_wmi_wwan_set(void *data, enum rfkill_state state)
-static int hp_wmi_wifi_set(void *data, enum rfkill_state state)
+++++++++++++++++static int hp_wmi_set_block(void *data, bool blocked)
{
----------------- if (state)
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x404);
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x101);
----------------- else
---------------- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x400);
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x100);
-}
+++++++++++++++++ unsigned long b = (unsigned long) data;
+++++++++++++++++ int query = BIT(b + 8) | ((!!blocked) << b);
++++++++++++++++
-static int hp_wmi_bluetooth_set(void *data, enum rfkill_state state)
-{
- if (state)
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x202);
- else
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x200);
+++++++++++++++++ return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, query);
}
---------------- static int hp_wmi_wifi_state(void)
-static int hp_wmi_wwan_set(void *data, enum rfkill_state state)
-{
- if (state)
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x404);
- else
- return hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, 0x400);
-}
+++++++++++++++++static const struct rfkill_ops hp_wmi_rfkill_ops = {
+++++++++++++++++ .set_block = hp_wmi_set_block,
+++++++++++++++++};
++++++++++++++++
-static int hp_wmi_wifi_state(void)
+++++++++++++++++static bool hp_wmi_wifi_state(void)
{
int wireless = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 0, 0);
key->keycode, 0);
input_sync(hp_wmi_input_dev);
break;
----------------- case KE_SW:
----------------- input_report_switch(hp_wmi_input_dev,
----------------- key->keycode,
----------------- hp_wmi_dock_state());
----------------- input_sync(hp_wmi_input_dev);
----------------- break;
}
+++++++++++++++++ } else if (eventcode == 0x1) {
+++++++++++++++++ input_report_switch(hp_wmi_input_dev, SW_DOCK,
+++++++++++++++++ hp_wmi_dock_state());
+++++++++++++++++ input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+++++++++++++++++ hp_wmi_tablet_state());
+++++++++++++++++ input_sync(hp_wmi_input_dev);
} else if (eventcode == 0x5) {
if (wifi_rfkill)
----------------- rfkill_force_state(wifi_rfkill,
----------------- hp_wmi_wifi_state());
+++++++++++++++++ rfkill_set_sw_state(wifi_rfkill,
+++++++++++++++++ hp_wmi_wifi_state());
if (bluetooth_rfkill)
----------------- rfkill_force_state(bluetooth_rfkill,
----------------- hp_wmi_bluetooth_state());
+++++++++++++++++ rfkill_set_sw_state(bluetooth_rfkill,
+++++++++++++++++ hp_wmi_bluetooth_state());
if (wwan_rfkill)
----------------- rfkill_force_state(wwan_rfkill,
----------------- hp_wmi_wwan_state());
+++++++++++++++++ rfkill_set_sw_state(wwan_rfkill,
+++++++++++++++++ hp_wmi_wwan_state());
} else
printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
eventcode);
err = device_create_file(&device->dev, &dev_attr_dock);
if (err)
goto add_sysfs_error;
+++++++++++++++++ err = device_create_file(&device->dev, &dev_attr_tablet);
+++++++++++++++++ if (err)
+++++++++++++++++ goto add_sysfs_error;
if (wireless & 0x1) {
----------------- wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN);
----------------- wifi_rfkill->name = "hp-wifi";
----------------- wifi_rfkill->state = hp_wmi_wifi_state();
----------------- wifi_rfkill->toggle_radio = hp_wmi_wifi_set;
----------------- wifi_rfkill->user_claim_unsupported = 1;
+++++++++++++++++ wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
+++++++++++++++++ RFKILL_TYPE_WLAN,
+++++++++++++++++ &hp_wmi_rfkill_ops,
+++++++++++++++++ (void *) 0);
err = rfkill_register(wifi_rfkill);
if (err)
----------------- goto add_sysfs_error;
+++++++++++++++++ goto register_wifi_error;
}
if (wireless & 0x2) {
{
int wlsw;
----------------- /* Sync these BEFORE sending any rfkill events */
----------------- if (tp_features.bluetooth)
----------------- bluetooth_update_rfk();
----------------- if (tp_features.wan)
----------------- wan_update_rfk();
----------------- if (tp_features.uwb)
----------------- uwb_update_rfk();
+++++++++++++++++ /*
+++++++++++++++++ * We must sync all rfkill controllers *before* issuing any
+++++++++++++++++ * rfkill input events, or we will race the rfkill core input
+++++++++++++++++ * handler.
+++++++++++++++++ *
+++++++++++++++++ * tpacpi_inputdev_send_mutex works as a syncronization point
+++++++++++++++++ * for the above.
+++++++++++++++++ *
+++++++++++++++++ * We optimize to avoid numerous calls to hotkey_get_wlsw.
+++++++++++++++++ */
+++++++++++++++++
+++++++++++++++++ wlsw = hotkey_get_wlsw();
++++++++++++++ ++
- if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&wlsw)) {
+++++++++++++++++ /* Sync hw blocking state first if it is hw-blocked */
+++++++++++++++++ if (wlsw == TPACPI_RFK_RADIO_OFF)
+++++++++++++++++ tpacpi_rfk_update_hwblock_state(true);
+++++++++++++++++
+++++++++++++++++ /* Sync sw blocking state */
+++++++++++++++++ tpacpi_rfk_update_swstate_all();
+
-------------- -- if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&wlsw)) {
+++++++++++++++++ /* Sync hw blocking state last if it is hw-unblocked */
+++++++++++++++++ if (wlsw == TPACPI_RFK_RADIO_ON)
+++++++++++++++++ tpacpi_rfk_update_hwblock_state(false);
+++++++++++++++++
+++++++++++++++++ /* Issue rfkill input event for WLSW switch */
+++++++++++++++++ if (!(wlsw < 0)) {
mutex_lock(&tpacpi_inputdev_send_mutex);
input_report_switch(tpacpi_inputdev,
return -EIO;
return ((status & TP_ACPI_BLUETOOTH_RADIOSSW) != 0) ?
----------------- RFKILL_STATE_UNBLOCKED : RFKILL_STATE_SOFT_BLOCKED;
- }
-
- static void bluetooth_update_rfk(void)
- {
- int status;
-
- if (!tpacpi_bluetooth_rfkill)
- return;
-
- status = bluetooth_get_radiosw();
- if (status < 0)
- return;
- rfkill_force_state(tpacpi_bluetooth_rfkill, status);
-
- vdbg_printk(TPACPI_DBG_RFKILL,
- "forced rfkill state to %d\n",
- status);
+++++++++++++++++ TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
}
-------------- --static void bluetooth_update_rfk(void)
- static int bluetooth_set_radiosw(int radio_on, int update_rfk)
+++++++++++++++++static int bluetooth_set_status(enum tpacpi_rfkill_state state)
{
int status;
-------------- -- if (!tpacpi_bluetooth_rfkill)
-------------- -- return;
- if (!tp_features.bluetooth)
- return -ENODEV;
-----------------
-------------- -- status = bluetooth_get_radiosw();
-------------- -- if (status < 0)
-------------- -- return;
-------------- -- rfkill_force_state(tpacpi_bluetooth_rfkill, status);
- /* WLSW overrides bluetooth in firmware/hardware, but there is no
- * reason to risk weird behaviour. */
- if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status
- && radio_on)
- return -EPERM;
-----------------
vdbg_printk(TPACPI_DBG_RFKILL,
-------------- -- "forced rfkill state to %d\n",
-------------- -- status);
-------------- --}
-------------- --
-------------- --static int bluetooth_set_radiosw(int radio_on, int update_rfk)
-------------- --{
-------------- -- int status;
-------------- --
-------------- -- if (!tp_features.bluetooth)
-------------- -- return -ENODEV;
-------------- --
-------------- -- /* WLSW overrides bluetooth in firmware/hardware, but there is no
-------------- -- * reason to risk weird behaviour. */
-------------- -- if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&status) && !status
-------------- -- && radio_on)
-------------- -- return -EPERM;
-------------- --
-------------- -- vdbg_printk(TPACPI_DBG_RFKILL,
----------------- "will %s bluetooth\n", radio_on ? "enable" : "disable");
+++++++++++++++++ "will attempt to %s bluetooth\n",
+++++++++++++++++ (state == TPACPI_RFK_RADIO_ON) ? "enable" : "disable");
#ifdef CONFIG_THINKPAD_ACPI_DEBUGFACILITIES
if (dbg_bluetoothemul) {
if (!tp_features.bluetooth)
return 1;
----------------- res = sysfs_create_group(&tpacpi_pdev->dev.kobj,
----------------- &bluetooth_attr_group);
----------------- if (res)
----------------- return res;
-----------------
res = tpacpi_new_rfkill(TPACPI_RFK_BLUETOOTH_SW_ID,
----------------- &tpacpi_bluetooth_rfkill,
-------------- -- RFKILL_TYPE_BLUETOOTH,
-------------- -- TPACPI_RFK_BLUETOOTH_SW_NAME,
-------------- -- true,
-------------- -- tpacpi_bluetooth_rfk_set,
-------------- -- tpacpi_bluetooth_rfk_get);
-------------- -- if (res) {
-------------- -- bluetooth_exit();
-------------- -- return res;
-------------- -- }
-------------- --
-------------- -- return 0;
-------------- --}
-------------- --
-------------- --/* procfs -------------------------------------------------------------- */
-------------- --static int bluetooth_read(char *p)
-------------- --{
-------------- -- int len = 0;
-------------- -- int status = bluetooth_get_radiosw();
-------------- --
-------------- -- if (!tp_features.bluetooth)
-------------- -- len += sprintf(p + len, "status:\t\tnot supported\n");
-------------- -- else {
-------------- -- len += sprintf(p + len, "status:\t\t%s\n",
-------------- -- (status == RFKILL_STATE_UNBLOCKED) ?
-------------- -- "enabled" : "disabled");
-------------- -- len += sprintf(p + len, "commands:\tenable, disable\n");
-------------- -- }
-------------- --
-------------- -- return len;
-------------- --}
-------------- --
-------------- --static int bluetooth_write(char *buf)
-------------- --{
-------------- -- char *cmd;
-------------- -- int state = -1;
-------------- --
-------------- -- if (!tp_features.bluetooth)
-------------- -- return -ENODEV;
-------------- --
-------------- -- while ((cmd = next_cmd(&buf))) {
-------------- -- if (strlencmp(cmd, "enable") == 0) {
-------------- -- state = 1;
-------------- -- } else if (strlencmp(cmd, "disable") == 0) {
-------------- -- state = 0;
-------------- -- } else
-------------- -- return -EINVAL;
-------------- -- }
+++++++++++++++++ &bluetooth_tprfk_ops,
++++++++++++++ ++ RFKILL_TYPE_BLUETOOTH,
++++++++++++++ ++ TPACPI_RFK_BLUETOOTH_SW_NAME,
- true,
- tpacpi_bluetooth_rfk_set,
- tpacpi_bluetooth_rfk_get);
+++++++++++++++++ true);
+++++++++++++++++ if (res)
+++++++++++++++++ return res;
+
-------------- -- if (state != -1) {
-------------- -- tpacpi_disclose_usertask("procfs bluetooth",
-------------- -- "attempt to %s\n",
-------------- -- state ? "enable" : "disable");
-------------- -- bluetooth_set_radiosw(state, 1);
+++++++++++++++++ res = sysfs_create_group(&tpacpi_pdev->dev.kobj,
+++++++++++++++++ &bluetooth_attr_group);
++++++++++++++ ++ if (res) {
- bluetooth_exit();
+++++++++++++++++ tpacpi_destroy_rfkill(TPACPI_RFK_BLUETOOTH_SW_ID);
++++++++++++++ ++ return res;
}
return 0;
}
- int len = 0;
- int status = bluetooth_get_radiosw();
-
- if (!tp_features.bluetooth)
- len += sprintf(p + len, "status:\t\tnot supported\n");
- else {
- len += sprintf(p + len, "status:\t\t%s\n",
- (status == RFKILL_STATE_UNBLOCKED) ?
- "enabled" : "disabled");
- len += sprintf(p + len, "commands:\tenable, disable\n");
- }
-
- return len;
++++++++++++++ ++/* procfs -------------------------------------------------------------- */
++++++++++++++ ++static int bluetooth_read(char *p)
++++++++++++++ ++{
- char *cmd;
- int state = -1;
-
- if (!tp_features.bluetooth)
- return -ENODEV;
-
- while ((cmd = next_cmd(&buf))) {
- if (strlencmp(cmd, "enable") == 0) {
- state = 1;
- } else if (strlencmp(cmd, "disable") == 0) {
- state = 0;
- } else
- return -EINVAL;
- }
-
- if (state != -1) {
- tpacpi_disclose_usertask("procfs bluetooth",
- "attempt to %s\n",
- state ? "enable" : "disable");
- bluetooth_set_radiosw(state, 1);
- }
-
- return 0;
+++++++++++++++++ return tpacpi_rfk_procfs_read(TPACPI_RFK_BLUETOOTH_SW_ID, p);
++++++++++++++ ++}
++++++++++++++ ++
++++++++++++++ ++static int bluetooth_write(char *buf)
++++++++++++++ ++{
+++++++++++++++++ return tpacpi_rfk_procfs_write(TPACPI_RFK_BLUETOOTH_SW_ID, buf);
++++++++++++++ ++}
++++++++++++++ ++
static struct ibm_struct bluetooth_driver_data = {
.name = "bluetooth",
.read = bluetooth_read,