diff options
author | Alexandre Oliva <lxoliva@fsfla.org> | 2014-11-27 03:36:06 +0000 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2014-11-27 03:36:06 +0000 |
commit | 219858bb5ed3704897a2af8a32e7989214db7294 (patch) | |
tree | 3a80f04c6b00275de1d9cd294b3f8669bcc8ab92 | |
parent | fe5b93f554d07857f382d7da90252fb35e33c62b (diff) | |
download | linux-libre-raptor-219858bb5ed3704897a2af8a32e7989214db7294.tar.gz linux-libre-raptor-219858bb5ed3704897a2af8a32e7989214db7294.zip |
3.18.0-0.rc6.git0.1.fc22.gnu
75 files changed, 13280 insertions, 4584 deletions
diff --git a/freed-ora/current/master/ARM-tegra-usb-no-reset.patch b/freed-ora/current/master/ARM-tegra-usb-no-reset.patch index 2f3dd6872..815c70be6 100644 --- a/freed-ora/current/master/ARM-tegra-usb-no-reset.patch +++ b/freed-ora/current/master/ARM-tegra-usb-no-reset.patch @@ -9,23 +9,23 @@ Patch for disconnect issues with storage attached to a 1 file changed, 7 insertions(+) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index d481c99a20d7..6050143ce7ec 100644 +index b649fef2e35d..fb89290710ad 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5036,6 +5036,13 @@ static void hub_events(void) - (u16) hub->change_bits[0], - (u16) hub->event_bits[0]); +@@ -5023,6 +5023,13 @@ static void hub_event(struct work_struct *work) + (u16) hub->change_bits[0], + (u16) hub->event_bits[0]); -+ /* Don't disconnect USB-SATA on TrimSlice */ -+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) { -+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) && -+ (hub->event_bits[0] == 0x2)) -+ hub->event_bits[0] = 0; -+ } ++ /* Don't disconnect USB-SATA on TrimSlice */ ++ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) { ++ if ((hdev->state == 7) && (hub->change_bits[0] == 0) && ++ (hub->event_bits[0] == 0x2)) ++ hub->event_bits[0] = 0; ++ } + - /* Lock the device, then check to see if we were - * disconnected while waiting for the lock to succeed. */ - usb_lock_device(hdev); + /* Lock the device, then check to see if we were + * disconnected while waiting for the lock to succeed. */ + usb_lock_device(hdev); -- 1.9.3 diff --git a/freed-ora/current/master/Add-EFI-signature-data-types.patch b/freed-ora/current/master/Add-EFI-signature-data-types.patch index b6df877a9..19de9ed55 100644 --- a/freed-ora/current/master/Add-EFI-signature-data-types.patch +++ b/freed-ora/current/master/Add-EFI-signature-data-types.patch @@ -14,10 +14,10 @@ Signed-off-by: David Howells <dhowells@redhat.com> 1 file changed, 20 insertions(+) diff --git a/include/linux/efi.h b/include/linux/efi.h -index ebe6a24cc1e1..5ce40e215f15 100644 +index 130ba866a24a..58d7feadd149 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -581,6 +581,12 @@ void efi_native_runtime_setup(void); +@@ -586,6 +586,12 @@ void efi_native_runtime_setup(void); #define DEVICE_TREE_GUID \ EFI_GUID( 0xb1b621d5, 0xf19c, 0x41a5, 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 ) @@ -30,7 +30,7 @@ index ebe6a24cc1e1..5ce40e215f15 100644 typedef struct { efi_guid_t guid; u64 table; -@@ -796,6 +802,20 @@ typedef struct _efi_file_io_interface { +@@ -801,6 +807,20 @@ typedef struct _efi_file_io_interface { #define EFI_INVALID_TABLE_ADDR (~0UL) diff --git a/freed-ora/current/master/Add-an-EFI-signature-blob-parser-and-key-loader.patch b/freed-ora/current/master/Add-an-EFI-signature-blob-parser-and-key-loader.patch index e78b065cd..fb6980d8f 100644 --- a/freed-ora/current/master/Add-an-EFI-signature-blob-parser-and-key-loader.patch +++ b/freed-ora/current/master/Add-an-EFI-signature-blob-parser-and-key-loader.patch @@ -159,12 +159,12 @@ index 000000000000..424896a0b169 + return 0; +} diff --git a/include/linux/efi.h b/include/linux/efi.h -index 5ce40e215f15..41359e548bcb 100644 +index 58d7feadd149..b1d686e9175e 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -906,6 +906,10 @@ extern bool efi_poweroff_required(void); - (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ - (md) = (void *)(md) + (m)->desc_size) +@@ -919,6 +919,10 @@ extern bool efi_poweroff_required(void); + char * __init efi_md_typeattr_format(char *buf, size_t size, + const efi_memory_desc_t *md); +struct key; +extern int __init parse_efi_signature_list(const void *data, size_t size, diff --git a/freed-ora/current/master/Add-option-to-automatically-enforce-module-signature.patch b/freed-ora/current/master/Add-option-to-automatically-enforce-module-signature.patch index 8e2789aae..d53e1f3f9 100644 --- a/freed-ora/current/master/Add-option-to-automatically-enforce-module-signature.patch +++ b/freed-ora/current/master/Add-option-to-automatically-enforce-module-signature.patch @@ -33,10 +33,10 @@ index 199f453cb4de..ec38acf00b40 100644 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures 2D0/A00 ALL e820_map E820 memory map table diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 36327438caf0..61542c282e70 100644 +index 41a503c15862..7b8969db8398 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1566,6 +1566,16 @@ config EFI_MIXED +@@ -1611,6 +1611,16 @@ config EFI_MIXED If unsure, say N. @@ -54,7 +54,7 @@ index 36327438caf0..61542c282e70 100644 def_bool y prompt "Enable seccomp to safely compute untrusted bytecode" diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index de8eebd6f67c..975d11bfaf5b 100644 +index 1acf605a646d..6da2da7ac9c3 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -12,6 +12,7 @@ @@ -65,7 +65,7 @@ index de8eebd6f67c..975d11bfaf5b 100644 #undef memcpy /* Use memcpy from misc.c */ -@@ -814,6 +815,37 @@ out: +@@ -828,6 +829,37 @@ out: return status; } @@ -103,7 +103,7 @@ index de8eebd6f67c..975d11bfaf5b 100644 /* * See if we have Graphics Output Protocol */ -@@ -1389,6 +1421,10 @@ struct boot_params *efi_main(struct efi_config *c, +@@ -1407,6 +1439,10 @@ struct boot_params *efi_main(struct efi_config *c, else setup_boot_services32(efi_early); @@ -129,10 +129,10 @@ index 225b0988043a..90dbfb73e11f 100644 * The sentinel is set to a nonzero value (0xff) in header.S. * diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 41ead8d3bc0b..5a5cf7395724 100644 +index ab08aa2276fb..f4eb99432db1 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1142,6 +1142,12 @@ void __init setup_arch(char **cmdline_p) +@@ -1150,6 +1150,12 @@ void __init setup_arch(char **cmdline_p) io_delay_init(); @@ -163,10 +163,10 @@ index 341a73ecea2e..cca08ac450e2 100644 extern int modules_disabled; /* for sysctl */ diff --git a/kernel/module.c b/kernel/module.c -index 1f7b4664300e..866417ecc76a 100644 +index 6507ffcb5445..cace4bd04956 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -3843,6 +3843,13 @@ void module_layout(struct module *mod, +@@ -3845,6 +3845,13 @@ void module_layout(struct module *mod, EXPORT_SYMBOL(module_layout); #endif diff --git a/freed-ora/current/master/Add-secure_modules-call.patch b/freed-ora/current/master/Add-secure_modules-call.patch index ecf5b894f..0057afcbf 100644 --- a/freed-ora/current/master/Add-secure_modules-call.patch +++ b/freed-ora/current/master/Add-secure_modules-call.patch @@ -41,10 +41,10 @@ index 71f282a4e307..341a73ecea2e 100644 #ifdef CONFIG_SYSFS diff --git a/kernel/module.c b/kernel/module.c -index 03214bd288e9..1f7b4664300e 100644 +index 88cec1ddb1e3..6507ffcb5445 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -3842,3 +3842,13 @@ void module_layout(struct module *mod, +@@ -3844,3 +3844,13 @@ void module_layout(struct module *mod, } EXPORT_SYMBOL(module_layout); #endif diff --git a/freed-ora/current/master/Add-sysrq-option-to-disable-secure-boot-mode.patch b/freed-ora/current/master/Add-sysrq-option-to-disable-secure-boot-mode.patch index 414fe6e31..4b1cff847 100644 --- a/freed-ora/current/master/Add-sysrq-option-to-disable-secure-boot-mode.patch +++ b/freed-ora/current/master/Add-sysrq-option-to-disable-secure-boot-mode.patch @@ -15,7 +15,7 @@ Upstream-status: Fedora mustard 7 files changed, 65 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index fb282ff6a802..d291d16ba257 100644 +index bc31a43b31a0..5f80d12a55cb 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -70,6 +70,11 @@ @@ -30,7 +30,7 @@ index fb282ff6a802..d291d16ba257 100644 #include <video/edid.h> #include <asm/mtrr.h> -@@ -1268,6 +1273,37 @@ void __init i386_reserve_resources(void) +@@ -1277,6 +1282,37 @@ void __init i386_reserve_resources(void) #endif /* CONFIG_X86_32 */ @@ -228,7 +228,7 @@ index 379650b984f8..070f29fefdc2 100644 return 0; diff --git a/kernel/module.c b/kernel/module.c -index 866417ecc76a..d7ca95c5a349 100644 +index cace4bd04956..a33be993df25 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -108,9 +108,9 @@ struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */ diff --git a/freed-ora/current/master/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch b/freed-ora/current/master/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch new file mode 100644 index 000000000..18a0c7ec6 --- /dev/null +++ b/freed-ora/current/master/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch @@ -0,0 +1,84 @@ +From: Alan Wu <alan.c.wu@gmail.com> +Date: Mon, 3 Nov 2014 18:26:12 -0800 +Subject: [PATCH] HID: add support for MS Surface Pro 3 Type Cover + +Surface Pro 3 Type Cover that works with Ubuntu (and possibly Arch) from this thread. Both trackpad and keyboard work after compiling my own kernel. +http://ubuntuforums.org/showthread.php?t=2231207&page=2&s=44910e0c56047e4f93dfd9fea58121ef + +Also includes Jarrad Whitaker's message which sources +http://winaero.com/blog/how-to-install-linux-on-surface-pro-3/ +which he says is sourced from a Russian site + +Signed-off-by: Alan Wu <alan.c.wu@gmail.com> +Signed-off-by: Jiri Kosina <jkosina@suse.cz> +--- + drivers/hid/hid-core.c | 6 ++++++ + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-microsoft.c | 2 ++ + drivers/hid/usbhid/hid-quirks.c | 1 + + 4 files changed, 10 insertions(+) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index 3402033fa52a..3d3820ecaa49 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -702,6 +702,11 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) + if (((parser->global.usage_page << 16) == HID_UP_SENSOR) && + type == HID_COLLECTION_PHYSICAL) + hid->group = HID_GROUP_SENSOR_HUB; ++ ++ if (hid->vendor == USB_VENDOR_ID_MICROSOFT && ++ hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 && ++ hid->group == HID_GROUP_MULTITOUCH) ++ hid->group = HID_GROUP_GENERIC; + } + + static int hid_scan_main(struct hid_parser *parser, struct hid_item *item) +@@ -1862,6 +1867,7 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) }, + { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index 7c863738e419..ab562f41c00c 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -649,6 +649,7 @@ + #define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799 + #define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7 + #define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9 ++#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07dc + + #define USB_VENDOR_ID_MOJO 0x8282 + #define USB_DEVICE_ID_RETRO_ADAPTER 0x3201 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index 8ba17a946f2a..cacda43f6a6f 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -274,6 +274,8 @@ static const struct hid_device_id ms_devices[] = { + .driver_data = MS_NOGET }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500), + .driver_data = MS_DUPLICATE_USAGES }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), ++ .driver_data = MS_HIDINPUT }, + + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT), + .driver_data = MS_PRESENTER }, +diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c +index 552671ee7c5d..41814fced1cc 100644 +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -78,6 +78,7 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET }, ++ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE, HID_QUIRK_NO_INIT_REPORTS }, +-- +1.9.3 + diff --git a/freed-ora/current/master/HID-rmi-check-sanity-of-incoming-report.patch b/freed-ora/current/master/HID-rmi-check-sanity-of-incoming-report.patch deleted file mode 100644 index f3d0b6e08..000000000 --- a/freed-ora/current/master/HID-rmi-check-sanity-of-incoming-report.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 5b65c2a0296644dd3dbdd590d6f00174d18c96b3 Mon Sep 17 00:00:00 2001 -From: Benjamin Tissoires <benjamin.tissoires@redhat.com> -Date: Wed, 10 Sep 2014 18:02:37 -0700 -Subject: HID: rmi: check sanity of the incoming report - -In the Dell XPS 13 9333, it appears that sometimes the bus get confused -and corrupts the incoming data. It fills the input report with the -sentinel value "ff". Synaptics told us that such behavior does not comes -from the touchpad itself, so we filter out such reports here. - -Unfortunately, we can not simply discard the incoming data because they -may contain useful information. Most of the time, the misbehavior is -quite near the end of the report, so we can still use the valid part of -it. - -Fixes: -https://bugzilla.redhat.com/show_bug.cgi?id=1123584 - -Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> -Signed-off-by: Andrew Duggan <aduggan@synaptics.com> -Signed-off-by: Jiri Kosina <jkosina@suse.cz> - -diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c -index 8389e81..3cccff7 100644 ---- a/drivers/hid/hid-rmi.c -+++ b/drivers/hid/hid-rmi.c -@@ -320,10 +320,7 @@ static int rmi_f11_input_event(struct hid_device *hdev, u8 irq, u8 *data, - int offset; - int i; - -- if (size < hdata->f11.report_size) -- return 0; -- -- if (!(irq & hdata->f11.irq_mask)) -+ if (!(irq & hdata->f11.irq_mask) || size <= 0) - return 0; - - offset = (hdata->max_fingers >> 2) + 1; -@@ -332,9 +329,19 @@ static int rmi_f11_input_event(struct hid_device *hdev, u8 irq, u8 *data, - int fs_bit_position = (i & 0x3) << 1; - int finger_state = (data[fs_byte_position] >> fs_bit_position) & - 0x03; -+ int position = offset + 5 * i; -+ -+ if (position + 5 > size) { -+ /* partial report, go on with what we received */ -+ printk_once(KERN_WARNING -+ "%s %s: Detected incomplete finger report. Finger reports may occasionally get dropped on this platform.\n", -+ dev_driver_string(&hdev->dev), -+ dev_name(&hdev->dev)); -+ hid_dbg(hdev, "Incomplete finger report\n"); -+ break; -+ } - -- rmi_f11_process_touch(hdata, i, finger_state, -- &data[offset + 5 * i]); -+ rmi_f11_process_touch(hdata, i, finger_state, &data[position]); - } - input_mt_sync_frame(hdata->input); - input_sync(hdata->input); -@@ -352,6 +359,11 @@ static int rmi_f30_input_event(struct hid_device *hdev, u8 irq, u8 *data, - if (!(irq & hdata->f30.irq_mask)) - return 0; - -+ if (size < (int)hdata->f30.report_size) { -+ hid_warn(hdev, "Click Button pressed, but the click data is missing\n"); -+ return 0; -+ } -+ - for (i = 0; i < hdata->gpio_led_count; i++) { - if (test_bit(i, &hdata->button_mask)) { - value = (data[i / 8] >> (i & 0x07)) & BIT(0); -@@ -412,9 +424,29 @@ static int rmi_read_data_event(struct hid_device *hdev, u8 *data, int size) - return 1; - } - -+static int rmi_check_sanity(struct hid_device *hdev, u8 *data, int size) -+{ -+ int valid_size = size; -+ /* -+ * On the Dell XPS 13 9333, the bus sometimes get confused and fills -+ * the report with a sentinel value "ff". Synaptics told us that such -+ * behavior does not comes from the touchpad itself, so we filter out -+ * such reports here. -+ */ -+ -+ while ((data[valid_size - 1] == 0xff) && valid_size > 0) -+ valid_size--; -+ -+ return valid_size; -+} -+ - static int rmi_raw_event(struct hid_device *hdev, - struct hid_report *report, u8 *data, int size) - { -+ size = rmi_check_sanity(hdev, data, size); -+ if (size < 2) -+ return 0; -+ - switch (data[0]) { - case RMI_READ_DATA_REPORT_ID: - return rmi_read_data_event(hdev, data, size); --- -cgit v0.10.1 - diff --git a/freed-ora/current/master/HID-wacom-Add-support-for-the-Cintiq-Companion.patch b/freed-ora/current/master/HID-wacom-Add-support-for-the-Cintiq-Companion.patch deleted file mode 100644 index 276fa103f..000000000 --- a/freed-ora/current/master/HID-wacom-Add-support-for-the-Cintiq-Companion.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Benjamin Tissoires <benjamin.tissoires@redhat.com> -Date: Wed, 3 Sep 2014 15:43:25 -0400 -Subject: [PATCH] HID: wacom: Add support for the Cintiq Companion - -The Wacom Cintiq Companion shares the same sensor than the Cintiq -Companion Hybrid, with the exception of the different PIDs. - -Bugzilla: 1134969 -Upstream-status: Queued for 3.18 - -Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> ---- - drivers/hid/wacom_wac.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c -index aa6a08eb7ad6..c3cbbfb5811f 100644 ---- a/drivers/hid/wacom_wac.c -+++ b/drivers/hid/wacom_wac.c -@@ -2573,6 +2573,14 @@ static const struct wacom_features wacom_features_0x309 = - { "Wacom ISDv5 309", .type = WACOM_24HDT, /* Touch */ - .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10, - .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; -+static const struct wacom_features wacom_features_0x30A = -+ { "Wacom ISDv5 30A", 59352, 33648, 2047, 63, -+ CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 200, 200, -+ .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C }; -+static const struct wacom_features wacom_features_0x30C = -+ { "Wacom ISDv5 30C", .type = WACOM_24HDT, /* Touch */ -+ .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30A, .touch_max = 10, -+ .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE }; - - #define USB_DEVICE_WACOM(prod) \ - HID_DEVICE(BUS_USB, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\ -@@ -2708,6 +2716,8 @@ const struct hid_device_id wacom_ids[] = { - { USB_DEVICE_WACOM(0x304) }, - { USB_DEVICE_WACOM(0x307) }, - { USB_DEVICE_WACOM(0x309) }, -+ { USB_DEVICE_WACOM(0x30A) }, -+ { USB_DEVICE_WACOM(0x30C) }, - { USB_DEVICE_WACOM(0x30E) }, - { USB_DEVICE_WACOM(0x314) }, - { USB_DEVICE_WACOM(0x315) }, --- -1.9.3 - diff --git a/freed-ora/current/master/Input-add-driver-for-the-Goodix-touchpanel.patch b/freed-ora/current/master/Input-add-driver-for-the-Goodix-touchpanel.patch new file mode 100644 index 000000000..807609c50 --- /dev/null +++ b/freed-ora/current/master/Input-add-driver-for-the-Goodix-touchpanel.patch @@ -0,0 +1,479 @@ +From: Bastien Nocera <hadess@hadess.net> +Date: Fri, 31 Oct 2014 09:26:16 -0700 +Subject: [PATCH] Input: add driver for the Goodix touchpanel + +Add a driver for the Goodix touchscreen panel found in Onda v975w tablets. +The driver is based off the Android driver gt9xx.c found in some Android +code dumps, but now bears no resemblance to the original driver. + +The driver was tested on the aforementioned tablet. + +Signed-off-by: Bastien Nocera <hadess@hadess.net> +Tested-by: Bastien Nocera <hadess@hadess.net> +Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> +Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> +--- + MAINTAINERS | 6 + + drivers/input/touchscreen/Kconfig | 13 ++ + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/goodix.c | 395 +++++++++++++++++++++++++++++++++++++ + 4 files changed, 415 insertions(+) + create mode 100644 drivers/input/touchscreen/goodix.c + +diff --git a/MAINTAINERS b/MAINTAINERS +index 0ff630de8a6d..e4b643f22336 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -4154,6 +4154,12 @@ L: linux-media@vger.kernel.org + S: Maintained + F: drivers/media/usb/go7007/ + ++GOODIX TOUCHSCREEN ++M: Bastien Nocera <hadess@hadess.net> ++L: linux-input@vger.kernel.org ++S: Maintained ++F: drivers/input/touchscreen/goodix.c ++ + GPIO SUBSYSTEM + M: Linus Walleij <linus.walleij@linaro.org> + M: Alexandre Courbot <gnurou@gmail.com> +diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig +index e1d8003d01f8..568a0200fbc2 100644 +--- a/drivers/input/touchscreen/Kconfig ++++ b/drivers/input/touchscreen/Kconfig +@@ -295,6 +295,19 @@ config TOUCHSCREEN_FUJITSU + To compile this driver as a module, choose M here: the + module will be called fujitsu-ts. + ++config TOUCHSCREEN_GOODIX ++ tristate "Goodix I2C touchscreen" ++ depends on I2C && ACPI ++ help ++ Say Y here if you have the Goodix touchscreen (such as one ++ installed in Onda v975w tablets) connected to your ++ system. ++ ++ If unsure, say N. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called goodix. ++ + config TOUCHSCREEN_ILI210X + tristate "Ilitek ILI210X based touchscreen" + depends on I2C +diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile +index 090e61cc9171..dab4a56ac98e 100644 +--- a/drivers/input/touchscreen/Makefile ++++ b/drivers/input/touchscreen/Makefile +@@ -34,6 +34,7 @@ obj-$(CONFIG_TOUCHSCREEN_EETI) += eeti_ts.o + obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o + obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o + obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o ++obj-$(CONFIG_TOUCHSCREEN_GOODIX) += goodix.o + obj-$(CONFIG_TOUCHSCREEN_ILI210X) += ili210x.o + obj-$(CONFIG_TOUCHSCREEN_INEXIO) += inexio.o + obj-$(CONFIG_TOUCHSCREEN_INTEL_MID) += intel-mid-touch.o +diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c +new file mode 100644 +index 000000000000..ca196689f025 +--- /dev/null ++++ b/drivers/input/touchscreen/goodix.c +@@ -0,0 +1,395 @@ ++/* ++ * Driver for Goodix Touchscreens ++ * ++ * Copyright (c) 2014 Red Hat Inc. ++ * ++ * This code is based on gt9xx.c authored by andrew@goodix.com: ++ * ++ * 2010 - 2012 Goodix Technology. ++ */ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the Free ++ * Software Foundation; version 2 of the License. ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/i2c.h> ++#include <linux/input.h> ++#include <linux/input/mt.h> ++#include <linux/module.h> ++#include <linux/delay.h> ++#include <linux/irq.h> ++#include <linux/interrupt.h> ++#include <linux/slab.h> ++#include <asm/unaligned.h> ++ ++struct goodix_ts_data { ++ struct i2c_client *client; ++ struct input_dev *input_dev; ++ int abs_x_max; ++ int abs_y_max; ++ unsigned int max_touch_num; ++ unsigned int int_trigger_type; ++}; ++ ++#define GOODIX_MAX_HEIGHT 4096 ++#define GOODIX_MAX_WIDTH 4096 ++#define GOODIX_INT_TRIGGER 1 ++#define GOODIX_CONTACT_SIZE 8 ++#define GOODIX_MAX_CONTACTS 10 ++ ++#define GOODIX_CONFIG_MAX_LENGTH 240 ++ ++/* Register defines */ ++#define GOODIX_READ_COOR_ADDR 0x814E ++#define GOODIX_REG_CONFIG_DATA 0x8047 ++#define GOODIX_REG_VERSION 0x8140 ++ ++#define RESOLUTION_LOC 1 ++#define TRIGGER_LOC 6 ++ ++static const unsigned long goodix_irq_flags[] = { ++ IRQ_TYPE_EDGE_RISING, ++ IRQ_TYPE_EDGE_FALLING, ++ IRQ_TYPE_LEVEL_LOW, ++ IRQ_TYPE_LEVEL_HIGH, ++}; ++ ++/** ++ * goodix_i2c_read - read data from a register of the i2c slave device. ++ * ++ * @client: i2c device. ++ * @reg: the register to read from. ++ * @buf: raw write data buffer. ++ * @len: length of the buffer to write ++ */ ++static int goodix_i2c_read(struct i2c_client *client, ++ u16 reg, u8 *buf, int len) ++{ ++ struct i2c_msg msgs[2]; ++ u16 wbuf = cpu_to_be16(reg); ++ int ret; ++ ++ msgs[0].flags = 0; ++ msgs[0].addr = client->addr; ++ msgs[0].len = 2; ++ msgs[0].buf = (u8 *) &wbuf; ++ ++ msgs[1].flags = I2C_M_RD; ++ msgs[1].addr = client->addr; ++ msgs[1].len = len; ++ msgs[1].buf = buf; ++ ++ ret = i2c_transfer(client->adapter, msgs, 2); ++ return ret < 0 ? ret : (ret != ARRAY_SIZE(msgs) ? -EIO : 0); ++} ++ ++static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data) ++{ ++ int touch_num; ++ int error; ++ ++ error = goodix_i2c_read(ts->client, GOODIX_READ_COOR_ADDR, data, ++ GOODIX_CONTACT_SIZE + 1); ++ if (error) { ++ dev_err(&ts->client->dev, "I2C transfer error: %d\n", error); ++ return error; ++ } ++ ++ touch_num = data[0] & 0x0f; ++ if (touch_num > GOODIX_MAX_CONTACTS) ++ return -EPROTO; ++ ++ if (touch_num > 1) { ++ data += 1 + GOODIX_CONTACT_SIZE; ++ error = goodix_i2c_read(ts->client, ++ GOODIX_READ_COOR_ADDR + ++ 1 + GOODIX_CONTACT_SIZE, ++ data, ++ GOODIX_CONTACT_SIZE * (touch_num - 1)); ++ if (error) ++ return error; ++ } ++ ++ return touch_num; ++} ++ ++static void goodix_ts_report_touch(struct goodix_ts_data *ts, u8 *coor_data) ++{ ++ int id = coor_data[0] & 0x0F; ++ int input_x = get_unaligned_le16(&coor_data[1]); ++ int input_y = get_unaligned_le16(&coor_data[3]); ++ int input_w = get_unaligned_le16(&coor_data[5]); ++ ++ input_mt_slot(ts->input_dev, id); ++ input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, true); ++ input_report_abs(ts->input_dev, ABS_MT_POSITION_X, input_x); ++ input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, input_y); ++ input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, input_w); ++ input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, input_w); ++} ++ ++/** ++ * goodix_process_events - Process incoming events ++ * ++ * @ts: our goodix_ts_data pointer ++ * ++ * Called when the IRQ is triggered. Read the current device state, and push ++ * the input events to the user space. ++ */ ++static void goodix_process_events(struct goodix_ts_data *ts) ++{ ++ u8 point_data[1 + GOODIX_CONTACT_SIZE * GOODIX_MAX_CONTACTS]; ++ int touch_num; ++ int i; ++ ++ touch_num = goodix_ts_read_input_report(ts, point_data); ++ if (touch_num < 0) ++ return; ++ ++ for (i = 0; i < touch_num; i++) ++ goodix_ts_report_touch(ts, ++ &point_data[1 + GOODIX_CONTACT_SIZE * i]); ++ ++ input_mt_sync_frame(ts->input_dev); ++ input_sync(ts->input_dev); ++} ++ ++/** ++ * goodix_ts_irq_handler - The IRQ handler ++ * ++ * @irq: interrupt number. ++ * @dev_id: private data pointer. ++ */ ++static irqreturn_t goodix_ts_irq_handler(int irq, void *dev_id) ++{ ++ static const u8 end_cmd[] = { ++ GOODIX_READ_COOR_ADDR >> 8, ++ GOODIX_READ_COOR_ADDR & 0xff, ++ 0 ++ }; ++ struct goodix_ts_data *ts = dev_id; ++ ++ goodix_process_events(ts); ++ ++ if (i2c_master_send(ts->client, end_cmd, sizeof(end_cmd)) < 0) ++ dev_err(&ts->client->dev, "I2C write end_cmd error\n"); ++ ++ return IRQ_HANDLED; ++} ++ ++/** ++ * goodix_read_config - Read the embedded configuration of the panel ++ * ++ * @ts: our goodix_ts_data pointer ++ * ++ * Must be called during probe ++ */ ++static void goodix_read_config(struct goodix_ts_data *ts) ++{ ++ u8 config[GOODIX_CONFIG_MAX_LENGTH]; ++ int error; ++ ++ error = goodix_i2c_read(ts->client, GOODIX_REG_CONFIG_DATA, ++ config, ++ GOODIX_CONFIG_MAX_LENGTH); ++ if (error) { ++ dev_warn(&ts->client->dev, ++ "Error reading config (%d), using defaults\n", ++ error); ++ ts->abs_x_max = GOODIX_MAX_WIDTH; ++ ts->abs_y_max = GOODIX_MAX_HEIGHT; ++ ts->int_trigger_type = GOODIX_INT_TRIGGER; ++ return; ++ } ++ ++ ts->abs_x_max = get_unaligned_le16(&config[RESOLUTION_LOC]); ++ ts->abs_y_max = get_unaligned_le16(&config[RESOLUTION_LOC + 2]); ++ ts->int_trigger_type = (config[TRIGGER_LOC]) & 0x03; ++ if (!ts->abs_x_max || !ts->abs_y_max) { ++ dev_err(&ts->client->dev, ++ "Invalid config, using defaults\n"); ++ ts->abs_x_max = GOODIX_MAX_WIDTH; ++ ts->abs_y_max = GOODIX_MAX_HEIGHT; ++ } ++} ++ ++ ++/** ++ * goodix_read_version - Read goodix touchscreen version ++ * ++ * @client: the i2c client ++ * @version: output buffer containing the version on success ++ */ ++static int goodix_read_version(struct i2c_client *client, u16 *version) ++{ ++ int error; ++ u8 buf[6]; ++ ++ error = goodix_i2c_read(client, GOODIX_REG_VERSION, buf, sizeof(buf)); ++ if (error) { ++ dev_err(&client->dev, "read version failed: %d\n", error); ++ return error; ++ } ++ ++ if (version) ++ *version = get_unaligned_le16(&buf[4]); ++ ++ dev_info(&client->dev, "IC VERSION: %6ph\n", buf); ++ ++ return 0; ++} ++ ++/** ++ * goodix_i2c_test - I2C test function to check if the device answers. ++ * ++ * @client: the i2c client ++ */ ++static int goodix_i2c_test(struct i2c_client *client) ++{ ++ int retry = 0; ++ int error; ++ u8 test; ++ ++ while (retry++ < 2) { ++ error = goodix_i2c_read(client, GOODIX_REG_CONFIG_DATA, ++ &test, 1); ++ if (!error) ++ return 0; ++ ++ dev_err(&client->dev, "i2c test failed attempt %d: %d\n", ++ retry, error); ++ msleep(20); ++ } ++ ++ return error; ++} ++ ++/** ++ * goodix_request_input_dev - Allocate, populate and register the input device ++ * ++ * @ts: our goodix_ts_data pointer ++ * ++ * Must be called during probe ++ */ ++static int goodix_request_input_dev(struct goodix_ts_data *ts) ++{ ++ int error; ++ ++ ts->input_dev = devm_input_allocate_device(&ts->client->dev); ++ if (!ts->input_dev) { ++ dev_err(&ts->client->dev, "Failed to allocate input device."); ++ return -ENOMEM; ++ } ++ ++ ts->input_dev->evbit[0] = BIT_MASK(EV_SYN) | ++ BIT_MASK(EV_KEY) | ++ BIT_MASK(EV_ABS); ++ ++ input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X, 0, ++ ts->abs_x_max, 0, 0); ++ input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, 0, ++ ts->abs_y_max, 0, 0); ++ input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0); ++ input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0); ++ ++ input_mt_init_slots(ts->input_dev, GOODIX_MAX_CONTACTS, ++ INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); ++ ++ ts->input_dev->name = "Goodix Capacitive TouchScreen"; ++ ts->input_dev->phys = "input/ts"; ++ ts->input_dev->id.bustype = BUS_I2C; ++ ts->input_dev->id.vendor = 0x0416; ++ ts->input_dev->id.product = 0x1001; ++ ts->input_dev->id.version = 10427; ++ ++ error = input_register_device(ts->input_dev); ++ if (error) { ++ dev_err(&ts->client->dev, ++ "Failed to register input device: %d", error); ++ return error; ++ } ++ ++ return 0; ++} ++ ++static int goodix_ts_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct goodix_ts_data *ts; ++ unsigned long irq_flags; ++ int error; ++ u16 version_info; ++ ++ dev_dbg(&client->dev, "I2C Address: 0x%02x\n", client->addr); ++ ++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { ++ dev_err(&client->dev, "I2C check functionality failed.\n"); ++ return -ENXIO; ++ } ++ ++ ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL); ++ if (!ts) ++ return -ENOMEM; ++ ++ ts->client = client; ++ i2c_set_clientdata(client, ts); ++ ++ error = goodix_i2c_test(client); ++ if (error) { ++ dev_err(&client->dev, "I2C communication failure: %d\n", error); ++ return error; ++ } ++ ++ error = goodix_read_version(client, &version_info); ++ if (error) { ++ dev_err(&client->dev, "Read version failed.\n"); ++ return error; ++ } ++ ++ goodix_read_config(ts); ++ ++ error = goodix_request_input_dev(ts); ++ if (error) ++ return error; ++ ++ irq_flags = goodix_irq_flags[ts->int_trigger_type] | IRQF_ONESHOT; ++ error = devm_request_threaded_irq(&ts->client->dev, client->irq, ++ NULL, goodix_ts_irq_handler, ++ irq_flags, client->name, ts); ++ if (error) { ++ dev_err(&client->dev, "request IRQ failed: %d\n", error); ++ return error; ++ } ++ ++ return 0; ++} ++ ++static const struct i2c_device_id goodix_ts_id[] = { ++ { "GDIX1001:00", 0 }, ++ { } ++}; ++ ++static const struct acpi_device_id goodix_acpi_match[] = { ++ { "GDIX1001", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(acpi, goodix_acpi_match); ++ ++static struct i2c_driver goodix_ts_driver = { ++ .probe = goodix_ts_probe, ++ .id_table = goodix_ts_id, ++ .driver = { ++ .name = "Goodix-TS", ++ .owner = THIS_MODULE, ++ .acpi_match_table = goodix_acpi_match, ++ }, ++}; ++module_i2c_driver(goodix_ts_driver); ++ ++MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires@gmail.com>"); ++MODULE_AUTHOR("Bastien Nocera <hadess@hadess.net>"); ++MODULE_DESCRIPTION("Goodix touchscreen driver"); ++MODULE_LICENSE("GPL v2"); +-- +1.9.3 + diff --git a/freed-ora/current/master/KEYS-Add-a-system-blacklist-keyring.patch b/freed-ora/current/master/KEYS-Add-a-system-blacklist-keyring.patch index 17ef25bf1..34f1563b9 100644 --- a/freed-ora/current/master/KEYS-Add-a-system-blacklist-keyring.patch +++ b/freed-ora/current/master/KEYS-Add-a-system-blacklist-keyring.patch @@ -29,10 +29,10 @@ index 72665eb80692..2c7b80d31366 100644 + #endif /* _KEYS_SYSTEM_KEYRING_H */ diff --git a/init/Kconfig b/init/Kconfig -index 80a6907f91c5..dfdd7f738247 100644 +index 2081a4d3d917..d99a519bb9ae 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1723,6 +1723,15 @@ config SYSTEM_TRUSTED_KEYRING +@@ -1747,6 +1747,15 @@ config SYSTEM_TRUSTED_KEYRING Keys in this keyring are used by module signature checking. diff --git a/freed-ora/current/master/KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch b/freed-ora/current/master/KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch deleted file mode 100644 index cd141ea8d..000000000 --- a/freed-ora/current/master/KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: David Howells <dhowells@redhat.com> -Date: Tue, 16 Sep 2014 17:29:03 +0100 -Subject: [PATCH] KEYS: Reinstate EPERM for a key type name beginning with a - '.' - -Reinstate the generation of EPERM for a key type name beginning with a '.' in -a userspace call. Types whose name begins with a '.' are internal only. - -The test was removed by: - - commit a4e3b8d79a5c6d40f4a9703abf7fe3abcc6c3b8d - Author: Mimi Zohar <zohar@linux.vnet.ibm.com> - Date: Thu May 22 14:02:23 2014 -0400 - Subject: KEYS: special dot prefixed keyring name bug fix - -I think we want to keep the restriction on type name so that userspace can't -add keys of a special internal type. - -Note that removal of the test causes several of the tests in the keyutils -testsuite to fail. - -Signed-off-by: David Howells <dhowells@redhat.com> -Acked-by: Vivek Goyal <vgoyal@redhat.com> -cc: Mimi Zohar <zohar@linux.vnet.ibm.com> ---- - security/keys/keyctl.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c -index e26f860e5f2e..eff88a5f5d40 100644 ---- a/security/keys/keyctl.c -+++ b/security/keys/keyctl.c -@@ -37,6 +37,8 @@ static int key_get_type_from_user(char *type, - return ret; - if (ret == 0 || ret >= len) - return -EINVAL; -+ if (type[0] == '.') -+ return -EPERM; - type[len - 1] = '\0'; - return 0; - } --- -1.9.3 - diff --git a/freed-ora/current/master/MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch b/freed-ora/current/master/MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch index a23a15cd3..d0308704f 100644 --- a/freed-ora/current/master/MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch +++ b/freed-ora/current/master/MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch @@ -25,10 +25,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> create mode 100644 kernel/modsign_uefi.c diff --git a/include/linux/efi.h b/include/linux/efi.h -index 41359e548bcb..db9e6118575e 100644 +index b1d686e9175e..4d41f4532127 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -587,6 +587,12 @@ void efi_native_runtime_setup(void); +@@ -592,6 +592,12 @@ void efi_native_runtime_setup(void); #define EFI_CERT_X509_GUID \ EFI_GUID( 0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 ) @@ -42,10 +42,10 @@ index 41359e548bcb..db9e6118575e 100644 efi_guid_t guid; u64 table; diff --git a/init/Kconfig b/init/Kconfig -index dfdd7f738247..3c866db603a7 100644 +index d99a519bb9ae..9ef459bb44b2 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1877,6 +1877,15 @@ config MODULE_SIG_ALL +@@ -1901,6 +1901,15 @@ config MODULE_SIG_ALL comment "Do not forget to sign required modules with scripts/sign-file" depends on MODULE_SIG_FORCE && !MODULE_SIG_ALL @@ -62,7 +62,7 @@ index dfdd7f738247..3c866db603a7 100644 prompt "Which hash algorithm should modules be signed with?" depends on MODULE_SIG diff --git a/kernel/Makefile b/kernel/Makefile -index dc5c77544fd6..95bdf3398880 100644 +index 17ea6d4a9a24..381fe2d56ed1 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -45,6 +45,7 @@ obj-$(CONFIG_UID16) += uid16.o diff --git a/freed-ora/current/master/PCI-Lock-down-BAR-access-when-module-security-is-ena.patch b/freed-ora/current/master/PCI-Lock-down-BAR-access-when-module-security-is-ena.patch index 2fc17c0b4..1b8a0034d 100644 --- a/freed-ora/current/master/PCI-Lock-down-BAR-access-when-module-security-is-ena.patch +++ b/freed-ora/current/master/PCI-Lock-down-BAR-access-when-module-security-is-ena.patch @@ -16,7 +16,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c -index 9ff0a901ecf7..8d0d5d92b8d9 100644 +index 2c6643fdc0cf..56333630ab77 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -30,6 +30,7 @@ @@ -27,7 +27,7 @@ index 9ff0a901ecf7..8d0d5d92b8d9 100644 #include "pci.h" static int sysfs_initialized; /* = 0 */ -@@ -704,6 +705,9 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj, +@@ -703,6 +704,9 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj, loff_t init_off = off; u8 *data = (u8 *) buf; @@ -37,7 +37,7 @@ index 9ff0a901ecf7..8d0d5d92b8d9 100644 if (off > dev->cfg_size) return 0; if (off + count > dev->cfg_size) { -@@ -998,6 +1002,9 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, +@@ -997,6 +1001,9 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, resource_size_t start, end; int i; @@ -47,7 +47,7 @@ index 9ff0a901ecf7..8d0d5d92b8d9 100644 for (i = 0; i < PCI_ROM_RESOURCE; i++) if (res == &pdev->resource[i]) break; -@@ -1099,6 +1106,9 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj, +@@ -1098,6 +1105,9 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) { diff --git a/freed-ora/current/master/Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch b/freed-ora/current/master/Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch index 003bfec72..3cdd4670c 100644 --- a/freed-ora/current/master/Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch +++ b/freed-ora/current/master/Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch @@ -13,7 +13,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 6 insertions(+) diff --git a/drivers/char/mem.c b/drivers/char/mem.c -index cdf839f9defe..c63cf93b00eb 100644 +index c268e2581ed6..fb9ea1172ba8 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -164,6 +164,9 @@ static ssize_t write_mem(struct file *file, const char __user *buf, diff --git a/freed-ora/current/master/Revert-Btrfs-race-free-update-of-commit-root-for-ro-.patch b/freed-ora/current/master/Revert-Btrfs-race-free-update-of-commit-root-for-ro-.patch new file mode 100644 index 000000000..bc78069b5 --- /dev/null +++ b/freed-ora/current/master/Revert-Btrfs-race-free-update-of-commit-root-for-ro-.patch @@ -0,0 +1,105 @@ +From: Josh Boyer <jwboyer@fedoraproject.org> +Date: Wed, 15 Oct 2014 10:09:50 -0400 +Subject: [PATCH] Revert "Btrfs: race free update of commit root for ro + snapshots" + +This reverts commit 9c3b306e1c9e6be4be09e99a8fe2227d1005effc. +--- + fs/btrfs/inode.c | 36 ------------------------------------ + fs/btrfs/ioctl.c | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 33 insertions(+), 36 deletions(-) + +diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c +index fc9c0439caa3..d23362f4464e 100644 +--- a/fs/btrfs/inode.c ++++ b/fs/btrfs/inode.c +@@ -5261,42 +5261,6 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) + iput(inode); + inode = ERR_PTR(ret); + } +- /* +- * If orphan cleanup did remove any orphans, it means the tree +- * was modified and therefore the commit root is not the same as +- * the current root anymore. This is a problem, because send +- * uses the commit root and therefore can see inode items that +- * don't exist in the current root anymore, and for example make +- * calls to btrfs_iget, which will do tree lookups based on the +- * current root and not on the commit root. Those lookups will +- * fail, returning a -ESTALE error, and making send fail with +- * that error. So make sure a send does not see any orphans we +- * have just removed, and that it will see the same inodes +- * regardless of whether a transaction commit happened before +- * it started (meaning that the commit root will be the same as +- * the current root) or not. +- */ +- if (sub_root->node != sub_root->commit_root) { +- u64 sub_flags = btrfs_root_flags(&sub_root->root_item); +- +- if (sub_flags & BTRFS_ROOT_SUBVOL_RDONLY) { +- struct extent_buffer *eb; +- +- /* +- * Assert we can't have races between dentry +- * lookup called through the snapshot creation +- * ioctl and the VFS. +- */ +- ASSERT(mutex_is_locked(&dir->i_mutex)); +- +- down_write(&root->fs_info->commit_root_sem); +- eb = sub_root->commit_root; +- sub_root->commit_root = +- btrfs_root_node(sub_root); +- up_write(&root->fs_info->commit_root_sem); +- free_extent_buffer(eb); +- } +- } + } + + return inode; +diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c +index 0fe1aa047f15..8d2b76e29d3b 100644 +--- a/fs/btrfs/ioctl.c ++++ b/fs/btrfs/ioctl.c +@@ -713,6 +713,39 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir, + if (ret) + goto fail; + ++ ret = btrfs_orphan_cleanup(pending_snapshot->snap); ++ if (ret) ++ goto fail; ++ ++ /* ++ * If orphan cleanup did remove any orphans, it means the tree was ++ * modified and therefore the commit root is not the same as the ++ * current root anymore. This is a problem, because send uses the ++ * commit root and therefore can see inode items that don't exist ++ * in the current root anymore, and for example make calls to ++ * btrfs_iget, which will do tree lookups based on the current root ++ * and not on the commit root. Those lookups will fail, returning a ++ * -ESTALE error, and making send fail with that error. So make sure ++ * a send does not see any orphans we have just removed, and that it ++ * will see the same inodes regardless of whether a transaction ++ * commit happened before it started (meaning that the commit root ++ * will be the same as the current root) or not. ++ */ ++ if (readonly && pending_snapshot->snap->node != ++ pending_snapshot->snap->commit_root) { ++ trans = btrfs_join_transaction(pending_snapshot->snap); ++ if (IS_ERR(trans) && PTR_ERR(trans) != -ENOENT) { ++ ret = PTR_ERR(trans); ++ goto fail; ++ } ++ if (!IS_ERR(trans)) { ++ ret = btrfs_commit_transaction(trans, ++ pending_snapshot->snap); ++ if (ret) ++ goto fail; ++ } ++ } ++ + inode = btrfs_lookup_dentry(dentry->d_parent->d_inode, dentry); + if (IS_ERR(inode)) { + ret = PTR_ERR(inode); +-- +1.9.3 + diff --git a/freed-ora/current/master/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch b/freed-ora/current/master/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch index 0f3a70150..18587426c 100644 --- a/freed-ora/current/master/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch +++ b/freed-ora/current/master/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch @@ -15,10 +15,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index 10d51c2f10d7..5b6ebe8b519e 100644 +index 479f33204a37..e362ef82dcc1 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt -@@ -3596,7 +3596,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. +@@ -3719,7 +3719,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. the allocated input device; If set to 0, video driver will only send out the event without touching backlight brightness level. @@ -28,7 +28,7 @@ index 10d51c2f10d7..5b6ebe8b519e 100644 virtio_mmio.device= [VMMIO] Memory mapped virtio (platform) device. diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c -index 8e7e18567ae6..a3d293806f96 100644 +index 807a88a0f394..b8a441713e86 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -68,7 +68,7 @@ MODULE_AUTHOR("Bruno Ducrot"); diff --git a/freed-ora/current/master/acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch b/freed-ora/current/master/acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch index cea06c30f..986bce9cb 100644 --- a/freed-ora/current/master/acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch +++ b/freed-ora/current/master/acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch @@ -13,7 +13,7 @@ Signed-off-by: Josh Boyer <jwboyer@redhat.com> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c -index 3abe9b223ba7..ee8f11cf65da 100644 +index 9964f70be98d..d95d258f606c 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -44,6 +44,7 @@ @@ -24,7 +24,7 @@ index 3abe9b223ba7..ee8f11cf65da 100644 #include <asm/io.h> #include <asm/uaccess.h> -@@ -245,7 +246,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); +@@ -255,7 +256,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); acpi_physical_address __init acpi_os_get_root_pointer(void) { #ifdef CONFIG_KEXEC diff --git a/freed-ora/current/master/acpi-video-Add-4-new-models-to-the-use_native_backli.patch b/freed-ora/current/master/acpi-video-Add-4-new-models-to-the-use_native_backli.patch deleted file mode 100644 index 4411248f3..000000000 --- a/freed-ora/current/master/acpi-video-Add-4-new-models-to-the-use_native_backli.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: Hans de Goede <hdegoede@redhat.com> -Date: Wed, 30 Apr 2014 15:24:19 +0200 -Subject: [PATCH] acpi-video: Add 4 new models to the use_native_backlight dmi - list - -Acer Aspire V5-171 -https://bugzilla.redhat.com/show_bug.cgi?id=983342 - -Acer Aspire V5-471G -Lenovo Yoga 2 11 -Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com> - -HP EliteBook 8470p -https://bugzilla.redhat.com/show_bug.cgi?id=1093120 - -Cc: stable@vger.kernel.org -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/acpi/video.c | 32 ++++++++++++++++++++++++++++++++ - 1 file changed, 32 insertions(+) - -diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c -index a3d293806f96..5c8ce8c699fc 100644 ---- a/drivers/acpi/video.c -+++ b/drivers/acpi/video.c -@@ -556,6 +556,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - }, - { -+ .callback = video_set_use_native_backlight, -+ .ident = "Lenovo Yoga 2 11", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"), -+ }, -+ }, -+ { - .callback = video_set_use_native_backlight, - .ident = "Thinkpad Helix", - .matches = { -@@ -597,6 +605,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - { - .callback = video_set_use_native_backlight, -+ .ident = "Acer Aspire V5-171", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "V5-171"), -+ }, -+ }, -+ { -+ .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-431", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), -@@ -644,6 +660,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - }, - { -+ .callback = video_set_use_native_backlight, -+ .ident = "Acer Aspire V5-471G", -+ .matches = { -+ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-471G"), -+ }, -+ }, -+ { - .callback = video_set_use_native_backlight, - .ident = "HP ProBook 4340s", - .matches = { -@@ -720,6 +744,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - { - .callback = video_set_use_native_backlight, -+ .ident = "HP EliteBook 8470p", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8470p"), -+ }, -+ }, -+ { -+ .callback = video_set_use_native_backlight, - .ident = "HP EliteBook 8780w", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), --- -1.9.3 - diff --git a/freed-ora/current/master/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch b/freed-ora/current/master/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch deleted file mode 100644 index fb77e5641..000000000 --- a/freed-ora/current/master/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Hans de Goede <hdegoede@redhat.com> -Date: Mon, 2 Jun 2014 17:41:10 +0200 -Subject: [PATCH] acpi-video: Add use native backlight quirk for the ThinkPad - W530 - -Like all of the other *30 ThinkPad models, the W530 has a broken acpi-video -backlight control. Note in order for this to actually fix things on the -ThinkPad W530 the commit titled: -"nouveau: Don't check acpi_video_backlight_support() before registering backlight" -is also needed. - -https://bugzilla.redhat.com/show_bug.cgi?id=1093171 - -Bugzilla: 1093171 -Upstream-status: Queued for 3.16 - -Cc: stable@vger.kernel.org -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/acpi/video.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c -index 5c8ce8c699fc..d8a6ecb0b2b2 100644 ---- a/drivers/acpi/video.c -+++ b/drivers/acpi/video.c -@@ -469,6 +469,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - { - .callback = video_set_use_native_backlight, -+ .ident = "ThinkPad W530", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"), -+ }, -+ }, -+ { -+ .callback = video_set_use_native_backlight, - .ident = "ThinkPad X230", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), --- -1.9.3 - diff --git a/freed-ora/current/master/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch b/freed-ora/current/master/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch deleted file mode 100644 index 33a26383b..000000000 --- a/freed-ora/current/master/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Hans de Goede <hdegoede@redhat.com> -Date: Mon, 2 Jun 2014 17:41:11 +0200 -Subject: [PATCH] acpi-video: Add use_native_backlight quirk for HP ProBook - 4540s - -As reported here: -https://bugzilla.redhat.com/show_bug.cgi?id=1025690 -This is yet another model which needs this quirk. - -Bugzilla: 1025690 -Upstream-status: Waiting for feedback from reporter - -Cc: stable@vger.kernel.org -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/acpi/video.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c -index d8a6ecb0b2b2..8dbf009521c7 100644 ---- a/drivers/acpi/video.c -+++ b/drivers/acpi/video.c -@@ -693,6 +693,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { - }, - { - .callback = video_set_use_native_backlight, -+ .ident = "HP ProBook 4540s", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "HP ProBook 4540s"), -+ }, -+ }, -+ { -+ .callback = video_set_use_native_backlight, - .ident = "HP ProBook 2013 models", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), --- -1.9.3 - diff --git a/freed-ora/current/master/arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch b/freed-ora/current/master/arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch index e95955deb..6b5cb2011 100644 --- a/freed-ora/current/master/arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch +++ b/freed-ora/current/master/arm-dts-am335x-bone-common-add-uart2_pins-uart4_pins.patch @@ -9,10 +9,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index 86cdb52dbf8a..db4518ef755d 100644 +index 4991a1664773..096ddbe4c4b3 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -105,6 +105,27 @@ +@@ -102,6 +102,27 @@ >; }; diff --git a/freed-ora/current/master/arm-dts-am335x-bone-common-enable-and-use-i2c2.patch b/freed-ora/current/master/arm-dts-am335x-bone-common-enable-and-use-i2c2.patch index 04efe225a..a40719c9c 100644 --- a/freed-ora/current/master/arm-dts-am335x-bone-common-enable-and-use-i2c2.patch +++ b/freed-ora/current/master/arm-dts-am335x-bone-common-enable-and-use-i2c2.patch @@ -8,10 +8,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index bde1777b62be..c7357bcc7d5c 100644 +index 6cc25ed912ee..754b96c5dbb1 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -84,6 +84,13 @@ +@@ -81,6 +81,13 @@ >; }; @@ -25,7 +25,7 @@ index bde1777b62be..c7357bcc7d5c 100644 uart0_pins: pinmux_uart0_pins { pinctrl-single,pins = < 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ -@@ -220,6 +227,38 @@ +@@ -217,6 +224,38 @@ reg = <0x24>; }; diff --git a/freed-ora/current/master/arm-dts-am335x-bone-common-setup-default-pinmux-http.patch b/freed-ora/current/master/arm-dts-am335x-bone-common-setup-default-pinmux-http.patch index 180055d44..29fde1cfe 100644 --- a/freed-ora/current/master/arm-dts-am335x-bone-common-setup-default-pinmux-http.patch +++ b/freed-ora/current/master/arm-dts-am335x-bone-common-setup-default-pinmux-http.patch @@ -9,10 +9,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 130 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index c7357bcc7d5c..86cdb52dbf8a 100644 +index 754b96c5dbb1..4991a1664773 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -98,6 +98,13 @@ +@@ -95,6 +95,13 @@ >; }; @@ -26,7 +26,7 @@ index c7357bcc7d5c..86cdb52dbf8a 100644 clkout2_pin: pinmux_clkout2_pin { pinctrl-single,pins = < 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ -@@ -178,6 +185,33 @@ +@@ -175,6 +182,33 @@ 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ >; }; @@ -60,7 +60,7 @@ index c7357bcc7d5c..86cdb52dbf8a 100644 }; &uart0 { -@@ -187,6 +221,13 @@ +@@ -184,6 +218,13 @@ status = "okay"; }; @@ -74,7 +74,7 @@ index c7357bcc7d5c..86cdb52dbf8a 100644 &usb { status = "okay"; }; -@@ -261,6 +302,56 @@ +@@ -258,6 +299,56 @@ }; }; @@ -131,7 +131,7 @@ index c7357bcc7d5c..86cdb52dbf8a 100644 /include/ "tps65217.dtsi" &tps { -@@ -337,3 +428,42 @@ +@@ -339,3 +430,42 @@ cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; cd-inverted; }; diff --git a/freed-ora/current/master/arm-dts-am335x-boneblack-add-cpu0-opp-points.patch b/freed-ora/current/master/arm-dts-am335x-boneblack-add-cpu0-opp-points.patch index 2c10bfa4f..a24cef2dc 100644 --- a/freed-ora/current/master/arm-dts-am335x-boneblack-add-cpu0-opp-points.patch +++ b/freed-ora/current/master/arm-dts-am335x-boneblack-add-cpu0-opp-points.patch @@ -8,10 +8,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index bf5349165542..acfff3befff5 100644 +index 5dcdcd173572..38439e097b26 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -66,6 +66,24 @@ +@@ -71,6 +71,24 @@ }; / { diff --git a/freed-ora/current/master/arm-dts-am335x-boneblack-lcdc-add-panel-info.patch b/freed-ora/current/master/arm-dts-am335x-boneblack-lcdc-add-panel-info.patch index 00511f50e..3e85c3898 100644 --- a/freed-ora/current/master/arm-dts-am335x-boneblack-lcdc-add-panel-info.patch +++ b/freed-ora/current/master/arm-dts-am335x-boneblack-lcdc-add-panel-info.patch @@ -11,10 +11,10 @@ Signed-off-by: Robert Nelson <robertcnelson@gmail.com> 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index 305975d3f531..bf5349165542 100644 +index 901739fcb85a..5dcdcd173572 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -73,5 +73,18 @@ +@@ -78,5 +78,18 @@ pinctrl-0 = <&nxp_hdmi_bonelt_pins>; pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; status = "okay"; diff --git a/freed-ora/current/master/arm-dts-sun7i-bananapi.patch b/freed-ora/current/master/arm-dts-sun7i-bananapi.patch index 94cbc9eb6..0825d7517 100644 --- a/freed-ora/current/master/arm-dts-sun7i-bananapi.patch +++ b/freed-ora/current/master/arm-dts-sun7i-bananapi.patch @@ -14,17 +14,17 @@ Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> create mode 100644 arch/arm/boot/dts/sun7i-a20-bananapi.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index b8c5cd3ddeb9..c3003a4460f5 100644 +index 38c89cafa1ab..63422bde3a46 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -414,6 +414,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ +@@ -435,6 +435,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \ sun6i-a31-hummingbird.dtb \ sun6i-a31-m9.dtb dtb-$(CONFIG_MACH_SUN7I) += \ + sun7i-a20-bananapi.dtb \ sun7i-a20-cubieboard2.dtb \ sun7i-a20-cubietruck.dtb \ - sun7i-a20-i12-tvbox.dtb \ + sun7i-a20-hummingbird.dtb \ diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts new file mode 100644 index 000000000000..7214475a3c36 diff --git a/freed-ora/current/master/arm-highbank-l2-reverts.patch b/freed-ora/current/master/arm-highbank-l2-reverts.patch index f1e6d45d3..0c4517bf0 100644 --- a/freed-ora/current/master/arm-highbank-l2-reverts.patch +++ b/freed-ora/current/master/arm-highbank-l2-reverts.patch @@ -9,7 +9,7 @@ Will debug upstream separately, but we need F22/21 running there. (#1139762) 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c -index 8c35ae4ff176..38e1dc3b4c6e 100644 +index 07a09570175d..5db6d14fcd67 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -51,13 +51,11 @@ static void __init highbank_scu_map_io(void) diff --git a/freed-ora/current/master/asus-nb-wmi-Add-wapf4-quirk-for-the-X550VB.patch b/freed-ora/current/master/asus-nb-wmi-Add-wapf4-quirk-for-the-X550VB.patch new file mode 100644 index 000000000..1ec42f728 --- /dev/null +++ b/freed-ora/current/master/asus-nb-wmi-Add-wapf4-quirk-for-the-X550VB.patch @@ -0,0 +1,35 @@ +From: Stanislaw Gruszka <sgruszka@redhat.com> +Date: Wed, 22 Oct 2014 14:32:52 +0200 +Subject: [PATCH] asus-nb-wmi: Add wapf4 quirk for the X550VB + +As reported here: http://bugzilla.redhat.com/show_bug.cgi?id=1089731#c23 +the X550VB needs wapf=4 too. + +Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> +--- + drivers/platform/x86/asus-nb-wmi.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c +index 3a4951f46065..c1a6cd66af42 100644 +--- a/drivers/platform/x86/asus-nb-wmi.c ++++ b/drivers/platform/x86/asus-nb-wmi.c +@@ -182,6 +182,15 @@ static const struct dmi_system_id asus_quirks[] = { + }, + { + .callback = dmi_matched, ++ .ident = "ASUSTeK COMPUTER INC. X550VB", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "X550VB"), ++ }, ++ .driver_data = &quirk_asus_wapf4, ++ }, ++ { ++ .callback = dmi_matched, + .ident = "ASUSTeK COMPUTER INC. X55A", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), +-- +1.9.3 + diff --git a/freed-ora/current/master/config-arm-generic b/freed-ora/current/master/config-arm-generic index 1f07efa9b..5c4c909b7 100644 --- a/freed-ora/current/master/config-arm-generic +++ b/freed-ora/current/master/config-arm-generic @@ -24,8 +24,6 @@ CONFIG_RESET_CONTROLLER=y CONFIG_RESET_GPIO=y CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RTC_DRV_SNVS is not set -# CONFIG_RTC_DRV_HYM8563 is not set CONFIG_BACKLIGHT_PWM=m CONFIG_INPUT_PWM_BEEPER=m CONFIG_ARM_SP805_WATCHDOG=m @@ -69,10 +67,10 @@ CONFIG_POWER_RESET_VEXPRESS=y CONFIG_REGULATOR_VEXPRESS=m CONFIG_SENSORS_VEXPRESS=m CONFIG_CLKSRC_VERSATILE=y +CONFIG_POWER_RESET_VERSATILE=y # CONFIG_ARM_CHARLCD is not set # Power/Thermal/Cpufreq -CONFIG_GENERIC_CPUFREQ_CPU0=m # CONFIG_ARM_DT_BL_CPUFREQ is not set # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set @@ -87,22 +85,27 @@ CONFIG_OF_FLATTREE=y CONFIG_OF_GPIO=y CONFIG_OF_IOMMU=y CONFIG_OF_IRQ=y -CONFIG_OF_MDIO=m CONFIG_OF_MTD=y CONFIG_OF_NET=y CONFIG_OF_PCI_IRQ=m CONFIG_OF_PCI=m CONFIG_OF_RESERVED_MEM=y +CONFIG_OF_RESOLVE=y CONFIG_PATA_OF_PLATFORM=m # CONFIG_OF_SELFTEST is not set CONFIG_SERIAL_OF_PLATFORM=y CONFIG_THERMAL_OF=y +# CONFIG_OF_MDIO is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set + # External Connectors CONFIG_EXTCON=m CONFIG_EXTCON_GPIO=m CONFIG_EXTCON_ADC_JACK=m # CONFIG_EXTCON_SM5502 is not set +# CONFIG_EXTCON_RT8973A is not set # MTD CONFIG_MTD_BLKDEVS=m @@ -126,9 +129,9 @@ CONFIG_GPIO_WATCHDOG=m CONFIG_GPIOLIB=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_MDIO_GPIO=m CONFIG_BACKLIGHT_GPIO=m CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y CONFIG_POWER_RESET_RESTART=y #i2c @@ -183,6 +186,8 @@ CONFIG_CMA_AREAS=7 # CONFIG_IRQ_DOMAIN_DEBUG is not set # CONFIG_LOCK_STAT is not set +# CONFIG_CADENCE_WATCHDOG is not set + # CONFIG_DRM_ARMADA is not set # CONFIG_DRM_TEGRA is not set # CONFIG_SHMOBILE_IOMMU is not set diff --git a/freed-ora/current/master/config-arm64 b/freed-ora/current/master/config-arm64 index 0310d91c9..a0db86323 100644 --- a/freed-ora/current/master/config-arm64 +++ b/freed-ora/current/master/config-arm64 @@ -8,16 +8,16 @@ CONFIG_SCHED_SMT=y # arm64 only SoCs CONFIG_ARCH_XGENE=y +# CONFIG_ARCH_THUNDER is not set # CONFIG_AMBA_PL08X is not set CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y CONFIG_ARCH_REQUIRE_GPIOLIB=y -# CONFIG_ARM64_64K_PAGES is not set -CONFIG_COMPAT=y +CONFIG_ARM64_64K_PAGES=y +# CONFIG_COMPAT is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 -CONFIG_BQL=y CONFIG_BRCMUTIL=m CONFIG_BUG=y CONFIG_CLKDEV_LOOKUP=y @@ -42,7 +42,6 @@ CONFIG_HZ=100 CONFIG_KVM=y CONFIG_KVM_ARM_MAX_VCPUS=8 -CONFIG_LOG_BUF_SHIFT=14 CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y @@ -53,7 +52,7 @@ CONFIG_NFS_USE_KERNEL_DNS=y # CONFIG_PL330_DMA is not set CONFIG_RCU_FANOUT=64 # CONFIG_RTC_DRV_PL030 is not set -# CONFIG_RTC_DRV_PL031 is not set +CONFIG_RTC_DRV_PL031=y CONFIG_SERIAL_8250_DMA=y # CONFIG_SERIAL_AMBA_PL010 is not set CONFIG_SPARSE_IRQ=y @@ -69,6 +68,7 @@ CONFIG_EFI_VARS=y CONFIG_EFIVAR_FS=y CONFIG_EFI_VARS_PSTORE=y CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y +CONFIG_RTC_DRV_EFI=y CONFIG_ARM64_CRYPTO=y CONFIG_CRYPTO_SHA1_ARM64_CE=m @@ -82,6 +82,7 @@ CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=m CONFIG_CRYPTO_DEV_CCP_CRYPTO=m +CONFIG_ARM64_CPUIDLE=y # APM Xgene CONFIG_POWER_RESET_XGENE=y @@ -91,13 +92,8 @@ CONFIG_AHCI_XGENE=y CONFIG_PHY_XGENE=y CONFIG_NET_XGENE=y CONFIG_RTC_DRV_XGENE=m -CONFIG_RTC_DRV_EFI=y - -# not arm64 -# CONFIG_GPIO_ADNP is not set -# CONFIG_GPIO_MCP23S08 is not set -# CONFIG_MDIO_BUS_MUX_GPIO is not set -# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +CONFIG_HW_RANDOM_XGENE=m +CONFIG_GPIO_XGENE=y # busted build for various reasons # uses pci_* for some reason to allocate DMA buffers @@ -120,7 +116,6 @@ CONFIG_NET_SB1000=y CONFIG_SBSAUART_TTY=y CONFIG_I2C_SCMI=m CONFIG_SENSORS_ACPI_POWER=m -CONFIG_IMX_THERMAL=m CONFIG_PWM_LPSS=m CONFIG_ACPI=y CONFIG_ACPI_PROCFS_POWER=y @@ -133,6 +128,15 @@ CONFIG_ACPI_CONTAINER=y CONFIG_ACPI_HED=m CONFIG_ACPI_CUSTOM_METHOD=m -CONFIG_AMD_XGBE=y -CONFIG_AMD_XGBE_PHY=y +CONFIG_AMD_XGBE=m +CONFIG_AMD_XGBE_PHY=m # CONFIG_AMD_XGBE_DCB is not set + +# CONFIG_IMX_THERMAL is not set + +# still? 2014-11-11 +# CONFIG_BPF_JIT is not set + +CONFIG_DMI=y +CONFIG_DMIID=y +CONFIG_DMI_SYSFS=y diff --git a/freed-ora/current/master/config-armv7 b/freed-ora/current/master/config-armv7 index 133a31064..652d2248f 100644 --- a/freed-ora/current/master/config-armv7 +++ b/freed-ora/current/master/config-armv7 @@ -65,6 +65,7 @@ CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=m CONFIG_USB_EHCI_HCD_ORION=m CONFIG_MMC_SDHCI_PXAV3=m CONFIG_MVPP2=m +CONFIG_COMMON_CLK_SI5351=m # CONFIG_CACHE_FEROCEON_L2 is not set # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set @@ -164,6 +165,7 @@ CONFIG_RTC_DRV_PALMAS=m CONFIG_OMAP5_DSS_HDMI=y CONFIG_OMAP5_DSS_HDMI_AUDIO=y CONFIG_COMMON_CLK_PALMAS=m +CONFIG_INPUT_PALMAS_PWRBUTTON=m CONFIG_WL_TI=y CONFIG_WLCORE_SDIO=m @@ -184,10 +186,9 @@ CONFIG_INPUT_TWL4030_VIBRA=m CONFIG_INPUT_TWL6040_VIBRA=m CONFIG_KEYBOARD_OMAP4=m CONFIG_KEYBOARD_TWL4030=m +CONFIG_LEDS_TCA6507=m -# OMAP thermal temp. Can likely be built as module but doesn't autoload so build in to ensure performance on PandaES -CONFIG_TI_SOC_THERMAL=y -CONFIG_TI_THERMAL=y +# OMAP thermal temp. CONFIG_OMAP4_THERMAL=y CONFIG_OMAP5_THERMAL=y @@ -249,9 +250,6 @@ CONFIG_VIDEO_OMAP3=m # The ones below are for TI Davinci # CONFIG_VIDEO_DM6446_CCDC is not set # CONFIG_VIDEO_DM355_CCDC is not set -# Also enable vivi driver - useful for testing a full kernelspace V4L2 driver -CONFIG_V4L_TEST_DRIVERS=y -CONFIG_VIDEO_VIVI=m CONFIG_SND_OMAP_SOC=m CONFIG_SND_SOC_I2C_AND_SPI=m @@ -267,6 +265,7 @@ CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m CONFIG_SND_OMAP_SOC_RX51=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TPA6130A2=m CONFIG_SND_SOC_TWL4030=m CONFIG_SND_SOC_TWL6040=m CONFIG_SND_SOC_PCM1792A=m @@ -321,10 +320,16 @@ CONFIG_ARCH_MSM8960=y CONFIG_ARCH_MSM8974=y CONFIG_SERIAL_MSM=y CONFIG_SERIAL_MSM_CONSOLE=y +CONFIG_SERIAL_MSM_HS=m CONFIG_PINCTRL_APQ8064=m +CONFIG_PINCTRL_APQ8084=m CONFIG_PINCTRL_IPQ8064=m CONFIG_PINCTRL_MSM8960=m +CONFIG_PINCTRL_MSM8X74=m CONFIG_COMMON_CLK_QCOM=m +CONFIG_MFD_QCOM_RPM=m +CONFIG_MFD_PM8921_CORE=m +CONFIG_REGULATOR_QCOM_RPM=m CONFIG_APQ_GCC_8084=m CONFIG_APQ_MMCC_8084=m CONFIG_IPQ_GCC_806X=m @@ -340,16 +345,24 @@ CONFIG_GPIO_MSM_V2=m CONFIG_POWER_RESET_MSM=y CONFIG_USB_MSM_OTG=m CONFIG_MMC_SDHCI_MSM=m +CONFIG_MMC_QCOM_DML=m CONFIG_QCOM_BAM_DMA=m CONFIG_QCOM_GSBI=m CONFIG_PHY_QCOM_APQ8064_SATA=m CONFIG_PHY_QCOM_IPQ806X_SATA=m +CONFIG_USB_DWC3_QCOM=m CONFIG_CRYPTO_DEV_QCE=m CONFIG_MSM_IOMMU=y CONFIG_DRM_MSM=m CONFIG_DRM_MSM_FBDEV=y CONFIG_USB_EHCI_MSM=m +CONFIG_MFD_PM8XXX=m +CONFIG_KEYBOARD_PMIC8XXX=m +CONFIG_INPUT_PM8XXX_VIBRATOR=m +CONFIG_INPUT_PMIC8XXX_PWRKEY=m +CONFIG_RTC_DRV_PM8XXX=m # CONFIG_DRM_MSM_REGISTER_LOGGING is not set +CONFIG_QCOM_WDT=m # i.MX # CONFIG_MXC_DEBUG_BOARD is not set @@ -400,6 +413,7 @@ CONFIG_RTC_DRV_SNVS=m # CONFIG_FB_IMX is not set CONFIG_SND_IMX_SOC=m +CONFIG_SND_SOC_FSL_ASOC_CARD=m CONFIG_SND_SOC_FSL_ASRC=m CONFIG_SND_SOC_FSL_ESAI=m CONFIG_SND_SOC_FSL_SAI=m @@ -408,14 +422,21 @@ CONFIG_SND_SOC_FSL_SSI=m CONFIG_SND_SOC_FSL_UTILS=m CONFIG_SND_SOC_IMX_SSI=m CONFIG_SND_SOC_IMX_AUDMUX=m +CONFIG_SND_SOC_IMX_ES8328=m CONFIG_SND_SOC_IMX_PCM_FIQ=m CONFIG_SND_SOC_IMX_PCM_DMA=m CONFIG_SND_SOC_IMX_SGTL5000=m CONFIG_SND_SOC_IMX_WM8962=m CONFIG_SND_SOC_IMX_MC13783=m CONFIG_SND_SOC_IMX_SPDIF=m +CONFIG_SND_SOC_CS42XX8_I2C=m +CONFIG_SND_SOC_ES8328=m +CONFIG_SND_SOC_ES8328_I2C=m +CONFIG_SND_SOC_ES8328_SPI=m CONFIG_SND_SOC_EUKREA_TLV320=m +CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_WM8731=m +CONFIG_SND_SOC_WM8962=m CONFIG_USB_IMX21_HCD=m CONFIG_USB_MXS_PHY=m @@ -480,12 +501,26 @@ CONFIG_REGULATOR_DA9055=m CONFIG_ARCH_EXYNOS4=y CONFIG_SOC_EXYNOS4212=y CONFIG_SOC_EXYNOS4412=y +CONFIG_ARM_EXYNOS4210_CPUFREQ=y +CONFIG_ARM_EXYNOS4X12_CPUFREQ=y +CONFIG_AK8975=m +CONFIG_CM36651=m +CONFIG_KEYBOARD_SAMSUNG=m # Rockchips CONFIG_I2C_RK3X=m CONFIG_SPI_ROCKCHIP=m CONFIG_SND_SOC_ROCKCHIP=m CONFIG_PWM_ROCKCHIP=m +CONFIG_ROCKCHIP_SARADC=m +CONFIG_ROCKCHIP_IODOMAIN=m +CONFIG_MMC_DW_ROCKCHIP=m +CONFIG_EMAC_ROCKCHIP=m +CONFIG_MFD_RK808=m +CONFIG_COMMON_CLK_RK808=m +CONFIG_REGULATOR_RK808=m +CONFIG_RTC_DRV_HYM8563=m +CONFIG_ROCKCHIP_SARADC=m # ST Ericsson CONFIG_MACH_HREFV60=y @@ -508,6 +543,8 @@ CONFIG_AHCI_ST=m CONFIG_INPUT_AB8500_PONKEY=m CONFIG_REGULATOR_AB8500=y CONFIG_AB8500_USB=m +CONFIG_USB_MUSB_UX500=m +CONFIG_USB_UX500_DMA=y CONFIG_RTC_DRV_AB8500=m CONFIG_PWM_AB8500=m CONFIG_SND_SOC_UX500=m @@ -572,19 +609,18 @@ CONFIG_RTC_DRV_TPS6586X=m CONFIG_SERIO_OLPC_APSP=m # Zynq-7xxx -# likely needs usb still CONFIG_SERIAL_UARTLITE=y CONFIG_SERIAL_UARTLITE_CONSOLE=y CONFIG_SERIAL_XILINX_PS_UART=y CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y CONFIG_COMMON_CLK_AXI_CLKGEN=m +CONFIG_COMMON_CLK_SI570=m CONFIG_ARM_ZYNQ_CPUIDLE=y CONFIG_LATTICE_ECP3_CONFIG=m CONFIG_NET_VENDOR_XILINX=y CONFIG_XILINX_EMACLITE=m CONFIG_GPIO_XILINX=y -# Broken -# CONFIG_GPIO_ZYNQ is not set +CONFIG_GPIO_ZYNQ=m CONFIG_I2C_XILINX=m CONFIG_SPI_XILINX=m CONFIG_SPI_CADENCE=m @@ -600,6 +636,10 @@ CONFIG_XILLYBUS=m CONFIG_XILLYBUS_PCIE=m CONFIG_XILLYBUS_OF=m CONFIG_GS_FPGABOOT=m +CONFIG_USB_GADGET_XILINX=m +CONFIG_PCIE_XILINX=y +CONFIG_CADENCE_WATCHDOG=m +CONFIG_REGULATOR_ISL9305=m # Multi function devices CONFIG_MFD_88PM800=m diff --git a/freed-ora/current/master/config-armv7-generic b/freed-ora/current/master/config-armv7-generic index 4a96a546a..5a90b29b3 100644 --- a/freed-ora/current/master/config-armv7-generic +++ b/freed-ora/current/master/config-armv7-generic @@ -61,6 +61,7 @@ CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y # CONFIG_ARCH_HI3xxx is not set # CONFIG_ARCH_HISI is not set # CONFIG_ARCH_MEDIATEK is not set +# CONFIG_ARCH_MESON is not set # CONFIG_ARCH_QCOM is not set # CONFIG_ARCH_S5PV210 is not set # CONFIG_ARCH_SHMOBILE_MULTI is not set @@ -112,11 +113,17 @@ CONFIG_SCHED_SMT=y CONFIG_RCU_FANOUT=32 +# Power management / thermal / cpu scaling CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set +CONFIG_PM_OPP=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_PSCI=y +CONFIG_THERMAL=y +CONFIG_CPUFREQ_DT=y # CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 @@ -189,6 +196,7 @@ CONFIG_REGULATOR_AXP20X=m CONFIG_IR_SUNXI=m CONFIG_MDIO_SUN4I=m CONFIG_SUN4I_EMAC=m +CONFIG_RTC_DRV_SUN6I=m # Exynos CONFIG_ARCH_EXYNOS3=y @@ -203,8 +211,6 @@ CONFIG_SOC_EXYNOS5410=y CONFIG_SOC_EXYNOS5800=y CONFIG_SERIAL_SAMSUNG=y CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_ARM_EXYNOS4210_CPUFREQ=y -CONFIG_ARM_EXYNOS4X12_CPUFREQ=y CONFIG_ARM_EXYNOS5250_CPUFREQ=y CONFIG_ARM_EXYNOS5440_CPUFREQ=y CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW=y @@ -216,6 +222,7 @@ CONFIG_I2C_S3C2410=m CONFIG_SPI_S3C64XX=m CONFIG_EXYNOS_THERMAL=m CONFIG_EXYNOS_THERMAL_CORE=y +CONFIG_EXYNOS_ADC=m CONFIG_MMC_SDHCI_S3C=m CONFIG_MMC_SDHCI_S3C_DMA=y CONFIG_MMC_DW_EXYNOS=m @@ -235,6 +242,9 @@ CONFIG_REGULATOR_S2MPS11=m CONFIG_REGULATOR_S5M8767=m CONFIG_TCG_TIS_I2C_INFINEON=m CONFIG_RTC_DRV_S5M=m +CONFIG_MFD_WM8994=m +CONFIG_GPIO_WM8994=m +CONFIG_REGULATOR_WM8994=m # CONFIG_RTC_DRV_S3C is not set CONFIG_EXYNOS_VIDEO=y @@ -255,7 +265,14 @@ CONFIG_DRM_EXYNOS_ROTATOR=y CONFIG_DRM_EXYNOS_VIDI=y CONFIG_PHY_EXYNOS_DP_VIDEO=m # CONFIG_FB_S3C is not set -# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set +CONFIG_PHY_EXYNOS_MIPI_VIDEO=m +CONFIG_PHY_EXYNOS_DP_VIDEO=m +CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS=y +CONFIG_VIDEO_EXYNOS_FIMC_LITE=m +CONFIG_VIDEO_EXYNOS4_FIMC_IS=m +CONFIG_VIDEO_EXYNOS4_ISP_DMA_CAPTURE=y +CONFIG_VIDEO_S5P_FIMC=m +CONFIG_VIDEO_S5P_MIPI_CSIS=m CONFIG_VIDEO_SAMSUNG_S5P_G2D=m CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m CONFIG_VIDEO_SAMSUNG_S5P_MFC=m @@ -268,11 +285,10 @@ CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=m CONFIG_SND_SOC_SMDK_WM8994_PCM=m CONFIG_SND_SOC_SNOW=m CONFIG_SND_SOC_ODROIDX2=m -# CONFIG_GPIO_WM8994 is not set -# CONFIG_REGULATOR_WM8994 is not set # CONFIG_EXYNOS_IOMMU_DEBUG is not set # CONFIG_SAMSUNG_PM_DEBUG is not set # CONFIG_SAMSUNG_PM_CHECK is not set +# CONFIG_ARM_EXYNOS5_BUS_DEVFREQ is not set # Arndale/Origen CONFIG_MFD_MAX8997=y @@ -282,12 +298,15 @@ CONFIG_REGULATOR_MAX77686=m CONFIG_REGULATOR_S2MPA01=m CONFIG_REGULATOR_S5M8767=m CONFIG_COMMON_CLK_MAX77686=m +CONFIG_COMMON_CLK_MAX77802=m CONFIG_COMMON_CLK_S2MPS11=m CONFIG_INPUT_MAX8997_HAPTIC=m CONFIG_CHARGER_MAX8997=m CONFIG_LEDS_MAX8997=m CONFIG_RTC_DRV_MAX8997=m CONFIG_RTC_DRV_MAX77686=m +CONFIG_RTC_DRV_MAX77802=m +CONFIG_RTC_DRV_RK808=m CONFIG_EXTCON_MAX8997=m # Tegra @@ -334,6 +353,10 @@ CONFIG_MFD_AS3722=y CONFIG_REGULATOR_AS3722=m CONFIG_RTC_DRV_AS3722=y +# TI Generic +CONFIG_TI_SOC_THERMAL=m +CONFIG_TI_THERMAL=y + # DRM panels CONFIG_DRM_PANEL=y CONFIG_DRM_PANEL_SIMPLE=m @@ -351,12 +374,10 @@ CONFIG_REGMAP_IRQ=y # Power management CONFIG_PM_OPP=y CONFIG_ARM_CPU_SUSPEND=y -CONFIG_GENERIC_CPUFREQ_CPU0=m # usb CONFIG_USB_OHCI_HCD_PLATFORM=m CONFIG_USB_EHCI_HCD_PLATFORM=m -# CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set CONFIG_USB_ULPI=y CONFIG_AX88796=m @@ -367,6 +388,7 @@ CONFIG_USB_OTG=y CONFIG_USB_GADGET=m CONFIG_USB_GADGET_VBUS_DRAW=100 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 +# CONFIG_USB_GADGET_XILINX is not set CONFIG_USB_MUSB_HDRC=m CONFIG_USB_MUSB_DUAL_ROLE=y CONFIG_USB_MUSB_DSPS=m @@ -436,20 +458,20 @@ CONFIG_GENERIC_PINCONF=y # CONFIG_PINCTRL_MSM8X74 is not set # CONFIG_PINCTRL_BCM281XX is not set # CONFIG_PINCTRL_APQ8064 is not set +# CONFIG_PINCTRL_APQ8084 is not set # CONFIG_PINCTRL_IPQ8064 is not set # CONFIG_PINCTRL_MSM8960 is not set # GPIO # CONFIG_GPIO_EM is not set CONFIG_GPIO_74X164=m -CONFIG_GPIO_ADNP=m -CONFIG_GPIO_MCP23S08=m CONFIG_GPIO_MAX7301=m CONFIG_GPIO_MC33880=m CONFIG_GPIO_TPS65910=y CONFIG_GPIO_TPS65912=m # CONFIG_GPIO_ZEVIO is not set CONFIG_LEDS_GPIO=m +CONFIG_LEDS_GPIO_REGISTER=y CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_BUS_MUX_GPIO=m CONFIG_MDIO_BUS_MUX_MMIOREG=m @@ -458,6 +480,7 @@ CONFIG_INPUT_GPIO_BEEPER=m CONFIG_INPUT_GPIO_TILT_POLLED=m CONFIG_INPUT_MATRIXKMAP=m CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_GPIO_POLLED=m CONFIG_KEYBOARD_MATRIX=m # CONFIG_GPIO_RCAR is not set CONFIG_W1_MASTER_GPIO=m @@ -504,10 +527,6 @@ CONFIG_EDAC_LEGACY_SYSFS=y # Watchdog -# Thermal / powersaving -CONFIG_THERMAL=y -CONFIG_ARM_PSCI=y - # Mailbox CONFIG_MAILBOX=y @@ -532,6 +551,7 @@ CONFIG_MTD_NAND_PXA3xx=m CONFIG_MTD_NAND_RICOH=m CONFIG_MTD_NAND_TMIO=m CONFIG_MTD_SPI_NOR=m +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set CONFIG_MTD_SPINAND_MT29F=m CONFIG_MTD_SPINAND_ONDIEECC=y CONFIG_MTD_SST25L=m @@ -550,6 +570,8 @@ CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DW_PCI=m # CONFIG_MMC_DW_IDMAC is not set # CONFIG_MMC_DW_K3 is not set +# CONFIG_MMC_QCOM_DML is not set +# CONFIG_MMC_DW_ROCKCHIP is not set CONFIG_USB_DWC2=y CONFIG_USB_DWC2_HOST=m CONFIG_USB_DWC2_PLATFORM=y @@ -562,6 +584,7 @@ CONFIG_USB_DWC3_OMAP=m CONFIG_USB_DWC3_PCI=m # CONFIG_USB_DWC3_DEBUG is not set # CONFIG_USB_DWC3_KEYSTONE is not set +# CONFIG_USB_DWC3_QCOM is not set # CONFIG_DWC3_HOST_USB3_LPM_ENABLE is not set CONFIG_DW_WATCHDOG=m CONFIG_PCIE_DW=y @@ -624,10 +647,18 @@ CONFIG_SND_SOC_SPDIF=m # CONFIG_SND_SOC_ALC5623 is not set # CONFIG_SND_SOC_CS42L56 is not set # CONFIG_SND_SOC_STA350 is not set +# CONFIG_SND_SOC_CS35L32 is not set +# CONFIG_SND_SOC_ES8328 is not set +# CONFIG_SND_SOC_SSM2602_SPI is not set +# CONFIG_SND_SOC_SSM2602_I2C is not set +# CONFIG_SND_SOC_SSM4567 is not set +# CONFIG_SND_SOC_WM8978 is not set # CONFIG_SND_ATMEL_SOC is not set # CONFIG_SND_SOC_TLV320AIC31XX is not set # CONFIG_SND_SOC_TAS2552 is not set # CONFIG_SND_SOC_CS4265 is not set +# CONFIG_SND_SOC_IMX_ES8328 is not set +# CONFIG_SND_SOC_FSL_ASOC_CARD is not set # CONFIG_SND_EDMA_SOC is not set # CONFIG_SND_SOC_ROCKCHIP is not set @@ -688,7 +719,11 @@ CONFIG_REGULATOR_TPS80031=m CONFIG_REGULATOR_LTC3589=m CONFIG_REGULATOR_ANATOP=m CONFIG_REGULATOR_DA9211=m +CONFIG_REGULATOR_ISL9305=m +CONFIG_REGULATOR_MAX77802=m +CONFIG_REGULATOR_PWM=m +CONFIG_POWER_AVS=y CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_BQ2415X=m CONFIG_CHARGER_BQ24190=m @@ -697,6 +732,7 @@ CONFIG_CHARGER_GPIO=m CONFIG_CHARGER_TPS65090=m CONFIG_PDA_POWER=m CONFIG_GENERIC_ADC_BATTERY=m +CONFIG_BATTERY_SBS=m # Sensors CONFIG_TMP006=m @@ -708,6 +744,8 @@ CONFIG_SENSORS_ADCXX=m CONFIG_SENSORS_ADS7871=m CONFIG_SENSORS_GPIO_FAN=m CONFIG_SENSORS_HTU21=m +CONFIG_SENSORS_ISL29018=m +CONFIG_SENSORS_ISL29028=m CONFIG_SENSORS_LIS3_SPI=m CONFIG_SENSORS_LM70=m CONFIG_SENSORS_MAX1111=m @@ -736,8 +774,10 @@ CONFIG_TOUCHSCREEN_AD7877=m CONFIG_TOUCHSCREEN_MC13783=m CONFIG_TOUCHSCREEN_TSC2005=m +CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_DAC124S085=m CONFIG_LEDS_PWM=m +CONFIG_LEDS_SYSCON=y CONFIG_BMP085_SPI=m CONFIG_SRAM=y @@ -785,9 +825,6 @@ CONFIG_MFD_CROS_EC_SPI=m CONFIG_KEYBOARD_CROS_EC=m CONFIG_I2C_CROS_EC_TUNNEL=m -# Should be in generic -CONFIG_BPF_JIT=y - # Needs work/investigation # CONFIG_ARM_KPROBES_TEST is not set diff --git a/freed-ora/current/master/config-armv7-lpae b/freed-ora/current/master/config-armv7-lpae index 661ce3685..b08f4daa1 100644 --- a/freed-ora/current/master/config-armv7-lpae +++ b/freed-ora/current/master/config-armv7-lpae @@ -62,7 +62,8 @@ CONFIG_POWER_RESET_KEYSTONE=y CONFIG_DAVINCI_WATCHDOG=m CONFIG_SPI_DAVINCI=m CONFIG_TI_DAVINCI_MDIO=m -# CONFIG_TI_SOC_THERMAL is not set +CONFIG_KEYSTONE_IRQ=m +CONFIG_PCI_KEYSTONE=y # Tegra (non A15 device options) # CONFIG_ARCH_TEGRA_2x_SOC is not set diff --git a/freed-ora/current/master/config-generic b/freed-ora/current/master/config-generic index 10e94b81f..82e5bc0b4 100644 --- a/freed-ora/current/master/config-generic +++ b/freed-ora/current/master/config-generic @@ -21,7 +21,7 @@ CONFIG_DEVTMPFS_MOUNT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_BUILD_DOCSRC=y +# CONFIG_BUILD_DOCSRC is not set # # General setup @@ -391,6 +391,7 @@ CONFIG_VHOST_SCSI=m # SCSI device support # CONFIG_SCSI=y +# CONFIG_SCSI_MQ_DEFAULT is not set CONFIG_SCSI_ENCLOSURE=m CONFIG_SCSI_PROC_FS=y @@ -705,11 +706,11 @@ CONFIG_FIREWIRE_NOSY=m # CONFIG_NET=y -CONFIG_NET_DMA=y - CONFIG_NETLINK_MMAP=y CONFIG_NETLINK_DIAG=m +CONFIG_BPF_JIT=y + CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_BIC=m CONFIG_TCP_CONG_CUBIC=y @@ -717,6 +718,7 @@ CONFIG_TCP_CONG_HTCP=m CONFIG_TCP_CONG_HSTCP=m CONFIG_TCP_CONG_HYBLA=m CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_TCP_CONG_DCTCP=m CONFIG_TCP_CONG_LP=m CONFIG_TCP_CONG_SCALABLE=m CONFIG_TCP_CONG_VEGAS=m @@ -758,6 +760,8 @@ CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y CONFIG_SYN_COOKIES=y CONFIG_NET_IPVTI=m +CONFIG_NET_FOU=m +CONFIG_GENEVE=m CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m @@ -776,6 +780,7 @@ CONFIG_IP_VS_PROTO_UDP=y CONFIG_IP_VS_PROTO_ESP=y CONFIG_IP_VS_PROTO_AH=y CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_FO=m CONFIG_IP_VS_IPV6=y CONFIG_IP_VS_RR=m CONFIG_IP_VS_WRR=m @@ -1017,12 +1022,16 @@ CONFIG_NFT_HASH=m CONFIG_NFT_COUNTER=m CONFIG_NFT_LOG=m CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_MASQ_IPV4=m +CONFIG_NFT_MASQ_IPV6=m CONFIG_NFT_NAT=m CONFIG_NFT_QUEUE=m CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m CONFIG_NF_TABLES_IPV4=m +CONFIG_NF_REJECT_IPV6=m CONFIG_NFT_REJECT_IPV4=m CONFIG_NFT_CHAIN_ROUTE_IPV4=m CONFIG_NFT_CHAIN_NAT_IPV4=m @@ -1082,6 +1091,7 @@ CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_MAC=m CONFIG_IP_SET_HASH_NETPORTNET=m CONFIG_IP_SET_HASH_NET=m CONFIG_IP_SET_HASH_NETNET=m @@ -1154,7 +1164,7 @@ CONFIG_NET_SCH_MULTIQ=m CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m -CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=y CONFIG_NET_SCH_FQ=m CONFIG_NET_SCH_HHF=m CONFIG_NET_SCH_PIE=m @@ -1207,6 +1217,7 @@ CONFIG_BATMAN_ADV_MCAST=y CONFIG_OPENVSWITCH=m CONFIG_OPENVSWITCH_GRE=y CONFIG_OPENVSWITCH_VXLAN=y +CONFIG_OPENVSWITCH_GENEVE=y CONFIG_VSOCKETS=m @@ -1306,6 +1317,8 @@ CONFIG_ETHERNET=y CONFIG_NET_VENDOR_ADAPTEC=y CONFIG_ADAPTEC_STARFIRE=m +# CONFIG_NET_VENDOR_AGERE is not set + CONFIG_NET_VENDOR_ALTEON=y CONFIG_ACENIC=m # CONFIG_ACENIC_OMIT_TIGON_I is not set @@ -1321,6 +1334,7 @@ CONFIG_PCMCIA_NMCLAN=m CONFIG_NET_VENDOR_ARC=y CONFIG_ARC_EMAC=m +# CONFIG_EMAC_ROCKCHIP is not set CONFIG_NET_VENDOR_ATHEROS=y CONFIG_ALX=m @@ -1401,8 +1415,9 @@ CONFIG_IXGBE_HWMON=y CONFIG_I40E=m # CONFIG_I40E_VXLAN is not set # CONFIG_I40E_DCB is not set -# CONFIG_I40EVF is not set - +CONFIG_I40EVF=m +CONFIG_FM10K=m +# CONFIG_FM10K_VXLAN is not set # CONFIG_NET_VENDOR_I825XX is not set CONFIG_NET_VENDOR_MARVELL=y @@ -1454,6 +1469,8 @@ CONFIG_QLCNIC_HWMON=y CONFIG_QLGE=m CONFIG_NETXEN_NIC=m +# CONFIG_NET_VENDOR_QUALCOMM is not set + CONFIG_NET_VENDOR_REALTEK=y CONFIG_ATP=m CONFIG_8139CP=m @@ -1526,6 +1543,7 @@ CONFIG_DAVICOM_PHY=m CONFIG_DP83640_PHY=m CONFIG_FIXED_PHY=y CONFIG_MDIO_BITBANG=m +CONFIG_MDIO_BCM_UNIMAC=m CONFIG_NATIONAL_PHY=m CONFIG_ICPLUS_PHY=m CONFIG_BCM63XX_PHY=m @@ -1652,11 +1670,14 @@ CONFIG_ATH9K_BTCOEX_SUPPORT=y # CONFIG_ATH9K_HTC_DEBUGFS is not set # CONFIG_ATH9K_STATION_STATISTICS is not set # CONFIG_ATH9K_WOW is not set +# CONFIG_ATH9K_DYNACK is not set +# CONFIG_ATH9K_CHANNEL_CONTEXT is not set # CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m # CONFIG_ATH10K_DEBUG is not set # CONFIG_ATH10K_TRACING is not set +# CONFIG_ATH_TRACEPOINTS is not set CONFIG_ATH10K_DEBUGFS=y CONFIG_WCN36XX=m # CONFIG_WCN36XX_DEBUGFS is not set @@ -1680,7 +1701,7 @@ CONFIG_B43_BCMA_PIO=y CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y -# CONFIG_B43_PHY_G is not set +CONFIG_B43_PHY_G=y CONFIG_B43LEGACY=m # CONFIG_B43LEGACY_DEBUG is not set CONFIG_B43LEGACY_DMA=y @@ -1723,12 +1744,15 @@ CONFIG_LIBERTAS_SDIO=m # CONFIG_LIBERTAS_THINFIRM is not set # CONFIG_LIBERTAS_SPI is not set CONFIG_LIBERTAS_MESH=y + CONFIG_IWLWIFI=m CONFIG_IWLDVM=m CONFIG_IWLMVM=m # CONFIG_IWLWIFI_BCAST_FILTERING is not set +# CONFIG_IWLWIFI_UAPSD is not set CONFIG_IWLWIFI_DEBUG=y CONFIG_IWLWIFI_DEBUGFS=y + CONFIG_IWLEGACY=m CONFIG_IWLEGACY_DEBUG=y CONFIG_IWLEGACY_DEBUGFS=y @@ -1736,6 +1760,7 @@ CONFIG_IWL4965=y CONFIG_IWL3945=m # CONFIG_IWM is not set # CONFIG_IWLWIFI_DEBUG_EXPERIMENTAL_UCODE is not set + CONFIG_MAC80211_HWSIM=m CONFIG_P54_COMMON=m CONFIG_P54_USB=m @@ -1792,9 +1817,11 @@ CONFIG_RTL8192CE=m CONFIG_RTL8192SE=m CONFIG_RTL8192CU=m CONFIG_RTL8192DE=m +CONFIG_RTL8192EE=m CONFIG_RTL8723AE=m CONFIG_RTL8723BE=m CONFIG_RTL8188EE=m +CONFIG_RTL8821AE=m CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m @@ -2118,6 +2145,8 @@ CONFIG_INPUT_SPARSEKMAP=m CONFIG_INPUT_CMA3000=m CONFIG_INPUT_CMA3000_I2C=m CONFIG_INPUT_IDEAPAD_SLIDEBAR=m +# CONFIG_INPUT_DRV260X_HAPTICS is not set +# CONFIG_INPUT_DRV2667_HAPTICS is not set # # Input I/O drivers @@ -2259,6 +2288,7 @@ CONFIG_TOUCHSCREEN_ZFORCE=m # CONFIG_TOUCHSCREEN_ADS7846 is not set # CONFIG_TOUCHSCREEN_AD7877 is not set # CONFIG_TOUCHSCREEN_TSC2005 is not set +# CONFIG_TOUCHSCREEN_AR1021_I2C is not set CONFIG_INPUT_MISC=y CONFIG_INPUT_PCSPKR=m @@ -2617,8 +2647,10 @@ CONFIG_HID_SENSOR_IIO_TRIGGER=m # CONFIG_AD5380 is not set # CONFIG_AD5064 is not set # CONFIG_BMA180 is not set +# CONFIG_BMC150_ACCEL is not set # CONFIG_MAX1363 is not set # CONFIG_MAX517 is not set +# CONFIG_MAX5821 is not set # CONFIG_MCP4725 is not set # CONFIG_ITG3200 is not set # CONFIG_APDS9300 is not set @@ -2632,10 +2664,9 @@ CONFIG_HID_SENSOR_IIO_TRIGGER=m # CONFIG_TSL4531 is not set # CONFIG_NAU7802 is not set # CONFIG_TI_ADC081C is not set -# CONFIG_EXYNOS_ADC is not set +# CONFIG_TI_ADC128S052 is not set # CONFIG_VIPERBOARD_ADC is not set # CONFIG_VF610_ADC is not set -# CONFIG_XILINX_XADC is not set # CONFIG_INV_MPU6050_IIO is not set CONFIG_IIO_ST_GYRO_3AXIS=m CONFIG_IIO_ST_MAGN_3AXIS=m @@ -2643,6 +2674,7 @@ CONFIG_IIO_ST_ACCEL_3AXIS=m CONFIG_HID_SENSOR_INCLINOMETER_3D=m CONFIG_HID_SENSOR_DEVICE_ROTATION=m # CONFIG_ADJD_S311 is not set +# CONFIG_AL3320A is not set # CONFIG_SENSORS_TSL2563 is not set # CONFIG_SENSORS_HMC5843_I2C is not set # CONFIG_VCNL4000 is not set @@ -2681,6 +2713,7 @@ CONFIG_HID_SENSOR_DEVICE_ROTATION=m # CONFIG_ADIS16136 is not set # CONFIG_ADIS16260 is not set # CONFIG_ADXRS450 is not set +# CONFIG_BMG160 is not set # CONFIG_ADIS16400 is not set # CONFIG_ADIS16480 is not set # CONFIG_DHT11 is not set @@ -2688,7 +2721,7 @@ CONFIG_HID_SENSOR_DEVICE_ROTATION=m # CONFIG_MPL115 is not set # CONFIG_SI7005 is not set # CONFIG_AS3935 is not set -# CONFIG_KXCJK1013 is not set +CONFIG_KXCJK1013=m # CONFIG_ISL29125 is not set # CONFIG_TCS3414 is not set # CONFIG_AK09911 is not set @@ -2724,13 +2757,8 @@ CONFIG_HID_SENSOR_DEVICE_ROTATION=m # CONFIG_AD7816 is not set # CONFIG_AD7192 is not set # CONFIG_AD7280 is not set -# CONFIG_AD5930 is not set # CONFIG_AD9832 is not set # CONFIG_AD9834 is not set -# CONFIG_AD9850 is not set -# CONFIG_AD9852 is not set -# CONFIG_AD9910 is not set -# CONFIG_AD9951 is not set # CONFIG_ADIS16060 is not set # CONFIG_ADE7753 is not set # CONFIG_ADE7754 is not set @@ -2859,6 +2887,7 @@ CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_DS1374=m # CONFIG_RTC_DRV_EP93XX is not set CONFIG_RTC_DRV_FM3130=m +# CONFIG_RTC_DRV_HYM8563 is not set CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_M41T80=m CONFIG_RTC_DRV_M41T80_WDT=y @@ -2870,6 +2899,7 @@ CONFIG_RTC_DRV_PCF8563=m CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_SA1100 is not set +# CONFIG_RTC_DRV_SNVS is not set # CONFIG_RTC_DRV_TEST is not set CONFIG_RTC_DRV_X1205=m CONFIG_RTC_DRV_PCF8523=m @@ -3077,6 +3107,8 @@ CONFIG_VIDEO_TM6000_DVB=m CONFIG_VIDEO_TLG2300=m # CONFIG_VIDEO_TIMBERDALE is not set # CONFIG_VIDEO_M5MOLS is not set +# CONFIG_VIDEO_TW68 is not set +# CONFIG_VIDEO_VIVID is not set # CONFIG_EXYNOS_VIDEO is not set CONFIG_VIDEO_USBTV=m # CONFIG_VIDEO_AU0828_RC is not set @@ -3117,6 +3149,7 @@ CONFIG_DVB_DYNAMIC_MINORS=y CONFIG_DVB_BT8XX=m CONFIG_DVB_BUDGET_CORE=m CONFIG_DVB_PLUTO2=m +# CONFIG_DVB_PT3 is not set CONFIG_SMS_SIANO_MDTV=m CONFIG_SMS_SIANO_RC=y # CONFIG_SMS_SIANO_DEBUGFS is not set @@ -3184,6 +3217,7 @@ CONFIG_DVB_USB_AZ6007=m CONFIG_DVB_USB_LME2510=m CONFIG_DVB_USB_RTL28XXU=m CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_DVBSKY=m CONFIG_DVB_PT1=m @@ -3229,6 +3263,7 @@ CONFIG_IR_IGUANA=m CONFIG_IR_TTUSBIR=m CONFIG_IR_GPIO_CIR=m CONFIG_IR_XMP_DECODER=m +CONFIG_IR_HIX5HD2=m CONFIG_V4L_MEM2MEM_DRIVERS=y # CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set @@ -3500,7 +3535,7 @@ CONFIG_SND_FIREWIRE_SPEAKERS=m CONFIG_SND_ISIGHT=m CONFIG_SND_SCS1X=m CONFIG_SND_DICE=m -# CONFIG_SND_FIREWORKS is not set +CONFIG_SND_FIREWORKS=m # CONFIG_SND_BEBOB is not set # @@ -3620,6 +3655,7 @@ CONFIG_HID_ICADE=m CONFIG_HID_TWINHAN=m CONFIG_HID_ORTEK=m CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PENMOUNT=m CONFIG_HID_PETALYNX=m CONFIG_HID_PICOLCD=m CONFIG_HID_RMI=m @@ -3734,6 +3770,7 @@ CONFIG_USB_S2255=m # CONFIG_VIDEO_SH_MOBILE_CSI2 is not set CONFIG_USB_ZR364XX=m # CONFIG_SOC_CAMERA is not set +# CONFIG_SOC_TI is not set # # USB Network adaptors @@ -3838,7 +3875,6 @@ CONFIG_USB_SERIAL_MCT_U232=m CONFIG_USB_SERIAL_MOS7720=m CONFIG_USB_SERIAL_MOS7715_PARPORT=y # CONFIG_USB_SERIAL_WISHBONE is not set -# CONFIG_USB_SERIAL_ZTE is not set CONFIG_USB_SERIAL_MOS7840=m # CONFIG_USB_SERIAL_MXUPORT is not set CONFIG_USB_SERIAL_NAVMAN=m @@ -3882,14 +3918,10 @@ CONFIG_USB_PHY=y # CONFIG_USB_OTG_FSM is not set # CONFIG_GENERIC_PHY is not set -# CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set -# CONFIG_PHY_EXYNOS_DP_VIDEO is not set # CONFIG_PHY_ST_SPEAR1310_MIPHY is not set # CONFIG_PHY_ST_SPEAR1340_MIPHY is not set # CONFIG_AM335X_PHY_USB is not set # CONFIG_SAMSUNG_USBPHY is not set -# CONFIG_SAMSUNG_USB2PHY is not set -# CONFIG_SAMSUNG_USB3PHY is not set # CONFIG_BCM_KONA_USB2_PHY is not set # CONFIG_USB_RCAR_PHY is not set CONFIG_USB_ATM=m @@ -3937,6 +3969,8 @@ CONFIG_USB_XUSBATM=m # CONFIG_USB_DWC2 is not set # CONFIG_USB_ISP1301 is not set # CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +CONFIG_USB_LED_TRIG=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y @@ -4014,6 +4048,10 @@ CONFIG_MFD_VIPERBOARD=m # CONFIG_MFD_TPS65912_SPI is not set # CONFIG_MFD_MC13XXX_SPI is not set # CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_MENF21BMC is not set +# CONFIG_MFD_HI6421_PMIC is not set +# CONFIG_MFD_RK808 is not set +# CONFIG_MFD_RN5T618 is not set # CONFIG_EZX_PCAP is not set # CONFIG_INTEL_SOC_PMIC is not set @@ -4149,6 +4187,7 @@ CONFIG_9P_FSCACHE=y CONFIG_9P_FS_POSIX_ACL=y CONFIG_9P_FS_SECURITY=y CONFIG_FUSE_FS=m +CONFIG_OVERLAY_FS=m # CONFIG_OMFS_FS is not set CONFIG_CUSE=m # CONFIG_F2FS_FS is not set @@ -4447,6 +4486,7 @@ CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_BLKCIPHER=y # CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_MCRYPTD is not set CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_ANUBIS=m @@ -4625,6 +4665,7 @@ CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_GOV_FAIR_SHARE=y # CONFIG_THERMAL_GOV_USER_SPACE is not set CONFIG_THERMAL_GOV_STEP_WISE=y +# CONFIG_THERMAL_GOV_BANG_BANG is not set # CONFIG_THERMAL_EMULATION is not set # CONFIG_THERMAL_OF is not set # CONFIG_CPU_THERMAL is not set @@ -4721,6 +4762,7 @@ CONFIG_LEDS_DELL_NETBOOKS=m # CONFIG_LEDS_PWM is not set # CONFIG_LEDS_LP8501 is not set # CONFIG_LEDS_PCA963X is not set +# CONFIG_LEDS_SYSCON is not set CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_ONESHOT=m @@ -4793,6 +4835,7 @@ CONFIG_OPTPROBES=y CONFIG_HZ_1000=y CONFIG_NO_HZ=y +# CONFIG_SCHED_STACK_END_CHECK is not set CONFIG_TIMER_STATS=y CONFIG_HIGH_RES_TIMERS=y CONFIG_PERF_EVENTS=y @@ -4833,6 +4876,8 @@ CONFIG_APM_POWER=m # CONFIG_CHARGER_BQ24190 is not set # CONFIG_CHARGER_BQ24735 is not set CONFIG_POWER_RESET=y +# CONFIG_POWER_RESET_LTC2952 is not set +# CONFIG_POWER_RESET_SYSCON is not set # CONFIG_PDA_POWER is not set @@ -4916,6 +4961,8 @@ CONFIG_NET_DSA=m CONFIG_NET_DSA_MV88E6060=m CONFIG_NET_DSA_MV88E6131=m CONFIG_NET_DSA_MV88E6123_61_65=m +CONFIG_NET_DSA_MV88E6171=m +CONFIG_NET_DSA_BCM_SF2=m # Used by Maemo, we don't care. # CONFIG_PHONET is not set @@ -4931,6 +4978,7 @@ CONFIG_NET_DSA_MV88E6123_61_65=m CONFIG_WM8350_POWER=m # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_PCI_SKELETON is not set CONFIG_USB_WUSB=m CONFIG_USB_WUSB_CBAF=m @@ -4975,9 +5023,6 @@ CONFIG_RTL8192E=m # CONFIG_INPUT_GPIO is not set # CONFIG_VIDEO_CX25821 is not set # CONFIG_R8188EU is not set -# Larry Finger maintains (rhbz 1113422) -CONFIG_R8192EE=m -# CONFIG_R8821AE is not set # CONFIG_RTL8192U is not set CONFIG_R8723AU=m # Jes Sorensen maintains this (rhbz 1100162) # CONFIG_8723AU_AP_MODE is not set @@ -5006,7 +5051,6 @@ CONFIG_ALTERA_STAPL=m # CONFIG_DGNC is not set # CONFIG_RTS5208 is not set # CONFIG_GS_FPGABOOT is not set -# CONFIG_BT_NOKIA_H4P is not set # CONFIG_UNISYSSPAR is not set # CONFIG_MEDIA_TUNER_MSI001 is not set # END OF STAGING @@ -5018,6 +5062,8 @@ CONFIG_ALTERA_STAPL=m CONFIG_NOP_USB_XCEIV=m +# CONFIG_INTEGRITY is not set + # CONFIG_IMA is not set CONFIG_IMA_MEASURE_PCR_IDX=10 CONFIG_IMA_LSM_RULES=y @@ -5038,6 +5084,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_TRACE is not set # CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_TASKS_RCU is not set # CONFIG_RCU_USER_QS is not set CONFIG_SPARSE_RCU_POINTER=y @@ -5078,7 +5125,7 @@ CONFIG_ZSMALLOC=y # CONFIG_KEYBOARD_GPIO_POLLED is not set # CONFIG_MOUSE_GPIO is not set # CONFIG_I2C_DESIGNWARE_PLATFORM is not set -# CONFIG_I2C_DESIGNWARE_PCI is not set +CONFIG_I2C_DESIGNWARE_PCI=m # CONFIG_I2C_GPIO is not set # CONFIG_DEBUG_GPIO is not set # CONFIG_W1_MASTER_GPIO is not set @@ -5089,6 +5136,7 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_PCA953X is not set # CONFIG_GPIO_PCF857X is not set # CONFIG_GPIO_CS5535 is not set +# CONFIG_GPIO_ADNP is not set # CONFIG_GPIO_ADP5588 is not set # CONFIG_GPIO_IT8761E is not set # CONFIG SB105x is not set @@ -5116,6 +5164,7 @@ CONFIG_GPIO_VIPERBOARD=m # CONFIG_GPIO_74X164 is not set # CONFIG_GPIO_MAX7301 is not set # CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_MCP23S08 is not set # FIXME: Why? @@ -5139,6 +5188,7 @@ CONFIG_TCM_IBLOCK=m CONFIG_TCM_FILEIO=m CONFIG_TCM_PSCSI=m CONFIG_TCM_FC=m +# CONFIG_TCM_USER is not set CONFIG_HWSPINLOCK=m @@ -5147,7 +5197,7 @@ CONFIG_PSTORE_RAM=m # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_FTRACE is not set -# CONFIG_TEST_MODULE is not set +# CONFIG_TEST_LKM is not set # CONFIG_TEST_USER_COPY is not set # CONFIG_TEST_BPF is not set # CONFIG_TEST_UDELAY is not set @@ -5193,8 +5243,19 @@ CONFIG_FMC_CHARDEV=m # CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set +# CONFIG_HMC_DRV is not set + # CONFIG_PM_DEVFREQ is not set +# CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set +# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set +# CONFIG_DEVFREQ_GOV_POWERSAVE is not set +# CONFIG_DEVFREQ_GOV_USERSPACE is not set + +# CONFIG_CPUFREQ_DT is not set + # CONFIG_MODULE_SIG is not set +# FIXME: Revisit this to see if we can use it instead of the spec file stuff +# CONFIG_MODULE_COMPRESS is not set # CONFIG_SYSTEM_TRUSTED_KEYRING is not set # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set @@ -5204,3 +5265,8 @@ CONFIG_FMC_CHARDEV=m # CONFIG_GLOB_SELFTEST is not set # CONFIG_SBSAUART_TTY is not set + +# CONFIG_SERIAL_8250_FINTEK is not set + +# set in x86-generic presently +# CONFIG_TOUCHSCREEN_GOODIX is not set diff --git a/freed-ora/current/master/config-powerpc-generic b/freed-ora/current/master/config-powerpc-generic index bc0f9433e..ce4da577f 100644 --- a/freed-ora/current/master/config-powerpc-generic +++ b/freed-ora/current/master/config-powerpc-generic @@ -309,7 +309,6 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m # CONFIG_PPC_MPC512x is not set # CONFIG_RTC_DRV_MPC5121 is not set -# CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_MPC512X_DMA is not set @@ -323,8 +322,6 @@ CONFIG_I2C_MPC=m # CONFIG_CRYPTO_DEV_FSL_CAAM is not set # CONFIG_CRYPTO_SHA1_PPC is not set -# CONFIG_GPIO_MCP23S08 is not set - # CONFIG_CAN_FLEXCAN is not set # CONFIG_NET_VENDOR_XILINX is not set # CONFIG_PPC_EPAPR_HV_BYTECHAN is not set @@ -351,15 +348,14 @@ CONFIG_RCU_FANOUT_LEAF=16 CONFIG_PPC_DENORMALISATION=y # CONFIG_MDIO_BUS_MUX_MMIOREG is not set -# CONFIG_GPIO_ADNP is not set # CONFIG_MFD_SYSCON is not set -# CONFIG_RTC_DRV_SNVS is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y CONFIG_FB_SSD1307=m CONFIG_INPUT_PWM_BEEPER=m CONFIG_BACKLIGHT_PWM=m diff --git a/freed-ora/current/master/config-powerpc64 b/freed-ora/current/master/config-powerpc64 index e24be4faf..49b4f2e70 100644 --- a/freed-ora/current/master/config-powerpc64 +++ b/freed-ora/current/master/config-powerpc64 @@ -171,8 +171,8 @@ CONFIG_CRYPTO_842=m CONFIG_CRYPTO_DEV_NX_ENCRYPT=m CONFIG_CRYPTO_DEV_NX_COMPRESS=m +CONFIG_CXL=m -CONFIG_BPF_JIT=y # CONFIG_PPC_ICSWX_PID is not set # CONFIG_PPC_ICSWX_USE_SIGILL is not set # CONFIG_PCIEPORTBUS is not set diff --git a/freed-ora/current/master/config-powerpc64p7 b/freed-ora/current/master/config-powerpc64p7 index 60baede68..6a5e1c6d9 100644 --- a/freed-ora/current/master/config-powerpc64p7 +++ b/freed-ora/current/master/config-powerpc64p7 @@ -161,8 +161,8 @@ CONFIG_CRYPTO_842=m CONFIG_CRYPTO_DEV_NX_ENCRYPT=m CONFIG_CRYPTO_DEV_NX_COMPRESS=m +CONFIG_CXL=m -CONFIG_BPF_JIT=y # CONFIG_PPC_ICSWX_PID is not set # CONFIG_PPC_ICSWX_USE_SIGILL is not set # CONFIG_PCIEPORTBUS is not set diff --git a/freed-ora/current/master/config-s390x b/freed-ora/current/master/config-s390x index f9472348d..a76cad62b 100644 --- a/freed-ora/current/master/config-s390x +++ b/freed-ora/current/master/config-s390x @@ -213,7 +213,6 @@ CONFIG_SCHED_BOOK=y CONFIG_CRYPTO_GHASH_S390=m -CONFIG_BPF_JIT=y # CONFIG_TRANSPARENT_HUGEPAGE is not set CONFIG_SCM_BUS=y CONFIG_EADM_SCH=m @@ -234,6 +233,7 @@ CONFIG_HOTPLUG_PCI_S390=y # CONFIG_HID is not set # CONFIG_MTD is not set +# CONFIG_SERIAL_8250 is not set # CONFIG_PARPORT is not set # CONFIG_UWB is not set # CONFIG_MMC is not set diff --git a/freed-ora/current/master/config-x86-32-generic b/freed-ora/current/master/config-x86-32-generic index 13e1bac70..5daa9b8a3 100644 --- a/freed-ora/current/master/config-x86-32-generic +++ b/freed-ora/current/master/config-x86-32-generic @@ -78,7 +78,6 @@ CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_X86_LONGRUN=y # CONFIG_X86_LONGHAUL is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set -# CONFIG_GENERIC_CPUFREQ_CPU0 is not set # e_powersaver is dangerous # CONFIG_X86_E_POWERSAVER is not set @@ -168,6 +167,7 @@ CONFIG_XO1_RFKILL=m CONFIG_X86_32_IRIS=m CONFIG_POWER_RESET_GPIO=y +# CONFIG_POWER_RESET_GPIO_RESTART is not set @@ -206,14 +206,10 @@ CONFIG_BACKLIGHT_PWM=m # CONFIG_MDIO_BUS_MUX_GPIO is not set # CONFIG_MDIO_BUS_MUX_MMIOREG is not set # CONFIG_GPIO_SODAVILLE is not set -# CONFIG_GPIO_ADNP is not set # CONFIG_BACKLIGHT_OT200 is not set -# CONFIG_RTC_DRV_SNVS is not set -# CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_MLX5_INFINIBAND is not set # CONFIG_PINCTRL_SINGLE is not set -# CONFIG_PINCTRL_MSM8X74 is not set # CONFIG_PINCTRL_BCM281XX is not set # CONFIG_PINCTRL_APQ8064 is not set # CONFIG_PINCTRL_IPQ8064 is not set diff --git a/freed-ora/current/master/config-x86-generic b/freed-ora/current/master/config-x86-generic index 686972fdd..88347fede 100644 --- a/freed-ora/current/master/config-x86-generic +++ b/freed-ora/current/master/config-x86-generic @@ -240,6 +240,7 @@ CONFIG_INTEL_SMARTCONNECT=y CONFIG_PVPANIC=m # CONFIG_TOUCHSCREEN_INTEL_MID is not set +CONFIG_TOUCHSCREEN_GOODIX=m # CONFIG_SMSC37B787_WDT is not set CONFIG_VIA_WDT=m @@ -293,6 +294,8 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m CONFIG_XEN_SELFBALLOONING=y CONFIG_XEN_PCIDEV_BACKEND=m CONFIG_XEN_ACPI_PROCESSOR=m +# CONFIG_XEN_SCSI_FRONTEND is not set +# CONFIG_XEN_SCSI_BACKEND is not set CONFIG_MTD_ESB2ROM=m CONFIG_MTD_CK804XROM=m @@ -376,7 +379,6 @@ CONFIG_LPC_ICH=m CONFIG_GPIO_ICH=m # CONFIG_GPIO_LYNXPOINT is not set -# CONFIG_GPIO_MCP23S08 is not set # CONFIG_GPIO_F7188X is not set # These should all go away with IC2_ACPI is fixed @@ -406,7 +408,6 @@ CONFIG_GPIO_ICH=m # CONFIG_TWL4030_CORE is not set # CONFIG_TWL6040_CORE is not set - CONFIG_PCI_CNB20LE_QUIRK=y CONFIG_ACPI_EC_DEBUGFS=m @@ -480,14 +481,18 @@ CONFIG_NFC_MICROREAD_MEI=m # CONFIG_X86_GOLDFISH is not set CONFIG_X86_INTEL_LPSS=y +CONFIG_IOSF_MBI=m +# CONFIG_IOSF_MBI_DEBUG is not set CONFIG_PWM_LPSS=m +CONFIG_PWM_LPSS_PCI=m +CONFIG_PWM_LPSS_PLATFORM=m CONFIG_PINCTRL=y CONFIG_PINCTRL_BAYTRAIL=y # CONFIG_INTEL_POWERCLAMP is not set CONFIG_X86_PKG_TEMP_THERMAL=m -CONFIG_ACPI_INT3403_THERMAL=m CONFIG_INTEL_SOC_DTS_THERMAL=m +CONFIG_INT340X_THERMAL=m CONFIG_VMWARE_VMCI=m CONFIG_VMWARE_VMCI_VSOCKETS=m diff --git a/freed-ora/current/master/config-x86_64-generic b/freed-ora/current/master/config-x86_64-generic index de4671325..89b7070ef 100644 --- a/freed-ora/current/master/config-x86_64-generic +++ b/freed-ora/current/master/config-x86_64-generic @@ -57,6 +57,7 @@ CONFIG_INTEL_MIC_X100_DMA=m # SHPC has half-arsed PCI probing, which makes it load on too many systems CONFIG_HOTPLUG_PCI_SHPC=m +# CONFIG_CRYPTO_SHA1_MB is not set CONFIG_CRYPTO_AES_X86_64=y CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m CONFIG_CRYPTO_TWOFISH_X86_64=m @@ -152,8 +153,6 @@ CONFIG_FUNCTION_GRAPH_TRACER=y CONFIG_I7300_IDLE=m -CONFIG_BPF_JIT=y - # https://fedoraproject.org/wiki/Features/Checkpoint_Restore CONFIG_CHECKPOINT_RESTORE=y diff --git a/freed-ora/current/master/crash-driver.patch b/freed-ora/current/master/crash-driver.patch index 9ec016d50..4f99d487f 100644 --- a/freed-ora/current/master/crash-driver.patch +++ b/freed-ora/current/master/crash-driver.patch @@ -269,7 +269,7 @@ index 000000000000..fd4736ec99f5 + +#endif /* _X86_CRASH_H */ diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 6e9f74a5c095..ee6bae16b04c 100644 +index efefd12a0f7b..6a318132b7ee 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -4,6 +4,9 @@ @@ -283,13 +283,13 @@ index 6e9f74a5c095..ee6bae16b04c 100644 config DEVKMEM diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index a324f9303e36..33ce2fb1d0a3 100644 +index d06cde26031b..0832636fd9bc 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile -@@ -61,3 +61,5 @@ obj-$(CONFIG_JS_RTC) += js-rtc.o - js-rtc-y = rtc.o +@@ -62,3 +62,5 @@ js-rtc-y = rtc.o obj-$(CONFIG_TILE_SROM) += tile-srom.o + obj-$(CONFIG_XILLYBUS) += xillybus/ + +obj-$(CONFIG_CRASH) += crash.o diff --git a/drivers/char/crash.c b/drivers/char/crash.c diff --git a/freed-ora/current/master/criu-no-expert.patch b/freed-ora/current/master/criu-no-expert.patch index 2ac9eb04c..3ba0354bb 100644 --- a/freed-ora/current/master/criu-no-expert.patch +++ b/freed-ora/current/master/criu-no-expert.patch @@ -9,7 +9,7 @@ Upstream-status: Fedora mustard 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/Kconfig b/init/Kconfig -index 3c866db603a7..bfb3c54d5286 100644 +index 9ef459bb44b2..cc096e258a4a 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1149,7 +1149,7 @@ config DEBUG_BLK_CGROUP diff --git a/freed-ora/current/master/deblob-3.18 b/freed-ora/current/master/deblob-3.18 new file mode 100755 index 000000000..c22c16dce --- /dev/null +++ b/freed-ora/current/master/deblob-3.18 @@ -0,0 +1,2941 @@ +#!/bin/sh + +# Copyright (C) 2008-2014 Alexandre Oliva <lxoliva@fsfla.org> +# Copyright (C) 2008 Jeff Moe +# Copyright (C) 2009 Rubén RodrÃguez <ruben@gnu.org> +# +# This program is part of GNU Linux-libre, a GNU project that +# publishes scripts to clean up Linux so as to make it suitable for +# use in the GNU Project and in Free System Distributions. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +# deblob - remove non-free blobs from the vanilla linux kernel + +# http://www.fsfla.org/svn/fsfla/software/linux-libre + + +# This script, suited for the kernel version named below, in kver, +# attempts to remove only non-Free Software bits, without removing +# Free Software that happens to be in the same file. + +# Drivers that currently require non-Free firmware are retained, but +# firmware included in GPLed sources is replaced with /*(DEBLOBBED)*/ +# if the deblob-check script, that knows how to do this, is present. +# -lxoliva + + +# See also: +# http://wiki.debian.org/KernelFirmwareLicensing +# svn://svn.debian.org/kernel/dists/trunk/linux-2.6/debian/patches/debian/dfsg/files-1 +# http://wiki.gnewsense.org/Builder gen-kernel + +# Thanks to Brian Brazil @ gnewsense + + +# For each kver release, start extra with an empty string, then count +# from 1 if changes are needed that require rebuilding the tarball. +kver=3.18 extra= + +case $1 in +--force) + echo "WARNING: Using the force, ignored errors will be" >&2 + die () { + echo ERROR: "$@" >&2 + errors=: + } + forced=: errors=false + shift + ;; +*) + die () { + echo ERROR: "$@" >&2 + echo Use --force to ignore + exit 1 + } + forced=false errors=false + ;; +esac + +check=`echo "$0" | sed 's,[^/]*$,,;s,^$,.,;s,/*$,,'`/deblob-check +if [ ! -f $check ] ; then + if $forced; then + die deblob-check script missing, will remove entire files + else + die deblob-check script missing + fi + have_check=false +else + have_check=: + [ -x $check ] || check="/bin/sh $check" +fi + +filetest () { + if [ ! -f $1 ]; then + die $1 does not exist, something is wrong && return 1 + fi +} + +announce () { + echo + echo "$@" +} + +clean_file () { + #$1 = filename + filetest $1 || return + rm $1 + echo $1: removed +} + +check_changed () { + #$1 = filename + if cmp $1.deblob $1 > /dev/null; then + rm $1.deblob + die $1 did not change, something is wrong && return 1 + fi + mv $1.deblob $1 +} + +clean_blob () { + #$1 = filename + filetest $1 || return + if $have_check; then + name=$1 + set fnord "$@" -d + shift 2 + if $check "$@" -i linux-$kver $name > $name.deblob; then + if [ ! -s $name.deblob ]; then + die got an empty file after removing blobs from $name + fi + else + die failed removing blobs from $name + fi + check_changed $name && echo $name: removed blobs + else + clean_file $1 + fi +} + +dummy_blob () { + #$1 = filename + if test -f $1; then + die $1 exists, something is wrong && return + elif test ! -f firmware/Makefile; then + die firmware/Makefile does not exist, something is wrong && return + fi + + clean_sed "s,`echo $1 | sed s,^firmware/,,`,\$(DEBLOBBED),g" \ + firmware/Makefile "dropped $1" +} + +clean_fw () { + #$1 = firmware text input, $2 = firmware output + filetest $1 || return + if test -f $2; then + die $2 exists, something is wrong && return + fi + clean_blob $1 -s 4 + dummy_blob $2 +} + +drop_fw_file () { + #$1 = firmware text input, $2 = firmware output + filetest $1 || return + if test -f $2; then + die $2 exists, something is wrong && return + fi + clean_file $1 + dummy_blob $2 +} + +clean_kconfig () { + #$1 = filename $2 = things to remove + case $1 in + -f) + shift + ;; + *) + if $have_check; then + return + fi + ;; + esac + filetest $1 || return + sed "/^config \\($2\\)\$/{p;i\ + depends on NONFREE +d;}" $1 > $1.deblob + check_changed $1 && echo $1: marked config $2 as depending on NONFREE +} + +clean_mk () { + #$1 = config $2 = Makefile name + # We don't clean up Makefiles any more --lxoliva + # sed -i "/\\($1\\)/d" $2 + # echo $2: removed $1 support + # check_changed $2 + filetest $2 || return + if sed -n "/\\($1\\)/p" $2 | grep . > /dev/null; then + : + else + die $2 does not contain matches for $1 + fi +} + +clean_sed () { + #$1 = sed-script $2 = file $3 = comment + filetest $2 || return + sed -e "$1" "$2" > "$2".deblob || { + die $2: failed: ${3-applied sed script $1} && return 1; } + check_changed $2 && echo $2: ${3-applied sed script $1} +} + +reject_firmware () { + #$1 = file $2 = pre sed pattern + filetest $1 || return + clean_sed "$2"' +s,\(^\|[^>.0-9a-zA-Z_$]\)request\(_ihex\)\?_firmware\(_nowait\|_direct\)\?\($\|[^-.0-9a-zA-Z_$),; ]\),\1reject_firmware\3\4,g +' "$1" 'disabled non-Free firmware-loading machinery' +} + +maybe_reject_firmware () { + #$1 = file $2 = pre sed pattern + filetest $1 || return + clean_sed "$2"' +s,\(^\|[^>.0-9a-zA-Z_$]\)request_\(ihex_\)\?firmware\(_nowait\|_direct\)\?\($\|[^-.0-9a-zA-Z_$),; ]\),\1maybe_reject_\2firmware\3\4,g +' "$1" 'retain Free firmware-loading machinery, disabling non-Free one' +} + +undefine_macro () { + #$1 - macro name + #$2 - substitution + #$3 - message + #rest - file names + macro=$1 repl=$2 msg=$3; shift 3 + for f in "$@"; do + clean_sed " +s,^#define $macro .*\$,/*(DEBLOBBED)*/,; +s,$macro,$repl,g; +" "$f" "$msg" + done +} + +undefault_firmware () { + #$1 - pattern such that $1_DEFAULT_FIRMWARE is #defined to non-Free firmware + #$@ other than $1 - file names + macro="$1"_DEFAULT_FIRMWARE; shift + undefine_macro "$macro" "\"/*(DEBLOBBED)*/\"" \ + "disabled non-Free firmware" "$@" +} + +# First, check that files that contain firmwares and their +# corresponding sources are present. + +for f in \ + drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc \ + drivers/gpu/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc \ + drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/com.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/macros.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvd7.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvd7.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnve0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvf0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvf0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcgm107.fuc5.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcgm107.fuc5 \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnv108.fuc5.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnv108.fuc5 \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hub.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvd7.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvd7.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnve0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvf0.fuc.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvf0.fuc \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubgm107.fuc5.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubgm107.fuc5 \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnv108.fuc5.h \ + drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnv108.fuc5 \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc.h \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nv108.fuc \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc.h \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nva3.fuc \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc.h \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvc0.fuc \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc.h \ + drivers/gpu/drm/nouveau/core/subdev/pwr/fuc/nvd0.fuc \ + drivers/net/wan/wanxlfw.inc_shipped \ + drivers/net/wan/wanxlfw.S \ + drivers/net/wireless/atmel.c \ + drivers/net/wireless/atmel.c \ + drivers/scsi/aic7xxx/aic79xx_seq.h_shipped \ + drivers/scsi/aic7xxx/aic79xx.seq \ + drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped \ + drivers/scsi/aic7xxx/aic7xxx.seq \ + drivers/scsi/53c700_d.h_shipped \ + drivers/scsi/53c700.scr \ + drivers/scsi/sym53c8xx_2/sym_fw1.h \ + drivers/scsi/sym53c8xx_2/sym_fw1.h \ + drivers/scsi/sym53c8xx_2/sym_fw2.h \ + drivers/scsi/sym53c8xx_2/sym_fw2.h \ + firmware/dsp56k/bootstrap.bin.ihex \ + firmware/dsp56k/bootstrap.asm \ + firmware/keyspan_pda/keyspan_pda.HEX \ + firmware/keyspan_pda/keyspan_pda.S \ + firmware/keyspan_pda/xircom_pgs.HEX \ + firmware/keyspan_pda/xircom_pgs.S \ +; do + filetest $f +done + +# Identify the tarball. +grep -q 'EXTRAVERSION.*-gnu' Makefile || +clean_sed "s,^EXTRAVERSION.*,&-gnu$extra, +" Makefile 'added -gnu to EXTRAVERSION' + +grep -q Linux-libre README || +clean_sed ' +1,3 s,Linux kernel release.*kernel\.org.*,GNU Linux-libre <http://linux-libre.fsfla.org>, +2,5 s,Linux version [0-9.]*,GNU Linux-libre, +1,20 s,\(operating system \)\?Unix,Unix kernel, +/WHAT IS LINUX/i\ +WHAT IS GNU Linux-libre?\ +\ + GNU Linux-libre is a Free version of the kernel Linux (see below),\ + suitable for use with the GNU Operating System in 100% Free\ + GNU/Linux-libre System Distributions.\ + http://www.gnu.org/distros/\ +\ + It removes non-Free components from Linux, that are disguised as\ + source code or distributed in separate files. It also disables\ + run-time requests for non-Free components, shipped separately or as\ + part of Linux, and documentation pointing to them, so as to avoid\ + (Free-)baiting users into the trap of non-Free Software.\ + http://www.fsfla.org/anuncio/2010-11-Linux-2.6.36-libre-debait\ +\ + Linux-libre started within the gNewSense GNU/Linux distribution.\ + It was later adopted by Jeff Moe, who coined its name, and in 2008\ + it became a project maintained by FSF Latin America. In 2012, it\ + became part of the GNU Project.\ +\ + The GNU Linux-libre project takes a minimal-changes approach to\ + cleaning up Linux, making no effort to substitute components that\ + need to be removed with functionally equivalent Free ones.\ + Nevertheless, we encourage and support efforts towards doing so.\ + http://libreplanet.org/wiki/LinuxLibre:Devices_that_require_non-free_firmware\ +\ + Our mascot is Freedo, a light-blue penguin that has just come out\ + of the shower. Although we like penguins, GNU is a much greater\ + contribution to the entire system, so its mascot deserves more\ + promotion. See our web page for their images.\ + http://linux-libre.fsfla.org/\ + +' README 'added blurb about GNU Linux-libre' + +# Add reject_firmware and maybe_reject_firmware +grep -q _LINUX_LIBRE_FIRMWARE_H include/linux/firmware.h || +clean_sed '$i\ +#ifndef _LINUX_LIBRE_FIRMWARE_H\ +#define _LINUX_LIBRE_FIRMWARE_H\ +\ +#include <linux/device.h>\ +\ +#define NONFREE_FIRMWARE "/*(DEBLOBBED)*/"\ +\ +static inline int\ +report_missing_free_firmware(const char *name, const char *what)\ +{\ + printk(KERN_ERR "%s: Missing Free %s\\n", name,\ + what ? what : "firmware");\ + return -EINVAL;\ +}\ +static inline int\ +reject_firmware(const struct firmware **fw,\ + const char *name, struct device *device)\ +{\ + const struct firmware *xfw = NULL;\ + int retval;\ + report_missing_free_firmware(dev_name(device), NULL);\ + retval = request_firmware(&xfw, NONFREE_FIRMWARE, device);\ + if (!retval)\ + release_firmware(xfw);\ + return -EINVAL;\ +}\ +static inline int\ +maybe_reject_firmware(const struct firmware **fw,\ + const char *name, struct device *device)\ +{\ + if (strstr (name, NONFREE_FIRMWARE))\ + return reject_firmware(fw, name, device);\ + else\ + return request_firmware(fw, name, device);\ +}\ +static inline int\ +reject_firmware_direct(const struct firmware **fw,\ + const char *name, struct device *device)\ +{\ + const struct firmware *xfw = NULL;\ + int retval;\ + report_missing_free_firmware(dev_name(device), NULL);\ + retval = request_firmware_direct(&xfw, NONFREE_FIRMWARE, device);\ + if (!retval)\ + release_firmware(xfw);\ + return -EINVAL;\ +}\ +static inline void\ +discard_rejected_firmware(const struct firmware *fw, void *context)\ +{\ + release_firmware(fw);\ +}\ +static inline int\ +reject_firmware_nowait(struct module *module, int uevent,\ + const char *name, struct device *device,\ + gfp_t gfp, void *context,\ + void (*cont)(const struct firmware *fw,\ + void *context))\ +{\ + int retval;\ + report_missing_free_firmware(dev_name(device), NULL);\ + retval = request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,\ + device, gfp, NULL,\ + discard_rejected_firmware);\ + if (retval)\ + return retval;\ + return -EINVAL;\ +}\ +static inline int\ +maybe_reject_firmware_nowait(struct module *module, int uevent,\ + const char *name, struct device *device,\ + gfp_t gfp, void *context,\ + void (*cont)(const struct firmware *fw,\ + void *context))\ +{\ + if (strstr (name, NONFREE_FIRMWARE))\ + return reject_firmware_nowait(module, uevent, name,\ + device, gfp, context, cont);\ + else\ + return request_firmware_nowait(module, uevent, name,\ + device, gfp, context, cont);\ +}\ +\ +#endif /* _LINUX_LIBRE_FIRMWARE_H */\ +' include/linux/firmware.h 'added non-Free firmware notification support' + +grep -q _LINUX_LIBRE_IHEX_FIRMWARE_H include/linux/ihex.h || +clean_sed '$i\ +#ifndef _LINUX_LIBRE_IHEX_H\ +#define _LINUX_LIBRE_IHEX_H\ +\ +static inline int\ +maybe_reject_ihex_firmware(const struct firmware **fw,\ + const char *name, struct device *device)\ +{\ + if (strstr (name, NONFREE_FIRMWARE))\ + return reject_firmware(fw, name, device);\ + else\ + return request_ihex_firmware(fw, name, device);\ +}\ +\ +#endif /* _LINUX_LIBRE_IHEX_H */\ +' include/linux/ihex.h 'added non-Free ihex firmware notification support' + +######## +# Arch # +######## + +# x86 + +announce MICROCODE_AMD - "AMD microcode patch loading support" +reject_firmware arch/x86/kernel/cpu/microcode/amd.c +clean_blob arch/x86/kernel/cpu/microcode/amd.c +clean_kconfig arch/x86/Kconfig 'MICROCODE_AMD' +clean_mk CONFIG_MICROCODE_AMD arch/x86/kernel/cpu/microcode/Makefile + +announce MICROCODE_AMD_EARLY - "Early load AMD microcode" +clean_blob arch/x86/kernel/cpu/microcode/amd_early.c +clean_kconfig arch/x86/Kconfig 'MICROCODE_AMD_EARLY' +clean_mk CONFIG_MICROCODE_AMD_EARLY arch/x86/kernel/cpu/microcode/Makefile + +announce MICROCODE_INTEL - "Intel microcode patch loading support" +reject_firmware arch/x86/kernel/cpu/microcode/intel.c +clean_blob arch/x86/kernel/cpu/microcode/intel.c +clean_kconfig arch/x86/Kconfig 'MICROCODE_INTEL' +clean_mk CONFIG_MICROCODE_INTEL arch/x86/kernel/cpu/microcode/Makefile + +announce MICROCODE_INTEL_EARLY - "Early load Intel microcode" +clean_blob arch/x86/kernel/cpu/microcode/intel_early.c +clean_kconfig arch/x86/Kconfig 'MICROCODE_INTEL_EARLY' +clean_mk CONFIG_MICROCODE_INTEL_EARLY arch/x86/kernel/cpu/microcode/Makefile + +announce MICROCODE_EARLY - "Early load microcode" +clean_blob Documentation/x86/early-microcode.txt +clean_kconfig arch/x86/Kconfig 'MICROCODE_EARLY' +clean_mk CONFIG_MICROCODE_EARLY arch/x86/kernel/cpu/microcode/Makefile + +# arm + +announce IXP4XX_NPE - "IXP4xx Network Processor Engine support" +reject_firmware arch/arm/mach-ixp4xx/ixp4xx_npe.c +clean_blob arch/arm/mach-ixp4xx/ixp4xx_npe.c +clean_blob Documentation/arm/IXP4xx +clean_kconfig arch/arm/mach-ixp4xx/Kconfig 'ARCH_IXP4XX' +clean_mk CONFIG_IXP4XX_NPE arch/arm/mach-ixp4xx/Makefile + +announce ARCH_NETX - "Hilscher NetX based" +clean_sed ' +s,\([" ]\)request_firmware(,\1reject_firmware(, +' arch/arm/mach-netx/xc.c 'disabled non-Free firmware-loading machinery' +clean_blob arch/arm/mach-netx/xc.c +clean_blob drivers/net/ethernet/netx-eth.c +clean_kconfig arch/arm/Kconfig 'ARCH_NETX' +clean_mk CONFIG_ARCH_NETX arch/arm/Makefile + +# mips + +# I couldn't figure out where the firmware name actually comes from. +# If it's from some user-set property, we could reenable it. -lxo +announce XRX200_PHY_FW - "XRX200 PHY firmware loader" +reject_firmware arch/mips/lantiq/xway/xrx200_phy_fw.c +clean_kconfig arch/mips/lantiq/Kconfig 'XRX200_PHY_FW' +clean_mk CONFIG_XRX200_PHY_FW arch/mips/lantiq/xway/Makefile + +####### +# ATM # +####### + +announce ATM_AMBASSADOR - "Madge Ambassador, Collage PCI 155 Server" +reject_firmware drivers/atm/ambassador.c +clean_blob drivers/atm/ambassador.c +clean_fw firmware/atmsar11.HEX firmware/atmsar11.fw +clean_kconfig drivers/atm/Kconfig 'ATM_AMBASSADOR' +clean_mk CONFIG_ATM_AMBASSADOR drivers/atm/Makefile + +announce ATM_FORE200E - "FORE Systems 200E-series" +reject_firmware drivers/atm/fore200e.c +clean_blob drivers/atm/fore200e.c +clean_blob Documentation/networking/fore200e.txt +clean_blob drivers/atm/.gitignore +clean_blob Documentation/dontdiff +clean_kconfig drivers/atm/Kconfig 'ATM_FORE200E' +clean_mk CONFIG_ATM_FORE200E drivers/atm/Makefile + +announce ATM_SOLOS - "Solos ADSL2+ PCI Multiport card driver" +reject_firmware drivers/atm/solos-pci.c +clean_blob drivers/atm/solos-pci.c +clean_kconfig drivers/atm/Kconfig 'ATM_SOLOS' +clean_mk CONFIG_ATM_SOLOS drivers/atm/Makefile + +########## +# Crypto # +########## + +announce CRYPTO_DEV_QAT_DH895xCC - "Support for Intel(R) DH895xCC" +clean_blob drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.h +clean_blob drivers/crypto/qat/qat_dh895xcc/adf_drv.c +clean_kconfig drivers/crypto/qat/Kconfig 'CRYPTO_DEV_QAT_DH895xCC' +clean_mk CONFIG_CRYPTO_DEV_QAT_DH895xCC drivers/crypto/qat/Makefile + +announce CRYPTO_DEV_QAT - "Common bits for Intel(R) QuickAssist Technology" +reject_firmware drivers/crypto/qat/qat_common/adf_accel_engine.c +clean_kconfig drivers/crypto/qat/Kconfig 'CRYPTO_DEV_QAT' +clean_mk CONFIG_CRYPTO_DEV_QAT drivers/crypto/qat/Makefile + +######## +# tty # +######## + +announce CYCLADES - "Cyclades async mux support" +reject_firmware drivers/tty/cyclades.c +clean_blob drivers/tty/cyclades.c +clean_kconfig drivers/tty/Kconfig 'CYCLADES' +clean_mk CONFIG_CYCLADES drivers/tty/Makefile + +announce ISI - "Multi-Tech multiport card support" +reject_firmware drivers/tty/isicom.c +clean_blob drivers/tty/isicom.c +clean_kconfig drivers/tty/Kconfig 'ISI' +clean_mk CONFIG_ISI drivers/tty/Makefile + +announce MOXA_INTELLIO - "Moxa Intellio support" +reject_firmware drivers/tty/moxa.c +clean_blob drivers/tty/moxa.c +clean_kconfig drivers/tty/Kconfig 'MOXA_INTELLIO' +clean_mk CONFIG_MOXA_INTELLIO drivers/tty/Makefile + +# gpu drm + +announce DRM_AST - "AST server chips" +reject_firmware drivers/gpu/drm/ast/ast_dp501.c +clean_blob drivers/gpu/drm/ast/ast_dp501.c +clean_kconfig drivers/gpu/drm/ast/Kconfig 'DRM_AST' +clean_mk CONFIG_DRM_AST drivers/gpu/drm/ast/Makefile + +announce DRM_NOUVEAU - "Nouveau (nVidia) cards" +reject_firmware drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +clean_blob drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c +reject_firmware drivers/gpu/drm/nouveau/core/engine/falcon.c +clean_blob drivers/gpu/drm/nouveau/core/engine/falcon.c +reject_firmware drivers/gpu/drm/nouveau/core/engine/xtensa.c +clean_blob drivers/gpu/drm/nouveau/core/engine/xtensa.c +clean_kconfig drivers/gpu/drm/nouveau/Kconfig 'DRM_NOUVEAU' +clean_mk CONFIG_DRM_NOUVEAU drivers/gpu/drm/nouveau/Makefile + +announce DRM_MGA - "Matrox g200/g400" +drop_fw_file firmware/matrox/g200_warp.H16 firmware/matrox/g200_warp.fw +drop_fw_file firmware/matrox/g400_warp.H16 firmware/matrox/g400_warp.fw +reject_firmware drivers/gpu/drm/mga/mga_warp.c +clean_blob drivers/gpu/drm/mga/mga_warp.c +clean_kconfig drivers/gpu/drm/Kconfig 'DRM_MGA' +clean_mk CONFIG_DRM_MGA drivers/gpu/drm/Makefile + +announce DRM_MSM - "MSM DRM" +reject_firmware drivers/gpu/drm/msm/adreno/adreno_gpu.c +clean_blob drivers/gpu/drm/msm/adreno/adreno_device.c +clean_kconfig divers/gpu/drm/msm/Kconfig 'DRM_MSM' +clean_mk CONFIG_DRM_MSM drivers/gpu/drm/msm/Makefile + +announce DRM_R128 - "ATI Rage 128" +drop_fw_file firmware/r128/r128_cce.bin.ihex firmware/r128/r128_cce.bin +reject_firmware drivers/gpu/drm/r128/r128_cce.c +clean_blob drivers/gpu/drm/r128/r128_cce.c +clean_kconfig drivers/gpu/drm/Kconfig 'DRM_R128' +clean_mk CONFIG_DRM_R128 drivers/gpu/drm/Makefile + +announce DRM_RADEON - "ATI Radeon" +drop_fw_file firmware/radeon/R100_cp.bin.ihex firmware/radeon/R100_cp.bin +drop_fw_file firmware/radeon/R200_cp.bin.ihex firmware/radeon/R200_cp.bin +drop_fw_file firmware/radeon/R300_cp.bin.ihex firmware/radeon/R300_cp.bin +drop_fw_file firmware/radeon/R420_cp.bin.ihex firmware/radeon/R420_cp.bin +drop_fw_file firmware/radeon/R520_cp.bin.ihex firmware/radeon/R520_cp.bin +drop_fw_file firmware/radeon/R600_me.bin.ihex firmware/radeon/R600_me.bin +drop_fw_file firmware/radeon/R600_pfp.bin.ihex firmware/radeon/R600_pfp.bin +drop_fw_file firmware/radeon/RS600_cp.bin.ihex firmware/radeon/RS600_cp.bin +drop_fw_file firmware/radeon/RS690_cp.bin.ihex firmware/radeon/RS690_cp.bin +drop_fw_file firmware/radeon/RS780_me.bin.ihex firmware/radeon/RS780_me.bin +drop_fw_file firmware/radeon/RS780_pfp.bin.ihex firmware/radeon/RS780_pfp.bin +drop_fw_file firmware/radeon/RV610_me.bin.ihex firmware/radeon/RV610_me.bin +drop_fw_file firmware/radeon/RV610_pfp.bin.ihex firmware/radeon/RV610_pfp.bin +drop_fw_file firmware/radeon/RV620_me.bin.ihex firmware/radeon/RV620_me.bin +drop_fw_file firmware/radeon/RV620_pfp.bin.ihex firmware/radeon/RV620_pfp.bin +drop_fw_file firmware/radeon/RV630_me.bin.ihex firmware/radeon/RV630_me.bin +drop_fw_file firmware/radeon/RV630_pfp.bin.ihex firmware/radeon/RV630_pfp.bin +drop_fw_file firmware/radeon/RV635_me.bin.ihex firmware/radeon/RV635_me.bin +drop_fw_file firmware/radeon/RV635_pfp.bin.ihex firmware/radeon/RV635_pfp.bin +drop_fw_file firmware/radeon/RV670_me.bin.ihex firmware/radeon/RV670_me.bin +drop_fw_file firmware/radeon/RV670_pfp.bin.ihex firmware/radeon/RV670_pfp.bin +drop_fw_file firmware/radeon/RV710_me.bin.ihex firmware/radeon/RV710_me.bin +drop_fw_file firmware/radeon/RV710_pfp.bin.ihex firmware/radeon/RV710_pfp.bin +drop_fw_file firmware/radeon/RV730_me.bin.ihex firmware/radeon/RV730_me.bin +drop_fw_file firmware/radeon/RV730_pfp.bin.ihex firmware/radeon/RV730_pfp.bin +drop_fw_file firmware/radeon/RV770_me.bin.ihex firmware/radeon/RV770_me.bin +drop_fw_file firmware/radeon/RV770_pfp.bin.ihex firmware/radeon/RV770_pfp.bin +reject_firmware drivers/gpu/drm/radeon/radeon_cp.c +clean_blob drivers/gpu/drm/radeon/radeon_cp.c +reject_firmware drivers/gpu/drm/radeon/r100.c +clean_blob drivers/gpu/drm/radeon/r100.c +reject_firmware drivers/gpu/drm/radeon/r600.c +clean_blob drivers/gpu/drm/radeon/r600.c +reject_firmware drivers/gpu/drm/radeon/r600_cp.c +clean_blob drivers/gpu/drm/radeon/r600_cp.c +reject_firmware drivers/gpu/drm/radeon/ni.c +clean_blob drivers/gpu/drm/radeon/ni.c +reject_firmware drivers/gpu/drm/radeon/si.c +clean_blob drivers/gpu/drm/radeon/si.c +reject_firmware drivers/gpu/drm/radeon/cik.c +clean_blob drivers/gpu/drm/radeon/cik.c +reject_firmware drivers/gpu/drm/radeon/radeon_uvd.c +clean_blob drivers/gpu/drm/radeon/radeon_uvd.c +reject_firmware drivers/gpu/drm/radeon/radeon_vce.c +clean_blob drivers/gpu/drm/radeon/radeon_vce.c +clean_kconfig drivers/gpu/drm/Kconfig 'DRM_RADEON' +clean_mk CONFIG_DRM_RADEON drivers/gpu/drm/Makefile + +####### +# dma # +####### + +announce IMX_SDMA - "i.MX SDMA support" +reject_firmware drivers/dma/imx-sdma.c +clean_blob arch/arm/mach-imx/mm-imx25.c +clean_blob arch/arm/mach-imx/mm-imx3.c +clean_blob arch/arm/boot/dts/imx25.dtsi +clean_blob arch/arm/boot/dts/imx35.dtsi +clean_blob arch/arm/boot/dts/imx50.dtsi +clean_blob arch/arm/boot/dts/imx51.dtsi +clean_blob arch/arm/boot/dts/imx53.dtsi +clean_blob arch/arm/boot/dts/imx53-tx53.dtsi +clean_blob arch/arm/boot/dts/imx6qdl.dtsi +clean_blob arch/arm/boot/dts/imx6sl.dtsi +clean_blob arch/arm/boot/dts/imx6sx.dtsi +clean_blob Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +clean_kconfig drivers/dma/Kconfig 'IMX_SDMA' +clean_mk CONFIG_IMX_SDMA drivers/dma/Makefile + +######### +# Media # +######### + +# media/tuner + +announce MEDIA_TUNER_SI2157 - "Silicon Labs Si2157 silicon tuner" +reject_firmware drivers/media/tuners/si2157.c +clean_blob drivers/media/tuners/si2157.c +clean_blob drivers/media/tuners/si2157_priv.h +clean_kconfig drivers/media/tuners/Kconfig 'MEDIA_TUNER_SI2157' +clean_mk CONFIG_MEDIA_TUNER_SI2157 drivers/media/tuners/Makefile + +announce MEDIA_TUNER_XC2028 - "XCeive xc2028/xc3028 tuners" +undefault_firmware 'XC\(2028\|3028L\)' \ + drivers/media/tuners/tuner-xc2028.h \ + drivers/media/pci/saa7134/saa7134-cards.c \ + drivers/media/pci/ivtv/ivtv-driver.c \ + drivers/media/pci/cx18/cx18-driver.c \ + drivers/media/pci/cx18/cx18-dvb.c \ + drivers/media/pci/cx23885/cx23885-dvb.c \ + drivers/media/pci/cx23885/cx23885-video.c \ + drivers/media/pci/cx88/cx88-dvb.c \ + drivers/media/pci/cx88/cx88-cards.c \ + drivers/media/usb/em28xx/em28xx-cards.c \ + drivers/media/usb/dvb-usb/dib0700_devices.c \ + drivers/media/usb/dvb-usb/cxusb.c +reject_firmware drivers/media/tuners/tuner-xc2028.c +clean_blob drivers/media/tuners/tuner-xc2028.c +clean_kconfig drivers/media/tuners/Kconfig 'MEDIA_TUNER_XC2028' +clean_mk CONFIG_MEDIA_TUNER_XC2028 drivers/media/tuners/Makefile + +announce VIDEO_TM6000_DVB - "DVB Support for tm6000 based TV cards" +clean_blob drivers/media/usb/tm6000/tm6000-cards.c +clean_kconfig drivers/media/usb/tm6000/Kconfig 'VIDEO_TM6000_DVB' +clean_mk CONFIG_VIDEO_TM6000_DVB drivers/media/usb/tm6000/Makefile + +announce MEDIA_TUNER_XC4000 - "Xceive XC4000 silicon tuner" +undefine_macro "XC4000_DEFAULT_FIRMWARE\(\|_NEW\)" "\"/*(DEBLOBBED)*/\"" \ + "disabled non-Free firmware" drivers/media/tuners/xc4000.c +maybe_reject_firmware drivers/media/tuners/xc4000.c +clean_blob drivers/media/tuners/xc4000.c +clean_kconfig drivers/media/tuners/Kconfig 'MEDIA_TUNER_XC4000' +clean_mk CONFIG_MEDIA_TUNER_XC4000 drivers/media/tuners/Makefile + +announce MEDIA_TUNER_XC5000 - "Xceive XC5000 silicon tuner" +undefault_firmware 'XC5000' \ + drivers/media/usb/cx231xx/cx231xx-cards.c +reject_firmware drivers/media/tuners/xc5000.c +clean_blob drivers/media/tuners/xc5000.c +clean_kconfig drivers/media/tuners/Kconfig 'MEDIA_TUNER_XC5000' +clean_mk CONFIG_MEDIA_TUNER_XC5000 drivers/media/tuners/Makefile + +announce DVB_USB - "Support for various USB DVB devices" +reject_firmware drivers/media/usb/dvb-usb/dvb-usb-firmware.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB' +clean_mk CONFIG_DVB_USB drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_V2 - "Support for various USB DVB devices v2" +reject_firmware drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_V2' +clean_mk CONFIG_DVB_USB_V2 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_B2C2_FLEXCOP - "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" +reject_firmware drivers/media/common/b2c2/flexcop-fe-tuner.c + +announce DVB_BT8XX - "BT8xx based PCI cards" +reject_firmware drivers/media/pci/bt8xx/dvb-bt8xx.c + +announce DVB_USB_A800 - "AVerMedia AverTV DVB-T USB 2.0 (A800)" +clean_blob drivers/media/usb/dvb-usb/a800.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_A800' +clean_mk CONFIG_DVB_USB_A800 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_AF9005 - "Afatech AF9005 DVB-T USB1.1 support" +clean_file drivers/media/usb/dvb-usb/af9005-script.h +clean_sed ' +s,^ deb_info("load init script\\n");$, {\n err("Missing Free init script\\n");\n return scriptlen = ret = -EINVAL;\n ,; +' drivers/media/usb/dvb-usb/af9005-fe.c 'report missing Free init script' +clean_blob drivers/media/usb/dvb-usb/af9005-fe.c +clean_blob drivers/media/usb/dvb-usb/af9005.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_AF9005' +clean_mk CONFIG_DVB_USB_AF9005 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_AF9015 - "Afatech AF9015 DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb-v2/af9015.h +clean_blob drivers/media/usb/dvb-usb-v2/af9015.c +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_AF9015' +clean_mk CONFIG_DVB_USB_AF9015 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_USB_AF9035 - "Afatech AF9035 DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb-v2/af9035.h +clean_blob drivers/media/usb/dvb-usb-v2/af9035.c +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_AF9035' +clean_mk CONFIG_DVB_USB_AF9035 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_USB_AZ6007 - "Azurewave 6007 and clones DVB-T/C USB2.0 support" +clean_blob drivers/media/usb/dvb-usb-v2/az6007.c +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_AZ6007' +clean_mk CONFIG_DVB_USB_AZ6007 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_USB_AZ6027 - "Azurewave DVB-S/S2 USB2.0 AZ6027 support" +clean_blob drivers/media/usb/dvb-usb/az6027.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_AZ6027' +clean_mk CONFIG_DVB_USB_AZ6027 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_CXUSB - "Conexant USB2.0 hybrid reference design support" +clean_blob drivers/media/usb/dvb-usb/cxusb.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_CXUSB' +clean_mk CONFIG_DVB_USB_CXUSB drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DIB0700 - "DiBcom DiB0700 USB DVB devices" +reject_firmware drivers/media/usb/dvb-usb/dib0700_devices.c +clean_blob drivers/media/usb/dvb-usb/dib0700_devices.c +clean_blob drivers/media/usb/dvb-usb/dib0700_core.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DIB0700' +clean_mk CONFIG_DVB_USB_DIB0700 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DIBUSB_MB - "DiBcom USB DVB-T devices (based on the DiB3000M-B)" +clean_blob drivers/media/usb/dvb-usb/dibusb-mb.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DIBUSB_MB' +clean_mk CONFIG_DVB_USB_DIBUSB_MB drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DIBUSB_MC - "DiBcom USB DVB-T devices (based on the DiB3000M-C/P)" +clean_blob drivers/media/usb/dvb-usb/dibusb-mc.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DIBUSB_MC' +clean_mk CONFIG_DVB_USB_DIBUSB_MC drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DIGITV - "Nebula Electronics uDigiTV DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/digitv.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DIGITV' +clean_mk CONFIG_DVB_USB_DIGITV drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DTT200U - "WideView WT-200U and WT-220U (pen) DVB-T USB2.0 support (Yakumo/Hama/Typhoon/Yuan)" +clean_blob drivers/media/usb/dvb-usb/dtt200u.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DTT200U' +clean_mk CONFIG_DVB_USB_DTT200U drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_DW2102 - "DvbWorld DVB-S/S2 USB2.0 support" +reject_firmware drivers/media/usb/dvb-usb/dw2102.c +clean_blob drivers/media/usb/dvb-usb/dw2102.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_DW2102' +clean_mk CONFIG_DVB_USB_DW2102 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_EC168 - "E3C EC168 DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb-v2/ec168.h +clean_blob drivers/media/usb/dvb-usb-v2/ec168.c +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_EC168' +clean_mk CONFIG_DVB_USB_EC168 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_USB_GP8PSK - "GENPIX 8PSK->USB module support" +reject_firmware drivers/media/usb/dvb-usb/gp8psk.c +clean_blob drivers/media/usb/dvb-usb/gp8psk.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_GP8PSK' +clean_mk CONFIG_DVB_USB_GP8PSK drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_LME2510 - "LME DM04/QQBOX DVB-S USB2.0 support" +reject_firmware drivers/media/usb/dvb-usb-v2/lmedm04.c +clean_blob drivers/media/usb/dvb-usb-v2/lmedm04.c +clean_file Documentation/dvb/lmedm04.txt +clean_kconfig drivers/media/usb/dvb-usb-v2/Kconfig 'DVB_USB_LME2510' +clean_mk CONFIG_DVB_USB_LME2510 drivers/media/usb/dvb-usb-v2/Makefile + +announce DVB_USB_M920X - "Uli m920x DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/m920x.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_M920X' +clean_mk CONFIG_DVB_USB_M920X drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_NOVA_T_USB2 - "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/nova-t-usb2.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_NOVA_T_USB2' +clean_mk CONFIG_DVB_USB_NOVA_T_USB2 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_OPERA1 - "Opera1 DVB-S USB2.0 receiver" +reject_firmware drivers/media/usb/dvb-usb/opera1.c +clean_blob drivers/media/usb/dvb-usb/opera1.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_OPERA1' +clean_mk CONFIG_DVB_USB_OPERA1 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_TECHNISAT_USB2 - "Technisat DVB-S/S2 USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/technisat-usb2.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_TECHNISAT_USB2' +clean_mk CONFIG_DVB_USB_TECHNISAT_USB2 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_TTUSB2 - "Pinnacle 400e DVB-S USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/ttusb2.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_TTUSB2' +clean_mk CONFIG_DVB_USB_TTUSB2 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_UMT_010 - "HanfTek UMT-010 DVB-T USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/umt-010.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_UMT_010' +clean_mk CONFIG_DVB_USB_UMT_010 drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_VP702X - "TwinhanDTV StarBox and clones DVB-S USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/vp702x.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_VP702X' +clean_mk CONFIG_DVB_USB_VP702X drivers/media/usb/dvb-usb/Makefile + +announce DVB_USB_VP7045 - "TwinhanDTV Alpha/MagicBoxII, DNTV tinyUSB2, Beetle USB2.0 support" +clean_blob drivers/media/usb/dvb-usb/vp7045.c +clean_kconfig drivers/media/usb/dvb-usb/Kconfig 'DVB_USB_VP7045' +clean_mk CONFIG_DVB_USB_VP7045 drivers/media/usb/dvb-usb/Makefile + +# dvb/frontends + +announce DVB_AF9013 - "Afatech AF9013 demodulator" +reject_firmware drivers/media/dvb-frontends/af9013.c +clean_blob drivers/media/dvb-frontends/af9013.c +clean_blob drivers/media/dvb-frontends/af9013_priv.h +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_AF9013' +clean_mk CONFIG_DVB_AF9013 drivers/media/dvb-frontends/Makefile + +announce DVB_BCM3510 - "Broadcom BCM3510" +undefault_firmware 'BCM3510' drivers/media/dvb-frontends/bcm3510.c +clean_sed ' +/You.ll need a firmware/,/dvb-fe-bcm/d; +' drivers/media/dvb-frontends/bcm3510.c \ + "removed non-Free firmware notes" +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_BCM3510' +clean_mk CONFIG_DVB_BCM3510 drivers/media/dvb-frontends/Makefile + +announce DVB_CX24116 - "Conexant CX24116 based" +undefault_firmware CX24116 drivers/media/dvb-frontends/cx24116.c +reject_firmware drivers/media/dvb-frontends/cx24116.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_CX24116' +clean_mk CONFIG_DVB_CX24116 drivers/media/dvb-frontends/Makefile + +announce DVB_CX24117 - "Conexant CX24117 based" +undefault_firmware CX24117 drivers/media/dvb-frontends/cx24117.c +reject_firmware drivers/media/dvb-frontends/cx24117.c +clean_blob drivers/media/dvb-frontends/cx24117.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_CX24117' +clean_mk CONFIG_DVB_CX24117 drivers/media/dvb-frontends/Makefile + +announce DVB_DS3000 - "Montage Tehnology DS3000 based" +undefault_firmware 'DS3000' \ + drivers/media/dvb-frontends/ds3000.c +reject_firmware drivers/media/dvb-frontends/ds3000.c +clean_blob drivers/media/dvb-frontends/ds3000.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_DS3000' +clean_mk CONFIG_DVB_DS3000 drivers/media/dvb-frontends/Makefile + +announce DVB_DRX39XYJ - "Micronas DRX-J demodulator" +reject_firmware drivers/media/dvb-frontends/drx39xyj/drxj.c +clean_blob drivers/media/dvb-frontends/drx39xyj/drxj.c +clean_kconfig drivers/media/dvb-frontends/drx39xyj/Kconfig 'DVB_DRX39XYJ' +clean_mk CONFIG_DVB_DRX39XYJ drivers/media/dvb-frontends/drx39xyj/Makefile + +announce DVB_LGS8GXX - "Legend Silicon LGS8913/LGS8GL5/LGS8GXX DMB-TH demodulator" +reject_firmware drivers/media/dvb-frontends/lgs8gxx.c +clean_blob drivers/media/dvb-frontends/lgs8gxx.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_LGS8GXX' +clean_mk CONFIG_DVB_LGS8GXX drivers/media/dvb-frontends/Makefile + +announce DVB_M88DS3103 - "Montage M88DS3103" +reject_firmware drivers/media/dvb-frontends/m88ds3103.c +clean_blob drivers/media/dvb-frontends/m88ds3103.c +clean_blob drivers/media/dvb-frontends/m88ds3103_priv.h +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_M88DS3103' +clean_mk CONFIG_DVB_M88DS3103 drivers/media/dvb-frontends/Makefile + +announce DVB_NXT200X - "NxtWave Communications NXT2002/NXT2004 based" +undefault_firmware 'NXT200[24]' drivers/media/dvb-frontends/nxt200x.c +reject_firmware drivers/media/dvb-frontends/nxt200x.c +clean_blob drivers/media/dvb-frontends/nxt200x.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_NXT200X' +clean_mk CONFIG_DVB_NXT200X drivers/media/dvb-frontends/Makefile + +announce DVB_OR51132 - "Oren OR51132 based" +reject_firmware drivers/media/dvb-frontends/or51132.c +clean_blob drivers/media/dvb-frontends/or51132.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_OR51132' +clean_mk CONFIG_DVB_OR51132 drivers/media/dvb-frontends/Makefile + +announce DVB_OR51211 - "Oren OR51211 based" +undefault_firmware 'OR51211' drivers/media/dvb-frontends/or51211.c +clean_blob drivers/media/dvb-frontends/or51211.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_OR51211' +clean_mk CONFIG_DVB_OR51211 drivers/media/dvb-frontends/Makefile + +announce DVB_SI2165 - "Silicon Labs si2165 based" +reject_firmware drivers/media/dvb-frontends/si2165.c +clean_blob drivers/media/dvb-frontends/si2165.c +clean_blob drivers/media/dvb-frontends/si2165_priv.h +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_SI2165' +clean_mk CONFIG_DVB_SI2165 drivers/media/dvb-frontends/Makefile + +announce DVB_SI2168 - "Silicon Labs Si2168" +reject_firmware drivers/media/dvb-frontends/si2168.c +clean_blob drivers/media/dvb-frontends/si2168.c +clean_blob drivers/media/dvb-frontends/si2168_priv.h +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_SI2168' +clean_mk CONFIG_DVB_SI2168 drivers/media/dvb-frontends/Makefile + +announce DVB_SP8870 - "Spase sp8870" +undefault_firmware 'SP8870' drivers/media/dvb-frontends/sp8870.c +clean_blob drivers/media/dvb-frontends/sp8870.c +clean_kconfig drivers/media/dvb-frontends 'DVB_SP8870' +clean_mk CONFIG_DVB_SP8870 drivers/media/dvb-frontends/Makefile + +announce DVB_SP887X - "Spase sp887x based" +undefault_firmware 'SP887X' drivers/media/dvb-frontends/sp887x.c +clean_blob drivers/media/dvb-frontends/sp887x.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_SP887X' +clean_mk CONFIG_DVB_SP887X drivers/media/dvb-frontends/Makefile + +announce DVB_TDA10048 - "Philips TDA10048HN based" +undefine_macro 'TDA10048_DEFAULT_FIRMWARE_SIZE' 0 \ + 'removed non-Free firmware size' drivers/media/dvb-frontends/tda10048.c +undefault_firmware 'TDA10048' drivers/media/dvb-frontends/tda10048.c +reject_firmware drivers/media/dvb-frontends/tda10048.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_TDA10048' +clean_mk CONFIG_DVB_TDA10048 drivers/media/dvb-frontends/Makefile + +announce DVB_TDA1004X - "Philips TDA10045H/TDA10046H" +undefault_firmware 'TDA1004[56]' drivers/media/dvb-frontends/tda1004x.c +clean_blob drivers/media/dvb-frontends/tda1004x.c +clean_kconfig drivers/media/dvb-frontends 'DVB_TDA1004X' +clean_mk CONFIG_DVB_TDA1004X drivers/media/dvb-frontends/Makefile + +announce DVB_TDA10071 - "NXP TDA10071" +reject_firmware drivers/media/dvb-frontends/tda10071.c +clean_blob drivers/media/dvb-frontends/tda10071.c +clean_blob drivers/media/dvb-frontends/tda10071_priv.h +clean_kconfig drivers/media/dvb-frontends 'DVB_TDA10071' +clean_mk CONFIG_DVB_TDA10071 drivers/media/dvb-frontends/Makefile + +# dvb + +announce DVB_AS102 - "Abilis AS102 DVB receiver" +reject_firmware drivers/media/usb/as102/as102_fw.c +clean_blob drivers/media/usb/as102/as102_fw.c +clean_kconfig drivers/media/usb/as102/Kconfig 'DVB_AS102' +clean_mk CONFIG_DVB_AS102 drivers/media/usb/as102/Makefile + +announce DVB_AV7110 - "AV7110 cards" +reject_firmware drivers/media/pci/ttpci/av7110.c +clean_blob drivers/media/pci/ttpci/av7110.c +clean_kconfig drivers/media/pci/ttpci/Kconfig 'DVB_AV7110' +clean_mk CONFIG_DVB_AV7110 drivers/media/pci/ttpci/Makefile + +announce DVB_BUDGET - "Budget cards" +reject_firmware drivers/media/pci/ttpci/budget.c + +announce DVB_BUDGET_AV - "Budget cards with analog video inputs" +reject_firmware drivers/media/pci/ttpci/budget-av.c + +announce DVB_BUDGET_CI - "Budget cards with onboard CI connector" +reject_firmware drivers/media/pci/ttpci/budget-ci.c + +announce DVB_DRXD - "Micronas DRXD driver" +reject_firmware drivers/media/dvb-frontends/drxd_hard.c +clean_blob drivers/media/dvb-frontends/drxd_hard.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_DRXD' +clean_mk CONFIG_DVB_DRXD drivers/media/dvb-frontends/Makefile + +announce DVB_DRXK - "Micronas DRXK based" +reject_firmware drivers/media/dvb-frontends/drxk_hard.c +clean_kconfig drivers/media/dvb-frontends/Kconfig 'DVB_DRXK' +clean_mk CONFIG_DVB_DRXK drivers/media/dvb-frontends/Makefile + +announce DVB_NGENE - "Micronas nGene support" +reject_firmware drivers/media/pci/ngene/ngene-core.c +clean_blob drivers/media/pci/ngene/ngene-core.c +clean_kconfig drivers/media/pci/ngene/Kconfig 'DVB_NGENE' +clean_mk CONFIG_DVB_NGENE drivers/media/pci/ngene/Makefile + +announce DVB_PLUTO2 - "Pluto2 cards" +reject_firmware drivers/media/pci/pluto2/pluto2.c + +announce SMS_SIANO_MDTV - "Siano SMS1xxx based MDTV receiver" +reject_firmware drivers/media/common/siano/smscoreapi.c +clean_blob drivers/media/common/siano/smscoreapi.c +clean_blob drivers/media/common/siano/smscoreapi.h +clean_kconfig drivers/media/common/siano/Kconfig 'SMS_SIANO_MDTV' +clean_mk CONFIG_SMS_SIANO_MDTV drivers/media/common/siano/Makefile + +announce SMS_USB_DRV - "Siano's USB interface support" +reject_firmware drivers/media/usb/siano/smsusb.c +clean_blob drivers/media/usb/siano/smsusb.c +clean_kconfig drivers/media/usb/siano/Kconfig 'SMS_USB_DRV' +clean_mk CONFIG_SMS_USB_DRV drivers/media/usb/siano/Makefile + +announce DVB_TTUSB_BUDGET - "Technotrend/Hauppauge Nova-USB devices" +drop_fw_file firmware/ttusb-budget/dspbootcode.bin.ihex firmware/ttusb-budget/dspbootcode.bin +reject_firmware drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c +clean_blob drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c +clean_kconfig drivers/media/usb/ttusb-budget/Kconfig 'DVB_TTUSB_BUDGET' +clean_mk CONFIG_DVB_TTUSB_BUDGET drivers/media/usb/ttusb-budget/Makefile + +announce DVB_TTUSB_DEC - "Technotrend/Hauppauge USB DEC devices" +reject_firmware drivers/media/usb/ttusb-dec/ttusb_dec.c +clean_blob drivers/media/usb/ttusb-dec/ttusb_dec.c +clean_blob Documentation/dvb/ttusb-dec.txt +clean_kconfig drivers/media/usb/ttusb-dec/Kconfig 'DVB_TTUSB_DEC' +clean_mk CONFIG_DVB_TTUSB_DEC drivers/media/usb/ttusb-dec/Makefile + +# video + +announce VIDEO_BT848 - "BT848 Video For Linux" +reject_firmware drivers/media/pci/bt8xx/bttv-cards.c +clean_blob drivers/media/pci/bt8xx/bttv-cards.c +clean_blob Documentation/video4linux/bttv/README +clean_kconfig drivers/media/pci/bt8xx/Kconfig 'VIDEO_BT848' +clean_mk CONFIG_VIDEO_BT848 drivers/media/pci/bt8xx/Makefile + +announce VIDEO_CODA - "Chips&Media Coda multi-standard codec IP" +reject_firmware drivers/media/platform/coda/coda-common.c +clean_blob drivers/media/platform/coda/coda-common.c +clean_kconfig drivers/media/platform/Kconfig 'VIDEO_CODA' +clean_mk CONFIG_VIDEO_CODA drivers/media/platform/coda/Makefile + +announce VIDEO_CPIA2 - "CPiA2 Video For Linux" +clean_fw firmware/cpia2/stv0672_vp4.bin.ihex firmware/cpia2/stv0672_vp4.bin +reject_firmware drivers/media/usb/cpia2/cpia2_core.c +clean_blob drivers/media/usb/cpia2/cpia2_core.c +clean_kconfig drivers/media/usb/cpia2/Kconfig 'VIDEO_CPIA2' +clean_mk CONFIG_VIDEO_CPIA2 drivers/media/usb/cpia2/Makefile + +announce VIDEO_CX18 - "Conexant cx23418 MPEG encoder support" +reject_firmware drivers/media/pci/cx18/cx18-av-firmware.c +reject_firmware drivers/media/pci/cx18/cx18-dvb.c +reject_firmware drivers/media/pci/cx18/cx18-firmware.c +clean_blob drivers/media/pci/cx18/cx18-av-firmware.c +clean_blob drivers/media/pci/cx18/cx18-dvb.c +clean_blob drivers/media/pci/cx18/cx18-firmware.c +clean_blob drivers/media/pci/cx18/cx18-driver.c +clean_kconfig drivers/media/pci/cx18/Kconfig 'VIDEO_CX18' +clean_mk CONFIG_VIDEO_CX18 drivers/media/pci/cx18/Makefile + +announce VIDEO_CX231XX - "Conexant cx231xx USB video capture support" +reject_firmware drivers/media/usb/cx231xx/cx231xx-417.c +clean_blob drivers/media/usb/cx231xx/cx231xx-417.c +clean_kconfig drivers/media/usb/cx231xx/Kconfig 'VIDEO_CX231XX' +clean_mk CONFIG_VIDEO_CX231XX drivers/media/usb/cx231xx/Makefile + +announce VIDEO_CX23885 - "Conexant cx23885 (2388x successor) support" +reject_firmware drivers/media/pci/cx23885/cx23885-417.c +clean_blob drivers/media/pci/cx23885/cx23885-417.c +reject_firmware drivers/media/pci/cx23885/cx23885-cards.c +clean_blob drivers/media/pci/cx23885/cx23885-cards.c +clean_blob drivers/media/pci/cx23885/cx23885-video.c +clean_kconfig drivers/media/pci/cx23885/Kconfig 'VIDEO_CX23885' +clean_mk CONFIG_VIDEO_CX23885 drivers/media/pci/cx23885/Makefile + +announce VIDEO_CX25840 - "Conexant CX2584x audio/video decoders" +reject_firmware drivers/media/i2c/cx25840/cx25840-firmware.c +clean_blob drivers/media/i2c/cx25840/cx25840-firmware.c +clean_kconfig drivers/media/i2c/cx25840/Kconfig 'VIDEO_CX25840' +clean_mk CONFIG_VIDEO_CX25840 drivers/media/i2c/cx25840/Makefile + +announce VIDEO_CX88_BLACKBIRD - "Blackbird MPEG encoder support (cx2388x + cx23416)" +reject_firmware drivers/media/pci/cx88/cx88-blackbird.c +clean_kconfig drivers/media/pci/cx88/Kconfig 'VIDEO_CX88_BLACKBIRD' +clean_mk CONFIG_VIDEO_CX88_BLACKBIRD drivers/media/pci/cx88/Makefile + +announce VIDEO_EM28XX_DVB - "DVB/ATSC Support for em28xx based TV cards" +clean_blob drivers/media/usb/em28xx/em28xx-dvb.c +clean_kconfig drivers/media/usb/em28xx/Kconfig 'VIDEO_EM28XX_DVB' +clean_mk CONFIG_VIDEO_EM28XX_DVB drivers/media/usb/em28xx/Makefile + +announce VIDEO_EXYNOS4_FIMC_IS - "EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver" +reject_firmware drivers/media/platform/exynos4-is/fimc-is.c +clean_blob drivers/media/platform/exynos4-is/fimc-is.h +clean_kconfig drivers/media/platform/exynos4-is/Kconfig 'VIDEO_EXYNOS4_FIMC_IS' +clean_mk CONFIG_VIDEO_EXYNOS4_FIMC_IS drivers/media/platform/exynos4-is/Makefile + +announce VIDEO_IVTV - "Conexant cx23416/cx23415 MPEG encoder/decoder support" +reject_firmware drivers/media/pci/ivtv/ivtv-firmware.c +clean_blob drivers/media/pci/ivtv/ivtv-firmware.c +clean_kconfig drivers/media/pci/ivtv/Kconfig 'VIDEO_IVTV' +clean_mk CONFIG_VIDEO_IVTV drivers/media/pci/ivtv/Makefile + +announce VIDEO_PVRUSB2 - "Hauppauge WinTV-PVR USB2 support" +reject_firmware drivers/media/usb/pvrusb2/pvrusb2-hdw.c +clean_blob drivers/media/usb/pvrusb2/pvrusb2-devattr.c +clean_kconfig drivers/media/usb/pvrusb2/Kconfig 'VIDEO_PVRUSB2' +clean_mk CONFIG_VIDEO_PVRUSB2 drivers/media/usb/pvrusb2/Makefile + +announce "VIDEO_CX23885, VIDEO_CX88_BLACKBIRD, VIDEO_IVTV, VIDEO_PVRUSB2" - "See above" +clean_blob include/media/cx2341x.h + +announce VIDEO_GO7007 - "Go 7007 support" +reject_firmware drivers/media/usb/go7007/go7007-driver.c +clean_blob drivers/media/usb/go7007/go7007-driver.c +reject_firmware drivers/media/usb/go7007/go7007-fw.c +clean_blob drivers/media/usb/go7007/go7007-fw.c +clean_kconfig drivers/media/usb/go7007/Kconfig 'VIDEO_GO7007' +clean_mk CONFIG_VIDEO_GO7007 drivers/media/usb/go7007/Makefile + +announce VIDEO_GO7007_USB_S2250_BOARD - "Sensoray 2250/2251 support" +reject_firmware drivers/media/usb/go7007/go7007-loader.c +clean_blob drivers/media/usb/go7007/go7007-loader.c +clean_kconfig drivers/media/usb/go7007/Kconfig 'VIDEO_GO7007_USB_S2250_BOARD' +clean_mk CONFIG_VIDEO_GO7007_USB_S2250_BOARD drivers/media/usb/go7007/Makefile + +announce VIDEO_SAA7134_DVB - "DVB/ATSC Support for saa7134 based TV cards" +reject_firmware drivers/media/pci/saa7134/saa7134-dvb.c +clean_kconfig drivers/media/pci/saa7134/Kconfig 'VIDEO_SAA7134_DVB' +clean_mk CONFIG_VIDEO_SAA7134_DVB drivers/media/pci/saa7134/Makefile + +announce VIDEO_SAA7134_GO7007 - "go7007 support for saa7134 based TV cards" +clean_blob drivers/media/pci/saa7134/saa7134-go7007.c +clean_kconfig drivers/media/pci/saa7134/Kconfig 'VIDEO_SAA7134_GO7007' +clean_mk CONFIG_VIDEO_SAA7134_GO7007 drivers/media/pci/saa7134/Makefile + +announce VIDEO_SAA7164 - "NXP SAA7164 support" +reject_firmware drivers/media/pci/saa7164/saa7164-fw.c +clean_blob drivers/media/pci/saa7164/saa7164-fw.c +clean_kconfig drivers/media/pci/saa7164/Kconfig 'VIDEO_SAA7164' +clean_mk CONFIG_VIDEO_SAA7164 drivers/media/pci/saa7164/Makefile + +announce VIDEO_S5C73M3 - "Samsung S5C73M3 sensor support" +reject_firmware drivers/media/i2c/s5c73m3/s5c73m3-core.c +clean_blob drivers/media/i2c/s5c73m3/s5c73m3-core.c +clean_kconfig drivers/media/i2c/Kconfig 'VIDEO_S5C73M3' +clean_mk CONFIG_VIDEO_S5C73M3 drivers/media/i2c/s5c73m3/Makefile + +announce VIDEO_S5K4ECGX - "Samsung S5K4ECGX sensor support" +reject_firmware drivers/media/i2c/s5k4ecgx.c +clean_blob drivers/media/i2c/s5k4ecgx.c +clean_kconfig drivers/media/i2c/Kconfig 'VIDEO_S5K4ECGX' +clean_mk CONFIG_VIDEO_S5K4ECGX drivers/media/i2c/Makefile + +announce VIDEO_S5K5BAF - "Samsung S5K5BAF sensor support" +reject_firmware drivers/media/i2c/s5k5baf.c +clean_blob drivers/media/i2c/s5k5baf.c +clean_kconfig drivers/media/i2c/Kconfig 'VIDEO_S5K5BAF' +clean_mk CONFIG_VIDEO_S5K5BAF drivers/media/i2c/Makefile + +announce VIDEO_SAMSUNG_S5P_MFC - "Samsung S5P MFC 5.1 Video Codec" +reject_firmware drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +clean_blob drivers/media/platform/s5p-mfc/s5p_mfc.c +clean_kconfig drivers/media/platform/Kconfig 'VIDEO_SAMSUNG_S5P_MFC' +clean_mk CONFIG_VIDEO_SAMSUNG_S5P_MFC drivers/media/platform/s5p-mfc/Makefile + +announce VIDEO_TLG2300 - "Telegent TLG2300 USB video capture support" +reject_firmware drivers/media/usb/tlg2300/pd-main.c +clean_blob drivers/media/usb/tlg2300/pd-main.c +clean_kconfig drivers/media/usb/tlg2300/Kconfig 'VIDEO_TLG2300' +clean_mk CONFIG_VIDEO_TLG2300 drivers/media/usb/tlg2300/Makefile + +announce USB_S2255 - "USB Sensoray 2255 video capture device" +reject_firmware drivers/media/usb/s2255/s2255drv.c +clean_blob drivers/media/usb/s2255/s2255drv.c +clean_kconfig drivers/media/usb/Kconfig 'USB_S2255' +clean_mk CONFIG_USB_S2255 drivers/media/usb/s2255/Makefile + +announce USB_GSPCA_VICAM - "USB 3com HomeConnect, AKA vicam" +drop_fw_file firmware/vicam/firmware.H16 firmware/vicam/firmware.fw +reject_firmware drivers/media/usb/gspca/vicam.c +clean_blob drivers/media/usb/gspca/vicam.c +clean_kconfig drivers/media/usb/gspca/Kconfig 'USB_GSPCA_VICAM' +clean_mk CONFIG_USB_GSPCA_VICAM drivers/media/usb/gspca/Makefile + +announce VIDEO_TI_VPE - "TI VPE (Video Processing Engine) driver" +reject_firmware drivers/media/platform/ti-vpe/vpdma.c +clean_blob drivers/media/platform/ti-vpe/vpdma.c +clean_kconfig drivers/media/platform/Kconfig 'VIDEO_TI_VPE' +clean_mk CONFIG_VIDEO_TI_VPE drivers/media/platform/ti-vpe/Makefile + +# radio + +announce RADIO_WL1273 - "Texas Instruments WL1273 I2C FM Radio" +reject_firmware drivers/media/radio/radio-wl1273.c +clean_blob drivers/media/radio/radio-wl1273.c +clean_kconfig drivers/media/radio/Kconfig 'RADIO_WL1273' +clean_mk CONFIG_RADIO_WL1273 drivers/media/radio/Makefile + +announce RADIO_WL128X - "Texas Instruments WL128x FM Radio" +clean_blob drivers/media/radio/wl128x/fmdrv_common.h +reject_firmware drivers/media/radio/wl128x/fmdrv_common.c +clean_blob drivers/media/radio/wl128x/fmdrv_common.c +clean_kconfig drivers/media/radio/Kconfig 'RADIO_WL128X' +clean_mk CONFIG_RADIO_WL128X drivers/media/radio/Makefile + +####### +# net # +####### + +announce ACENIC - "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit" +drop_fw_file firmware/acenic/tg1.bin.ihex firmware/acenic/tg1.bin +drop_fw_file firmware/acenic/tg2.bin.ihex firmware/acenic/tg2.bin +reject_firmware drivers/net/ethernet/alteon/acenic.c +clean_blob drivers/net/ethernet/alteon/acenic.c +clean_kconfig drivers/net/ethernet/alteon/Kconfig 'ACENIC' +clean_mk CONFIG_ACENIC drivers/net/ethernet/alteon/Makefile + +announce ADAPTEC_STARFIRE - "Adaptec Starfire/DuraLAN support" +clean_fw firmware/adaptec/starfire_rx.bin.ihex firmware/adaptec/starfire_rx.bin +clean_fw firmware/adaptec/starfire_tx.bin.ihex firmware/adaptec/starfire_tx.bin +reject_firmware drivers/net/ethernet/adaptec/starfire.c +clean_blob drivers/net/ethernet/adaptec/starfire.c +clean_kconfig drivers/net/ethernet/adaptec/Kconfig 'ADAPTEC_STARFIRE' +clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/ethernet/adaptec/Makefile + +announce BNA - "Brocade 1010/1020 10Gb Ethernet Driver support" +clean_blob drivers/net/ethernet/brocade/bna/bnad.c +clean_blob drivers/net/ethernet/brocade/bna/cna.h +reject_firmware drivers/net/ethernet/brocade/bna/bnad_ethtool.c +reject_firmware drivers/net/ethernet/brocade/bna/cna_fwimg.c +clean_kconfig drivers/net/ethernet/brocade/bna/Kconfig 'BNA' +clean_mk CONFIG_BNA drivers/net/ethernet/brocade/bna/Makefile + +announce BNX2 - "Broadcom NetXtremeII" +drop_fw_file firmware/bnx2/bnx2-mips-09-6.2.1a.fw.ihex firmware/bnx2/bnx2-mips-09-6.2.1a.fw +drop_fw_file firmware/bnx2/bnx2-rv2p-09-6.0.17.fw.ihex firmware/bnx2/bnx2-rv2p-09-6.0.17.fw +drop_fw_file firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw.ihex firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw +drop_fw_file firmware/bnx2/bnx2-mips-06-6.2.1.fw.ihex firmware/bnx2/bnx2-mips-06-6.2.1.fw +drop_fw_file firmware/bnx2/bnx2-rv2p-06-6.0.15.fw.ihex firmware/bnx2/bnx2-rv2p-06-6.0.15.fw +reject_firmware drivers/net/ethernet/broadcom/bnx2.c +clean_blob drivers/net/ethernet/broadcom/bnx2.c +clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'BNX2' +clean_mk CONFIG_BNX2 drivers/net/ethernet/broadcom/Makefile + +announce BNX2X - "Broadcom NetXtremeII 10Gb support" +drop_fw_file firmware/bnx2x/bnx2x-e1-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e1-6.2.9.0.fw +drop_fw_file firmware/bnx2x/bnx2x-e1h-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e1h-6.2.9.0.fw +drop_fw_file firmware/bnx2x/bnx2x-e2-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e2-6.2.9.0.fw +reject_firmware drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +clean_sed ' +/^#include "bnx2x_init\.h"/,/^$/{ + /^$/i\ +#define bnx2x_init_block(bp, start, end) \\\ + return (printk(KERN_ERR "%s: Missing Free firmware\\n", bp->dev->name),\\\ + -EINVAL) +}' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 'report missing Free firmware' +clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +clean_sed ' +/^int bnx2x_compare_fw_ver/,/^}$/{ + /^ u32 my_fw = /i\ + /*(DEBLOBBED)*/ + /^ u32 my_fw = /,/<< 24);/d; + /^ u32 loaded_fw = /,/^$/{ + /^$/i\ +\ + u32 my_fw = ~loaded_fw; + } +}' drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 'fail already-loaded test' +clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h +clean_sed ' +/static void bnx2x_init_wr_wb/{ + i\ +extern void bnx2x_init_wr_wb(struct bnx2x *, u32, const u32 *, u32); +}' drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h 'declare removed function' +clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h +clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'BNX2X' +clean_mk CONFIG_BNX2X drivers/net/ethernet/broadcom/bnx2x/Makefile + +announce CASSINI - "Sun Cassini" +drop_fw_file firmware/sun/cassini.bin.ihex firmware/sun/cassini.bin +reject_firmware drivers/net/ethernet/sun/cassini.c +clean_blob drivers/net/ethernet/sun/cassini.c +clean_kconfig drivers/net/ethernet/sun/Kconfig 'CASSINI' +clean_mk CONFIG_CASSINI drivers/net/ethernet/sun/Makefile + +announce CHELSIO_T3 - "Chelsio AEL 2005 support" +drop_fw_file firmware/cxgb3/t3b_psram-1.1.0.bin.ihex firmware/cxgb3/t3b_psram-1.1.0.bin +drop_fw_file firmware/cxgb3/t3c_psram-1.1.0.bin.ihex firmware/cxgb3/t3c_psram-1.1.0.bin +drop_fw_file firmware/cxgb3/ael2005_opt_edc.bin.ihex firmware/cxgb3/ael2005_opt_edc.bin +drop_fw_file firmware/cxgb3/ael2005_twx_edc.bin.ihex firmware/cxgb3/ael2005_twx_edc.bin +drop_fw_file firmware/cxgb3/ael2020_twx_edc.bin.ihex firmware/cxgb3/ael2020_twx_edc.bin +reject_firmware drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +clean_blob drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +clean_kconfig drivers/net/ethernet/chelsio/Kconfig 'CHELSIO_T3' +clean_mk CONFIG_CHELSIO_T3 drivers/net/ethernet/chelsio/cxgb3/Makefile + +announce CHELSIO_T4 - "Chelsio Communications T4 Ethernet support" +reject_firmware drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +clean_blob drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +clean_kconfig drivers/net/ethernet/chelsio/Kconfig 'CHELSIO_T4' +clean_mk CONFIG_CHELSIO_T4 drivers/net/ethernet/chelsio/cxgb4/Makefile + +announce E100 - "Intel PRO/100+" +drop_fw_file firmware/e100/d101m_ucode.bin.ihex firmware/e100/d101m_ucode.bin +drop_fw_file firmware/e100/d101s_ucode.bin.ihex firmware/e100/d101s_ucode.bin +drop_fw_file firmware/e100/d102e_ucode.bin.ihex firmware/e100/d102e_ucode.bin +reject_firmware drivers/net/ethernet/intel/e100.c +clean_sed ' +/^static const struct firmware \*e100_\(reject\|request\)_firmware(/,/^}$/{ + s:^\(.*\)return ERR_PTR(err);$:\1netif_err(nic, probe, nic->netdev, "Proceeding without firmware\\n");\n\1return NULL;: +}' drivers/net/ethernet/intel/e100.c 'proceed without firmware' +clean_blob drivers/net/ethernet/intel/e100.c +clean_kconfig drivers/net/ethernet/intel/Kconfig 'E100' +clean_mk CONFIG_E100 drivers/net/ethernet/intel/Makefile + +announce FT1000_PCMCIA - "Driver for ft1000 pcmcia device." +clean_file drivers/staging/ft1000/ft1000-pcmcia/ft1000.img +clean_blob drivers/staging/ft1000/ft1000-pcmcia/boot.h +clean_sed ' +/^static int ft1000_reset_card/,/^}$/ { + /card_bootload/i\ + return /*(DEBLOBBED)*/ false; +} +' drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c \ + 'disabled non-Free firmware-loading machinery' +reject_firmware drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +clean_blob drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +clean_kconfig drivers/staging/ft1000/Kconfig 'FT1000_PCMCIA' +clean_mk CONFIG_FT1000_PCMCIA drivers/staging/ft1000/Makefile + +announce FT1000_USB - "Driver for ft1000 USB devices." +clean_file drivers/staging/ft1000/ft1000-usb/ft3000.img +reject_firmware drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +clean_blob drivers/staging/ft1000/ft1000-usb/ft1000_usb.c +clean_kconfig drivers/staging/ft1000/Kconfig 'FT1000_USB' +clean_mk CONFIG_FT1000_USB drivers/staging/ft1000/Makefile + +announce MYRI_SBUS - "MyriCOM Gigabit Ethernet" +drop_fw_file firmware/myricom/lanai.bin.ihex firmware/myricom/lanai.bin + +announce MYRI10GE - "Myricom Myri-10G Ethernet support" +reject_firmware drivers/net/ethernet/myricom/myri10ge/myri10ge.c +clean_blob drivers/net/ethernet/myricom/myri10ge/myri10ge.c +clean_kconfig drivers/net/ethernet/myricom/Kconfig 'MYRI10GE' +clean_mk CONFIG_MYRI10GE drivers/net/ethernet/myricom/myri10ge/Makefile + +announce NETXEN_NIC - "NetXen Multi port (1/10) Gigabit Ethernet NIC" +reject_firmware drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +clean_blob drivers/net/ethernet/qlogic/netxen/netxen_nic.h +clean_blob drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +clean_kconfig drivers/net/ethernet/qlogic/Kconfig 'NETXEN_NIC' +clean_mk CONFIG_NETXEN_NIC drivers/net/ethernet/qlogic/Makefile + +announce QLCNIC - "QLOGIC QLCNIC 1/10Gb Converged Ethernet NIC Support" +reject_firmware drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +reject_firmware drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +clean_blob drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +clean_blob drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +clean_blob drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +clean_kconfig drivers/net/ethernet/qlogic/Kconfig 'QLCNIC' +clean_mk CONFIG_QLCNIC drivers/net/ethernet/qlogic/qlcnic/Makefile + +announce R8169 - "Realtek 8169 gigabit ethernet support" +reject_firmware drivers/net/ethernet/realtek/r8169.c +clean_blob drivers/net/ethernet/realtek/r8169.c +clean_kconfig drivers/net/ethernet/realtek/Kconfig R8169 +clean_mk CONFIG_R8169 drivers/net/ethernet/realtek/Makefile + +announce SLICOSS - "Alacritech Gigabit IS-NIC cards" +reject_firmware drivers/staging/slicoss/slicoss.c +clean_blob drivers/staging/slicoss/slicoss.c +clean_kconfig drivers/staging/slicoss/Kconfig 'SLICOSS' +clean_mk CONFIG_SLICOSS drivers/staging/slicoss/Makefile + +announce SPIDER_NET - "Spider Gigabit Ethernet driver" +reject_firmware drivers/net/ethernet/toshiba/spider_net.c +clean_sed 's,spider_fw\.bin,DEBLOBBED.bin,g' \ + drivers/net/ethernet/toshiba/spider_net.c 'removed non-Free firmware notes' +clean_blob drivers/net/ethernet/toshiba/spider_net.c +clean_blob drivers/net/ethernet/toshiba/spider_net.h +clean_kconfig drivers/net/ethernet/toshiba/Kconfig 'SPIDER_NET' +clean_mk CONFIG_SPIDER_NET drivers/net/ethernet/toshiba/Makefile + +announce TEHUTI - "Tehuti Networks 10G Ethernet" +drop_fw_file firmware/tehuti/bdx.bin.ihex firmware/tehuti/bdx.bin +reject_firmware drivers/net/ethernet/tehuti/tehuti.c +clean_blob drivers/net/ethernet/tehuti/tehuti.c +clean_kconfig drivers/net/ethernet/tehuti/Kconfig 'TEHUTI' +clean_mk CONFIG_TEHUTI drivers/net/ethernet/tehuti/Makefile + +announce TIGON3 - "Broadcom Tigon3" +drop_fw_file firmware/tigon/tg3.bin.ihex firmware/tigon/tg3.bin +drop_fw_file firmware/tigon/tg3_tso.bin.ihex firmware/tigon/tg3_tso.bin +drop_fw_file firmware/tigon/tg3_tso5.bin.ihex firmware/tigon/tg3_tso5.bin +reject_firmware drivers/net/ethernet/broadcom/tg3.c +clean_blob drivers/net/ethernet/broadcom/tg3.c +clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'TIGON3' +clean_mk CONFIG_TIGON3 drivers/net/ethernet/broadcom/Makefile + +announce TYPHOON - "3cr990 series Typhoon" +drop_fw_file firmware/3com/typhoon.bin.ihex firmware/3com/typhoon.bin +reject_firmware drivers/net/ethernet/3com/typhoon.c +clean_blob drivers/net/ethernet/3com/typhoon.c +clean_kconfig drivers/net/ethernet/3com/Kconfig 'TYPHOON' +clean_mk CONFIG_TYPHOON drivers/net/ethernet/3com/Makefile + +announce VXGE - "Exar X3100 Series 10GbE PCIe Server Adapter" +reject_firmware drivers/net/ethernet/neterion/vxge/vxge-main.c +clean_blob drivers/net/ethernet/neterion/vxge/vxge-main.c +clean_kconfig drivers/net/ethernet/neterion/Kconfig 'VXGE' +clean_mk CONFIG_VXGE drivers/net/ethernet/neterion/vxge/Makefile + +# appletalk + +announce COPS - "COPS LocalTalk PC" +clean_sed ' +/sizeof(\(ff\|lt\)drv_code)/{ + i\ + printk(KERN_INFO "%s: Missing Free firmware.\\n", dev->name);\ + return; +} +/\(ff\|lt\)drv_code/d; +' drivers/net/appletalk/cops.c 'report missing Free firmware' +clean_blob drivers/net/appletalk/cops.c +clean_file drivers/net/appletalk/cops_ffdrv.h +clean_file drivers/net/appletalk/cops_ltdrv.h +clean_kconfig drivers/net/appletalk/Kconfig 'COPS' +clean_mk CONFIG_COPS drivers/net/appletalk/Makefile + +# hamradio + +announce YAM - "YAM driver for AX.25" +drop_fw_file firmware/yam/1200.bin.ihex firmware/yam/1200.bin +drop_fw_file firmware/yam/9600.bin.ihex firmware/yam/9600.bin +reject_firmware drivers/net/hamradio/yam.c +clean_blob drivers/net/hamradio/yam.c +clean_kconfig drivers/net/hamradio/Kconfig 'YAM' +clean_mk CONFIG_YAM drivers/net/hamradio/Makefile + +# irda + +announce USB_IRDA - "IrDA USB dongles" +reject_firmware drivers/net/irda/irda-usb.c +clean_blob drivers/net/irda/irda-usb.c +clean_kconfig drivers/net/irda/Kconfig 'USB_IRDA' +clean_mk CONFIG_USB_IRDA drivers/net/irda/Makefile + +# smsc + +announce PCMCIA_SMC91C92 - "SMC 91Cxx PCMCIA" +drop_fw_file firmware/ositech/Xilinx7OD.bin.ihex firmware/ositech/Xilinx7OD.bin +reject_firmware drivers/net/ethernet/smsc/smc91c92_cs.c +clean_blob drivers/net/ethernet/smsc/smc91c92_cs.c +clean_kconfig drivers/net/ethernet/smsc/Kconfig 'PCMCIA_SMC91C92' +clean_mk CONFIG_PCMCIA_SMC91C92 drivers/net/ethernet/smsc/Makefile + +# near-field communication + +announce NFC_WILINK - "Texas Instruments NFC WiLink driver" +reject_firmware drivers/nfc/nfcwilink.c +clean_blob drivers/nfc/nfcwilink.c +clean_kconfig drivers/nfc/Kconfig 'NFC_WILINK' +clean_mk CONFIG_NFC_WILINK drivers/nfc/Makefile + +announce NFC_PN544_I2C - "NFC PN544 i2c support" +reject_firmware drivers/nfc/pn544/i2c.c +clean_kconfig drivers/nfs/pn544/Kconfig 'NFC_PN544_I2C' +clean_mk NFC_PN544_I2C drivers/nfc/pn544/Kconfig + +# pcmcia + +# CIS files are not software. +# announce PCCARD - "PCCard (PCMCIA/CardBus) support" +# reject_firmware drivers/pcmcia/ds.c +# clean_kconfig drivers/pcmcia/Kconfig 'PCCARD' +# clean_mk CONFIG_PCCARD drivers/pcmcia/Makefile + +announce PCMCIA_3C574 - "3Com 3c574 PCMCIA support" +# This is not software; it's Free, but GPLed without in-tree sources. +drop_fw_file firmware/cis/3CCFEM556.cis.ihex firmware/cis/3CCFEM556.cis +# clean_blob drivers/net/pcmcia/3c574_cs.c +# clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C574' +# clean_mk CONFIG_PCMCIA_3C574 drivers/net/pcmcia/Makefile + +announce PCMCIA_3C589 - "3Com 3c589 PCMCIA support" +# This is not software; it's Free, but GPLed without in-tree sources. +drop_fw_file firmware/cis/3CXEM556.cis.ihex firmware/cis/3CXEM556.cis +# clean_blob drivers/net/pcmcia/3c589_cs.c +# clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_3C589' +# clean_mk CONFIG_PCMCIA_3C589 drivers/net/pcmcia/Makefile + +announce PCMCIA_PCNET - "NE2000 compatible PCMCIA support" +# These are not software; they're Free, but GPLed without in-tree sources. +drop_fw_file firmware/cis/LA-PCM.cis.ihex firmware/cis/LA-PCM.cis +drop_fw_file firmware/cis/PCMLM28.cis.ihex firmware/cis/PCMLM28.cis +drop_fw_file firmware/cis/DP83903.cis.ihex firmware/cis/DP83903.cis +drop_fw_file firmware/cis/NE2K.cis.ihex firmware/cis/NE2K.cis +drop_fw_file firmware/cis/tamarack.cis.ihex firmware/cis/tamarack.cis +drop_fw_file firmware/cis/PE-200.cis.ihex firmware/cis/PE-200.cis +drop_fw_file firmware/cis/PE520.cis.ihex firmware/cis/PE520.cis +# clean_blob drivers/net/pcmcia/pcnet_cs.c +# clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_PCNET' +# clean_mk CONFIG_PCMCIA_PCNET drivers/net/pcmcia/Makefile + +# usb + +announce USB_KAWETH - "USB KLSI KL5USB101-based ethernet device support" +drop_fw_file firmware/kaweth/new_code.bin.ihex firmware/kaweth/new_code.bin +drop_fw_file firmware/kaweth/new_code_fix.bin.ihex firmware/kaweth/new_code_fix.bin +drop_fw_file firmware/kaweth/trigger_code.bin.ihex firmware/kaweth/trigger_code.bin +drop_fw_file firmware/kaweth/trigger_code_fix.bin.ihex firmware/kaweth/trigger_code_fix.bin +reject_firmware drivers/net/usb/kaweth.c +clean_blob drivers/net/usb/kaweth.c +clean_kconfig drivers/net/usb/Kconfig 'USB_KAWETH' +clean_mk CONFIG_USB_KAWETH drivers/net/usb/Makefile + +# wireless + +announce ATMEL "Atmel at76c50x chipset 802.11b support" +reject_firmware drivers/net/wireless/atmel.c +clean_blob drivers/net/wireless/atmel.c +clean_kconfig drivers/net/wireless/Kconfig 'ATMEL' +clean_mk CONFIG_ATMEL drivers/net/wireless/Makefile + +announce AT76C50X_USB - "Atmel at76c503/at76c505/at76c505a USB cards" +reject_firmware drivers/net/wireless/at76c50x-usb.c +clean_blob drivers/net/wireless/at76c50x-usb.c +clean_kconfig drivers/net/wireless/Kconfig 'AT76C50X_USB' +clean_mk CONFIG_AT76C50X_USB drivers/net/wireless/Makefile + +announce B43 - "Broadcom 43xx wireless support (mac80211 stack)" +maybe_reject_firmware drivers/net/wireless/b43/main.c +clean_sed ' +/^static int b43_upload_microcode(/,/^}$/{ + / if (dev->fw\.opensource) {$/i\ + if (!dev->fw.opensource) {\ + b43err(dev->wl, "Rejected non-Free firmware\\n");\ + err = -EOPNOTSUPP;\ + goto error;\ + } +}' drivers/net/wireless/b43/main.c 'double-check and reject non-Free firmware' +# Major portions of firmware filenames not deblobbed. +clean_blob drivers/net/wireless/b43/main.c +clean_kconfig drivers/net/wireless/b43/Kconfig 'B43' +clean_mk CONFIG_B43 drivers/net/wireless/b43/Makefile + +announce B43LEGACY - "Broadcom 43xx-legacy wireless support (mac80211 stack)" +reject_firmware drivers/net/wireless/b43legacy/main.c +# Major portions of firwmare filenames not deblobbed. +clean_blob drivers/net/wireless/b43legacy/main.c +clean_kconfig drivers/net/wireless/b43legacy/Kconfig 'B43LEGACY' +clean_mk CONFIG_B43LEGACY drivers/net/wireless/b43legacy/Makefile + +announce BRCMSMAC - "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver" +reject_firmware drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +clean_blob drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMSMAC' +clean_mk CONFIG_BRCMSMAC drivers/net/wireless/brcm80211/Makefile + +announce BRCMFMAC - "Broadcom IEEE802.11n embedded FullMAC WLAN driver" +reject_firmware drivers/net/wireless/brcm80211/brcmfmac/firmware.c +clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMFMAC' +clean_mk CONFIG_BRCMFMAC drivers/net/wireless/brcm80211/brcmfmac/Makefile + +announce BRCMFMAC_SDIO - "Broadcom IEEE802.11n SDIO FullMAC WLAN driver" +clean_blob drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMFMAC_SDIO' +clean_mk CONFIG_BRCMFMAC_SDIO drivers/net/wireless/brcm80211/brcmfmac/Makefile + +announce BRCMFMAC_USB - "Broadcom IEEE802.11n USB FullMAC WLAN driver" +clean_blob drivers/net/wireless/brcm80211/brcmfmac/usb.c +clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMFMAC_USB' +clean_mk CONFIG_BRCMFMAC_USB drivers/net/wireless/brcm80211/brcmfmac/Makefile + +announce BRCMFMAC_PCIE - "Broadcom IEEE802.11n PCIE FullMAC WLAN driver" +clean_blob drivers/net/wireless/brcm80211/brcmfmac/pcie.c +clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMFMAC_PCIE' +clean_mk CONFIG_BRCMFMAC_PCIE drivers/net/wireless/brcm80211/brcmfmac/Makefile + +announce HERMES - "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)" +reject_firmware drivers/net/wireless/orinoco/fw.c +clean_blob drivers/net/wireless/orinoco/fw.c +clean_kconfig drivers/net/wireless/orinoco/Kconfig 'HERMES' +clean_mk CONFIG_HERMES drivers/net/wireless/orinoco/Makefile + +announce ORINOCO_USB - "Agere Orinoco USB support" +reject_firmware drivers/net/wireless/orinoco/orinoco_usb.c +clean_blob drivers/net/wireless/orinoco/orinoco_usb.c +clean_kconfig drivers/net/wireless/orinoco/Kconfig 'ORINOCO_USB' +clean_mk CONFIG_ORINOCO_USB drivers/net/wireless/orinoco/Makefile + +announce IPW2100 - "Intel PRO/Wireless 2100 Network Connection" +reject_firmware drivers/net/wireless/ipw2x00/ipw2100.c +clean_blob drivers/net/wireless/ipw2x00/ipw2100.c +clean_kconfig drivers/net/wireless/Kconfig 'IPW2100' +clean_mk CONFIG_IPW2100 drivers/net/wireless/ipw2x00/Makefile + +announce IPW2200 - "Intel PRO/Wireless 2200BG and 2915ABG Network Connection" +reject_firmware drivers/net/wireless/ipw2x00/ipw2200.c +clean_blob drivers/net/wireless/ipw2x00/ipw2200.c +clean_kconfig drivers/net/wireless/Kconfig 'IPW2200' +clean_mk CONFIG_IPW2200 drivers/net/wireless/ipw2x00/Makefile + +announce IWL3945 - "Intel PRO/Wireless 3945ABG/BG Network Connection" +reject_firmware drivers/net/wireless/iwlegacy/3945-mac.c +clean_blob drivers/net/wireless/iwlegacy/3945-mac.c +clean_blob drivers/net/wireless/iwlegacy/3945.h +clean_kconfig drivers/net/wireless/iwlegacy/Kconfig 'IWL3945' +clean_mk CONFIG_IWL3945 drivers/net/wireless/iwlegacy/Makefile + +announce IWL4965 - "Intel Wireless WiFi 4965AGN" +reject_firmware drivers/net/wireless/iwlegacy/4965-mac.c +clean_blob drivers/net/wireless/iwlegacy/4965-mac.c +clean_blob drivers/net/wireless/iwlegacy/4965.c +clean_kconfig drivers/net/wireless/iwlegacy/Kconfig 'IWL4965' +clean_mk CONFIG_IWL4965 drivers/net/wireless/iwlegacy/Makefile + +announce IWLWIFI - "Intel Wireless WiFi Next Gen AGN" +reject_firmware drivers/net/wireless/iwlwifi/iwl-drv.c +clean_blob drivers/net/wireless/iwlwifi/iwl-drv.c +clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLWIFI' +clean_mk CONFIG_IWLWIFI drivers/net/wireless/iwlwifi/Makefile + +announce IWLDVM - "Intel Wireless WiFi DVM Firmware support" +clean_blob drivers/net/wireless/iwlwifi/iwl-1000.c +clean_blob drivers/net/wireless/iwlwifi/iwl-2000.c +clean_blob drivers/net/wireless/iwlwifi/iwl-5000.c +clean_blob drivers/net/wireless/iwlwifi/iwl-6000.c +clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLDVM' +clean_mk CONFIG_IWLMVM drivers/net/wireless/iwlwifi/Makefile + +announce IWLMVM - "Intel Wireless WiFi MVM Firmware support" +reject_firmware drivers/net/wireless/iwlwifi/mvm/nvm.c +clean_blob drivers/net/wireless/iwlwifi/iwl-7000.c +clean_blob drivers/net/wireless/iwlwifi/iwl-8000.c +clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLMVM' +clean_mk CONFIG_IWLMVM drivers/net/wireless/iwlwifi/Makefile + +announce LIBERTAS - "Marvell 8xxx Libertas WLAN driver support" +reject_firmware drivers/net/wireless/libertas/firmware.c +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS' +clean_mk CONFIG_LIBERTAS drivers/net/wireless/libertas/Makefile + +announce LIBERTAS_CS - "Marvell Libertas 8385 CompactFlash 802.11b/g cards" +clean_blob drivers/net/wireless/libertas/if_cs.c +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_CS' +clean_mk CONFIG_LIBERTAS_CS drivers/net/wireless/libertas/Makefile + +announce LIBERTAS_SDIO - "Marvell Libertas 8385 and 8686 SDIO 802.11b/g cards" +clean_blob drivers/net/wireless/libertas/if_sdio.c +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_SDIO' +clean_mk CONFIG_LIBERTAS_SDIO drivers/net/wireless/libertas/Makefile + +announce LIBERTAS_SPI - "Marvell Libertas 8686 SPI 802.11b/g cards" +clean_blob drivers/net/wireless/libertas/if_spi.c +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_SPI' +clean_mk CONFIG_LIBERTAS_SPI drivers/net/wireless/libertas/Makefile + +announce LIBERTAS_USB - "Marvell Libertas 8388 USB 802.11b/g cards" +clean_blob drivers/net/wireless/libertas/if_usb.c +clean_blob drivers/net/wireless/libertas/README +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_USB' +clean_mk CONFIG_LIBERTAS_USB drivers/net/wireless/libertas/Makefile + +announce LIBERTAS_THINFIRM_USB - "Marvell Libertas 8388 USB 802.11b/g cards with thin firmware" +reject_firmware drivers/net/wireless/libertas_tf/if_usb.c +clean_blob drivers/net/wireless/libertas_tf/if_usb.c +clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_THINFIRM_USB' +clean_mk CONFIG_LIBERTAS_THINFIRM_USB drivers/net/wireless/libertas_tf/Makefile + +announce MWIFIEX - "Marvell WiFi-Ex Driver" +clean_blob drivers/net/wireless/mwifiex/README +reject_firmware drivers/net/wireless/mwifiex/main.c +clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX' +clean_mk CONFIG_MWIFIEX drivers/net/wireless/mwifiex/Makefile + +announce MWIFIEX_SDIO - "Marvell WiFi-Ex Driver for SD8787" +clean_blob drivers/net/wireless/mwifiex/sdio.h +clean_blob drivers/net/wireless/mwifiex/sdio.c +clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX_SDIO' +clean_mk CONFIG_MWIFIEX_SDIO drivers/net/wireless/mwifiex/Makefile + +announce MWIFIEX_PCIE - "Marvell WiFi-Ex Driver for PCI 8766" +clean_blob drivers/net/wireless/mwifiex/pcie.h +clean_blob drivers/net/wireless/mwifiex/pcie.c +clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX_PCIE' +clean_mk CONFIG_MWIFIEX_PCIE drivers/net/wireless/mwifiex/Makefile + +announce MWIFIEX_USB - "Marvell WiFi-Ex Driver for USB8797" +clean_blob drivers/net/wireless/mwifiex/usb.h +clean_blob drivers/net/wireless/mwifiex/usb.c +clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX_USB' +clean_mk CONFIG_MWIFIEX_USB drivers/net/wireless/mwifiex/Makefile + +announce MWL8K - "Marvell 88W8xxx PCI/PCIe Wireless support" +reject_firmware drivers/net/wireless/mwl8k.c +clean_blob drivers/net/wireless/mwl8k.c +clean_kconfig drivers/net/wireless/Kconfig 'MWL8K' +clean_mk CONFIG_MWL8K drivers/net/wireless/Makefile + +announce AR5523 - "Atheros AR5523 wireless driver support" +reject_firmware drivers/net/wireless/ath/ar5523/ar5523.c +clean_blob drivers/net/wireless/ath/ar5523/ar5523.c +clean_blob drivers/net/wireless/ath/ar5523/ar5523.h +clean_kconfig drivers/net/wireless/ath/ar5523/Kconfig 'AR5523' +clean_mk CONFIG_AR5523 drivers/net/wireless/ath/ar5523/Makefile + +announce ATH6KL - "Atheros ath6kl support" +reject_firmware drivers/net/wireless/ath/ath6kl/init.c +clean_blob drivers/net/wireless/ath/ath6kl/init.c +clean_blob drivers/net/wireless/ath/ath6kl/core.h +clean_kconfig drivers/net/wireless/ath/ath6kl/Kconfig 'ATH6KL' +clean_mk CONFIG_ATH6KL drivers/net/wireless/ath/ath6kl/Makefile + +announce ATH6KL_SDIO - "Atheros ath6kl SDIO support" +clean_blob drivers/net/wireless/ath/ath6kl/sdio.c +clean_kconfig drivers/net/wireless/ath/ath6kl/Kconfig 'ATH6KL_SDIO' +clean_mk CONFIG_ATH6KL_SDIO drivers/net/wireless/ath/ath6kl/Makefile + +announce ATH6KL_USB - "Atheros ath6kl USB support" +clean_blob drivers/net/wireless/ath/ath6kl/usb.c +clean_kconfig drivers/net/wireless/ath/ath6kl/Kconfig 'ATH6KL_USB' +clean_mk CONFIG_ATH6KL_USB drivers/net/wireless/ath/ath6kl/Makefile + +announce ATH10K - "Atheros 802.11ac wireless cards support" +reject_firmware drivers/net/wireless/ath/ath10k/core.c +clean_blob drivers/net/wireless/ath/ath10k/hw.h +clean_kconfig drivers/net/wireless/ath/ath10k/Kconfig 'ATH10K' +clean_mk CONFIG_ATH10K drivers/net/wireless/ath/ath10k/Makefile + +announce ATH10K NL80211_TESTMODE - "nl80211 testmode command" +reject_firmware drivers/net/wireless/ath/ath10k/testmode.c +clean_sed ' +/^[\t ]*\/\* utf\.bin firmware image/ s,/\* utf\.bin,/*(DEBLOBBED)*//*, +' drivers/net/wireless/ath/ath10k/testmode.c 'removed blob name in comment' +clean_kconfig net/wireless/ath/ath10k/Kconfig 'NL80211_TESTMODE' +clean_mk CONFIG_NL80211_TESTMODE drivers/net/wireless/ath/ath10k/Makefile + +announce ATH10K_PCI - "Atheros ath10k PCI support" +clean_blob drivers/net/wireless/ath/ath10k/pci.c +clean_kconfig drivers/net/wireless/ath/ath10k/Kconfig 'ATH10K_PCI' +clean_mk CONFIG_ATH10K_PCI drivers/net/wireless/ath/ath10k/Makefile + +announce WIL6210 - "Wilocity 60g WiFi card wil6210 support" +reject_firmware drivers/net/wireless/ath/wil6210/fw_inc.c +clean_blob drivers/net/wireless/ath/wil6210/fw.c +clean_blob drivers/net/wireless/ath/wil6210/wil6210.h +clean_kconfig drivers/net/wireless/ath/wil6210/Kconfig 'WIL6210' +clean_mk CONFIG_WIL6210 drivers/net/wireless/ath/wil6210/Makefile + +announce CW1200 - "CW1200 WLAN support" +reject_firmware drivers/net/wireless/cw1200/fwio.c +clean_blob drivers/net/wireless/cw1200/fwio.h +reject_firmware drivers/net/wireless/cw1200/sta.c +clean_kconfig drivers/net/wireless/cw1200/Kconfig 'CW1200' +clean_mk CONFIG_CW1200 drivers/net/wireless/cw1200/Makefile + +announce CW1200_WLAN_SDIO - "Support SDIO platforms" +clean_blob drivers/net/wireless/cw1200/cw1200_sdio.c +clean_kconfig drivers/net/wireless/cw1200/Kconfig 'CW1200_WLAN_SDIO' +clean_mk CONFIG_CW1200_WLAN_SDIO drivers/net/wireless/cw1200/Makefile + +announce PRISM2_USB - "Prism2.5/3 USB driver" +reject_firmware drivers/staging/wlan-ng/prism2fw.c +clean_blob drivers/staging/wlan-ng/prism2fw.c +clean_kconfig drivers/staging/wlan-ng/Kconfig PRISM2_USB +clean_mk CONFIG_PRISM2_USB drivers/staging/wlan-ng/Makefile + +announce P54_PCI - "Prism54 PCI support" +reject_firmware drivers/net/wireless/p54/p54pci.c +clean_blob drivers/net/wireless/p54/p54pci.c +clean_sed 's,3826\.eeprom,DEBLOBBED,g' drivers/net/wireless/p54/Kconfig 'removed blob name' +clean_kconfig drivers/net/wireless/p54/Kconfig 'P54_PCI' +clean_mk CONFIG_P54_PCI drivers/net/wireless/p54/Makefile + +announce P54_SPI - "Prism54 SPI (stlc45xx) support" +# There's support for loading custom 3826.eeprom here, with a default +# eeprom that is clearly pure data. Without Free 3826.arm, there's +# little point in trying to retain the ability to load 3826.eeprom, so +# we drop it altogether. +reject_firmware drivers/net/wireless/p54/p54spi.c +clean_blob drivers/net/wireless/p54/p54spi.c +clean_kconfig drivers/net/wireless/p54/Kconfig 'P54_SPI' +clean_mk CONFIG_P54_SPI drivers/net/wireless/p54/Makefile + +announce P54_USB - "Prism54 USB support" +reject_firmware drivers/net/wireless/p54/p54usb.c +clean_blob drivers/net/wireless/p54/p54usb.c +clean_blob drivers/net/wireless/p54/p54usb.h +clean_kconfig drivers/net/wireless/p54/Kconfig 'P54_USB' +clean_mk CONFIG_P54_USB drivers/net/wireless/p54/Makefile + +announce PRISM54 - "Intersil Prism GT/Duette/Indigo PCI/Cardbus" +reject_firmware drivers/net/wireless/prism54/islpci_dev.c +clean_blob drivers/net/wireless/prism54/islpci_dev.c +clean_kconfig drivers/net/wireless/Kconfig 'PRISM54' +clean_mk CONFIG_PRISM54 drivers/net/wireless/prism54/Makefile + +announce RSI_91X - "Redpine Signals Inc 91x WLAN driver support" +clean_blob drivers/net/wireless/rsi/rsi_common.h +clean_kconfig drivers/net/wireless/rsi/Kconfig 'RSI_91X' +clean_mk CONFIG_RSI_91X drivers/net/wireless/rsi/Makefile + +announce RSI_SDIO - "Redpine Signals SDIO bus support" +reject_firmware drivers/net/wireless/rsi/rsi_91x_sdio_ops.c +clean_blob drivers/net/wireless/rsi/rsi_91x_sdio.c +clean_kconfig drivers/net/wireless/rsi/Kconfig 'RSI_SDIO' +clean_mk CONFIG_RSI_SDIO drivers/net/wireless/rsi/Makefile + +announce RSI_USB - "Redpine Signals USB bus support" +reject_firmware drivers/net/wireless/rsi/rsi_91x_usb_ops.c +clean_blob drivers/net/wireless/rsi/rsi_91x_usb.c +clean_kconfig drivers/net/wireless/rsi/Kconfig 'RSI_USB' +clean_mk CONFIG_RSI_USB drivers/net/wireless/rsi/Makefile + +announce RT2X00_LIB_FIRMWARE - "Ralink driver firmware support" +reject_firmware drivers/net/wireless/rt2x00/rt2x00firmware.c +clean_kconfig drivers/net/wireless/rt2x00/Kconfig 'RT2X00_LIB_FIRMWARE' +clean_mk CONFIG_RT2X00_LIB_FIRMWARE drivers/net/wireless/rt2x00/Makefile + +announce RT61PCI - "Ralink rt2501/rt61 (PCI/PCMCIA) support" +clean_blob drivers/net/wireless/rt2x00/rt61pci.h +clean_blob drivers/net/wireless/rt2x00/rt61pci.c +clean_kconfig drivers/net/wireless/rt2x00/Kconfig 'RT61PCI' +clean_mk CONFIG_RT61PCI drivers/net/wireless/rt2x00/Makefile + +announce RT73USB - "Ralink rt2501/rt73 (USB) support" +clean_blob drivers/net/wireless/rt2x00/rt73usb.h +clean_blob drivers/net/wireless/rt2x00/rt73usb.c +clean_kconfig drivers/net/wireless/rt2x00/Kconfig 'RT73USB' +clean_mk CONFIG_RT73USB drivers/net/wireless/rt2x00/Makefile + +announce RT2800PCI - "Ralink rt2800 (PCI/PCMCIA) support" +clean_blob drivers/net/wireless/rt2x00/rt2800pci.h +clean_blob drivers/net/wireless/rt2x00/rt2800pci.c +clean_kconfig drivers/net/wireless/rt2x00/Kconfig RT2800PCI +clean_mk CONFIG_RT2800PCI drivers/net/wireless/rt2x00/Makefile + +announce RT2800USB - "Ralink rt2800 (USB) support" +clean_blob drivers/net/wireless/rt2x00/rt2800usb.h +clean_blob drivers/net/wireless/rt2x00/rt2800usb.c +clean_kconfig drivers/net/wireless/rt2x00/Kconfig RT2800USB +clean_mk CONFIG_RT2800USB drivers/net/wireless/rt2x00/Makefile + +announce RTLWIFI - "Realtek Wireless Network Adapters" +reject_firmware drivers/net/wireless/rtlwifi/core.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTLWIFI +clean_mk CONFIG_RTLWIFI drivers/net/wireless/rtlwifi/Makefile + +announce RTL8188EE - "Realtek RTL8188EE Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8188ee/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8188ee/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8188EE +clean_mk CONFIG_RTL8188EE drivers/net/wireless/rtlwifi/rtl8188ee/Makefile + +announce R8188EU - "Realtek RTL8188EU Wireless LAN NIC driver" +reject_firmware drivers/staging/rtl8188eu/hal/fw.c +clean_blob drivers/staging/rtl8188eu/hal/fw.c +clean_blob drivers/staging/rtl8188eu/include/rtl8188e_hal.h +clean_kconfig drivers/staging/rtl8188eu/Kconfig R8188EU +clean_mk CONFIG_R8188EU drivers/staging/rtl8188eu/Makefile + +announce RTL8192CE - "Realtek RTL8192CE/RTL8188CE Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8192CE +clean_mk CONFIG_RTL8192CE drivers/net/wireless/rtlwifi/rtl8192ce/Makefile + +announce RTL8192CU - "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8192CU +clean_mk CONFIG_RTL8192CU drivers/net/wireless/rtlwifi/rtl8192cu/Makefile + +announce RTL8192DE - "Realtek RTL8192DE/RTL8188DE PCIe Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8192de/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8192de/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8192DE +clean_mk CONFIG_RTL8192DE drivers/net/wireless/rtlwifi/rtl8192de/Makefile + +announce RTL8192SE - "Realtek RTL8192SE/RTL8191SE PCIe Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8192se/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8192se/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8192SE +clean_mk CONFIG_RTL8192SE drivers/net/wireless/rtlwifi/rtl8192se/Makefile + +announce RTL8192E - "RealTek RTL8192E Wireless LAN NIC driver" +reject_firmware drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +clean_blob drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h +clean_blob drivers/staging/rtl8192e/rtl8192e/rtl_core.c +clean_kconfig drivers/staging/rtl8192e/Kconfig RTL8192E +clean_mk CONFIG_RTL8192E drivers/staging/rtl8192e/Makefile + +announce RTL8192EE - "RealTek RTL8192EE Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8192ee/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8192ee/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/rtl8192ee/Kconfig RTL8192EE +clean_mk CONFIG_RTL8192EE drivers/net/wireless/rtlwifi/Makefile + +announce RTL8192U - "RealTek RTL8192U Wireless LAN NIC driver" +reject_firmware drivers/staging/rtl8192u/r819xU_firmware.c +clean_blob drivers/staging/rtl8192u/r819xU_firmware.c +clean_kconfig drivers/staging/rtl8192u/Kconfig 'RTL8192U' +clean_mk CONFIG_RTL8192U drivers/staging/rtl8192u/Makefile + +announce R8712U - "RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver" +reject_firmware drivers/staging/rtl8712/hal_init.c +clean_blob drivers/staging/rtl8712/hal_init.c +clean_kconfig drivers/staging/rtl8712/Kconfig 'R8712U' +clean_mk CONFIG_R8712U drivers/staging/rtl8712/Makefile + +announce RTL8723AE - "Realtek RTL8723AE PCIe Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8723ae/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8723ae/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig 'RTL8723AE' +clean_mk CONFIG_RTL8723AE drivers/net/wireless/rtlwifi/rtl8723ae/Makefile + +announce R8723AU - "RealTek RTL8723AU Wireless LAN NIC driver" +reject_firmware drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +clean_blob drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +clean_blob drivers/staging/rtl8723au/os_dep/os_intfs.c +clean_kconfig drivers/staging/rtl8723au/Kconfig 'R8723AU' +clean_mk CONFIG_R8723AU drivers/staging/rtl8723au/Makefile + +announce RTL8723BE - "Realtek RTL8723BE PCIe Wireless Network Adapter" +reject_firmware drivers/net/wireless/rtlwifi/rtl8723be/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8723be/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig 'RTL8723BE' +clean_mk CONFIG_RTL8723BE drivers/net/wireless/rtlwifi/rtl8723be/Makefile + +announce RTL8821AE - "Realtek RTL8821AE/RTL8812AE Wireless LAN NIC driver" +reject_firmware drivers/net/wireless/rtlwifi/rtl8821ae/sw.c +clean_blob drivers/net/wireless/rtlwifi/rtl8821ae/sw.c +clean_kconfig drivers/net/wireless/rtlwifi/Kconfig 'RTL8821AE' +clean_mk CONFIG_RTL8821AE drivers/net/wireless/rtlwifi/rtl8821ae/Makefile + +announce VT6656 - "VIA Technologies VT6656 support" +reject_firmware drivers/staging/vt6656/firmware.c +clean_blob drivers/staging/vt6656/firmware.c +clean_kconfig drivers/staging/vt6656/Kconfig 'VT6656' +clean_mk CONFIG_VT6656 drivers/staging/vt6656/Makefile + +announce WL1251 - "TI wl1251 support" +reject_firmware drivers/net/wireless/ti/wl1251/main.c +clean_blob drivers/net/wireless/ti/wl1251/main.c +clean_blob drivers/net/wireless/ti/wl1251/wl1251.h +clean_kconfig drivers/net/wireless/ti/wl1251/Kconfig 'WL1251' +clean_mk CONFIG_WL1251 drivers/net/wireless/ti/wl1251/Makefile + +announce WL12XX - "TI wl12xx support" +clean_blob drivers/net/wireless/ti/wl12xx/main.c +clean_kconfig drivers/net/wireless/ti/wl12xx/Kconfig 'WL12XX' +clean_mk CONFIG_WL12XX drivers/net/wireless/ti/wl12xx/Makefile + +announce WL18XX - "TI wl18xx support" +reject_firmware drivers/net/wireless/ti/wl18xx/main.c +clean_blob drivers/net/wireless/ti/wl18xx/main.c +clean_kconfig drivers/net/wireless/ti/wl18xx/Kconfig 'WL18XX' +clean_mk CONFIG_WL18XX drivers/net/wireless/ti/wl18xx/Makefile + +announce WLCORE - "TI wlcore support" +reject_firmware drivers/net/wireless/ti/wlcore/main.c +clean_blob drivers/net/wireless/ti/wlcore/main.c +clean_blob drivers/net/wireless/ti/wlcore/wlcore_i.h +clean_kconfig drivers/net/wireless/ti/wlcore/Kconfig 'WLCORE' +clean_mk CONFIG_WLCORE drivers/net/wireless/ti/wlcore/Makefile + +announce USB_ZD1201 - "USB ZD1201 based Wireless device support" +reject_firmware drivers/net/wireless/zd1201.c +clean_blob drivers/net/wireless/zd1201.c +clean_kconfig drivers/net/wireless/Kconfig 'USB_ZD1201' +clean_mk CONFIG_USB_ZD1201 drivers/net/wireless/Makefile + +announce WCN36XX - "Qualcomm Atheros WCN3660/3680 support" +reject_firmware drivers/net/wireless/ath/wcn36xx/smd.c +clean_blob drivers/net/wireless/ath/wcn36xx/wcn36xx.h +clean_blob drivers/net/wireless/ath/wcn36xx/main.c +clean_kconfig drivers/net/wireless/ath/wcn36xx/Kconfig 'WCN36XX' +clean_mk CONFIG_WCN36XX drivers/net/wireless/ath/wcn36xx/Makefile + +announce ZD1211RW - "ZyDAS ZD1211/ZD1211B USB-wireless support" +reject_firmware drivers/net/wireless/zd1211rw/zd_usb.c +clean_blob drivers/net/wireless/zd1211rw/zd_usb.c +clean_kconfig drivers/net/wireless/zd1211rw/Kconfig 'ZD1211RW' +clean_mk CONFIG_ZD1211RW drivers/net/wireless/zd1211rw/Makefile + +# bluetooth + +announce BT_ATH3K - "Atheros firmware download driver" +reject_firmware drivers/bluetooth/ath3k.c +clean_blob drivers/bluetooth/ath3k.c +clean_kconfig drivers/bluetooth/Kconfig 'BT_ATH3K' +clean_mk CONFIG_BT_ATH3K drivers/bluetooth/Makefile + +announce BT_HCIBCM203X - "HCI BCM203x USB driver" +reject_firmware drivers/bluetooth/bcm203x.c +clean_blob drivers/bluetooth/bcm203x.c +clean_kconfig drivers/bluetooth/Kconfig 'BT_HCIBCM203X' +clean_mk CONFIG_BT_HCIBCM203X drivers/bluetooth/Makefile + +announce BT_HCIBFUSB - "HCI BlueFRITZ! USB driver" +reject_firmware drivers/bluetooth/bfusb.c +clean_blob drivers/bluetooth/bfusb.c +clean_kconfig drivers/bluetooth/Kconfig 'BT_HCIBFUSB' +clean_mk CONFIG_BT_HCIBFUSB drivers/bluetooth/Makefile + +announce BT_HCIBT3C - "HCI BT3C (PC Card) driver" +reject_firmware drivers/bluetooth/bt3c_cs.c +clean_blob drivers/bluetooth/bt3c_cs.c +clean_kconfig drivers/bluetooth/Kconfig 'BT_HCIBT3C' +clean_mk CONFIG_BT_HCIBT3C drivers/bluetooth/Makefile + +announce BT_HCIBTUSB - "HCI USB driver" +reject_firmware drivers/bluetooth/btusb.c +clean_blob drivers/bluetooth/btusb.c +clean_kconfig drivers/bluetooth/Kconfig 'BT_HCIBTUSB' +clean_mk CONFIG_BT_HCIBTUSB drivers/bluetooth/Makefile + +announce BT_MRVL_SDIO - "Marvell BT-over-SDIO driver" +reject_firmware drivers/bluetooth/btmrvl_sdio.c +clean_blob drivers/bluetooth/btmrvl_sdio.c +clean_blob Documentation/btmrvl.txt +clean_kconfig drivers/bluetooth/Kconfig 'BT_MRVL_SDIO' +clean_mk CONFIG_BT_MRVL_SDIO drivers/bluetooth/Makefile + +announce TI_ST - "Texas Instruments shared transport line discipline" +reject_firmware drivers/misc/ti-st/st_kim.c +clean_blob drivers/misc/ti-st/st_kim.c +clean_kconfig drivers/misc/ti-st/Kconfig 'TI_ST' +clean_mk CONFIG_TI_ST drivers/misc/ti-st/Makefile + +# wimax + +announce WIMAX_I2400M - "Intel Wireless WiMAX Connection 2400" +reject_firmware drivers/net/wimax/i2400m/fw.c +clean_blob drivers/net/wimax/i2400m/usb.c +clean_blob Documentation/wimax/README.i2400m +clean_kconfig drivers/net/wimax/i2400m/Kconfig 'WIMAX_I2400M' +clean_mk CONFIG_WIMAX_I2400M drivers/net/wimax/i2400m/Makefile + +announce BCM_WIMAX - "Beceem BCS200/BCS220-3 and BCSM250 wimax support" +clean_blob drivers/staging/bcm/Macros.h +# This disables loading of the .cfg file as well, but it's useless without +# the firmware proper. +clean_sed ' +/^static \(inline \)\?struct file \*open_firmware_file/,/^}$/ { + s,\(flp *= *\)filp_open[^;]*,\1/*(DEBLOBBED)*/(void*)-ENOENT, +}' drivers/staging/bcm/Misc.c 'disabled non-Free firmware loading machinery' +clean_kconfig drivers/staging/bcm/Kconfig 'BCM_WIMAX' +clean_mk CONFIG_BCM_WIMAX drivers/staging/bcm/Makefile + +announce WIMAX_GDM72XX_SDIO - "GCT GDM72xx WiMAX support: SDIO interface" +reject_firmware drivers/staging/gdm72xx/sdio_boot.c +clean_blob drivers/staging/gdm72xx/sdio_boot.c +clean_kconfig drivers/staging/gdm72xx/Kconfig 'WIMAX_GDM72XX_SDIO' +clean_mk CONFIG_WIMAX_GDM72XX_SDIO drivers/staging/gdm72xx/Makefile + +announce WIMAX_GDM72XX_USB - "GCT GDM72xx WiMAX support: USB interface" +reject_firmware drivers/staging/gdm72xx/usb_boot.c +clean_blob drivers/staging/gdm72xx/usb_boot.c +clean_kconfig drivers/staging/gdm72xx/Kconfig 'WIMAX_GDM72XX_USB' +clean_mk CONFIG_WIMAX_GDM72XX_USB drivers/staging/gdm72xx/Makefile + +# infiniband + +announce INFINIBAND_QIB - "QLogic PCIe HCA support" +drop_fw_file firmware/qlogic/sd7220.fw.ihex firmware/qlogic/sd7220.fw +reject_firmware drivers/infiniband/hw/qib/qib_sd7220.c +clean_blob drivers/infiniband/hw/qib/qib_sd7220.c +clean_kconfig drivers/infiniband/hw/qib/Kconfig 'INFINIBAND_QIB' +clean_mk CONFIG_INFINIBAND_QIB drivers/infiniband/hw/qib/Makefile + +# CAN + +announce CAN_SOFTING - "Softing Gmbh CAN generic support" +reject_firmware drivers/net/can/softing/softing_fw.c +clean_kconfig drivers/net/can/softing/Kconfig 'CAN_SOFTING' +clean_mk CONFIG_CAN_SOFTING drivers/net/can/softing/Makefile + +announce CAN_SOFTING_CS - "Softing Gmbh CAN pcmcia cards" +clean_blob drivers/net/can/softing/softing_cs.c +clean_blob drivers/net/can/softing/softing_platform.h +clean_sed ' +/^config CAN_SOFTING_CS$/,${ + /You need firmware/i\ + /*(DEBLOBBED)*/ + /You need firmware/,/softing-fw.*tar\.gz/d +}' drivers/net/can/softing/Kconfig 'removed firmware notes' +clean_kconfig drivers/net/can/softing/Kconfig 'CAN_SOFTING_CS' +clean_mk CONFIG_CAN_SOFTING_CS drivers/net/can/softing/Makefile + +######## +# ISDN # +######## + +announce ISDN_DIVAS - "Support Eicon DIVA Server cards" +clean_blob drivers/isdn/hardware/eicon/cardtype.h +clean_blob drivers/isdn/hardware/eicon/dsp_defs.h +clean_kconfig drivers/isdn/hardware/eicon/Kconfig 'ISDN_DIVAS' +clean_mk CONFIG_ISDN_DIVAS drivers/isdn/hardware/eicon/Makefile + +announce MISDN_SPEEDFAX - "Support for Sedlbauer Speedfax+" +reject_firmware drivers/isdn/hardware/mISDN/speedfax.c +clean_blob drivers/isdn/hardware/mISDN/speedfax.c +clean_kconfig drivers/isdn/hardware/mISDN/Kconfig 'MISDN_SPEEDFAX' +clean_mk CONFIG_MISDN_SPEEDFAX drivers/isdn/hardware/mISDN/Makefile + +########## +# Serial # +########## + +announce DGAP - "Digi EPCA PCI products" +reject_firmware drivers/staging/dgap/dgap.c +clean_blob drivers/staging/dgap/dgap.c +clean_kconfig drivers/staging/dgap/Kconfig 'DGAP' +clean_mk CONFIG_DGAP drivers/staging/dgap/Makefile + +announce SERIAL_8250_CS - "8250/16550 PCMCIA device support" +# These are not software; they're Free, but GPLed without in-tree sources. +drop_fw_file firmware/cis/MT5634ZLX.cis.ihex firmware/cis/MT5634ZLX.cis +drop_fw_file firmware/cis/RS-COM-2P.cis.ihex firmware/cis/RS-COM-2P.cis +drop_fw_file firmware/cis/COMpad2.cis.ihex firmware/cis/COMpad2.cis +drop_fw_file firmware/cis/COMpad4.cis.ihex firmware/cis/COMpad4.cis +# These are not software; they're Free, but GPLed without textual sources. +# It could be assumed that these binaries *are* sources, since they +# can be trivially converted back to a textual form, without loss, +# but we're better off safe than sorry, so remove them from our tree. +drop_fw_file firmware/cis/SW_555_SER.cis.ihex firmware/cis/SW_555_SER.cis +drop_fw_file firmware/cis/SW_7xx_SER.cis.ihex firmware/cis/SW_7xx_SER.cis +drop_fw_file firmware/cis/SW_8xx_SER.cis.ihex firmware/cis/SW_8xx_SER.cis +# clean_blob drivers/tty/serial/serial_cs.c +# clean_kconfig drivers/tty/serial/Kconfig 'SERIAL_8250_CS' +# clean_mk CONFIG_SERIAL_8250_CS drivers/tty/serial/Makefile + +announce SERIAL_ICOM - "IBM Multiport Serial Adapter" +reject_firmware drivers/tty/serial/icom.c +clean_blob drivers/tty/serial/icom.c +clean_kconfig drivers/tty/serial/Kconfig 'SERIAL_ICOM' +clean_mk CONFIG_SERIAL_ICOM drivers/tty/serial/Makefile + +announce SERIAL_QE - "Freescale QUICC Engine serial port support" +reject_firmware drivers/tty/serial/ucc_uart.c +clean_blob drivers/tty/serial/ucc_uart.c +clean_kconfig drivers/tty/serial/Kconfig 'SERIAL_QE' +clean_mk CONFIG_SERIAL_QE drivers/tty/serial/Makefile + +announce SERIAL_RP2 - "Comtrol RocketPort EXPRESS/INFINITY support" +reject_firmware drivers/tty/serial/rp2.c +clean_blob drivers/tty/serial/rp2.c +clean_kconfig drivers/tty/serial/Kconfig 'SERIAL_RP2' +clean_mk CONFIG_SERIAL_RP2 drivers/tty/serial/Makefile + +######## +# Leds # +######## + +announce LEDS_LP55XX_COMMON - "Common Driver for TI/National LP5521 and LP5523/55231" +reject_firmware drivers/leds/leds-lp55xx-common.c +clean_kconfig drivers/leds/Kconfig 'LEDS_LP55XX_COMMON' +clean_mk CONFIG_LEDS_LP55XX_COMMON drivers/leds/Makefile + +announce LEDS_LP5521 - "LED Support for N.S. LP5521 LED driver chip" +# The blob name is the chip name; no point in deblobbing that. +# clean_blob drivers/leds/leds-lp5521.c +clean_kconfig drivers/leds/Kconfig 'LEDS_LP5521' +clean_mk CONFIG_LEDS_LP5521 drivers/leds/Makefile + +announce LEDS_LP5523 - "LED Support for TI/National LP5523/55231 LED driver chip" +# The blob name is the chip name; no point in deblobbing that. +# clean_blob drivers/leds/leds-lp5523.c +clean_kconfig drivers/leds/Kconfig 'LEDS_LP5523' +clean_mk CONFIG_LEDS_LP5523 drivers/leds/Makefile + +######### +# input # +######### + +announce TOUCHSCREEN_ATMEL_MXT - "Atmel mXT I2C Touchscreen" +reject_firmware drivers/input/touchscreen/atmel_mxt_ts.c +clean_blob drivers/input/touchscreen/atmel_mxt_ts.c +clean_kconfig drivers/input/touchscreen/Kconfig 'TOUCHSCREEN_ATMEL_MXT' +clean_mk CONFIG_TOUCHSCREEN_ATMEL_MXT drivers/input/touchscreen/Makefile + +announce LIRC_ZILOG - "Zilog/Hauppauge IR Transmitter" +reject_firmware drivers/staging/media/lirc/lirc_zilog.c +clean_blob drivers/staging/media/lirc/lirc_zilog.c +clean_kconfig drivers/staging/media/lirc/Kconfig 'LIRC_ZILOG' +clean_mk CONFIG_LIRC_ZILOG drivers/staging/media/lirc/Makefile + +announce INPUT_IMS_PCU - "IMS Passenger Control Unit driver" +reject_firmware drivers/input/misc/ims-pcu.c +clean_blob drivers/input/misc/ims-pcu.c +clean_kconfig drivers/input/misc/Kconfig 'INPUT_IMS_PCU' +clean_mk CONFIG_INPUT_IMS_PCU drivers/input/misc/Makefile + +#################### +# Data acquisition # +#################### + +announce COMEDI - "Data acquisition support (comedi)" +reject_firmware drivers/staging/comedi/drivers.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI' +clean_mk CONFIG_COMEDI drivers/staging/comedi/Makefile + +announce COMEDI_DAQBOARD2000 - "IOtech DAQboard/2000 support" +clean_blob drivers/staging/comedi/drivers/daqboard2000.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_DAQBOARD2000' +clean_mk CONFIG_COMEDI_DAQBOARD2000 drivers/staging/comedi/drivers/Makefile + +announce COMEDI_JR3_PCI - "JR3/PCI force sensor board support" +clean_blob drivers/staging/comedi/drivers/jr3_pci.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_JR3_PCI' +clean_mk CONFIG_COMEDI_JR3_PCI drivers/staging/comedi/drivers/Makefile + +announce COMEDI_ME_DAQ - "Meilhaus ME-2000i, ME-2600i, ME-3000vm1 support" +clean_blob drivers/staging/comedi/drivers/me_daq.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_ME_DAQ' +clean_mk CONFIG_COMEDI_ME_DAQ drivers/staging/comedi/drivers/Makefile + +announce COMEDI_NI_PCIDIO - "NI PCI-DIO32HS, PCI-6533, PCI-6534 support" +clean_blob drivers/staging/comedi/drivers/ni_pcidio.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_NI_PCIDIO' +clean_mk CONFIG_COMEDI_NI_PCIDIO drivers/staging/comedi/drivers/Makefile + +announce COMEDI_USBDUX - "ITL USBDUX support" +clean_blob drivers/staging/comedi/drivers/usbdux.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUX' +clean_mk CONFIG_COMEDI_USBDUX drivers/staging/comedi/drivers/Makefile + +announce COMEDI_USBDUXFAST - "ITL USB-DUXfast support" +clean_blob drivers/staging/comedi/drivers/usbduxfast.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXFAST' +clean_mk CONFIG_COMEDI_USBDUXFAST drivers/staging/comedi/drivers/Makefile + +announce COMEDI_USBDUXSIGMA - "ITL USB-DUXsigma support" +clean_blob drivers/staging/comedi/drivers/usbduxsigma.c +clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXSIGMA' +clean_mk CONFIG_COMEDI_USBDUXSIGMA drivers/staging/comedi/drivers/Makefile + + +####### +# MMC # +####### + +announce MMC_VUB300 - "VUB300 USB to SDIO/SD/MMC Host Controller support" +clean_sed ' +/^config MMC_VUB300/,/^config /{ + /Some SDIO cards/i\ + /*(DEBLOBBED)*/ + /Some SDIO cards/,/obtainable data rate\.$/d +} +' drivers/mmc/host/Kconfig "removed firmware notes" +reject_firmware drivers/mmc/host/vub300.c +clean_blob drivers/mmc/host/vub300.c +clean_kconfig drivers/mmc/host/Kconfig 'MMC_VUB300' +clean_mk CONFIG_MMC_VUB300 drivers/mmc/host/Makefile + +######## +# SCSI # +######## + +announce SCSI_QLOGICPTI - "PTI Qlogic, ISP Driver" +drop_fw_file firmware/qlogic/isp1000.bin.ihex firmware/qlogic/isp1000.bin +reject_firmware drivers/scsi/qlogicpti.c +clean_blob drivers/scsi/qlogicpti.c +clean_kconfig drivers/scsi/Kconfig 'SCSI_QLOGICPTI' +clean_mk CONFIG_SCSI_QLOGICPTI drivers/scsi/Makefile + +announce SCSI_ADVANSYS - "AdvanSys SCSI" +drop_fw_file firmware/advansys/mcode.bin.ihex firmware/advansys/mcode.bin +drop_fw_file firmware/advansys/3550.bin.ihex firmware/advansys/3550.bin +drop_fw_file firmware/advansys/38C0800.bin.ihex firmware/advansys/38C0800.bin +drop_fw_file firmware/advansys/38C1600.bin.ihex firmware/advansys/38C1600.bin +reject_firmware drivers/scsi/advansys.c +clean_blob drivers/scsi/advansys.c +clean_kconfig drivers/scsi/Kconfig 'SCSI_ADVANSYS' +clean_mk CONFIG_SCSI_ADVANSYS drivers/scsi/Makefile + +announce SCSI_QLOGIC_1280 - "Qlogic QLA 1240/1x80/1x160 SCSI" +drop_fw_file firmware/qlogic/1040.bin.ihex firmware/qlogic/1040.bin +drop_fw_file firmware/qlogic/1280.bin.ihex firmware/qlogic/1280.bin +drop_fw_file firmware/qlogic/12160.bin.ihex firmware/qlogic/12160.bin +reject_firmware drivers/scsi/qla1280.c +clean_blob drivers/scsi/qla1280.c +clean_kconfig drivers/scsi/Kconfig 'SCSI_QLOGIC_1280' +clean_mk CONFIG_SCSI_QLOGIC_1280 drivers/scsi/Makefile + +announce SCSI_AIC94XX - "Adaptec AIC94xx SAS/SATA support" +reject_firmware drivers/scsi/aic94xx/aic94xx_seq.c +clean_blob drivers/scsi/aic94xx/aic94xx_seq.c +clean_blob drivers/scsi/aic94xx/aic94xx_seq.h +clean_kconfig drivers/scsi/aic94xx/Kconfig 'SCSI_AIC94XX' +clean_mk CONFIG_SCSI_AIC94XX drivers/scsi/aic94xx/Makefile + +announce SCSI_BFA_FC - "Brocade BFA Fibre Channel Support" +reject_firmware drivers/scsi/bfa/bfad.c +clean_blob drivers/scsi/bfa/bfad.c +clean_kconfig drivers/scsi/Kconfig 'SCSI_BFA_FC' +clean_mk CONFIG_SCSI_BFA_FC drivers/scsi/bfa/Makefile + +announce SCSI_CHELSIO_FCOE - "Chelsio Communications FCoE support" +reject_firmware drivers/scsi/csiostor/csio_hw.c +clean_blob drivers/scsi/csiostor/csio_hw_chip.h +clean_blob drivers/scsi/csiostor/csio_init.c +clean_kconfig drivers/scsi/csiostor/Kconfig 'SCSI_CHELSIO_FCOE' +clean_mk CONFIG_SCSI_CHELSIO_FCOE drivers/scsi/csiostor/Makefile + +announce SCSI_LPFC - "Emulex LightPulse Fibre Channel Support" +# The firmware name is built out of Vital Product Data read from the +# adapter. The firmware is definitely code, and I couldn't find +# evidence it is Free, so I'm disabling it. It's not clear whether +# this is the hardware or the software inducing to the installation of +# non-Free firmware. +reject_firmware drivers/scsi/lpfc/lpfc_init.c +clean_kconfig drivers/scsi/Kconfig 'SCSI_LPFC' +clean_mk CONFIG_SCSI_LPFC drivers/scsi/lpfc/Makefile + +announce SCSI_QLA_FC - "QLogic QLA2XXX Fibre Channel Support" +reject_firmware drivers/scsi/qla2xxx/qla_os.c +clean_sed ' +/^config SCSI_QLA_FC$/,/^config /{ + /^ By default, firmware/i\ + /*(DEBLOBBED)*/ + /^ By default, firmware/,/ftp:[/][/].*firmware[/]/d +}' drivers/scsi/qla2xxx/Kconfig 'removed firmware notes' +clean_blob drivers/scsi/qla2xxx/qla_os.c +clean_kconfig drivers/scsi/qla2xxx/Kconfig 'SCSI_QLA_FC' +clean_mk CONFIG_SCSI_QLA_FC drivers/scsi/qla2xxx/Makefile + + +####### +# USB # +####### + +# atm + +announce USB_CXACRU - "Conexant AccessRunner USB support" +reject_firmware drivers/usb/atm/cxacru.c +clean_blob drivers/usb/atm/cxacru.c +clean_kconfig drivers/usb/atm/Kconfig 'USB_CXACRU' +clean_mk CONFIG_USB_CXACRU drivers/usb/atm/Makefile + +announce USB_SPEEDTOUCH - "Speedtouch USB support" +reject_firmware drivers/usb/atm/speedtch.c +clean_blob drivers/usb/atm/speedtch.c +clean_kconfig drivers/usb/atm/Kconfig 'USB_SPEEDTOUCH' +clean_mk CONFIG_USB_SPEEDTOUCH drivers/usb/atm/Makefile + +announce USB_UEAGLEATM - "ADI 930 and eagle USB DSL modem" +reject_firmware drivers/usb/atm/ueagle-atm.c +clean_blob drivers/usb/atm/ueagle-atm.c +clean_kconfig drivers/usb/atm/Kconfig 'USB_UEAGLEATM' +clean_mk CONFIG_USB_UEAGLEATM drivers/usb/atm/Makefile + +# host + +announce USB_XHCI_RCAR - "xHCI support for Renesas R-Car SoCs" +reject_firmware drivers/usb/host/xhci-rcar.c +clean_blob drivers/usb/host/xhci-rcar.c +clean_kconfig drivers/usb/host/Kconfig 'USB_XHCI_RCAR' +clean_mk CONFIG_USB_XHCI_RCAR drivers/usb/host/Makefile + +# misc + +announce USB_EMI26 - "EMI 2|6 USB Audio interface" +# These files are not under the GPL, better remove them all. +drop_fw_file firmware/emi26/bitstream.HEX firmware/emi26/bitstream.fw +drop_fw_file firmware/emi26/firmware.HEX firmware/emi26/firmware.fw +drop_fw_file firmware/emi26/loader.HEX firmware/emi26/loader.fw +reject_firmware drivers/usb/misc/emi26.c +clean_blob drivers/usb/misc/emi26.c +clean_kconfig drivers/usb/misc/Kconfig 'USB_EMI26' +clean_mk CONFIG_USB_EMI26 drivers/usb/misc/Makefile + +announce USB_EMI62 - "EMI 6|2m USB Audio interface" +# These files are probably not under the GPL, better remove them all. +drop_fw_file firmware/emi62/bitstream.HEX firmware/emi62/bitstream.fw +drop_fw_file firmware/emi62/loader.HEX firmware/emi62/loader.fw +drop_fw_file firmware/emi62/midi.HEX firmware/emi62/midi.fw +drop_fw_file firmware/emi62/spdif.HEX firmware/emi62/spdif.fw +reject_firmware drivers/usb/misc/emi62.c +clean_blob drivers/usb/misc/emi62.c +clean_kconfig drivers/usb/misc/Kconfig 'USB_EMI62' +clean_mk CONFIG_USB_EMI62 drivers/usb/misc/Makefile + +announce USB_EZUSB_FX2 - "Functions for loading firmware on EZUSB chips" +maybe_reject_firmware drivers/usb/misc/ezusb.c + +announce USB_ISIGHTFW - "iSight firmware loading support" +reject_firmware drivers/usb/misc/isight_firmware.c +clean_blob drivers/usb/misc/isight_firmware.c +clean_kconfig drivers/usb/misc/Kconfig 'USB_ISIGHTFW' +clean_mk CONFIG_USB_ISIGHTFW drivers/usb/misc/Makefile + +# storage + +announce USB_STORAGE_ENE_UB6250 - "USB ENE card reader support" +reject_firmware drivers/usb/storage/ene_ub6250.c +clean_blob drivers/usb/storage/ene_ub6250.c +clean_kconfig drivers/usb/storage/Kconfig 'USB_STORAGE_ENE_UB6250' +clean_mk 'CONFIG_USB_STORAGE_ENE_UB6250' drivers/usb/storage/Makefile + +# serial + +announce USB_SERIAL_KEYSPAN - "USB Keyspan USA-xxx Serial Driver" +drop_fw_file firmware/keyspan/mpr.HEX firmware/keyspan/mpr.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_MPR' +drop_fw_file firmware/keyspan/usa18x.HEX firmware/keyspan/usa18x.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA18X' +drop_fw_file firmware/keyspan/usa19.HEX firmware/keyspan/usa19.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA19' +drop_fw_file firmware/keyspan/usa19qi.HEX firmware/keyspan/usa19qi.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA19QI' +drop_fw_file firmware/keyspan/usa19qw.HEX firmware/keyspan/usa19qw.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA19QW' +drop_fw_file firmware/keyspan/usa19w.HEX firmware/keyspan/usa19w.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA19W' +drop_fw_file firmware/keyspan/usa28.HEX firmware/keyspan/usa28.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA28' +drop_fw_file firmware/keyspan/usa28xa.HEX firmware/keyspan/usa28xa.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA28XA' +drop_fw_file firmware/keyspan/usa28xb.HEX firmware/keyspan/usa28xb.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA28XB' +drop_fw_file firmware/keyspan/usa28x.HEX firmware/keyspan/usa28x.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA28X' +drop_fw_file firmware/keyspan/usa49w.HEX firmware/keyspan/usa49w.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA49W' +drop_fw_file firmware/keyspan/usa49wlc.HEX firmware/keyspan/usa49wlc.fw +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN_USA49WLC' +clean_blob drivers/usb/serial/keyspan.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_KEYSPAN' +clean_mk CONFIG_USB_SERIAL_KEYSPAN drivers/usb/serial/Makefile + +announce USB_SERIAL_EDGEPORT - "USB Inside Out Edgeport Serial Driver" +clean_fw firmware/edgeport/boot.H16 firmware/edgeport/boot.fw +clean_fw firmware/edgeport/boot2.H16 firmware/edgeport/boot2.fw +clean_fw firmware/edgeport/down.H16 firmware/edgeport/down.fw +clean_fw firmware/edgeport/down2.H16 firmware/edgeport/down2.fw +reject_firmware drivers/usb/serial/io_edgeport.c +clean_blob drivers/usb/serial/io_edgeport.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_EDGEPORT' +clean_mk CONFIG_USB_SERIAL_EDGEPORT drivers/usb/serial/Makefile + +announce USB_SERIAL_EDGEPORT_TI - "USB Inside Out Edgeport Serial Driver (TI devices)" +clean_fw firmware/edgeport/down3.bin.ihex firmware/edgeport/down3.bin +reject_firmware drivers/usb/serial/io_ti.c +clean_blob drivers/usb/serial/io_ti.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_EDGEPORT_TI' +clean_mk CONFIG_USB_SERIAL_EDGEPORT_TI drivers/usb/serial/Makefile + +announce USB_SERIAL_MXUPORT - "USB Moxa UPORT Serial Driver" +reject_firmware drivers/usb/serial/mxuport.c +clean_blob drivers/usb/serial/mxuport.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_MXUPORT' +clean_mk CONFIG_USB_SERIAL_MXUPORT drivers/usb/serial/Makefile + +announce USB_SERIAL_TI - "USB TI 3410/5052 Serial Driver" +drop_fw_file firmware/ti_3410.fw.ihex firmware/ti_3410.fw +drop_fw_file firmware/ti_5052.fw.ihex firmware/ti_5052.fw +drop_fw_file firmware/mts_cdma.fw.ihex firmware/mts_cdma.fw +drop_fw_file firmware/mts_gsm.fw.ihex firmware/mts_gsm.fw +drop_fw_file firmware/mts_edge.fw.ihex firmware/mts_edge.fw +reject_firmware drivers/usb/serial/ti_usb_3410_5052.c +clean_blob drivers/usb/serial/ti_usb_3410_5052.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_TI' +clean_mk CONFIG_USB_SERIAL_TI drivers/usb/serial/Makefile + +announce USB_SERIAL_WHITEHEAT - "USB ConnectTech WhiteHEAT Serial Driver" +clean_fw firmware/whiteheat.HEX firmware/whiteheat.fw +clean_fw firmware/whiteheat_loader.HEX firmware/whiteheat_loader.fw +clean_fw firmware/whiteheat_loader_debug.HEX firmware/whiteheat_loader_debug.fw +clean_blob drivers/usb/serial/whiteheat.c +clean_kconfig drivers/usb/serial/Kconfig 'USB_SERIAL_WHITEHEAT' +clean_mk CONFIG_USB_SERIAL_WHITEHEAT drivers/usb/serial/Makefile + +# uwb + +announce UWB_I1480U - Support for Intel Wireless UWB Link 1480 HWA +reject_firmware drivers/uwb/i1480/dfu/i1480-dfu.h +reject_firmware drivers/uwb/i1480/dfu/mac.c +reject_firmware drivers/uwb/i1480/dfu/phy.c +clean_blob drivers/uwb/i1480/dfu/usb.c +clean_kconfig drivers/uwb/Kconfig 'UWB_I1480U' +clean_mk CONFIG_UWB_I1480U drivers/uwb/i1480/dfu/Makefile + + + +################ +# Programmable # +################ + +announce LATTICE_ECP3_CONFIG - "Lattice ECP3 FPGA bitstrap configuration via SPI" +reject_firmware drivers/misc/lattice-ecp3-config.c +clean_blob drivers/misc/lattice-ecp3-config.c +clean_kconfig drivers/misc/Kconfig 'LATTICE_ECP3_CONFIG' +clean_mk CONFIG_LATTICE_ECP3_CONFIG drivers/misc/Makefile + +announce STE_MODEM_RPROC - "STE-Modem remoteproc support" +maybe_reject_firmware drivers/remoteproc/remoteproc_core.c +undefine_macro SPROC_MODEM_FIRMWARE "\"/*(DEBLOBBED)*/\"" \ + "disabled non-Free firmware" drivers/remoteproc/ste_modem_rproc.c +clean_kconfig drivers/remoteproc/Kconfig 'STE_MODEM_RPROC' +clean_mk CONFIG_STE_MODEM_RPROC drivers/remoteproc/Makefile + + +######### +# Sound # +######### + +announce SND_ASIHPI - "AudioScience ASIxxxx" +reject_firmware sound/pci/asihpi/hpidspcd.c +clean_blob sound/pci/asihpi/hpidspcd.c +clean_blob sound/pci/asihpi/hpioctl.c +clean_kconfig sound/pci/Kconfig 'SND_ASIHPI' +clean_mk CONFIG_SND_ASIHPI sound/pci/asihpi/Makefile + +announce SND_CS46XX - "Cirrus Logic (Sound Fusion) CS4280/CS461x/CS462x/CS463x" +reject_firmware sound/pci/cs46xx/cs46xx_lib.c +clean_blob sound/pci/cs46xx/cs46xx_lib.c +clean_kconfig sound/pci/Kconfig 'SND_CS46XX' +clean_mk 'CONFIG_SND_CS46XX' sound/pci/cs46xx/Makefile + +announce SND_KORG1212 - "Korg 1212 IO" +drop_fw_file firmware/korg/k1212.dsp.ihex firmware/korg/k1212.dsp +reject_firmware sound/pci/korg1212/korg1212.c +clean_blob sound/pci/korg1212/korg1212.c +clean_kconfig sound/pci/Kconfig 'SND_KORG1212' +clean_mk 'CONFIG_SND_KORG1212' sound/pci/korg1212/Makefile + +announce SND_MAESTRO3 - "ESS Allegro/Maestro3" +drop_fw_file firmware/ess/maestro3_assp_kernel.fw.ihex firmware/ess/maestro3_assp_kernel.fw +drop_fw_file firmware/ess/maestro3_assp_minisrc.fw.ihex firmware/ess/maestro3_assp_minisrc.fw +reject_firmware sound/pci/maestro3.c +clean_blob sound/pci/maestro3.c +clean_kconfig sound/pci/Kconfig 'SND_MAESTRO3' +clean_mk 'CONFIG_SND_MAESTRO3' sound/pci/Makefile + +announce SND_YMFPCI - "Yamaha YMF724/740/744/754" +drop_fw_file firmware/yamaha/ds1_ctrl.fw.ihex firmware/yamaha/ds1_ctrl.fw +drop_fw_file firmware/yamaha/ds1_dsp.fw.ihex firmware/yamaha/ds1_dsp.fw +drop_fw_file firmware/yamaha/ds1e_ctrl.fw.ihex firmware/yamaha/ds1e_ctrl.fw +reject_firmware sound/pci/ymfpci/ymfpci_main.c +clean_blob sound/pci/ymfpci/ymfpci_main.c +clean_kconfig sound/pci/Kconfig 'SND_YMFPCI' +clean_mk 'CONFIG_SND_YMFPCI' sound/pci/ymfpci/Makefile + +announce SND_SB16_CSP - "SB16 Advanced Signal Processor" +drop_fw_file firmware/sb16/alaw_main.csp.ihex firmware/sb16/alaw_main.csp +drop_fw_file firmware/sb16/mulaw_main.csp.ihex firmware/sb16/mulaw_main.csp +drop_fw_file firmware/sb16/ima_adpcm_init.csp.ihex firmware/sb16/ima_adpcm_init.csp +drop_fw_file firmware/sb16/ima_adpcm_capture.csp.ihex firmware/sb16/ima_adpcm_capture.csp +drop_fw_file firmware/sb16/ima_adpcm_playback.csp.ihex firmware/sb16/ima_adpcm_playback.csp +reject_firmware sound/isa/sb/sb16_csp.c +clean_blob sound/isa/sb/sb16_csp.c +clean_kconfig sound/isa/Kconfig 'SND_SB16_CSP' +clean_mk 'CONFIG_SND_SB16_CSP' sound/isa/sb/Makefile + +announce SND_WAVEFRONT - "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)" +drop_fw_file firmware/yamaha/yss225_registers.bin.ihex firmware/yamaha/yss225_registers.bin +reject_firmware sound/isa/wavefront/wavefront_fx.c +clean_blob sound/isa/wavefront/wavefront_fx.c +reject_firmware sound/isa/wavefront/wavefront_synth.c +clean_blob sound/isa/wavefront/wavefront_synth.c +clean_kconfig sound/isa/Kconfig 'SND_WAVEFRONT' +clean_mk 'CONFIG_SND_WAVEFRONT' sound/isa/wavefront/Makefile + +announce SND_VX_LIB - Digigram VX soundcards +reject_firmware sound/drivers/vx/vx_hwdep.c +clean_blob sound/drivers/vx/vx_hwdep.c +clean_kconfig sound/drivers/Kconfig 'SND_VX_LIB' +clean_mk CONFIG_SND_VX_LIB sound/drivers/vx/Makefile + +announce SND_DARLA20 - "(Echoaudio) Darla20" +clean_blob sound/pci/echoaudio/darla20.c +clean_kconfig sound/pci/Kconfig 'SND_DARLA20' +clean_mk CONFIG_SND_DARLA20 sound/pci/echoaudio/Makefile + +announce SND_DARLA24 - "(Echoaudio) Darla24" +clean_blob sound/pci/echoaudio/darla24.c +clean_kconfig sound/pci/Kconfig 'SND_DARLA24' +clean_mk CONFIG_SND_DARLA24 sound/pci/echoaudio/Makefile + +announce SND_ECHO3G - "(Echoaudio) 3G cards" +clean_blob sound/pci/echoaudio/echo3g.c +clean_kconfig sound/pci/Kconfig 'SND_ECHO3G' +clean_mk CONFIG_SND_ECHO3G sound/pci/echoaudio/Makefile + +announce SND_GINA20 - "(Echoaudio) Gina20" +clean_blob sound/pci/echoaudio/gina20.c +clean_kconfig sound/pci/Kconfig 'SND_GINA20' +clean_mk CONFIG_SND_GINA20 sound/pci/echoaudio/Makefile + +announce SND_GINA24 - "(Echoaudio) Gina24" +clean_blob sound/pci/echoaudio/gina24.c +clean_kconfig sound/pci/Kconfig 'SND_GINA24' +clean_mk CONFIG_SND_GINA24 sound/pci/echoaudio/Makefile + +announce SND_INDIGO - "(Echoaudio) Indigo" +clean_blob sound/pci/echoaudio/indigo.c +clean_kconfig sound/pci/Kconfig 'SND_INDIGO' +clean_mk CONFIG_SND_INDIGO sound/pci/echoaudio/Makefile + +announce SND_INDIGODJ - "(Echoaudio) Indigo DJ" +clean_blob sound/pci/echoaudio/indigodj.c +clean_kconfig sound/pci/Kconfig 'SND_INDIGODJ' +clean_mk CONFIG_SND_INDIGODJ sound/pci/echoaudio/Makefile + +announce SND_INDIGODJX - "(Echoaudio) Indigo DJx" +clean_blob sound/pci/echoaudio/indigodjx.c +clean_kconfig sound/pci/Kconfig 'SND_INDIGODJX' +clean_mk CONFIG_SND_INDIGODJX sound/pci/echoaudio/Makefile + +announce SND_INDIGOIO - "(Echoaudio) Indigo IO" +clean_blob sound/pci/echoaudio/indigoio.c +clean_kconfig sound/pci/Kconfig 'SND_INDIGOIO' +clean_mk CONFIG_SND_INDIGOIO sound/pci/echoaudio/Makefile + +announce SND_INDIGOIOX - "(Echoaudio) Indigo IOx" +clean_blob sound/pci/echoaudio/indigoiox.c +clean_kconfig sound/pci/Kconfig 'SND_INDIGOIOX' +clean_mk CONFIG_SND_INDIGOIOX sound/pci/echoaudio/Makefile + +announce SND_LAYLA20 - "(Echoaudio) Layla20" +clean_blob sound/pci/echoaudio/layla20.c +clean_kconfig sound/pci/Kconfig 'SND_LAYLA20' +clean_mk CONFIG_SND_LAYLA20 sound/pci/echoaudio/Makefile + +announce SND_LAYLA24 - "(Echoaudio) Layla24" +clean_blob sound/pci/echoaudio/layla24.c +clean_kconfig sound/pci/Kconfig 'SND_LAYLA24' +clean_mk CONFIG_SND_LAYLA24 sound/pci/echoaudio/Makefile + +announce SND_MIA - "(Echoaudio) Mia" +clean_blob sound/pci/echoaudio/mia.c +clean_kconfig sound/pci/Kconfig 'SND_MIA' +clean_mk CONFIG_SND_MIA sound/pci/echoaudio/Makefile + +announce SND_MONA - "(Echoaudio) Mona" +clean_blob sound/pci/echoaudio/mona.c +clean_kconfig sound/pci/Kconfig 'SND_MONA' +clean_mk CONFIG_SND_MONA sound/pci/echoaudio/Makefile + +announce SND_'<(Echoaudio)>' - "(Echoaudio) all of the above " +reject_firmware sound/pci/echoaudio/echoaudio.c +clean_blob sound/pci/echoaudio/echoaudio.c + +announce SND_EMU10K1 - "Emu10k1 (SB Live!, Audigy, E-mu APS)" +reject_firmware sound/pci/emu10k1/emu10k1_main.c +clean_blob sound/pci/emu10k1/emu10k1_main.c +clean_kconfig sound/pci/Kconfig 'SND_EMU10K1' +clean_mk CONFIG_SND_EMU10K1 sound/pci/emu10k1/Makefile + +announce SND_MIXART - "Digigram miXart" +reject_firmware sound/pci/mixart/mixart_hwdep.c +clean_blob sound/pci/mixart/mixart_hwdep.c +clean_kconfig sound/pci/Kconfig 'SND_MIXART' +clean_mk CONFIG_SND_MIXART sound/pci/mixart/Makefile + +announce SND_PCXHR - "Digigram PCXHR" +reject_firmware sound/pci/pcxhr/pcxhr_hwdep.c +clean_blob sound/pci/pcxhr/pcxhr_hwdep.c +clean_kconfig sound/pci/Kconfig 'SND_PCXHR' +clean_mk CONFIG_SND_PCXHR sound/pci/pcxhr/Makefile + +announce SND_RIPTIDE - "Conexant Riptide" +reject_firmware sound/pci/riptide/riptide.c +clean_blob sound/pci/riptide/riptide.c +clean_kconfig sound/pci/Kconfig 'SND_RIPTIDE' +clean_mk CONFIG_SND_RIPTIDE sound/pci/riptide/Makefile + +# This is ok, patch filenames are supplied as module parameters, and +# they are text files with patch instructions. +#announce SND_HDA_PATCH_LOADER - "Support initialization patch loading for HD-audio" +#reject_firmware sound/pci/hda/hda_hwdep.c +#clean_kconfig sound/pci/hda/Kconfig 'SND_HDA_PATCH_LOADER' + +announce SND_HDA_CODEC_CA0132_DSP - "Support new DSP code for CA0132 codec" +reject_firmware sound/pci/hda/patch_ca0132.c +clean_blob sound/pci/hda/patch_ca0132.c +clean_sed ' +/^config SND_HDA_CODEC_CA0132_DSP$/, /^config / { + s,(ctefx.bin),(/*(DEBLOBBED)*/),; +}' sound/pci/hda/Kconfig 'removed blob name' +clean_kconfig sound/pci/hda/Kconfig 'SND_HDA_CODEC_CA0132_DSP' +# There are no separate source files or Makefile entries for the _DSP option. +clean_mk CONFIG_SND_HDA_CODEC_CA0132 sound/pci/hda/Makefile + +announce SND_HDSP - "RME Hammerfall DSP Audio" +reject_firmware sound/pci/rme9652/hdsp.c +clean_blob sound/pci/rme9652/hdsp.c +clean_kconfig sound/pci/Kconfig 'SND_HDSP' +clean_mk CONFIG_SND_HDSP sound/pci/rme9652/Makefile + +announce SND_AICA - "Dreamcast Yamaha AICA sound" +reject_firmware sound/sh/aica.c +clean_blob sound/sh/aica.c +clean_kconfig sound/sh/Kconfig 'SND_AICA' +clean_mk CONFIG_SND_AICA sound/sh/Makefile + +announce SND_MSND_PINNACLE - "Support for Turtle Beach MultiSound Pinnacle" +clean_blob sound/isa/msnd/msnd_pinnacle.h +reject_firmware sound/isa/msnd/msnd_pinnacle.c +clean_blob sound/isa/msnd/msnd_pinnacle.c +clean_kconfig sound/isa/Kconfig 'SND_MSND_PINNACLE' +clean_mk CONFIG_SND_MSND_PINNACLE sound/isa/msnd/Makefile + +announce SND_MSND_CLASSIC - "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey" +clean_blob sound/isa/msnd/msnd_classic.h +clean_kconfig sound/isa/Kconfig 'SND_MSND_CLASSIC' +clean_mk CONFIG_SND_MSND_CLASSIC sound/isa/msnd/Makefile + +announce SOUND_MSNDCLAS - "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey (oss)" +clean_blob sound/oss/msnd_classic.h +clean_kconfig sound/oss/Kconfig 'SOUND_MSNDCLAS' +clean_sed ' +/^config MSNDCLAS_INIT_FILE$/, /^config / { + /^ default.*msndinit\.bin/ s,".*","/*(DEBLOBBED)*/",; +} +/^config MSNDCLAS_PERM_FILE$/, /^config / { + /^ default.*msndperm\.bin/ s,".*","/*(DEBLOBBED)*/",; +}' sound/oss/Kconfig 'removed default firmware' +clean_mk CONFIG_SOUND_MSNDCLAS sound/oss/Makefile + +announce SOUND_MSNDPIN - "Support for Turtle Beach MultiSound Pinnacle (oss)" +clean_blob sound/oss/msnd_pinnacle.h +clean_kconfig sound/oss/Kconfig 'SOUND_MSNDPIN' +clean_sed ' +/^config MSNDPIN_INIT_FILE$/, /^config / { + /^ default.*pndspini\.bin/ s,".*","/*(DEBLOBBED)*/",; +} +/^config MSNDPIN_PERM_FILE$/, /^config / { + /^ default.*pndsperm\.bin/ s,".*","/*(DEBLOBBED)*/",; +}' sound/oss/Kconfig 'removed default firmware' +clean_mk CONFIG_SOUND_MSNDPIN sound/oss/Makefile + +announce SND_SSCAPE - "Ensoniq SoundScape driver" +reject_firmware sound/isa/sscape.c +clean_blob sound/isa/sscape.c +clean_sed ' +/^config SND_SSCAPE$/, /^config / { + s,"\(scope\|sndscape\)\.co[d?]","/*(DEBLOBBED)*/",g; +}' sound/isa/Kconfig 'removed firmware names' +clean_kconfig sound/isa/Kconfig 'SND_SSCAPE' +clean_mk CONFIG_SND_SSCAPE sound/isa/Makefile + +announce SND_SOC_ADAU1701 - "ADAU1701 SigmaDSP processor" +clean_blob sound/soc/codecs/adau1701.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_ADAU1701' +clean_mk CONFIG_SND_SOC_ADAU1701 sound/soc/codecs/Makefile + +announce SND_SOC_ADAU1761 - "ADAU1761 SigmaDSP processor" +clean_blob sound/soc/codecs/adau1761.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_ADAU1761' +clean_mk CONFIG_SND_SOC_ADAU1761 sound/soc/codecs/Makefile + +announce SND_SOC_ADAU1781 - "ADAU1781 SigmaDSP processor" +clean_blob sound/soc/codecs/adau1781.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_ADAU1781' +clean_mk CONFIG_SND_SOC_ADAU1781 sound/soc/codecs/Makefile + +announce SND_SOC_SIGMADSP - "SigmaStudio firmware loader" +maybe_reject_firmware sound/soc/codecs/sigmadsp.c + +announce SND_SOC_INTEL_SST_ACPI - "Intel SST (LPE) Driver" +reject_firmware sound/soc/intel/sst-acpi.c +clean_blob sound/soc/intel/sst-acpi.c +clean_kconfig sound/soc/intel/Kconfig 'SND_SOC_INTEL_SST_ACPI' +clean_mk 'CONFIG_SND_SOC_INTEL_SST_ACPI' sound/soc/intel/Makefile + +announce SND_SOC_WM0010 - "WM0010 DSP driver" +reject_firmware sound/soc/codecs/wm0010.c +clean_blob sound/soc/codecs/wm0010.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_WM0010' +clean_mk CONFIG_SND_SOC_WM0010 sound/soc/codecs/Makefile + +# It's not clear that wm2000_anc.bin is pure data. +# Check with developer, clean up for now. +announce SND_SOC_WM2000 - "WM2000 ALSA Soc Audio codecs" +reject_firmware sound/soc/codecs/wm2000.c +clean_blob sound/soc/codecs/wm2000.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_WM2000' +clean_mk CONFIG_SND_SOC_WM2000 sound/soc/codecs/Makefile + +announce SND_SOC_WM8994 - "WM8994 ALSA Soc Audio codecs" +reject_firmware sound/soc/codecs/wm8958-dsp2.c +clean_blob sound/soc/codecs/wm8958-dsp2.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_WM8994' +clean_mk CONFIG_SND_SOC_WM8994 sound/soc/codecs/Makefile + +# The coeff files might be pure data, but the wmfw surely aren't. +announce SND_SOC_WM_ADSP - "Wolfson ADSP support" +reject_firmware sound/soc/codecs/wm_adsp.c +clean_blob sound/soc/codecs/wm_adsp.c +clean_kconfig sound/soc/codecs/Kconfig 'SND_SOC_WM_ADSP' +clean_mk CONFIG_SND_SOC_WM_ADSP sound/soc/codecs/Makefile + +announce SND_SOC_SH4_SIU - "ALSA SoC driver for Renesas SH7343, SH7722 SIU peripheral" +reject_firmware sound/soc/sh/siu_dai.c +clean_blob sound/soc/sh/siu_dai.c +clean_kconfig sound/soc/sh/Kconfig 'SND_SOC_SH4_SIU' +clean_mk CONFIG_SND_SOC_SH4_SIU sound/soc/sh/Makefile + +announce SOUND_TRIX - "MediaTrix AudioTrix Pro support" +clean_blob sound/oss/trix.c +clean_kconfig sound/oss/Kconfig 'SOUND_TRIX' +clean_sed ' +/^config TRIX_BOOT_FILE$/, /^config / { + /^ default.*trxpro\.hex/ s,".*","/*(DEBLOBBED)*/",; +}' sound/oss/Kconfig 'removed default firmware' +clean_mk CONFIG_SOUND_TRIX sound/oss/Makefile + +announce SOUND_TRIX - "See above," +announce SOUND_PAS - "ProAudioSpectrum 16 support," +announce SOUND_SB - "100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support" +clean_blob sound/oss/sb_common.c +clean_kconfig sound/oss/Kconfig 'SOUND_PAS' +clean_kconfig sound/oss/Kconfig 'SOUND_SB' +clean_mk CONFIG_SOUND_PAS sound/oss/Makefile +clean_mk CONFIG_SOUND_SB sound/oss/Makefile + +announce SOUND_PSS - "PSS (AD1848, ADSP-2115, ESC614) support" +clean_sed 's,^\( [*] .*synth"\)\.$,\1/*.,' sound/oss/pss.c 'avoid nested comments' +clean_blob sound/oss/pss.c +clean_kconfig sound/oss/Kconfig 'SOUND_PSS' +clean_sed ' +/^config PSS_BOOT_FILE$/, /^config / { + /^ default.*dsp001\.ld/ s,".*","/*(DEBLOBBED)*/",; +}' sound/oss/Kconfig 'removed default firmware' +clean_mk CONFIG_SOUND_PSS sound/oss/Makefile + +announce SND_USB_6FIRE - "TerraTec DMX 6Fire USB" +reject_firmware sound/usb/6fire/firmware.c +clean_blob sound/usb/6fire/firmware.c +clean_kconfig sound/usb/Kconfig 'SND_USB_6FIRE' +clean_mk 'CONFIG_SND_USB_6FIRE' sound/usb/6fire/Makefile + +####### +# SOC # +####### + +announce KEYSTONE_NAVIGATOR_QMSS - "Keystone Queue Manager Sub System" +reject_firmware drivers/soc/ti/knav_qmss_queue.c +clean_blob Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt +clean_kconfig drivers/soc/ti/Kconfig 'KEYSTONE_NAVIGATOR_QMSS' +clean_mk CONFIG_KEYSTONE_NAVIGATOR_QMSS drivers/soc/ti/Makefile + +################# +# Documentation # +################# + +announce Documentation - "non-Free firmware scripts and documentation" +clean_blob Documentation/dvb/avermedia.txt +clean_blob Documentation/dvb/opera-firmware.txt +clean_blob Documentation/sound/alsa/ALSA-Configuration.txt +clean_blob Documentation/sound/oss/MultiSound +clean_blob Documentation/sound/oss/PSS +clean_blob Documentation/sound/oss/PSS-updates +clean_blob Documentation/sound/oss/README.OSS +clean_file Documentation/dvb/get_dvb_firmware +clean_file Documentation/video4linux/extract_xc3028.pl +clean_sed s,usb8388,whatever,g drivers/base/Kconfig 'removed blob name' +clean_blob firmware/README.AddingFirmware +clean_blob firmware/WHENCE + +if $errors; then + echo errors above were ignored because of --force >&2 +fi + +exit 0 diff --git a/freed-ora/current/master/deblob-check b/freed-ora/current/master/deblob-check index 326d85d98..c1e188325 100755 --- a/freed-ora/current/master/deblob-check +++ b/freed-ora/current/master/deblob-check @@ -1,6 +1,6 @@ #! /bin/sh -# deblob-check version 2014-09-28 +# deblob-check version 2014-11-25 # Inspired in gNewSense's find-firmware script. # Written by Alexandre Oliva <lxoliva@fsfla.org> @@ -3811,12 +3811,172 @@ set_except () { blobname 'brcm[/]brcmfmac43\(602\|5[46]\|570\)-pcie\.bin' drivers/net/wireless/brcm80211/brcmfmac/pcie.c blobname 'r8a779x_usb3_v1\.dlmem' drivers/usb/host/xhci-rcar.c blobname 'iwlwifi-3165-' drivers/net/wireless/iwlwifi/iwl-7000.c + + # New in 3.18. + accept '[\t ]*interrupts[ ]=[ ]<\([ \n\t]*0[ ][4567][0-9][ ]0xf04\)*>[;]' Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt + accept '[\t ]*<\([ \t\n]*[ 1-9][0-9 ][0-9]\)*>[;]' arch/arm/boot/dts/tegra124-nyan-big.dts + blobname 'keystone[/]qmss_pdsp_acc48_k2_le_1_0_0_8\.fw' Documentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt + defsnc 'static[ ]struct[ ]comp_testvec[ ]lz4\(hc\)\?_\(de\)\?comp_tv_template\[\][ ]=' crypto/testmgr.h + blobname 'mrvl[/]sd8887_uapsta\.bin' 'drivers/\(bluetooth/btmrvl_sdio\.c\|net/wireless/mwifiex/sdio.h\)' + blobname 'radeon[/]\(R600\|RS780\|RV770\)_uvd\.bin' drivers/gpu/drm/radeon/radeon_uvd.c + defsnc '[}][ ]wake_odr_data_rate_table\[\][ ]=' drivers/iio/accel/kxcjk-1013.c + defsnc 'static[ ]const[ ]struct[ ]linear_segments[ ]cnr_\(to_db\|\(64\|16\)qam\|qpsk\)_table\[\][ ]=' drivers/media/dvb-frontends/mb86a20s.c + defsnc 'static[ ]u8[ ]lgtdqcs001f_inittab\[\][ ]=' drivers/media/pci/mantis/mantis_vp1033.c + blobname 'go7007[/]go7007tv\.bin' drivers/media/pci/saa7134/saa7134-go7007.c + defsnc 'static[ ]const[ ]u8[ ]vivid_hdmi_edid\[256\][ ]=' drivers/media/platform/vivid/vivid-core.c + defsnc 'static[ ]const[ ]s8[ ]sin\[257\][ ]=' drivers/media/platform/vivid/vivid-tpg.c + defsnc 'static[ ]const[ ]struct[ ]shf[ ]shf_tab\[\][ ]=' drivers/media/tuners/mxl301rf.c + defsnc 'static[ ]const[ ]u8[ ]reg_initval\[QM1D1C0042_NUM_REGS\][ ]=' drivers/media/tuners/qm1d1c0042.c + accept '[\t]*priv->firmware[ ]=[ ]fw[;][\n][\t][}][ ]else[\n][\t]*fw[ ]=[ ]priv->firmware[;]' drivers/media/tuners/xc5000.c + blobname 'dvb-usb-it9303-01\.fw' drivers/media/usb/dvb-usb-v2/af9035.h + defsnc 'const[ ]u8[ ]tuning_blk_pattern_4bit\[MMC_TUNING_BLK_PATTERN_4BIT_SIZE\][ ]=' drivers/mmc/core/mmc.c + defsnc 'const[ ]u8[ ]tuning_blk_pattern_8bit\[MMC_TUNING_BLK_PATTERN_8BIT_SIZE\][ ]=' drivers/mmc/core/mmc.c + defsnc 'static[ ]const[ ]u16[ ]fm10k_crc_16b_table\[256\][ ]=' drivers/net/ethernet/intel/fm10k/fm10k_mbx.c + accept '[\t ]*[*][ ][ ]1[ ]0[ ]9[ ]8[ ]7[ ]6[ ]5[ ]4[ ]3[ ]2[ ]1[ ]0[ ]9[ ]8[ ]7[ ]6[ ]5[ ]4[ ]3[ ]2[ ]1[ ]0[ ]9[ ]8[ ]7[ ]6[ ]5[ ]4[ ]3[ ]2[ ]1[ ]0' drivers/net/ethernet/intel/fm10k/fm10k_mbx.h + blobname '83xx_post_fw\.bin' drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h + blobname 'rtl_nic[/]rtl\(8168h\|8107e\)-[12]\.fw' drivers/net/ethernet/realtek/r8169.c + blobname 'firmware-3\.bin' drivers/net/wireless/ath/ath10k/hw.h + blobname 'utf\.bin' drivers/net/wireless/ath/ath10k/testmode.c + accept '[ ][*][ ]wil_request_firmware[ ]-[ ]Request[ ]firmware' drivers/net/wireless/ath/wil6210/fw_inc.c + accept 'int[ ]wil_request_firmware[(]' 'drivers/net/wireless/ath/wil6210/\(fw_inc\.c\|wil6210\.h\)' + accept '[\t]*rc[ ]=[ ]wil_request_firmware[(]wil[,][ ]WIL_FW_NAME[)][;]' drivers/net/wireless/ath/wil6210/fw_inc.c + blobname 'wil6210\.fw' drivers/net/wireless/ath/wil6210/wil6210.h + blobname 'FW[ ]Version:[ ]%d_%d_%d' drivers/net/wireless/broadcom/bnx2x/bnx2x_main.c + blobname '\([,][\n \t]*BCM_5710_FW_\(MAJOR\|MINOR\|REVISION\)_VERSION\)\+' drivers/net/wireless/broadcom/bnx2x/bnx2x_main.c + blobname 'iwlwifi-8000' drivers/net/wireless/iwlwifi/iwl-8000.c + blobname '["]-["][ ]__stringify[(]api[)][ ]["]\.ucode["]' drivers/net/wireless/iwlwifi/iwl-8000.c + blobname '%s%s-%s\.ucode' drivers/net/wireless/iwlwifi/iwl-drv.c + blobname 'rtlwifi[/]rtl8723efw\.bin' drivers/net/wireless/rtlwifi/rtl8723ae/sw.c + defsnc 'u32[ ]RTL8723E_RADIOA_1TARRAY\[RTL8723ERADIOA_1TARRAYLENGTH\][ ]=' drivers/net/wireless/rtlwifi/rtl8723ae/table.c + defsnc '[\t]u8[ ]channel_all\[TARGET_CHNL_NUM_2G_5G\][ ]=' drivers/net/wireless/rtlwifi/rtl8723be/phy.c + blobname 'rtlwifi[/]rtl88\(21\|12\)aefw\(_wowlan\)\?\.bin' drivers/net/wireless/rtlwifi/rtl8821ae/sw.c + defsnc 'static[ ]u8[ ]rtl88\(12\|21\)ae_delta_swing_table_idx_5g[ba]_[np]\[\]\[DEL_SW_IDX_SZ\][ ]=' drivers/net/wireless/rtlwifi/rtl8821ae/dm.c + defsnc '[\t]u8[ ]channel_all\[ODM_TARGET_CHNL_NUM_2G_5G\][ ]=' drivers/staging/rtl8188eu/hal/phy.c + # Present before 3.18, but changes to reject_firmware shell + # function to make it match request_firmware only require us to + # recognize these as false positives. + accept 'static[ ]int[ ]lp55xx_request_firmware[(]' drivers/leds/leds-lp55xx-common.c + accept '[\t]*ret[ ]=[ ]lp55xx_request_firmware[(]' drivers/leds/leds-lp55xx-common.c + accept 'static[ ]int[ ]flexcop_fe_request_firmware[(]' drivers/media/common/b2c2/flexcop-fe-tuner.c + accept '[\t]\.request_firmware[ ]=[ ]flexcop_fe_request_firmware[,]' drivers/media/common/b2c2/flexcop-fe-tuner.c + accept '[\t]if[ ][(][(]ret[ ]=[ ]st->config->request_firmware[(]' drivers/media/dvb-frontends/bcm3510.c + accept '[\t][\t]ret[ ]=[ ]config->request_firmware[(]' drivers/media/dvb-frontends/or51211.c + accept '[\t]if[ ][(]state->config->request_firmware[(]' drivers/media/dvb-frontends/sp8870.c + accept '[\t][\t]ret[ ]=[ ]state->config->request_firmware[(]' drivers/media/dvb-frontends/sp887x.c + accept '[\t]int[ ][(][*]request_firmware[)][(]' drivers/media/dvb-frontends/sp887x.h + accept '[\t]ret[ ]=[ ]state->config->request_firmware[(]' drivers/media/dvb-frontends/tda1004x.c + accept '[\t]if[ ][(]state->config->request_firmware[ ]' drivers/media/dvb-frontends/tda1004x.c + accept '[\t][\t][\t]*ret[ ]=[ ]state->config->request_firmware[(]' drivers/media/dvb-frontends/tda1004x.c + accept 'static[ ]int[ ]alps_tdhd1_204_request_firmware[(]' drivers/media/dvb-frontends/tdhd1.h + accept '[\t]\.request_firmware[ ]=[ ]alps_tdhd1_204_request_firmware' drivers/media/dvb-frontends/tdhd1.h + accept 'static[ ]int[ ]microtune_mt7202dtf_request_firmware[(]' drivers/media/pci/bt8xx/dvb-bt8xx.c + accept '[\t]\.request_firmware[ ]=[ ]microtune_mt7202dtf_request_firmware[,]' drivers/media/pci/bt8xx/dvb-bt8xx.c + accept 'static[ ]int[ ]or51211_request_firmware[(]' drivers/media/pci/bt8xx/dvb-bt8xx.c + accept '[\t]\.request_firmware[ ]=[ ]or51211_request_firmware[,]' drivers/media/pci/bt8xx/dvb-bt8xx.c + accept 'static[ ]int[ ]pluto2_request_firmware[(]' drivers/media/pci/pluto2/pluto2.c + accept '[\t]\.request_firmware[ ]=[ ]pluto2_request_firmware[,]' drivers/media/pci/pluto2/pluto2.c + accept 'static[ ]int[ ]philips_tda1004x_request_firmware[(]' drivers/media/pci/saa7134/saa7134-dvb.c + accept '[\t]\.request_firmware[ ]=[ ]philips_tda1004x_request_firmware' drivers/media/pci/saa7134/saa7134-dvb.c + accept 'static[ ]int[ ]alps_tdlb7_request_firmware[(]' drivers/media/pci/ttpci/av7110.c + accept '[\t]\.request_firmware[ ]=[ ]alps_tdlb7_request_firmware[,]' drivers/media/pci/ttpci/av7110.c + accept 'static[ ]int[ ]philips_tu1216_request_firmware[(]' drivers/media/pci/ttpci/budget-av.c + accept '[\t]\.request_firmware[ ]=[ ]philips_tu1216_request_firmware[,]' drivers/media/pci/ttpci/budget-av.c + accept 'static[ ]int[ ]philips_tdm1316l_request_firmware[(]' drivers/media/pci/ttpci/budget-ci.c + accept '[\t]\.request_firmware[ ]=[ ]philips_tdm1316l_request_firmware[,]' drivers/media/pci/ttpci/budget-ci.c + accept 'static[ ]int[ ]alps_tdhd1_204_request_firmware[(]' drivers/media/pci/ttpci/budget.c + accept 'static[ ]int[ ]fimc_is_request_firmware[(]' drivers/media/platform/exynos4-is/fimc-is.c + accept '[\t]ret[ ]=[ ]fimc_is_request_firmware[(]' drivers/media/platform/exynos4-is/fimc-is.c + accept 'static[ ]int[ ]philips_tdm1316l_request_firmware[(]' drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c + accept '[\t]\.request_firmware[ ]=[ ]philips_tdm1316l_request_firmware[,]' drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c + accept '[\t][\t]pr_err[(]["][ ]request_firmware[ ]failed' drivers/misc/ti-st/st_kim.c + accept 'typhoon_request_firmware[(]' drivers/net/ethernet/3com/typhoon.c + accept '[\t]err[ ]=[ ]typhoon_request_firmware[(]' drivers/net/ethernet/3com/typhoon.c + accept '[\t][\t]goto[ ]request_firmware_exit[;]' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c + accept '[\t]BNX2X_ALLOC_AND_SET[(]init_data[,][ ]request_firmware_exit[,]' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c + accept 'request_firmware_exit:' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c + accept 'static[ ]int[ ]bnx2_request_firmware[(]' drivers/net/ethernet/broadcom/bnx2.c + accept '[\t]rc[ ]=[ ]bnx2_request_firmware[(]' drivers/net/ethernet/broadcom/bnx2.c + accept 'static[ ]int[ ]tg3_request_firmware[(]' drivers/net/ethernet/broadcom/tg3.c + accept '[\t][\t]err[ ]=[ ]tg3_request_firmware[(]' drivers/net/ethernet/broadcom/tg3.c + accept 'static[ ]const[ ]struct[ ]firmware[ ][*]e100_request_firmware[(]' drivers/net/ethernet/intel/e100.c + accept '[\t]fw[ ]=[ ]e100_request_firmware[(]' drivers/net/ethernet/intel/e100.c + accept '[/][*][ ]Call[ ]this[]function[ ]from[ ]process[ ]context[,][ ]it[ ]will[ ]sleep[ ]in[ ]request_firmware[.]' drivers/net/wireless/ipw2x00/ipw2200.c + accept '[ ][*][ ]@request_firmware_complete:' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t][\t]lbs_deb_fw[(]["]request_firmware_nowait[ ]error' drivers/net/wireless/libertas/firmware.c + accept 'void[ ]netxen_request_firmware[(]' 'drivers/net/ethernet/qlogic/netxen/netxen_nic\(\.h\|_init\.c\)' + accept '[\t]netxen_request_firmware[(]' drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c + accept 'void[ ]qlcnic_request_firmware[(]' 'drivers/net/ethernet/qlogic/qlcnic/qlcnic\(\.h\|_init\.c\)' + accept '[\t][\t]qlcnic_request_firmware[(]' drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c + accept 'static[ ]void[ ]rtl_request_firmware[(]' drivers/net/ethernet/realtek/r8169.c + accept '[\t]rtl_request_firmware[(]' drivers/net/ethernet/realtek/r8169.c + accept 'static[ ]void[ ]b43_request_firmware[(]' drivers/net/wireless/b43/main.c + accept '[\t]INIT_WORK[(][&]wl->firmware_load[,][ ]b43_request_firmware[)]' drivers/net/wireless/b43/main.c + accept 'static[ ]void[ ]b43legacy_request_firmware[(]' drivers/net/wireless/b43legacy/main.c + accept '[\t]INIT_WORK[(][&]wl->firmware_load[,][ ]b43legacy_request_firmware[)]' drivers/net/wireless/b43legacy/main.c + accept 'il4965_request_firmware[(]' drivers/net/wireless/iwlegacy/4965-mac.c + accept '[\t]if[ ][(]il4965_request_firmware[(]' drivers/net/wireless/iwlegacy/4965-mac.c + accept '[\t]err[ ]=[ ]il4965_request_firmware[(]' drivers/net/wireless/iwlegacy/4965-mac.c + accept 'static[ ]int[ ]iwl_request_firmware[(]' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t]if[ ][(]iwl_request_firmware[(]' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t]ret[ ]=[ ]iwl_request_firmware[(]' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[ ][*][ ]@request_firmware_complete:' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t]struct[ ]completion[ ]request_firmware_complete[;]' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t]\(complete\|\(init\|wait_for\)_completion\)[(][&]drv->request_firmware_complete[)]' drivers/net/wireless/iwlwifi/iwl-drv.c + accept '[\t][ ][*][ ]Obtain[ ]NVM[ ]image[ ]via[ ]request_firmware[.]' drivers/net/wireless/iwlwifi/mvm/nvm.c + accept 'static[ ]int[ ]mwl8k_request_firmware[(]' drivers/net/wireless/mwl8k.c + accept '[\t]rc[ ]=[ ]mwl8k_request_firmware[(]' drivers/net/wireless/mwl8k.c + accept 'static[ ]int[ ]p54spi_request_firmware[(]' drivers/net/wireless/p54/p54spi.c + accept '[\t]ret[ ]=[ ]p54spi_request_firmware[(]' drivers/net/wireless/p54/p54spi.c + accept 'static[ ]int[ ]rt2x00lib_request_firmware[(]' drivers/net/wireless/rt2x00/rt2x00firwmare.c + accept '[\t][\t]retval[ ]=[ ]rt2x00lib_request_firmware[(]' drivers/net/wireless/rt2x00/rt2x00firmware.c + accept '[\t][\t]wl1271_error[(]["]request_firmware_nowait[ ]failed' drivers/net/wireless/ti/wlcore/main.c + accept '[\t][\t]nfc_err[(][&]drv->pdev->dev[,][ ]["]request_firmware[ ]failed' drivers/nfc/nfcwilink.c + accept '[\t][\t][\t]["]request_firmware[ ]returned' drivers/nfc/nfcwilink.c + accept '[\t][\t]dev_err[(][&]rproc->dev[,][ ]["]request_firmware_nowait[ ]err' drivers/remoteproc/remoteproc_core.c + accept '[\t][\t]dev_err[(]dev[,][ ]["]request_firmware[ ]failed' drivers/remoteproc/remoteproc_core.c + accept 'static[ ]int[ ]asd_request_firmware[(]' drivers/scsi/aic94xx/aic94xx_seq.c + accept '[\t]err[ ]=[ ]asd_request_firmware[(]' drivers/scsi/aic94xx/aic94xx_seq.c + accept '[\t]uint32_t[ ]cfg_request_firmware_upgrade[;]' drivers/scsi/lpfc/lpfc.h + accept '[ ][*][ ]lpfc_request_firmware_store[ ]-[ ]' drivers/scsi/lpfc/lpfc_attr.c + accept 'lpfc_request_firmware_upgrade_store[(]' drivers/scsi/lpfc/lpfc_attr.c + accept 'lpfc_param_show[(]request_firmware_upgrade[)]' drivers/scsi/lpfc/lpfc_attr.c + accept '[\t]rc[ ]=[ ]lpfc_sli4_request_firmware_update[(]' drivers/scsi/lpfc/lpfc_attr.c + accept '[ ][*][ ]lpfc_request_firmware_upgrade_init[ ]-[ ]' drivers/scsi/lpfc/lpfc_attr.c + accept 'lpfc_request_firmware_upgrade_init[(]' drivers/scsi/lpfc/lpfc_attr.c + accept '[\t][\t]phba->cfg_request_firmware_upgrade[ ]=' drivers/scsi/lpfc/lpfc_attr.c + accept '[\t][\t][ ]*lpfc_request_firmware_upgrade_\(show\|store\)[,)]' drivers/scsi/lpfc/lpfc_attr.c + accept '[\t]lpfc_request_firmware_upgrade_init[(]' drivers/scsi/lpfc/lpfc_attr.c + accept 'int[ ]lpfc_sli4_request_firmware_update[(]' drivers/scsi/lpfc/lpfc_crtn.h + accept '[ ][*][ ]@fw:[ ]pointer[ ]to[ ]firmware[ ]image[ ]returned[ ]from[ ]request_firmware[.]' drivers/scsi/lpfc/lpfc_init.c + accept '[ ][*][ ]lpfc_sli4_request_firmware_update[ ]-[ ]' drivers/scsi/lpfc/lpfc_init.c + accept 'lpfc_sli4_request_firmware_update[(]' drivers/scsi/lpfc/lpfc_init.c + accept '[\t]if[ ][(]phba->cfg_request_firmware_upgrade[)]' drivers/scsi/lpfc/lpfc_init.c + accept '[\t][\t]ret[ ]=[ ]lpfc_sli4_request_firmware_update[(]' drivers/scsi/lpfc/lpfc_init.c + accept '[ ][*][ ]qla1280_request_firmware' drivers/scsi/qla1280.c + accept 'qla1280_request_firmware[(]' drivers/scsi/qla1280.c + accept '[\t]fw[ ]=[ ]qla1280_request_firmware[(]' drivers/scsi/qla1280.c + accept 'extern[ ]struct[ ]fw_blob[ ][*]qla2x00_request_firmware[(]' drivers/scsi/qla2xxx/qla_gbl.h + accept '[\t]blob[ ]=[ ]qla2x00_request_firmware[(]' drivers/scsi/qla2xxx/qla_init.c + accept '[\t]blob[ ]=[ ]ha->hablob[ ]=[ ]qla2x00_request_firmware[(]' drivers/scsi/qla2xxx/qla_nx.c + accept 'qla2x00_request_firmware[(]' drivers/scsi/qla2xxx/qla_os.c + accept '[\t]-[ ]change[ ]firmware[ ]loading[ ]for[ ]usb[ ]driver[ ]to[ ]proper[ ]kernel[ ]method[ ][(]request_firmware[)]' drivers/staging/ft1000/TODO + accept '[\t][\t]pr_err[(]["]rtl8723au:[ ]request_firmware[ ]load' drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c + accept '[\t ]*[*][ ]We[ ]call[ ]request_firmware_nowait[ ]instead[ ]of[ \t\n*]*request_firmware[ ]so[ ]that' drivers/tty/serial/ucc_uart.c + accept '[\t][\t]dev_err[(][&]dev->dev[,][ ]["]%d[,][ ]request_firmware[ ]failed' sound/pci/asihpi/hpidspcd.c + accept 'static[ ]int[ ]snd_ymfpci_request_firmware[(]' sound/pci/ymfpci/ymfpci_main.c + accept '[\t]err[ ]=[ ]snd_ymfpci_request_firmware[(]' sound/pci/ymfpci/ymfpci_main.c ;; */*freedo*.patch | */*logo*.patch) accept 'P[13]\([\n]#[^\n]*\)*[\n]*\([\n][0-9 ]*\)\+' drivers/video/logo/logo_libre_clut224.ppm ;; + */patch*-3.1[467].*) + # False positives in patch-3.17.2, 3.16.7, 3.14.23 and newer. + accept '[;][/][*]@@[ ]-[0-9]*,[0-9]*[ ][+][0-9]*,[0-9]*[ ]@@[ ]_request_firmware[(]const[ ]struct[ ]firmware' drivers/base/firmware_class.c + accept '[ ]ret[ ]=[ ]_request_firmware_prepare[(]' drivers/base/firmware_class.c + ;; + */patch-3.13*) # Introduced in 3.13.2. accept '[\t][\t][\t]err[ ]=[ ]request_firmware[(][&]firmware[,][ \t\n]*rtlpriv->cfg' drivers/net/wireless/rtlwifi/core.c diff --git a/freed-ora/current/master/deblob-main b/freed-ora/current/master/deblob-main index 3a85cdc96..b2bf813ce 100755 --- a/freed-ora/current/master/deblob-main +++ b/freed-ora/current/master/deblob-main @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2008-2012 Alexandre Oliva <lxoliva@fsfla.org> +# Copyright (C) 2008-2014 Alexandre Oliva <lxoliva@fsfla.org> # This program is part of GNU Linux-libre, a GNU project that # publishes scripts to clean up Linux so as to make it suitable for @@ -271,15 +271,10 @@ xdelta3 -e -9 -S djw -s linux-$kver.tar linux-libre-$kver-$gnu.tar linux-libre-$ echo Creating xdelta between linux-$kver.tar and linux-libre-$kver-$gnu.tar xdelta delta -0 linux-$kver.tar linux-libre-$kver-$gnu.tar linux-libre-$kver-$gnu.xdelta || : # xdelta returns nonzero on success -cleanup="linux-libre-$kver-$gnu.tar linux-libre-$kver-$gnu.vcdiff linux-libre-$kver-$gnu.xdelta" +cleanup="linux-libre-$kver-$gnu.tar linux-libre-$kver-$gnu.xdelta" echo Compressing binary deltas and linux-libre-$kver-$gnu.tar rm -f linux-$kver.tar -if test -f linux-libre-$kver-$gnu.vcdiff; then - bzip2 -k9 linux-libre-$kver-$gnu.vcdiff - xz -k9 linux-libre-$kver-$gnu.vcdiff || : - lzip -k9 linux-libre-$kver-$gnu.vcdiff || : -fi if test -f linux-libre-$kver-$gnu.xdelta; then bzip2 -k9 linux-libre-$kver-$gnu.xdelta xz -k9 linux-libre-$kver-$gnu.xdelta || : @@ -296,9 +291,6 @@ for f in \ linux-libre-$kver-$gnu.tar.xz \ linux-libre-$kver-$gnu.tar.lz \ linux-libre-$kver-$gnu.vcdiff \ - linux-libre-$kver-$gnu.vcdiff.bz2 \ - linux-libre-$kver-$gnu.vcdiff.xz \ - linux-libre-$kver-$gnu.vcdiff.lz \ linux-libre-$kver-$gnu.xdelta \ linux-libre-$kver-$gnu.xdelta.bz2 \ linux-libre-$kver-$gnu.xdelta.xz \ diff --git a/freed-ora/current/master/disable-libdw-unwind-on-non-x86.patch b/freed-ora/current/master/disable-libdw-unwind-on-non-x86.patch deleted file mode 100644 index a57c70608..000000000 --- a/freed-ora/current/master/disable-libdw-unwind-on-non-x86.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org> -Date: Fri, 18 Apr 2014 06:58:29 -0400 -Subject: [PATCH] disable libdw unwind on non-x86 - -Bugzilla: 1025603 -Upstream-status: ?? ---- - tools/perf/config/Makefile | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile -index 1f67aa02d240..86c21a24da46 100644 ---- a/tools/perf/config/Makefile -+++ b/tools/perf/config/Makefile -@@ -52,6 +52,10 @@ ifeq ($(ARCH),powerpc) - CFLAGS += -DHAVE_SKIP_CALLCHAIN_IDX - endif - -+ifneq ($(ARCH),x86) -+ NO_LIBDW_DWARF_UNWIND := 1 -+endif -+ - ifeq ($(LIBUNWIND_LIBS),) - NO_LIBUNWIND := 1 - else --- -1.9.3 - diff --git a/freed-ora/current/master/drm-i915-hush-check-crtc-state.patch b/freed-ora/current/master/drm-i915-hush-check-crtc-state.patch index b4bea5f76..be7d43c6c 100644 --- a/freed-ora/current/master/drm-i915-hush-check-crtc-state.patch +++ b/freed-ora/current/master/drm-i915-hush-check-crtc-state.patch @@ -14,10 +14,10 @@ Upstream-status: http://lists.freedesktop.org/archives/intel-gfx/2013-November/0 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index d8324c69fa86..ee0ca36930f8 100644 +index f0a1a56406eb..e5fd8b9148a9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c -@@ -10656,7 +10656,7 @@ check_crtc_state(struct drm_device *dev) +@@ -10963,7 +10963,7 @@ check_crtc_state(struct drm_device *dev) if (active && !intel_pipe_config_compare(dev, &crtc->config, &pipe_config)) { diff --git a/freed-ora/current/master/drm-vmwgfx-Fix-drm.h-include.patch b/freed-ora/current/master/drm-vmwgfx-Fix-drm.h-include.patch deleted file mode 100644 index 9e6929b9d..000000000 --- a/freed-ora/current/master/drm-vmwgfx-Fix-drm.h-include.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Josh Boyer <jwboyer@fedoraproject.org> -Date: Fri, 5 Sep 2014 13:19:59 -0400 -Subject: [PATCH] drm/vmwgfx: Fix drm.h include - -The userspace drm.h include doesn't prefix the drm directory. This can lead -to compile failures as /usr/include/drm/ isn't in the standard gcc include -paths. Fix it to be <drm/drm.h>, which matches the rest of the driver drm -header files that get installed into /usr/include/drm. - -Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1138759 - -Fixes: 1d7a5cbf8f74e -Reported-by: Jeffrey Bastian <jbastian@redhat.com> -Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> ---- - include/uapi/drm/vmwgfx_drm.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/uapi/drm/vmwgfx_drm.h b/include/uapi/drm/vmwgfx_drm.h -index 4fc66f6b12ce..c472bedbe38e 100644 ---- a/include/uapi/drm/vmwgfx_drm.h -+++ b/include/uapi/drm/vmwgfx_drm.h -@@ -29,7 +29,7 @@ - #define __VMWGFX_DRM_H__ - - #ifndef __KERNEL__ --#include <drm.h> -+#include <drm/drm.h> - #endif - - #define DRM_VMW_MAX_SURFACE_FACES 6 --- -1.9.3 - diff --git a/freed-ora/current/master/efi-Add-EFI_SECURE_BOOT-bit.patch b/freed-ora/current/master/efi-Add-EFI_SECURE_BOOT-bit.patch index 8f49e006a..9d78030a1 100644 --- a/freed-ora/current/master/efi-Add-EFI_SECURE_BOOT-bit.patch +++ b/freed-ora/current/master/efi-Add-EFI_SECURE_BOOT-bit.patch @@ -12,10 +12,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 2 files changed, 3 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 5a5cf7395724..fb282ff6a802 100644 +index f4eb99432db1..bc31a43b31a0 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1144,7 +1144,9 @@ void __init setup_arch(char **cmdline_p) +@@ -1152,7 +1152,9 @@ void __init setup_arch(char **cmdline_p) #ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE if (boot_params.secure_boot) { @@ -26,10 +26,10 @@ index 5a5cf7395724..fb282ff6a802 100644 #endif diff --git a/include/linux/efi.h b/include/linux/efi.h -index 45cb4ffdea62..ebe6a24cc1e1 100644 +index 0949f9c7e872..130ba866a24a 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -923,6 +923,7 @@ extern int __init efi_setup_pcdp_console(char *); +@@ -936,6 +936,7 @@ extern int __init efi_setup_pcdp_console(char *); #define EFI_64BIT 5 /* Is the firmware 64-bit? */ #define EFI_PARAVIRT 6 /* Access is via a paravirt interface */ #define EFI_ARCH_1 7 /* First arch-specific bit */ diff --git a/freed-ora/current/master/efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch b/freed-ora/current/master/efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch index 928e1457c..95e5f0455 100644 --- a/freed-ora/current/master/efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch +++ b/freed-ora/current/master/efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch @@ -14,10 +14,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index 975d11bfaf5b..94bf7819857a 100644 +index 6da2da7ac9c3..ba3cf70c7d5a 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c -@@ -817,8 +817,9 @@ out: +@@ -831,8 +831,9 @@ out: static int get_secure_boot(void) { @@ -28,7 +28,7 @@ index 975d11bfaf5b..94bf7819857a 100644 efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID; efi_status_t status; -@@ -842,6 +843,23 @@ static int get_secure_boot(void) +@@ -856,6 +857,23 @@ static int get_secure_boot(void) if (setup == 1) return 0; diff --git a/freed-ora/current/master/efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch b/freed-ora/current/master/efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch index 18d269488..bb2f8524b 100644 --- a/freed-ora/current/master/efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch +++ b/freed-ora/current/master/efi-Make-EFI_SECURE_BOOT_SIG_ENFORCE-depend-on-EFI.patch @@ -11,10 +11,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 61542c282e70..e5ee669e87b6 100644 +index 7b8969db8398..d1f4a3d88dfc 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1567,7 +1567,8 @@ config EFI_MIXED +@@ -1612,7 +1612,8 @@ config EFI_MIXED If unsure, say N. config EFI_SECURE_BOOT_SIG_ENFORCE diff --git a/freed-ora/current/master/hibernate-Disable-in-a-signed-modules-environment.patch b/freed-ora/current/master/hibernate-Disable-in-a-signed-modules-environment.patch index 53dd6deac..6c89536a7 100644 --- a/freed-ora/current/master/hibernate-Disable-in-a-signed-modules-environment.patch +++ b/freed-ora/current/master/hibernate-Disable-in-a-signed-modules-environment.patch @@ -13,7 +13,7 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c -index a9dfa79b6bab..14c7356ff53a 100644 +index 1f35a3478f3c..5e2472fc3dda 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -28,6 +28,7 @@ diff --git a/freed-ora/current/master/i8042-Add-notimeout-quirk-for-Fujitsu-Lifebook-A544-.patch b/freed-ora/current/master/i8042-Add-notimeout-quirk-for-Fujitsu-Lifebook-A544-.patch new file mode 100644 index 000000000..d6c4f1b9c --- /dev/null +++ b/freed-ora/current/master/i8042-Add-notimeout-quirk-for-Fujitsu-Lifebook-A544-.patch @@ -0,0 +1,45 @@ +From: Hans de Goede <hdegoede@redhat.com> +Date: Fri, 24 Oct 2014 11:30:19 +0200 +Subject: [PATCH] i8042: Add notimeout quirk for Fujitsu Lifebook A544 and + Lifebook AH544 + +These models need i8042.notimeout, otherwise the touchpad will not work. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731 +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138 +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/input/serio/i8042-x86ia64io.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h +index a0bcbb64d06d..aa9b299f4e26 100644 +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -364,6 +364,22 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { + }, + }, + { ++ /* Fujitsu A544 laptop */ ++ /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"), ++ }, ++ }, ++ { ++ /* Fujitsu AH544 laptop */ ++ /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"), ++ }, ++ }, ++ { + /* Fujitsu U574 laptop */ + /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */ + .matches = { +-- +1.9.3 + diff --git a/freed-ora/current/master/input-silence-i8042-noise.patch b/freed-ora/current/master/input-silence-i8042-noise.patch index 0872bc3d3..f971723ad 100644 --- a/freed-ora/current/master/input-silence-i8042-noise.patch +++ b/freed-ora/current/master/input-silence-i8042-noise.patch @@ -16,7 +16,7 @@ Upstream-status: Fedora mustard 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c -index b67d9aef9fe4..dd58b0fdaafd 100644 +index 9717d5f20139..a3101d2fd936 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -122,8 +122,6 @@ void device_pm_unlock(void) diff --git a/freed-ora/current/master/kbuild-AFTER_LINK.patch b/freed-ora/current/master/kbuild-AFTER_LINK.patch index 603e0e053..f686a6365 100644 --- a/freed-ora/current/master/kbuild-AFTER_LINK.patch +++ b/freed-ora/current/master/kbuild-AFTER_LINK.patch @@ -106,7 +106,7 @@ index 5a4affe025e8..8ff38ce94c8e 100644 VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \ $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh -index 86a4fe75f453..161637ed5611 100644 +index 86a4fe75f453..161637ed5611 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -65,6 +65,10 @@ vmlinux_link() diff --git a/freed-ora/current/master/kernel-arm64.patch b/freed-ora/current/master/kernel-arm64.patch index a05aa3383..6106d5b9c 100644 --- a/freed-ora/current/master/kernel-arm64.patch +++ b/freed-ora/current/master/kernel-arm64.patch @@ -1,135 +1,166 @@ -commit 87257d3e584fad0b47e6304da54a1932f42b11bb -Author: Mark Salter <msalter@redhat.com> -Date: Tue Sep 30 17:19:24 2014 -0400 +commit ffbe9c488b747686ebfbb35e7c87aec80b183193 +Merge: ccdf75c fc14f9c +Author: Kyle McMartin <kmcmarti@redhat.com> +Date: Mon Nov 17 11:34:47 2014 -0500 - arm64: avoid need for console= to enable serial console + Merge tag 'v3.18-rc5' into devel - Tell kernel to prefer one of the serial ports on platforms - pl011, 8250, or sbsa uarts. console= on command line will - override these assumed preferences. + Linux 3.18-rc5 - Signed-off-by: Mark Salter <msalter@redhat.com> + Conflicts: + drivers/net/ethernet/apm/xgene/xgene_enet_hw.c -commit 56db24589d311ea3590527030ede007ec339e2d7 -Author: Tom Lendacky <thomas.lendacky@amd.com> -Date: Tue Sep 9 23:33:17 2014 -0400 +commit ccdf75caa6a1165b8199930983596ef64cf09bd3 +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 17:09:29 2014 -0500 - drivers: net: AMD Seattle XGBE PHY support for A0 silicon + DO NOT UPSTREAM - pci/xgene: Provide fixup for ACPI MCFG support - This patch modifies the upstream AMD XGBE PHY driver to support - A0 Seattle silicon in currently shipping systems. The upstream - Linux driver is targetted for Seattle B0 silicon. + Xgene doesn't decode bus bits of mmconfig region and only + supports devfn 0 of bus 0. For other buses/devices, some + internal registers need to be poked. This patch provides + a fixup to support ACPI MCFG tables. This is a horrible + hack allowing the hardware to be used for PCI testing, but + it is not intended to be a long term patch. Signed-off-by: Mark Salter <msalter@redhat.com> -commit 75554bb2e3c433a47e172d81a0b59df58810dc01 -Author: Tom Lendacky <thomas.lendacky@amd.com> -Date: Tue Sep 9 23:34:07 2014 -0400 +commit 4421965a8ea7caae3f50760abce1094e0186c05e +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 17:33:18 2014 -0500 - drivers: net: AMD Seattle XGBE 10GbE support for A0 silicon + DO NOT UPSTREAM - provide hook for MCFG fixups - This patch modifies the upstream AMD 10GbE XGBE Ethernet driver to - support A0 Seattle silicon in currently shipping systems. The - upstream Linux driver is targetted for Seattle B0 silicon. + This is a temprary mechanism needed by at least one early + arm64 hardware platform with broken MCFG support. This is + not intended for upstream and will go away as soon as newer + hardware with fully compliant ECAM becomes available. Signed-off-by: Mark Salter <msalter@redhat.com> -commit 41cb1b3c9e62256b8a4e92c50cd51b2a68d0c9c6 -Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Fri Jul 26 17:55:02 2013 +0100 +commit dcaeb407c91845739a64fb719a8c8d34474371e8 +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 17:30:25 2014 -0500 - virtio-mmio: add ACPI probing + arm64/pci/acpi: initial support for ACPI probing of PCI - Added the match table and pointers for ACPI probing to the driver. - - Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit c06502fb4f00c6996c1f55cd342288508808c678 -Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Wed Jul 24 11:29:48 2013 +0100 +commit 68c8ee5c1ab7b899401750cc359912efbeb40676 +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 17:23:57 2014 -0500 - net: smc91x: add ACPI probing support. + arm64/acpi/pci: add support for parsing MCFG table - Add device ID LINA0003 for this device and add the match table. - - As its a platform device it needs no other code and will be probed in by - acpi_platform once device ID is added. + Add support for parsing MCFG table and provide functions to read/write + PCI configuration space based on the parsed info. This provides the + low-level raw_pci_read/raw_pci_write functionality. - Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit aad559613ff05a13f940129675659297e7125979 +commit fada05b28e93c24e8932539d94a679ce55ff332f Author: Mark Salter <msalter@redhat.com> -Date: Tue Sep 23 12:48:48 2014 -0400 +Date: Mon Nov 10 16:42:14 2014 -0500 - arm64/pci: add coherency inheritance for pci devices + DO NOT UPSTREAM - pci/xgene: workaround CRS issue + + CRS is not behaving properly for some reason. Until this + gets diagnosed properly, pretend not to support it in order + to prevent hangs in 3.18 kernel. Signed-off-by: Mark Salter <msalter@redhat.com> -commit 8d2a4226d96ccae17fbc0ef7d7d9c5a07ad8b31f -Author: Mark Salter <msalter@redhat.com> -Date: Tue Sep 23 12:35:17 2014 -0400 +commit e917d30f3febf6d88cc5001ad236ca367a211cef +Author: Duc Dang <dhdang@apm.com> +Date: Thu Nov 6 17:14:18 2014 -0800 - arm64/acpi: make acpi disabled by default + PCI: X-Gene: assign resource to bus before adding new devices - Signed-off-by: Mark Salter <msalter@redhat.com> + X-Gene PCIE driver currently depends on Liviu Dudau's patch + https://lkml.org/lkml/2014/9/30/166 in order to assign resource + to root bus and endpoint devices. The patch was dropped because + it will break x86, powerpc and probably others. So X-Gene PCIE + host functionality is currently broken. + + This patch adds function calls to create and scan root_bus as well + as assign unassigned bus resource (similar to Liviu Dudau's patch + above). This will help resolve the dependency to Liviu Dudau's patch + and make X-Gene PCIE work in latest open-source kernel. + + Signed-off-by: Duc Dang <dhdang@apm.com> + Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> -commit 0553f2b9fc94bfb0f9038003ad6f150cca196aad -Author: Wei Huang <wei@redhat.com> -Date: Thu Sep 18 20:32:03 2014 -0400 +commit 6581c0591cafe4fa3b0bd9a25a84a5bf830209fd +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 16:31:05 2014 -0500 - KVM: fix VTTBR_BADDR_MASK + iommu/arm-smmu: fix NULL dereference with ACPI PCI devices - The following is patch from AMD to fix VTTBR_BADDR_MASK. According to - AMD, this patch is required to enable KVM on Seattle. + Fix a NULL dereference in find_mmu_master which occurs when + booting with ACPI. In that case, PCI bridges with not have + an of_node. Add a check for NULL of_node and bail out if that + is the case. - The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current - systems. Rather than just add a bit it seems like a good time to also set - things at run-time instead of compile time to accomodate more hardware. + Signed-off-by: Mark Salter <msalter@redhat.com> + +commit ae7850d2b972ee1258878ccc16824aba9d35b653 +Author: Guenter Roeck <linux@roeck-us.net> +Date: Sun Nov 2 18:19:15 2014 -0800 + + netfilter: nft_reject_bridge: Fix powerpc build error - This patch sets TCR_EL2.PS, VTCR_EL2.T0SZ and vttbr_baddr_mask in runtime, - not compile time. + Fix: + net/bridge/netfilter/nft_reject_bridge.c: + In function 'nft_reject_br_send_v6_unreach': + net/bridge/netfilter/nft_reject_bridge.c:240:3: + error: implicit declaration of function 'csum_ipv6_magic' + csum_ipv6_magic(&nip6h->saddr, &nip6h->daddr, + ^ + make[3]: *** [net/bridge/netfilter/nft_reject_bridge.o] Error 1 - In ARMv8, EL2 physical address size (TCR_EL2.PS) and stage2 input address - size (VTCR_EL2.T0SZE) cannot be determined in compile time since they - depend on hardware capability. + Seen with powerpc:allmodconfig. - According to Table D4-23 and Table D4-25 in ARM DDI 0487A.b document, - vttbr_x is calculated using different fixed values with consideration - of T0SZ, granule size and the level of translation tables. Therefore, - vttbr_baddr_mask should be determined dynamically. + Fixes: 523b929d5446 ("netfilter: nft_reject_bridge: don't use IP stack to reject traffic") + Cc: Pablo Neira Ayuso <pablo@netfilter.org> + Signed-off-by: Guenter Roeck <linux@roeck-us.net> + Signed-off-by: David S. Miller <davem@davemloft.net> + +commit e2992498e4b2aad3ceac52bfb6faccfd18332236 +Author: Mark Salter <msalter@redhat.com> +Date: Mon Nov 10 21:35:11 2014 -0500 + + DO NOT UPSTREAM - arm64: fix dma_ops for ACPI and PCI devices - Changes since v5: - Fixed declaration of vttbr_baddr_mask to not create multiple instances - Refactored return codes based on feedback - For 32 bit included kvm_arm.h in kvm_mmu.h to explictly pick up - VTTBR_BADDR_MASK + Commit 2189064795dc3fb4101e5: - Changes since v4: - More minor cleanups from review - Moved some functions into headers - Added runtime check in kvm_alloc_stage2_pgd + arm64: Implement set_arch_dma_coherent_ops() to replace bus notifiers - Changes since v3: - Another rebase - Addressed minor comments from v2 + removed the bus notifiers from dma-mapping.c. This patch + adds the notifier back for ACPI and PCI devices until a + better permanent solution is worked out. - Changes since v2: - Rebased on https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next branch + Signed-off-by: Mark Salter <msalter@redhat.com> + +commit ceb5533cf5a6b68b68dc4b8ad61f5671576bdaf2 +Author: Mark Salter <msalter@redhat.com> +Date: Thu Aug 14 12:32:13 2014 -0400 + + acpi: add utility to test for device dma coherency - Changes since v1: - Rebased fix on Jungseok Lee's patch https://lkml.org/lkml/2014/5/12/189 to - provide better long term fix. Updated that patch to log error instead of - silently fail on unaligned vttbr. + ACPI 5.1 adds a _CCA object to indicate memory coherency + of a bus master device. It is an integer with zero meaning + non-coherent and one meaning coherent. This attribute may + be inherited from a parent device. It may also be missing + entirely, in which case, an architecture-specific default + is assumed. - Cc: Marc Zyngier <marc.zyngier@arm.com> - Cc: Christoffer Dall <christoffer.dall@linaro.org> - Cc: Sungjinn Chung <sungjinn.chung@samsung.com> - Signed-off-by: Jungseok Lee <jays.lee@samsung.com> - Signed-off-by: Joel Schopp <joel.schopp@amd.com> + This patch adds a utility function to parse a device handle + (and its parents) for a _CCA object and return the coherency + attribute if found. - Signed-off-by: Wei Huang <wei@redhat.com> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit f53d1278fe445b7130f1ff76b2f453b453368284 +commit 21fef5d50bb3d4465c6b644bc451c1d219967a81 Author: Wei Huang <wei@redhat.com> Date: Thu Sep 18 20:02:57 2014 -0400 @@ -146,7 +177,7 @@ Date: Thu Sep 18 20:02:57 2014 -0400 Signed-off-by: Wei Huang <wei@redhat.com> -commit ba63e452ff5b09cc0314f94e163a51c3279b9ca7 +commit 3357db72822a2c9bc012528c6be3cf861fb3f35c Author: Wei Huang <wei@redhat.com> Date: Thu Sep 18 20:02:56 2014 -0400 @@ -159,7 +190,7 @@ Date: Thu Sep 18 20:02:56 2014 -0400 Signed-off-by: Wei Huang <wei@redhat.com> -commit dd3f6094c2142786f40a3bc4d69c60b430ecc675 +commit dc62803a26a34bb3190c9c1b5e3639ca6ebbf788 Author: Wei Huang <wei@redhat.com> Date: Thu Sep 18 20:02:55 2014 -0400 @@ -176,143 +207,633 @@ Date: Thu Sep 18 20:02:55 2014 -0400 Signed-off-by: Wei Huang <wei@redhat.com> -commit cdfc19f1fbe88c1610db790ad55318d55ab00ee9 -Author: Mark Salter <msalter@redhat.com> -Date: Thu Sep 18 21:13:05 2014 -0400 +commit 18099d49d96bfac5096b8ad1d3d5c6d14f92e0a1 +Author: Tom Lendacky <thomas.lendacky@amd.com> +Date: Mon Sep 15 17:02:52 2014 -0600 - arm64/pci: fix dma coherency inheritance for PCI devices + amd-xgbe: AMD 10GbE driver APCI support for A0 - The default dma_ops for devices on arm64 systems are noncoherent in - nature and rely upon special operations and bounce buffers to - perform a device DMA operation to/from memory. Some drivers rely - upon coherent operations involving suitably capable hardware. In - this case, a "dma-coherent" property will exist on the corresponding - Device Tree node for the bridge device, or one of its ancestors. - This patch adds support for applying a DMA coherent dma_ops for - PCI devices in the case of such a property. + This patch provides ACPI support for the AMD 10GbE device driver + and AMD 10GbE phy driver. - Signed-off-by: Mark Salter <msalter@redhat.com> + Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> -commit c8a62324eba5718fb43a94a168de7a81787aa94d +commit 7f208a9dffd58379f2e42e226052386e93d4b2dd Author: Mark Salter <msalter@redhat.com> -Date: Thu Sep 18 15:05:23 2014 -0400 +Date: Tue Oct 7 12:54:08 2014 -0400 - arm64: add sev to parking protocol + xgene acpi network - first cut + +commit e3ce87d3414a845f8cbf71f0d80f3f3136995ce6 +Author: Geert Uytterhoeven <geert+renesas@glider.be> +Date: Thu Nov 6 12:23:23 2014 +0100 + + leds: leds-gpio: Fix legacy GPIO number case - Parking protocol wakes secondary cores with an interrupt. - This patch adds an additional sev() to send an event. This - is a temporary hack for APM Mustang board and not intended - for upstream. + In the legacy case, led_dat->gpiod is initialized correctly, but + overwritten later by template->gpiod, which is NULL, causing leds-gpio + to fail with: - Signed-off-by: Mark Salter <msalter@redhat.com> + gpiod_direction_output: invalid GPIO + leds-gpio: probe of leds-gpio failed with error -22 + + Move the initialization of led_dat->gpiod from template->gpiod up, and + always use led_dat->gpiod later, to fix this. + + Fixes: 5c51277a9ababfa4 (leds: leds-gpio: Add support for GPIO descriptors) + Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> + Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> -commit e5f4ba1223515c46f1875597e77d5c32a37829ee -Author: Mark Salter <msalter@redhat.com> -Date: Sun Sep 14 09:44:44 2014 -0400 +commit f22bf3eef963c9fc4e58e9e96dc7e9d243042b5a +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Wed Nov 5 00:29:07 2014 +0100 - Revert "ahci_xgene: Skip the PHY and clock initialization if already configured by the firmware." + ACPI / property: Drop size_prop from acpi_dev_get_property_reference() - This reverts commit 0bed13bebd6c99d097796d2ca6c4f10fb5b2eabc. + The size_prop argument of the recently added function + acpi_dev_get_property_reference() is not used by the only current + caller of that function and is very unlikely to be used at any time + going forward. - Temporarily revert for backwards compatibility with rh-0.12-1 firmware + Namely, for a property whose value is a list of items each containing + a references to a device object possibly accompanied by some integers, + the number of items in the list can always be computed as the number + of elements of type ACPI_TYPE_LOCAL_REFERENCE in the property package. + Thus it should never be necessary to provide an additional "cells" + property with a value equal to the number of items in that list. It + also should never be necessary to provide a "cells" property specifying + how many integers are supposed to be following each reference. + + For this reason, drop the size_prop argument from + acpi_dev_get_property_reference() and update its caller accordingly. + + Link: http://marc.info/?l=linux-kernel&m=141511255610556&w=2 + Suggested-by: Grant Likely <grant.likely@linaro.org> + Acked-by: Grant Likely <grant.likely@linaro.org> + Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> -commit aeff595a5d57264e5f01add5c43f584d88be6a92 -Author: Mark Salter <msalter@redhat.com> -Date: Mon Aug 11 13:46:43 2014 -0400 +commit 1bb8c08673f0ca7951c0583665d2496e19368a56 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Fri Oct 31 13:40:58 2014 +0200 - xgene: add support for ACPI-probed serial port + leds: leds-gpio: Convert gpio_blink_set() to use GPIO descriptors + + Commit 21f2aae91e902aad ("leds: leds-gpio: Add support for GPIO + descriptors") already converted most of the driver to use GPIO descriptors. + What is still missing is the platform specific hook gpio_blink_set() and + board files which pass legacy GPIO numbers to this driver in platform data. + + In this patch we handle the former and convert gpio_blink_set() to take + GPIO descriptor instead. In order to do this we convert the existing four + users to accept GPIO descriptor and translate it to legacy GPIO number in + the platform code. This effectively "pushes" legacy GPIO number usage from + the driver to platforms. + + Also add comment to the remaining block describing that it is legacy code + path and we are getting rid of it eventually. + + Suggested-by: Linus Walleij <linus.walleij@linaro.org> + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Andrew Lunn <andrew@lunn.ch> + Reviewed-by: Linus Walleij <linus.walleij@linaro.org> + Acked-by: Alexandre Courbot <acourbot@nvidia.com> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 1b8f83503e4b9b7168c5d81cabce5b66e4063607 +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Mon Nov 3 23:39:57 2014 +0100 + + ACPI / GPIO: Document ACPI GPIO mappings API + + Document the previously introduced method that can be used by device + drivers to provide the GPIO subsystem with mappings between GPIO names + (connection IDs) and GpioIo()/GpioInt() resources in _CRS. + + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> + +commit 49b5f3126e722dd0266d22a2866bb056ede2cf0a +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Mon Oct 27 12:15:14 2014 +0200 + + net: rfkill: gpio: Add default GPIO driver mappings for ACPI + + The driver uses devm_gpiod_get_index(..., index) so that the index refers + directly to the GpioIo resource under the ACPI device. The problem with + this is that if the ordering changes we get wrong GPIOs. + + With ACPI 5.1 _DSD we can now use names instead to reference GPIOs + analogous to Device Tree. However, we still have systems out there that do + not provide _DSD at all. These systems must be supported as well. + + Luckily we now have acpi_dev_add_driver_gpios() that can be used to provide + mappings for systems where _DSD is not provided and still take advantage of + _DSD if it exists. + + This patch changes the driver to create default GPIO mappings if we are + running on ACPI system. + + While there we can drop the indices completely and use devm_gpiod_get() + with name instead. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Reviewed-by: Johannes Berg <johannes@sipsolutions.net> + Acked-by: John W. Linville <linville@tuxdriver.com> + Acked-by: Linus Walleij <linus.walleij@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit c9accb22ace8c3318e75fc0bbbca91336dab270d +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Mon Nov 3 23:39:41 2014 +0100 + + ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs + + Provide a way for device drivers using GPIOs described by ACPI + GpioIo resources in _CRS to tell the GPIO subsystem what names + (connection IDs) to associate with specific GPIO pins defined + in there. + + To do that, a driver needs to define a mapping table as a + NULL-terminated array of struct acpi_gpio_mapping objects + that each contain a name, a pointer to an array of line data + (struct acpi_gpio_params) objects and the size of that array. + + Each struct acpi_gpio_params object consists of three fields, + crs_entry_index, line_index, active_low, representing the index of + the target GpioIo()/GpioInt() resource in _CRS starting from zero, + the index of the target line in that resource starting from zero, + and the active-low flag for that line, respectively. + + Next, the mapping table needs to be passed as the second + argument to acpi_dev_add_driver_gpios() that will register it with + the ACPI device object pointed to by its first argument. That + should be done in the driver's .probe() routine. + + On removal, the driver should unregister its GPIO mapping table + by calling acpi_dev_remove_driver_gpios() on the ACPI device + object where that table was previously registered. + + Included are fixes from Mika Westerberg. + + Acked-by: Alexandre Courbot <acourbot@nvidia.com> + Reviewed-by: Linus Walleij <linus.walleij@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 872e3713eb734e43d3001a6ef957cb67ba2349a3 +Author: Aaron Lu <aaron.lu@intel.com> +Date: Tue Oct 21 13:34:00 2014 +0200 + + input: gpio_keys_polled: Make use of device property API + + Make use of device property API in this driver so that both OF based + system and ACPI based system can use this driver. + + Signed-off-by: Aaron Lu <aaron.lu@intel.com> + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit ac8ab45966dc9e98cdb44d0ca833c25772eb4745 +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Mon Oct 27 23:30:10 2014 +0100 + + leds: leds-gpio: Make use of device property API + + Make use of device property API in this driver so that both OF and ACPI + based system can use the same driver. + + This change contains material from Max Eliaser and Mika Westerberg. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Bryan Wu <cooloney@gmail.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit d48dca7d09f36535c2f6dba340e796b54aa6667d +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Tue Oct 21 13:33:59 2014 +0200 + + gpio: Support for unified device properties interface + + Some drivers need to deal with only firmware representation of its + GPIOs. An example would be a GPIO button array driver where each button + is described as a separate firmware node in device tree. Typically these + child nodes do not have physical representation in the Linux device + model. + + In order to help device drivers to handle such firmware child nodes we + add dev[m]_get_named_gpiod_from_child() that takes a child firmware + node pointer as its second argument (the first one is the parent device + itself), finds the GPIO using whatever is the underlying firmware + method, and requests the GPIO properly. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Alexandre Courbot <acourbot@nvidia.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit fcca136c38aa18deec3ddd3b872ea49e6d082e5a +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Tue Nov 4 14:03:59 2014 +0100 + + Driver core: Unified interface for firmware node properties + + Add new generic routines are provided for retrieving properties from + device description objects in the platform firmware in case there are + no struct device objects for them (either those objects have not been + created yet or they do not exist at all). + + The following functions are provided: + + fwnode_property_present() + fwnode_property_read_u8() + fwnode_property_read_u16() + fwnode_property_read_u32() + fwnode_property_read_u64() + fwnode_property_read_string() + fwnode_property_read_u8_array() + fwnode_property_read_u16_array() + fwnode_property_read_u32_array() + fwnode_property_read_u64_array() + fwnode_property_read_string_array() + + in analogy with the corresponding functions for struct device added + previously. For all of them, the first argument is a pointer to struct + fwnode_handle (new type) that allows a device description object + (depending on what platform firmware interface is in use) to be + obtained. + + Add a new macro device_for_each_child_node() for iterating over the + children of the device description object associated with a given + device and a new function device_get_child_node_count() returning the + number of a given device's child nodes. + + The interface covers both ACPI and Device Trees. + + Suggested-by: Grant Likely <grant.likely@linaro.org> + Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 4ac0bb216349cce71aea75f6156d44c59fc18086 +Author: Aaron Lu <aaron.lu@intel.com> +Date: Tue Oct 21 23:30:25 2014 +0200 + + input: gpio_keys_polled: Add support for GPIO descriptors + + GPIO descriptors are the preferred way over legacy GPIO numbers + nowadays. Convert the driver to use GPIO descriptors internally but + still allow passing legacy GPIO numbers from platform data to support + existing platforms. + + Signed-off-by: Aaron Lu <aaron.lu@intel.com> + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Alexandre Courbot <acourbot@nvidia.com> + Reviewed-by: Linus Walleij <linus.walleij@linaro.org> + Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 17907d91fb1bd542b9503cc5223a070039b8d031 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Mon Oct 27 23:29:32 2014 +0100 + + leds: leds-gpio: Add support for GPIO descriptors + + GPIO descriptors are the preferred way over legacy GPIO numbers + nowadays. Convert the driver to use GPIO descriptors internally but + still allow passing legacy GPIO numbers from platform data to support + existing platforms. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Alexandre Courbot <acourbot@nvidia.com> + Acked-by: Bryan Wu <cooloney@gmail.com> + Acked-by: Arnd Bergmann <arnd@arndb.de> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 2781ab92fd33f2270c7b5e1628db0a180ed3ab03 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Tue Oct 21 13:33:56 2014 +0200 + + gpio: sch: Consolidate core and resume banks + + This is actually a single device with two sets of identical registers, + which just happen to start from a different offset. Instead of having + separate GPIO chips created we consolidate them to be single GPIO chip. + + In addition having a single GPIO chip allows us to handle ACPI GPIO + translation in the core in a more generic way, since the two GPIO chips + share the same parent ACPI device. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Linus Walleij <linus.walleij@linaro.org> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 732feab25f90c338e9ef36457a3591f322f53264 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Wed Oct 29 15:41:01 2014 +0100 + + gpio / ACPI: Add support for _DSD device properties + + With release of ACPI 5.1 and _DSD method we can finally name GPIOs (and + other things as well) returned by _CRS. Previously we were only able to + use integer index to find the corresponding GPIO, which is pretty error + prone if the order changes. + + With _DSD we can now query GPIOs using name instead of an integer index, + like the below example shows: + + // Bluetooth device with reset and shutdown GPIOs + Device (BTH) + { + Name (_HID, ...) + + Name (_CRS, ResourceTemplate () + { + GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, + "\\_SB.GPO0", 0, ResourceConsumer) {15} + GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, + "\\_SB.GPO0", 0, ResourceConsumer) {27, 31} + }) + + Name (_DSD, Package () + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () {"reset-gpio", Package() {^BTH, 1, 1, 0 }}, + Package () {"shutdown-gpio", Package() {^BTH, 0, 0, 0 }}, + } + }) + } + + The format of the supported GPIO property is: + + Package () { "name", Package () { ref, index, pin, active_low }} + + ref - The device that has _CRS containing GpioIo()/GpioInt() resources, + typically this is the device itself (BTH in our case). + index - Index of the GpioIo()/GpioInt() resource in _CRS starting from zero. + pin - Pin in the GpioIo()/GpioInt() resource. Typically this is zero. + active_low - If 1 the GPIO is marked as active_low. + + Since ACPI GpioIo() resource does not have field saying whether it is + active low or high, the "active_low" argument can be used here. Setting + it to 1 marks the GPIO as active low. + + In our Bluetooth example the "reset-gpio" refers to the second GpioIo() + resource, second pin in that resource with the GPIO number of 31. + + This patch implements necessary support to gpiolib for extracting GPIOs + using _DSD device properties. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Linus Walleij <linus.walleij@linaro.org> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 6b23a29f06a006a48d7fb94eef42452552144fb9 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Tue Oct 21 13:33:56 2014 +0200 + + misc: at25: Make use of device property API + + Make use of device property API in this driver so that both DT and ACPI + based systems can use this driver. + + In addition we hard-code the name of the chip to be "at25" for the + reason that there is no common mechanism to fetch name of the firmware + node. The only existing user (arch/arm/boot/dts/phy3250.dts) uses the + same name so it should continue to work. + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit c901445ec7d1f37d9fd2250dd4390f395b954ef3 +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Tue Oct 21 13:33:56 2014 +0200 + + ACPI: Allow drivers to match using Device Tree compatible property + + We have lots of existing Device Tree enabled drivers and allocating + separate _HID for each is not feasible. Instead we allocate special _HID + "PRP0001" that means that the match should be done using Device Tree + compatible property using driver's .of_match_table instead if the driver + is missing .acpi_match_table. + + If there is a need to distinguish from where the device is enumerated + (DT/ACPI) driver can check dev->of_node or ACPI_COMPATION(dev). + + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit 7eace032b0201dfb110586080dd0628ec48c0d5c +Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +Date: Tue Nov 4 01:28:56 2014 +0100 + + Driver core: Unified device properties interface for platform firmware + + Add a uniform interface by which device drivers can request device + properties from the platform firmware by providing a property name + and the corresponding data type. The purpose of it is to help to + write portable code that won't depend on any particular platform + firmware interface. + + The following general helper functions are added: + + device_property_present() + device_property_read_u8() + device_property_read_u16() + device_property_read_u32() + device_property_read_u64() + device_property_read_string() + device_property_read_u8_array() + device_property_read_u16_array() + device_property_read_u32_array() + device_property_read_u64_array() + device_property_read_string_array() + + The first one allows the caller to check if the given property is + present. The next 5 of them allow single-valued properties of + various types to be retrieved in a uniform way. The remaining 5 are + for reading properties with multiple values (arrays of either numbers + or strings). + + The interface covers both ACPI and Device Trees. + + This change set includes material from Mika Westerberg and Aaron Lu. + + Signed-off-by: Aaron Lu <aaron.lu@intel.com> + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + +commit c2d6966e876bb42c76d03d3eb207bfa754657d8b +Author: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Tue Oct 21 13:33:55 2014 +0200 + + ACPI: Add support for device specific properties + + Device Tree is used in many embedded systems to describe the system + configuration to the OS. It supports attaching properties or name-value + pairs to the devices it describe. With these properties one can pass + additional information to the drivers that would not be available + otherwise. + + ACPI is another configuration mechanism (among other things) typically + seen, but not limited to, x86 machines. ACPI allows passing arbitrary + data from methods but there has not been mechanism equivalent to Device + Tree until the introduction of _DSD in the recent publication of the + ACPI 5.1 specification. + + In order to facilitate ACPI usage in systems where Device Tree is + typically used, it would be beneficial to standardize a way to retrieve + Device Tree style properties from ACPI devices, which is what we do in + this patch. + + If a given device described in ACPI namespace wants to export properties it + must implement _DSD method (Device Specific Data, introduced with ACPI 5.1) + that returns the properties in a package of packages. For example: + + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"name1", <VALUE1>}, + Package () {"name2", <VALUE2>}, + ... + } + }) + + The UUID reserved for properties is daffd814-6eba-4d8c-8a91-bc9bbf4aa301 + and is documented in the ACPI 5.1 companion document called "_DSD + Implementation Guide" [1], [2]. + + We add several helper functions that can be used to extract these + properties and convert them to different Linux data types. + + The ultimate goal is that we only have one device property API that + retrieves the requested properties from Device Tree or from ACPI + transparent to the caller. + + [1] http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel.htm + [2] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf + + Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> + Reviewed-by: Josh Triplett <josh@joshtriplett.org> + Reviewed-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Darren Hart <dvhart@linux.intel.com> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> + Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> + Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> -commit 02429d239f5ae917d870a7611a9d838b7822df1a +commit 3f675aef809d3f82bf1aa0700065ddf798d1eb86 Author: Mark Salter <msalter@redhat.com> -Date: Sat Aug 9 12:01:20 2014 -0400 +Date: Tue Sep 30 17:19:24 2014 -0400 - sata/xgene: support acpi probing + [NOT FOR UPSTREAM] arm64: avoid need for console= to enable serial console + + Tell kernel to prefer one of the serial ports on platforms + pl011, 8250, or sbsa uarts. console= on command line will + override these assumed preferences. This is just a hack to + get the behavior we want from SPCR table support. Once SPCR + is supported, we can drop this. Signed-off-by: Mark Salter <msalter@redhat.com> -commit 774385f250ebb7448ca3eeb344a064ac989c4988 -Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Thu Aug 28 14:26:16 2014 -0400 +commit 20d7a3414d18cea0ed8982a5c538e7548bc3bb0a +Author: Tom Lendacky <thomas.lendacky@amd.com> +Date: Tue Sep 9 23:33:17 2014 -0400 - ARM64 / ACPI: Introduce some PCI functions when PCI is enabled + drivers: net: AMD Seattle XGBE PHY support for A0 silicon - Introduce some PCI functions to make ACPI can be compiled when - CONFIG_PCI is enabled, these functions should be revisited when - implemented on ARM64. + This patch modifies the upstream AMD XGBE PHY driver to support + A0 Seattle silicon in currently shipping systems. The upstream + Linux driver is targetted for Seattle B0 silicon. - Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> - [fixed up for 3.17-rc] Signed-off-by: Mark Salter <msalter@redhat.com> -commit 6f711c98b37f1b0a42c4a523d0380d47ed2f95b9 -Author: Al Stone <ahs3@redhat.com> -Date: Thu Aug 28 13:14:16 2014 -0400 +commit 286f94e27659e7eb45e4b54b4e3c0f9a3b9f9fd4 +Author: Tom Lendacky <thomas.lendacky@amd.com> +Date: Tue Sep 9 23:34:07 2014 -0400 - Fix arm64 compilation error in PNP code + drivers: net: AMD Seattle XGBE 10GbE support for A0 silicon + + This patch modifies the upstream AMD 10GbE XGBE Ethernet driver to + support A0 Seattle silicon in currently shipping systems. The + upstream Linux driver is targetted for Seattle B0 silicon. Signed-off-by: Mark Salter <msalter@redhat.com> -commit f874873b7cb10f827bb7f8e08fa282878f740e77 -Author: Bob Moore <robert.moore@intel.com> -Date: Tue Sep 2 08:27:40 2014 +0800 +commit 7e7eade04b5fe90bb30a68aa52f0881b354e7d1d +Author: Graeme Gregory <graeme.gregory@linaro.org> +Date: Fri Jul 26 17:55:02 2013 +0100 - ACPICA: Update version to 20140828. + virtio-mmio: add ACPI probing - Version 20140828. + Added the match table and pointers for ACPI probing to the driver. - Signed-off-by: Bob Moore <robert.moore@intel.com> - Signed-off-by: Lv Zheng <lv.zheng@intel.com> + Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> -commit 26f9b7b90576cf808a50edf1ec86ceece9349c9f -Author: Bob Moore <robert.moore@intel.com> -Date: Tue Sep 2 08:27:27 2014 +0800 +commit a1b37e75322dfbd359c86e51ee624511811c93b6 +Author: Graeme Gregory <graeme.gregory@linaro.org> +Date: Wed Jul 24 11:29:48 2013 +0100 - ACPICA: Disassembler: Fix for gpio_int interrupt polarity flags. + net: smc91x: add ACPI probing support. - The field is actually 2 bits, not 1. + Add device ID LINA0003 for this device and add the match table. - Signed-off-by: Bob Moore <robert.moore@intel.com> - Signed-off-by: Lv Zheng <lv.zheng@intel.com> + As its a platform device it needs no other code and will be probed in by + acpi_platform once device ID is added. + + Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> -commit 6e1eddc48f6f9b948be4126dd38841f6f70da080 -Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Tue Sep 2 08:27:19 2014 +0800 +commit 29fe31c2a0e6ce57695c1341351c2579d159e446 +Author: Mark Salter <msalter@redhat.com> +Date: Thu Sep 18 15:05:23 2014 -0400 - ACPICA: Headers: Add GTDT flag definitions for the timer subtable. + arm64: add sev to parking protocol - Mostly by Hanjun Guo <hanjun.guo@linaro.org> + Parking protocol wakes secondary cores with an interrupt. + This patch adds an additional sev() to send an event. This + is a temporary hack for APM Mustang board and not intended + for upstream. - Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> - Signed-off-by: Bob Moore <robert.moore@intel.com> - Signed-off-by: Lv Zheng <lv.zheng@intel.com> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit 1091460efb5542ba87f40ef20daff44215587f26 -Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Tue Sep 2 08:27:12 2014 +0800 +commit 0875f7e4b6b078859a3765aac54c345980b2748c +Author: Mark Salter <msalter@redhat.com> +Date: Sun Sep 14 09:44:44 2014 -0400 - ACPICA: ACPI 5.1/Disassembler: Add GICC affinity subtable to SRAT table. - - Update template for SRAT. - Add clock_domain to standard CPU affinity subtable. + Revert "ahci_xgene: Skip the PHY and clock initialization if already configured by the firmware." - Mostly by Hanjun Guo <hanjun.guo@linaro.org> + This reverts commit 0bed13bebd6c99d097796d2ca6c4f10fb5b2eabc. - Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> - Signed-off-by: Bob Moore <robert.moore@intel.com> - Signed-off-by: Lv Zheng <lv.zheng@intel.com> + Temporarily revert for backwards compatibility with rh-0.12-1 firmware -commit 02ba5e067dbb83b0f481db821d05851e9623c401 -Author: Bob Moore <robert.moore@intel.com> -Date: Tue Sep 2 08:27:05 2014 +0800 +commit 31bf2a5577ffb5b318bb9f5d80a9f26224674521 +Author: Mark Salter <msalter@redhat.com> +Date: Mon Aug 11 13:46:43 2014 -0400 - ACPICA: Add _PSx names to the METHOD_NAME list. - - Will be used by iASL. + xgene: add support for ACPI-probed serial port + +commit f099d9ceac69d7fda70e5d3ee8200f8585f4ff88 +Author: Mark Salter <msalter@redhat.com> +Date: Sat Aug 9 12:01:20 2014 -0400 + + sata/xgene: support acpi probing - Signed-off-by: Bob Moore <robert.moore@intel.com> - Signed-off-by: Lv Zheng <lv.zheng@intel.com> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit f2ecef6608a1f74b236df4f93da9b7b5aba4d3fd +commit 7020f9dda064514d58da5701a351d4773a1d274f Author: Mark Salter <msalter@redhat.com> Date: Tue Sep 9 22:59:48 2014 -0400 @@ -328,7 +849,29 @@ Date: Tue Sep 9 22:59:48 2014 -0400 Signed-off-by: Mark Salter <msalter@redhat.com> -commit 63e220c94f072f10bfae2e1ed375af9dbc017571 +commit 17b60c76da131d5fb9c401ec43404c911fe57f39 +Author: Hanjun Guo <hanjun.guo@linaro.org> +Date: Thu Aug 28 14:26:16 2014 -0400 + + ARM64 / ACPI: Introduce some PCI functions when PCI is enabled + + Introduce some PCI functions to make ACPI can be compiled when + CONFIG_PCI is enabled, these functions should be revisited when + implemented on ARM64. + + Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> + [fixed up for 3.17-rc] + Signed-off-by: Mark Salter <msalter@redhat.com> + +commit fc47393ae2927cb1069c2e15a7b142998702b05d +Author: Al Stone <ahs3@redhat.com> +Date: Thu Aug 28 13:14:16 2014 -0400 + + Fix arm64 compilation error in PNP code + + Signed-off-by: Mark Salter <msalter@redhat.com> + +commit 7100a707311becfd1cbfc26ad8298cc290877db5 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Tue Sep 9 15:37:15 2014 -0500 @@ -354,7 +897,7 @@ Date: Tue Sep 9 15:37:15 2014 -0500 Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> -commit d9d7224bd65fb3c1490f06d635b7aceb035acb1e +commit 397bc93ab853400f7146b8be14bd6cc044df9830 Author: Graeme Gregory <graeme.gregory@linaro.org> Date: Wed Aug 13 13:47:18 2014 +0100 @@ -369,37 +912,7 @@ Date: Wed Aug 13 13:47:18 2014 +0100 Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> -commit 4c67296fce53fed671a78b698d4552636f499b7f -Author: Mark Salter <msalter@redhat.com> -Date: Thu Aug 14 13:17:37 2014 -0400 - - arm64: set dma coherency ops for ACPI probed devices - - Search for a _CCA object and set the correct dma ops based - on device coherency attribute and architecture default. - - Signed-off-by: Mark Salter <msalter@redhat.com> - -commit 959c571815c440150b2f290bf3d13b2fbadbee70 -Author: Mark Salter <msalter@redhat.com> -Date: Thu Aug 14 12:32:13 2014 -0400 - - acpi: add utility to test for device dma coherency - - ACPI 5.1 adds a _CCA object to indicate memory coherency - of a bus master device. It is an integer with zero meaning - non-coherent and one meaning coherent. This attribute may - be inherited from a parent device. It may also be missing - entirely, in which case, an architecture-specific default - is assumed. - - This patch adds a utility function to parse a device handle - (and its parents) for a _CCA object and return the coherency - attribute if found. - - Signed-off-by: Mark Salter <msalter@redhat.com> - -commit 0dbac48379d3aace2fd7468d83044116f176b4c9 +commit 1e6ba230a5e0c03916b0134d846204e64c477972 Author: Mark Salter <msalter@redhat.com> Date: Mon Sep 8 11:58:46 2014 -0400 @@ -413,7 +926,7 @@ Date: Mon Sep 8 11:58:46 2014 -0400 Signed-off-by: Mark Salter <msalter@redhat.com> -commit c9eab819c2107e0c95cf57233de4de5404851ab6 +commit b3ae15f9e484bab186a5ed697bb25f0244b5aa50 Author: Graeme Gregory <graeme.gregory@linaro.org> Date: Mon Sep 8 10:36:44 2014 -0400 @@ -425,7 +938,7 @@ Date: Mon Sep 8 10:36:44 2014 -0400 Signed-off-by: Al Stone <al.stone@linaro.org> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> -commit 7e772a485f980b826a58ecd9c39fbe82085c55fa +commit 4b29bf89ba430787509cb06a6aa38fafeb910b56 Author: Mark Salter <msalter@redhat.com> Date: Mon Sep 8 17:04:28 2014 -0400 @@ -437,9 +950,9 @@ Date: Mon Sep 8 17:04:28 2014 -0400 Signed-off-by: Mark Salter <msalter@redhat.com> -commit b42e8f7901e58b86a1cb3ffdf14cb2455fd91ede +commit 58bb9299b1b2a87bd8002ee1bd6eb90138cc4f30 Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Fri Sep 12 22:00:16 2014 +0800 +Date: Fri Oct 17 21:37:14 2014 +0800 Documentation: ACPI for ARM64 @@ -447,11 +960,12 @@ Date: Fri Sep 12 22:00:16 2014 +0800 on ARM64. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> + Signed-off-by: Al Stone <al.stone@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 57dc75b87d5663181e1c19802297e72e51a324ba +commit 47e5e8a11d7d0f4930c2e98671a973f3edac313f Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Fri Sep 12 22:00:15 2014 +0800 +Date: Fri Oct 17 21:37:13 2014 +0800 ARM64 / ACPI: Enable ARM64 in Kconfig @@ -465,9 +979,9 @@ Date: Fri Sep 12 22:00:15 2014 +0800 Signed-off-by: Al Stone <al.stone@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 106c5cb3caff13c91cb6056f88a1c0e710b8e0eb +commit 3738397b4a8e91102db2af9ad29919a19425b3f0 Author: Al Stone <al.stone@linaro.org> -Date: Fri Sep 12 22:00:14 2014 +0800 +Date: Fri Oct 17 21:37:12 2014 +0800 ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64 @@ -479,9 +993,9 @@ Date: Fri Sep 12 22:00:14 2014 +0800 Signed-off-by: Al Stone <al.stone@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 73f4aca21985ace8989b6fc8af503940c469f1d7 +commit 77476629347ec5b72b13e0f3d2cf71604286298c Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:13 2014 +0800 +Date: Fri Oct 17 21:37:11 2014 +0800 ARM64 / ACPI: Parse GTDT to initialize arch timer @@ -491,9 +1005,9 @@ Date: Fri Sep 12 22:00:13 2014 +0800 Originally-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 5efba15fb24c25139dd621a417f2b9cbe2e675f5 +commit 1386d5f6353e7a13d34df5302bc7e4bd1c6aae28 Author: Tomasz Nowicki <tomasz.nowicki@linaro.org> -Date: Fri Sep 12 22:00:12 2014 +0800 +Date: Fri Oct 17 21:37:10 2014 +0800 ARM64 / ACPI: Add GICv2 specific ACPI boot support @@ -509,9 +1023,9 @@ Date: Fri Sep 12 22:00:12 2014 +0800 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit e060d9d74cecff59ea96d6124ffb1c9c044a4f9d +commit 5213320ccc37374bbf6facc7f7e3c9246bc933c3 Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:11 2014 +0800 +Date: Fri Oct 17 21:37:09 2014 +0800 ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi @@ -525,9 +1039,9 @@ Date: Fri Sep 12 22:00:11 2014 +0800 Originally-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit c25e8f66c630713107967076933b5f349655ea6a +commit d1c5a9cdd33f04d4ca5f8ef1b8aed16552fc4f2d Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:10 2014 +0800 +Date: Fri Oct 17 21:37:08 2014 +0800 ACPI / processor: Make it possible to get CPU hardware ID via GICC @@ -539,9 +1053,9 @@ Date: Fri Sep 12 22:00:10 2014 +0800 Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 5ce1c3ff91aa9d8012324518789363bb4ded33d4 +commit 9db9a0235e80b8a80af1a000fac4127333b2a2e6 Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:09 2014 +0800 +Date: Fri Oct 17 21:37:07 2014 +0800 ARM64 / ACPI: Parse MADT for SMP initialization @@ -558,21 +1072,29 @@ Date: Fri Sep 12 22:00:09 2014 +0800 Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> -commit 8634cf0fcc8294c355d7cecb55da017ba9ff3ff7 +commit 1a5a392de06147924052458a6c2fd182dcd4d509 Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:08 2014 +0800 +Date: Fri Oct 17 21:37:06 2014 +0800 ACPI / table: Print GIC information when MADT is parsed When MADT is parsed, print GIC information to make the boot - log look pretty. + log look pretty: + + ACPI: GICC (acpi_id[0x0000] address[00000000e112f000] MPDIR[0x0] enabled) + ACPI: GICC (acpi_id[0x0001] address[00000000e112f000] MPDIR[0x1] enabled) + ... + ACPI: GICC (acpi_id[0x0201] address[00000000e112f000] MPDIR[0x201] enabled) + + These information will be very helpful to bring up early systems to + see if acpi_id and MPIDR are matched or not as spec defined. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> -commit 05facef9c824235c82d8d9c2ae03fe7a729ceef8 +commit dbb10ccb37b11731a79bc004da46e482a7152be4 Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:07 2014 +0800 +Date: Fri Oct 17 21:37:05 2014 +0800 ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init @@ -599,9 +1121,9 @@ Date: Fri Sep 12 22:00:07 2014 +0800 Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> -commit a13a8c748b6170a8a3f4876163ff74e460bd889f +commit f367d6c84f50ad7e1944ef6ec7aca8b01fd82051 Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 22:00:06 2014 +0800 +Date: Fri Oct 17 21:37:04 2014 +0800 ARM64 / ACPI: Make PCI optional for ACPI on ARM64 @@ -614,38 +1136,40 @@ Date: Fri Sep 12 22:00:06 2014 +0800 Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit a6bf98355490142fc3f6e9c0839af128e326f16d +commit 2926fd3502c857db06ab41caa8f628089287d6f4 Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Fri Sep 12 22:00:05 2014 +0800 +Date: Fri Oct 17 21:37:03 2014 +0800 ARM64 / ACPI: If we chose to boot from acpi then disable FDT If the early boot methods of acpi are happy that we have valid ACPI - tables and acpi=off has not been passed. Then do not unflat - devicetree effectively disabling further hardware probing from DT. + tables and acpi=force has been passed, then do not unflat devicetree + effectively disabling further hardware probing from DT. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit e3b9886532d1e13ddb68e4955ad776a8623f9766 +commit d40d81475b41044935ee4eb455a58308e0f070ac Author: Al Stone <al.stone@linaro.org> -Date: Fri Sep 12 22:00:04 2014 +0800 +Date: Fri Oct 17 21:37:02 2014 +0800 - ARM64 / ACPI: Introduce early_param for "acpi" + ARM64 / ACPI: Introduce early_param for "acpi" and pass acpi=force to enable ACPI - Introduce one early parameters "off" for "acpi" to disable ACPI on - ARM64. + Introduce one early parameters "off" and "force" for "acpi", acpi=off + will be the default behavior for ARM64, so introduce acpi=force to + enable ACPI on ARM64. - This ensures the kernel uses the DT on a platform that provides both - ACPI tables and DT. + Disable ACPI before early parameters parsed, and enable it to pass + "acpi=force" if people want use ACPI on ARM64. This ensures DT be + the prefer one if ACPI table and DT both are provided at this moment. Signed-off-by: Al Stone <al.stone@linaro.org> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit cf1cbe39385d417286a98e3abd7ea3456be2e88c +commit 19ddd869d20be9d05e37a3e867f3c1c379bc0a07 Author: Graeme Gregory <graeme.gregory@linaro.org> -Date: Fri Sep 12 22:00:03 2014 +0800 +Date: Fri Oct 17 21:37:01 2014 +0800 ARM64 / ACPI: Introduce sleep-arm.c @@ -658,9 +1182,9 @@ Date: Fri Sep 12 22:00:03 2014 +0800 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 90e5cfbaf183d0eb92f1977c24da20c4e0a2f6be +commit b2247b541995418caafcfc9f12e57b444fdee75d Author: Al Stone <al.stone@linaro.org> -Date: Fri Sep 12 22:00:02 2014 +0800 +Date: Fri Oct 17 21:37:00 2014 +0800 ARM64 / ACPI: Get RSDP and ACPI boot-time tables @@ -690,9 +1214,9 @@ Date: Fri Sep 12 22:00:02 2014 +0800 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 2fe5d24887dea3f1bffabf04e364fa9f355ed553 +commit ff7fee61b5c51bc24b358a6521ee9ac0c81c4ae6 Author: Tomasz Nowicki <tomasz.nowicki@linaro.org> -Date: Fri Sep 12 22:00:01 2014 +0800 +Date: Fri Oct 17 21:36:59 2014 +0800 ACPI / table: Count matched and successfully parsed entries without specifying max entries @@ -705,12 +1229,13 @@ Date: Fri Sep 12 22:00:01 2014 +0800 NOTE: This change has no impact to x86 and ia64 archs since existing code checks for error occurrence only (acpi_parse_entries(...,0) < 0). + Acked-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 8c278c76231f0ba0110e755678eefdd6d077f5da +commit 77a4d1f4423591c4f0bed7d580afb7fc7cacb082 Author: Ashwin Chaugule <ashwin.chaugule@linaro.org> -Date: Fri Sep 12 22:00:00 2014 +0800 +Date: Fri Oct 17 21:36:58 2014 +0800 ACPI / table: Add new function to get table entries @@ -721,638 +1246,773 @@ Date: Fri Sep 12 22:00:00 2014 +0800 each call. e.g. as in acpi_table_parse_madt() which is normally called after acpi_table_parse(). + Acked-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> -commit 651ab5ff6804fa0f516715b4d47399e587944de0 -Author: Hanjun Guo <hanjun.guo@linaro.org> -Date: Fri Sep 12 21:59:59 2014 +0800 +commit 17a565aba814f8cb39d27afb0dbf3834be83ac41 +Author: Mark Salter <msalter@redhat.com> +Date: Sat Nov 8 22:25:48 2014 -0500 - ARM64: Move the init of cpu_logical_map(0) before unflatten_device_tree() + arm64: use UEFI for reboot - It always make sense to initialize CPU0's logical map entry from the - hardware values, so move the initialization of cpu_logical_map(0) - before unflatten_device_tree() which is needed by ACPI code later. + Wire in support for UEFI reboot. We want UEFI reboot to have + highest priority for capsule support. - Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit b91246f1a7120de6de8fe630ed01e9a0d0415e88 -Author: Tanmay Inamdar <tinamdar@apm.com> -Date: Fri Sep 26 14:08:27 2014 -0700 +commit c66bae4dfb9dbf577e4692fd034cb80703f687a6 +Author: Mark Salter <msalter@redhat.com> +Date: Sat Nov 8 15:25:41 2014 -0500 - MAINTAINERS: entry for APM X-Gene PCIe host driver + arm64: use UEFI as last resort for poweroff - Add entry for AppliedMicro X-Gene PCIe host driver. + Wire in support for poweroff via UEFI. - Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit d20b104083718058b599a5ca1a925d8c5243e2e1 -Author: Tanmay Inamdar <tinamdar@apm.com> -Date: Fri Sep 26 14:08:26 2014 -0700 +commit ddc5d1b9a52d9c17fd975fd6ee22be7d6ce5e496 +Author: Mark Salter <msalter@redhat.com> +Date: Thu Jul 17 13:34:50 2014 -0400 - dt-bindings: pci: xgene pcie device tree bindings + ahci_xgene: add errata workaround for ATA_CMD_SMART - This patch adds the bindings for X-Gene PCIe driver. The driver resides - under 'drivers/pci/host/pci-xgene.c' file. + commit 2a0bdff6b958d1b2: - Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> - -commit 9c429c919b77a3a63ac2843e9e0e2e50e59d28f3 -Author: Tanmay Inamdar <tinamdar@apm.com> -Date: Fri Sep 26 14:08:25 2014 -0700 - - arm64: dts: APM X-Gene PCIe device tree nodes + ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. - This patch adds the device tree nodes for APM X-Gene PCIe host controller and - PCIe clock interface. Since X-Gene SOC supports maximum 5 ports, 5 dts - nodes are added. + added a workaround for X-Gene AHCI controller errata. This was done + for all ATA_CMD_ID_ATA commands. The errata also appears to affect + ATA_CMD_SMART commands as well. This was discovered when running + smartd or just smartctl -x. This patch adds a dma engine restart for + ATA_CMD_SMART commands which clears up the issues seen with smartd. - Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> + Signed-off-by: Mark Salter <msalter@redhat.com> -commit 3aa4f71932b67e648aff4ae0dc5ace7162d74c1c -Author: Tanmay Inamdar <tinamdar@apm.com> -Date: Fri Sep 26 14:08:24 2014 -0700 +commit 8675c7685ea64e0fda9cebbed08e3f30a71589cf +Author: Kyle McMartin <kmcmarti@redhat.com> +Date: Tue May 13 22:25:26 2014 -0400 - pci:host: APM X-Gene PCIe host controller driver + arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects + + Message-id: <20140513222526.GC26038@redacted.bos.redhat.com> + Patchwork-id: 79789 + O-Subject: [ACADIA PATCH] arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects + Bugzilla: 1085528 - This patch adds the AppliedMicro X-Gene SOC PCIe host controller driver. - X-Gene PCIe controller supports maximum up to 8 lanes and GEN3 speed. - X-Gene SOC supports maximum 5 PCIe ports. + BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1085528 + Upstream: submitted soon - Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com> - Tested-by: Ming Lei <ming.lei@canonical.com> - Tested-by: Dann Frazier <dann.frazier@canonical.com> - Signed-off-by: Tanmay Inamdar <tinamdar@apm.com> + [Sadly this isn't (yet) sufficient... but it fixes at least one issue + here... cat /proc/$$/personality shows READ_IMPLIES_EXEC before. I'll + try to figure the rest out tomorrow.] + + Currently, we're accidentally ending up with executable stacks on + AArch64 when the ABI says we shouldn't be, and relying on glibc to fix + things up for us when we're loaded. However, SELinux will deny us + mucking with the stack, and hit us with execmem AVCs. + + The reason this is happening is somewhat complex: + + fs/binfmt_elf.c:load_elf_binary() + - initializes executable_stack = EXSTACK_DEFAULT implying the + architecture should make up its mind. + - does a pile of loading goo + - runs through the program headers, looking for PT_GNU_STACK + and setting (or unsetting) executable_stack if it finds it. + + This is our first problem, we won't generate these unless an + executable stack is explicitly requested. + + - more ELF loading goo + - sets whether we're a compat task or not (TIF_32BIT) based on compat.h + - for compat reasons (pre-GNU_STACK) checks if the READ_IMPLIES_EXEC + flag should be set for ancient toolchains + + Here's our second problem, we test if read_implies_exec based on + stk != EXSTACK_DISABLE_X, which is true since stk == EXSTACK_DEFAULT. + + So we set current->personality |= READ_IMPLIES_EXEC like a broken + legacy toolchain would want. + + - Now we call setup_arg_pages to set up the stack... + + fs/exec.c:setup_arg_pages() + - lots of magic happens here + - vm_flags gets initialized to VM_STACK_FLAGS + + Here's our third problem, VM_STACK_FLAGS on arm64 is + VM_DEFAULT_DATA_FLAG which tests READ_IMPLIES_EXEC and sets VM_EXEC + if it's true. So we end up with an executable stack mapping, since we + don't have executable_stack set (it's still EXSTACK_DEFAULT at this + point) to unset it anywhere. + + Bang. execstack AVC when the program starts running. + + The easiest way I can see to fix this is to test if we're a legacy task + and fix it up there. But that's not as simple as it sounds, because + the 32-bit ABI depends on what revision of the CPU we've enabled (not + that it matters since we're ARMv8...) Regardless, in the compat case, + set READ_IMPLIES_EXEC if we've found a GNU_STACK header which explicitly + requested it as in arch/arm/kernel/elf.c:arm_elf_read_implies_exec(). + + Signed-off-by: Kyle McMartin <kmcmarti@redhat.com> + Signed-off-by: Donald Dutile <ddutile@redhat.com> -commit f3c00bd4ae49b19923049f0f4f9d6a95eaa61b1e -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:14 2014 +0100 +commit ff46d52dc804aeff783ff55b4b6dc489da20bc11 +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Fri Nov 7 14:12:34 2014 +0000 - arm64: Add architectural support for PCI + arm64: kvm: eliminate literal pool entries - Use the generic PCI domain and OF functions to provide support for PCI - on arm64. + Replace two instances of 'ldr xN, =(constant)' in the world switch + hot path with 'mov' instructions. - [bhelgaas: Change comments to use generic PCI, not just PCIe. Nothing at - this level is PCIe-specific.] - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Acked-by: Catalin Marinas <catalin.marinas@arm.com> + Acked-by: Marc Zyngier <marc.zyngier@arm.com> + Acked-by: Christoffer Dall <christoffer.dall@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 497220defa08534526ad7b20a9c7eb2d0d903ca4 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:13 2014 +0100 +commit 6ddb6f9d2fe1ecab0b812b3adc4ba4bc0cf19ad8 +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Fri Nov 7 14:12:33 2014 +0000 - PCI: Add pci_remap_iospace() to map bus I/O resources - - Add pci_remap_iospace() to map bus I/O resources into the CPU virtual - address space. Architectures with special needs may provide their own - version, but most should be able to use this one. + arm64: ftrace: eliminate literal pool entries - This function is useful for PCI host bridge drivers that need to map the - PCI I/O resources into virtual memory space. + Replace ldr xN, =<symbol> with adrp/add or adrp/ldr [as appropriate] + in the implementation of _mcount(), which may be called very often. - [bhelgaas: phys_addr description, drop temporary "err" variable] - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Reviewed-by: Rob Herring <robh@kernel.org> - Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> - CC: Arnd Bergmann <arnd@arndb.de> - -commit 7a46ace11cf09b3713dcdc2ef4a17130a738f856 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:12 2014 +0100 - - PCI: Assign unassigned bus resources in pci_scan_root_bus() - - If the firmware has not assigned all the bus resources and we are not just - probing the PCI buses, it makes sense to assign the unassigned resources - in pci_scan_root_bus(). - - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - CC: Arnd Bergmann <arnd@arndb.de> - CC: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - CC: Rob Herring <robh+dt@kernel.org> - -commit fe33bc876010c3ef700c863099f2c3c1a5e2c18b -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Wed Sep 24 11:27:33 2014 -0600 - - of/pci: Add support for parsing PCI host bridge resources from DT - - Provide a function to parse the PCI DT ranges that can be used to create a - pci_host_bridge structure together with its associated bus. - - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - [make io_base parameter optional] - Signed-off-by: Robert Richter <rrichter@cavium.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - CC: Arnd Bergmann <arnd@arndb.de> - CC: Grant Likely <grant.likely@linaro.org> - CC: Rob Herring <robh+dt@kernel.org> - CC: Catalin Marinas <catalin.marinas@arm.com> - -commit 71094afda69ac873bb3d6486307e3048e21e912c -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:10 2014 +0100 - - of/pci: Add of_pci_get_domain_nr() and of_get_pci_domain_nr() - - Add pci_get_new_domain_nr() to allocate a new domain number and - of_get_pci_domain_nr() to retrieve the PCI domain number of a given device - from DT. Host bridge drivers or architecture-specific code can choose to - implement their PCI domain number policy using these two functions. - - Using of_get_pci_domain_nr() guarantees a stable PCI domain number on every - boot provided that all host bridge controllers are assigned a number in the - device tree using "linux,pci-domain" property. Mixing use of - pci_get_new_domain_nr() and of_get_pci_domain_nr() is not recommended as it - can lead to potentially conflicting domain numbers being assigned to root - buses behind different host bridges. - - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - CC: Arnd Bergmann <arnd@arndb.de> - CC: Grant Likely <grant.likely@linaro.org> - CC: Rob Herring <robh+dt@kernel.org> - CC: Catalin Marinas <catalin.marinas@arm.com> - -commit 6b385455f18d15da6b5d60a3b67fdb846ae1a3b1 -Author: Catalin Marinas <catalin.marinas@arm.com> -Date: Tue Sep 23 20:01:09 2014 +0100 - - PCI: Add generic domain handling - - The handling of PCI domains (or PCI segments in ACPI speak) is usually a - straightforward affair but its implementation is currently left to the - architectural code, with pci_domain_nr(b) querying the value of the domain - associated with bus b. - - This patch introduces CONFIG_PCI_DOMAINS_GENERIC as an option that can be - selected if an architecture wants a simple implementation where the value - of the domain associated with a bus is stored in struct pci_bus. - - The architectures that select CONFIG_PCI_DOMAINS_GENERIC will then have to - implement pci_bus_assign_domain_nr() as a way of setting the domain number - associated with a root bus. All child buses except the root bus will - inherit the domain_nr value from their parent. - - Signed-off-by: Catalin Marinas <Catalin.Marinas@arm.com> - [Renamed pci_set_domain_nr() to pci_bus_assign_domain_nr()] - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - CC: Arnd Bergmann <arnd@arndb.de> - -commit 04b36e0e1da5a96a58dec4f1b393090f00e5b635 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:08 2014 +0100 - - PCI: Create pci_host_bridge before root bus - - Before 7b5436635800 ("PCI: add generic device into pci_host_bridge - struct"), the pci_host_bridge was created before the root bus. Revert the - order of creation as we are going to depend on the pci_host_bridge - structure to retrieve the domain number of the root bus. - - [bhelgaas: changelog] - Tested-by: Tanmay Inamdar <tinamdar@apm.com> - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> - Acked-by: Grant Likely <grant.likely@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 7569c510218798bd7e5216bf14a42c656f14e891 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:07 2014 +0100 +commit 35939bd2c847d742ab82049b2cc79c086e0e7130 +Author: Mark Rutland <mark.rutland@arm.com> +Date: Tue Nov 4 10:50:16 2014 +0000 - of/pci: Fix the conversion of IO ranges into IO resources + arm64: log physical ID of boot CPU - The ranges property for a host bridge controller in DT describes the - mapping between the PCI bus address and the CPU physical address. The - resources framework however expects that the IO resources start at a pseudo - "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT. The - conversion from PCI ranges to resources failed to take that into account, - returning a CPU physical address instead of a port number. + In certain debugging scenarios it's useful to know the physical ID (i.e. + the MPIDR_EL1.Aff* fields) of the boot CPU, but we don't currently log + this as we do for 32-bit ARM kernels. - Also fix all the drivers that depend on the old behaviour by fetching the - CPU physical address based on the port number where it is being needed. + This patch makes the kernel log the physical ID of the boot CPU early in + the boot process. The CPU logical map initialisation is folded in to + smp_setup_processor_id (which contrary to its name is also called by UP + kernels). This is called before setup_arch, so should not adversely + affect existing cpu_logical_map users. - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Acked-by: Linus Walleij <linus.walleij@linaro.org> - CC: Grant Likely <grant.likely@linaro.org> - CC: Rob Herring <robh+dt@kernel.org> - CC: Arnd Bergmann <arnd@arndb.de> - CC: Thierry Reding <thierry.reding@gmail.com> - CC: Simon Horman <horms@verge.net.au> - CC: Catalin Marinas <catalin.marinas@arm.com> + Acked-by: Sudeep Holla <sudeep.holla@arm.com> + Acked-by: Catalin Marinas <catalin.marinas@arm.com> + Acked-by: Lorenzo Pieralisis <lorenzo.pieralisi@arm.com> + Signed-off-by: Mark Rutland <mark.rutland@arm.com> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 1b381671c9dd2c82cd6f04bc1588d0fc4e1aea59 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:06 2014 +0100 +commit aea6f516118cedb6f9e8d2ab23ab5a09c275e68d +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Mon Nov 3 16:50:01 2014 +0000 - of/pci: Move of_pci_range_to_resources() to of/address.c + arm64/crypto: use crypto instructions to generate AES key schedule - We need to enhance of_pci_range_to_resources() enough that it won't make - sense for it to be inline anymore. Move it to drivers/of/address.c, - keeping it under #ifdef CONFIG_PCI. + This patch implements the AES key schedule generation using ARMv8 + Crypto Instructions. It replaces the table based C implementation + in aes_generic.ko, which means we can drop the dependency on that + module. - [bhelgaas: drop extra detail from changelog, move def under CONFIG_PCI] - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - CC: Grant Likely <grant.likely@linaro.org> - CC: Rob Herring <robh+dt@kernel.org> - CC: Arnd Bergmann <arnd@arndb.de> - CC: Catalin Marinas <catalin.marinas@arm.com> + Tested-by: Steve Capper <steve.capper@linaro.org> + Acked-by: Steve Capper <steve.capper@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit eedd8f88d4895d5c6bc46cf3ddeb114a0fafb7c3 -Author: Bjorn Helgaas <bhelgaas@google.com> -Date: Tue Sep 23 17:27:42 2014 -0600 +commit 0844cddfa0ad22093ef94fdf203fe50cb92222db +Author: Geoff Levand <geoff@infradead.org> +Date: Fri Oct 31 23:06:47 2014 +0000 - of/pci: Define of_pci_range_to_resource() only when CONFIG_PCI=y + arm64/kvm: Fix assembler compatibility of macros + + Some of the macros defined in kvm_arm.h are useful in assembly files, but are + not compatible with the assembler. Change any C language integer constant + definitions using appended U, UL, or ULL to the UL() preprocessor macro. Also, + add a preprocessor include of the asm/memory.h file which defines the UL() + macro. - of_pci_range_to_resource() was previously defined always, but it's only - used by PCI code, so move the definition inside the CONFIG_OF_ADDRESS && - CONFIG_PCI block. + Fixes build errors like these when using kvm_arm.h in assembly + source files: - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> + Error: unexpected characters following instruction at operand 3 -- `and x0,x1,#((1U<<25)-1)' + + Acked-by: Mark Rutland <mark.rutland@arm.com> + Signed-off-by: Geoff Levand <geoff@infradead.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 4ac73f8ded507537318717bb2b5b6c765db633cd -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:05 2014 +0100 +commit 94141ed36a5e0a2159deadfcc29a504b55bb352d +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Tue Oct 28 12:24:20 2014 +0000 - ARM: Define PCI_IOBASE as the base of virtual PCI IO space + arm64/dt: add machine name to kernel call stack dump output - This is needed for calls into OF code that parses PCI ranges. It signals - support for memory mapped PCI I/O accesses that are described by device - trees. + This installs the machine name as recorded by setup_machine_fdt() + as dump stack arch description. This results in the string to be + included in call stack dumps, as is shown here: - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> - Acked-by: Arnd Bergmann <arnd@arndb.de> - CC: Russell King <linux@arm.linux.org.uk> - CC: Rob Herring <robh+dt@kernel.org> + ... + Bad mode in Synchronous Abort handler detected, code 0x84000005 + CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.0-rc2+ #548 + > Hardware name: linux,dummy-virt (DT) + task: ffffffc07c870000 ti: ffffffc07c878000 task.ti: ffffffc07c878000 + PC is at 0x0 + ... + + Note that systems that support DMI/SMBIOS may override this later. + + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit ce7af33b6db857c95ac3b65fef37e589e839cc79 -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:04 2014 +0100 +commit a3b3b6027369ce53251bb381c9b87031bbd75464 +Author: Steve Capper <steve.capper@linaro.org> +Date: Fri Oct 24 13:22:20 2014 +0100 - of/pci: Add pci_register_io_range() and pci_pio_to_address() + arm64: xchg: Implement cmpxchg_double - Some architectures do not have a simple view of the PCI I/O space and - instead use a range of CPU addresses that map to bus addresses. For some - architectures these ranges will be expressed by OF bindings in a device - tree file. + The arm64 architecture has the ability to exclusively load and store + a pair of registers from an address (ldxp/stxp). Also the SLUB can take + advantage of a cmpxchg_double implementation to avoid taking some + locks. - This patch introduces a pci_register_io_range() helper function with a - generic implementation that can be used by such architectures to keep track - of the I/O ranges described by the PCI bindings. If the PCI_IOBASE macro - is not defined, that signals lack of support for PCI and we return an - error. + This patch provides an implementation of cmpxchg_double for 64-bit + pairs, and activates the logic required for the SLUB to use these + functions (HAVE_ALIGNED_STRUCT_PAGE and HAVE_CMPXCHG_DOUBLE). - In order to retrieve the CPU address associated with an I/O port, a new - helper function pci_pio_to_address() is introduced. This will search in - the list of ranges registered with pci_register_io_range() and return the - CPU address that corresponds to the given port. + Also definitions of this_cpu_cmpxchg_8 and this_cpu_cmpxchg_double_8 + are wired up to cmpxchg_local and cmpxchg_double_local (rather than the + stock implementations that perform non-atomic operations with + interrupts disabled) as they are used by the SLUB. - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> - Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> - Acked-by: Rob Herring <robh@kernel.org> - CC: Grant Likely <grant.likely@linaro.org> - CC: Arnd Bergmann <arnd@arndb.de> + On a Juno platform running on only the A57s I get quite a noticeable + performance improvement with 5 runs of hackbench on v3.17: + + Baseline | With Patch + -----------------+----------- + Mean 119.2312 | 106.1782 + StdDev 0.4919 | 0.4494 + + (times taken to complete `./hackbench 100 process 1000', in seconds) + + Signed-off-by: Steve Capper <steve.capper@linaro.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit c5d57f95901af49149ebf6dfc3d7518157e41bfa -Author: Liviu Dudau <Liviu.Dudau@arm.com> -Date: Tue Sep 23 20:01:03 2014 +0100 +commit e21d5b44cf03b31feac7854a5953d17ef94d76d9 +Author: Joonwoo Park <joonwoop@codeaurora.org> +Date: Tue Oct 21 01:59:03 2014 +0100 - asm-generic/io.h: Fix ioport_map() for !CONFIG_GENERIC_IOMAP + arm64: optimize memcpy_{from,to}io() and memset_io() - The !CONFIG_GENERIC_IOMAP version of ioport_map() is wrong. It returns a - mapped, i.e., virtual, address that can start from zero and completely - ignores the PCI_IOBASE and IO_SPACE_LIMIT that most architectures that use - !CONFIG_GENERIC_MAP define. + Optimize memcpy_{from,to}io() and memset_io() by transferring in 64 bit + as much as possible with minimized barrier usage. This simplest + optimization brings faster throughput compare to current byte-by-byte read + and write with barrier in the loop. Code's skeleton is taken from the + powerpc. - Tested-by: Tanmay Inamdar <tinamdar@apm.com> - Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> - Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> + Link: http://lkml.kernel.org/p/20141020133304.GH23751@e104818-lin.cambridge.arm.com Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> - Acked-by: Arnd Bergmann <arnd@arndb.de> + Reviewed-by: Trilok Soni <tsoni@codeaurora.org> + Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit a65e51156bec2c8d690b924bbddf1a740309e543 -Author: Mark Salter <msalter@redhat.com> -Date: Tue Jun 24 09:50:28 2014 -0400 +commit c8f2e7e08d50c4adb77a0fac4a2871c100ef2f51 +Author: Min-Hua Chen <orca.chen@gmail.com> +Date: Thu Oct 9 16:53:10 2014 +0100 - arm64: use EFI as last resort for reboot and poweroff + arm64: fix data type for physical address - Wire in support for EFI reboot and poweroff functions. We use these - only if no other mechanism has been registered with arm_pm_reboot - and/or pm_power_off respectively. + Use phys_addr_t for physical address in alloc_init_pud. Although + phys_addr_t and unsigned long are 64 bit in arm64, it is better + to use phys_addr_t to describe physical addresses. - Signed-off-by: Mark Salter <msalter@redhat.com> + Signed-off-by: Min-Hua Chen <orca.chen@gmail.com> + Signed-off-by: Will Deacon <will.deacon@arm.com> -commit c6b81122978c39e52021cc7308edafff88c8b87a -Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> -Date: Wed Jul 30 11:59:04 2014 +0100 +commit 674f32f5ef38c93af7a273a725a0a89b4b8a38a1 +Author: Mark Rutland <mark.rutland@arm.com> +Date: Thu Oct 23 16:33:33 2014 +0100 - arm64/efi: efistub: don't abort if base of DRAM is occupied + efi: efi-stub: notify on DTB absence - If we cannot relocate the kernel Image to its preferred offset of base of DRAM - plus TEXT_OFFSET, instead relocate it to the lowest available 2 MB boundary plus - TEXT_OFFSET. We may lose a bit of memory at the low end, but we can still - proceed normally otherwise. + In the absence of a DTB configuration table, the EFI stub will happily + continue attempting to boot a kernel, despite the fact that this kernel + may not function without a description of the hardware. In this case, as + with a typo'd "dtb=" option (e.g. "dbt=") or many other possible + failures, the only output seen by the user will be the rather terse + output from the EFI stub: - Acked-by: Mark Salter <msalter@redhat.com> - Acked-by: Mark Rutland <mark.rutland@arm.com> + EFI stub: Booting Linux Kernel... + + To aid those attempting to debug such failures, this patch adds a notice + when no DTB is found, making the output more helpful: + + EFI stub: Booting Linux Kernel... + EFI stub: Generating empty DTB + + Additionally, a positive acknowledgement is added when a user-specified + DTB is in use: + + EFI stub: Booting Linux Kernel... + EFI stub: Using DTB from command line + + Similarly, a positive acknowledgement is added when a DTB from a + configuration table is in use: + + EFI stub: Booting Linux Kernel... + EFI stub: Using DTB from configuration table + + Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Leif Lindholm <leif.lindholm@linaro.org> - Tested-by: Leif Lindholm <leif.lindholm@linaro.org> + Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Acked-by: Roy Franz <roy.franz@linaro.org> + Acked-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> - Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 81fd1d315f3c5b13f9dcf71cce51dfd3a10331c3 +commit 872cf856a3fc4cff5190af2f79cfc3ac410eae17 Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> -Date: Wed Jul 30 11:59:03 2014 +0100 +Date: Wed Oct 15 09:36:50 2014 +0200 - arm64/efi: efistub: cover entire static mem footprint in PE/COFF .text + arm64: dmi: set DMI string as dump stack arch description - The static memory footprint of a kernel Image at boot is larger than the - Image file itself. Things like .bss data and initial page tables are allocated - statically but populated dynamically so their content is not contained in the - Image file. + This sets the DMI string, containing system type, serial number, + firmware version etc. as dump stack arch description, so that oopses + and other kernel stack dumps automatically have this information + included, if available. - However, if EFI (or GRUB) has loaded the Image at precisely the desired offset - of base of DRAM + TEXT_OFFSET, the Image will be booted in place, and we have - to make sure that the allocation done by the PE/COFF loader is large enough. + Tested-by: Leif Lindholm <leif.lindholm@linaro.org> + Acked-by: Leif Lindholm <leif.lindholm@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + +commit 2a2978d3748379bb9a0889c866b210f288c45160 +Author: Yi Li <yi.li@linaro.org> +Date: Sat Oct 4 23:46:43 2014 +0800 + + arm64: dmi: Add SMBIOS/DMI support - Fix this by growing the PE/COFF .text section to cover the entire static - memory footprint. The part of the section that is not covered by the payload - will be zero initialised by the PE/COFF loader. + SMBIOS is important for server hardware vendors. It implements a spec for + providing descriptive information about the platform. Things like serial + numbers, physical layout of the ports, build configuration data, and the like. - Acked-by: Mark Salter <msalter@redhat.com> - Acked-by: Mark Rutland <mark.rutland@arm.com> - Acked-by: Leif Lindholm <leif.lindholm@linaro.org> + Signed-off-by: Yi Li <yi.li@linaro.org> + Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> - Signed-off-by: Will Deacon <will.deacon@arm.com> -commit 8f5f73c2117c2dc4e8903d162023c34177327ae3 -Author: Mark Rutland <mark.rutland@arm.com> -Date: Wed Jul 30 11:59:02 2014 +0100 +commit c0f06f02f228ca722a2b850363c342f63e6214a6 +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Tue Oct 14 16:41:27 2014 +0200 - arm64: spin-table: handle unmapped cpu-release-addrs + dmi: add support for SMBIOS 3.0 64-bit entry point + + The DMTF SMBIOS reference spec v3.0.0 defines a new 64-bit entry point, + which enables support for SMBIOS structure tables residing at a physical + offset over 4 GB. This is especially important for upcoming arm64 + platforms whose system RAM resides entirely above the 4 GB boundary. + + For the UEFI case, this code attempts to detect the new SMBIOS 3.0 + header magic at the offset passed in the SMBIOS3_TABLE_GUID UEFI + configuration table. If this configuration table is not provided, or + if we fail to parse the header, we fall back to using the legacy + SMBIOS_TABLE_GUID configuration table. This is in line with the spec, + that allows both configuration tables to be provided, but mandates that + they must point to the same structure table, unless the version pointed + to by the 64-bit entry point is a superset of the 32-bit one. - In certain cases the cpu-release-addr of a CPU may not fall in the - linear mapping (e.g. when the kernel is loaded above this address due to - the presence of other images in memory). This is problematic for the - spin-table code as it assumes that it can trivially convert a - cpu-release-addr to a valid VA in the linear map. + For the non-UEFI case, the detection logic is modified to look for the + SMBIOS 3.0 header magic before it looks for the legacy header magic. - This patch modifies the spin-table code to use a temporary cached - mapping to write to a given cpu-release-addr, enabling us to support - addresses regardless of whether they are covered by the linear mapping. + Note that this patch is based on version 3.0.0d [draft] of the + specification, which is expected not to deviate from the final version + in ways that would affect the correctness of this implementation. + Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Acked-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> - Tested-by: Mark Salter <msalter@redhat.com> - Signed-off-by: Mark Rutland <mark.rutland@arm.com> - [ardb: added (__force void *) cast] + Cc: Andrew Morton <akpm@linux-foundation.org> + Cc: Tony Luck <tony.luck@intel.com> + Acked-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> - Signed-off-by: Will Deacon <will.deacon@arm.com> -commit b00c56bff1ffb6c77655479fb350ee3d5c8bcf63 -Author: Mark Salter <msalter@redhat.com> -Date: Tue Jun 24 23:16:45 2014 -0400 +commit 4ebf40f890ebad9458abc56e00d4814bc881fb9d +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Tue Oct 14 16:34:47 2014 +0200 - perf: fix arm64 build error - - I'm seeing the following build error on arm64: + efi: dmi: add support for SMBIOS 3.0 UEFI configuration table - In file included from util/event.c:3:0: - util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) - u64 cache_regs[PERF_REGS_MAX]; - ^ + This adds support to the UEFI side for detecting the presence of + a SMBIOS 3.0 64-bit entry point. This allows the actual SMBIOS + structure table to reside at a physical offset over 4 GB, which + cannot be supported by the legacy SMBIOS 32-bit entry point. - This patch adds a PEFF_REGS_MAX definition for arm64. + Since the firmware can legally provide both entry points, store + the SMBIOS 3.0 entry point in a separate variable, and let the + DMI decoding layer decide which one will be used. - Signed-off-by: Mark Salter <msalter@redhat.com> + Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> + Acked-by: Leif Lindholm <leif.lindholm@linaro.org> + Acked-by: Matt Fleming <matt.fleming@intel.com> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> -commit f440dcb067bf1367719e8a41b96a2a83c1232690 -Author: Mark Salter <msalter@redhat.com> -Date: Thu Jul 17 13:34:50 2014 -0400 +commit 90c66a6923311d477c68543f945f543558b91eec +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Fri Oct 17 12:44:11 2014 +0200 - ahci_xgene: add errata workaround for ATA_CMD_SMART + arm64/efi: drop redundant set_bit(EFI_CONFIG_TABLES) - commit 2a0bdff6b958d1b2: + The EFI_CONFIG_TABLES bit already gets set by efi_config_init(), + so there is no reason to set it again after this function returns + successfully. - ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. - - added a workaround for X-Gene AHCI controller errata. This was done - for all ATA_CMD_ID_ATA commands. The errata also appears to affect - ATA_CMD_SMART commands as well. This was discovered when running - smartd or just smartctl -x. This patch adds a dma engine restart for - ATA_CMD_SMART commands which clears up the issues seen with smartd. - - Signed-off-by: Mark Salter <msalter@redhat.com> + Acked-by: Will Deacon <will.deacon@arm.com> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> -commit 93b44dc9e1d73d4864a9350888509792f25e4210 -Author: Kyle McMartin <kmcmarti@redhat.com> -Date: Tue May 13 22:25:26 2014 -0400 +commit bbc705f61c1aebddb5bf80f75964b6da40c55ca9 +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Mon Oct 20 15:31:57 2014 +0200 - arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects - - Message-id: <20140513222526.GC26038@redacted.bos.redhat.com> - Patchwork-id: 79789 - O-Subject: [ACADIA PATCH] arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects - Bugzilla: 1085528 + arm64/efi: invert UEFI memory region reservation logic - BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1085528 - Upstream: submitted soon + Instead of reserving the memory regions based on which types we know + need to be reserved, consider only regions of the following types as + free for general use by the OS: - [Sadly this isn't (yet) sufficient... but it fixes at least one issue - here... cat /proc/$$/personality shows READ_IMPLIES_EXEC before. I'll - try to figure the rest out tomorrow.] + EFI_LOADER_CODE + EFI_LOADER_DATA + EFI_BOOT_SERVICES_CODE + EFI_BOOT_SERVICES_DATA + EFI_CONVENTIONAL_MEMORY - Currently, we're accidentally ending up with executable stacks on - AArch64 when the ABI says we shouldn't be, and relying on glibc to fix - things up for us when we're loaded. However, SELinux will deny us - mucking with the stack, and hit us with execmem AVCs. + Note that this also fixes a problem with the original code, which would + misidentify a EFI_RUNTIME_SERVICES_DATA region as not reserved if it + does not have the EFI_MEMORY_RUNTIME attribute set. However, it is + perfectly legal for the firmware not to request a virtual mapping for + EFI_RUNTIME_SERVICES_DATA regions that contain configuration tables, in + which case the EFI_MEMORY_RUNTIME attribute would not be set. - The reason this is happening is somewhat complex: + Acked-by: Roy Franz <roy.franz@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + +commit d6e4e04244cb7b4670759bd83679ead21df55a8a +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Fri Oct 10 18:42:55 2014 +0200 + + arm64/efi: set PE/COFF file alignment to 512 bytes - fs/binfmt_elf.c:load_elf_binary() - - initializes executable_stack = EXSTACK_DEFAULT implying the - architecture should make up its mind. - - does a pile of loading goo - - runs through the program headers, looking for PT_GNU_STACK - and setting (or unsetting) executable_stack if it finds it. + Change our PE/COFF header to use the minimum file alignment of + 512 bytes (0x200), as mandated by the PE/COFF spec v8.3 - This is our first problem, we won't generate these unless an - executable stack is explicitly requested. + Also update the linker script so that the Image file itself is also a + round multiple of FileAlignment. - - more ELF loading goo - - sets whether we're a compat task or not (TIF_32BIT) based on compat.h - - for compat reasons (pre-GNU_STACK) checks if the READ_IMPLIES_EXEC - flag should be set for ancient toolchains + Acked-by: Catalin Marinas <catalin.marinas@arm.com> + Acked-by: Roy Franz <roy.franz@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + +commit e9e7422d7035c64a16771d47dcd9f907adc5070d +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Fri Oct 10 11:25:24 2014 +0200 + + arm64/efi: set PE/COFF section alignment to 4 KB - Here's our second problem, we test if read_implies_exec based on - stk != EXSTACK_DISABLE_X, which is true since stk == EXSTACK_DEFAULT. + Position independent AArch64 code needs to be linked and loaded at the + same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr + pairs will not work correctly. (This is how PC relative symbol + references with a 4 GB reach are emitted) - So we set current->personality |= READ_IMPLIES_EXEC like a broken - legacy toolchain would want. + We need to declare this in the PE/COFF header, otherwise the PE/COFF + loader may load the Image and invoke the stub at an offset which + violates this rule. - - Now we call setup_arg_pages to set up the stack... + Reviewed-by: Roy Franz <roy.franz@linaro.org> + Acked-by: Mark Rutland <mark.rutland@arm.com> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + +commit 2d2346a11e6ac9be30ac5590a7ec4b47bda35870 +Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> +Date: Wed Oct 8 16:11:27 2014 +0200 + + arm64/efi: efistub: jump to 'stext' directly, not through the header - fs/exec.c:setup_arg_pages() - - lots of magic happens here - - vm_flags gets initialized to VM_STACK_FLAGS + After the EFI stub has done its business, it jumps into the kernel by + branching to offset #0 of the loaded Image, which is where it expects + to find the header containing a 'branch to stext' instruction. - Here's our third problem, VM_STACK_FLAGS on arm64 is - VM_DEFAULT_DATA_FLAG which tests READ_IMPLIES_EXEC and sets VM_EXEC - if it's true. So we end up with an executable stack mapping, since we - don't have executable_stack set (it's still EXSTACK_DEFAULT at this - point) to unset it anywhere. + However, the UEFI spec 2.1.1 states the following regarding PE/COFF + image loading: + "A UEFI image is loaded into memory through the LoadImage() Boot + Service. This service loads an image with a PE32+ format into memory. + This PE32+ loader is required to load all sections of the PE32+ image + into memory." - Bang. execstack AVC when the program starts running. + In other words, it is /not/ required to load parts of the image that are + not covered by a PE/COFF section, so it may not have loaded the header + at the expected offset, as it is not covered by any PE/COFF section. - The easiest way I can see to fix this is to test if we're a legacy task - and fix it up there. But that's not as simple as it sounds, because - the 32-bit ABI depends on what revision of the CPU we've enabled (not - that it matters since we're ARMv8...) Regardless, in the compat case, - set READ_IMPLIES_EXEC if we've found a GNU_STACK header which explicitly - requested it as in arch/arm/kernel/elf.c:arm_elf_read_implies_exec(). + So instead, jump to 'stext' directly, which is at the base of the + PE/COFF .text section, by supplying a symbol 'stext_offset' to + efi-entry.o which contains the relative offset of stext into the Image. + Also replace other open coded calculations of the same value with a + reference to 'stext_offset' - Signed-off-by: Kyle McMartin <kmcmarti@redhat.com> - Signed-off-by: Donald Dutile <ddutile@redhat.com> - - Documentation/arm64/arm-acpi.txt | 218 +++++++ - .../devicetree/bindings/pci/xgene-pci.txt | 57 ++ - Documentation/kernel-parameters.txt | 3 +- - MAINTAINERS | 8 + - arch/arm/include/asm/io.h | 1 + - arch/arm/include/asm/kvm_mmu.h | 13 + - arch/arm/kvm/arm.c | 23 +- - arch/arm/mach-integrator/pci_v3.c | 23 +- - arch/arm64/Kconfig | 28 +- - arch/arm64/Makefile | 1 + - arch/arm64/boot/dts/apm-mustang.dts | 8 + - arch/arm64/boot/dts/apm-storm.dtsi | 165 ++++++ - arch/arm64/include/asm/Kbuild | 1 + - arch/arm64/include/asm/acenv.h | 18 + - arch/arm64/include/asm/acpi.h | 99 ++++ - arch/arm64/include/asm/cpu_ops.h | 1 + - arch/arm64/include/asm/elf.h | 3 +- - arch/arm64/include/asm/io.h | 3 +- - arch/arm64/include/asm/kvm_arm.h | 17 +- - arch/arm64/include/asm/kvm_mmu.h | 75 +++ - arch/arm64/include/asm/pci.h | 37 ++ - arch/arm64/include/asm/pgtable.h | 2 + - arch/arm64/include/asm/psci.h | 3 +- - arch/arm64/include/asm/smp.h | 10 +- - arch/arm64/kernel/Makefile | 5 +- - arch/arm64/kernel/acpi.c | 397 +++++++++++++ - arch/arm64/kernel/cpu_ops.c | 8 +- - arch/arm64/kernel/efi-stub.c | 16 +- - arch/arm64/kernel/efi.c | 11 + - arch/arm64/kernel/head.S | 6 +- - arch/arm64/kernel/pci.c | 70 +++ - arch/arm64/kernel/process.c | 6 + - arch/arm64/kernel/psci.c | 78 ++- - arch/arm64/kernel/setup.c | 64 +- - arch/arm64/kernel/smp.c | 2 +- - arch/arm64/kernel/smp_parking_protocol.c | 110 ++++ - arch/arm64/kernel/smp_spin_table.c | 22 +- - arch/arm64/kernel/time.c | 7 + - arch/arm64/kvm/hyp-init.S | 20 +- - arch/arm64/mm/dma-mapping.c | 65 ++ - arch/arm64/pci/Makefile | 1 + - arch/arm64/pci/pci.c | 28 + - drivers/acpi/Kconfig | 6 +- - drivers/acpi/Makefile | 6 +- - drivers/acpi/acpica/utresrc.c | 4 +- - drivers/acpi/bus.c | 3 + - drivers/acpi/internal.h | 5 + - drivers/acpi/osl.c | 6 +- - drivers/acpi/processor_core.c | 37 ++ - drivers/acpi/sleep-arm.c | 28 + - drivers/acpi/tables.c | 115 +++- - drivers/acpi/utils.c | 26 + - drivers/ata/Kconfig | 2 +- - drivers/ata/ahci_platform.c | 13 + - drivers/ata/ahci_xgene.c | 30 +- - drivers/clocksource/arm_arch_timer.c | 120 +++- - drivers/irqchip/irq-gic-v3.c | 10 + - drivers/irqchip/irq-gic.c | 116 ++++ - drivers/irqchip/irqchip.c | 3 + - drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 12 + - drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 + - drivers/net/ethernet/amd/xgbe/xgbe-main.c | 1 + - drivers/net/ethernet/amd/xgbe/xgbe.h | 3 + - drivers/net/ethernet/smsc/smc91x.c | 10 + - drivers/net/phy/amd-xgbe-phy.c | 408 +++++++------ - drivers/of/address.c | 154 +++++ - drivers/of/of_pci.c | 142 +++++ - drivers/pci/host/Kconfig | 10 + - drivers/pci/host/Makefile | 1 + - drivers/pci/host/pci-tegra.c | 10 +- - drivers/pci/host/pci-xgene.c | 659 +++++++++++++++++++++ - drivers/pci/host/pcie-rcar.c | 21 +- - drivers/pci/pci.c | 40 ++ - drivers/pci/probe.c | 46 +- - drivers/pnp/resource.c | 2 + - drivers/tty/Kconfig | 6 + - drivers/tty/Makefile | 1 + - drivers/tty/sbsauart.c | 355 +++++++++++ - drivers/tty/serial/8250/8250_dw.c | 9 + - drivers/virtio/virtio_mmio.c | 12 +- - include/acpi/acnames.h | 4 + - include/acpi/acpi_bus.h | 2 + - include/acpi/acpi_io.h | 6 + - include/acpi/acpixf.h | 2 +- - include/acpi/actbl1.h | 19 +- - include/acpi/actbl3.h | 9 +- - include/asm-generic/io.h | 2 +- - include/asm-generic/pgtable.h | 4 + - include/kvm/arm_vgic.h | 20 +- - include/linux/acpi.h | 5 + - include/linux/clocksource.h | 6 + - include/linux/irqchip/arm-gic-acpi.h | 31 + - include/linux/irqchip/arm-gic.h | 2 + - include/linux/of_address.h | 17 +- - include/linux/of_pci.h | 13 + - include/linux/pci.h | 64 +- - tools/perf/arch/arm64/include/perf_regs.h | 2 + - virt/kvm/arm/arch_timer.c | 108 ++-- - virt/kvm/arm/vgic-v2.c | 75 ++- - virt/kvm/arm/vgic-v3.c | 8 +- - virt/kvm/arm/vgic.c | 32 +- - 101 files changed, 4112 insertions(+), 487 deletions(-) + Acked-by: Mark Rutland <mark.rutland@arm.com> + Acked-by: Roy Franz <roy.franz@linaro.org> + Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> + Documentation/acpi/gpio-properties.txt | 96 +++ + Documentation/arm64/arm-acpi.txt | 323 ++++++++++ + Documentation/gpio/consumer.txt | 18 + + Documentation/kernel-parameters.txt | 3 +- + arch/arm/mach-s3c24xx/h1940-bluetooth.c | 4 +- + arch/arm/mach-s3c24xx/h1940.h | 4 +- + arch/arm/mach-s3c24xx/mach-h1940.c | 3 +- + arch/arm/mach-s3c24xx/mach-rx1950.c | 3 +- + arch/arm/plat-orion/gpio.c | 3 +- + arch/arm/plat-orion/include/plat/orion-gpio.h | 5 +- + arch/arm64/Kconfig | 22 + + arch/arm64/Makefile | 1 + + arch/arm64/crypto/Kconfig | 5 +- + arch/arm64/crypto/aes-ce-ccm-glue.c | 4 +- + arch/arm64/crypto/aes-ce-cipher.c | 112 +++- + arch/arm64/crypto/aes-ce-setkey.h | 5 + + arch/arm64/crypto/aes-glue.c | 18 +- + arch/arm64/include/asm/acenv.h | 18 + + arch/arm64/include/asm/acpi.h | 102 +++ + arch/arm64/include/asm/cmpxchg.h | 71 +++ + arch/arm64/include/asm/cpu_ops.h | 1 + + arch/arm64/include/asm/dmi.h | 31 + + arch/arm64/include/asm/elf.h | 3 +- + arch/arm64/include/asm/kvm_arm.h | 21 +- + arch/arm64/include/asm/pci.h | 51 ++ + arch/arm64/include/asm/psci.h | 3 +- + arch/arm64/include/asm/smp.h | 10 +- + arch/arm64/kernel/Makefile | 4 +- + arch/arm64/kernel/acpi.c | 398 ++++++++++++ + arch/arm64/kernel/cpu_ops.c | 8 +- + arch/arm64/kernel/efi-entry.S | 3 +- + arch/arm64/kernel/efi.c | 74 ++- + arch/arm64/kernel/entry-ftrace.S | 21 +- + arch/arm64/kernel/head.S | 24 +- + arch/arm64/kernel/io.c | 66 +- + arch/arm64/kernel/pci.c | 97 ++- + arch/arm64/kernel/psci.c | 78 ++- + arch/arm64/kernel/setup.c | 67 +- + arch/arm64/kernel/smp.c | 2 +- + arch/arm64/kernel/smp_parking_protocol.c | 110 ++++ + arch/arm64/kernel/time.c | 7 + + arch/arm64/kernel/vmlinux.lds.S | 17 + + arch/arm64/kvm/hyp.S | 4 +- + arch/arm64/mm/dma-mapping.c | 103 +++ + arch/arm64/pci/Makefile | 2 + + arch/arm64/pci/mmconfig.c | 292 +++++++++ + arch/arm64/pci/pci.c | 461 ++++++++++++++ + drivers/acpi/Kconfig | 6 +- + drivers/acpi/Makefile | 7 +- + drivers/acpi/bus.c | 3 + + drivers/acpi/internal.h | 11 + + drivers/acpi/osl.c | 6 +- + drivers/acpi/processor_core.c | 37 ++ + drivers/acpi/property.c | 551 ++++++++++++++++ + drivers/acpi/scan.c | 129 +++- + drivers/acpi/sleep-arm.c | 28 + + drivers/acpi/tables.c | 115 +++- + drivers/acpi/utils.c | 26 + + drivers/ata/Kconfig | 2 +- + drivers/ata/ahci_platform.c | 13 + + drivers/ata/ahci_xgene.c | 30 +- + drivers/base/Makefile | 2 +- + drivers/base/property.c | 431 +++++++++++++ + drivers/clocksource/arm_arch_timer.c | 120 +++- + drivers/firmware/dmi_scan.c | 79 ++- + drivers/firmware/efi/efi.c | 4 + + drivers/firmware/efi/libstub/arm-stub.c | 11 +- + drivers/gpio/devres.c | 32 + + drivers/gpio/gpio-sch.c | 293 ++++----- + drivers/gpio/gpiolib-acpi.c | 117 +++- + drivers/gpio/gpiolib.c | 85 ++- + drivers/gpio/gpiolib.h | 7 +- + drivers/input/keyboard/gpio_keys_polled.c | 112 ++-- + drivers/iommu/arm-smmu.c | 8 +- + drivers/irqchip/irq-gic-v3.c | 10 + + drivers/irqchip/irq-gic.c | 116 ++++ + drivers/irqchip/irqchip.c | 3 + + drivers/leds/leds-gpio.c | 140 ++-- + drivers/misc/eeprom/at25.c | 34 +- + drivers/net/ethernet/amd/Kconfig | 2 +- + drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 16 +- + drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 + + drivers/net/ethernet/amd/xgbe/xgbe-main.c | 289 +++++++-- + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 20 +- + drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | 4 +- + drivers/net/ethernet/amd/xgbe/xgbe.h | 13 + + drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 78 ++- + drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 68 +- + drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 1 + + drivers/net/ethernet/smsc/smc91x.c | 10 + + drivers/net/phy/Kconfig | 2 +- + drivers/net/phy/amd-xgbe-phy.c | 777 ++++++++++++----------- + drivers/of/base.c | 33 + + drivers/pci/host/pci-xgene.c | 174 ++++- + drivers/pnp/resource.c | 2 + + drivers/tty/Kconfig | 6 + + drivers/tty/Makefile | 1 + + drivers/tty/sbsauart.c | 355 +++++++++++ + drivers/tty/serial/8250/8250_dw.c | 9 + + drivers/virtio/virtio_mmio.c | 12 +- + drivers/xen/efi.c | 1 + + include/acpi/acpi_bus.h | 30 + + include/acpi/acpi_io.h | 6 + + include/asm-generic/vmlinux.lds.h | 7 + + include/kvm/arm_vgic.h | 20 +- + include/linux/acpi.h | 141 +++- + include/linux/clocksource.h | 6 + + include/linux/efi.h | 6 +- + include/linux/gpio/consumer.h | 7 + + include/linux/gpio_keys.h | 3 + + include/linux/irqchip/arm-gic-acpi.h | 31 + + include/linux/irqchip/arm-gic.h | 2 + + include/linux/leds.h | 3 +- + include/linux/of.h | 34 + + include/linux/pci.h | 37 +- + include/linux/property.h | 143 +++++ + net/rfkill/rfkill-gpio.c | 18 +- + virt/kvm/arm/arch_timer.c | 108 ++-- + virt/kvm/arm/vgic-v2.c | 75 ++- + virt/kvm/arm/vgic-v3.c | 8 +- + virt/kvm/arm/vgic.c | 32 +- + 121 files changed, 6824 insertions(+), 1115 deletions(-) + +diff --git a/Documentation/acpi/gpio-properties.txt b/Documentation/acpi/gpio-properties.txt +new file mode 100644 +index 0000000..ae36fcf +--- /dev/null ++++ b/Documentation/acpi/gpio-properties.txt +@@ -0,0 +1,96 @@ ++_DSD Device Properties Related to GPIO ++-------------------------------------- ++ ++With the release of ACPI 5.1 and the _DSD configuration objecte names ++can finally be given to GPIOs (and other things as well) returned by ++_CRS. Previously, we were only able to use an integer index to find ++the corresponding GPIO, which is pretty error prone (it depends on ++the _CRS output ordering, for example). ++ ++With _DSD we can now query GPIOs using a name instead of an integer ++index, like the ASL example below shows: ++ ++ // Bluetooth device with reset and shutdown GPIOs ++ Device (BTH) ++ { ++ Name (_HID, ...) ++ ++ Name (_CRS, ResourceTemplate () ++ { ++ GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, ++ "\\_SB.GPO0", 0, ResourceConsumer) {15} ++ GpioIo (Exclusive, PullUp, 0, 0, IoRestrictionInputOnly, ++ "\\_SB.GPO0", 0, ResourceConsumer) {27, 31} ++ }) ++ ++ Name (_DSD, Package () ++ { ++ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), ++ Package () ++ { ++ Package () {"reset-gpio", Package() {^BTH, 1, 1, 0 }}, ++ Package () {"shutdown-gpio", Package() {^BTH, 0, 0, 0 }}, ++ } ++ }) ++ } ++ ++The format of the supported GPIO property is: ++ ++ Package () { "name", Package () { ref, index, pin, active_low }} ++ ++ ref - The device that has _CRS containing GpioIo()/GpioInt() resources, ++ typically this is the device itself (BTH in our case). ++ index - Index of the GpioIo()/GpioInt() resource in _CRS starting from zero. ++ pin - Pin in the GpioIo()/GpioInt() resource. Typically this is zero. ++ active_low - If 1 the GPIO is marked as active_low. ++ ++Since ACPI GpioIo() resource does not have a field saying whether it is ++active low or high, the "active_low" argument can be used here. Setting ++it to 1 marks the GPIO as active low. ++ ++In our Bluetooth example the "reset-gpio" refers to the second GpioIo() ++resource, second pin in that resource with the GPIO number of 31. ++ ++ACPI GPIO Mappings Provided by Drivers ++-------------------------------------- ++ ++There are systems in which the ACPI tables do not contain _DSD but provide _CRS ++with GpioIo()/GpioInt() resources and device drivers still need to work with ++them. ++ ++In those cases ACPI device identification objects, _HID, _CID, _CLS, _SUB, _HRV, ++available to the driver can be used to identify the device and that is supposed ++to be sufficient to determine the meaning and purpose of all of the GPIO lines ++listed by the GpioIo()/GpioInt() resources returned by _CRS. In other words, ++the driver is supposed to know what to use the GpioIo()/GpioInt() resources for ++once it has identified the device. Having done that, it can simply assign names ++to the GPIO lines it is going to use and provide the GPIO subsystem with a ++mapping between those names and the ACPI GPIO resources corresponding to them. ++ ++To do that, the driver needs to define a mapping table as a NULL-terminated ++array of struct acpi_gpio_mapping objects that each contain a name, a pointer ++to an array of line data (struct acpi_gpio_params) objects and the size of that ++array. Each struct acpi_gpio_params object consists of three fields, ++crs_entry_index, line_index, active_low, representing the index of the target ++GpioIo()/GpioInt() resource in _CRS starting from zero, the index of the target ++line in that resource starting from zero, and the active-low flag for that line, ++respectively, in analogy with the _DSD GPIO property format specified above. ++ ++For the example Bluetooth device discussed previously the data structures in ++question would look like this: ++ ++static const struct acpi_gpio_params reset_gpio = { 1, 1, false }; ++static const struct acpi_gpio_params shutdown_gpio = { 0, 0, false }; ++ ++static const struct acpi_gpio_mapping bluetooth_acpi_gpios[] = { ++ { "reset-gpio", &reset_gpio, 1 }, ++ { "shutdown-gpio", &shutdown_gpio, 1 }, ++ { }, ++}; ++ ++Next, the mapping table needs to be passed as the second argument to ++acpi_dev_add_driver_gpios() that will register it with the ACPI device object ++pointed to by its first argument. That should be done in the driver's .probe() ++routine. On removal, the driver should unregister its GPIO mapping table by ++calling acpi_dev_remove_driver_gpios() on the ACPI device object where that ++table was previously registered. diff --git a/Documentation/arm64/arm-acpi.txt b/Documentation/arm64/arm-acpi.txt new file mode 100644 -index 0000000..b7dc826 +index 0000000..17cf96d --- /dev/null +++ b/Documentation/arm64/arm-acpi.txt -@@ -0,0 +1,218 @@ +@@ -0,0 +1,323 @@ +ACPI on ARMv8 Servers +--------------------- -+ +ACPI can be used for ARMv8 general purpose servers designed to follow -+the SBSA specification (currently available to people with an ARM login at -+http://silver.arm.com). ++the ARM SBSA (Server Base System Architecture) specification, currently ++available to those with an ARM login at http://silver.arm.com. ++ ++The ARMv8 kernel implements the reduced hardware model of ACPI version ++5.1 and its corresponding errata. Links to the specification and all ++external documents it refers to are managed by the UEFI Forum. The ++specification is available at http://www.uefi.org/specifications and ++external documents can be found via http://www.uefi.org/acpi. + -+The kernel will implement minimum ACPI version is 5.1 + errata as released by -+the UEFI Forum, which is available at <http://www.uefi.org/acpi/specs>. ++If an ARMv8 system does not meet the requirements of the SBSA, or cannot ++be described using the mechanisms defined in the required ACPI specifications, ++then it is likely that Device Tree (DT) is more suitable than ACPI for the ++hardware. + -+If the machine does not meet the requirements of the SBSA, or cannot be -+described in the required ACPI specifications then it is likely that Device Tree -+(DT) is more suitable for the hardware. + +Relationship with Device Tree +----------------------------- -+ +ACPI support in drivers and subsystems for ARMv8 should never be mutually +exclusive with DT support at compile time. + @@ -1363,131 +2023,226 @@ index 0000000..b7dc826 +of booting with either scheme (in kernels with both schemes enabled at compile +time). + -+When booting using ACPI tables the /chosen node in DT will still be parsed -+to extract the kernel command line and initrd path. No other section of -+the DT will be used. ++When booting using ACPI tables, the /chosen node in DT will still be parsed ++to extract the kernel command line and initrd path. No other section of the ++DT will be used. ++ + +Booting using ACPI tables +------------------------- -+ -+Currently, the only defined method to pass ACPI tables to the kernel on ARMv8 ++The only defined method for passing ACPI tables to the kernel on ARMv8 +is via the UEFI system configuration table. + -+The UEFI implementation MUST set the ACPI_20_TABLE_GUID to point to the -+RSDP table (the table with the ACPI signature "RSD PTR "). ++Processing of ACPI tables may be disabled by passing acpi=off on the kernel ++command line; this is the default behavior. If acpi=force is used, the kernel ++will ONLY use device configuration information contained in the ACPI tables. + -+The pointer to the RSDP table will be retrieved from EFI by the ACPI core. ++In order for the kernel to load and use ACPI tables, the UEFI implementation ++MUST set the ACPI_20_TABLE_GUID to point to the RSDP table (the table with ++the ACPI signature "RSD PTR "). If this pointer is incorrect and acpi=force ++is used, the kernel will disable ACPI and try to use DT to boot. + -+Processing of ACPI tables may be disabled by passing acpi=off on the kernel -+command line. ++If the pointer to the RSDP table is correct, the table will be mapped into ++the kernel by the ACPI core, using the address provided by UEFI. + -+DO use an XSDT; RSDTs are deprecated and should not be used on arm64. They -+only allow for 32-bit addresses. ++The ACPI core will then locate and map in all other ACPI tables provided by ++using the addresses in the RSDP table to find the XSDT (eXtended System ++Description Table). The XSDT in turn provides the addresses to all other ++ACPI tables provided by the system firmware; the ACPI core will then traverse ++this table and map in the tables listed. + -+DO NOT use the 32-bit address fields in the FADT; they are deprecated. The -+64-bit alternatives MUST be used. ++The ACPI core will ignore any provided RSDT (Root System Description Table). ++RSDTs have been deprecated and are ignored on arm64 since they only allow ++for 32-bit addresses. + -+The minimum set of tables MUST include RSDP, XSDT, FACS, FADT, DSDT, MADT -+and GTDT. If PCI is used the MCFG table MUST also be present. ++Further, the ACPI core will only use the 64-bit address fields in the FADT ++(Fixed ACPI Description Table). Any 32-bit address fields in the FADT will ++be ignored on arm64. + -+ACPI Detection -+-------------- ++Hardware reduced mode (see Section 4.1 of the ACPI 5.1 specification) will ++be enforced by the ACPI core on arm64. Doing so allows the ACPI core to ++run less complex code since it no longer has to provide support for legacy ++hardware from other architectures. + -+Drivers should determine their probe() type by checking for ACPI_HANDLE, -+or .of_node, or other information in the device structure. This is -+detailed further in the "Driver Recommendations" section. ++For the ACPI core to operate properly, and in turn provide the information ++the kernel needs to configure devices, it expects to find the following ++tables (all section numbers refer to the ACPI 5.1 specfication): + -+In non-driver code If the presence of ACPI needs to be detected at runtime, -+then check the value of acpi_disabled. If CONFIG_ACPI is not set, -+acpi_disabled will always be 1. ++ -- RSDP (Root System Description Pointer), section 5.2.5 + -+Device Enumeration -+------------------ ++ -- XSDT (eXtended System Description Table), section 5.2.8 + -+Device descriptions in ACPI should use standard recognized ACPI interfaces. -+These are far simpler than the information provided via Device Tree. Drivers -+should take into account this simplicity and work with sensible defaults. ++ -- FACS (Firmware ACPI Control Structure), section 5.2.10 ++ ++ -- FADT (Fixed ACPI Description Table), section 5.2.9 + -+On no account should a Device Tree attempt to be replicated in ASL using such -+constructs as Name(KEY0, "Value1") type constructs. Additional driver specific -+data should be represented with the appropriate _DSD (ACPI Section 6.2.5) -+structure. _DSM (ACPI Section 9.14.1) should only be used if _DSD cannot -+represent the data required. ++ -- DSDT (Differentiated System Description Table), section ++ 5.2.11.1 + -+This data should be rare and not OS specific. For x86 ACPI has taken to -+identifying itself as Windows because it was found that only one path was -+routinely tested. For ARMv8 it would be preferable to have only one well -+tested path. ++ -- MADT (Multiple APIC Description Table), section 5.2.12 + -+_DSD covers more than the generic server case and care should be taken not to -+replicate highly specific embedded behaviour from DT into generic servers. ++ -- GTDT (Generic Timer Description Table), section 5.2.24 + -+Common _DSD bindings should be submitted to ASWG to be included in the -+document :- ++ -- If PCI is supported, the MCFG (Memory mapped ConFiGuration ++ Table), section 5.2.6, specifically Table 5-31. + -+http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel.htm ++If the above tables are not all present, the kernel may or may not be ++able to boot properly since it may not be able to configure all of the ++devices available. ++ ++ ++ACPI Detection ++-------------- ++Drivers should determine their probe() type by checking for a null ++value for ACPI_HANDLE, or checking .of_node, or other information in ++the device structure. This is detailed further in the "Driver ++Recommendations" section. ++ ++In non-driver code, if the presence of ACPI needs to be detected at ++runtime, then check the value of acpi_disabled. If CONFIG_ACPI is not ++set, acpi_disabled will always be 1. ++ ++ ++Device Enumeration ++------------------ ++Device descriptions in ACPI should use standard recognized ACPI interfaces. ++These can contain less information than is typically provided via a Device ++Tree description for the same device. This is also one of the reasons that ++ACPI can be useful -- the driver takes into account that it may have less ++detailed information about the device and uses sensible defaults instead. ++If done properly in the driver, the hardware can change and improve over ++time without the driver having to change at all. ++ ++Clocks provide an excellent example. In DT, clocks need to be specified ++and the drivers need to take them into account. In ACPI, the assumption ++is that UEFI will leave the device in a reasonable default state, including ++any clock settings. If for some reason the driver needs to change a clock ++value, this can be done in an ACPI method; all the driver needs to do is ++invoke the method and not concern itself with what the method needs to do ++to change the clock. Changing the hardware can then take place over time ++by changing what the ACPI method does, and not the driver. ++ ++ACPI drivers should only look at one specific ASL object -- the _DSD object ++-- for device driver parameters (known in DT as "bindings", or "Device ++Properties" in ACPI). Not all DT bindings will be recognized. The UEFI ++Forum provides a mechanism for registering such bindings [URL TBD by ASWG] ++so that they may be used on any operating system supporting ACPI. Device ++properties that have not been registered with the UEFI Forum should not be ++used. ++ ++Drivers should look for device properties in the _DSD object ONLY; the _DSD ++object is described in the ACPI specification section 6.2.5, but more ++specifically, use the _DSD Device Properties UUID: ++ ++ -- UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 ++ ++ -- http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf) ++ ++The kernel has an interface for looking up device properties in a manner ++independent of whether DT or ACPI is being used and that interface should ++be used; it can eliminate some duplication of code paths in driver probing ++functions and discourage divergence between DT bindings and ACPI device ++properties. ++ ++ACPI tables are described with a formal language called ASL, the ACPI ++Source Language (section 19 of the specification). This means that there ++are always multiple ways to describe the same thing -- including device ++properties. For example, device properties could use an ASL construct ++that looks like this: Name(KEY0, "value0"). An ACPI device driver would ++then retrieve the value of the property by evaluating the KEY0 object. ++However, using Name() this way has multiple problems: (1) ACPI limits ++names ("KEY0") to four characters unlike DT; (2) there is no industry ++wide registry that maintains a list of names, minimzing re-use; (3) ++there is also no registry for the definition of property values ("value0"), ++again making re-use difficult; and (4) how does one maintain backward ++compatibility as new hardware comes out? The _DSD method was created ++to solve precisely these sorts of problems; Linux drivers should ALWAYS ++use the _DSD method for device properties and nothing else. ++ ++The _DSM object (ACPI Section 9.14.1) could also be used for conveying ++device properties to a driver. Linux drivers should only expect it to ++be used if _DSD cannot represent the data required, and there is no way ++to create a new UUID for the _DSD object. Note that there is even less ++regulation of the use of _DSM than there is of _DSD. Drivers that depend ++on the contents of _DSM objects will be more difficult to maintain over ++time because of this. ++ ++The _DSD object is a very flexible mechanism in ACPI, as are the registered ++Device Properties. This flexibility allows _DSD to cover more than just the ++generic server case and care should be taken in device drivers not to expect ++it to replicate highly specific embedded behaviour from DT. ++ ++Both DT bindings and ACPI device properties for device drivers have review ++processes. Use them. And, before creating new device properties, check to ++be sure that they have not been defined before and either registered in the ++Linux kernel documentation or the UEFI Forum. If the device drivers supports ++ACPI and DT, please make sure the device properties are consistent in both ++places. + -+If these bindings are mirrored from DT care should be taken to ensure they are -+reviewed as DT bindings before submission to limit divergance in bindings. + +Programmable Power Control Resources +------------------------------------ -+ +Programmable power control resources include such resources as voltage/current +providers (regulators) and clock sources. + -+For power control of these resources they should be represented with Power -+Resource Objects (ACPI Section 7.1). The ACPI core will then handle correctly -+enabling/disabling of resources as they are needed. ++The kernel assumes that power control of these resources is represented with ++Power Resource Objects (ACPI section 7.1). The ACPI core will then handle ++correctly enabling and disabling resources as they are needed. In order to ++get that to work, ACPI assumes each device has defined D-states and that these ++can be controlled through the optional ACPI methods _PS0, _PS1, _PS2, and _PS3; ++in ACPI, _PS0 is the method to invoke to turn a device full on, and _PS3 is for ++turning a device full off. ++ ++The kernel ACPI code will also assume that the _PS? methods follow the normal ++ACPI rules for such methods: + -+The ACPI 5.1 specification does not contain any standard binding for these -+objects to enable programmable levels or rates so this should be avoided if -+possible and the resources set to appropriate levels by the firmware. If this is -+not possible then any manipulation should be abstracted in ASL. ++ -- If either _PS0 or _PS3 is implemented, then the other method must also ++ be implemented. + -+Each device in ACPI has D-states and these can be controlled through -+the optional methods _PS0..._PS3 where _PS0 is full on and _PS3 is full off. ++ -- If a device requires usage or setup of a power resource when on, the ASL ++ should organize that it is allocated/enabled using the _PS0 method. + -+If either _PS0 or _PS3 is implemented, then the other method must also be -+implemented. ++ -- Resources allocated or enabled in the _PS0 method should be disabled ++ or de-allocated in the _PS3 method. + -+If a device requires usage or setup of a power resource when on, the ASL -+should organize that it is allocated/enabled using the _PS0 method. ++ -- Firmware will leave the resources in a reasonable state before handing ++ over control to the kernel. + -+Resources allocated/enabled in the _PS0 method should be disabled/de-allocated -+in the _PS3 method. ++Such code in _PS? methods will of course be very platform specific. But, ++this allows the driver to abstract out the interface for operating the device ++and avoid having to read special non-standard values from ACPI tables. Further, ++abstracting the use of these resources allows the hardware to change over time ++without requiring updates to the driver. + -+Such code in _PS? methods will of course be very platform specific but -+should allow the driver to operate the device without special non-standard -+values being read from ASL. Further, abstracting the use of these resources -+allows hardware revisions without requiring updates to the kernel. + +Clocks +------ ++ACPI makes the assumption that clocks are initialized by the firmware -- ++UEFI, in this case -- to some working value before control is handed over ++to the kernel. This has implications for devices such as UARTs, or SoC ++driven LCD displays, for example. + -+Like clocks that are part of the power resources there is no standard way -+to represent a clock tree in ACPI 5.1 in a similar manner to how it is -+described in DT. ++When the kernel boots, the clock is assumed to be set to reasonable ++working value. If for some reason the frequency needs to change -- e.g., ++throttling for power management -- the device driver should expect that ++process to be abstracted out into some ACPI method that can be invoked ++(please see the ACPI specification for further recommendations on standard ++methods to be expected). If is not, there is no direct way for ACPI to ++control the clocks. + -+Devices affected by this include things like UARTs, SoC driven LCD displays, -+etc. -+ -+The firmware (for example, UEFI) should initialize these clocks to fixed working -+values before the kernel is executed. + +Driver Recommendations +---------------------- ++DO NOT remove any DT handling when adding ACPI support for a driver. The ++same device may be used on many different systems. + -+DO NOT remove any FDT handling when adding ACPI support for a driver. Different -+systems may use the same device. -+ -+DO try and keep complex sections of ACPI and DT functionality separate. This -+may mean a patch to break out some complex DT to another function before -+the patch to add ACPI. This may happen in other functions but is most likely -+in probe function. This gives a clearer flow of data for reviewing driver -+source. -+ -+probe() :- ++DO try to structure the driver so that it is data driven. That is, set up ++a struct containing internal per-device state based on defaults and whatever ++else must be discovered by the driver probe function. Then, have the rest ++of the driver operate off of the contents of that struct. Doing so should ++allow most divergence between ACPI and DT functionality to be kept local to ++the probe function instead of being scattered throughout the driver. For ++example: + +static int device_probe_dt(struct platform_device *pdev) +{ @@ -1518,10 +2273,9 @@ index 0000000..b7dc826 + ... +} + -+DO keep the MODULE_DEVICE_TABLE entries together in the driver to make it clear -+the different names the driver is probed for, both from DT and from ACPI. -+ -+module device tables :- ++DO keep the MODULE_DEVICE_TABLE entries together in the driver to make it ++clear the different names the driver is probed for, both from DT and from ++ACPI: + +static struct of_device_id virtio_mmio_match[] = { + { .compatible = "virtio,mmio", }, @@ -1535,90 +2289,64 @@ index 0000000..b7dc826 +}; +MODULE_DEVICE_TABLE(acpi, virtio_mmio_acpi_match); + ++ +ASWG +---- -+ -+The following areas are not yet well defined for ARM in the current ACPI -+specification and are expected to be worked through in the UEFI ACPI -+Specification Working Group (ASWG) <http://www.uefi.org/workinggroups>. -+Participation in this group is open to all UEFI members. -+ -+ - ACPI based CPU topology -+ - ACPI based Power management -+ - CPU idle control based on PSCI -+ - CPU performance control (CPPC) -+ - ACPI based SMMU -+ - ITS support for GIC in MADT -+ -+No code shall be accepted into the kernel unless it complies with the released -+standards from UEFI ASWG. If there are features missing from ACPI to make it -+function on a platform, ECRs should be submitted to ASWG and go through the -+approval process. -diff --git a/Documentation/devicetree/bindings/pci/xgene-pci.txt b/Documentation/devicetree/bindings/pci/xgene-pci.txt -new file mode 100644 -index 0000000..1070b06 ---- /dev/null -+++ b/Documentation/devicetree/bindings/pci/xgene-pci.txt -@@ -0,0 +1,57 @@ -+* AppliedMicro X-Gene PCIe interface -+ -+Required properties: -+- device_type: set to "pci" -+- compatible: should contain "apm,xgene-pcie" to identify the core. -+- reg: A list of physical base address and length for each set of controller -+ registers. Must contain an entry for each entry in the reg-names -+ property. -+- reg-names: Must include the following entries: -+ "csr": controller configuration registers. -+ "cfg": pcie configuration space registers. -+- #address-cells: set to <3> -+- #size-cells: set to <2> -+- ranges: ranges for the outbound memory, I/O regions. -+- dma-ranges: ranges for the inbound memory regions. -+- #interrupt-cells: set to <1> -+- interrupt-map-mask and interrupt-map: standard PCI properties -+ to define the mapping of the PCIe interface to interrupt -+ numbers. -+- clocks: from common clock binding: handle to pci clock. -+ -+Optional properties: -+- status: Either "ok" or "disabled". -+- dma-coherent: Present if dma operations are coherent -+ -+Example: -+ -+SoC specific DT Entry: -+ -+ pcie0: pcie@1f2b0000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f2b0000 0x0 0x00010000 /* Controller registers */ -+ 0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000 /* io */ -+ 0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>; -+ dma-coherent; -+ clocks = <&pcie0clk 0>; -+ }; -+ -+ -+Board specific DT Entry: -+ &pcie0 { -+ status = "ok"; -+ }; ++The following areas are not yet fully defined for ARM in the 5.1 version ++of the ACPI specification and are expected to be worked through in the ++UEFI ACPI Specification Working Group (ASWG): ++ ++ -- ACPI based CPU topology ++ -- ACPI based Power management ++ -- CPU idle control based on PSCI ++ -- CPU performance control (CPPC) ++ -- ACPI based SMMU ++ -- ITS support for GIC in MADT ++ ++Participation in this group is open to all UEFI members. Please see ++http://www.uefi.org/workinggroup for details on group membership. ++ ++It is the intent of the ARMv8 ACPI kernel code to follow the ACPI specification ++as closely as possible, and to only implement functionality that complies with ++the released standards from UEFI ASWG. As a practical matter, there will be ++vendors that provide bad ACPI tables or violate the standards in some way. ++If this is because of errors, quirks and fixups may be necessary, but will ++be avoided if possible. If there are features missing from ACPI that preclude ++it from being used on a platform, ECRs (Engineering Change Requests) should be ++submitted to ASWG and go through the normal approval process; for those that ++are not UEFI members, many other members of the Linux community are and would ++likely be willing to assist in submitting ECRs. +diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt +index 6ce5441..859918d 100644 +--- a/Documentation/gpio/consumer.txt ++++ b/Documentation/gpio/consumer.txt +@@ -219,6 +219,24 @@ part of the IRQ interface, e.g. IRQF_TRIGGER_FALLING, as are system wakeup + capabilities. + + ++GPIOs and ACPI ++============== ++ ++On ACPI systems, GPIOs are described by GpioIo()/GpioInt() resources listed by ++the _CRS configuration objects of devices. Those resources do not provide ++connection IDs (names) for GPIOs, so it is necessary to use an additional ++mechanism for this purpose. ++ ++Systems compliant with ACPI 5.1 or newer may provide a _DSD configuration object ++which, among other things, may be used to provide connection IDs for specific ++GPIOs described by the GpioIo()/GpioInt() resources in _CRS. If that is the ++case, it will be handled by the GPIO subsystem automatically. However, if the ++_DSD is not present, the mappings between GpioIo()/GpioInt() resources and GPIO ++connection IDs need to be provided by device drivers. ++ ++For details refer to Documentation/acpi/gpio-properties.txt ++ ++ + Interacting With the Legacy GPIO Subsystem + ========================================== + Many kernel subsystems still handle GPIOs using the legacy integer-based diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt -index 10d51c2..9464c6d 100644 +index 479f332..6187d9b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -165,7 +165,7 @@ multipliers 'Kilo', 'Mega', and 'Giga', equalling 2^10, 2^20, and 2^30 @@ -1626,7 +2354,7 @@ index 10d51c2..9464c6d 100644 - acpi= [HW,ACPI,X86] -+ acpi= [HW,ACPI,X86,ARM] ++ acpi= [HW,ACPI,X86,ARM64] Advanced Configuration and Power Interface Format: { force | off | strict | noirq | rsdt } force -- enable ACPI if default was off @@ -1634,255 +2362,157 @@ index 10d51c2..9464c6d 100644 strictly ACPI specification compliant. rsdt -- prefer RSDT over (default) XSDT copy_dsdt -- copy DSDT to memory -+ For ARM64, ONLY "acpi=off" is available. ++ For ARM64, ONLY "acpi=off" or "acpi=force" are available See also Documentation/power/runtime_pm.txt, pci=noacpi -diff --git a/MAINTAINERS b/MAINTAINERS -index 3705430..f6b49e4 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -6940,6 +6940,14 @@ L: linux-pci@vger.kernel.org - S: Maintained - F: drivers/pci/host/*spear* - -+PCI DRIVER FOR APPLIEDMICRO XGENE -+M: Tanmay Inamdar <tinamdar@apm.com> -+L: linux-pci@vger.kernel.org -+L: linux-arm-kernel@lists.infradead.org -+S: Maintained -+F: Documentation/devicetree/bindings/pci/xgene-pci.txt -+F: drivers/pci/host/pci-xgene.c -+ - PCMCIA SUBSYSTEM - P: Linux PCMCIA Team - L: linux-pcmcia@lists.infradead.org -diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h -index 3d23418..22b7529 100644 ---- a/arch/arm/include/asm/io.h -+++ b/arch/arm/include/asm/io.h -@@ -178,6 +178,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr) - - /* PCI fixed i/o mapping */ - #define PCI_IO_VIRT_BASE 0xfee00000 -+#define PCI_IOBASE PCI_IO_VIRT_BASE - - #if defined(CONFIG_PCI) - void pci_ioremap_set_mem_type(int mem_type); -diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h -index 5cc0b0f..03a08bb 100644 ---- a/arch/arm/include/asm/kvm_mmu.h -+++ b/arch/arm/include/asm/kvm_mmu.h -@@ -21,6 +21,7 @@ - - #include <asm/memory.h> - #include <asm/page.h> -+#include <asm/kvm_arm.h> - - /* - * We directly use the kernel VA for the HYP, as we can directly share -@@ -178,6 +179,18 @@ static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, - - void stage2_flush_vm(struct kvm *kvm); - -+static inline int kvm_get_phys_addr_shift(void) -+{ -+ return KVM_PHYS_SHIFT; -+} -+ -+ -+static inline u32 get_vttbr_baddr_mask(void) -+{ -+ return VTTBR_BADDR_MASK; -+} -+ -+ - #endif /* !__ASSEMBLY__ */ - - #endif /* __ARM_KVM_MMU_H__ */ -diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c -index a99e0cd..d0fca8f 100644 ---- a/arch/arm/kvm/arm.c -+++ b/arch/arm/kvm/arm.c -@@ -37,6 +37,7 @@ - #include <asm/mman.h> - #include <asm/tlbflush.h> - #include <asm/cacheflush.h> -+#include <asm/cputype.h> - #include <asm/virt.h> - #include <asm/kvm_arm.h> - #include <asm/kvm_asm.h> -@@ -61,6 +62,12 @@ static atomic64_t kvm_vmid_gen = ATOMIC64_INIT(1); - static u8 kvm_next_vmid; - static DEFINE_SPINLOCK(kvm_vmid_lock); - -+#ifdef CONFIG_ARM64 -+static u64 vttbr_baddr_mask; -+#else -+static u32 vttbr_baddr_mask; -+#endif -+ - static bool vgic_present; - - static void kvm_arm_set_running_vcpu(struct kvm_vcpu *vcpu) -@@ -429,8 +436,14 @@ static void update_vttbr(struct kvm *kvm) - /* update vttbr to be used with the new vmid */ - pgd_phys = virt_to_phys(kvm->arch.pgd); - vmid = ((u64)(kvm->arch.vmid) << VTTBR_VMID_SHIFT) & VTTBR_VMID_MASK; -- kvm->arch.vttbr = pgd_phys & VTTBR_BADDR_MASK; -- kvm->arch.vttbr |= vmid; -+ -+ /* -+ * If the VTTBR isn't aligned there is something wrong with the system -+ * or kernel. -+ */ -+ BUG_ON(pgd_phys & ~vttbr_baddr_mask); -+ -+ kvm->arch.vttbr = pgd_phys | vmid; +diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c +index b4d14b8..9c8b127 100644 +--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c ++++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c +@@ -41,7 +41,7 @@ static void h1940bt_enable(int on) + mdelay(10); + gpio_set_value(S3C2410_GPH(1), 0); - spin_unlock(&kvm_vmid_lock); - } -@@ -1015,6 +1028,12 @@ int kvm_arch_init(void *opaque) - } +- h1940_led_blink_set(-EINVAL, GPIO_LED_BLINK, NULL, NULL); ++ h1940_led_blink_set(NULL, GPIO_LED_BLINK, NULL, NULL); } + else { + gpio_set_value(S3C2410_GPH(1), 1); +@@ -50,7 +50,7 @@ static void h1940bt_enable(int on) + mdelay(10); + gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0); + +- h1940_led_blink_set(-EINVAL, GPIO_LED_NO_BLINK_LOW, NULL, NULL); ++ h1940_led_blink_set(NULL, GPIO_LED_NO_BLINK_LOW, NULL, NULL); + } + } -+ vttbr_baddr_mask = get_vttbr_baddr_mask(); -+ if (vttbr_baddr_mask == ~0) { -+ kvm_err("Cannot set vttbr_baddr_mask\n"); -+ return -EINVAL; -+ } -+ - cpu_notifier_register_begin(); - - err = init_hyp_mode(); -diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c -index 05e1f73..c186a17 100644 ---- a/arch/arm/mach-integrator/pci_v3.c -+++ b/arch/arm/mach-integrator/pci_v3.c -@@ -660,6 +660,7 @@ static void __init pci_v3_preinit(void) +diff --git a/arch/arm/mach-s3c24xx/h1940.h b/arch/arm/mach-s3c24xx/h1940.h +index 2950cc4..596d9f6 100644 +--- a/arch/arm/mach-s3c24xx/h1940.h ++++ b/arch/arm/mach-s3c24xx/h1940.h +@@ -19,8 +19,10 @@ + #define H1940_SUSPEND_RESUMEAT (0x30081000) + #define H1940_SUSPEND_CHECK (0x30080000) + ++struct gpio_desc; ++ + extern void h1940_pm_return(void); +-extern int h1940_led_blink_set(unsigned gpio, int state, ++extern int h1940_led_blink_set(struct gpio_desc *desc, int state, + unsigned long *delay_on, + unsigned long *delay_off); + +diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c +index d35ddc1..d40d4f5 100644 +--- a/arch/arm/mach-s3c24xx/mach-h1940.c ++++ b/arch/arm/mach-s3c24xx/mach-h1940.c +@@ -359,10 +359,11 @@ static struct platform_device h1940_battery = { + + static DEFINE_SPINLOCK(h1940_blink_spin); + +-int h1940_led_blink_set(unsigned gpio, int state, ++int h1940_led_blink_set(struct gpio_desc *desc, int state, + unsigned long *delay_on, unsigned long *delay_off) { - unsigned long flags; - unsigned int temp; -+ phys_addr_t io_address = pci_pio_to_address(io_mem.start); - - pcibios_min_mem = 0x00100000; - -@@ -701,7 +702,7 @@ static void __init pci_v3_preinit(void) - /* - * Setup window 2 - PCI IO - */ -- v3_writel(V3_LB_BASE2, v3_addr_to_lb_base2(io_mem.start) | -+ v3_writel(V3_LB_BASE2, v3_addr_to_lb_base2(io_address) | - V3_LB_BASE_ENABLE); - v3_writew(V3_LB_MAP2, v3_addr_to_lb_map2(0)); - -@@ -742,6 +743,7 @@ static void __init pci_v3_preinit(void) - static void __init pci_v3_postinit(void) + int blink_gpio, check_gpio1, check_gpio2; ++ int gpio = desc ? desc_to_gpio(desc) : -EINVAL; + + switch (gpio) { + case H1940_LATCH_LED_GREEN: +diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c +index c3f2682..1d35ff3 100644 +--- a/arch/arm/mach-s3c24xx/mach-rx1950.c ++++ b/arch/arm/mach-s3c24xx/mach-rx1950.c +@@ -250,9 +250,10 @@ static void rx1950_disable_charger(void) + + static DEFINE_SPINLOCK(rx1950_blink_spin); + +-static int rx1950_led_blink_set(unsigned gpio, int state, ++static int rx1950_led_blink_set(struct gpio_desc *desc, int state, + unsigned long *delay_on, unsigned long *delay_off) { - unsigned int pci_cmd; -+ phys_addr_t io_address = pci_pio_to_address(io_mem.start); ++ int gpio = desc_to_gpio(desc); + int blink_gpio, check_gpio; - pci_cmd = PCI_COMMAND_MEMORY | - PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; -@@ -758,7 +760,7 @@ static void __init pci_v3_postinit(void) - "interrupt: %d\n", ret); - #endif + switch (gpio) { +diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c +index e048f61..e53fc8d 100644 +--- a/arch/arm/plat-orion/gpio.c ++++ b/arch/arm/plat-orion/gpio.c +@@ -306,9 +306,10 @@ EXPORT_SYMBOL(orion_gpio_set_blink); -- register_isa_ports(non_mem.start, io_mem.start, 0); -+ register_isa_ports(non_mem.start, io_address, 0); - } + #define ORION_BLINK_HALF_PERIOD 100 /* ms */ +-int orion_gpio_led_blink_set(unsigned gpio, int state, ++int orion_gpio_led_blink_set(struct gpio_desc *desc, int state, + unsigned long *delay_on, unsigned long *delay_off) + { ++ unsigned gpio = desc_to_gpio(desc); + + if (delay_on && delay_off && !*delay_on && !*delay_off) + *delay_on = *delay_off = ORION_BLINK_HALF_PERIOD; +diff --git a/arch/arm/plat-orion/include/plat/orion-gpio.h b/arch/arm/plat-orion/include/plat/orion-gpio.h +index e763988..e856b07 100644 +--- a/arch/arm/plat-orion/include/plat/orion-gpio.h ++++ b/arch/arm/plat-orion/include/plat/orion-gpio.h +@@ -14,12 +14,15 @@ + #include <linux/init.h> + #include <linux/types.h> + #include <linux/irqdomain.h> ++ ++struct gpio_desc; ++ /* -@@ -867,33 +869,32 @@ static int __init pci_v3_probe(struct platform_device *pdev) - - for_each_of_pci_range(&parser, &range) { - if (!range.flags) { -- of_pci_range_to_resource(&range, np, &conf_mem); -+ ret = of_pci_range_to_resource(&range, np, &conf_mem); - conf_mem.name = "PCIv3 config"; - } - if (range.flags & IORESOURCE_IO) { -- of_pci_range_to_resource(&range, np, &io_mem); -+ ret = of_pci_range_to_resource(&range, np, &io_mem); - io_mem.name = "PCIv3 I/O"; - } - if ((range.flags & IORESOURCE_MEM) && - !(range.flags & IORESOURCE_PREFETCH)) { - non_mem_pci = range.pci_addr; - non_mem_pci_sz = range.size; -- of_pci_range_to_resource(&range, np, &non_mem); -+ ret = of_pci_range_to_resource(&range, np, &non_mem); - non_mem.name = "PCIv3 non-prefetched mem"; - } - if ((range.flags & IORESOURCE_MEM) && - (range.flags & IORESOURCE_PREFETCH)) { - pre_mem_pci = range.pci_addr; - pre_mem_pci_sz = range.size; -- of_pci_range_to_resource(&range, np, &pre_mem); -+ ret = of_pci_range_to_resource(&range, np, &pre_mem); - pre_mem.name = "PCIv3 prefetched mem"; - } -- } - -- if (!conf_mem.start || !io_mem.start || -- !non_mem.start || !pre_mem.start) { -- dev_err(&pdev->dev, "missing ranges in device node\n"); -- return -EINVAL; -+ if (ret < 0) { -+ dev_err(&pdev->dev, "missing ranges in device node\n"); -+ return ret; -+ } - } + * Orion-specific GPIO API extensions. + */ + void orion_gpio_set_unused(unsigned pin); + void orion_gpio_set_blink(unsigned pin, int blink); +-int orion_gpio_led_blink_set(unsigned gpio, int state, ++int orion_gpio_led_blink_set(struct gpio_desc *desc, int state, + unsigned long *delay_on, unsigned long *delay_off); - pci_v3.map_irq = of_irq_parse_and_map_pci; + #define GPIO_INPUT_OK (1 << 0) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index fd4e81a..e57b91a 100644 +index 9532f8d..80a82ac 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -1,5 +1,6 @@ - config ARM64 - def_bool y -+ select ACPI_REDUCED_HARDWARE_ONLY if ACPI +@@ -4,6 +4,7 @@ config ARM64 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_SG_CHAIN select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST -@@ -81,7 +82,7 @@ config MMU - def_bool y - - config NO_IOPORT_MAP -- def_bool y -+ def_bool y if !PCI - - config STACKTRACE_SUPPORT - def_bool y -@@ -156,6 +157,26 @@ menu "Bus support" - config ARM_AMBA - bool - -+config PCI -+ bool "PCI support" -+ help -+ This feature enables support for PCI bus system. If you say Y -+ here, the kernel will include drivers and infrastructure code -+ to support PCI bus devices. -+ -+config PCI_DOMAINS -+ def_bool PCI -+ -+config PCI_DOMAINS_GENERIC -+ def_bool PCI -+ -+config PCI_SYSCALL -+ def_bool PCI -+ -+source "drivers/pci/Kconfig" -+source "drivers/pci/pcie/Kconfig" -+source "drivers/pci/hotplug/Kconfig" -+ - endmenu - - menu "Kernel Features" -@@ -235,6 +256,9 @@ config SMP ++ select ACPI_REDUCED_HARDWARE_ONLY if ACPI + select ARCH_USE_CMPXCHG_LOCKREF + select ARCH_SUPPORTS_ATOMIC_RMW + select ARCH_WANT_OPTIONAL_GPIOLIB +@@ -34,6 +35,7 @@ config ARM64 + select GENERIC_TIME_VSYSCALL + select HANDLE_DOMAIN_IRQ + select HARDIRQS_SW_RESEND ++ select HAVE_ALIGNED_STRUCT_PAGE if SLUB + select HAVE_ARCH_AUDITSYSCALL + select HAVE_ARCH_JUMP_LABEL + select HAVE_ARCH_KGDB +@@ -41,6 +43,7 @@ config ARM64 + select HAVE_BPF_JIT + select HAVE_C_RECORDMCOUNT + select HAVE_CC_STACKPROTECTOR ++ select HAVE_CMPXCHG_DOUBLE + select HAVE_DEBUG_BUGVERBOSE + select HAVE_DEBUG_KMEMLEAK + select HAVE_DMA_API_DEBUG +@@ -185,6 +188,9 @@ config PCI_DOMAINS_GENERIC + config PCI_SYSCALL + def_bool PCI + ++config PCI_MMCONFIG ++ def_bool y if PCI && ACPI ++ + source "drivers/pci/Kconfig" + source "drivers/pci/pcie/Kconfig" + source "drivers/pci/hotplug/Kconfig" +@@ -268,6 +274,9 @@ config SMP If you don't know what to do here, say N. @@ -1892,7 +2522,25 @@ index fd4e81a..e57b91a 100644 config SCHED_MC bool "Multi-core scheduler support" depends on SMP -@@ -421,6 +445,8 @@ source "drivers/Kconfig" +@@ -401,6 +410,17 @@ config EFI + allow the kernel to be booted as an EFI application. This + is only useful on systems that have UEFI firmware. + ++config DMI ++ bool "Enable support for SMBIOS (DMI) tables" ++ depends on EFI ++ default y ++ help ++ This enables SMBIOS/DMI feature for systems. ++ ++ This option is only useful on systems that have UEFI firmware. ++ However, even with this option, the resultant kernel should ++ continue to boot on existing non-UEFI platforms. ++ + endmenu + + menu "Userspace binary formats" +@@ -454,6 +474,8 @@ source "drivers/Kconfig" source "drivers/firmware/Kconfig" @@ -1902,10 +2550,10 @@ index fd4e81a..e57b91a 100644 source "arch/arm64/kvm/Kconfig" diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index 2df5e5d..bddd4e3 100644 +index 20901ff..983d72a 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile -@@ -50,6 +50,7 @@ core-y += arch/arm64/kernel/ arch/arm64/mm/ +@@ -49,6 +49,7 @@ core-$(CONFIG_NET) += arch/arm64/net/ core-$(CONFIG_KVM) += arch/arm64/kvm/ core-$(CONFIG_XEN) += arch/arm64/xen/ core-$(CONFIG_CRYPTO) += arch/arm64/crypto/ @@ -1913,213 +2561,271 @@ index 2df5e5d..bddd4e3 100644 libs-y := arch/arm64/lib/ $(libs-y) libs-y += $(LIBGCC) libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/ -diff --git a/arch/arm64/boot/dts/apm-mustang.dts b/arch/arm64/boot/dts/apm-mustang.dts -index b2f5622..f649000 100644 ---- a/arch/arm64/boot/dts/apm-mustang.dts -+++ b/arch/arm64/boot/dts/apm-mustang.dts -@@ -25,6 +25,14 @@ - }; - }; +diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig +index 5562652..a38b02c 100644 +--- a/arch/arm64/crypto/Kconfig ++++ b/arch/arm64/crypto/Kconfig +@@ -27,20 +27,19 @@ config CRYPTO_AES_ARM64_CE + tristate "AES core cipher using ARMv8 Crypto Extensions" + depends on ARM64 && KERNEL_MODE_NEON + select CRYPTO_ALGAPI +- select CRYPTO_AES + + config CRYPTO_AES_ARM64_CE_CCM + tristate "AES in CCM mode using ARMv8 Crypto Extensions" + depends on ARM64 && KERNEL_MODE_NEON + select CRYPTO_ALGAPI +- select CRYPTO_AES ++ select CRYPTO_AES_ARM64_CE + select CRYPTO_AEAD + + config CRYPTO_AES_ARM64_CE_BLK + tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions" + depends on ARM64 && KERNEL_MODE_NEON + select CRYPTO_BLKCIPHER +- select CRYPTO_AES ++ select CRYPTO_AES_ARM64_CE + select CRYPTO_ABLK_HELPER + + config CRYPTO_AES_ARM64_NEON_BLK +diff --git a/arch/arm64/crypto/aes-ce-ccm-glue.c b/arch/arm64/crypto/aes-ce-ccm-glue.c +index 9e6cdde..0ac73b8 100644 +--- a/arch/arm64/crypto/aes-ce-ccm-glue.c ++++ b/arch/arm64/crypto/aes-ce-ccm-glue.c +@@ -16,6 +16,8 @@ + #include <linux/crypto.h> + #include <linux/module.h> -+&pcie0clk { -+ status = "ok"; -+}; ++#include "aes-ce-setkey.h" + -+&pcie0 { -+ status = "ok"; -+}; + static int num_rounds(struct crypto_aes_ctx *ctx) + { + /* +@@ -48,7 +50,7 @@ static int ccm_setkey(struct crypto_aead *tfm, const u8 *in_key, + struct crypto_aes_ctx *ctx = crypto_aead_ctx(tfm); + int ret; + +- ret = crypto_aes_expand_key(ctx, in_key, key_len); ++ ret = ce_aes_expandkey(ctx, in_key, key_len); + if (!ret) + return 0; + +diff --git a/arch/arm64/crypto/aes-ce-cipher.c b/arch/arm64/crypto/aes-ce-cipher.c +index 2075e1a..ce47792 100644 +--- a/arch/arm64/crypto/aes-ce-cipher.c ++++ b/arch/arm64/crypto/aes-ce-cipher.c +@@ -14,6 +14,8 @@ + #include <linux/crypto.h> + #include <linux/module.h> + ++#include "aes-ce-setkey.h" + - &serial0 { - status = "ok"; - }; -diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi -index c0aceef..403197a 100644 ---- a/arch/arm64/boot/dts/apm-storm.dtsi -+++ b/arch/arm64/boot/dts/apm-storm.dtsi -@@ -269,6 +269,171 @@ - enable-mask = <0x2>; - clock-output-names = "rtcclk"; - }; -+ -+ pcie0clk: pcie0clk@1f2bc000 { -+ status = "disabled"; -+ compatible = "apm,xgene-device-clock"; -+ #clock-cells = <1>; -+ clocks = <&socplldiv2 0>; -+ reg = <0x0 0x1f2bc000 0x0 0x1000>; -+ reg-names = "csr-reg"; -+ clock-output-names = "pcie0clk"; -+ }; -+ -+ pcie1clk: pcie1clk@1f2cc000 { -+ status = "disabled"; -+ compatible = "apm,xgene-device-clock"; -+ #clock-cells = <1>; -+ clocks = <&socplldiv2 0>; -+ reg = <0x0 0x1f2cc000 0x0 0x1000>; -+ reg-names = "csr-reg"; -+ clock-output-names = "pcie1clk"; -+ }; -+ -+ pcie2clk: pcie2clk@1f2dc000 { -+ status = "disabled"; -+ compatible = "apm,xgene-device-clock"; -+ #clock-cells = <1>; -+ clocks = <&socplldiv2 0>; -+ reg = <0x0 0x1f2dc000 0x0 0x1000>; -+ reg-names = "csr-reg"; -+ clock-output-names = "pcie2clk"; -+ }; -+ -+ pcie3clk: pcie3clk@1f50c000 { -+ status = "disabled"; -+ compatible = "apm,xgene-device-clock"; -+ #clock-cells = <1>; -+ clocks = <&socplldiv2 0>; -+ reg = <0x0 0x1f50c000 0x0 0x1000>; -+ reg-names = "csr-reg"; -+ clock-output-names = "pcie3clk"; -+ }; -+ -+ pcie4clk: pcie4clk@1f51c000 { -+ status = "disabled"; -+ compatible = "apm,xgene-device-clock"; -+ #clock-cells = <1>; -+ clocks = <&socplldiv2 0>; -+ reg = <0x0 0x1f51c000 0x0 0x1000>; -+ reg-names = "csr-reg"; -+ clock-output-names = "pcie4clk"; -+ }; -+ }; -+ -+ pcie0: pcie@1f2b0000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f2b0000 0x0 0x00010000 /* Controller registers */ -+ 0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000 /* io */ -+ 0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>; -+ dma-coherent; -+ clocks = <&pcie0clk 0>; -+ }; -+ -+ pcie1: pcie@1f2c0000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f2c0000 0x0 0x00010000 /* Controller registers */ -+ 0xd0 0xd0000000 0x0 0x00040000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x0 0x00000000 0xd0 0x10000000 0x00 0x00010000 /* io */ -+ 0x02000000 0x0 0x80000000 0xd1 0x80000000 0x00 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc8 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xc9 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xca 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xcb 0x1>; -+ dma-coherent; -+ clocks = <&pcie1clk 0>; -+ }; -+ -+ pcie2: pcie@1f2d0000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f2d0000 0x0 0x00010000 /* Controller registers */ -+ 0x90 0xd0000000 0x0 0x00040000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x0 0x00000000 0x90 0x10000000 0x0 0x00010000 /* io */ -+ 0x02000000 0x0 0x80000000 0x91 0x80000000 0x0 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xce 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xcf 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xd0 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xd1 0x1>; -+ dma-coherent; -+ clocks = <&pcie2clk 0>; -+ }; -+ -+ pcie3: pcie@1f500000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f500000 0x0 0x00010000 /* Controller registers */ -+ 0xa0 0xd0000000 0x0 0x00040000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x0 0x00000000 0xa0 0x10000000 0x0 0x00010000 /* io */ -+ 0x02000000 0x0 0x80000000 0xa1 0x80000000 0x0 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xd4 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xd5 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xd6 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xd7 0x1>; -+ dma-coherent; -+ clocks = <&pcie3clk 0>; -+ }; -+ -+ pcie4: pcie@1f510000 { -+ status = "disabled"; -+ device_type = "pci"; -+ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; -+ #interrupt-cells = <1>; -+ #size-cells = <2>; -+ #address-cells = <3>; -+ reg = < 0x00 0x1f510000 0x0 0x00010000 /* Controller registers */ -+ 0xc0 0xd0000000 0x0 0x00200000>; /* PCI config space */ -+ reg-names = "csr", "cfg"; -+ ranges = <0x01000000 0x0 0x00000000 0xc0 0x10000000 0x0 0x00010000 /* io */ -+ 0x02000000 0x0 0x80000000 0xc1 0x80000000 0x0 0x80000000>; /* mem */ -+ dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000 -+ 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>; -+ interrupt-map-mask = <0x0 0x0 0x0 0x7>; -+ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xda 0x1 -+ 0x0 0x0 0x0 0x2 &gic 0x0 0xdb 0x1 -+ 0x0 0x0 0x0 0x3 &gic 0x0 0xdc 0x1 -+ 0x0 0x0 0x0 0x4 &gic 0x0 0xdd 0x1>; -+ dma-coherent; -+ clocks = <&pcie4clk 0>; - }; - - serial0: serial@1c020000 { -diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild -index 0b3fcf8..07cb417 100644 ---- a/arch/arm64/include/asm/Kbuild -+++ b/arch/arm64/include/asm/Kbuild -@@ -29,6 +29,7 @@ generic-y += mman.h - generic-y += msgbuf.h - generic-y += mutex.h - generic-y += pci.h -+generic-y += pci-bridge.h - generic-y += poll.h - generic-y += preempt.h - generic-y += resource.h + MODULE_DESCRIPTION("Synchronous AES cipher using ARMv8 Crypto Extensions"); + MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); + MODULE_LICENSE("GPL v2"); +@@ -124,6 +126,114 @@ static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) + kernel_neon_end(); + } + ++/* ++ * aes_sub() - use the aese instruction to perform the AES sbox substitution ++ * on each byte in 'input' ++ */ ++static u32 aes_sub(u32 input) ++{ ++ u32 ret; ++ ++ __asm__("dup v1.4s, %w[in] ;" ++ "movi v0.16b, #0 ;" ++ "aese v0.16b, v1.16b ;" ++ "umov %w[out], v0.4s[0] ;" ++ ++ : [out] "=r"(ret) ++ : [in] "r"(input) ++ : "v0","v1"); ++ ++ return ret; ++} ++ ++int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, ++ unsigned int key_len) ++{ ++ /* ++ * The AES key schedule round constants ++ */ ++ static u8 const rcon[] = { ++ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, ++ }; ++ ++ u32 kwords = key_len / sizeof(u32); ++ struct aes_block *key_enc, *key_dec; ++ int i, j; ++ ++ if (key_len != AES_KEYSIZE_128 && ++ key_len != AES_KEYSIZE_192 && ++ key_len != AES_KEYSIZE_256) ++ return -EINVAL; ++ ++ memcpy(ctx->key_enc, in_key, key_len); ++ ctx->key_length = key_len; ++ ++ kernel_neon_begin_partial(2); ++ for (i = 0; i < sizeof(rcon); i++) { ++ u32 *rki = ctx->key_enc + (i * kwords); ++ u32 *rko = rki + kwords; ++ ++ rko[0] = ror32(aes_sub(rki[kwords - 1]), 8) ^ rcon[i] ^ rki[0]; ++ rko[1] = rko[0] ^ rki[1]; ++ rko[2] = rko[1] ^ rki[2]; ++ rko[3] = rko[2] ^ rki[3]; ++ ++ if (key_len == AES_KEYSIZE_192) { ++ if (i >= 7) ++ break; ++ rko[4] = rko[3] ^ rki[4]; ++ rko[5] = rko[4] ^ rki[5]; ++ } else if (key_len == AES_KEYSIZE_256) { ++ if (i >= 6) ++ break; ++ rko[4] = aes_sub(rko[3]) ^ rki[4]; ++ rko[5] = rko[4] ^ rki[5]; ++ rko[6] = rko[5] ^ rki[6]; ++ rko[7] = rko[6] ^ rki[7]; ++ } ++ } ++ ++ /* ++ * Generate the decryption keys for the Equivalent Inverse Cipher. ++ * This involves reversing the order of the round keys, and applying ++ * the Inverse Mix Columns transformation on all but the first and ++ * the last one. ++ */ ++ key_enc = (struct aes_block *)ctx->key_enc; ++ key_dec = (struct aes_block *)ctx->key_dec; ++ j = num_rounds(ctx); ++ ++ key_dec[0] = key_enc[j]; ++ for (i = 1, j--; j > 0; i++, j--) ++ __asm__("ld1 {v0.16b}, %[in] ;" ++ "aesimc v1.16b, v0.16b ;" ++ "st1 {v1.16b}, %[out] ;" ++ ++ : [out] "=Q"(key_dec[i]) ++ : [in] "Q"(key_enc[j]) ++ : "v0","v1"); ++ key_dec[i] = key_enc[0]; ++ ++ kernel_neon_end(); ++ return 0; ++} ++EXPORT_SYMBOL(ce_aes_expandkey); ++ ++int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, ++ unsigned int key_len) ++{ ++ struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); ++ int ret; ++ ++ ret = ce_aes_expandkey(ctx, in_key, key_len); ++ if (!ret) ++ return 0; ++ ++ tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; ++ return -EINVAL; ++} ++EXPORT_SYMBOL(ce_aes_setkey); ++ + static struct crypto_alg aes_alg = { + .cra_name = "aes", + .cra_driver_name = "aes-ce", +@@ -135,7 +245,7 @@ static struct crypto_alg aes_alg = { + .cra_cipher = { + .cia_min_keysize = AES_MIN_KEY_SIZE, + .cia_max_keysize = AES_MAX_KEY_SIZE, +- .cia_setkey = crypto_aes_set_key, ++ .cia_setkey = ce_aes_setkey, + .cia_encrypt = aes_cipher_encrypt, + .cia_decrypt = aes_cipher_decrypt + } +diff --git a/arch/arm64/crypto/aes-ce-setkey.h b/arch/arm64/crypto/aes-ce-setkey.h +new file mode 100644 +index 0000000..f08a647 +--- /dev/null ++++ b/arch/arm64/crypto/aes-ce-setkey.h +@@ -0,0 +1,5 @@ ++ ++int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, ++ unsigned int key_len); ++int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key, ++ unsigned int key_len); +diff --git a/arch/arm64/crypto/aes-glue.c b/arch/arm64/crypto/aes-glue.c +index 79cd911..801aae3 100644 +--- a/arch/arm64/crypto/aes-glue.c ++++ b/arch/arm64/crypto/aes-glue.c +@@ -16,9 +16,13 @@ + #include <linux/module.h> + #include <linux/cpufeature.h> + ++#include "aes-ce-setkey.h" ++ + #ifdef USE_V8_CRYPTO_EXTENSIONS + #define MODE "ce" + #define PRIO 300 ++#define aes_setkey ce_aes_setkey ++#define aes_expandkey ce_aes_expandkey + #define aes_ecb_encrypt ce_aes_ecb_encrypt + #define aes_ecb_decrypt ce_aes_ecb_decrypt + #define aes_cbc_encrypt ce_aes_cbc_encrypt +@@ -30,6 +34,8 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); + #else + #define MODE "neon" + #define PRIO 200 ++#define aes_setkey crypto_aes_set_key ++#define aes_expandkey crypto_aes_expand_key + #define aes_ecb_encrypt neon_aes_ecb_encrypt + #define aes_ecb_decrypt neon_aes_ecb_decrypt + #define aes_cbc_encrypt neon_aes_cbc_encrypt +@@ -79,10 +85,10 @@ static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, + struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); + int ret; + +- ret = crypto_aes_expand_key(&ctx->key1, in_key, key_len / 2); ++ ret = aes_expandkey(&ctx->key1, in_key, key_len / 2); + if (!ret) +- ret = crypto_aes_expand_key(&ctx->key2, &in_key[key_len / 2], +- key_len / 2); ++ ret = aes_expandkey(&ctx->key2, &in_key[key_len / 2], ++ key_len / 2); + if (!ret) + return 0; + +@@ -288,7 +294,7 @@ static struct crypto_alg aes_algs[] = { { + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, +- .setkey = crypto_aes_set_key, ++ .setkey = aes_setkey, + .encrypt = ecb_encrypt, + .decrypt = ecb_decrypt, + }, +@@ -306,7 +312,7 @@ static struct crypto_alg aes_algs[] = { { + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, +- .setkey = crypto_aes_set_key, ++ .setkey = aes_setkey, + .encrypt = cbc_encrypt, + .decrypt = cbc_decrypt, + }, +@@ -324,7 +330,7 @@ static struct crypto_alg aes_algs[] = { { + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, +- .setkey = crypto_aes_set_key, ++ .setkey = aes_setkey, + .encrypt = ctr_encrypt, + .decrypt = ctr_encrypt, + }, diff --git a/arch/arm64/include/asm/acenv.h b/arch/arm64/include/asm/acenv.h new file mode 100644 index 0000000..b49166f @@ -2146,10 +2852,10 @@ index 0000000..b49166f +#endif /* _ASM_ACENV_H */ diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h new file mode 100644 -index 0000000..7f6cd91 +index 0000000..6e692f4 --- /dev/null +++ b/arch/arm64/include/asm/acpi.h -@@ -0,0 +1,99 @@ +@@ -0,0 +1,102 @@ +/* + * Copyright (C) 2013-2014, Linaro Ltd. + * Author: Al Stone <al.stone@linaro.org> @@ -2192,23 +2898,27 @@ index 0000000..7f6cd91 + acpi_noirq = 1; +} + -+/* MPIDR value provided in GICC structure is 64 bits, but -+ * the acpi processor driver use the 32 bits cpu hardware -+ * ID (apic_id on intel platform) everywhere, it is pretty -+ * hard to modify the acpi processor driver to accept the -+ * 64 bits MPIDR value, at the same time, only 32 bits of -+ * the MPIDR is used in the 64 bits MPIDR, just pack the -+ * Affx fields into a single 32 bit identifier to accommodate -+ * the acpi processor drivers. ++static inline void enable_acpi(void) ++{ ++ acpi_disabled = 0; ++ acpi_pci_disabled = 0; ++ acpi_noirq = 0; ++} ++ ++/* MPIDR value provided in GICC structure is 64 bits, but the ++ * existing apic_id (CPU hardware ID) using in acpi processor ++ * driver is 32-bit, to conform to the same datatype we need ++ * to repack the GICC structure MPIDR. ++ * ++ * Only 32 bits of MPIDR are used: ++ * ++ * Bits [0:7] Aff0; ++ * Bits [8:15] Aff1; ++ * Bits [16:23] Aff2; ++ * Bits [32:39] Aff3; + */ -+static inline u32 pack_mpidr_into_32_bits(u64 mpidr) ++static inline u32 pack_mpidr(u64 mpidr) +{ -+ /* -+ * Bits [0:7] Aff0; -+ * Bits [8:15] Aff1; -+ * Bits [16:23] Aff2; -+ * Bits [32:39] Aff3; -+ */ + return (u32) ((mpidr & 0xff00000000) >> 8) | mpidr; +} + @@ -2220,7 +2930,7 @@ index 0000000..7f6cd91 + * cpu_logical_map(cpu) is the mapping of MPIDR and the logical cpu, + * and MPIDR is the cpu hardware ID we needed to pack. + */ -+#define cpu_physical_id(cpu) pack_mpidr_into_32_bits(cpu_logical_map(cpu)) ++#define cpu_physical_id(cpu) pack_mpidr(cpu_logical_map(cpu)) + +/* + * It's used from ACPI core in kdump to boot UP system with SMP kernel, @@ -2240,29 +2950,161 @@ index 0000000..7f6cd91 +extern int acpi_get_cpu_parked_address(int cpu, u64 *addr); + +#else -+ ++static inline void disable_acpi(void) { } +static inline bool acpi_psci_present(void) { return false; } +static inline bool acpi_psci_use_hvc(void) { return false; } +static inline void acpi_smp_init_cpus(void) { } +static inline int acpi_get_cpu_parked_address(int cpu, u64 *addr) { return -EOPNOTSUPP; } -+ +#endif /* CONFIG_ACPI */ + +#endif /*_ASM_ACPI_H*/ +diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h +index ddb9d78..89e397b 100644 +--- a/arch/arm64/include/asm/cmpxchg.h ++++ b/arch/arm64/include/asm/cmpxchg.h +@@ -19,6 +19,7 @@ + #define __ASM_CMPXCHG_H + + #include <linux/bug.h> ++#include <linux/mmdebug.h> + + #include <asm/barrier.h> + +@@ -152,6 +153,51 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, + return oldval; + } + ++#define system_has_cmpxchg_double() 1 ++ ++static inline int __cmpxchg_double(volatile void *ptr1, volatile void *ptr2, ++ unsigned long old1, unsigned long old2, ++ unsigned long new1, unsigned long new2, int size) ++{ ++ unsigned long loop, lost; ++ ++ switch (size) { ++ case 8: ++ VM_BUG_ON((unsigned long *)ptr2 - (unsigned long *)ptr1 != 1); ++ do { ++ asm volatile("// __cmpxchg_double8\n" ++ " ldxp %0, %1, %2\n" ++ " eor %0, %0, %3\n" ++ " eor %1, %1, %4\n" ++ " orr %1, %0, %1\n" ++ " mov %w0, #0\n" ++ " cbnz %1, 1f\n" ++ " stxp %w0, %5, %6, %2\n" ++ "1:\n" ++ : "=&r"(loop), "=&r"(lost), "+Q" (*(u64 *)ptr1) ++ : "r" (old1), "r"(old2), "r"(new1), "r"(new2)); ++ } while (loop); ++ break; ++ default: ++ BUILD_BUG(); ++ } ++ ++ return !lost; ++} ++ ++static inline int __cmpxchg_double_mb(volatile void *ptr1, volatile void *ptr2, ++ unsigned long old1, unsigned long old2, ++ unsigned long new1, unsigned long new2, int size) ++{ ++ int ret; ++ ++ smp_mb(); ++ ret = __cmpxchg_double(ptr1, ptr2, old1, old2, new1, new2, size); ++ smp_mb(); ++ ++ return ret; ++} ++ + static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, + unsigned long new, int size) + { +@@ -182,6 +228,31 @@ static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, + __ret; \ + }) + ++#define cmpxchg_double(ptr1, ptr2, o1, o2, n1, n2) \ ++({\ ++ int __ret;\ ++ __ret = __cmpxchg_double_mb((ptr1), (ptr2), (unsigned long)(o1), \ ++ (unsigned long)(o2), (unsigned long)(n1), \ ++ (unsigned long)(n2), sizeof(*(ptr1)));\ ++ __ret; \ ++}) ++ ++#define cmpxchg_double_local(ptr1, ptr2, o1, o2, n1, n2) \ ++({\ ++ int __ret;\ ++ __ret = __cmpxchg_double((ptr1), (ptr2), (unsigned long)(o1), \ ++ (unsigned long)(o2), (unsigned long)(n1), \ ++ (unsigned long)(n2), sizeof(*(ptr1)));\ ++ __ret; \ ++}) ++ ++#define this_cpu_cmpxchg_8(ptr, o, n) \ ++ cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n) ++ ++#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2) \ ++ cmpxchg_double_local(raw_cpu_ptr(&(ptr1)), raw_cpu_ptr(&(ptr2)), \ ++ o1, o2, n1, n2) ++ + #define cmpxchg64(ptr,o,n) cmpxchg((ptr),(o),(n)) + #define cmpxchg64_local(ptr,o,n) cmpxchg_local((ptr),(o),(n)) + diff --git a/arch/arm64/include/asm/cpu_ops.h b/arch/arm64/include/asm/cpu_ops.h -index d7b4b38..d149580 100644 +index 6f8e2ef..978f567 100644 --- a/arch/arm64/include/asm/cpu_ops.h +++ b/arch/arm64/include/asm/cpu_ops.h -@@ -61,6 +61,7 @@ struct cpu_operations { +@@ -64,6 +64,7 @@ struct cpu_operations { }; extern const struct cpu_operations *cpu_ops[NR_CPUS]; +const struct cpu_operations *cpu_get_ops(const char *name); - extern int __init cpu_read_ops(struct device_node *dn, int cpu); - extern void __init cpu_read_bootcpu_ops(void); + int __init cpu_read_ops(struct device_node *dn, int cpu); + void __init cpu_read_bootcpu_ops(void); +diff --git a/arch/arm64/include/asm/dmi.h b/arch/arm64/include/asm/dmi.h +new file mode 100644 +index 0000000..69d37d8 +--- /dev/null ++++ b/arch/arm64/include/asm/dmi.h +@@ -0,0 +1,31 @@ ++/* ++ * arch/arm64/include/asm/dmi.h ++ * ++ * Copyright (C) 2013 Linaro Limited. ++ * Written by: Yi Li (yi.li@linaro.org) ++ * ++ * based on arch/ia64/include/asm/dmi.h ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ */ ++ ++#ifndef __ASM_DMI_H ++#define __ASM_DMI_H ++ ++#include <linux/io.h> ++#include <linux/slab.h> ++ ++/* ++ * According to section 2.3.6 of the UEFI spec, the firmware should not ++ * request a virtual mapping for configuration tables such as SMBIOS. ++ * This means we have to map them before use. ++ */ ++#define dmi_early_remap(x, l) ioremap_cache(x, l) ++#define dmi_early_unmap(x, l) iounmap(x) ++#define dmi_remap(x, l) ioremap_cache(x, l) ++#define dmi_unmap(x) iounmap(x) ++#define dmi_alloc(l) kzalloc(l, GFP_KERNEL) ++ ++#endif diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h -index 01d3aab..8186df6 100644 +index 1f65be3..c0f89a0 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -114,7 +114,8 @@ typedef struct user_fpsimd_state elf_fpregset_t; @@ -2275,222 +3117,130 @@ index 01d3aab..8186df6 100644 #define CORE_DUMP_USE_REGSET #define ELF_EXEC_PAGESIZE PAGE_SIZE -diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h -index e0ecdcf..f998d90 100644 ---- a/arch/arm64/include/asm/io.h -+++ b/arch/arm64/include/asm/io.h -@@ -121,7 +121,8 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) - /* - * I/O port access primitives. - */ --#define IO_SPACE_LIMIT 0xffff -+#define arch_has_dev_port() (1) -+#define IO_SPACE_LIMIT (SZ_32M - 1) - #define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_32M)) - - static inline u8 inb(unsigned long addr) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h -index cc83520..ff4a4fa 100644 +index 7fd3e27..8afb863 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h -@@ -95,7 +95,6 @@ - /* TCR_EL2 Registers bits */ - #define TCR_EL2_TBI (1 << 20) - #define TCR_EL2_PS (7 << 16) --#define TCR_EL2_PS_40B (2 << 16) - #define TCR_EL2_TG0 (1 << 14) - #define TCR_EL2_SH0 (3 << 12) - #define TCR_EL2_ORGN0 (3 << 10) -@@ -104,8 +103,6 @@ - #define TCR_EL2_MASK (TCR_EL2_TG0 | TCR_EL2_SH0 | \ - TCR_EL2_ORGN0 | TCR_EL2_IRGN0 | TCR_EL2_T0SZ) - --#define TCR_EL2_FLAGS (TCR_EL2_PS_40B) -- - /* VTCR_EL2 Registers bits */ - #define VTCR_EL2_PS_MASK (7 << 16) - #define VTCR_EL2_TG0_MASK (1 << 14) -@@ -120,36 +117,28 @@ - #define VTCR_EL2_SL0_MASK (3 << 6) - #define VTCR_EL2_SL0_LVL1 (1 << 6) - #define VTCR_EL2_T0SZ_MASK 0x3f --#define VTCR_EL2_T0SZ_40B 24 -+#define VTCR_EL2_T0SZ(bits) (64 - (bits)) - - #ifdef CONFIG_ARM64_64K_PAGES - /* - * Stage2 translation configuration: -- * 40bits output (PS = 2) -- * 40bits input (T0SZ = 24) - * 64kB pages (TG0 = 1) - * 2 level page tables (SL = 1) - */ - #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_64K | VTCR_EL2_SH0_INNER | \ - VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ -- VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) --#define VTTBR_X (38 - VTCR_EL2_T0SZ_40B) -+ VTCR_EL2_SL0_LVL1) - #else - /* - * Stage2 translation configuration: -- * 40bits output (PS = 2) -- * 40bits input (T0SZ = 24) - * 4kB pages (TG0 = 0) - * 3 level page tables (SL = 1) - */ - #define VTCR_EL2_FLAGS (VTCR_EL2_TG0_4K | VTCR_EL2_SH0_INNER | \ - VTCR_EL2_ORGN0_WBWA | VTCR_EL2_IRGN0_WBWA | \ -- VTCR_EL2_SL0_LVL1 | VTCR_EL2_T0SZ_40B) --#define VTTBR_X (37 - VTCR_EL2_T0SZ_40B) -+ VTCR_EL2_SL0_LVL1) - #endif +@@ -18,6 +18,7 @@ + #ifndef __ARM64_KVM_ARM_H__ + #define __ARM64_KVM_ARM_H__ --#define VTTBR_BADDR_SHIFT (VTTBR_X - 1) --#define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT) - #define VTTBR_VMID_SHIFT (48LLU) - #define VTTBR_VMID_MASK (0xffLLU << VTTBR_VMID_SHIFT) ++#include <asm/memory.h> + #include <asm/types.h> -diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h -index 8e138c7..1c70b2f 100644 ---- a/arch/arm64/include/asm/kvm_mmu.h -+++ b/arch/arm64/include/asm/kvm_mmu.h -@@ -167,5 +167,80 @@ static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, + /* Hyp Configuration Register (HCR) bits */ +@@ -160,9 +161,9 @@ + #endif - void stage2_flush_vm(struct kvm *kvm); + #define VTTBR_BADDR_SHIFT (VTTBR_X - 1) +-#define VTTBR_BADDR_MASK (((1LLU << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT) +-#define VTTBR_VMID_SHIFT (48LLU) +-#define VTTBR_VMID_MASK (0xffLLU << VTTBR_VMID_SHIFT) ++#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT) ++#define VTTBR_VMID_SHIFT (UL(48)) ++#define VTTBR_VMID_MASK (UL(0xFF) << VTTBR_VMID_SHIFT) + + /* Hyp System Trap Register */ + #define HSTR_EL2_TTEE (1 << 16) +@@ -185,13 +186,13 @@ + + /* Exception Syndrome Register (ESR) bits */ + #define ESR_EL2_EC_SHIFT (26) +-#define ESR_EL2_EC (0x3fU << ESR_EL2_EC_SHIFT) +-#define ESR_EL2_IL (1U << 25) ++#define ESR_EL2_EC (UL(0x3f) << ESR_EL2_EC_SHIFT) ++#define ESR_EL2_IL (UL(1) << 25) + #define ESR_EL2_ISS (ESR_EL2_IL - 1) + #define ESR_EL2_ISV_SHIFT (24) +-#define ESR_EL2_ISV (1U << ESR_EL2_ISV_SHIFT) ++#define ESR_EL2_ISV (UL(1) << ESR_EL2_ISV_SHIFT) + #define ESR_EL2_SAS_SHIFT (22) +-#define ESR_EL2_SAS (3U << ESR_EL2_SAS_SHIFT) ++#define ESR_EL2_SAS (UL(3) << ESR_EL2_SAS_SHIFT) + #define ESR_EL2_SSE (1 << 21) + #define ESR_EL2_SRT_SHIFT (16) + #define ESR_EL2_SRT_MASK (0x1f << ESR_EL2_SRT_SHIFT) +@@ -205,16 +206,16 @@ + #define ESR_EL2_FSC_TYPE (0x3c) + + #define ESR_EL2_CV_SHIFT (24) +-#define ESR_EL2_CV (1U << ESR_EL2_CV_SHIFT) ++#define ESR_EL2_CV (UL(1) << ESR_EL2_CV_SHIFT) + #define ESR_EL2_COND_SHIFT (20) +-#define ESR_EL2_COND (0xfU << ESR_EL2_COND_SHIFT) ++#define ESR_EL2_COND (UL(0xf) << ESR_EL2_COND_SHIFT) + + + #define FSC_FAULT (0x04) + #define FSC_PERM (0x0c) + + /* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */ +-#define HPFAR_MASK (~0xFUL) ++#define HPFAR_MASK (~UL(0xf)) + + #define ESR_EL2_EC_UNKNOWN (0x00) + #define ESR_EL2_EC_WFI (0x01) +diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h +index 872ba93..2f287a6 100644 +--- a/arch/arm64/include/asm/pci.h ++++ b/arch/arm64/include/asm/pci.h +@@ -33,5 +33,56 @@ static inline int pci_proc_domain(struct pci_bus *bus) + } + #endif /* CONFIG_PCI */ -+/* -+ * ARMv8 64K architecture limitations: -+ * 16 <= T0SZ <= 21 is valid under 3 level of translation tables -+ * 18 <= T0SZ <= 34 is valid under 2 level of translation tables -+ * 31 <= T0SZ <= 39 is valid under 1 level of transltaion tables -+ * -+ * ARMv8 4K architecture limitations: -+ * 16 <= T0SZ <= 24 is valid under 4 level of translation tables -+ * 21 <= T0SZ <= 33 is valid under 3 level of translation tables -+ * 30 <= T0SZ <= 39 is valid under 2 level of translation tables -+ * -+ * For 4K pages we only support 3 or 4 level, giving T0SZ a range of 16 to 33. -+ * For 64K pages we only support 2 or 3 level, giving T0SZ a range of 16 to 34. -+ * -+ * See Table D4-23 and Table D4-25 in ARM DDI 0487A.b to figure out -+ * the origin of the hardcoded values, 38 and 37. -+ */ ++/* "PCI MMCONFIG %04x [bus %02x-%02x]" */ ++#define PCI_MMCFG_RESOURCE_NAME_LEN (22 + 4 + 2 + 2) + -+#ifdef CONFIG_ARM64_64K_PAGES -+static inline int t0sz_to_vttbr_x(int t0sz) -+{ -+ if (t0sz < 16 || t0sz > 34) { -+ kvm_err("Cannot support %d-bit address space\n", 64 - t0sz); -+ return -EINVAL; -+ } ++#define PCI_MMCFG_BUS_OFFSET(bus) ((bus) << 20) + -+ return 38 - t0sz; -+} -+#else /* 4K pages */ -+static inline int t0sz_to_vttbr_x(int t0sz) -+{ -+ if (t0sz < 16 || t0sz > 33) { -+ kvm_err("Cannot support %d-bit address space\n", 64 - t0sz); -+ return -EINVAL; -+ } -+ return 37 - t0sz; -+} -+#endif -+static inline int kvm_get_phys_addr_shift(void) -+{ -+ int pa_range = read_cpuid(ID_AA64MMFR0_EL1) & 0xf; -+ -+ switch (pa_range) { -+ case 0: return 32; -+ case 1: return 36; -+ case 2: return 40; -+ case 3: return 42; -+ case 4: return 44; -+ case 5: return 48; -+ default: -+ BUG(); -+ return 0; -+ } -+} -+ -+/** -+ * get_vttbr_baddr_mask - get mask value for vttbr base address -+ * -+ * In ARMv8, vttbr_baddr_mask cannot be determined in compile time since the -+ * stage2 input address size depends on hardware capability. Thus, we first -+ * need to read ID_AA64MMFR0_EL1.PARange and then set vttbr_baddr_mask with -+ * consideration of both the granule size and the level of translation tables. -+ */ -+static inline u64 get_vttbr_baddr_mask(void) -+{ -+ int t0sz, vttbr_x; ++struct acpi_device; + -+ t0sz = VTCR_EL2_T0SZ(kvm_get_phys_addr_shift()); -+ vttbr_x = t0sz_to_vttbr_x(t0sz); -+ if (vttbr_x < 0) -+ return ~0; -+ return GENMASK_ULL(48, (vttbr_x - 1)); -+ -+} -+ - #endif /* __ASSEMBLY__ */ - #endif /* __ARM64_KVM_MMU_H__ */ -diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h -new file mode 100644 -index 0000000..872ba93 ---- /dev/null -+++ b/arch/arm64/include/asm/pci.h -@@ -0,0 +1,37 @@ -+#ifndef __ASM_PCI_H -+#define __ASM_PCI_H -+#ifdef __KERNEL__ ++struct pci_sysdata { ++ int domain; /* PCI domain */ ++ int node; /* NUMA node */ ++ struct acpi_device *companion; /* ACPI companion device */ ++ void *iommu; /* IOMMU private data */ ++}; + -+#include <linux/types.h> -+#include <linux/slab.h> -+#include <linux/dma-mapping.h> ++struct acpi_pci_root; ++struct pci_mmcfg_region; + -+#include <asm/io.h> -+#include <asm-generic/pci-bridge.h> -+#include <asm-generic/pci-dma-compat.h> ++typedef int (*acpi_mcfg_fixup_t)(struct acpi_pci_root *root, ++ struct pci_mmcfg_region *cfg); + -+#define PCIBIOS_MIN_IO 0x1000 -+#define PCIBIOS_MIN_MEM 0 ++struct pci_mmcfg_region { ++ struct list_head list; ++ struct resource res; ++ int (*read)(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 *value); ++ int (*write)(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 value); ++ acpi_mcfg_fixup_t fixup; ++ void *data; ++ u64 address; ++ char __iomem *virt; ++ u16 segment; ++ u8 start_bus; ++ u8 end_bus; ++ char name[PCI_MMCFG_RESOURCE_NAME_LEN]; ++}; + -+/* -+ * Set to 1 if the kernel should re-assign all PCI bus numbers -+ */ -+#define pcibios_assign_all_busses() \ -+ (pci_has_flag(PCI_REASSIGN_ALL_BUS)) ++struct acpi_mcfg_fixup { ++ char oem_id[7]; ++ char oem_table_id[9]; ++ acpi_mcfg_fixup_t hook; ++}; + -+/* -+ * PCI address space differs from physical memory address space -+ */ -+#define PCI_DMA_BUS_IS_PHYS (0) ++/* Designate a routine to fix up buggy MCFG */ ++#define DECLARE_ACPI_MCFG_FIXUP(oem_id, table_id, hook) \ ++ static const struct acpi_mcfg_fixup __acpi_fixup_##hook __used \ ++ __attribute__((__section__(".acpi_fixup_mcfg"), aligned((sizeof(void *))))) \ ++ = { {oem_id}, {table_id}, hook }; + -+extern int isa_dma_bridge_buggy; ++extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus); + -+#ifdef CONFIG_PCI -+static inline int pci_proc_domain(struct pci_bus *bus) -+{ -+ return 1; -+} -+#endif /* CONFIG_PCI */ -+ -+#endif /* __KERNEL__ */ -+#endif /* __ASM_PCI_H */ -diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h -index ffe1ba0..a968523 100644 ---- a/arch/arm64/include/asm/pgtable.h -+++ b/arch/arm64/include/asm/pgtable.h -@@ -296,6 +296,8 @@ static inline int has_transparent_hugepage(void) - __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN) - #define pgprot_writecombine(prot) \ - __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) -+#define pgprot_device(prot) \ -+ __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN) - #define __HAVE_PHYS_MEM_ACCESS_PROT - struct file; - extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, + #endif /* __KERNEL__ */ + #endif /* __ASM_PCI_H */ diff --git a/arch/arm64/include/asm/psci.h b/arch/arm64/include/asm/psci.h index e5312ea..2454bc5 100644 --- a/arch/arm64/include/asm/psci.h @@ -2505,7 +3255,7 @@ index e5312ea..2454bc5 100644 #endif /* __ASM_PSCI_H */ diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h -index a498f2c..2ebbd55 100644 +index 780f82c..3411561 100644 --- a/arch/arm64/include/asm/smp.h +++ b/arch/arm64/include/asm/smp.h @@ -39,9 +39,10 @@ extern void show_ipi_list(struct seq_file *p, int prec); @@ -2521,8 +3271,8 @@ index a498f2c..2ebbd55 100644 /* * Provide a function to raise an IPI cross call on CPUs in callmap. -@@ -49,6 +50,11 @@ extern void smp_init_cpus(void); - extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); +@@ -51,6 +52,11 @@ extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); + extern void (*__smp_cross_call)(const struct cpumask *, unsigned int); /* + * Provide a function to signal a parked secondary CPU. @@ -2534,7 +3284,7 @@ index a498f2c..2ebbd55 100644 */ asmlinkage void secondary_start_kernel(void); diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile -index df7ef87..b0bad2e 100644 +index 5bd029b..f4ba4fe 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -21,7 +21,8 @@ arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \ @@ -2547,21 +3297,20 @@ index df7ef87..b0bad2e 100644 arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o -@@ -29,6 +30,8 @@ arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o - arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o +@@ -31,6 +32,7 @@ arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o arm64-obj-$(CONFIG_KGDB) += kgdb.o arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o -+arm64-obj-$(CONFIG_PCI) += pci.o + arm64-obj-$(CONFIG_PCI) += pci.o +arm64-obj-$(CONFIG_ACPI) += acpi.o obj-y += $(arm64-obj-y) vdso/ obj-m += $(arm64-obj-m) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c new file mode 100644 -index 0000000..5486426 +index 0000000..06a96be --- /dev/null +++ b/arch/arm64/kernel/acpi.c -@@ -0,0 +1,397 @@ +@@ -0,0 +1,398 @@ +/* + * ARM64 Specific Low-Level ACPI Boot Support + * @@ -2592,10 +3341,8 @@ index 0000000..5486426 +#include <asm/cputype.h> +#include <asm/cpu_ops.h> + -+#define ARM64_ACPI_DISABLED_DEFAULT 1 -+ +int acpi_noirq; /* skip ACPI IRQ initialization */ -+int acpi_disabled = ARM64_ACPI_DISABLED_DEFAULT; ++int acpi_disabled; +EXPORT_SYMBOL(acpi_disabled); + +int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */ @@ -2645,7 +3392,7 @@ index 0000000..5486426 + int cpu; + + if (mpidr == INVALID_HWID) { -+ pr_info("Skip invalid cpu hardware ID\n"); ++ pr_info("Skip MADT cpu entry with invalid MPIDR\n"); + return -EINVAL; + } + @@ -2669,7 +3416,7 @@ index 0000000..5486426 + for_each_possible_cpu(cpu) { + if (cpu_logical_map(cpu) == mpidr) { + pr_err("Firmware bug, duplicate CPU MPIDR: 0x%llx in MADT\n", -+ mpidr); ++ mpidr); + return -EINVAL; + } + } @@ -2677,7 +3424,10 @@ index 0000000..5486426 + /* allocate a logical cpu id for the new comer */ + cpu = cpumask_next_zero(-1, cpu_possible_mask); + } else { -+ /* First GICC entry must be BSP as ACPI spec said */ ++ /* ++ * First GICC entry must be BSP as ACPI spec said ++ * in section 5.2.12.15 ++ */ + if (cpu_logical_map(0) != mpidr) { + pr_err("First GICC entry with MPIDR 0x%llx is not BSP\n", + mpidr); @@ -2833,7 +3583,7 @@ index 0000000..5486426 + /* + * Revision in table header is the FADT Major revision, + * and there is a minor revision of FADT which was introduced -+ * by ACPI 5.1, we only deal with ACPI 5.1 or higher revision ++ * by ACPI 5.1, we only deal with ACPI 5.1 or newer revision + * to get arm boot flags, or we will disable ACPI. + */ + if (table->revision > 5 || @@ -2851,7 +3601,7 @@ index 0000000..5486426 + boot_method = "parking-protocol"; + + if (!boot_method) -+ pr_warn("has no boot support, will not bring up secondary CPUs\n"); ++ pr_warn("No boot method, will not bring up secondary CPUs\n"); + return -EOPNOTSUPP; + } + @@ -2930,9 +3680,9 @@ index 0000000..5486426 + + /* "acpi=off" disables both ACPI table parsing and interpreter */ + if (strcmp(arg, "off") == 0) -+ acpi_disabled = 1; -+ else if (strcmp(arg, "on") == 0) -+ acpi_disabled = 0; ++ disable_acpi(); ++ else if (strcmp(arg, "force") == 0) /* force ACPI to be enabled */ ++ enable_acpi(); + else + return -EINVAL; /* Core will print when we return error */ + @@ -2989,189 +3739,456 @@ index cce9524..1d90f31 100644 { const struct cpu_operations **ops = supported_cpu_ops; -diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c -index 1317fef..d27dd98 100644 ---- a/arch/arm64/kernel/efi-stub.c -+++ b/arch/arm64/kernel/efi-stub.c -@@ -28,20 +28,16 @@ efi_status_t handle_kernel_image(efi_system_table_t *sys_table, - kernel_size = _edata - _text; - if (*image_addr != (dram_base + TEXT_OFFSET)) { - kernel_memsize = kernel_size + (_end - _edata); -- status = efi_relocate_kernel(sys_table, image_addr, -- kernel_size, kernel_memsize, -- dram_base + TEXT_OFFSET, -- PAGE_SIZE); -+ status = efi_low_alloc(sys_table, kernel_memsize + TEXT_OFFSET, -+ SZ_2M, reserve_addr); - if (status != EFI_SUCCESS) { - pr_efi_err(sys_table, "Failed to relocate kernel\n"); - return status; - } -- if (*image_addr != (dram_base + TEXT_OFFSET)) { -- pr_efi_err(sys_table, "Failed to alloc kernel memory\n"); -- efi_free(sys_table, kernel_memsize, *image_addr); -- return EFI_LOAD_ERROR; -- } -- *image_size = kernel_memsize; -+ memcpy((void *)*reserve_addr + TEXT_OFFSET, (void *)*image_addr, -+ kernel_size); -+ *image_addr = *reserve_addr + TEXT_OFFSET; -+ *reserve_size = kernel_memsize + TEXT_OFFSET; - } - +diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S +index d18a449..8ce9b05 100644 +--- a/arch/arm64/kernel/efi-entry.S ++++ b/arch/arm64/kernel/efi-entry.S +@@ -61,7 +61,8 @@ ENTRY(efi_stub_entry) + */ + mov x20, x0 // DTB address + ldr x0, [sp, #16] // relocated _text address +- mov x21, x0 ++ ldr x21, =stext_offset ++ add x21, x0, x21 + /* + * Calculate size of the kernel Image (same for original and copy). diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c -index 03aaa99..6c4de44 100644 +index 95c49eb..f9de195 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c -@@ -479,3 +479,14 @@ err_unmap: +@@ -11,6 +11,7 @@ + * + */ + ++#include <linux/dmi.h> + #include <linux/efi.h> + #include <linux/export.h> + #include <linux/memblock.h> +@@ -112,8 +113,6 @@ static int __init uefi_init(void) + efi.systab->hdr.revision & 0xffff, vendor); + + retval = efi_config_init(NULL); +- if (retval == 0) +- set_bit(EFI_CONFIG_TABLES, &efi.flags); + + out: + early_memunmap(efi.systab, sizeof(efi_system_table_t)); +@@ -125,17 +124,17 @@ out: + */ + static __init int is_reserve_region(efi_memory_desc_t *md) + { +- if (!is_normal_ram(md)) ++ switch (md->type) { ++ case EFI_LOADER_CODE: ++ case EFI_LOADER_DATA: ++ case EFI_BOOT_SERVICES_CODE: ++ case EFI_BOOT_SERVICES_DATA: ++ case EFI_CONVENTIONAL_MEMORY: + return 0; +- +- if (md->attribute & EFI_MEMORY_RUNTIME) +- return 1; +- +- if (md->type == EFI_ACPI_RECLAIM_MEMORY || +- md->type == EFI_RESERVED_TYPE) +- return 1; +- +- return 0; ++ default: ++ break; ++ } ++ return is_normal_ram(md); + } + + static __init void reserve_regions(void) +@@ -471,3 +470,54 @@ err_unmap: return -1; } early_initcall(arm64_enter_virtual_mode); + ++static int __init arm64_dmi_init(void) ++{ ++ /* ++ * On arm64, DMI depends on UEFI, and dmi_scan_machine() needs to ++ * be called early because dmi_id_init(), which is an arch_initcall ++ * itself, depends on dmi_scan_machine() having been called already. ++ */ ++ dmi_scan_machine(); ++ if (dmi_available) ++ dmi_set_dump_stack_arch_desc(); ++ return 0; ++} ++core_initcall(arm64_dmi_init); ++ +/* + * If nothing else is handling pm_power_off, use EFI + * -+ * This is called from a late_initcall after other mechanisms -+ * have had a chance to register a handler. ++ * When Guenter Roeck's power-off handler call chain patches land, ++ * we just need to return true unconditionally. + */ +bool efi_poweroff_required(void) +{ + return pm_power_off == NULL; +} ++ ++static int arm64_efi_restart(struct notifier_block *this, ++ unsigned long mode, void *cmd) ++{ ++ efi_reboot(reboot_mode, cmd); ++ return NOTIFY_DONE; ++} ++ ++static struct notifier_block arm64_efi_restart_nb = { ++ .notifier_call = arm64_efi_restart, ++ .priority = INT_MAX, ++}; ++ ++static int __init arm64_register_efi_restart(void) ++{ ++ int ret = 0; ++ ++ if (efi_enabled(EFI_RUNTIME_SERVICES)) { ++ ret = register_restart_handler(&arm64_efi_restart_nb); ++ if (ret) ++ pr_err("%s: cannot register restart handler, %d\n", ++ __func__, ret); ++ } ++ return ret; ++} ++late_initcall(arm64_register_efi_restart); +diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S +index 38e704e..08cafc5 100644 +--- a/arch/arm64/kernel/entry-ftrace.S ++++ b/arch/arm64/kernel/entry-ftrace.S +@@ -98,8 +98,8 @@ + ENTRY(_mcount) + mcount_enter + +- ldr x0, =ftrace_trace_function +- ldr x2, [x0] ++ adrp x0, ftrace_trace_function ++ ldr x2, [x0, #:lo12:ftrace_trace_function] + adr x0, ftrace_stub + cmp x0, x2 // if (ftrace_trace_function + b.eq skip_ftrace_call // != ftrace_stub) { +@@ -115,14 +115,15 @@ skip_ftrace_call: // return; + mcount_exit // return; + // } + skip_ftrace_call: +- ldr x1, =ftrace_graph_return +- ldr x2, [x1] // if ((ftrace_graph_return +- cmp x0, x2 // != ftrace_stub) +- b.ne ftrace_graph_caller +- +- ldr x1, =ftrace_graph_entry // || (ftrace_graph_entry +- ldr x2, [x1] // != ftrace_graph_entry_stub)) +- ldr x0, =ftrace_graph_entry_stub ++ adrp x1, ftrace_graph_return ++ ldr x2, [x1, #:lo12:ftrace_graph_return] ++ cmp x0, x2 // if ((ftrace_graph_return ++ b.ne ftrace_graph_caller // != ftrace_stub) ++ ++ adrp x1, ftrace_graph_entry // || (ftrace_graph_entry ++ adrp x0, ftrace_graph_entry_stub // != ftrace_graph_entry_stub)) ++ ldr x2, [x1, #:lo12:ftrace_graph_entry] ++ add x0, x0, #:lo12:ftrace_graph_entry_stub + cmp x0, x2 + b.ne ftrace_graph_caller // ftrace_graph_caller(); + diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S -index 8730690..0a6e4f9 100644 +index 0a6e4f9..5a76e3a 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S -@@ -151,7 +151,7 @@ optional_header: - .short 0x20b // PE32+ format - .byte 0x02 // MajorLinkerVersion - .byte 0x14 // MinorLinkerVersion -- .long _edata - stext // SizeOfCode -+ .long _end - stext // SizeOfCode +@@ -132,6 +132,8 @@ efi_head: + #endif + + #ifdef CONFIG_EFI ++ .globl stext_offset ++ .set stext_offset, stext - efi_head + .align 3 + pe_header: + .ascii "PE" +@@ -155,12 +157,12 @@ optional_header: .long 0 // SizeOfInitializedData .long 0 // SizeOfUninitializedData .long efi_stub_entry - efi_head // AddressOfEntryPoint -@@ -169,7 +169,7 @@ extra_header_fields: - .short 0 // MinorSubsystemVersion - .long 0 // Win32VersionValue - -- .long _edata - efi_head // SizeOfImage -+ .long _end - efi_head // SizeOfImage +- .long stext - efi_head // BaseOfCode ++ .long stext_offset // BaseOfCode + + extra_header_fields: + .quad 0 // ImageBase +- .long 0x20 // SectionAlignment +- .long 0x8 // FileAlignment ++ .long 0x1000 // SectionAlignment ++ .long PECOFF_FILE_ALIGNMENT // FileAlignment + .short 0 // MajorOperatingSystemVersion + .short 0 // MinorOperatingSystemVersion + .short 0 // MajorImageVersion +@@ -172,7 +174,7 @@ extra_header_fields: + .long _end - efi_head // SizeOfImage // Everything before the kernel image is considered part of the header - .long stext - efi_head // SizeOfHeaders -@@ -216,7 +216,7 @@ section_table: - .byte 0 +- .long stext - efi_head // SizeOfHeaders ++ .long stext_offset // SizeOfHeaders + .long 0 // CheckSum + .short 0xa // Subsystem (EFI application) + .short 0 // DllCharacteristics +@@ -217,16 +219,24 @@ section_table: .byte 0 .byte 0 // end of 0 padding of section name -- .long _edata - stext // VirtualSize -+ .long _end - stext // VirtualSize - .long stext - efi_head // VirtualAddress + .long _end - stext // VirtualSize +- .long stext - efi_head // VirtualAddress ++ .long stext_offset // VirtualAddress .long _edata - stext // SizeOfRawData - .long stext - efi_head // PointerToRawData -diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c -new file mode 100644 -index 0000000..ce5836c ---- /dev/null -+++ b/arch/arm64/kernel/pci.c -@@ -0,0 +1,70 @@ -+/* -+ * Code borrowed from powerpc/kernel/pci-common.c -+ * -+ * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM -+ * Copyright (C) 2014 ARM Ltd. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * version 2 as published by the Free Software Foundation. -+ * -+ */ +- .long stext - efi_head // PointerToRawData ++ .long stext_offset // PointerToRawData + + .long 0 // PointerToRelocations (0 for executables) + .long 0 // PointerToLineNumbers (0 for executables) + .short 0 // NumberOfRelocations (0 for executables) + .short 0 // NumberOfLineNumbers (0 for executables) + .long 0xe0500020 // Characteristics (section flags) +- .align 5 + -+#include <linux/init.h> -+#include <linux/io.h> -+#include <linux/kernel.h> -+#include <linux/mm.h> -+#include <linux/of_pci.h> -+#include <linux/of_platform.h> -+#include <linux/slab.h> ++ /* ++ * EFI will load stext onwards at the 4k section alignment ++ * described in the PE/COFF header. To ensure that instruction ++ * sequences using an adrp and a :lo12: immediate will function ++ * correctly at this alignment, we must ensure that stext is ++ * placed at a 4k boundary in the Image to begin with. ++ */ ++ .align 12 + #endif + + ENTRY(stext) +diff --git a/arch/arm64/kernel/io.c b/arch/arm64/kernel/io.c +index 7d37ead..354be2a 100644 +--- a/arch/arm64/kernel/io.c ++++ b/arch/arm64/kernel/io.c +@@ -25,12 +25,26 @@ + */ + void __memcpy_fromio(void *to, const volatile void __iomem *from, size_t count) + { +- unsigned char *t = to; +- while (count) { ++ while (count && (!IS_ALIGNED((unsigned long)from, 8) || ++ !IS_ALIGNED((unsigned long)to, 8))) { ++ *(u8 *)to = __raw_readb(from); ++ from++; ++ to++; + count--; +- *t = readb(from); +- t++; ++ } + -+#include <asm/pci-bridge.h> ++ while (count >= 8) { ++ *(u64 *)to = __raw_readq(from); ++ from += 8; ++ to += 8; ++ count -= 8; ++ } + -+/* -+ * Called after each bus is probed, but before its children are examined -+ */ -+void pcibios_fixup_bus(struct pci_bus *bus) ++ while (count) { ++ *(u8 *)to = __raw_readb(from); + from++; ++ to++; ++ count--; + } + } + EXPORT_SYMBOL(__memcpy_fromio); +@@ -40,12 +54,26 @@ EXPORT_SYMBOL(__memcpy_fromio); + */ + void __memcpy_toio(volatile void __iomem *to, const void *from, size_t count) + { +- const unsigned char *f = from; +- while (count) { ++ while (count && (!IS_ALIGNED((unsigned long)to, 8) || ++ !IS_ALIGNED((unsigned long)from, 8))) { ++ __raw_writeb(*(volatile u8 *)from, to); ++ from++; ++ to++; + count--; +- writeb(*f, to); +- f++; ++ } ++ ++ while (count >= 8) { ++ __raw_writeq(*(volatile u64 *)from, to); ++ from += 8; ++ to += 8; ++ count -= 8; ++ } ++ ++ while (count) { ++ __raw_writeb(*(volatile u8 *)from, to); ++ from++; + to++; ++ count--; + } + } + EXPORT_SYMBOL(__memcpy_toio); +@@ -55,10 +83,28 @@ EXPORT_SYMBOL(__memcpy_toio); + */ + void __memset_io(volatile void __iomem *dst, int c, size_t count) + { +- while (count) { ++ u64 qc = (u8)c; ++ ++ qc |= qc << 8; ++ qc |= qc << 16; ++ qc |= qc << 32; ++ ++ while (count && !IS_ALIGNED((unsigned long)dst, 8)) { ++ __raw_writeb(c, dst); ++ dst++; + count--; +- writeb(c, dst); ++ } ++ ++ while (count >= 8) { ++ __raw_writeq(qc, dst); ++ dst += 8; ++ count -= 8; ++ } ++ ++ while (count) { ++ __raw_writeb(c, dst); + dst++; ++ count--; + } + } + EXPORT_SYMBOL(__memset_io); +diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c +index ce5836c..978cd21 100644 +--- a/arch/arm64/kernel/pci.c ++++ b/arch/arm64/kernel/pci.c +@@ -17,6 +17,8 @@ + #include <linux/of_pci.h> + #include <linux/of_platform.h> + #include <linux/slab.h> ++#include <linux/acpi.h> ++#include <linux/pci-acpi.h> + + #include <asm/pci-bridge.h> + +@@ -37,34 +39,99 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, + return res->start; + } + ++int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) +{ -+ /* nothing to do, expected to be removed in the future */ ++ struct pci_sysdata *sd; ++ ++ if (!acpi_disabled) { ++ sd = bridge->bus->sysdata; ++ ACPI_COMPANION_SET(&bridge->dev, sd->companion); ++ } ++ return 0; +} + -+/* -+ * We don't have to worry about legacy ISA devices, so nothing to do here -+ */ -+resource_size_t pcibios_align_resource(void *data, const struct resource *res, -+ resource_size_t size, resource_size_t align) + /* + * Try to assign the IRQ number from DT when adding a new device + */ + int pcibios_add_device(struct pci_dev *dev) + { +- dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); ++ if (acpi_disabled) ++ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); + + return 0; + } + ++void pcibios_add_bus(struct pci_bus *bus) +{ -+ return res->start; ++ if (!acpi_disabled) ++ acpi_pci_add_bus(bus); ++} + +-#ifdef CONFIG_PCI_DOMAINS_GENERIC +-static bool dt_domain_found = false; ++void pcibios_remove_bus(struct pci_bus *bus) ++{ ++ if (!acpi_disabled) ++ acpi_pci_remove_bus(bus); +} + -+/* -+ * Try to assign the IRQ number from DT when adding a new device -+ */ -+int pcibios_add_device(struct pci_dev *dev) ++int pcibios_enable_irq(struct pci_dev *dev) +{ -+ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); ++ if (!acpi_disabled && !pci_dev_msi_enabled(dev)) ++ acpi_pci_irq_enable(dev); ++ return 0; ++} + ++int pcibios_disable_irq(struct pci_dev *dev) ++{ ++ if (!acpi_disabled && !pci_dev_msi_enabled(dev)) ++ acpi_pci_irq_disable(dev); + return 0; +} + ++int pcibios_enable_device(struct pci_dev *dev, int bars) ++{ ++ int err; + ++ err = pci_enable_resources(dev, bars); ++ if (err < 0) ++ return err; ++ ++ if (!pci_dev_msi_enabled(dev)) ++ return pcibios_enable_irq(dev); ++ return 0; ++} + +#ifdef CONFIG_PCI_DOMAINS_GENERIC -+static bool dt_domain_found = false; + void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) + { +- int domain = of_get_pci_domain_nr(parent->of_node); +- +- if (domain >= 0) { +- dt_domain_found = true; +- } else if (dt_domain_found == true) { +- dev_err(parent, "Node %s is missing \"linux,pci-domain\" property in DT\n", +- parent->of_node->full_name); +- return; +- } else { +- domain = pci_get_new_domain_nr(); +- } ++ int domain = -1; + +- bus->domain_nr = domain; ++ if (acpi_disabled) ++ domain = of_get_pci_domain_nr(parent->of_node); ++ else { ++ struct pci_sysdata *sd = bus->sysdata; ++ ++ domain = sd->domain; ++ } ++ if (domain >= 0) ++ bus->domain_nr = domain; + } + #endif + -+void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) ++static int __init pcibios_assign_resources(void) +{ -+ int domain = of_get_pci_domain_nr(parent->of_node); ++ struct pci_bus *root_bus; + -+ if (domain >= 0) { -+ dt_domain_found = true; -+ } else if (dt_domain_found == true) { -+ dev_err(parent, "Node %s is missing \"linux,pci-domain\" property in DT\n", -+ parent->of_node->full_name); -+ return; -+ } else { -+ domain = pci_get_new_domain_nr(); -+ } ++ if (acpi_disabled) ++ return 0; + -+ bus->domain_nr = domain; ++ list_for_each_entry(root_bus, &pci_root_buses, node) { ++ pcibios_resource_survey_bus(root_bus); ++ pci_assign_unassigned_root_bus_resources(root_bus); ++ } ++ return 0; +} -+#endif -diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c -index 29d4869..c0427bc 100644 ---- a/arch/arm64/kernel/process.c -+++ b/arch/arm64/kernel/process.c -@@ -43,6 +43,7 @@ - #include <linux/hw_breakpoint.h> - #include <linux/personality.h> - #include <linux/notifier.h> -+#include <linux/efi.h> - - #include <asm/compat.h> - #include <asm/cacheflush.h> -@@ -182,6 +183,11 @@ void machine_restart(char *cmd) - arm_pm_restart(reboot_mode, cmd); - - /* -+ * If all else fails, try EFI -+ */ -+ efi_reboot(reboot_mode, cmd); -+ -+ /* - * Whoops - the architecture was unable to reboot. - */ - printk("Reboot failed -- System halted\n"); ++/* ++ * fs_initcall comes after subsys_initcall, so we know acpi scan ++ * has run. ++ */ ++fs_initcall(pcibios_assign_resources); diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c -index 5539547..15ba470 100644 +index 663da77..2d0deda 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -15,6 +15,7 @@ @@ -3182,15 +4199,15 @@ index 5539547..15ba470 100644 #include <linux/init.h> #include <linux/of.h> #include <linux/smp.h> -@@ -23,6 +24,7 @@ - #include <linux/delay.h> +@@ -24,6 +25,7 @@ + #include <linux/slab.h> #include <uapi/linux/psci.h> +#include <asm/acpi.h> #include <asm/compiler.h> #include <asm/cpu_ops.h> #include <asm/errno.h> -@@ -231,6 +233,33 @@ static void psci_sys_poweroff(void) +@@ -304,6 +306,33 @@ static void psci_sys_poweroff(void) invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0); } @@ -3224,7 +4241,7 @@ index 5539547..15ba470 100644 /* * PSCI Function IDs for v0.2+ are well defined so use * standard values. -@@ -264,29 +293,7 @@ static int __init psci_0_2_init(struct device_node *np) +@@ -337,29 +366,7 @@ static int __init psci_0_2_init(struct device_node *np) } } @@ -3255,7 +4272,7 @@ index 5539547..15ba470 100644 out_put_node: of_node_put(np); -@@ -339,7 +346,7 @@ static const struct of_device_id psci_of_match[] __initconst = { +@@ -412,7 +419,7 @@ static const struct of_device_id psci_of_match[] __initconst = { {}, }; @@ -3264,7 +4281,7 @@ index 5539547..15ba470 100644 { struct device_node *np; const struct of_device_id *matched_np; -@@ -354,6 +361,29 @@ int __init psci_init(void) +@@ -427,6 +434,29 @@ int __init psci_init(void) return init_fn(np); } @@ -3295,7 +4312,7 @@ index 5539547..15ba470 100644 static int __init cpu_psci_cpu_init(struct device_node *dn, unsigned int cpu) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c -index edb146d..a793a20 100644 +index 2437196..4c7029d 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -43,6 +43,7 @@ @@ -3317,13 +4334,41 @@ index edb146d..a793a20 100644 unsigned int processor_id; EXPORT_SYMBOL(processor_id); -@@ -385,22 +390,34 @@ void __init setup_arch(char **cmdline_p) +@@ -116,12 +121,16 @@ void __init early_print(const char *str, ...) - parse_early_param(); + void __init smp_setup_processor_id(void) + { ++ u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; ++ cpu_logical_map(0) = mpidr; ++ + /* + * clear __my_cpu_offset on boot CPU to avoid hang caused by + * using percpu variable early, for example, lockdep will + * access percpu variable inside lock_release + */ + set_my_cpu_offset(0); ++ pr_info("Booting Linux on physical CPU 0x%lx\n", (unsigned long)mpidr); + } -+ if (acpi_disabled) -+ disable_acpi(); + bool arch_match_cpu_phys_id(int cpu, u64 phys_id) +@@ -312,6 +321,7 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys) + } + + machine_name = of_flat_dt_get_machine_name(); ++ dump_stack_set_arch_desc("%s (DT)", machine_name); + } + + /* +@@ -378,6 +388,8 @@ void __init setup_arch(char **cmdline_p) + + early_ioremap_init(); + ++ disable_acpi(); + + parse_early_param(); + + /* +@@ -389,19 +401,27 @@ void __init setup_arch(char **cmdline_p) efi_init(); arm64_memblock_init(); @@ -3338,9 +4383,6 @@ index edb146d..a793a20 100644 - unflatten_device_tree(); - - psci_init(); -- - cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; -- cpu_read_bootcpu_ops(); + if (acpi_disabled) { + unflatten_device_tree(); + psci_dt_init(); @@ -3352,13 +4394,15 @@ index edb146d..a793a20 100644 + psci_acpi_init(); + acpi_smp_init_cpus(); + } -+ + +- cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; +- cpu_read_bootcpu_ops(); #ifdef CONFIG_SMP - smp_init_cpus(); smp_build_mpidr_hash(); #endif -@@ -413,6 +430,19 @@ void __init setup_arch(char **cmdline_p) +@@ -414,6 +434,19 @@ void __init setup_arch(char **cmdline_p) #endif } @@ -3378,7 +4422,7 @@ index edb146d..a793a20 100644 static int __init arm64_device_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -@@ -505,3 +535,25 @@ const struct seq_operations cpuinfo_op = { +@@ -506,3 +539,25 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show }; @@ -3405,7 +4449,7 @@ index edb146d..a793a20 100644 +} +early_initcall(arm64_console_setup); diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c -index 4743397..4e390ac 100644 +index b06d1d9..2988829 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -321,7 +321,7 @@ void __init smp_prepare_boot_cpu(void) @@ -3533,63 +4577,6 @@ index 0000000..e1153ce + .cpu_prepare = smp_parking_protocol_cpu_prepare, + .cpu_boot = smp_parking_protocol_cpu_boot, +}; -diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c -index 0347d38..4f93c67 100644 ---- a/arch/arm64/kernel/smp_spin_table.c -+++ b/arch/arm64/kernel/smp_spin_table.c -@@ -20,6 +20,7 @@ - #include <linux/init.h> - #include <linux/of.h> - #include <linux/smp.h> -+#include <linux/types.h> - - #include <asm/cacheflush.h> - #include <asm/cpu_ops.h> -@@ -65,12 +66,21 @@ static int smp_spin_table_cpu_init(struct device_node *dn, unsigned int cpu) - - static int smp_spin_table_cpu_prepare(unsigned int cpu) - { -- void **release_addr; -+ __le64 __iomem *release_addr; - - if (!cpu_release_addr[cpu]) - return -ENODEV; - -- release_addr = __va(cpu_release_addr[cpu]); -+ /* -+ * The cpu-release-addr may or may not be inside the linear mapping. -+ * As ioremap_cache will either give us a new mapping or reuse the -+ * existing linear mapping, we can use it to cover both cases. In -+ * either case the memory will be MT_NORMAL. -+ */ -+ release_addr = ioremap_cache(cpu_release_addr[cpu], -+ sizeof(*release_addr)); -+ if (!release_addr) -+ return -ENOMEM; - - /* - * We write the release address as LE regardless of the native -@@ -79,15 +89,17 @@ static int smp_spin_table_cpu_prepare(unsigned int cpu) - * boot-loader's endianess before jumping. This is mandated by - * the boot protocol. - */ -- release_addr[0] = (void *) cpu_to_le64(__pa(secondary_holding_pen)); -- -- __flush_dcache_area(release_addr, sizeof(release_addr[0])); -+ writeq_relaxed(__pa(secondary_holding_pen), release_addr); -+ __flush_dcache_area((__force void *)release_addr, -+ sizeof(*release_addr)); - - /* - * Send an event to wake up the secondary CPU. - */ - sev(); - -+ iounmap(release_addr); -+ - return 0; - } - diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c index 1a7125c..42f9195 100644 --- a/arch/arm64/kernel/time.c @@ -3615,99 +4602,88 @@ index 1a7125c..42f9195 100644 arch_timer_rate = arch_timer_get_rate(); if (!arch_timer_rate) panic("Unable to initialise architected timer.\n"); -diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S -index c319116..fa7e67e 100644 ---- a/arch/arm64/kvm/hyp-init.S -+++ b/arch/arm64/kvm/hyp-init.S -@@ -63,17 +63,21 @@ __do_hyp_init: - mrs x4, tcr_el1 - ldr x5, =TCR_EL2_MASK - and x4, x4, x5 -- ldr x5, =TCR_EL2_FLAGS -- orr x4, x4, x5 -- msr tcr_el2, x4 -- -- ldr x4, =VTCR_EL2_FLAGS +diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S +index edf8715..4596f46 100644 +--- a/arch/arm64/kernel/vmlinux.lds.S ++++ b/arch/arm64/kernel/vmlinux.lds.S +@@ -32,6 +32,22 @@ jiffies = jiffies_64; + *(.hyp.text) \ + VMLINUX_SYMBOL(__hyp_text_end) = .; + ++/* ++ * The size of the PE/COFF section that covers the kernel image, which ++ * runs from stext to _edata, must be a round multiple of the PE/COFF ++ * FileAlignment, which we set to its minimum value of 0x200. 'stext' ++ * itself is 4 KB aligned, so padding out _edata to a 0x200 aligned ++ * boundary should be sufficient. ++ */ ++PECOFF_FILE_ALIGNMENT = 0x200; ++ ++#ifdef CONFIG_EFI ++#define PECOFF_EDATA_PADDING \ ++ .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); } ++#else ++#define PECOFF_EDATA_PADDING ++#endif ++ + SECTIONS + { /* - * Read the PARange bits from ID_AA64MMFR0_EL1 and set the PS bits in -- * VTCR_EL2. -+ * TCR_EL2 and both PS bits and T0SZ bits in VTCR_EL2. - */ - mrs x5, ID_AA64MMFR0_EL1 - bfi x4, x5, #16, #3 -+ msr tcr_el2, x4 -+ -+ ldr x4, =VTCR_EL2_FLAGS -+ bfi x4, x5, #16, #3 -+ and x5, x5, #0xf -+ adr x6, t0sz -+ add x6, x6, x5, lsl #2 -+ ldr w5, [x6] -+ orr x4, x4, x5 - msr vtcr_el2, x4 - - mrs x4, mair_el1 -@@ -113,6 +117,10 @@ target: /* We're now in the trampoline code, switch page tables */ - - /* Hello, World! */ - eret -+ -+t0sz: -+ .word VTCR_EL2_T0SZ(32), VTCR_EL2_T0SZ(36), VTCR_EL2_T0SZ(40) -+ .word VTCR_EL2_T0SZ(42), VTCR_EL2_T0SZ(44), VTCR_EL2_T0SZ(48) - ENDPROC(__kvm_hyp_init) - - .ltorg +@@ -103,6 +119,7 @@ SECTIONS + _data = .; + _sdata = .; + RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE) ++ PECOFF_EDATA_PADDING + _edata = .; + + BSS_SECTION(0, 0, 0) +diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S +index b72aa9f..fbe909f 100644 +--- a/arch/arm64/kvm/hyp.S ++++ b/arch/arm64/kvm/hyp.S +@@ -761,10 +761,10 @@ + .macro activate_traps + ldr x2, [x0, #VCPU_HCR_EL2] + msr hcr_el2, x2 +- ldr x2, =(CPTR_EL2_TTA) ++ mov x2, #CPTR_EL2_TTA + msr cptr_el2, x2 + +- ldr x2, =(1 << 15) // Trap CP15 Cr=15 ++ mov x2, #(1 << 15) // Trap CP15 Cr=15 + msr hstr_el2, x2 + + mrs x2, mdcr_el2 diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c -index 4164c5a..b864a24 100644 +index d920942..705a9ce 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c -@@ -23,10 +23,13 @@ +@@ -23,8 +23,14 @@ + #include <linux/genalloc.h> #include <linux/dma-mapping.h> #include <linux/dma-contiguous.h> - #include <linux/of.h> ++#include <linux/of.h> +#include <linux/of_address.h> - #include <linux/platform_device.h> ++#include <linux/platform_device.h> #include <linux/vmalloc.h> #include <linux/swiotlb.h> - #include <linux/amba/bus.h> ++#include <linux/amba/bus.h> +#include <linux/acpi.h> +#include <linux/pci.h> #include <asm/cacheflush.h> -@@ -319,6 +322,63 @@ static int dma_bus_notifier(struct notifier_block *nb, - if (of_property_read_bool(dev->of_node, "dma-coherent")) - set_dma_ops(dev, &coherent_swiotlb_dma_ops); +@@ -423,10 +429,107 @@ out: + return -ENOMEM; + } -+#ifdef CONFIG_ACPI -+ else if (ACPI_HANDLE(dev)) { -+ acpi_status status; -+ int coherent; -+ -+ /* -+ * Kernel defaults to noncoherent ops but ACPI 5.1 spec says arm64 -+ * defaults to coherent. Set coherent ops if _CCA not found or _CCA -+ * found and non-zero. -+ */ -+ status = acpi_check_coherency(ACPI_HANDLE(dev), &coherent); -+ if (ACPI_FAILURE(status) || coherent) -+ set_dma_ops(dev, &coherent_swiotlb_dma_ops); -+ } -+#endif -+ return NOTIFY_OK; -+} -+ -+static int dma_bus_notifier_pci(struct notifier_block *nb, -+ unsigned long event, void *_dev) ++#ifdef CONFIG_PCI ++static void arm64_of_set_dma_ops(void *_dev) +{ + struct device *dev = _dev; + -+ if (event != BUS_NOTIFY_ADD_DEVICE) -+ return NOTIFY_DONE; -+ + /* -+ * PCI devices won't have an of_node but the bridge will. ++ * PCI devices won't have an ACPI handle but the bridge will. + * Search up the device chain until we find an of_node + * to check. + */ @@ -3717,91 +4693,869 @@ index 4164c5a..b864a24 100644 + set_dma_ops(_dev, &coherent_swiotlb_dma_ops); + break; + } ++ dev = dev->parent; ++ } ++} ++#else ++static inline arm64_of_set_dma_ops(void *_dev) {} ++#endif ++ ++ +#ifdef CONFIG_ACPI ++static void arm64_acpi_set_dma_ops(void *_dev) ++{ ++ struct device *dev = _dev; ++ ++ /* ++ * Kernel defaults to noncoherent ops but ACPI 5.1 spec says arm64 ++ * defaults to coherent. Set coherent ops if _CCA not found or _CCA ++ * found and non-zero. ++ * ++ * PCI devices won't have an of_node but the bridge will. ++ * Search up the device chain until we find an ACPI handle ++ * to check. ++ */ ++ while (dev) { + if (ACPI_HANDLE(dev)) { + acpi_status status; + int coherent; -+ -+ /* -+ * Kernel defaults to noncoherent ops but ACPI 5.1 spec says arm64 -+ * defaults to coherent. Set coherent ops if _CCA not found or _CCA -+ * found and non-zero. -+ */ -+ status = acpi_check_coherency(ACPI_HANDLE(dev), &coherent); -+ if (ACPI_FAILURE(status) || coherent) { -+ set_dma_ops(dev, &coherent_swiotlb_dma_ops); -+ break; -+ } ++ status = acpi_check_coherency(ACPI_HANDLE(dev), ++ &coherent); ++ if (ACPI_FAILURE(status) || coherent) ++ set_dma_ops(_dev, &coherent_swiotlb_dma_ops); ++ break; + } -+#endif + dev = dev->parent; + } ++} ++#else ++static inline arm64_acpi_set_dma_ops(void *_dev) {} ++#endif + - return NOTIFY_OK; - } - -@@ -330,6 +390,10 @@ static struct notifier_block amba_bus_nb = { - .notifier_call = dma_bus_notifier, - }; - ++static int dma_bus_notifier(struct notifier_block *nb, ++ unsigned long event, void *_dev) ++{ ++ if (event != BUS_NOTIFY_ADD_DEVICE) ++ return NOTIFY_DONE; ++ ++ if (acpi_disabled) ++ arm64_of_set_dma_ops(_dev); ++ else ++ arm64_acpi_set_dma_ops(_dev); ++ ++ return NOTIFY_OK; ++} ++ ++#ifdef CONFIG_ACPI ++static struct notifier_block platform_bus_nb = { ++ .notifier_call = dma_bus_notifier, ++}; ++ ++static struct notifier_block amba_bus_nb = { ++ .notifier_call = dma_bus_notifier, ++}; ++#endif ++ ++#ifdef CONFIG_PCI +static struct notifier_block pci_bus_nb = { -+ .notifier_call = dma_bus_notifier_pci, ++ .notifier_call = dma_bus_notifier, +}; ++#endif + - extern int swiotlb_late_init_with_default_size(size_t default_size); - static int __init swiotlb_late_init(void) -@@ -341,6 +405,7 @@ static int __init swiotlb_late_init(void) - */ - bus_register_notifier(&platform_bus_type, &platform_bus_nb); - bus_register_notifier(&amba_bustype, &amba_bus_nb); -+ bus_register_notifier(&pci_bus_type, &pci_bus_nb); + { + size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT); ++ /* ++ * These must be registered before of_platform_populate(). ++ */ ++#ifdef CONFIG_ACPI ++ bus_register_notifier(&platform_bus_type, &platform_bus_nb); ++ bus_register_notifier(&amba_bustype, &amba_bus_nb); ++#endif ++ ++#ifdef CONFIG_PCI ++ bus_register_notifier(&pci_bus_type, &pci_bus_nb); ++#endif ++ dma_ops = &noncoherent_swiotlb_dma_ops; + return swiotlb_late_init_with_default_size(swiotlb_size); diff --git a/arch/arm64/pci/Makefile b/arch/arm64/pci/Makefile new file mode 100644 -index 0000000..b8d5dbd +index 0000000..7038b51 --- /dev/null +++ b/arch/arm64/pci/Makefile -@@ -0,0 +1 @@ +@@ -0,0 +1,2 @@ +obj-y += pci.o ++obj-$(CONFIG_ACPI) += mmconfig.o +diff --git a/arch/arm64/pci/mmconfig.c b/arch/arm64/pci/mmconfig.c +new file mode 100644 +index 0000000..e83e0d5 +--- /dev/null ++++ b/arch/arm64/pci/mmconfig.c +@@ -0,0 +1,292 @@ ++/* ++ * mmconfig.c - Low-level direct PCI config space access via MMCONFIG ++ * ++ * Borrowed heavily from x86 ++ */ ++ ++#include <linux/pci.h> ++#include <linux/acpi.h> ++#include <linux/init.h> ++#include <linux/bitmap.h> ++#include <linux/dmi.h> ++#include <linux/slab.h> ++#include <linux/mutex.h> ++#include <linux/rculist.h> ++#include <linux/rcupdate.h> ++ ++#define PREFIX "PCI: " ++ ++/* Indicate if the mmcfg resources have been placed into the resource table. */ ++static bool pci_mmcfg_running_state; ++static bool pci_mmcfg_arch_init_failed; ++static DEFINE_MUTEX(pci_mmcfg_lock); ++ ++LIST_HEAD(pci_mmcfg_list); ++ ++struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus) ++{ ++ struct pci_mmcfg_region *cfg; ++ ++ list_for_each_entry_rcu(cfg, &pci_mmcfg_list, list) ++ if (cfg->segment == segment && ++ cfg->start_bus <= bus && bus <= cfg->end_bus) ++ return cfg; ++ ++ return NULL; ++} ++ ++static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg) ++{ ++ void __iomem *addr; ++ u64 start, size; ++ int num_buses; ++ ++ start = cfg->address + PCI_MMCFG_BUS_OFFSET(cfg->start_bus); ++ num_buses = cfg->end_bus - cfg->start_bus + 1; ++ size = PCI_MMCFG_BUS_OFFSET(num_buses); ++ addr = ioremap_nocache(start, size); ++ if (addr) ++ addr -= PCI_MMCFG_BUS_OFFSET(cfg->start_bus); ++ return addr; ++} ++ ++void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg) ++{ ++ if (cfg && cfg->virt) { ++ iounmap(cfg->virt + PCI_MMCFG_BUS_OFFSET(cfg->start_bus)); ++ cfg->virt = NULL; ++ } ++} ++ ++void __init pci_mmcfg_arch_free(void) ++{ ++ struct pci_mmcfg_region *cfg; ++ ++ list_for_each_entry(cfg, &pci_mmcfg_list, list) ++ pci_mmcfg_arch_unmap(cfg); ++} ++ ++int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) ++{ ++ cfg->virt = mcfg_ioremap(cfg); ++ if (!cfg->virt) { ++ pr_err(PREFIX "can't map MMCONFIG at %pR\n", &cfg->res); ++ return -ENOMEM; ++ } ++ ++ return 0; ++} ++ ++static void __init pci_mmconfig_remove(struct pci_mmcfg_region *cfg) ++{ ++ if (cfg->res.parent) ++ release_resource(&cfg->res); ++ list_del(&cfg->list); ++ kfree(cfg); ++} ++ ++static void __init free_all_mmcfg(void) ++{ ++ struct pci_mmcfg_region *cfg, *tmp; ++ ++ pci_mmcfg_arch_free(); ++ list_for_each_entry_safe(cfg, tmp, &pci_mmcfg_list, list) ++ pci_mmconfig_remove(cfg); ++} ++ ++static void list_add_sorted(struct pci_mmcfg_region *new) ++{ ++ struct pci_mmcfg_region *cfg; ++ ++ /* keep list sorted by segment and starting bus number */ ++ list_for_each_entry_rcu(cfg, &pci_mmcfg_list, list) { ++ if (cfg->segment > new->segment || ++ (cfg->segment == new->segment && ++ cfg->start_bus >= new->start_bus)) { ++ list_add_tail_rcu(&new->list, &cfg->list); ++ return; ++ } ++ } ++ list_add_tail_rcu(&new->list, &pci_mmcfg_list); ++} ++ ++static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start, ++ int end, u64 addr) ++{ ++ struct pci_mmcfg_region *new; ++ struct resource *res; ++ ++ if (addr == 0) ++ return NULL; ++ ++ new = kzalloc(sizeof(*new), GFP_KERNEL); ++ if (!new) ++ return NULL; ++ ++ new->address = addr; ++ new->segment = segment; ++ new->start_bus = start; ++ new->end_bus = end; ++ ++ res = &new->res; ++ res->start = addr + PCI_MMCFG_BUS_OFFSET(start); ++ res->end = addr + PCI_MMCFG_BUS_OFFSET(end + 1) - 1; ++ res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; ++ snprintf(new->name, PCI_MMCFG_RESOURCE_NAME_LEN, ++ "PCI MMCONFIG %04x [bus %02x-%02x]", segment, start, end); ++ res->name = new->name; ++ ++ return new; ++} ++ ++static struct pci_mmcfg_region *__init pci_mmconfig_add(int segment, int start, ++ int end, u64 addr) ++{ ++ struct pci_mmcfg_region *new; ++ ++ new = pci_mmconfig_alloc(segment, start, end, addr); ++ if (new) { ++ mutex_lock(&pci_mmcfg_lock); ++ list_add_sorted(new); ++ mutex_unlock(&pci_mmcfg_lock); ++ ++ pr_info(PREFIX ++ "MMCONFIG for domain %04x [bus %02x-%02x] at %pR " ++ "(base %#lx)\n", ++ segment, start, end, &new->res, (unsigned long)addr); ++ } ++ ++ return new; ++} ++ ++extern struct acpi_mcfg_fixup __start_acpi_mcfg_fixups[]; ++extern struct acpi_mcfg_fixup __end_acpi_mcfg_fixups[]; ++ ++static int __init pci_parse_mcfg(struct acpi_table_header *header) ++{ ++ struct acpi_table_mcfg *mcfg; ++ struct acpi_mcfg_allocation *cfg_table, *cfg; ++ struct acpi_mcfg_fixup *fixup; ++ struct pci_mmcfg_region *new; ++ unsigned long i; ++ int entries; ++ ++ if (!header) ++ return -EINVAL; ++ ++ mcfg = (struct acpi_table_mcfg *)header; ++ ++ /* how many config structures do we have */ ++ free_all_mmcfg(); ++ entries = 0; ++ i = header->length - sizeof(struct acpi_table_mcfg); ++ while (i >= sizeof(struct acpi_mcfg_allocation)) { ++ entries++; ++ i -= sizeof(struct acpi_mcfg_allocation); ++ } ++ if (entries == 0) { ++ pr_err(PREFIX "MMCONFIG has no entries\n"); ++ return -ENODEV; ++ } ++ ++ fixup = __start_acpi_mcfg_fixups; ++ while (fixup < __end_acpi_mcfg_fixups) { ++ if (!strncmp(fixup->oem_id, header->oem_id, 6) && ++ !strncmp(fixup->oem_table_id, header->oem_table_id, 8)) ++ break; ++ ++fixup; ++ } ++ ++ cfg_table = (struct acpi_mcfg_allocation *) &mcfg[1]; ++ for (i = 0; i < entries; i++) { ++ cfg = &cfg_table[i]; ++ ++ new = pci_mmconfig_add(cfg->pci_segment, cfg->start_bus_number, ++ cfg->end_bus_number, cfg->address); ++ if (!new) { ++ pr_warn(PREFIX "no memory for MCFG entries\n"); ++ free_all_mmcfg(); ++ return -ENOMEM; ++ } ++ if (fixup < __end_acpi_mcfg_fixups) ++ new->fixup = fixup->hook; ++ } ++ ++ return 0; ++} ++ ++int __init pci_mmcfg_arch_init(void) ++{ ++ struct pci_mmcfg_region *cfg; ++ ++ list_for_each_entry(cfg, &pci_mmcfg_list, list) ++ if (pci_mmcfg_arch_map(cfg)) { ++ pci_mmcfg_arch_free(); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static void __init __pci_mmcfg_init(int early) ++{ ++ if (list_empty(&pci_mmcfg_list)) { ++ pr_info("No MCFG table found!\n"); ++ pci_mmcfg_arch_init_failed = true; ++ return; ++ } ++ ++ if (!pci_mmcfg_arch_init()) { ++ pr_info("pci_mmcfg_arch_init failed!\n"); ++ free_all_mmcfg(); ++ pci_mmcfg_arch_init_failed = true; ++ } ++} ++ ++void __init pci_mmcfg_early_init(void) ++{ ++ acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg); ++ ++ __pci_mmcfg_init(1); ++} ++ ++static int __init pci_mmcfg_init(void) ++{ ++ pci_mmcfg_early_init(); ++ return 0; ++} ++arch_initcall(pci_mmcfg_init); ++ ++void __init pci_mmcfg_late_init(void) ++{ ++ /* MMCONFIG hasn't been enabled yet, try again */ ++ if (pci_mmcfg_arch_init_failed) { ++ acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg); ++ __pci_mmcfg_init(0); ++ } ++} ++ ++static int __init pci_mmcfg_late_insert_resources(void) ++{ ++ struct pci_mmcfg_region *cfg; ++ ++ pci_mmcfg_running_state = true; ++ ++ /* ++ * Attempt to insert the mmcfg resources but not with the busy flag ++ * marked so it won't cause request errors when __request_region is ++ * called. ++ */ ++ list_for_each_entry(cfg, &pci_mmcfg_list, list) ++ if (!cfg->res.parent) ++ insert_resource(&iomem_resource, &cfg->res); ++ ++ return 0; ++} ++ ++/* ++ * Perform MMCONFIG resource insertion after PCI initialization to allow for ++ * misprogrammed MCFG tables that state larger sizes but actually conflict ++ * with other system resources. ++ */ ++late_initcall(pci_mmcfg_late_insert_resources); diff --git a/arch/arm64/pci/pci.c b/arch/arm64/pci/pci.c new file mode 100644 -index 0000000..b03b0eb +index 0000000..0166475 --- /dev/null +++ b/arch/arm64/pci/pci.c -@@ -0,0 +1,28 @@ +@@ -0,0 +1,461 @@ +#include <linux/acpi.h> ++#include <linux/of_address.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/pci.h> + -+/** -+ * raw_pci_read - Platform-specific PCI config space access. -+ * -+ * Default empty implementation. Replace with an architecture-specific setup -+ * routine, if necessary. ++struct pci_root_info { ++ struct acpi_device *bridge; ++ char name[16]; ++ unsigned int res_num; ++ struct resource *res; ++ resource_size_t *res_offset; ++ struct pci_sysdata sd; ++ u16 segment; ++ u8 start_bus; ++ u8 end_bus; ++}; ++ ++static char __iomem *pci_dev_base(struct pci_mmcfg_region *cfg, ++ unsigned int bus, unsigned int devfn) ++{ ++ return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); ++} ++ ++static int __raw_pci_read(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 *value) ++{ ++ char __iomem *addr = pci_dev_base(cfg, bus, devfn) + (reg & ~3); ++ int shift = (reg & 3) * 8; ++ u32 v; ++ ++ v = readl(addr) >> shift; ++ switch (len) { ++ case 1: ++ *value = v & 0xff; ++ break; ++ case 2: ++ *value = v & 0xffff; ++ break; ++ case 4: ++ *value = v; ++ break; ++ } ++ return 0; ++} ++ ++static int __raw_pci_write(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 value) ++{ ++ char __iomem *addr = pci_dev_base(cfg, bus, devfn) + (reg & ~3); ++ int mask = 0, shift = (reg & 3) * 8; ++ u32 v; ++ ++ switch (len) { ++ case 1: ++ mask = 0xff << shift; ++ break; ++ case 2: ++ mask = 0xffff << shift; ++ break; ++ } ++ ++ if (mask) { ++ v = readl(addr) & ~mask; ++ writel(v | (value << shift), addr); ++ } else ++ writel(value, addr); ++ ++ return 0; ++} ++ ++/* ++ * raw_pci_read/write - Platform-specific PCI config space access. + */ -+int __weak raw_pci_read(unsigned int domain, unsigned int bus, -+ unsigned int devfn, int reg, int len, u32 *val) ++int raw_pci_read(unsigned int domain, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 *val) +{ -+ return -EINVAL; ++ struct pci_mmcfg_region *cfg; ++ int ret; ++ ++ if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { ++err: *val = -1; ++ return -EINVAL; ++ } ++ ++ rcu_read_lock(); ++ cfg = pci_mmconfig_lookup(domain, bus); ++ if (!cfg || !cfg->virt) { ++ rcu_read_unlock(); ++ goto err; ++ } ++ ++ if (cfg->read) ++ ret = (*cfg->read)(cfg, bus, devfn, reg, len, val); ++ else ++ ret = __raw_pci_read(cfg, bus, devfn, reg, len, val); ++ ++ rcu_read_unlock(); ++ ++ return ret; +} + -+int __weak raw_pci_write(unsigned int domain, unsigned int bus, -+ unsigned int devfn, int reg, int len, u32 val) ++int raw_pci_write(unsigned int domain, unsigned int bus, ++ unsigned int devfn, int reg, int len, u32 val) +{ -+ return -EINVAL; ++ struct pci_mmcfg_region *cfg; ++ int ret; ++ ++ if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) ++ return -EINVAL; ++ ++ rcu_read_lock(); ++ cfg = pci_mmconfig_lookup(domain, bus); ++ if (!cfg || !cfg->virt) { ++ rcu_read_unlock(); ++ return -EINVAL; ++ } ++ ++ if (cfg->write) ++ ret = (*cfg->write)(cfg, bus, devfn, reg, len, val); ++ else ++ ret = __raw_pci_write(cfg, bus, devfn, reg, len, val); ++ ++ rcu_read_unlock(); ++ ++ return ret; ++} ++ ++#ifdef CONFIG_ACPI ++static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, ++ int size, u32 *value) ++{ ++ return raw_pci_read(pci_domain_nr(bus), bus->number, ++ devfn, where, size, value); ++} ++ ++static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, ++ int size, u32 value) ++{ ++ return raw_pci_write(pci_domain_nr(bus), bus->number, ++ devfn, where, size, value); ++} ++ ++struct pci_ops pci_root_ops = { ++ .read = pci_read, ++ .write = pci_write, ++}; ++ ++static acpi_status resource_to_addr(struct acpi_resource *resource, ++ struct acpi_resource_address64 *addr) ++{ ++ acpi_status status; ++ ++ memset(addr, 0, sizeof(*addr)); ++ switch (resource->type) { ++ case ACPI_RESOURCE_TYPE_ADDRESS16: ++ case ACPI_RESOURCE_TYPE_ADDRESS32: ++ case ACPI_RESOURCE_TYPE_ADDRESS64: ++ status = acpi_resource_to_address64(resource, addr); ++ if (ACPI_SUCCESS(status) && ++ (addr->resource_type == ACPI_MEMORY_RANGE || ++ addr->resource_type == ACPI_IO_RANGE) && ++ addr->address_length > 0) { ++ return AE_OK; ++ } ++ break; ++ } ++ return AE_ERROR; ++} ++ ++static acpi_status count_resource(struct acpi_resource *acpi_res, void *data) ++{ ++ struct pci_root_info *info = data; ++ struct acpi_resource_address64 addr; ++ acpi_status status; ++ ++ status = resource_to_addr(acpi_res, &addr); ++ if (ACPI_SUCCESS(status)) ++ info->res_num++; ++ return AE_OK; ++} ++ ++static acpi_status setup_resource(struct acpi_resource *acpi_res, void *data) ++{ ++ struct pci_root_info *info = data; ++ struct resource *res; ++ struct acpi_resource_address64 addr; ++ acpi_status status; ++ unsigned long flags; ++ u64 start, end; ++ ++ status = resource_to_addr(acpi_res, &addr); ++ if (!ACPI_SUCCESS(status)) ++ return AE_OK; ++ ++ if (addr.resource_type == ACPI_MEMORY_RANGE) { ++ flags = IORESOURCE_MEM; ++ if (addr.info.mem.caching == ACPI_PREFETCHABLE_MEMORY) ++ flags |= IORESOURCE_PREFETCH; ++ } else if (addr.resource_type == ACPI_IO_RANGE) { ++ flags = IORESOURCE_IO; ++ } else ++ return AE_OK; ++ ++ start = addr.minimum + addr.translation_offset; ++ end = addr.maximum + addr.translation_offset; ++ ++ res = &info->res[info->res_num]; ++ res->name = info->name; ++ res->flags = flags; ++ res->start = start; ++ res->end = end; ++ ++ if (flags & IORESOURCE_IO) { ++ unsigned long port; ++ int err; ++ ++ err = pci_register_io_range(start, addr.address_length); ++ if (err) ++ return AE_OK; ++ ++ port = pci_address_to_pio(start); ++ if (port == (unsigned long)-1) { ++ res->start = -1; ++ res->end = -1; ++ return AE_OK; ++ } ++ ++ res->start = port; ++ res->end = res->start + addr.address_length - 1; ++ ++ if (pci_remap_iospace(res, start) < 0) ++ return AE_OK; ++ ++ info->res_offset[info->res_num] = 0; ++ } else ++ info->res_offset[info->res_num] = addr.translation_offset; ++ ++ info->res_num++; ++ ++ return AE_OK; ++} ++ ++static void coalesce_windows(struct pci_root_info *info, unsigned long type) ++{ ++ int i, j; ++ struct resource *res1, *res2; ++ ++ for (i = 0; i < info->res_num; i++) { ++ res1 = &info->res[i]; ++ if (!(res1->flags & type)) ++ continue; ++ ++ for (j = i + 1; j < info->res_num; j++) { ++ res2 = &info->res[j]; ++ if (!(res2->flags & type)) ++ continue; ++ ++ /* ++ * I don't like throwing away windows because then ++ * our resources no longer match the ACPI _CRS, but ++ * the kernel resource tree doesn't allow overlaps. ++ */ ++ if (resource_overlaps(res1, res2)) { ++ res2->start = min(res1->start, res2->start); ++ res2->end = max(res1->end, res2->end); ++ dev_info(&info->bridge->dev, ++ "host bridge window expanded to %pR; %pR ignored\n", ++ res2, res1); ++ res1->flags = 0; ++ } ++ } ++ } ++} ++ ++static void add_resources(struct pci_root_info *info, ++ struct list_head *resources) ++{ ++ int i; ++ struct resource *res, *root, *conflict; ++ ++ coalesce_windows(info, IORESOURCE_MEM); ++ coalesce_windows(info, IORESOURCE_IO); ++ ++ for (i = 0; i < info->res_num; i++) { ++ res = &info->res[i]; ++ ++ if (res->flags & IORESOURCE_MEM) ++ root = &iomem_resource; ++ else if (res->flags & IORESOURCE_IO) ++ root = &ioport_resource; ++ else ++ continue; ++ ++ conflict = insert_resource_conflict(root, res); ++ if (conflict) ++ dev_info(&info->bridge->dev, ++ "ignoring host bridge window %pR (conflicts with %s %pR)\n", ++ res, conflict->name, conflict); ++ else ++ pci_add_resource_offset(resources, res, ++ info->res_offset[i]); ++ } ++} ++ ++static void free_pci_root_info_res(struct pci_root_info *info) ++{ ++ kfree(info->res); ++ info->res = NULL; ++ kfree(info->res_offset); ++ info->res_offset = NULL; ++ info->res_num = 0; ++} ++ ++static void __release_pci_root_info(struct pci_root_info *info) ++{ ++ int i; ++ struct resource *res; ++ ++ for (i = 0; i < info->res_num; i++) { ++ res = &info->res[i]; ++ ++ if (!res->parent) ++ continue; ++ ++ if (!(res->flags & (IORESOURCE_MEM | IORESOURCE_IO))) ++ continue; ++ ++ release_resource(res); ++ } ++ ++ free_pci_root_info_res(info); ++ ++ kfree(info); ++} ++ ++static void release_pci_root_info(struct pci_host_bridge *bridge) ++{ ++ struct pci_root_info *info = bridge->release_data; ++ ++ __release_pci_root_info(info); ++} ++ ++static void probe_pci_root_info(struct pci_root_info *info, ++ struct acpi_device *device, ++ int busnum, int domain) ++{ ++ size_t size; ++ ++ sprintf(info->name, "PCI Bus %04x:%02x", domain, busnum); ++ info->bridge = device; ++ ++ info->res_num = 0; ++ acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_resource, ++ info); ++ if (!info->res_num) ++ return; ++ ++ size = sizeof(*info->res) * info->res_num; ++ info->res = kzalloc_node(size, GFP_KERNEL, info->sd.node); ++ if (!info->res) { ++ info->res_num = 0; ++ return; ++ } ++ ++ size = sizeof(*info->res_offset) * info->res_num; ++ info->res_num = 0; ++ info->res_offset = kzalloc_node(size, GFP_KERNEL, info->sd.node); ++ if (!info->res_offset) { ++ kfree(info->res); ++ info->res = NULL; ++ return; ++ } ++ ++ acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, ++ info); +} + +/* Root bridge scanning */ +struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) +{ -+ return NULL; ++ struct acpi_device *device = root->device; ++ struct pci_mmcfg_region *mcfg; ++ struct pci_root_info *info; ++ int domain = root->segment; ++ int busnum = root->secondary.start; ++ LIST_HEAD(resources); ++ struct pci_bus *bus; ++ struct pci_sysdata *sd; ++ int node; ++ ++ /* we need mmconfig */ ++ mcfg = pci_mmconfig_lookup(domain, busnum); ++ if (!mcfg) { ++ pr_err("pci_bus %04x:%02x has no MCFG table\n", ++ domain, busnum); ++ return NULL; ++ } ++ ++ /* temporary hack */ ++ if (mcfg->fixup) ++ (*mcfg->fixup)(root, mcfg); ++ ++ if (domain && !pci_domains_supported) { ++ pr_warn("PCI %04x:%02x: multiple domains not supported.\n", ++ domain, busnum); ++ return NULL; ++ } ++ ++ node = NUMA_NO_NODE; ++ ++ info = kzalloc_node(sizeof(*info), GFP_KERNEL, node); ++ if (!info) { ++ pr_warn("PCI %04x:%02x: ignored (out of memory)\n", ++ domain, busnum); ++ return NULL; ++ } ++ info->segment = domain; ++ info->start_bus = busnum; ++ info->end_bus = root->secondary.end; ++ ++ sd = &info->sd; ++ sd->domain = domain; ++ sd->node = node; ++ sd->companion = device; ++ ++ probe_pci_root_info(info, device, busnum, domain); ++ ++ /* insert busn res at first */ ++ pci_add_resource(&resources, &root->secondary); ++ ++ /* then _CRS resources */ ++ add_resources(info, &resources); ++ ++ bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd, &resources); ++ if (bus) { ++ pci_scan_child_bus(bus); ++ pci_set_host_bridge_release(to_pci_host_bridge(bus->bridge), ++ release_pci_root_info, info); ++ } else { ++ pci_free_resource_list(&resources); ++ __release_pci_root_info(info); ++ } ++ ++ /* After the PCI-E bus has been walked and all devices discovered, ++ * configure any settings of the fabric that might be necessary. ++ */ ++ if (bus) { ++ struct pci_bus *child; ++ ++ list_for_each_entry(child, &bus->children, node) ++ pcie_bus_configure_settings(child); ++ } ++ ++ if (bus && node != NUMA_NO_NODE) ++ dev_printk(KERN_DEBUG, &bus->dev, "on NUMA node %d\n", node); ++ ++ return bus; +} ++ ++#endif /* CONFIG_ACPI */ diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig -index d0f3265..3343080 100644 +index b23fe37..555e226 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -5,8 +5,7 @@ @@ -3832,7 +5586,7 @@ index d0f3265..3343080 100644 help This driver creates entries in /sys/bus/pci/slots/ for all PCI diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile -index 505d4d7..6f3a74d 100644 +index c3b2fcb..5a21476 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,7 +23,11 @@ acpi-y += nvs.o @@ -3856,21 +5610,14 @@ index 505d4d7..6f3a74d 100644 acpi-y += acpi_lpss.o acpi-y += acpi_platform.o acpi-y += acpi_pnp.o -diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c -index 14cb6c0..5cd017c 100644 ---- a/drivers/acpi/acpica/utresrc.c -+++ b/drivers/acpi/acpica/utresrc.c -@@ -87,7 +87,9 @@ const char *acpi_gbl_io_decode[] = { - - const char *acpi_gbl_ll_decode[] = { - "ActiveHigh", -- "ActiveLow" -+ "ActiveLow", -+ "ActiveBoth", -+ "Reserved" - }; - - const char *acpi_gbl_max_decode[] = { +@@ -47,6 +51,7 @@ acpi-y += int340x_thermal.o + acpi-y += power.o + acpi-y += event.o + acpi-y += sysfs.o ++acpi-y += property.o + acpi-$(CONFIG_X86) += acpi_cmos_rtc.o + acpi-$(CONFIG_DEBUG_FS) += debugfs.o + acpi-$(CONFIG_ACPI_NUMA) += numa.o diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 8b67bd0..c412fdb 100644 --- a/drivers/acpi/bus.c @@ -3886,7 +5633,7 @@ index 8b67bd0..c412fdb 100644 message = "platform specific model"; break; diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h -index 4c5cf77..e1e6487 100644 +index 447f6d6..c5ff8ba 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -26,8 +26,13 @@ @@ -3903,11 +5650,22 @@ index 4c5cf77..e1e6487 100644 void acpi_processor_init(void); void acpi_platform_init(void); void acpi_pnp_init(void); +@@ -173,4 +178,10 @@ static inline void suspend_nvs_restore(void) {} + bool acpi_osi_is_win8(void); + #endif + ++/*-------------------------------------------------------------------------- ++ Device properties ++ -------------------------------------------------------------------------- */ ++void acpi_init_properties(struct acpi_device *adev); ++void acpi_free_properties(struct acpi_device *adev); ++ + #endif /* _ACPI_INTERNAL_H_ */ diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c -index 3abe9b2..c50757b 100644 +index 9964f70..5c480d5 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c -@@ -326,11 +326,11 @@ acpi_map_lookup_virt(void __iomem *virt, acpi_size size) +@@ -336,11 +336,11 @@ acpi_map_lookup_virt(void __iomem *virt, acpi_size size) return NULL; } @@ -3923,7 +5681,7 @@ index 3abe9b2..c50757b 100644 static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c -index e32321c..4007313 100644 +index ef58f46..5c84e0d 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -64,6 +64,38 @@ static int map_lsapic_id(struct acpi_subtable_header *entry, @@ -3984,6 +5742,734 @@ index e32321c..4007313 100644 } exit: +diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c +new file mode 100644 +index 0000000..0d08373 +--- /dev/null ++++ b/drivers/acpi/property.c +@@ -0,0 +1,551 @@ ++/* ++ * ACPI device specific properties support. ++ * ++ * Copyright (C) 2014, Intel Corporation ++ * All rights reserved. ++ * ++ * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> ++ * Darren Hart <dvhart@linux.intel.com> ++ * Rafael J. Wysocki <rafael.j.wysocki@intel.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include <linux/acpi.h> ++#include <linux/device.h> ++#include <linux/export.h> ++ ++#include "internal.h" ++ ++/* ACPI _DSD device properties UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */ ++static const u8 prp_uuid[16] = { ++ 0x14, 0xd8, 0xff, 0xda, 0xba, 0x6e, 0x8c, 0x4d, ++ 0x8a, 0x91, 0xbc, 0x9b, 0xbf, 0x4a, 0xa3, 0x01 ++}; ++ ++static bool acpi_property_value_ok(const union acpi_object *value) ++{ ++ int j; ++ ++ /* ++ * The value must be an integer, a string, a reference, or a package ++ * whose every element must be an integer, a string, or a reference. ++ */ ++ switch (value->type) { ++ case ACPI_TYPE_INTEGER: ++ case ACPI_TYPE_STRING: ++ case ACPI_TYPE_LOCAL_REFERENCE: ++ return true; ++ ++ case ACPI_TYPE_PACKAGE: ++ for (j = 0; j < value->package.count; j++) ++ switch (value->package.elements[j].type) { ++ case ACPI_TYPE_INTEGER: ++ case ACPI_TYPE_STRING: ++ case ACPI_TYPE_LOCAL_REFERENCE: ++ continue; ++ ++ default: ++ return false; ++ } ++ ++ return true; ++ } ++ return false; ++} ++ ++static bool acpi_properties_format_valid(const union acpi_object *properties) ++{ ++ int i; ++ ++ for (i = 0; i < properties->package.count; i++) { ++ const union acpi_object *property; ++ ++ property = &properties->package.elements[i]; ++ /* ++ * Only two elements allowed, the first one must be a string and ++ * the second one has to satisfy certain conditions. ++ */ ++ if (property->package.count != 2 ++ || property->package.elements[0].type != ACPI_TYPE_STRING ++ || !acpi_property_value_ok(&property->package.elements[1])) ++ return false; ++ } ++ return true; ++} ++ ++static void acpi_init_of_compatible(struct acpi_device *adev) ++{ ++ const union acpi_object *of_compatible; ++ struct acpi_hardware_id *hwid; ++ bool acpi_of = false; ++ int ret; ++ ++ /* ++ * Check if the special PRP0001 ACPI ID is present and in that ++ * case we fill in Device Tree compatible properties for this ++ * device. ++ */ ++ list_for_each_entry(hwid, &adev->pnp.ids, list) { ++ if (!strcmp(hwid->id, "PRP0001")) { ++ acpi_of = true; ++ break; ++ } ++ } ++ ++ if (!acpi_of) ++ return; ++ ++ ret = acpi_dev_get_property_array(adev, "compatible", ACPI_TYPE_STRING, ++ &of_compatible); ++ if (ret) { ++ ret = acpi_dev_get_property(adev, "compatible", ++ ACPI_TYPE_STRING, &of_compatible); ++ if (ret) { ++ acpi_handle_warn(adev->handle, ++ "PRP0001 requires compatible property\n"); ++ return; ++ } ++ } ++ adev->data.of_compatible = of_compatible; ++} ++ ++void acpi_init_properties(struct acpi_device *adev) ++{ ++ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; ++ const union acpi_object *desc; ++ acpi_status status; ++ int i; ++ ++ status = acpi_evaluate_object_typed(adev->handle, "_DSD", NULL, &buf, ++ ACPI_TYPE_PACKAGE); ++ if (ACPI_FAILURE(status)) ++ return; ++ ++ desc = buf.pointer; ++ if (desc->package.count % 2) ++ goto fail; ++ ++ /* Look for the device properties UUID. */ ++ for (i = 0; i < desc->package.count; i += 2) { ++ const union acpi_object *uuid, *properties; ++ ++ uuid = &desc->package.elements[i]; ++ properties = &desc->package.elements[i + 1]; ++ ++ /* ++ * The first element must be a UUID and the second one must be ++ * a package. ++ */ ++ if (uuid->type != ACPI_TYPE_BUFFER || uuid->buffer.length != 16 ++ || properties->type != ACPI_TYPE_PACKAGE) ++ break; ++ ++ if (memcmp(uuid->buffer.pointer, prp_uuid, sizeof(prp_uuid))) ++ continue; ++ ++ /* ++ * We found the matching UUID. Now validate the format of the ++ * package immediately following it. ++ */ ++ if (!acpi_properties_format_valid(properties)) ++ break; ++ ++ adev->data.pointer = buf.pointer; ++ adev->data.properties = properties; ++ ++ acpi_init_of_compatible(adev); ++ return; ++ } ++ ++ fail: ++ dev_warn(&adev->dev, "Returned _DSD data is not valid, skipping\n"); ++ ACPI_FREE(buf.pointer); ++} ++ ++void acpi_free_properties(struct acpi_device *adev) ++{ ++ ACPI_FREE((void *)adev->data.pointer); ++ adev->data.of_compatible = NULL; ++ adev->data.pointer = NULL; ++ adev->data.properties = NULL; ++} ++ ++/** ++ * acpi_dev_get_property - return an ACPI property with given name ++ * @adev: ACPI device to get property ++ * @name: Name of the property ++ * @type: Expected property type ++ * @obj: Location to store the property value (if not %NULL) ++ * ++ * Look up a property with @name and store a pointer to the resulting ACPI ++ * object at the location pointed to by @obj if found. ++ * ++ * Callers must not attempt to free the returned objects. These objects will be ++ * freed by the ACPI core automatically during the removal of @adev. ++ * ++ * Return: %0 if property with @name has been found (success), ++ * %-EINVAL if the arguments are invalid, ++ * %-ENODATA if the property doesn't exist, ++ * %-EPROTO if the property value type doesn't match @type. ++ */ ++int acpi_dev_get_property(struct acpi_device *adev, const char *name, ++ acpi_object_type type, const union acpi_object **obj) ++{ ++ const union acpi_object *properties; ++ int i; ++ ++ if (!adev || !name) ++ return -EINVAL; ++ ++ if (!adev->data.pointer || !adev->data.properties) ++ return -ENODATA; ++ ++ properties = adev->data.properties; ++ for (i = 0; i < properties->package.count; i++) { ++ const union acpi_object *propname, *propvalue; ++ const union acpi_object *property; ++ ++ property = &properties->package.elements[i]; ++ ++ propname = &property->package.elements[0]; ++ propvalue = &property->package.elements[1]; ++ ++ if (!strcmp(name, propname->string.pointer)) { ++ if (type != ACPI_TYPE_ANY && propvalue->type != type) ++ return -EPROTO; ++ else if (obj) ++ *obj = propvalue; ++ ++ return 0; ++ } ++ } ++ return -ENODATA; ++} ++EXPORT_SYMBOL_GPL(acpi_dev_get_property); ++ ++/** ++ * acpi_dev_get_property_array - return an ACPI array property with given name ++ * @adev: ACPI device to get property ++ * @name: Name of the property ++ * @type: Expected type of array elements ++ * @obj: Location to store a pointer to the property value (if not NULL) ++ * ++ * Look up an array property with @name and store a pointer to the resulting ++ * ACPI object at the location pointed to by @obj if found. ++ * ++ * Callers must not attempt to free the returned objects. Those objects will be ++ * freed by the ACPI core automatically during the removal of @adev. ++ * ++ * Return: %0 if array property (package) with @name has been found (success), ++ * %-EINVAL if the arguments are invalid, ++ * %-ENODATA if the property doesn't exist, ++ * %-EPROTO if the property is not a package or the type of its elements ++ * doesn't match @type. ++ */ ++int acpi_dev_get_property_array(struct acpi_device *adev, const char *name, ++ acpi_object_type type, ++ const union acpi_object **obj) ++{ ++ const union acpi_object *prop; ++ int ret, i; ++ ++ ret = acpi_dev_get_property(adev, name, ACPI_TYPE_PACKAGE, &prop); ++ if (ret) ++ return ret; ++ ++ if (type != ACPI_TYPE_ANY) { ++ /* Check that all elements are of correct type. */ ++ for (i = 0; i < prop->package.count; i++) ++ if (prop->package.elements[i].type != type) ++ return -EPROTO; ++ } ++ if (obj) ++ *obj = prop; ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(acpi_dev_get_property_array); ++ ++/** ++ * acpi_dev_get_property_reference - returns handle to the referenced object ++ * @adev: ACPI device to get property ++ * @name: Name of the property ++ * @index: Index of the reference to return ++ * @args: Location to store the returned reference with optional arguments ++ * ++ * Find property with @name, verifify that it is a package containing at least ++ * one object reference and if so, store the ACPI device object pointer to the ++ * target object in @args->adev. If the reference includes arguments, store ++ * them in the @args->args[] array. ++ * ++ * If there's more than one reference in the property value package, @index is ++ * used to select the one to return. ++ * ++ * Return: %0 on success, negative error code on failure. ++ */ ++int acpi_dev_get_property_reference(struct acpi_device *adev, ++ const char *name, size_t index, ++ struct acpi_reference_args *args) ++{ ++ const union acpi_object *element, *end; ++ const union acpi_object *obj; ++ struct acpi_device *device; ++ int ret, idx = 0; ++ ++ ret = acpi_dev_get_property(adev, name, ACPI_TYPE_ANY, &obj); ++ if (ret) ++ return ret; ++ ++ /* ++ * The simplest case is when the value is a single reference. Just ++ * return that reference then. ++ */ ++ if (obj->type == ACPI_TYPE_LOCAL_REFERENCE) { ++ if (index) ++ return -EINVAL; ++ ++ ret = acpi_bus_get_device(obj->reference.handle, &device); ++ if (ret) ++ return ret; ++ ++ args->adev = device; ++ args->nargs = 0; ++ return 0; ++ } ++ ++ /* ++ * If it is not a single reference, then it is a package of ++ * references followed by number of ints as follows: ++ * ++ * Package () { REF, INT, REF, INT, INT } ++ * ++ * The index argument is then used to determine which reference ++ * the caller wants (along with the arguments). ++ */ ++ if (obj->type != ACPI_TYPE_PACKAGE || index >= obj->package.count) ++ return -EPROTO; ++ ++ element = obj->package.elements; ++ end = element + obj->package.count; ++ ++ while (element < end) { ++ u32 nargs, i; ++ ++ if (element->type != ACPI_TYPE_LOCAL_REFERENCE) ++ return -EPROTO; ++ ++ ret = acpi_bus_get_device(element->reference.handle, &device); ++ if (ret) ++ return -ENODEV; ++ ++ element++; ++ nargs = 0; ++ ++ /* assume following integer elements are all args */ ++ for (i = 0; element + i < end; i++) { ++ int type = element[i].type; ++ ++ if (type == ACPI_TYPE_INTEGER) ++ nargs++; ++ else if (type == ACPI_TYPE_LOCAL_REFERENCE) ++ break; ++ else ++ return -EPROTO; ++ } ++ ++ if (idx++ == index) { ++ args->adev = device; ++ args->nargs = nargs; ++ for (i = 0; i < nargs; i++) ++ args->args[i] = element[i].integer.value; ++ ++ return 0; ++ } ++ ++ element += nargs; ++ } ++ ++ return -EPROTO; ++} ++EXPORT_SYMBOL_GPL(acpi_dev_get_property_reference); ++ ++int acpi_dev_prop_get(struct acpi_device *adev, const char *propname, ++ void **valptr) ++{ ++ return acpi_dev_get_property(adev, propname, ACPI_TYPE_ANY, ++ (const union acpi_object **)valptr); ++} ++ ++int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname, ++ enum dev_prop_type proptype, void *val) ++{ ++ const union acpi_object *obj; ++ int ret; ++ ++ if (!val) ++ return -EINVAL; ++ ++ if (proptype >= DEV_PROP_U8 && proptype <= DEV_PROP_U64) { ++ ret = acpi_dev_get_property(adev, propname, ACPI_TYPE_INTEGER, &obj); ++ if (ret) ++ return ret; ++ ++ switch (proptype) { ++ case DEV_PROP_U8: ++ if (obj->integer.value > U8_MAX) ++ return -EOVERFLOW; ++ *(u8 *)val = obj->integer.value; ++ break; ++ case DEV_PROP_U16: ++ if (obj->integer.value > U16_MAX) ++ return -EOVERFLOW; ++ *(u16 *)val = obj->integer.value; ++ break; ++ case DEV_PROP_U32: ++ if (obj->integer.value > U32_MAX) ++ return -EOVERFLOW; ++ *(u32 *)val = obj->integer.value; ++ break; ++ default: ++ *(u64 *)val = obj->integer.value; ++ break; ++ } ++ } else if (proptype == DEV_PROP_STRING) { ++ ret = acpi_dev_get_property(adev, propname, ACPI_TYPE_STRING, &obj); ++ if (ret) ++ return ret; ++ ++ *(char **)val = obj->string.pointer; ++ } else { ++ ret = -EINVAL; ++ } ++ return ret; ++} ++ ++static int acpi_copy_property_array_u8(const union acpi_object *items, u8 *val, ++ size_t nval) ++{ ++ int i; ++ ++ for (i = 0; i < nval; i++) { ++ if (items[i].type != ACPI_TYPE_INTEGER) ++ return -EPROTO; ++ if (items[i].integer.value > U8_MAX) ++ return -EOVERFLOW; ++ ++ val[i] = items[i].integer.value; ++ } ++ return 0; ++} ++ ++static int acpi_copy_property_array_u16(const union acpi_object *items, ++ u16 *val, size_t nval) ++{ ++ int i; ++ ++ for (i = 0; i < nval; i++) { ++ if (items[i].type != ACPI_TYPE_INTEGER) ++ return -EPROTO; ++ if (items[i].integer.value > U16_MAX) ++ return -EOVERFLOW; ++ ++ val[i] = items[i].integer.value; ++ } ++ return 0; ++} ++ ++static int acpi_copy_property_array_u32(const union acpi_object *items, ++ u32 *val, size_t nval) ++{ ++ int i; ++ ++ for (i = 0; i < nval; i++) { ++ if (items[i].type != ACPI_TYPE_INTEGER) ++ return -EPROTO; ++ if (items[i].integer.value > U32_MAX) ++ return -EOVERFLOW; ++ ++ val[i] = items[i].integer.value; ++ } ++ return 0; ++} ++ ++static int acpi_copy_property_array_u64(const union acpi_object *items, ++ u64 *val, size_t nval) ++{ ++ int i; ++ ++ for (i = 0; i < nval; i++) { ++ if (items[i].type != ACPI_TYPE_INTEGER) ++ return -EPROTO; ++ ++ val[i] = items[i].integer.value; ++ } ++ return 0; ++} ++ ++static int acpi_copy_property_array_string(const union acpi_object *items, ++ char **val, size_t nval) ++{ ++ int i; ++ ++ for (i = 0; i < nval; i++) { ++ if (items[i].type != ACPI_TYPE_STRING) ++ return -EPROTO; ++ ++ val[i] = items[i].string.pointer; ++ } ++ return 0; ++} ++ ++int acpi_dev_prop_read(struct acpi_device *adev, const char *propname, ++ enum dev_prop_type proptype, void *val, size_t nval) ++{ ++ const union acpi_object *obj; ++ const union acpi_object *items; ++ int ret; ++ ++ if (val && nval == 1) { ++ ret = acpi_dev_prop_read_single(adev, propname, proptype, val); ++ if (!ret) ++ return ret; ++ } ++ ++ ret = acpi_dev_get_property_array(adev, propname, ACPI_TYPE_ANY, &obj); ++ if (ret) ++ return ret; ++ ++ if (!val) ++ return obj->package.count; ++ else if (nval <= 0) ++ return -EINVAL; ++ ++ if (nval > obj->package.count) ++ return -EOVERFLOW; ++ ++ items = obj->package.elements; ++ switch (proptype) { ++ case DEV_PROP_U8: ++ ret = acpi_copy_property_array_u8(items, (u8 *)val, nval); ++ break; ++ case DEV_PROP_U16: ++ ret = acpi_copy_property_array_u16(items, (u16 *)val, nval); ++ break; ++ case DEV_PROP_U32: ++ ret = acpi_copy_property_array_u32(items, (u32 *)val, nval); ++ break; ++ case DEV_PROP_U64: ++ ret = acpi_copy_property_array_u64(items, (u64 *)val, nval); ++ break; ++ case DEV_PROP_STRING: ++ ret = acpi_copy_property_array_string(items, (char **)val, nval); ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ return ret; ++} +diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c +index 0476e90..9cb5cca 100644 +--- a/drivers/acpi/scan.c ++++ b/drivers/acpi/scan.c +@@ -124,17 +124,56 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, + if (list_empty(&acpi_dev->pnp.ids)) + return 0; + +- len = snprintf(modalias, size, "acpi:"); +- size -= len; +- +- list_for_each_entry(id, &acpi_dev->pnp.ids, list) { +- count = snprintf(&modalias[len], size, "%s:", id->id); +- if (count < 0) +- return -EINVAL; +- if (count >= size) +- return -ENOMEM; +- len += count; +- size -= count; ++ /* ++ * If the device has PRP0001 we expose DT compatible modalias ++ * instead in form of of:NnameTCcompatible. ++ */ ++ if (acpi_dev->data.of_compatible) { ++ struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; ++ const union acpi_object *of_compatible, *obj; ++ int i, nval; ++ char *c; ++ ++ acpi_get_name(acpi_dev->handle, ACPI_SINGLE_NAME, &buf); ++ /* DT strings are all in lower case */ ++ for (c = buf.pointer; *c != '\0'; c++) ++ *c = tolower(*c); ++ ++ len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer); ++ ACPI_FREE(buf.pointer); ++ ++ of_compatible = acpi_dev->data.of_compatible; ++ if (of_compatible->type == ACPI_TYPE_PACKAGE) { ++ nval = of_compatible->package.count; ++ obj = of_compatible->package.elements; ++ } else { /* Must be ACPI_TYPE_STRING. */ ++ nval = 1; ++ obj = of_compatible; ++ } ++ for (i = 0; i < nval; i++, obj++) { ++ count = snprintf(&modalias[len], size, "C%s", ++ obj->string.pointer); ++ if (count < 0) ++ return -EINVAL; ++ if (count >= size) ++ return -ENOMEM; ++ ++ len += count; ++ size -= count; ++ } ++ } else { ++ len = snprintf(modalias, size, "acpi:"); ++ size -= len; ++ ++ list_for_each_entry(id, &acpi_dev->pnp.ids, list) { ++ count = snprintf(&modalias[len], size, "%s:", id->id); ++ if (count < 0) ++ return -EINVAL; ++ if (count >= size) ++ return -ENOMEM; ++ len += count; ++ size -= count; ++ } + } + + modalias[len] = '\0'; +@@ -902,6 +941,51 @@ int acpi_match_device_ids(struct acpi_device *device, + } + EXPORT_SYMBOL(acpi_match_device_ids); + ++/* Performs match against special "PRP0001" shoehorn ACPI ID */ ++static bool acpi_of_driver_match_device(struct device *dev, ++ const struct device_driver *drv) ++{ ++ const union acpi_object *of_compatible, *obj; ++ struct acpi_device *adev; ++ int i, nval; ++ ++ adev = ACPI_COMPANION(dev); ++ if (!adev) ++ return false; ++ ++ of_compatible = adev->data.of_compatible; ++ if (!drv->of_match_table || !of_compatible) ++ return false; ++ ++ if (of_compatible->type == ACPI_TYPE_PACKAGE) { ++ nval = of_compatible->package.count; ++ obj = of_compatible->package.elements; ++ } else { /* Must be ACPI_TYPE_STRING. */ ++ nval = 1; ++ obj = of_compatible; ++ } ++ /* Now we can look for the driver DT compatible strings */ ++ for (i = 0; i < nval; i++, obj++) { ++ const struct of_device_id *id; ++ ++ for (id = drv->of_match_table; id->compatible[0]; id++) ++ if (!strcasecmp(obj->string.pointer, id->compatible)) ++ return true; ++ } ++ ++ return false; ++} ++ ++bool acpi_driver_match_device(struct device *dev, ++ const struct device_driver *drv) ++{ ++ if (!drv->acpi_match_table) ++ return acpi_of_driver_match_device(dev, drv); ++ ++ return !!acpi_match_device(drv->acpi_match_table, dev); ++} ++EXPORT_SYMBOL_GPL(acpi_driver_match_device); ++ + static void acpi_free_power_resources_lists(struct acpi_device *device) + { + int i; +@@ -922,6 +1006,7 @@ static void acpi_device_release(struct device *dev) + { + struct acpi_device *acpi_dev = to_acpi_device(dev); + ++ acpi_free_properties(acpi_dev); + acpi_free_pnp_ids(&acpi_dev->pnp); + acpi_free_power_resources_lists(acpi_dev); + kfree(acpi_dev); +@@ -1304,6 +1389,26 @@ int acpi_device_add(struct acpi_device *device, + return result; + } + ++struct acpi_device *acpi_get_next_child(struct device *dev, ++ struct acpi_device *child) ++{ ++ struct acpi_device *adev = ACPI_COMPANION(dev); ++ struct list_head *head, *next; ++ ++ if (!adev) ++ return NULL; ++ ++ head = &adev->children; ++ if (list_empty(head)) ++ return NULL; ++ ++ if (!child) ++ return list_first_entry(head, struct acpi_device, node); ++ ++ next = child->node.next; ++ return next == head ? NULL : list_entry(next, struct acpi_device, node); ++} ++ + /* -------------------------------------------------------------------------- + Driver Management + -------------------------------------------------------------------------- */ +@@ -1923,9 +2028,11 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, + device->device_type = type; + device->handle = handle; + device->parent = acpi_bus_get_parent(handle); ++ device->fwnode.type = FWNODE_ACPI; + acpi_set_device_status(device, sta); + acpi_device_get_busid(device); + acpi_set_pnp_ids(handle, &device->pnp, type); ++ acpi_init_properties(device); + acpi_bus_get_flags(device); + device->flags.match_driver = false; + device->flags.initialized = true; diff --git a/drivers/acpi/sleep-arm.c b/drivers/acpi/sleep-arm.c new file mode 100644 index 0000000..54578ef @@ -4189,10 +6675,10 @@ index 6d5a6cd..47f36d4 100644 int __init diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c -index 07c8c5a..aec9656 100644 +index 371ac12..af325a7 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c -@@ -698,3 +698,29 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs) +@@ -723,3 +723,29 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs) return false; } EXPORT_SYMBOL(acpi_check_dsm); @@ -4223,7 +6709,7 @@ index 07c8c5a..aec9656 100644 +} +EXPORT_SYMBOL(acpi_check_coherency); diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig -index e1b9278..f2e6c9e 100644 +index cd4cccb..edb00c6 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -48,7 +48,7 @@ config ATA_VERBOSE_ERROR @@ -4236,7 +6722,7 @@ index e1b9278..f2e6c9e 100644 help This option adds support for ATA-related ACPI objects. diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c -index f61ddb9..3499bab 100644 +index 06f1d59..df2ea85 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -20,6 +20,9 @@ @@ -4249,7 +6735,7 @@ index f61ddb9..3499bab 100644 #include "ahci.h" static const struct ata_port_info ahci_port_info = { -@@ -87,6 +90,13 @@ static const struct of_device_id ahci_of_match[] = { +@@ -71,6 +74,13 @@ static const struct of_device_id ahci_of_match[] = { }; MODULE_DEVICE_TABLE(of, ahci_of_match); @@ -4263,7 +6749,7 @@ index f61ddb9..3499bab 100644 static struct platform_driver ahci_driver = { .probe = ahci_probe, .remove = ata_platform_remove_one, -@@ -94,6 +104,9 @@ static struct platform_driver ahci_driver = { +@@ -78,6 +88,9 @@ static struct platform_driver ahci_driver = { .name = "ahci", .owner = THIS_MODULE, .of_match_table = ahci_of_match, @@ -4274,7 +6760,7 @@ index f61ddb9..3499bab 100644 }, }; diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c -index f03aab1..b02ba9d 100644 +index 0f8538f..2d8103a 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -28,6 +28,7 @@ @@ -4310,7 +6796,7 @@ index f03aab1..b02ba9d 100644 /** * xgene_ahci_read_id - Read ID data from the specified device * @dev: device -@@ -495,11 +489,6 @@ static int xgene_ahci_probe(struct platform_device *pdev) +@@ -501,11 +495,6 @@ static int xgene_ahci_probe(struct platform_device *pdev) return -ENODEV; } @@ -4322,7 +6808,7 @@ index f03aab1..b02ba9d 100644 /* Due to errata, HW requires full toggle transition */ rc = ahci_platform_enable_clks(hpriv); if (rc) -@@ -512,7 +501,7 @@ static int xgene_ahci_probe(struct platform_device *pdev) +@@ -518,7 +507,7 @@ static int xgene_ahci_probe(struct platform_device *pdev) /* Configure the host controller */ xgene_ahci_hw_init(hpriv); @@ -4331,7 +6817,7 @@ index f03aab1..b02ba9d 100644 hpriv->flags = AHCI_HFLAG_NO_PMP | AHCI_HFLAG_NO_NCQ; rc = ahci_platform_init_host(pdev, hpriv, &xgene_ahci_port_info); -@@ -527,6 +516,16 @@ disable_resources: +@@ -533,6 +522,16 @@ disable_resources: return rc; } @@ -4348,7 +6834,7 @@ index f03aab1..b02ba9d 100644 static const struct of_device_id xgene_ahci_of_match[] = { {.compatible = "apm,xgene-ahci"}, {}, -@@ -540,6 +539,7 @@ static struct platform_driver xgene_ahci_driver = { +@@ -546,6 +545,7 @@ static struct platform_driver xgene_ahci_driver = { .name = "xgene-ahci", .owner = THIS_MODULE, .of_match_table = xgene_ahci_of_match, @@ -4356,8 +6842,458 @@ index f03aab1..b02ba9d 100644 }, }; +diff --git a/drivers/base/Makefile b/drivers/base/Makefile +index 6922cd6..53c3fe1 100644 +--- a/drivers/base/Makefile ++++ b/drivers/base/Makefile +@@ -4,7 +4,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \ + driver.o class.o platform.o \ + cpu.o firmware.o init.o map.o devres.o \ + attribute_container.o transport_class.o \ +- topology.o container.o ++ topology.o container.o property.o + obj-$(CONFIG_DEVTMPFS) += devtmpfs.o + obj-$(CONFIG_DMA_CMA) += dma-contiguous.o + obj-y += power/ +diff --git a/drivers/base/property.c b/drivers/base/property.c +new file mode 100644 +index 0000000..c458458 +--- /dev/null ++++ b/drivers/base/property.c +@@ -0,0 +1,431 @@ ++/* ++ * property.c - Unified device property interface. ++ * ++ * Copyright (C) 2014, Intel Corporation ++ * Authors: Rafael J. Wysocki <rafael.j.wysocki@intel.com> ++ * Mika Westerberg <mika.westerberg@linux.intel.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include <linux/property.h> ++#include <linux/export.h> ++#include <linux/acpi.h> ++#include <linux/of.h> ++ ++/** ++ * device_property_present - check if a property of a device is present ++ * @dev: Device whose property is being checked ++ * @propname: Name of the property ++ * ++ * Check if property @propname is present in the device firmware description. ++ */ ++bool device_property_present(struct device *dev, const char *propname) ++{ ++ if (IS_ENABLED(CONFIG_OF) && dev->of_node) ++ return of_property_read_bool(dev->of_node, propname); ++ ++ return !acpi_dev_prop_get(ACPI_COMPANION(dev), propname, NULL); ++} ++EXPORT_SYMBOL_GPL(device_property_present); ++ ++/** ++ * fwnode_property_present - check if a property of a firmware node is present ++ * @fwnode: Firmware node whose property to check ++ * @propname: Name of the property ++ */ ++bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname) ++{ ++ if (is_of_node(fwnode)) ++ return of_property_read_bool(of_node(fwnode), propname); ++ else if (is_acpi_node(fwnode)) ++ return !acpi_dev_prop_get(acpi_node(fwnode), propname, NULL); ++ ++ return false; ++} ++EXPORT_SYMBOL_GPL(fwnode_property_present); ++ ++#define OF_DEV_PROP_READ_ARRAY(node, propname, type, val, nval) \ ++ (val) ? of_property_read_##type##_array((node), (propname), (val), (nval)) \ ++ : of_property_count_elems_of_size((node), (propname), sizeof(type)) ++ ++#define DEV_PROP_READ_ARRAY(_dev_, _propname_, _type_, _proptype_, _val_, _nval_) \ ++ IS_ENABLED(CONFIG_OF) && _dev_->of_node ? \ ++ (OF_DEV_PROP_READ_ARRAY(_dev_->of_node, _propname_, _type_, \ ++ _val_, _nval_)) : \ ++ acpi_dev_prop_read(ACPI_COMPANION(_dev_), _propname_, \ ++ _proptype_, _val_, _nval_) ++ ++/** ++ * device_property_read_u8_array - return a u8 array property of a device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Function reads an array of u8 properties with @propname from the device ++ * firmware description and stores them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected. ++ */ ++int device_property_read_u8_array(struct device *dev, const char *propname, ++ u8 *val, size_t nval) ++{ ++ return DEV_PROP_READ_ARRAY(dev, propname, u8, DEV_PROP_U8, val, nval); ++} ++EXPORT_SYMBOL_GPL(device_property_read_u8_array); ++ ++/** ++ * device_property_read_u16_array - return a u16 array property of a device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Function reads an array of u16 properties with @propname from the device ++ * firmware description and stores them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected. ++ */ ++int device_property_read_u16_array(struct device *dev, const char *propname, ++ u16 *val, size_t nval) ++{ ++ return DEV_PROP_READ_ARRAY(dev, propname, u16, DEV_PROP_U16, val, nval); ++} ++EXPORT_SYMBOL_GPL(device_property_read_u16_array); ++ ++/** ++ * device_property_read_u32_array - return a u32 array property of a device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Function reads an array of u32 properties with @propname from the device ++ * firmware description and stores them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected. ++ */ ++int device_property_read_u32_array(struct device *dev, const char *propname, ++ u32 *val, size_t nval) ++{ ++ return DEV_PROP_READ_ARRAY(dev, propname, u32, DEV_PROP_U32, val, nval); ++} ++EXPORT_SYMBOL_GPL(device_property_read_u32_array); ++ ++/** ++ * device_property_read_u64_array - return a u64 array property of a device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Function reads an array of u64 properties with @propname from the device ++ * firmware description and stores them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected. ++ */ ++int device_property_read_u64_array(struct device *dev, const char *propname, ++ u64 *val, size_t nval) ++{ ++ return DEV_PROP_READ_ARRAY(dev, propname, u64, DEV_PROP_U64, val, nval); ++} ++EXPORT_SYMBOL_GPL(device_property_read_u64_array); ++ ++/** ++ * device_property_read_string_array - return a string array property of device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Function reads an array of string properties with @propname from the device ++ * firmware description and stores them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO or %-EILSEQ if the property is not an array of strings, ++ * %-EOVERFLOW if the size of the property is not as expected. ++ */ ++int device_property_read_string_array(struct device *dev, const char *propname, ++ const char **val, size_t nval) ++{ ++ return IS_ENABLED(CONFIG_OF) && dev->of_node ? ++ of_property_read_string_array(dev->of_node, propname, val, nval) : ++ acpi_dev_prop_read(ACPI_COMPANION(dev), propname, ++ DEV_PROP_STRING, val, nval); ++} ++EXPORT_SYMBOL_GPL(device_property_read_string_array); ++ ++/** ++ * device_property_read_string - return a string property of a device ++ * @dev: Device to get the property of ++ * @propname: Name of the property ++ * @val: The value is stored here ++ * ++ * Function reads property @propname from the device firmware description and ++ * stores the value into @val if found. The value is checked to be a string. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO or %-EILSEQ if the property type is not a string. ++ */ ++int device_property_read_string(struct device *dev, const char *propname, ++ const char **val) ++{ ++ return IS_ENABLED(CONFIG_OF) && dev->of_node ? ++ of_property_read_string(dev->of_node, propname, val) : ++ acpi_dev_prop_read(ACPI_COMPANION(dev), propname, ++ DEV_PROP_STRING, val, 1); ++} ++EXPORT_SYMBOL_GPL(device_property_read_string); ++ ++#define FWNODE_PROP_READ_ARRAY(_fwnode_, _propname_, _type_, _proptype_, _val_, _nval_) \ ++({ \ ++ int _ret_; \ ++ if (is_of_node(_fwnode_)) \ ++ _ret_ = OF_DEV_PROP_READ_ARRAY(of_node(_fwnode_), _propname_, \ ++ _type_, _val_, _nval_); \ ++ else if (is_acpi_node(_fwnode_)) \ ++ _ret_ = acpi_dev_prop_read(acpi_node(_fwnode_), _propname_, \ ++ _proptype_, _val_, _nval_); \ ++ else \ ++ _ret_ = -ENXIO; \ ++ _ret_; \ ++}) ++ ++/** ++ * fwnode_property_read_u8_array - return a u8 array property of firmware node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Read an array of u8 properties with @propname from @fwnode and stores them to ++ * @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_u8_array(struct fwnode_handle *fwnode, ++ const char *propname, u8 *val, size_t nval) ++{ ++ return FWNODE_PROP_READ_ARRAY(fwnode, propname, u8, DEV_PROP_U8, ++ val, nval); ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_u8_array); ++ ++/** ++ * fwnode_property_read_u16_array - return a u16 array property of firmware node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Read an array of u16 properties with @propname from @fwnode and store them to ++ * @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_u16_array(struct fwnode_handle *fwnode, ++ const char *propname, u16 *val, size_t nval) ++{ ++ return FWNODE_PROP_READ_ARRAY(fwnode, propname, u16, DEV_PROP_U16, ++ val, nval); ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_u16_array); ++ ++/** ++ * fwnode_property_read_u32_array - return a u32 array property of firmware node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Read an array of u32 properties with @propname from @fwnode store them to ++ * @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_u32_array(struct fwnode_handle *fwnode, ++ const char *propname, u32 *val, size_t nval) ++{ ++ return FWNODE_PROP_READ_ARRAY(fwnode, propname, u32, DEV_PROP_U32, ++ val, nval); ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_u32_array); ++ ++/** ++ * fwnode_property_read_u64_array - return a u64 array property firmware node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Read an array of u64 properties with @propname from @fwnode and store them to ++ * @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of numbers, ++ * %-EOVERFLOW if the size of the property is not as expected, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_u64_array(struct fwnode_handle *fwnode, ++ const char *propname, u64 *val, size_t nval) ++{ ++ return FWNODE_PROP_READ_ARRAY(fwnode, propname, u64, DEV_PROP_U64, ++ val, nval); ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_u64_array); ++ ++/** ++ * fwnode_property_read_string_array - return string array property of a node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The values are stored here ++ * @nval: Size of the @val array ++ * ++ * Read an string list property @propname from the given firmware node and store ++ * them to @val if found. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO if the property is not an array of strings, ++ * %-EOVERFLOW if the size of the property is not as expected, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_string_array(struct fwnode_handle *fwnode, ++ const char *propname, const char **val, ++ size_t nval) ++{ ++ if (is_of_node(fwnode)) ++ return of_property_read_string_array(of_node(fwnode), propname, ++ val, nval); ++ else if (is_acpi_node(fwnode)) ++ return acpi_dev_prop_read(acpi_node(fwnode), propname, ++ DEV_PROP_STRING, val, nval); ++ ++ return -ENXIO; ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_string_array); ++ ++/** ++ * fwnode_property_read_string - return a string property of a firmware node ++ * @fwnode: Firmware node to get the property of ++ * @propname: Name of the property ++ * @val: The value is stored here ++ * ++ * Read property @propname from the given firmware node and store the value into ++ * @val if found. The value is checked to be a string. ++ * ++ * Return: %0 if the property was found (success), ++ * %-EINVAL if given arguments are not valid, ++ * %-ENODATA if the property does not have a value, ++ * %-EPROTO or %-EILSEQ if the property is not a string, ++ * %-ENXIO if no suitable firmware interface is present. ++ */ ++int fwnode_property_read_string(struct fwnode_handle *fwnode, ++ const char *propname, const char **val) ++{ ++ if (is_of_node(fwnode)) ++ return of_property_read_string(of_node(fwnode),propname, val); ++ else if (is_acpi_node(fwnode)) ++ return acpi_dev_prop_read(acpi_node(fwnode), propname, ++ DEV_PROP_STRING, val, 1); ++ ++ return -ENXIO; ++} ++EXPORT_SYMBOL_GPL(fwnode_property_read_string); ++ ++/** ++ * device_get_next_child_node - Return the next child node handle for a device ++ * @dev: Device to find the next child node for. ++ * @child: Handle to one of the device's child nodes or a null handle. ++ */ ++struct fwnode_handle *device_get_next_child_node(struct device *dev, ++ struct fwnode_handle *child) ++{ ++ if (IS_ENABLED(CONFIG_OF) && dev->of_node) { ++ struct device_node *node; ++ ++ node = of_get_next_available_child(dev->of_node, of_node(child)); ++ if (node) ++ return &node->fwnode; ++ } else if (IS_ENABLED(CONFIG_ACPI)) { ++ struct acpi_device *node; ++ ++ node = acpi_get_next_child(dev, acpi_node(child)); ++ if (node) ++ return acpi_fwnode_handle(node); ++ } ++ return NULL; ++} ++EXPORT_SYMBOL_GPL(device_get_next_child_node); ++ ++/** ++ * fwnode_handle_put - Drop reference to a device node ++ * @fwnode: Pointer to the device node to drop the reference to. ++ * ++ * This has to be used when terminating device_for_each_child_node() iteration ++ * with break or return to prevent stale device node references from being left ++ * behind. ++ */ ++void fwnode_handle_put(struct fwnode_handle *fwnode) ++{ ++ if (is_of_node(fwnode)) ++ of_node_put(of_node(fwnode)); ++} ++EXPORT_SYMBOL_GPL(fwnode_handle_put); ++ ++/** ++ * device_get_child_node_count - return the number of child nodes for device ++ * @dev: Device to cound the child nodes for ++ */ ++unsigned int device_get_child_node_count(struct device *dev) ++{ ++ struct fwnode_handle *child; ++ unsigned int count = 0; ++ ++ device_for_each_child_node(dev, child) ++ count++; ++ ++ return count; ++} ++EXPORT_SYMBOL_GPL(device_get_child_node_count); diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c -index 5163ec1..1bec05b 100644 +index 43005d4..c9411e6 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -21,6 +21,7 @@ @@ -4378,7 +7314,7 @@ index 5163ec1..1bec05b 100644 static struct clock_event_device __percpu *arch_timer_evt; -@@ -338,8 +340,12 @@ arch_timer_detect_rate(void __iomem *cntbase, struct device_node *np) +@@ -370,8 +372,12 @@ arch_timer_detect_rate(void __iomem *cntbase, struct device_node *np) if (arch_timer_rate) return; @@ -4393,7 +7329,7 @@ index 5163ec1..1bec05b 100644 if (cntbase) arch_timer_rate = readl_relaxed(cntbase + CNTFRQ); else -@@ -635,20 +641,8 @@ static void __init arch_timer_common_init(void) +@@ -687,20 +693,8 @@ static void __init arch_timer_common_init(void) arch_timer_arch_init(); } @@ -4415,7 +7351,7 @@ index 5163ec1..1bec05b 100644 /* * If HYP mode is available, we know that the physical timer * has been configured to be accessible from PL1. Use it, so -@@ -667,13 +661,31 @@ static void __init arch_timer_init(struct device_node *np) +@@ -719,13 +713,31 @@ static void __init arch_timer_init(struct device_node *np) } } @@ -4451,7 +7387,7 @@ index 5163ec1..1bec05b 100644 static void __init arch_timer_mem_init(struct device_node *np) { -@@ -740,3 +752,71 @@ static void __init arch_timer_mem_init(struct device_node *np) +@@ -792,3 +804,71 @@ static void __init arch_timer_mem_init(struct device_node *np) } CLOCKSOURCE_OF_DECLARE(armv7_arch_timer_mem, "arm,armv7-timer-mem", arch_timer_mem_init); @@ -4523,11 +7459,1189 @@ index 5163ec1..1bec05b 100644 + acpi_table_parse(ACPI_SIG_GTDT, arch_timer_acpi_init); +} +#endif +diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c +index 17afc51..c5f7b4e 100644 +--- a/drivers/firmware/dmi_scan.c ++++ b/drivers/firmware/dmi_scan.c +@@ -93,6 +93,12 @@ static void dmi_table(u8 *buf, int len, int num, + const struct dmi_header *dm = (const struct dmi_header *)data; + + /* ++ * 7.45 End-of-Table (Type 127) [SMBIOS reference spec v3.0.0] ++ */ ++ if (dm->type == DMI_ENTRY_END_OF_TABLE) ++ break; ++ ++ /* + * We want to know the total length (formatted area and + * strings) before decoding to make sure we won't run off the + * table in dmi_decode or dmi_string +@@ -107,7 +113,7 @@ static void dmi_table(u8 *buf, int len, int num, + } + } + +-static u32 dmi_base; ++static phys_addr_t dmi_base; + static u16 dmi_len; + static u16 dmi_num; + +@@ -467,7 +473,7 @@ static int __init dmi_present(const u8 *buf) + + if (memcmp(buf, "_SM_", 4) == 0 && + buf[5] < 32 && dmi_checksum(buf, buf[5])) { +- smbios_ver = (buf[6] << 8) + buf[7]; ++ smbios_ver = get_unaligned_be16(buf + 6); + + /* Some BIOS report weird SMBIOS version, fix that up */ + switch (smbios_ver) { +@@ -489,10 +495,9 @@ static int __init dmi_present(const u8 *buf) + buf += 16; + + if (memcmp(buf, "_DMI_", 5) == 0 && dmi_checksum(buf, 15)) { +- dmi_num = (buf[13] << 8) | buf[12]; +- dmi_len = (buf[7] << 8) | buf[6]; +- dmi_base = (buf[11] << 24) | (buf[10] << 16) | +- (buf[9] << 8) | buf[8]; ++ dmi_num = get_unaligned_le16(buf + 12); ++ dmi_len = get_unaligned_le16(buf + 6); ++ dmi_base = get_unaligned_le32(buf + 8); + + if (dmi_walk_early(dmi_decode) == 0) { + if (smbios_ver) { +@@ -514,12 +519,72 @@ static int __init dmi_present(const u8 *buf) + return 1; + } + ++/* ++ * Check for the SMBIOS 3.0 64-bit entry point signature. Unlike the legacy ++ * 32-bit entry point, there is no embedded DMI header (_DMI_) in here. ++ */ ++static int __init dmi_smbios3_present(const u8 *buf) ++{ ++ if (memcmp(buf, "_SM3_", 5) == 0 && ++ buf[6] < 32 && dmi_checksum(buf, buf[6])) { ++ dmi_ver = get_unaligned_be16(buf + 7); ++ dmi_len = get_unaligned_le32(buf + 12); ++ dmi_base = get_unaligned_le64(buf + 16); ++ ++ /* ++ * The 64-bit SMBIOS 3.0 entry point no longer has a field ++ * containing the number of structures present in the table. ++ * Instead, it defines the table size as a maximum size, and ++ * relies on the end-of-table structure type (#127) to be used ++ * to signal the end of the table. ++ * So let's define dmi_num as an upper bound as well: each ++ * structure has a 4 byte header, so dmi_len / 4 is an upper ++ * bound for the number of structures in the table. ++ */ ++ dmi_num = dmi_len / 4; ++ ++ if (dmi_walk_early(dmi_decode) == 0) { ++ pr_info("SMBIOS %d.%d present.\n", ++ dmi_ver >> 8, dmi_ver & 0xFF); ++ dmi_format_ids(dmi_ids_string, sizeof(dmi_ids_string)); ++ pr_debug("DMI: %s\n", dmi_ids_string); ++ return 0; ++ } ++ } ++ return 1; ++} ++ + void __init dmi_scan_machine(void) + { + char __iomem *p, *q; + char buf[32]; + + if (efi_enabled(EFI_CONFIG_TABLES)) { ++ /* ++ * According to the DMTF SMBIOS reference spec v3.0.0, it is ++ * allowed to define both the 64-bit entry point (smbios3) and ++ * the 32-bit entry point (smbios), in which case they should ++ * either both point to the same SMBIOS structure table, or the ++ * table pointed to by the 64-bit entry point should contain a ++ * superset of the table contents pointed to by the 32-bit entry ++ * point (section 5.2) ++ * This implies that the 64-bit entry point should have ++ * precedence if it is defined and supported by the OS. If we ++ * have the 64-bit entry point, but fail to decode it, fall ++ * back to the legacy one (if available) ++ */ ++ if (efi.smbios3 != EFI_INVALID_TABLE_ADDR) { ++ p = dmi_early_remap(efi.smbios3, 32); ++ if (p == NULL) ++ goto error; ++ memcpy_fromio(buf, p, 32); ++ dmi_early_unmap(p, 32); ++ ++ if (!dmi_smbios3_present(buf)) { ++ dmi_available = 1; ++ goto out; ++ } ++ } + if (efi.smbios == EFI_INVALID_TABLE_ADDR) + goto error; + +@@ -552,7 +617,7 @@ void __init dmi_scan_machine(void) + memset(buf, 0, 16); + for (q = p; q < p + 0x10000; q += 16) { + memcpy_fromio(buf + 16, q, 16); +- if (!dmi_present(buf)) { ++ if (!dmi_smbios3_present(buf) || !dmi_present(buf)) { + dmi_available = 1; + dmi_early_unmap(p, 0x10000); + goto out; +diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c +index 8590099..9035c1b 100644 +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -30,6 +30,7 @@ struct efi __read_mostly efi = { + .acpi = EFI_INVALID_TABLE_ADDR, + .acpi20 = EFI_INVALID_TABLE_ADDR, + .smbios = EFI_INVALID_TABLE_ADDR, ++ .smbios3 = EFI_INVALID_TABLE_ADDR, + .sal_systab = EFI_INVALID_TABLE_ADDR, + .boot_info = EFI_INVALID_TABLE_ADDR, + .hcdp = EFI_INVALID_TABLE_ADDR, +@@ -86,6 +87,8 @@ static ssize_t systab_show(struct kobject *kobj, + str += sprintf(str, "ACPI=0x%lx\n", efi.acpi); + if (efi.smbios != EFI_INVALID_TABLE_ADDR) + str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios); ++ if (efi.smbios3 != EFI_INVALID_TABLE_ADDR) ++ str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3); + if (efi.hcdp != EFI_INVALID_TABLE_ADDR) + str += sprintf(str, "HCDP=0x%lx\n", efi.hcdp); + if (efi.boot_info != EFI_INVALID_TABLE_ADDR) +@@ -260,6 +263,7 @@ static __initdata efi_config_table_type_t common_tables[] = { + {MPS_TABLE_GUID, "MPS", &efi.mps}, + {SAL_SYSTEM_TABLE_GUID, "SALsystab", &efi.sal_systab}, + {SMBIOS_TABLE_GUID, "SMBIOS", &efi.smbios}, ++ {SMBIOS3_TABLE_GUID, "SMBIOS 3.0", &efi.smbios3}, + {UGA_IO_PROTOCOL_GUID, "UGA", &efi.uga}, + {NULL_GUID, NULL, NULL}, + }; +diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c +index 75ee059..eb48a1a 100644 +--- a/drivers/firmware/efi/libstub/arm-stub.c ++++ b/drivers/firmware/efi/libstub/arm-stub.c +@@ -247,9 +247,18 @@ unsigned long __init efi_entry(void *handle, efi_system_table_t *sys_table, + goto fail_free_cmdline; + } + } +- if (!fdt_addr) ++ ++ if (fdt_addr) { ++ pr_efi(sys_table, "Using DTB from command line\n"); ++ } else { + /* Look for a device tree configuration table entry. */ + fdt_addr = (uintptr_t)get_fdt(sys_table); ++ if (fdt_addr) ++ pr_efi(sys_table, "Using DTB from configuration table\n"); ++ } ++ ++ if (!fdt_addr) ++ pr_efi(sys_table, "Generating empty DTB\n"); + + status = handle_cmdline_files(sys_table, image, cmdline_ptr, + "initrd=", dram_base + SZ_512M, +diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c +index 954b9f6..13dbd3d 100644 +--- a/drivers/gpio/devres.c ++++ b/drivers/gpio/devres.c +@@ -109,6 +109,38 @@ struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev, + EXPORT_SYMBOL(__devm_gpiod_get_index); + + /** ++ * devm_get_gpiod_from_child - get a GPIO descriptor from a device's child node ++ * @dev: GPIO consumer ++ * @child: firmware node (child of @dev) ++ * ++ * GPIO descriptors returned from this function are automatically disposed on ++ * driver detach. ++ */ ++struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, ++ struct fwnode_handle *child) ++{ ++ struct gpio_desc **dr; ++ struct gpio_desc *desc; ++ ++ dr = devres_alloc(devm_gpiod_release, sizeof(struct gpio_desc *), ++ GFP_KERNEL); ++ if (!dr) ++ return ERR_PTR(-ENOMEM); ++ ++ desc = fwnode_get_named_gpiod(child, "gpios"); ++ if (IS_ERR(desc)) { ++ devres_free(dr); ++ return desc; ++ } ++ ++ *dr = desc; ++ devres_add(dev, dr); ++ ++ return desc; ++} ++EXPORT_SYMBOL(devm_get_gpiod_from_child); ++ ++/** + * devm_gpiod_get_index_optional - Resource-managed gpiod_get_index_optional() + * @dev: GPIO consumer + * @con_id: function within the GPIO consumer +diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c +index 41e91d7..99720c8 100644 +--- a/drivers/gpio/gpio-sch.c ++++ b/drivers/gpio/gpio-sch.c +@@ -29,290 +29,221 @@ + + #include <linux/gpio.h> + +-static DEFINE_SPINLOCK(gpio_lock); +- +-#define CGEN (0x00) +-#define CGIO (0x04) +-#define CGLV (0x08) +- +-#define RGEN (0x20) +-#define RGIO (0x24) +-#define RGLV (0x28) +- +-static unsigned short gpio_ba; +- +-static int sch_gpio_core_direction_in(struct gpio_chip *gc, unsigned gpio_num) +-{ +- u8 curr_dirs; +- unsigned short offset, bit; +- +- spin_lock(&gpio_lock); +- +- offset = CGIO + gpio_num / 8; +- bit = gpio_num % 8; +- +- curr_dirs = inb(gpio_ba + offset); +- +- if (!(curr_dirs & (1 << bit))) +- outb(curr_dirs | (1 << bit), gpio_ba + offset); ++#define GEN 0x00 ++#define GIO 0x04 ++#define GLV 0x08 ++ ++struct sch_gpio { ++ struct gpio_chip chip; ++ spinlock_t lock; ++ unsigned short iobase; ++ unsigned short core_base; ++ unsigned short resume_base; ++}; + +- spin_unlock(&gpio_lock); +- return 0; +-} ++#define to_sch_gpio(c) container_of(c, struct sch_gpio, chip) + +-static int sch_gpio_core_get(struct gpio_chip *gc, unsigned gpio_num) ++static unsigned sch_gpio_offset(struct sch_gpio *sch, unsigned gpio, ++ unsigned reg) + { +- int res; +- unsigned short offset, bit; ++ unsigned base = 0; + +- offset = CGLV + gpio_num / 8; +- bit = gpio_num % 8; ++ if (gpio >= sch->resume_base) { ++ gpio -= sch->resume_base; ++ base += 0x20; ++ } + +- res = !!(inb(gpio_ba + offset) & (1 << bit)); +- return res; ++ return base + reg + gpio / 8; + } + +-static void sch_gpio_core_set(struct gpio_chip *gc, unsigned gpio_num, int val) ++static unsigned sch_gpio_bit(struct sch_gpio *sch, unsigned gpio) + { +- u8 curr_vals; +- unsigned short offset, bit; +- +- spin_lock(&gpio_lock); +- +- offset = CGLV + gpio_num / 8; +- bit = gpio_num % 8; +- +- curr_vals = inb(gpio_ba + offset); +- +- if (val) +- outb(curr_vals | (1 << bit), gpio_ba + offset); +- else +- outb((curr_vals & ~(1 << bit)), gpio_ba + offset); +- spin_unlock(&gpio_lock); ++ if (gpio >= sch->resume_base) ++ gpio -= sch->resume_base; ++ return gpio % 8; + } + +-static int sch_gpio_core_direction_out(struct gpio_chip *gc, +- unsigned gpio_num, int val) ++static void sch_gpio_enable(struct sch_gpio *sch, unsigned gpio) + { +- u8 curr_dirs; + unsigned short offset, bit; ++ u8 enable; + +- spin_lock(&gpio_lock); ++ spin_lock(&sch->lock); + +- offset = CGIO + gpio_num / 8; +- bit = gpio_num % 8; +- +- curr_dirs = inb(gpio_ba + offset); +- if (curr_dirs & (1 << bit)) +- outb(curr_dirs & ~(1 << bit), gpio_ba + offset); ++ offset = sch_gpio_offset(sch, gpio, GEN); ++ bit = sch_gpio_bit(sch, gpio); + +- spin_unlock(&gpio_lock); ++ enable = inb(sch->iobase + offset); ++ if (!(enable & (1 << bit))) ++ outb(enable | (1 << bit), sch->iobase + offset); + +- /* +- * according to the datasheet, writing to the level register has no +- * effect when GPIO is programmed as input. +- * Actually the the level register is read-only when configured as input. +- * Thus presetting the output level before switching to output is _NOT_ possible. +- * Hence we set the level after configuring the GPIO as output. +- * But we cannot prevent a short low pulse if direction is set to high +- * and an external pull-up is connected. +- */ +- sch_gpio_core_set(gc, gpio_num, val); +- return 0; ++ spin_unlock(&sch->lock); + } + +-static struct gpio_chip sch_gpio_core = { +- .label = "sch_gpio_core", +- .owner = THIS_MODULE, +- .direction_input = sch_gpio_core_direction_in, +- .get = sch_gpio_core_get, +- .direction_output = sch_gpio_core_direction_out, +- .set = sch_gpio_core_set, +-}; +- +-static int sch_gpio_resume_direction_in(struct gpio_chip *gc, +- unsigned gpio_num) ++static int sch_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num) + { ++ struct sch_gpio *sch = to_sch_gpio(gc); + u8 curr_dirs; + unsigned short offset, bit; + +- spin_lock(&gpio_lock); ++ spin_lock(&sch->lock); + +- offset = RGIO + gpio_num / 8; +- bit = gpio_num % 8; ++ offset = sch_gpio_offset(sch, gpio_num, GIO); ++ bit = sch_gpio_bit(sch, gpio_num); + +- curr_dirs = inb(gpio_ba + offset); ++ curr_dirs = inb(sch->iobase + offset); + + if (!(curr_dirs & (1 << bit))) +- outb(curr_dirs | (1 << bit), gpio_ba + offset); ++ outb(curr_dirs | (1 << bit), sch->iobase + offset); + +- spin_unlock(&gpio_lock); ++ spin_unlock(&sch->lock); + return 0; + } + +-static int sch_gpio_resume_get(struct gpio_chip *gc, unsigned gpio_num) ++static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num) + { ++ struct sch_gpio *sch = to_sch_gpio(gc); ++ int res; + unsigned short offset, bit; + +- offset = RGLV + gpio_num / 8; +- bit = gpio_num % 8; ++ offset = sch_gpio_offset(sch, gpio_num, GLV); ++ bit = sch_gpio_bit(sch, gpio_num); ++ ++ res = !!(inb(sch->iobase + offset) & (1 << bit)); + +- return !!(inb(gpio_ba + offset) & (1 << bit)); ++ return res; + } + +-static void sch_gpio_resume_set(struct gpio_chip *gc, +- unsigned gpio_num, int val) ++static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val) + { ++ struct sch_gpio *sch = to_sch_gpio(gc); + u8 curr_vals; + unsigned short offset, bit; + +- spin_lock(&gpio_lock); ++ spin_lock(&sch->lock); + +- offset = RGLV + gpio_num / 8; +- bit = gpio_num % 8; ++ offset = sch_gpio_offset(sch, gpio_num, GLV); ++ bit = sch_gpio_bit(sch, gpio_num); + +- curr_vals = inb(gpio_ba + offset); ++ curr_vals = inb(sch->iobase + offset); + + if (val) +- outb(curr_vals | (1 << bit), gpio_ba + offset); ++ outb(curr_vals | (1 << bit), sch->iobase + offset); + else +- outb((curr_vals & ~(1 << bit)), gpio_ba + offset); ++ outb((curr_vals & ~(1 << bit)), sch->iobase + offset); + +- spin_unlock(&gpio_lock); ++ spin_unlock(&sch->lock); + } + +-static int sch_gpio_resume_direction_out(struct gpio_chip *gc, +- unsigned gpio_num, int val) ++static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num, ++ int val) + { ++ struct sch_gpio *sch = to_sch_gpio(gc); + u8 curr_dirs; + unsigned short offset, bit; + +- offset = RGIO + gpio_num / 8; +- bit = gpio_num % 8; ++ spin_lock(&sch->lock); + +- spin_lock(&gpio_lock); ++ offset = sch_gpio_offset(sch, gpio_num, GIO); ++ bit = sch_gpio_bit(sch, gpio_num); + +- curr_dirs = inb(gpio_ba + offset); ++ curr_dirs = inb(sch->iobase + offset); + if (curr_dirs & (1 << bit)) +- outb(curr_dirs & ~(1 << bit), gpio_ba + offset); ++ outb(curr_dirs & ~(1 << bit), sch->iobase + offset); + +- spin_unlock(&gpio_lock); ++ spin_unlock(&sch->lock); + + /* +- * according to the datasheet, writing to the level register has no +- * effect when GPIO is programmed as input. +- * Actually the the level register is read-only when configured as input. +- * Thus presetting the output level before switching to output is _NOT_ possible. +- * Hence we set the level after configuring the GPIO as output. +- * But we cannot prevent a short low pulse if direction is set to high +- * and an external pull-up is connected. +- */ +- sch_gpio_resume_set(gc, gpio_num, val); ++ * according to the datasheet, writing to the level register has no ++ * effect when GPIO is programmed as input. ++ * Actually the the level register is read-only when configured as input. ++ * Thus presetting the output level before switching to output is _NOT_ possible. ++ * Hence we set the level after configuring the GPIO as output. ++ * But we cannot prevent a short low pulse if direction is set to high ++ * and an external pull-up is connected. ++ */ ++ sch_gpio_set(gc, gpio_num, val); + return 0; + } + +-static struct gpio_chip sch_gpio_resume = { +- .label = "sch_gpio_resume", ++static struct gpio_chip sch_gpio_chip = { ++ .label = "sch_gpio", + .owner = THIS_MODULE, +- .direction_input = sch_gpio_resume_direction_in, +- .get = sch_gpio_resume_get, +- .direction_output = sch_gpio_resume_direction_out, +- .set = sch_gpio_resume_set, ++ .direction_input = sch_gpio_direction_in, ++ .get = sch_gpio_get, ++ .direction_output = sch_gpio_direction_out, ++ .set = sch_gpio_set, + }; + + static int sch_gpio_probe(struct platform_device *pdev) + { ++ struct sch_gpio *sch; + struct resource *res; +- int err, id; + +- id = pdev->id; +- if (!id) +- return -ENODEV; ++ sch = devm_kzalloc(&pdev->dev, sizeof(*sch), GFP_KERNEL); ++ if (!sch) ++ return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_IO, 0); + if (!res) + return -EBUSY; + +- if (!request_region(res->start, resource_size(res), pdev->name)) ++ if (!devm_request_region(&pdev->dev, res->start, resource_size(res), ++ pdev->name)) + return -EBUSY; + +- gpio_ba = res->start; ++ spin_lock_init(&sch->lock); ++ sch->iobase = res->start; ++ sch->chip = sch_gpio_chip; ++ sch->chip.label = dev_name(&pdev->dev); ++ sch->chip.dev = &pdev->dev; + +- switch (id) { ++ switch (pdev->id) { + case PCI_DEVICE_ID_INTEL_SCH_LPC: +- sch_gpio_core.base = 0; +- sch_gpio_core.ngpio = 10; +- sch_gpio_resume.base = 10; +- sch_gpio_resume.ngpio = 4; ++ sch->core_base = 0; ++ sch->resume_base = 10; ++ sch->chip.ngpio = 14; ++ + /* + * GPIO[6:0] enabled by default + * GPIO7 is configured by the CMC as SLPIOVR + * Enable GPIO[9:8] core powered gpios explicitly + */ +- outb(0x3, gpio_ba + CGEN + 1); ++ sch_gpio_enable(sch, 8); ++ sch_gpio_enable(sch, 9); + /* + * SUS_GPIO[2:0] enabled by default + * Enable SUS_GPIO3 resume powered gpio explicitly + */ +- outb(0x8, gpio_ba + RGEN); ++ sch_gpio_enable(sch, 13); + break; + + case PCI_DEVICE_ID_INTEL_ITC_LPC: +- sch_gpio_core.base = 0; +- sch_gpio_core.ngpio = 5; +- sch_gpio_resume.base = 5; +- sch_gpio_resume.ngpio = 9; ++ sch->core_base = 0; ++ sch->resume_base = 5; ++ sch->chip.ngpio = 14; + break; + + case PCI_DEVICE_ID_INTEL_CENTERTON_ILB: +- sch_gpio_core.base = 0; +- sch_gpio_core.ngpio = 21; +- sch_gpio_resume.base = 21; +- sch_gpio_resume.ngpio = 9; ++ sch->core_base = 0; ++ sch->resume_base = 21; ++ sch->chip.ngpio = 30; + break; + + default: +- err = -ENODEV; +- goto err_sch_gpio_core; ++ return -ENODEV; + } + +- sch_gpio_core.dev = &pdev->dev; +- sch_gpio_resume.dev = &pdev->dev; +- +- err = gpiochip_add(&sch_gpio_core); +- if (err < 0) +- goto err_sch_gpio_core; ++ platform_set_drvdata(pdev, sch); + +- err = gpiochip_add(&sch_gpio_resume); +- if (err < 0) +- goto err_sch_gpio_resume; +- +- return 0; +- +-err_sch_gpio_resume: +- gpiochip_remove(&sch_gpio_core); +- +-err_sch_gpio_core: +- release_region(res->start, resource_size(res)); +- gpio_ba = 0; +- +- return err; ++ return gpiochip_add(&sch->chip); + } + + static int sch_gpio_remove(struct platform_device *pdev) + { +- struct resource *res; +- if (gpio_ba) { +- +- gpiochip_remove(&sch_gpio_core); +- gpiochip_remove(&sch_gpio_resume); +- +- res = platform_get_resource(pdev, IORESOURCE_IO, 0); +- +- release_region(res->start, resource_size(res)); +- gpio_ba = 0; +- } ++ struct sch_gpio *sch = platform_get_drvdata(pdev); + ++ gpiochip_remove(&sch->chip); + return 0; + } + +diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c +index 05c6275..ba98bb5 100644 +--- a/drivers/gpio/gpiolib-acpi.c ++++ b/drivers/gpio/gpiolib-acpi.c +@@ -287,9 +287,45 @@ void acpi_gpiochip_free_interrupts(struct gpio_chip *chip) + } + } + ++int acpi_dev_add_driver_gpios(struct acpi_device *adev, ++ const struct acpi_gpio_mapping *gpios) ++{ ++ if (adev && gpios) { ++ adev->driver_gpios = gpios; ++ return 0; ++ } ++ return -EINVAL; ++} ++EXPORT_SYMBOL_GPL(acpi_dev_add_driver_gpios); ++ ++static bool acpi_get_driver_gpio_data(struct acpi_device *adev, ++ const char *name, int index, ++ struct acpi_reference_args *args) ++{ ++ const struct acpi_gpio_mapping *gm; ++ ++ if (!adev->driver_gpios) ++ return false; ++ ++ for (gm = adev->driver_gpios; gm->name; gm++) ++ if (!strcmp(name, gm->name) && gm->data && index < gm->size) { ++ const struct acpi_gpio_params *par = gm->data + index; ++ ++ args->adev = adev; ++ args->args[0] = par->crs_entry_index; ++ args->args[1] = par->line_index; ++ args->args[2] = par->active_low; ++ args->nargs = 3; ++ return true; ++ } ++ ++ return false; ++} ++ + struct acpi_gpio_lookup { + struct acpi_gpio_info info; + int index; ++ int pin_index; + struct gpio_desc *desc; + int n; + }; +@@ -303,13 +339,24 @@ static int acpi_find_gpio(struct acpi_resource *ares, void *data) + + if (lookup->n++ == lookup->index && !lookup->desc) { + const struct acpi_resource_gpio *agpio = &ares->data.gpio; ++ int pin_index = lookup->pin_index; ++ ++ if (pin_index >= agpio->pin_table_length) ++ return 1; + + lookup->desc = acpi_get_gpiod(agpio->resource_source.string_ptr, +- agpio->pin_table[0]); ++ agpio->pin_table[pin_index]); + lookup->info.gpioint = + agpio->connection_type == ACPI_RESOURCE_GPIO_TYPE_INT; +- lookup->info.active_low = +- agpio->polarity == ACPI_ACTIVE_LOW; ++ ++ /* ++ * ActiveLow is only specified for GpioInt resource. If ++ * GpioIo is used then the only way to set the flag is ++ * to use _DSD "gpios" property. ++ */ ++ if (lookup->info.gpioint) ++ lookup->info.active_low = ++ agpio->polarity == ACPI_ACTIVE_LOW; + } + + return 1; +@@ -317,40 +364,79 @@ static int acpi_find_gpio(struct acpi_resource *ares, void *data) + + /** + * acpi_get_gpiod_by_index() - get a GPIO descriptor from device resources +- * @dev: pointer to a device to get GPIO from ++ * @adev: pointer to a ACPI device to get GPIO from ++ * @propname: Property name of the GPIO (optional) + * @index: index of GpioIo/GpioInt resource (starting from %0) + * @info: info pointer to fill in (optional) + * +- * Function goes through ACPI resources for @dev and based on @index looks ++ * Function goes through ACPI resources for @adev and based on @index looks + * up a GpioIo/GpioInt resource, translates it to the Linux GPIO descriptor, + * and returns it. @index matches GpioIo/GpioInt resources only so if there + * are total %3 GPIO resources, the index goes from %0 to %2. + * ++ * If @propname is specified the GPIO is looked using device property. In ++ * that case @index is used to select the GPIO entry in the property value ++ * (in case of multiple). ++ * + * If the GPIO cannot be translated or there is an error an ERR_PTR is + * returned. + * + * Note: if the GPIO resource has multiple entries in the pin list, this + * function only returns the first. + */ +-struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, ++struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev, ++ const char *propname, int index, + struct acpi_gpio_info *info) + { + struct acpi_gpio_lookup lookup; + struct list_head resource_list; +- struct acpi_device *adev; +- acpi_handle handle; ++ bool active_low = false; + int ret; + +- if (!dev) +- return ERR_PTR(-EINVAL); +- +- handle = ACPI_HANDLE(dev); +- if (!handle || acpi_bus_get_device(handle, &adev)) ++ if (!adev) + return ERR_PTR(-ENODEV); + + memset(&lookup, 0, sizeof(lookup)); + lookup.index = index; + ++ if (propname) { ++ struct acpi_reference_args args; ++ ++ dev_dbg(&adev->dev, "GPIO: looking up %s\n", propname); ++ ++ memset(&args, 0, sizeof(args)); ++ ret = acpi_dev_get_property_reference(adev, propname, ++ index, &args); ++ if (ret) { ++ bool found = acpi_get_driver_gpio_data(adev, propname, ++ index, &args); ++ if (!found) ++ return ERR_PTR(ret); ++ } ++ ++ /* ++ * The property was found and resolved so need to ++ * lookup the GPIO based on returned args instead. ++ */ ++ adev = args.adev; ++ if (args.nargs >= 2) { ++ lookup.index = args.args[0]; ++ lookup.pin_index = args.args[1]; ++ /* ++ * 3rd argument, if present is used to ++ * specify active_low. ++ */ ++ if (args.nargs >= 3) ++ active_low = !!args.args[2]; ++ } ++ ++ dev_dbg(&adev->dev, "GPIO: _DSD returned %s %zd %llu %llu %llu\n", ++ dev_name(&adev->dev), args.nargs, ++ args.args[0], args.args[1], args.args[2]); ++ } else { ++ dev_dbg(&adev->dev, "GPIO: looking up %d in _CRS\n", index); ++ } ++ + INIT_LIST_HEAD(&resource_list); + ret = acpi_dev_get_resources(adev, &resource_list, acpi_find_gpio, + &lookup); +@@ -359,8 +445,11 @@ struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, + + acpi_dev_free_resource_list(&resource_list); + +- if (lookup.desc && info) ++ if (lookup.desc && info) { + *info = lookup.info; ++ if (active_low) ++ info->active_low = active_low; ++ } + + return lookup.desc ? lookup.desc : ERR_PTR(-ENOENT); + } +diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c +index e8e98ca..58659db 100644 +--- a/drivers/gpio/gpiolib.c ++++ b/drivers/gpio/gpiolib.c +@@ -1505,14 +1505,36 @@ static struct gpio_desc *acpi_find_gpio(struct device *dev, const char *con_id, + unsigned int idx, + enum gpio_lookup_flags *flags) + { ++ static const char * const suffixes[] = { "gpios", "gpio" }; ++ struct acpi_device *adev = ACPI_COMPANION(dev); + struct acpi_gpio_info info; + struct gpio_desc *desc; ++ char propname[32]; ++ int i; + +- desc = acpi_get_gpiod_by_index(dev, idx, &info); +- if (IS_ERR(desc)) +- return desc; ++ /* Try first from _DSD */ ++ for (i = 0; i < ARRAY_SIZE(suffixes); i++) { ++ if (con_id && strcmp(con_id, "gpios")) { ++ snprintf(propname, sizeof(propname), "%s-%s", ++ con_id, suffixes[i]); ++ } else { ++ snprintf(propname, sizeof(propname), "%s", ++ suffixes[i]); ++ } ++ ++ desc = acpi_get_gpiod_by_index(adev, propname, idx, &info); ++ if (!IS_ERR(desc) || (PTR_ERR(desc) == -EPROBE_DEFER)) ++ break; ++ } + +- if (info.gpioint && info.active_low) ++ /* Then from plain _CRS GPIOs */ ++ if (IS_ERR(desc)) { ++ desc = acpi_get_gpiod_by_index(adev, NULL, idx, &info); ++ if (IS_ERR(desc)) ++ return desc; ++ } ++ ++ if (info.active_low) + *flags |= GPIO_ACTIVE_LOW; + + return desc; +@@ -1713,6 +1735,61 @@ struct gpio_desc *__must_check __gpiod_get_index(struct device *dev, + EXPORT_SYMBOL_GPL(__gpiod_get_index); + + /** ++ * fwnode_get_named_gpiod - obtain a GPIO from firmware node ++ * @fwnode: handle of the firmware node ++ * @propname: name of the firmware property representing the GPIO ++ * ++ * This function can be used for drivers that get their configuration ++ * from firmware. ++ * ++ * Function properly finds the corresponding GPIO using whatever is the ++ * underlying firmware interface and then makes sure that the GPIO ++ * descriptor is requested before it is returned to the caller. ++ * ++ * In case of error an ERR_PTR() is returned. ++ */ ++struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, ++ const char *propname) ++{ ++ struct gpio_desc *desc = ERR_PTR(-ENODEV); ++ bool active_low = false; ++ int ret; ++ ++ if (!fwnode) ++ return ERR_PTR(-EINVAL); ++ ++ if (is_of_node(fwnode)) { ++ enum of_gpio_flags flags; ++ ++ desc = of_get_named_gpiod_flags(of_node(fwnode), propname, 0, ++ &flags); ++ if (!IS_ERR(desc)) ++ active_low = flags & OF_GPIO_ACTIVE_LOW; ++ } else if (is_acpi_node(fwnode)) { ++ struct acpi_gpio_info info; ++ ++ desc = acpi_get_gpiod_by_index(acpi_node(fwnode), propname, 0, ++ &info); ++ if (!IS_ERR(desc)) ++ active_low = info.active_low; ++ } ++ ++ if (IS_ERR(desc)) ++ return desc; ++ ++ ret = gpiod_request(desc, NULL); ++ if (ret) ++ return ERR_PTR(ret); ++ ++ /* Only value flag can be set from both DT and ACPI is active_low */ ++ if (active_low) ++ set_bit(FLAG_ACTIVE_LOW, &desc->flags); ++ ++ return desc; ++} ++EXPORT_SYMBOL_GPL(fwnode_get_named_gpiod); ++ ++/** + * gpiod_get_index_optional - obtain an optional GPIO from a multi-index GPIO + * function + * @dev: GPIO consumer, can be NULL for system-global GPIOs +diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h +index 9db2b6a..e3a5211 100644 +--- a/drivers/gpio/gpiolib.h ++++ b/drivers/gpio/gpiolib.h +@@ -34,7 +34,8 @@ void acpi_gpiochip_remove(struct gpio_chip *chip); + void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); + void acpi_gpiochip_free_interrupts(struct gpio_chip *chip); + +-struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index, ++struct gpio_desc *acpi_get_gpiod_by_index(struct acpi_device *adev, ++ const char *propname, int index, + struct acpi_gpio_info *info); + #else + static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } +@@ -47,8 +48,8 @@ static inline void + acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { } + + static inline struct gpio_desc * +-acpi_get_gpiod_by_index(struct device *dev, int index, +- struct acpi_gpio_info *info) ++acpi_get_gpiod_by_index(struct acpi_device *adev, const char *propname, ++ int index, struct acpi_gpio_info *info) + { + return ERR_PTR(-ENOSYS); + } +diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c +index 432d363..c9c1c8c 100644 +--- a/drivers/input/keyboard/gpio_keys_polled.c ++++ b/drivers/input/keyboard/gpio_keys_polled.c +@@ -23,10 +23,9 @@ + #include <linux/ioport.h> + #include <linux/platform_device.h> + #include <linux/gpio.h> ++#include <linux/gpio/consumer.h> + #include <linux/gpio_keys.h> +-#include <linux/of.h> +-#include <linux/of_platform.h> +-#include <linux/of_gpio.h> ++#include <linux/property.h> + + #define DRV_NAME "gpio-keys-polled" + +@@ -51,15 +50,14 @@ static void gpio_keys_polled_check_state(struct input_dev *input, + int state; + + if (bdata->can_sleep) +- state = !!gpio_get_value_cansleep(button->gpio); ++ state = !!gpiod_get_value_cansleep(button->gpiod); + else +- state = !!gpio_get_value(button->gpio); ++ state = !!gpiod_get_value(button->gpiod); + + if (state != bdata->last_state) { + unsigned int type = button->type ?: EV_KEY; + +- input_event(input, type, button->code, +- !!(state ^ button->active_low)); ++ input_event(input, type, button->code, state); + input_sync(input); + bdata->count = 0; + bdata->last_state = state; +@@ -102,21 +100,15 @@ static void gpio_keys_polled_close(struct input_polled_dev *dev) + pdata->disable(bdev->dev); + } + +-#ifdef CONFIG_OF + static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct device *dev) + { +- struct device_node *node, *pp; + struct gpio_keys_platform_data *pdata; + struct gpio_keys_button *button; ++ struct fwnode_handle *child; + int error; + int nbuttons; +- int i; +- +- node = dev->of_node; +- if (!node) +- return NULL; + +- nbuttons = of_get_child_count(node); ++ nbuttons = device_get_child_node_count(dev); + if (nbuttons == 0) + return NULL; + +@@ -126,52 +118,44 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct + return ERR_PTR(-ENOMEM); + + pdata->buttons = (struct gpio_keys_button *)(pdata + 1); +- pdata->nbuttons = nbuttons; + +- pdata->rep = !!of_get_property(node, "autorepeat", NULL); +- of_property_read_u32(node, "poll-interval", &pdata->poll_interval); ++ pdata->rep = device_property_present(dev, "autorepeat"); ++ device_property_read_u32(dev, "poll-interval", &pdata->poll_interval); + +- i = 0; +- for_each_child_of_node(node, pp) { +- int gpio; +- enum of_gpio_flags flags; ++ device_for_each_child_node(dev, child) { ++ struct gpio_desc *desc; + +- if (!of_find_property(pp, "gpios", NULL)) { +- pdata->nbuttons--; +- dev_warn(dev, "Found button without gpios\n"); +- continue; +- } +- +- gpio = of_get_gpio_flags(pp, 0, &flags); +- if (gpio < 0) { +- error = gpio; ++ desc = devm_get_gpiod_from_child(dev, child); ++ if (IS_ERR(desc)) { ++ error = PTR_ERR(desc); + if (error != -EPROBE_DEFER) + dev_err(dev, + "Failed to get gpio flags, error: %d\n", + error); ++ fwnode_handle_put(child); + return ERR_PTR(error); + } + +- button = &pdata->buttons[i++]; +- +- button->gpio = gpio; +- button->active_low = flags & OF_GPIO_ACTIVE_LOW; ++ button = &pdata->buttons[pdata->nbuttons++]; ++ button->gpiod = desc; + +- if (of_property_read_u32(pp, "linux,code", &button->code)) { +- dev_err(dev, "Button without keycode: 0x%x\n", +- button->gpio); ++ if (fwnode_property_read_u32(child, "linux,code", &button->code)) { ++ dev_err(dev, "Button without keycode: %d\n", ++ pdata->nbuttons - 1); ++ fwnode_handle_put(child); + return ERR_PTR(-EINVAL); + } + +- button->desc = of_get_property(pp, "label", NULL); ++ fwnode_property_read_string(child, "label", &button->desc); + +- if (of_property_read_u32(pp, "linux,input-type", &button->type)) ++ if (fwnode_property_read_u32(child, "linux,input-type", ++ &button->type)) + button->type = EV_KEY; + +- button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL); ++ button->wakeup = fwnode_property_present(child, "gpio-key,wakeup"); + +- if (of_property_read_u32(pp, "debounce-interval", +- &button->debounce_interval)) ++ if (fwnode_property_read_u32(child, "debounce-interval", ++ &button->debounce_interval)) + button->debounce_interval = 5; + } + +@@ -187,15 +171,6 @@ static const struct of_device_id gpio_keys_polled_of_match[] = { + }; + MODULE_DEVICE_TABLE(of, gpio_keys_polled_of_match); + +-#else +- +-static inline struct gpio_keys_platform_data * +-gpio_keys_polled_get_devtree_pdata(struct device *dev) +-{ +- return NULL; +-} +-#endif +- + static int gpio_keys_polled_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -259,7 +234,6 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) + for (i = 0; i < pdata->nbuttons; i++) { + struct gpio_keys_button *button = &pdata->buttons[i]; + struct gpio_keys_button_data *bdata = &bdev->data[i]; +- unsigned int gpio = button->gpio; + unsigned int type = button->type ?: EV_KEY; + + if (button->wakeup) { +@@ -267,15 +241,31 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) + return -EINVAL; + } + +- error = devm_gpio_request_one(&pdev->dev, gpio, GPIOF_IN, +- button->desc ? : DRV_NAME); +- if (error) { +- dev_err(dev, "unable to claim gpio %u, err=%d\n", +- gpio, error); +- return error; ++ /* ++ * Legacy GPIO number so request the GPIO here and ++ * convert it to descriptor. ++ */ ++ if (!button->gpiod && gpio_is_valid(button->gpio)) { ++ unsigned flags = 0; ++ ++ if (button->active_low) ++ flags |= GPIOF_ACTIVE_LOW; ++ ++ error = devm_gpio_request_one(&pdev->dev, button->gpio, ++ flags, button->desc ? : DRV_NAME); ++ if (error) { ++ dev_err(dev, "unable to claim gpio %u, err=%d\n", ++ button->gpio, error); ++ return error; ++ } ++ ++ button->gpiod = gpio_to_desc(button->gpio); + } + +- bdata->can_sleep = gpio_cansleep(gpio); ++ if (IS_ERR(button->gpiod)) ++ return PTR_ERR(button->gpiod); ++ ++ bdata->can_sleep = gpiod_cansleep(button->gpiod); + bdata->last_state = -1; + bdata->threshold = DIV_ROUND_UP(button->debounce_interval, + pdata->poll_interval); +@@ -308,7 +298,7 @@ static struct platform_driver gpio_keys_polled_driver = { + .driver = { + .name = DRV_NAME, + .owner = THIS_MODULE, +- .of_match_table = of_match_ptr(gpio_keys_polled_of_match), ++ .of_match_table = gpio_keys_polled_of_match, + }, + }; + module_platform_driver(gpio_keys_polled_driver); +diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c +index 60558f7..3b92862 100644 +--- a/drivers/iommu/arm-smmu.c ++++ b/drivers/iommu/arm-smmu.c +@@ -444,7 +444,10 @@ static struct device_node *dev_get_dev_node(struct device *dev) + + while (!pci_is_root_bus(bus)) + bus = bus->parent; +- return bus->bridge->parent->of_node; ++ if (bus->bridge->parent) ++ return bus->bridge->parent->of_node; ++ else ++ return NULL; + } + + return dev->of_node; +@@ -560,6 +563,9 @@ static struct arm_smmu_device *find_smmu_for_device(struct device *dev) + struct arm_smmu_master *master = NULL; + struct device_node *dev_node = dev_get_dev_node(dev); + ++ if (!dev_node) ++ return NULL; ++ + spin_lock(&arm_smmu_devices_lock); + list_for_each_entry(smmu, &arm_smmu_devices, list) { + master = find_smmu_master(smmu, dev_node); diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c -index a0698b4..d2da911 100644 +index aa17ae8..d330dab 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c -@@ -490,9 +490,19 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) +@@ -506,9 +506,19 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) isb(); } @@ -4548,7 +8662,7 @@ index a0698b4..d2da911 100644 } diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c -index dda6dbc..5d9bdd3 100644 +index 38493ff..26e6773 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -33,12 +33,14 @@ @@ -4566,7 +8680,7 @@ index dda6dbc..5d9bdd3 100644 #include <asm/cputype.h> #include <asm/irq.h> -@@ -622,6 +624,13 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) +@@ -641,6 +643,13 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) raw_spin_unlock_irqrestore(&irq_controller_lock, flags); } @@ -4580,7 +8694,7 @@ index dda6dbc..5d9bdd3 100644 #endif #ifdef CONFIG_BL_SWITCHER -@@ -977,6 +986,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, +@@ -996,6 +1005,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, #ifdef CONFIG_SMP set_smp_cross_call(gic_raise_softirq); register_cpu_notifier(&gic_cpu_notifier); @@ -4590,7 +8704,7 @@ index dda6dbc..5d9bdd3 100644 #endif set_handle_irq(gic_handle_irq); } -@@ -1029,3 +1041,107 @@ IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init); +@@ -1048,3 +1060,107 @@ IRQCHIP_DECLARE(msm_8660_qgic, "qcom,msm-8660-qgic", gic_of_init); IRQCHIP_DECLARE(msm_qgic2, "qcom,msm-qgic2", gic_of_init); #endif @@ -4717,11 +8831,415 @@ index 0fe2f71..9106c6d 100644 + + acpi_gic_init(); } +diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c +index b4518c8..b3c5d9d 100644 +--- a/drivers/leds/leds-gpio.c ++++ b/drivers/leds/leds-gpio.c +@@ -12,25 +12,23 @@ + */ + #include <linux/err.h> + #include <linux/gpio.h> ++#include <linux/gpio/consumer.h> + #include <linux/kernel.h> + #include <linux/leds.h> + #include <linux/module.h> +-#include <linux/of.h> +-#include <linux/of_gpio.h> +-#include <linux/of_platform.h> + #include <linux/platform_device.h> ++#include <linux/property.h> + #include <linux/slab.h> + #include <linux/workqueue.h> + + struct gpio_led_data { + struct led_classdev cdev; +- unsigned gpio; ++ struct gpio_desc *gpiod; + struct work_struct work; + u8 new_level; + u8 can_sleep; +- u8 active_low; + u8 blinking; +- int (*platform_gpio_blink_set)(unsigned gpio, int state, ++ int (*platform_gpio_blink_set)(struct gpio_desc *desc, int state, + unsigned long *delay_on, unsigned long *delay_off); + }; + +@@ -40,12 +38,11 @@ static void gpio_led_work(struct work_struct *work) + container_of(work, struct gpio_led_data, work); + + if (led_dat->blinking) { +- led_dat->platform_gpio_blink_set(led_dat->gpio, +- led_dat->new_level, +- NULL, NULL); ++ led_dat->platform_gpio_blink_set(led_dat->gpiod, ++ led_dat->new_level, NULL, NULL); + led_dat->blinking = 0; + } else +- gpio_set_value_cansleep(led_dat->gpio, led_dat->new_level); ++ gpiod_set_value_cansleep(led_dat->gpiod, led_dat->new_level); + } + + static void gpio_led_set(struct led_classdev *led_cdev, +@@ -60,9 +57,6 @@ static void gpio_led_set(struct led_classdev *led_cdev, + else + level = 1; + +- if (led_dat->active_low) +- level = !level; +- + /* Setting GPIOs with I2C/etc requires a task context, and we don't + * seem to have a reliable way to know if we're already in one; so + * let's just assume the worst. +@@ -72,11 +66,11 @@ static void gpio_led_set(struct led_classdev *led_cdev, + schedule_work(&led_dat->work); + } else { + if (led_dat->blinking) { +- led_dat->platform_gpio_blink_set(led_dat->gpio, level, ++ led_dat->platform_gpio_blink_set(led_dat->gpiod, level, + NULL, NULL); + led_dat->blinking = 0; + } else +- gpio_set_value(led_dat->gpio, level); ++ gpiod_set_value(led_dat->gpiod, level); + } + } + +@@ -87,34 +81,49 @@ static int gpio_blink_set(struct led_classdev *led_cdev, + container_of(led_cdev, struct gpio_led_data, cdev); + + led_dat->blinking = 1; +- return led_dat->platform_gpio_blink_set(led_dat->gpio, GPIO_LED_BLINK, ++ return led_dat->platform_gpio_blink_set(led_dat->gpiod, GPIO_LED_BLINK, + delay_on, delay_off); + } + + static int create_gpio_led(const struct gpio_led *template, + struct gpio_led_data *led_dat, struct device *parent, +- int (*blink_set)(unsigned, int, unsigned long *, unsigned long *)) ++ int (*blink_set)(struct gpio_desc *, int, unsigned long *, ++ unsigned long *)) + { + int ret, state; + +- led_dat->gpio = -1; ++ led_dat->gpiod = template->gpiod; ++ if (!led_dat->gpiod) { ++ /* ++ * This is the legacy code path for platform code that ++ * still uses GPIO numbers. Ultimately we would like to get ++ * rid of this block completely. ++ */ ++ unsigned long flags = 0; ++ ++ /* skip leds that aren't available */ ++ if (!gpio_is_valid(template->gpio)) { ++ dev_info(parent, "Skipping unavailable LED gpio %d (%s)\n", ++ template->gpio, template->name); ++ return 0; ++ } + +- /* skip leds that aren't available */ +- if (!gpio_is_valid(template->gpio)) { +- dev_info(parent, "Skipping unavailable LED gpio %d (%s)\n", +- template->gpio, template->name); +- return 0; +- } ++ if (template->active_low) ++ flags |= GPIOF_ACTIVE_LOW; + +- ret = devm_gpio_request(parent, template->gpio, template->name); +- if (ret < 0) +- return ret; ++ ret = devm_gpio_request_one(parent, template->gpio, flags, ++ template->name); ++ if (ret < 0) ++ return ret; ++ ++ led_dat->gpiod = gpio_to_desc(template->gpio); ++ if (IS_ERR(led_dat->gpiod)) ++ return PTR_ERR(led_dat->gpiod); ++ } + + led_dat->cdev.name = template->name; + led_dat->cdev.default_trigger = template->default_trigger; +- led_dat->gpio = template->gpio; +- led_dat->can_sleep = gpio_cansleep(template->gpio); +- led_dat->active_low = template->active_low; ++ led_dat->can_sleep = gpiod_cansleep(led_dat->gpiod); + led_dat->blinking = 0; + if (blink_set) { + led_dat->platform_gpio_blink_set = blink_set; +@@ -122,30 +131,24 @@ static int create_gpio_led(const struct gpio_led *template, + } + led_dat->cdev.brightness_set = gpio_led_set; + if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) +- state = !!gpio_get_value_cansleep(led_dat->gpio) ^ led_dat->active_low; ++ state = !!gpiod_get_value_cansleep(led_dat->gpiod); + else + state = (template->default_state == LEDS_GPIO_DEFSTATE_ON); + led_dat->cdev.brightness = state ? LED_FULL : LED_OFF; + if (!template->retain_state_suspended) + led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; + +- ret = gpio_direction_output(led_dat->gpio, led_dat->active_low ^ state); ++ ret = gpiod_direction_output(led_dat->gpiod, state); + if (ret < 0) + return ret; + + INIT_WORK(&led_dat->work, gpio_led_work); + +- ret = led_classdev_register(parent, &led_dat->cdev); +- if (ret < 0) +- return ret; +- +- return 0; ++ return led_classdev_register(parent, &led_dat->cdev); + } + + static void delete_gpio_led(struct gpio_led_data *led) + { +- if (!gpio_is_valid(led->gpio)) +- return; + led_classdev_unregister(&led->cdev); + cancel_work_sync(&led->work); + } +@@ -161,40 +164,37 @@ static inline int sizeof_gpio_leds_priv(int num_leds) + (sizeof(struct gpio_led_data) * num_leds); + } + +-/* Code to create from OpenFirmware platform devices */ +-#ifdef CONFIG_OF_GPIO +-static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) ++static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev) + { +- struct device_node *np = pdev->dev.of_node, *child; ++ struct device *dev = &pdev->dev; ++ struct fwnode_handle *child; + struct gpio_leds_priv *priv; + int count, ret; + +- /* count LEDs in this device, so we know how much to allocate */ +- count = of_get_available_child_count(np); ++ count = device_get_child_node_count(dev); + if (!count) + return ERR_PTR(-ENODEV); + +- for_each_available_child_of_node(np, child) +- if (of_get_gpio(child, 0) == -EPROBE_DEFER) +- return ERR_PTR(-EPROBE_DEFER); +- +- priv = devm_kzalloc(&pdev->dev, sizeof_gpio_leds_priv(count), +- GFP_KERNEL); ++ priv = devm_kzalloc(dev, sizeof_gpio_leds_priv(count), GFP_KERNEL); + if (!priv) + return ERR_PTR(-ENOMEM); + +- for_each_available_child_of_node(np, child) { ++ device_for_each_child_node(dev, child) { + struct gpio_led led = {}; +- enum of_gpio_flags flags; +- const char *state; +- +- led.gpio = of_get_gpio_flags(child, 0, &flags); +- led.active_low = flags & OF_GPIO_ACTIVE_LOW; +- led.name = of_get_property(child, "label", NULL) ? : child->name; +- led.default_trigger = +- of_get_property(child, "linux,default-trigger", NULL); +- state = of_get_property(child, "default-state", NULL); +- if (state) { ++ const char *state = NULL; ++ ++ led.gpiod = devm_get_gpiod_from_child(dev, child); ++ if (IS_ERR(led.gpiod)) { ++ fwnode_handle_put(child); ++ goto err; ++ } ++ ++ fwnode_property_read_string(child, "label", &led.name); ++ fwnode_property_read_string(child, "linux,default-trigger", ++ &led.default_trigger); ++ ++ if (!fwnode_property_read_string(child, "linux,default_state", ++ &state)) { + if (!strcmp(state, "keep")) + led.default_state = LEDS_GPIO_DEFSTATE_KEEP; + else if (!strcmp(state, "on")) +@@ -203,13 +203,13 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) + led.default_state = LEDS_GPIO_DEFSTATE_OFF; + } + +- if (of_get_property(child, "retain-state-suspended", NULL)) ++ if (fwnode_property_present(child, "retain-state-suspended")) + led.retain_state_suspended = 1; + + ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], +- &pdev->dev, NULL); ++ dev, NULL); + if (ret < 0) { +- of_node_put(child); ++ fwnode_handle_put(child); + goto err; + } + } +@@ -228,12 +228,6 @@ static const struct of_device_id of_gpio_leds_match[] = { + }; + + MODULE_DEVICE_TABLE(of, of_gpio_leds_match); +-#else /* CONFIG_OF_GPIO */ +-static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) +-{ +- return ERR_PTR(-ENODEV); +-} +-#endif /* CONFIG_OF_GPIO */ + + static int gpio_led_probe(struct platform_device *pdev) + { +@@ -261,7 +255,7 @@ static int gpio_led_probe(struct platform_device *pdev) + } + } + } else { +- priv = gpio_leds_create_of(pdev); ++ priv = gpio_leds_create(pdev); + if (IS_ERR(priv)) + return PTR_ERR(priv); + } +@@ -288,7 +282,7 @@ static struct platform_driver gpio_led_driver = { + .driver = { + .name = "leds-gpio", + .owner = THIS_MODULE, +- .of_match_table = of_match_ptr(of_gpio_leds_match), ++ .of_match_table = of_gpio_leds_match, + }, + }; + +diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c +index 634f729..0a1af93 100644 +--- a/drivers/misc/eeprom/at25.c ++++ b/drivers/misc/eeprom/at25.c +@@ -18,7 +18,7 @@ + + #include <linux/spi/spi.h> + #include <linux/spi/eeprom.h> +-#include <linux/of.h> ++#include <linux/property.h> + + /* + * NOTE: this is an *EEPROM* driver. The vagaries of product naming +@@ -301,35 +301,33 @@ static ssize_t at25_mem_write(struct memory_accessor *mem, const char *buf, + + /*-------------------------------------------------------------------------*/ + +-static int at25_np_to_chip(struct device *dev, +- struct device_node *np, +- struct spi_eeprom *chip) ++static int at25_fw_to_chip(struct device *dev, struct spi_eeprom *chip) + { + u32 val; + + memset(chip, 0, sizeof(*chip)); +- strncpy(chip->name, np->name, sizeof(chip->name)); ++ strncpy(chip->name, "at25", sizeof(chip->name)); + +- if (of_property_read_u32(np, "size", &val) == 0 || +- of_property_read_u32(np, "at25,byte-len", &val) == 0) { ++ if (device_property_read_u32(dev, "size", &val) == 0 || ++ device_property_read_u32(dev, "at25,byte-len", &val) == 0) { + chip->byte_len = val; + } else { + dev_err(dev, "Error: missing \"size\" property\n"); + return -ENODEV; + } + +- if (of_property_read_u32(np, "pagesize", &val) == 0 || +- of_property_read_u32(np, "at25,page-size", &val) == 0) { ++ if (device_property_read_u32(dev, "pagesize", &val) == 0 || ++ device_property_read_u32(dev, "at25,page-size", &val) == 0) { + chip->page_size = (u16)val; + } else { + dev_err(dev, "Error: missing \"pagesize\" property\n"); + return -ENODEV; + } + +- if (of_property_read_u32(np, "at25,addr-mode", &val) == 0) { ++ if (device_property_read_u32(dev, "at25,addr-mode", &val) == 0) { + chip->flags = (u16)val; + } else { +- if (of_property_read_u32(np, "address-width", &val)) { ++ if (device_property_read_u32(dev, "address-width", &val)) { + dev_err(dev, + "Error: missing \"address-width\" property\n"); + return -ENODEV; +@@ -350,7 +348,7 @@ static int at25_np_to_chip(struct device *dev, + val); + return -ENODEV; + } +- if (of_find_property(np, "read-only", NULL)) ++ if (device_property_present(dev, "read-only")) + chip->flags |= EE_READONLY; + } + return 0; +@@ -360,21 +358,15 @@ static int at25_probe(struct spi_device *spi) + { + struct at25_data *at25 = NULL; + struct spi_eeprom chip; +- struct device_node *np = spi->dev.of_node; + int err; + int sr; + int addrlen; + + /* Chip description */ + if (!spi->dev.platform_data) { +- if (np) { +- err = at25_np_to_chip(&spi->dev, np, &chip); +- if (err) +- return err; +- } else { +- dev_err(&spi->dev, "Error: no chip description\n"); +- return -ENODEV; +- } ++ err = at25_fw_to_chip(&spi->dev, &chip); ++ if (err) ++ return err; + } else + chip = *(struct spi_eeprom *)spi->dev.platform_data; + +diff --git a/drivers/net/ethernet/amd/Kconfig b/drivers/net/ethernet/amd/Kconfig +index 8319c99..6feb6ef3 100644 +--- a/drivers/net/ethernet/amd/Kconfig ++++ b/drivers/net/ethernet/amd/Kconfig +@@ -179,7 +179,7 @@ config SUNLANCE + + config AMD_XGBE + tristate "AMD 10GbE Ethernet driver" +- depends on OF_NET ++ depends on OF_NET || ACPI + select PHYLIB + select AMD_XGBE_PHY + select BITREVERSE diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c -index ea27383..d0d3ab5 100644 +index 9da3a03..a34cad2 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c -@@ -696,6 +696,18 @@ static int xgbe_read_mmd_regs(struct xgbe_prv_data *pdata, int prtad, +@@ -130,7 +130,7 @@ static unsigned int xgbe_usec_to_riwt(struct xgbe_prv_data *pdata, + + DBGPR("-->xgbe_usec_to_riwt\n"); + +- rate = clk_get_rate(pdata->sysclk); ++ rate = pdata->sysclk_rate; + + /* + * Convert the input usec value to the watchdog timer value. Each +@@ -153,7 +153,7 @@ static unsigned int xgbe_riwt_to_usec(struct xgbe_prv_data *pdata, + + DBGPR("-->xgbe_riwt_to_usec\n"); + +- rate = clk_get_rate(pdata->sysclk); ++ rate = pdata->sysclk_rate; + + /* + * Convert the input watchdog timer value to the usec value. Each +@@ -695,6 +695,18 @@ static int xgbe_read_mmd_regs(struct xgbe_prv_data *pdata, int prtad, else mmd_address = (pdata->mdio_mmd << 16) | (mmd_reg & 0xffff); @@ -4741,10 +9259,10 @@ index ea27383..d0d3ab5 100644 * management interface uses indirect addressing to access the MMD * register sets. This requires accessing of the PCS register in two diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c -index b26d758..ca7895c 100644 +index 2349ea9..a04b18b 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c -@@ -426,6 +426,9 @@ void xgbe_get_all_hw_features(struct xgbe_prv_data *pdata) +@@ -425,6 +425,9 @@ void xgbe_get_all_hw_features(struct xgbe_prv_data *pdata) hw_feat->rx_ch_cnt++; hw_feat->tx_ch_cnt++; @@ -4755,22 +9273,485 @@ index b26d758..ca7895c 100644 } diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c -index bdf9cfa..ba53e41 100644 +index f5a8fa0..338c0ed 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c -@@ -533,6 +533,7 @@ static int xgbe_resume(struct device *dev) +@@ -124,6 +124,7 @@ + #include <linux/of.h> + #include <linux/of_net.h> + #include <linux/clk.h> ++#include <linux/acpi.h> + + #include "xgbe.h" + #include "xgbe-common.h" +@@ -215,6 +216,205 @@ static void xgbe_init_all_fptrs(struct xgbe_prv_data *pdata) + xgbe_init_function_ptrs_desc(&pdata->desc_if); + } + ++static int xgbe_map_resources(struct xgbe_prv_data *pdata) ++{ ++ struct platform_device *pdev = pdata->pdev; ++ struct device *dev = pdata->dev; ++ struct resource *res; ++ ++ /* Obtain the mmio areas for the device */ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ pdata->xgmac_regs = devm_ioremap_resource(dev, res); ++ if (IS_ERR(pdata->xgmac_regs)) { ++ dev_err(dev, "xgmac ioremap failed\n"); ++ return PTR_ERR(pdata->xgmac_regs); ++ } ++ DBGPR(" xgmac_regs = %p\n", pdata->xgmac_regs); ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ pdata->xpcs_regs = devm_ioremap_resource(dev, res); ++ if (IS_ERR(pdata->xpcs_regs)) { ++ dev_err(dev, "xpcs ioremap failed\n"); ++ return PTR_ERR(pdata->xpcs_regs); ++ } ++ DBGPR(" xpcs_regs = %p\n", pdata->xpcs_regs); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_ACPI ++static int xgbe_acpi_support(struct xgbe_prv_data *pdata) ++{ ++ struct acpi_device *adev = pdata->adev; ++ struct device *dev = pdata->dev; ++ const union acpi_object *property; ++ acpi_status status; ++ u64 cca; ++ unsigned int i; ++ int ret; ++ ++ /* Map the memory resources */ ++ ret = xgbe_map_resources(pdata); ++ if (ret) ++ return ret; ++ ++ /* Obtain the system clock setting */ ++ ret = acpi_dev_get_property(adev, XGBE_ACPI_DMA_FREQ, ACPI_TYPE_INTEGER, ++ &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_ACPI_DMA_FREQ); ++ return ret; ++ } ++ pdata->sysclk_rate = property->integer.value; ++ ++ /* Obtain the PTP clock setting */ ++ ret = acpi_dev_get_property(adev, XGBE_ACPI_PTP_FREQ, ACPI_TYPE_INTEGER, ++ &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_ACPI_PTP_FREQ); ++ return ret; ++ } ++ pdata->ptpclk_rate = property->integer.value; ++ ++ /* Retrieve the MAC address */ ++ ret = acpi_dev_get_property_array(adev, XGBE_ACPI_MAC_ADDR, ++ ACPI_TYPE_INTEGER, &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_ACPI_MAC_ADDR); ++ return ret; ++ } ++ if (property->package.count != 6) { ++ dev_err(dev, "invalid %s acpi property\n", ++ XGBE_ACPI_MAC_ADDR); ++ return -EINVAL; ++ } ++ for (i = 0; i < property->package.count; i++) { ++ union acpi_object *obj = &property->package.elements[i]; ++ ++ pdata->mac_addr[i] = (u8)obj->integer.value; ++ } ++ if (!is_valid_ether_addr(pdata->mac_addr)) { ++ dev_err(dev, "invalid %s acpi property\n", ++ XGBE_ACPI_MAC_ADDR); ++ return -EINVAL; ++ } ++ ++ /* Retrieve the PHY mode - it must be "xgmii" */ ++ ret = acpi_dev_get_property(adev, XGBE_ACPI_PHY_MODE, ACPI_TYPE_STRING, ++ &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_ACPI_PHY_MODE); ++ return ret; ++ } ++ if (strcmp(property->string.pointer, ++ phy_modes(PHY_INTERFACE_MODE_XGMII))) { ++ dev_err(dev, "invalid %s acpi property\n", ++ XGBE_ACPI_PHY_MODE); ++ return -EINVAL; ++ } ++ pdata->phy_mode = PHY_INTERFACE_MODE_XGMII; ++ ++#ifndef METHOD_NAME__CCA ++#define METHOD_NAME__CCA "_CCA" ++#endif ++ /* Set the device cache coherency values */ ++ if (acpi_has_method(adev->handle, METHOD_NAME__CCA)) { ++ status = acpi_evaluate_integer(adev->handle, METHOD_NAME__CCA, ++ NULL, &cca); ++ if (ACPI_FAILURE(status)) { ++ dev_err(dev, "error obtaining acpi _CCA method\n"); ++ return -EINVAL; ++ } ++ } else { ++ cca = 0; ++ } ++ ++ if (cca) { ++ pdata->axdomain = XGBE_DMA_OS_AXDOMAIN; ++ pdata->arcache = XGBE_DMA_OS_ARCACHE; ++ pdata->awcache = XGBE_DMA_OS_AWCACHE; ++ } else { ++ pdata->axdomain = XGBE_DMA_SYS_AXDOMAIN; ++ pdata->arcache = XGBE_DMA_SYS_ARCACHE; ++ pdata->awcache = XGBE_DMA_SYS_AWCACHE; ++ } ++ ++ return 0; ++} ++#else /* CONFIG_ACPI */ ++static int xgbe_acpi_support(struct xgbe_prv_data *pdata) ++{ ++ return -EINVAL; ++} ++#endif /* CONFIG_ACPI */ ++ ++#ifdef CONFIG_OF ++static int xgbe_of_support(struct xgbe_prv_data *pdata) ++{ ++ struct device *dev = pdata->dev; ++ const u8 *mac_addr; ++ int ret; ++ ++ /* Map the memory resources */ ++ ret = xgbe_map_resources(pdata); ++ if (ret) ++ return ret; ++ ++ /* Obtain the system clock setting */ ++ pdata->sysclk = devm_clk_get(dev, XGBE_DMA_CLOCK); ++ if (IS_ERR(pdata->sysclk)) { ++ dev_err(dev, "dma devm_clk_get failed\n"); ++ return PTR_ERR(pdata->sysclk); ++ } ++ pdata->sysclk_rate = clk_get_rate(pdata->sysclk); ++ ++ /* Obtain the PTP clock setting */ ++ pdata->ptpclk = devm_clk_get(dev, XGBE_PTP_CLOCK); ++ if (IS_ERR(pdata->ptpclk)) { ++ dev_err(dev, "ptp devm_clk_get failed\n"); ++ return PTR_ERR(pdata->ptpclk); ++ } ++ pdata->ptpclk_rate = clk_get_rate(pdata->ptpclk); ++ ++ /* Retrieve the MAC address */ ++ mac_addr = of_get_mac_address(dev->of_node); ++ if (!mac_addr) { ++ dev_err(dev, "invalid mac address for this device\n"); ++ return -EINVAL; ++ } ++ memcpy(pdata->mac_addr, mac_addr, ETH_ALEN); ++ ++ /* Retrieve the PHY mode - it must be "xgmii" */ ++ pdata->phy_mode = of_get_phy_mode(dev->of_node); ++ if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII) { ++ dev_err(dev, "invalid phy-mode specified for this device\n"); ++ return -EINVAL; ++ } ++ ++ /* Set the device cache coherency values */ ++ if (of_property_read_bool(dev->of_node, "dma-coherent")) { ++ pdata->axdomain = XGBE_DMA_OS_AXDOMAIN; ++ pdata->arcache = XGBE_DMA_OS_ARCACHE; ++ pdata->awcache = XGBE_DMA_OS_AWCACHE; ++ } else { ++ pdata->axdomain = XGBE_DMA_SYS_AXDOMAIN; ++ pdata->arcache = XGBE_DMA_SYS_ARCACHE; ++ pdata->awcache = XGBE_DMA_SYS_AWCACHE; ++ } ++ ++ return 0; ++} ++#else /* CONFIG_OF */ ++static int xgbe_of_support(struct xgbe_prv_data *pdata) ++{ ++ return -EINVAL; ++} ++#endif /*CONFIG_OF */ ++ + static int xgbe_probe(struct platform_device *pdev) + { + struct xgbe_prv_data *pdata; +@@ -222,8 +422,6 @@ static int xgbe_probe(struct platform_device *pdev) + struct xgbe_desc_if *desc_if; + struct net_device *netdev; + struct device *dev = &pdev->dev; +- struct resource *res; +- const u8 *mac_addr; + int ret; + + DBGPR("--> xgbe_probe\n"); +@@ -239,6 +437,7 @@ static int xgbe_probe(struct platform_device *pdev) + pdata = netdev_priv(netdev); + pdata->netdev = netdev; + pdata->pdev = pdev; ++ pdata->adev = ACPI_COMPANION(dev); + pdata->dev = dev; + platform_set_drvdata(pdev, netdev); + +@@ -264,40 +463,13 @@ static int xgbe_probe(struct platform_device *pdev) + goto err_io; + } + +- /* Obtain the system clock setting */ +- pdata->sysclk = devm_clk_get(dev, XGBE_DMA_CLOCK); +- if (IS_ERR(pdata->sysclk)) { +- dev_err(dev, "dma devm_clk_get failed\n"); +- ret = PTR_ERR(pdata->sysclk); +- goto err_io; +- } +- +- /* Obtain the PTP clock setting */ +- pdata->ptpclk = devm_clk_get(dev, XGBE_PTP_CLOCK); +- if (IS_ERR(pdata->ptpclk)) { +- dev_err(dev, "ptp devm_clk_get failed\n"); +- ret = PTR_ERR(pdata->ptpclk); +- goto err_io; +- } +- +- /* Obtain the mmio areas for the device */ +- res = platform_get_resource(pdev, IORESOURCE_MEM, 0); +- pdata->xgmac_regs = devm_ioremap_resource(dev, res); +- if (IS_ERR(pdata->xgmac_regs)) { +- dev_err(dev, "xgmac ioremap failed\n"); +- ret = PTR_ERR(pdata->xgmac_regs); +- goto err_io; +- } +- DBGPR(" xgmac_regs = %p\n", pdata->xgmac_regs); +- +- res = platform_get_resource(pdev, IORESOURCE_MEM, 1); +- pdata->xpcs_regs = devm_ioremap_resource(dev, res); +- if (IS_ERR(pdata->xpcs_regs)) { +- dev_err(dev, "xpcs ioremap failed\n"); +- ret = PTR_ERR(pdata->xpcs_regs); ++ /* Obtain device settings */ ++ if (pdata->adev && !acpi_disabled) ++ ret = xgbe_acpi_support(pdata); ++ else ++ ret = xgbe_of_support(pdata); ++ if (ret) + goto err_io; +- } +- DBGPR(" xpcs_regs = %p\n", pdata->xpcs_regs); + + /* Set the DMA mask */ + if (!dev->dma_mask) +@@ -308,23 +480,16 @@ static int xgbe_probe(struct platform_device *pdev) + goto err_io; + } + +- if (of_property_read_bool(dev->of_node, "dma-coherent")) { +- pdata->axdomain = XGBE_DMA_OS_AXDOMAIN; +- pdata->arcache = XGBE_DMA_OS_ARCACHE; +- pdata->awcache = XGBE_DMA_OS_AWCACHE; +- } else { +- pdata->axdomain = XGBE_DMA_SYS_AXDOMAIN; +- pdata->arcache = XGBE_DMA_SYS_ARCACHE; +- pdata->awcache = XGBE_DMA_SYS_AWCACHE; +- } +- ++ /* Get the device interrupt */ + ret = platform_get_irq(pdev, 0); + if (ret < 0) { + dev_err(dev, "platform_get_irq failed\n"); + goto err_io; + } ++ + netdev->irq = ret; + netdev->base_addr = (unsigned long)pdata->xgmac_regs; ++ memcpy(netdev->dev_addr, pdata->mac_addr, netdev->addr_len); + + /* Set all the function pointers */ + xgbe_init_all_fptrs(pdata); +@@ -337,23 +502,6 @@ static int xgbe_probe(struct platform_device *pdev) + /* Populate the hardware features */ + xgbe_get_all_hw_features(pdata); + +- /* Retrieve the MAC address */ +- mac_addr = of_get_mac_address(dev->of_node); +- if (!mac_addr) { +- dev_err(dev, "invalid mac address for this device\n"); +- ret = -EINVAL; +- goto err_io; +- } +- memcpy(netdev->dev_addr, mac_addr, netdev->addr_len); +- +- /* Retrieve the PHY mode - it must be "xgmii" */ +- pdata->phy_mode = of_get_phy_mode(dev->of_node); +- if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII) { +- dev_err(dev, "invalid phy-mode specified for this device\n"); +- ret = -EINVAL; +- goto err_io; +- } +- + /* Set default configuration data */ + xgbe_default_config(pdata); + +@@ -531,10 +679,22 @@ static int xgbe_resume(struct device *dev) + } #endif /* CONFIG_PM */ ++#ifdef CONFIG_ACPI ++static const struct acpi_device_id xgbe_acpi_match[] = { ++ { "AMDI8000", 0 }, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(acpi, xgbe_acpi_match); ++#endif ++ ++#ifdef CONFIG_OF static const struct of_device_id xgbe_of_match[] = { + { .compatible = "amd,xgbe-seattle-v0a", }, { .compatible = "amd,xgbe-seattle-v1a", }, {}, }; ++#endif + + MODULE_DEVICE_TABLE(of, xgbe_of_match); + static SIMPLE_DEV_PM_OPS(xgbe_pm_ops, xgbe_suspend, xgbe_resume); +@@ -542,7 +702,12 @@ static SIMPLE_DEV_PM_OPS(xgbe_pm_ops, xgbe_suspend, xgbe_resume); + static struct platform_driver xgbe_driver = { + .driver = { + .name = "amd-xgbe", ++#ifdef CONFIG_ACPI ++ .acpi_match_table = xgbe_acpi_match, ++#endif ++#ifdef CONFIG_OF + .of_match_table = xgbe_of_match, ++#endif + .pm = &xgbe_pm_ops, + }, + .probe = xgbe_probe, +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +index 363b210..5d2c89b 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +@@ -119,6 +119,7 @@ + #include <linux/mdio.h> + #include <linux/phy.h> + #include <linux/of.h> ++#include <linux/acpi.h> + + #include "xgbe.h" + #include "xgbe-common.h" +@@ -205,25 +206,16 @@ void xgbe_dump_phy_registers(struct xgbe_prv_data *pdata) + + int xgbe_mdio_register(struct xgbe_prv_data *pdata) + { +- struct device_node *phy_node; + struct mii_bus *mii; + struct phy_device *phydev; + int ret = 0; + + DBGPR("-->xgbe_mdio_register\n"); + +- /* Retrieve the phy-handle */ +- phy_node = of_parse_phandle(pdata->dev->of_node, "phy-handle", 0); +- if (!phy_node) { +- dev_err(pdata->dev, "unable to parse phy-handle\n"); +- return -EINVAL; +- } +- + mii = mdiobus_alloc(); + if (mii == NULL) { + dev_err(pdata->dev, "mdiobus_alloc failed\n"); +- ret = -ENOMEM; +- goto err_node_get; ++ return -ENOMEM; + } + + /* Register on the MDIO bus (don't probe any PHYs) */ +@@ -252,12 +244,9 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata) + request_module(MDIO_MODULE_PREFIX MDIO_ID_FMT, + MDIO_ID_ARGS(phydev->c45_ids.device_ids[MDIO_MMD_PCS])); + +- of_node_get(phy_node); +- phydev->dev.of_node = phy_node; + ret = phy_device_register(phydev); + if (ret) { + dev_err(pdata->dev, "phy_device_register failed\n"); +- of_node_put(phy_node); + goto err_phy_device; + } + +@@ -283,8 +272,6 @@ int xgbe_mdio_register(struct xgbe_prv_data *pdata) + + pdata->phydev = phydev; + +- of_node_put(phy_node); +- + DBGPHY_REGS(pdata); + + DBGPR("<--xgbe_mdio_register\n"); +@@ -300,9 +287,6 @@ err_mdiobus_register: + err_mdiobus_alloc: + mdiobus_free(mii); + +-err_node_get: +- of_node_put(phy_node); +- + return ret; + } + +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c +index a1bf9d1c..fa67203 100644 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c +@@ -239,7 +239,7 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata) + snprintf(info->name, sizeof(info->name), "%s", + netdev_name(pdata->netdev)); + info->owner = THIS_MODULE; +- info->max_adj = clk_get_rate(pdata->ptpclk); ++ info->max_adj = pdata->ptpclk_rate; + info->adjfreq = xgbe_adjfreq; + info->adjtime = xgbe_adjtime; + info->gettime = xgbe_gettime; +@@ -260,7 +260,7 @@ void xgbe_ptp_register(struct xgbe_prv_data *pdata) + */ + dividend = 50000000; + dividend <<= 32; +- pdata->tstamp_addend = div_u64(dividend, clk_get_rate(pdata->ptpclk)); ++ pdata->tstamp_addend = div_u64(dividend, pdata->ptpclk_rate); + + /* Setup the timecounter */ + cc->read = xgbe_cc_read; diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h -index e9fe6e6..389bfec 100644 +index 789957d..59498eb 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h -@@ -187,8 +187,11 @@ +@@ -172,6 +172,12 @@ + #define XGBE_DMA_CLOCK "dma_clk" + #define XGBE_PTP_CLOCK "ptp_clk" + ++/* ACPI property names */ ++#define XGBE_ACPI_MAC_ADDR "mac-address" ++#define XGBE_ACPI_PHY_MODE "phy-mode" ++#define XGBE_ACPI_DMA_FREQ "amd,dma-freq" ++#define XGBE_ACPI_PTP_FREQ "amd,ptp-freq" ++ + /* Timestamp support - values based on 50MHz PTP clock + * 50MHz => 20 nsec + */ +@@ -186,8 +192,11 @@ #define XGBE_FIFO_SIZE_B(x) (x) #define XGBE_FIFO_SIZE_KB(x) (x * 1024) @@ -4782,19 +9763,327 @@ index e9fe6e6..389bfec 100644 /* Helper macro for descriptor handling * Always use XGBE_GET_DESC_DATA to access the descriptor data * since the index is free-running and needs to be and-ed +@@ -569,6 +578,7 @@ struct xgbe_hw_features { + struct xgbe_prv_data { + struct net_device *netdev; + struct platform_device *pdev; ++ struct acpi_device *adev; + struct device *dev; + + /* XGMAC/XPCS related mmio registers */ +@@ -649,6 +659,7 @@ struct xgbe_prv_data { + unsigned int phy_rx_pause; + + /* Netdev related settings */ ++ unsigned char mac_addr[MAX_ADDR_LEN]; + netdev_features_t netdev_features; + struct napi_struct napi; + struct xgbe_mmc_stats mmc_stats; +@@ -658,7 +669,9 @@ struct xgbe_prv_data { + + /* Device clocks */ + struct clk *sysclk; ++ unsigned long sysclk_rate; + struct clk *ptpclk; ++ unsigned long ptpclk_rate; + + /* Timestamp support */ + spinlock_t tstamp_lock; +diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +index 7ba83ff..dbbd661 100644 +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +@@ -593,9 +593,12 @@ static int xgene_enet_reset(struct xgene_enet_pdata *pdata) + if (!xgene_ring_mgr_init(pdata)) + return -ENODEV; + +- clk_prepare_enable(pdata->clk); +- clk_disable_unprepare(pdata->clk); +- clk_prepare_enable(pdata->clk); ++ if (pdata->clk) { ++ clk_prepare_enable(pdata->clk); ++ clk_disable_unprepare(pdata->clk); ++ clk_prepare_enable(pdata->clk); ++ } ++ + xgene_enet_ecc_init(pdata); + xgene_enet_config_ring_if_assoc(pdata); + +@@ -663,15 +666,20 @@ static int xgene_enet_phy_connect(struct net_device *ndev) + struct phy_device *phy_dev; + struct device *dev = &pdata->pdev->dev; + +- phy_np = of_parse_phandle(dev->of_node, "phy-handle", 0); +- if (!phy_np) { +- netdev_dbg(ndev, "No phy-handle found\n"); +- return -ENODEV; ++ if (dev->of_node) { ++ phy_np = of_parse_phandle(dev->of_node, "phy-handle", 0); ++ if (!phy_np) { ++ netdev_dbg(ndev, "No phy-handle found in DT\n"); ++ return -ENODEV; ++ } ++ pdata->phy_dev = of_phy_find_device(phy_np); + } + +- phy_dev = of_phy_connect(ndev, phy_np, &xgene_enet_adjust_link, +- 0, pdata->phy_mode); +- if (!phy_dev) { ++ phy_dev = pdata->phy_dev; ++ ++ if (phy_dev == NULL || ++ phy_connect_direct(ndev, phy_dev, &xgene_enet_adjust_link, ++ pdata->phy_mode)) { + netdev_err(ndev, "Could not connect to PHY\n"); + return -ENODEV; + } +@@ -681,11 +689,52 @@ static int xgene_enet_phy_connect(struct net_device *ndev) + ~SUPPORTED_100baseT_Half & + ~SUPPORTED_1000baseT_Half; + phy_dev->advertising = phy_dev->supported; +- pdata->phy_dev = phy_dev; + + return 0; + } + ++#ifdef CONFIG_ACPI ++static int xgene_acpi_mdiobus_register(struct xgene_enet_pdata *pdata, ++ struct mii_bus *mdio) ++{ ++ struct device *dev = &pdata->pdev->dev; ++ struct phy_device *phy; ++ int i, ret; ++ u32 phy_id; ++ ++ /* Mask out all PHYs from auto probing. */ ++ mdio->phy_mask = ~0; ++ ++ /* Clear all the IRQ properties */ ++ if (mdio->irq) ++ for (i = 0; i < PHY_MAX_ADDR; i++) ++ mdio->irq[i] = PHY_POLL; ++ ++ /* Register the MDIO bus */ ++ ret = mdiobus_register(mdio); ++ if (ret) ++ return ret; ++ ++ ret = device_property_read_u32(dev, "phy-channel", &phy_id); ++ if (ret) ++ return -EINVAL; ++ ++ phy = get_phy_device(mdio, phy_id, true); ++ if (!phy || IS_ERR(phy)) ++ return -EIO; ++ ++ ret = phy_device_register(phy); ++ if (ret) ++ phy_device_free(phy); ++ else ++ pdata->phy_dev = phy; ++ ++ return ret; ++} ++#else ++#define xgene_acpi_mdiobus_register(a, b) -1 ++#endif ++ + int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata) + { + struct net_device *ndev = pdata->ndev; +@@ -702,7 +751,7 @@ int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata) + } + } + +- if (!mdio_np) { ++ if (dev->of_node && !mdio_np) { + netdev_dbg(ndev, "No mdio node in the dts\n"); + return -ENXIO; + } +@@ -720,7 +769,10 @@ int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata) + mdio_bus->priv = pdata; + mdio_bus->parent = &ndev->dev; + +- ret = of_mdiobus_register(mdio_bus, mdio_np); ++ if (dev->of_node) ++ ret = of_mdiobus_register(mdio_bus, mdio_np); ++ else ++ ret = xgene_acpi_mdiobus_register(pdata, mdio_bus); + if (ret) { + netdev_err(ndev, "Failed to register MDIO bus\n"); + mdiobus_free(mdio_bus); +diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +index 1236696..f66598a 100644 +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +@@ -746,6 +746,42 @@ static const struct net_device_ops xgene_ndev_ops = { + .ndo_set_mac_address = xgene_enet_set_mac_address, + }; + ++#ifdef CONFIG_ACPI ++static int acpi_get_mac_address(struct device *dev, ++ unsigned char *addr) ++{ ++ int ret; ++ ++ ret = device_property_read_u8_array(dev, "mac-address", addr, 6); ++ if (ret) ++ return 0; ++ ++ return 6; ++} ++ ++static int acpi_get_phy_mode(struct device *dev) ++{ ++ int i, ret, phy_mode; ++ char *modestr; ++ ++ ret = device_property_read_string(dev, "phy-mode", &modestr); ++ if (ret) ++ return -1; ++ ++ phy_mode = -1; ++ for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++) { ++ if (!strcasecmp(modestr, phy_modes(i))) { ++ phy_mode = i; ++ break; ++ } ++ } ++ return phy_mode; ++} ++#else ++#define acpi_get_mac_address(a, b, c) 0 ++#define acpi_get_phy_mode(a) -1 ++#endif ++ + static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + { + struct platform_device *pdev; +@@ -761,6 +797,8 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + ndev = pdata->ndev; + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "enet_csr"); ++ if (!res) ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(dev, "Resource enet_csr not defined\n"); + return -ENODEV; +@@ -772,6 +810,8 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + } + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ring_csr"); ++ if (!res) ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (!res) { + dev_err(dev, "Resource ring_csr not defined\n"); + return -ENODEV; +@@ -783,6 +823,8 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + } + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ring_cmd"); ++ if (!res) ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 2); + if (!res) { + dev_err(dev, "Resource ring_cmd not defined\n"); + return -ENODEV; +@@ -804,11 +846,13 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + mac = of_get_mac_address(dev->of_node); + if (mac) + memcpy(ndev->dev_addr, mac, ndev->addr_len); +- else ++ else if (!acpi_get_mac_address(dev, ndev->dev_addr)) + eth_hw_addr_random(ndev); + memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len); + + pdata->phy_mode = of_get_phy_mode(pdev->dev.of_node); ++ if (pdata->phy_mode < 0) ++ pdata->phy_mode = acpi_get_phy_mode(dev); + if (pdata->phy_mode < 0) { + dev_err(dev, "Unable to get phy-connection-type\n"); + return pdata->phy_mode; +@@ -821,11 +865,12 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata) + } + + pdata->clk = devm_clk_get(&pdev->dev, NULL); +- ret = IS_ERR(pdata->clk); + if (IS_ERR(pdata->clk)) { +- dev_err(&pdev->dev, "can't get clock\n"); +- ret = PTR_ERR(pdata->clk); +- return ret; ++ /* ++ * Not necessarily an error. Firmware may have ++ * set up the clock already. ++ */ ++ pdata->clk = NULL; + } + + base_addr = pdata->base_addr; +@@ -875,7 +920,7 @@ static int xgene_enet_init_hw(struct xgene_enet_pdata *pdata) + pdata->port_ops->cle_bypass(pdata, dst_ring_num, buf_pool->id); + pdata->mac_ops->init(pdata); + +- return ret; ++ return 0; + } + + static void xgene_enet_setup_ops(struct xgene_enet_pdata *pdata) +@@ -936,7 +981,7 @@ static int xgene_enet_probe(struct platform_device *pdev) + goto err; + } + +- ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); ++ ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64)); + if (ret) { + netdev_err(ndev, "No usable DMA configuration\n"); + goto err; +@@ -984,6 +1029,14 @@ static int xgene_enet_remove(struct platform_device *pdev) + return 0; + } + ++#ifdef CONFIG_ACPI ++static const struct acpi_device_id xgene_enet_acpi_match[] = { ++ { "APMC0D05", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match); ++#endif ++ + static struct of_device_id xgene_enet_match[] = { + {.compatible = "apm,xgene-enet",}, + {}, +@@ -995,6 +1048,7 @@ static struct platform_driver xgene_enet_driver = { + .driver = { + .name = "xgene-enet", + .of_match_table = xgene_enet_match, ++ .acpi_match_table = ACPI_PTR(xgene_enet_acpi_match), + }, + .probe = xgene_enet_probe, + .remove = xgene_enet_remove, +diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h +index f9958fa..0e06cad 100644 +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h +@@ -31,6 +31,7 @@ + #include <linux/prefetch.h> + #include <linux/if_vlan.h> + #include <linux/phy.h> ++#include <linux/acpi.h> + #include "xgene_enet_hw.h" + + #define XGENE_DRV_VERSION "v1.0" diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c -index bcaa41a..ebad872 100644 +index 6cc3cf6..91c36a2 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c -@@ -81,6 +81,7 @@ static const char version[] = - #include <linux/workqueue.h> +@@ -82,6 +82,7 @@ static const char version[] = #include <linux/of.h> #include <linux/of_device.h> + #include <linux/of_gpio.h> +#include <linux/acpi.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> -@@ -2408,6 +2409,14 @@ static struct dev_pm_ops smc_drv_pm_ops = { +@@ -2467,6 +2468,14 @@ static struct dev_pm_ops smc_drv_pm_ops = { .resume = smc_drv_resume, }; @@ -4809,7 +10098,7 @@ index bcaa41a..ebad872 100644 static struct platform_driver smc_driver = { .probe = smc_drv_probe, .remove = smc_drv_remove, -@@ -2416,6 +2425,7 @@ static struct platform_driver smc_driver = { +@@ -2475,6 +2484,7 @@ static struct platform_driver smc_driver = { .owner = THIS_MODULE, .pm = &smc_drv_pm_ops, .of_match_table = of_match_ptr(smc91x_match), @@ -4817,11 +10106,29 @@ index bcaa41a..ebad872 100644 }, }; +diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig +index 75472cf7..bacafe2 100644 +--- a/drivers/net/phy/Kconfig ++++ b/drivers/net/phy/Kconfig +@@ -26,7 +26,7 @@ config AMD_PHY + + config AMD_XGBE_PHY + tristate "Driver for the AMD 10GbE (amd-xgbe) PHYs" +- depends on OF ++ depends on OF || ACPI + ---help--- + Currently supports the AMD 10GbE PHY + diff --git a/drivers/net/phy/amd-xgbe-phy.c b/drivers/net/phy/amd-xgbe-phy.c -index f3230ee..90145d9 100644 +index c456559..d852c6e 100644 --- a/drivers/net/phy/amd-xgbe-phy.c +++ b/drivers/net/phy/amd-xgbe-phy.c -@@ -78,12 +78,14 @@ +@@ -74,15 +74,19 @@ + #include <linux/of_platform.h> + #include <linux/of_device.h> + #include <linux/uaccess.h> ++#include <linux/acpi.h> ++ MODULE_AUTHOR("Tom Lendacky <thomas.lendacky@amd.com>"); MODULE_LICENSE("Dual BSD/GPL"); @@ -4838,10 +10145,39 @@ index f3230ee..90145d9 100644 #define XGBE_PHY_SPEEDSET_PROPERTY "amd,speed-set" #define XGBE_AN_INT_CMPLT 0x01 -@@ -118,77 +120,6 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver"); +@@ -99,11 +103,9 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver"); + #ifndef MDIO_PMA_10GBR_PMD_CTRL + #define MDIO_PMA_10GBR_PMD_CTRL 0x0096 + #endif +- + #ifndef MDIO_PMA_10GBR_FEC_CTRL + #define MDIO_PMA_10GBR_FEC_CTRL 0x00ab + #endif +- + #ifndef MDIO_AN_XNP + #define MDIO_AN_XNP 0x0016 + #endif +@@ -111,93 +113,14 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver"); + #ifndef MDIO_AN_INTMASK + #define MDIO_AN_INTMASK 0x8001 + #endif +- + #ifndef MDIO_AN_INT + #define MDIO_AN_INT 0x8002 + #endif + +-#ifndef MDIO_AN_KR_CTRL +-#define MDIO_AN_KR_CTRL 0x8003 +-#endif +- + #ifndef MDIO_CTRL1_SPEED1G #define MDIO_CTRL1_SPEED1G (MDIO_CTRL1_SPEED10G & ~BMCR_SPEED100) #endif +-#ifndef MDIO_KR_CTRL_PDETECT +-#define MDIO_KR_CTRL_PDETECT 0x01 +-#endif +- -/* SerDes integration register offsets */ -#define SIR0_KR_RT_1 0x002c -#define SIR0_STATUS 0x0040 @@ -4885,7 +10221,6 @@ index f3230ee..90145d9 100644 -#define SPEED_1000_TXAMP 0xf -#define SPEED_1000_WORD 0x1 - -- -/* SerDes RxTx register offsets */ -#define RXTX_REG20 0x0050 -#define RXTX_REG114 0x01c8 @@ -4916,7 +10251,7 @@ index f3230ee..90145d9 100644 #define GET_BITS(_var, _index, _width) \ (((_var) >> (_index)) & ((0x1 << (_width)) - 1)) -@@ -198,71 +129,12 @@ do { \ +@@ -207,70 +130,12 @@ do { \ (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \ } while (0) @@ -4929,9 +10264,7 @@ index f3230ee..90145d9 100644 - SET_BITS((_var), \ - _prefix##_##_field##_INDEX, \ - _prefix##_##_field##_WIDTH, (_val)) -+#define XCMU_IOREAD(_priv, _reg) \ -+ ioread16((_priv)->cmu_regs + _reg) - +- -/* Macros for reading or writing SerDes integration registers - * The ioread macros will get bit fields or full values using the - * register definitions formed using the input names @@ -4941,9 +10274,7 @@ index f3230ee..90145d9 100644 - */ -#define XSIR0_IOREAD(_priv, _reg) \ - ioread16((_priv)->sir0_regs + _reg) -+#define XCMU_IOWRITE(_priv, _reg, _val) \ -+ iowrite16((_val), (_priv)->cmu_regs + _reg) - +- -#define XSIR0_IOREAD_BITS(_priv, _reg, _field) \ - GET_BITS(XSIR0_IOREAD((_priv), _reg), \ - _reg##_##_field##_INDEX, \ @@ -4968,10 +10299,14 @@ index f3230ee..90145d9 100644 - GET_BITS(XSIR1_IOREAD((_priv), _reg), \ - _reg##_##_field##_INDEX, \ - _reg##_##_field##_WIDTH) -- ++#define XCMU_IOREAD(_priv, _reg) \ ++ ioread16((_priv)->cmu_regs + _reg) + -#define XSIR1_IOWRITE(_priv, _reg, _val) \ - iowrite16((_val), (_priv)->sir1_regs + _reg) -- ++#define XCMU_IOWRITE(_priv, _reg, _val) \ ++ iowrite16((_val), (_priv)->cmu_regs + _reg) + -#define XSIR1_IOWRITE_BITS(_priv, _reg, _field, _val) \ -do { \ - u16 reg_val = XSIR1_IOREAD((_priv), _reg); \ @@ -4981,7 +10316,6 @@ index f3230ee..90145d9 100644 - XSIR1_IOWRITE((_priv), _reg, reg_val); \ -} while (0) - -- -/* Macros for reading or writing SerDes RxTx registers - * The ioread macros will get bit fields or full values using the - * register definitions formed using the input names @@ -4992,7 +10326,7 @@ index f3230ee..90145d9 100644 #define XRXTX_IOREAD(_priv, _reg) \ ioread16((_priv)->rxtx_regs + _reg) -@@ -283,6 +155,77 @@ do { \ +@@ -291,6 +156,78 @@ do { \ XRXTX_IOWRITE((_priv), _reg, reg_val); \ } while (0) @@ -5067,10 +10401,25 @@ index f3230ee..90145d9 100644 + + +DEFINE_SPINLOCK(cmu_lock); - ++ enum amd_xgbe_phy_an { AMD_XGBE_AN_READY = 0, -@@ -321,18 +264,18 @@ struct amd_xgbe_phy_priv { + AMD_XGBE_AN_START, +@@ -316,29 +253,31 @@ enum amd_xgbe_phy_mode { + }; + + enum amd_xgbe_phy_speedset { +- AMD_XGBE_PHY_SPEEDSET_1000_10000, ++ AMD_XGBE_PHY_SPEEDSET_1000_10000 = 0, + AMD_XGBE_PHY_SPEEDSET_2500_10000, + }; + + struct amd_xgbe_phy_priv { + struct platform_device *pdev; ++ struct acpi_device *adev; + struct device *dev; + + struct phy_device *phydev; /* SerDes related mmio resources */ struct resource *rxtx_res; @@ -5089,12 +10438,20 @@ index f3230ee..90145d9 100644 /* Maintain link status for re-starting auto-negotiation */ unsigned int link; - enum amd_xgbe_phy_mode mode; - unsigned int speed_set; ++ enum amd_xgbe_phy_mode mode; /* Auto-negotiation state machine support */ struct mutex an_mutex; -@@ -394,33 +337,51 @@ static int amd_xgbe_phy_pcs_power_cycle(struct phy_device *phydev) +@@ -348,7 +287,6 @@ struct amd_xgbe_phy_priv { + enum amd_xgbe_phy_rx kx_state; + struct work_struct an_work; + struct workqueue_struct *an_workqueue; +- unsigned int parallel_detect; + }; + + static int amd_xgbe_an_enable_kr_training(struct phy_device *phydev) +@@ -401,33 +339,51 @@ static int amd_xgbe_phy_pcs_power_cycle(struct phy_device *phydev) static void amd_xgbe_phy_serdes_start_ratechange(struct phy_device *phydev) { struct amd_xgbe_phy_priv *priv = phydev->priv; @@ -5157,7 +10514,7 @@ index f3230ee..90145d9 100644 } static int amd_xgbe_phy_xgmii_mode(struct phy_device *phydev) -@@ -428,8 +389,8 @@ static int amd_xgbe_phy_xgmii_mode(struct phy_device *phydev) +@@ -435,8 +391,8 @@ static int amd_xgbe_phy_xgmii_mode(struct phy_device *phydev) struct amd_xgbe_phy_priv *priv = phydev->priv; int ret; @@ -5168,7 +10525,7 @@ index f3230ee..90145d9 100644 if (ret < 0) return ret; -@@ -455,19 +416,30 @@ static int amd_xgbe_phy_xgmii_mode(struct phy_device *phydev) +@@ -462,19 +418,32 @@ static int amd_xgbe_phy_xgmii_mode(struct phy_device *phydev) return ret; /* Set SerDes to 10G speed */ @@ -5183,14 +10540,14 @@ index f3230ee..90145d9 100644 - XSIR1_IOWRITE_BITS(priv, SIR1_SPEED, PI_SPD_SEL, SPEED_10000_CDR); + XRXTX_IOWRITE_BITS(priv, RXTX_REG3, TX_DATA_RATE, RXTX_FULL_RATE); + XRXTX_IOWRITE_BITS(priv, RXTX_REG3, TX_WORD_MODE, RXTX_66BIT_WORD); -+ + +- XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, RXTX_10000_BLWC); +- XRXTX_IOWRITE_BITS(priv, RXTX_REG114, PQ_REG, RXTX_10000_PQ); + XRXTX_IOWRITE_BITS(priv, RXTX_REG5, TXAMP_CNTL, RXTX_10G_TX_AMP); + + XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_DATA_RATE, RXTX_FULL_RATE); + XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_WORD_MODE, RXTX_66BIT_WORD); - -- XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, RXTX_10000_BLWC); -- XRXTX_IOWRITE_BITS(priv, RXTX_REG114, PQ_REG, RXTX_10000_PQ); ++ + XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, 0); + + XRXTX_IOWRITE_BITS(priv, RXTX_REG53, RX_PLLSELECT, RXTX_10G_PLL); @@ -5203,10 +10560,12 @@ index f3230ee..90145d9 100644 + spin_unlock(&cmu_lock); + - priv->mode = AMD_XGBE_MODE_KR; - ++ priv->mode = AMD_XGBE_MODE_KR; ++ return 0; -@@ -505,19 +477,30 @@ static int amd_xgbe_phy_gmii_2500_mode(struct phy_device *phydev) + } + +@@ -510,19 +479,32 @@ static int amd_xgbe_phy_gmii_2500_mode(struct phy_device *phydev) return ret; /* Set SerDes to 2.5G speed */ @@ -5223,12 +10582,12 @@ index f3230ee..90145d9 100644 + XRXTX_IOWRITE_BITS(priv, RXTX_REG3, TX_WORD_MODE, RXTX_10BIT_WORD); + + XRXTX_IOWRITE_BITS(priv, RXTX_REG5, TXAMP_CNTL, RXTX_1G_TX_AMP); ++ ++ XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_DATA_RATE, RXTX_HALF_RATE); ++ XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_WORD_MODE, RXTX_10BIT_WORD); - XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, RXTX_2500_BLWC); - XRXTX_IOWRITE_BITS(priv, RXTX_REG114, PQ_REG, RXTX_2500_PQ); -+ XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_DATA_RATE, RXTX_HALF_RATE); -+ XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_WORD_MODE, RXTX_10BIT_WORD); -+ + XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, 1); + + XRXTX_IOWRITE_BITS(priv, RXTX_REG53, RX_PLLSELECT, RXTX_1G_PLL); @@ -5241,10 +10600,12 @@ index f3230ee..90145d9 100644 + spin_unlock(&cmu_lock); + - priv->mode = AMD_XGBE_MODE_KX; - ++ priv->mode = AMD_XGBE_MODE_KX; ++ return 0; -@@ -555,19 +538,30 @@ static int amd_xgbe_phy_gmii_mode(struct phy_device *phydev) + } + +@@ -558,47 +540,33 @@ static int amd_xgbe_phy_gmii_mode(struct phy_device *phydev) return ret; /* Set SerDes to 1G speed */ @@ -5259,30 +10620,102 @@ index f3230ee..90145d9 100644 - XSIR1_IOWRITE_BITS(priv, SIR1_SPEED, PI_SPD_SEL, SPEED_1000_CDR); + XRXTX_IOWRITE_BITS(priv, RXTX_REG3, TX_DATA_RATE, RXTX_FIFTH_RATE); + XRXTX_IOWRITE_BITS(priv, RXTX_REG3, TX_WORD_MODE, RXTX_10BIT_WORD); -+ -+ XRXTX_IOWRITE_BITS(priv, RXTX_REG5, TXAMP_CNTL, RXTX_1G_TX_AMP); - XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, RXTX_1000_BLWC); - XRXTX_IOWRITE_BITS(priv, RXTX_REG114, PQ_REG, RXTX_1000_PQ); ++ XRXTX_IOWRITE_BITS(priv, RXTX_REG5, TXAMP_CNTL, RXTX_1G_TX_AMP); + +- amd_xgbe_phy_serdes_complete_ratechange(phydev); + XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_DATA_RATE, RXTX_FIFTH_RATE); + XRXTX_IOWRITE_BITS(priv, RXTX_REG6, RX_WORD_MODE, RXTX_10BIT_WORD); -+ + +- return 0; +-} + XRXTX_IOWRITE_BITS(priv, RXTX_REG20, BLWC_ENA, 1); -+ + +-static int amd_xgbe_phy_cur_mode(struct phy_device *phydev, +- enum amd_xgbe_phy_mode *mode) +-{ +- int ret; +- +- ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL2); +- if (ret < 0) +- return ret; + XRXTX_IOWRITE_BITS(priv, RXTX_REG53, RX_PLLSELECT, RXTX_1G_PLL); + XRXTX_IOWRITE_BITS(priv, RXTX_REG53, TX_PLLSELECT, RXTX_1G_PLL); + XRXTX_IOWRITE_BITS(priv, RXTX_REG53, PI_SPD_SEL_CDR, RXTX_1G_CDR); -+ + +- if ((ret & MDIO_PCS_CTRL2_TYPE) == MDIO_PCS_CTRL2_10GBR) +- *mode = AMD_XGBE_MODE_KR; +- else +- *mode = AMD_XGBE_MODE_KX; + XRXTX_IOWRITE_BITS(priv, RXTX_REG114, PQ_REG, RXTX_1G_PQ); - amd_xgbe_phy_serdes_complete_ratechange(phydev); +- return 0; +-} ++ amd_xgbe_phy_serdes_complete_ratechange(phydev); +-static bool amd_xgbe_phy_in_kr_mode(struct phy_device *phydev) +-{ +- enum amd_xgbe_phy_mode mode; + spin_unlock(&cmu_lock); -+ - priv->mode = AMD_XGBE_MODE_KX; - return 0; -@@ -639,13 +633,9 @@ static enum amd_xgbe_phy_an amd_xgbe_an_tx_training(struct phy_device *phydev, +- if (amd_xgbe_phy_cur_mode(phydev, &mode)) +- return false; ++ priv->mode = AMD_XGBE_MODE_KX; + +- return (mode == AMD_XGBE_MODE_KR); ++ return 0; + } + + static int amd_xgbe_phy_switch_mode(struct phy_device *phydev) +@@ -607,7 +575,7 @@ static int amd_xgbe_phy_switch_mode(struct phy_device *phydev) + int ret; + + /* If we are in KR switch to KX, and vice-versa */ +- if (amd_xgbe_phy_in_kr_mode(phydev)) { ++ if (priv->mode == AMD_XGBE_MODE_KR) { + if (priv->speed_set == AMD_XGBE_PHY_SPEEDSET_1000_10000) + ret = amd_xgbe_phy_gmii_mode(phydev); + else +@@ -619,20 +587,15 @@ static int amd_xgbe_phy_switch_mode(struct phy_device *phydev) + return ret; + } + +-static int amd_xgbe_phy_set_mode(struct phy_device *phydev, +- enum amd_xgbe_phy_mode mode) ++static enum amd_xgbe_phy_an amd_xgbe_an_switch_mode(struct phy_device *phydev) + { +- enum amd_xgbe_phy_mode cur_mode; + int ret; + +- ret = amd_xgbe_phy_cur_mode(phydev, &cur_mode); +- if (ret) +- return ret; +- +- if (mode != cur_mode) +- ret = amd_xgbe_phy_switch_mode(phydev); ++ ret = amd_xgbe_phy_switch_mode(phydev); ++ if (ret < 0) ++ return AMD_XGBE_AN_ERROR; + +- return ret; ++ return AMD_XGBE_AN_START; + } + + static enum amd_xgbe_phy_an amd_xgbe_an_tx_training(struct phy_device *phydev, +@@ -643,8 +606,8 @@ static enum amd_xgbe_phy_an amd_xgbe_an_tx_training(struct phy_device *phydev, + + *state = AMD_XGBE_RX_COMPLETE; + +- /* If we're not in KR mode then we're done */ +- if (!amd_xgbe_phy_in_kr_mode(phydev)) ++ /* If we're in KX mode then we're done */ ++ if (priv->mode == AMD_XGBE_MODE_KX) + return AMD_XGBE_AN_EVENT; + + /* Enable/Disable FEC */ +@@ -672,13 +635,9 @@ static enum amd_xgbe_phy_an amd_xgbe_an_tx_training(struct phy_device *phydev, if (ret < 0) return AMD_XGBE_AN_ERROR; @@ -5296,20 +10729,234 @@ index f3230ee..90145d9 100644 return AMD_XGBE_AN_EVENT; } -@@ -1291,21 +1281,33 @@ static int amd_xgbe_phy_probe(struct phy_device *phydev) - goto err_priv; - } +@@ -702,6 +661,7 @@ static enum amd_xgbe_phy_an amd_xgbe_an_tx_xnp(struct phy_device *phydev, + static enum amd_xgbe_phy_an amd_xgbe_an_rx_bpa(struct phy_device *phydev, + enum amd_xgbe_phy_rx *state) + { ++ struct amd_xgbe_phy_priv *priv = phydev->priv; + unsigned int link_support; + int ret, ad_reg, lp_reg; -- priv->sir0_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); -- priv->sir0_regs = devm_ioremap_resource(dev, priv->sir0_res); -- if (IS_ERR(priv->sir0_regs)) { -- dev_err(dev, "sir0 ioremap failed\n"); -- ret = PTR_ERR(priv->sir0_regs); +@@ -711,9 +671,9 @@ static enum amd_xgbe_phy_an amd_xgbe_an_rx_bpa(struct phy_device *phydev, + return AMD_XGBE_AN_ERROR; + + /* Check for a supported mode, otherwise restart in a different one */ +- link_support = amd_xgbe_phy_in_kr_mode(phydev) ? 0x80 : 0x20; ++ link_support = (priv->mode == AMD_XGBE_MODE_KR) ? 0x80 : 0x20; + if (!(ret & link_support)) +- return AMD_XGBE_AN_INCOMPAT_LINK; ++ return amd_xgbe_an_switch_mode(phydev); + + /* Check Extended Next Page support */ + ad_reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE); +@@ -754,7 +714,7 @@ static enum amd_xgbe_phy_an amd_xgbe_an_start(struct phy_device *phydev) + int ret; + + /* Be sure we aren't looping trying to negotiate */ +- if (amd_xgbe_phy_in_kr_mode(phydev)) { ++ if (priv->mode == AMD_XGBE_MODE_KR) { + if (priv->kr_state != AMD_XGBE_RX_READY) + return AMD_XGBE_AN_NO_LINK; + priv->kr_state = AMD_XGBE_RX_BPA; +@@ -817,13 +777,6 @@ static enum amd_xgbe_phy_an amd_xgbe_an_start(struct phy_device *phydev) + /* Enable and start auto-negotiation */ + phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_INT, 0); + +- ret = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_KR_CTRL); +- if (ret < 0) +- return AMD_XGBE_AN_ERROR; +- +- ret |= MDIO_KR_CTRL_PDETECT; +- phy_write_mmd(phydev, MDIO_MMD_AN, MDIO_AN_KR_CTRL, ret); +- + ret = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_CTRL1); + if (ret < 0) + return AMD_XGBE_AN_ERROR; +@@ -864,8 +817,8 @@ static enum amd_xgbe_phy_an amd_xgbe_an_page_received(struct phy_device *phydev) + enum amd_xgbe_phy_rx *state; + int ret; + +- state = amd_xgbe_phy_in_kr_mode(phydev) ? &priv->kr_state +- : &priv->kx_state; ++ state = (priv->mode == AMD_XGBE_MODE_KR) ? &priv->kr_state ++ : &priv->kx_state; + + switch (*state) { + case AMD_XGBE_RX_BPA: +@@ -885,13 +838,7 @@ static enum amd_xgbe_phy_an amd_xgbe_an_page_received(struct phy_device *phydev) + + static enum amd_xgbe_phy_an amd_xgbe_an_incompat_link(struct phy_device *phydev) + { +- int ret; +- +- ret = amd_xgbe_phy_switch_mode(phydev); +- if (ret) +- return AMD_XGBE_AN_ERROR; +- +- return AMD_XGBE_AN_START; ++ return amd_xgbe_an_switch_mode(phydev); + } + + static void amd_xgbe_an_state_machine(struct work_struct *work) +@@ -904,10 +851,6 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) + int sleep; + unsigned int an_supported = 0; + +- /* Start in KX mode */ +- if (amd_xgbe_phy_set_mode(phydev, AMD_XGBE_MODE_KX)) +- priv->an_state = AMD_XGBE_AN_ERROR; +- + while (1) { + mutex_lock(&priv->an_mutex); + +@@ -915,9 +858,8 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) + + switch (priv->an_state) { + case AMD_XGBE_AN_START: +- an_supported = 0; +- priv->parallel_detect = 0; + priv->an_state = amd_xgbe_an_start(phydev); ++ an_supported = 0; + break; + + case AMD_XGBE_AN_EVENT: +@@ -934,7 +876,6 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) + break; + + case AMD_XGBE_AN_COMPLETE: +- priv->parallel_detect = an_supported ? 0 : 1; + netdev_info(phydev->attached_dev, "%s successful\n", + an_supported ? "Auto negotiation" + : "Parallel detection"); +@@ -1069,6 +1010,7 @@ static int amd_xgbe_phy_config_aneg(struct phy_device *phydev) + { + struct amd_xgbe_phy_priv *priv = phydev->priv; + u32 mmd_mask = phydev->c45_ids.devices_in_package; ++ int ret; + + if (phydev->autoneg != AUTONEG_ENABLE) + return amd_xgbe_phy_setup_forced(phydev); +@@ -1077,6 +1019,11 @@ static int amd_xgbe_phy_config_aneg(struct phy_device *phydev) + if (!(mmd_mask & MDIO_DEVS_AN)) + return -EINVAL; + ++ /* Get the current speed mode */ ++ ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL2); ++ if (ret < 0) ++ return ret; ++ + /* Start/Restart the auto-negotiation state machine */ + mutex_lock(&priv->an_mutex); + priv->an_result = AMD_XGBE_AN_READY; +@@ -1166,14 +1113,18 @@ static int amd_xgbe_phy_read_status(struct phy_device *phydev) + { + struct amd_xgbe_phy_priv *priv = phydev->priv; + u32 mmd_mask = phydev->c45_ids.devices_in_package; +- int ret, ad_ret, lp_ret; ++ int ret, mode, ad_ret, lp_ret; + + ret = amd_xgbe_phy_update_link(phydev); + if (ret) + return ret; + +- if ((phydev->autoneg == AUTONEG_ENABLE) && +- !priv->parallel_detect) { ++ mode = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL2); ++ if (mode < 0) ++ return mode; ++ mode &= MDIO_PCS_CTRL2_TYPE; ++ ++ if (phydev->autoneg == AUTONEG_ENABLE) { + if (!(mmd_mask & MDIO_DEVS_AN)) + return -EINVAL; + +@@ -1204,39 +1155,40 @@ static int amd_xgbe_phy_read_status(struct phy_device *phydev) + ad_ret &= lp_ret; + if (ad_ret & 0x80) { + phydev->speed = SPEED_10000; +- ret = amd_xgbe_phy_set_mode(phydev, AMD_XGBE_MODE_KR); +- if (ret) +- return ret; ++ if (mode != MDIO_PCS_CTRL2_10GBR) { ++ ret = amd_xgbe_phy_xgmii_mode(phydev); ++ if (ret < 0) ++ return ret; ++ } + } else { +- switch (priv->speed_set) { +- case AMD_XGBE_PHY_SPEEDSET_1000_10000: +- phydev->speed = SPEED_1000; +- break; ++ int (*mode_fcn)(struct phy_device *); + +- case AMD_XGBE_PHY_SPEEDSET_2500_10000: ++ if (priv->speed_set == ++ AMD_XGBE_PHY_SPEEDSET_1000_10000) { ++ phydev->speed = SPEED_1000; ++ mode_fcn = amd_xgbe_phy_gmii_mode; ++ } else { + phydev->speed = SPEED_2500; +- break; ++ mode_fcn = amd_xgbe_phy_gmii_2500_mode; + } + +- ret = amd_xgbe_phy_set_mode(phydev, AMD_XGBE_MODE_KX); +- if (ret) +- return ret; ++ if (mode == MDIO_PCS_CTRL2_10GBR) { ++ ret = mode_fcn(phydev); ++ if (ret < 0) ++ return ret; ++ } + } + + phydev->duplex = DUPLEX_FULL; + } else { +- if (amd_xgbe_phy_in_kr_mode(phydev)) { ++ if (mode == MDIO_PCS_CTRL2_10GBR) { + phydev->speed = SPEED_10000; + } else { +- switch (priv->speed_set) { +- case AMD_XGBE_PHY_SPEEDSET_1000_10000: ++ if (priv->speed_set == ++ AMD_XGBE_PHY_SPEEDSET_1000_10000) + phydev->speed = SPEED_1000; +- break; +- +- case AMD_XGBE_PHY_SPEEDSET_2500_10000: ++ else + phydev->speed = SPEED_2500; +- break; +- } + } + phydev->duplex = DUPLEX_FULL; + phydev->pause = 0; +@@ -1288,29 +1240,188 @@ unlock: + return ret; + } + ++static int amd_xgbe_phy_map_resources(struct amd_xgbe_phy_priv *priv, ++ struct platform_device *phy_pdev, ++ unsigned int phy_resnum) ++{ ++ struct device *dev = priv->dev; ++ int ret; ++ ++ /* Get the device mmio areas */ ++ priv->rxtx_res = platform_get_resource(phy_pdev, IORESOURCE_MEM, ++ phy_resnum++); ++ priv->rxtx_regs = devm_ioremap_resource(dev, priv->rxtx_res); ++ if (IS_ERR(priv->rxtx_regs)) { ++ dev_err(dev, "rxtx ioremap failed\n"); ++ return PTR_ERR(priv->rxtx_regs); ++ } ++ + /* All xgbe phy devices share the CMU registers so retrieve + * the resource and do the ioremap directly rather than + * the devm_ioremap_resource call + */ -+ priv->cmu_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); ++ priv->cmu_res = platform_get_resource(phy_pdev, IORESOURCE_MEM, ++ phy_resnum++); + if (!priv->cmu_res) { + dev_err(dev, "cmu invalid resource\n"); + ret = -EINVAL; @@ -5320,54 +10967,258 @@ index f3230ee..90145d9 100644 + if (!priv->cmu_regs) { + dev_err(dev, "cmu ioremap failed\n"); + ret = -ENOMEM; - goto err_rxtx; ++ goto err_rxtx; ++ } ++ ++ return 0; ++ ++err_rxtx: ++ devm_iounmap(dev, priv->rxtx_regs); ++ devm_release_mem_region(dev, priv->rxtx_res->start, ++ resource_size(priv->rxtx_res)); ++ ++ return ret; ++} ++ ++static void amd_xgbe_phy_unmap_resources(struct amd_xgbe_phy_priv *priv) ++{ ++ struct device *dev = priv->dev; ++ ++ devm_iounmap(dev, priv->cmu_regs); ++ ++ devm_iounmap(dev, priv->rxtx_regs); ++ devm_release_mem_region(dev, priv->rxtx_res->start, ++ resource_size(priv->rxtx_res)); ++} ++ ++#ifdef CONFIG_ACPI ++static int amd_xgbe_phy_acpi_support(struct amd_xgbe_phy_priv *priv) ++{ ++ struct platform_device *phy_pdev = priv->pdev; ++ struct acpi_device *adev = priv->adev; ++ struct device *dev = priv->dev; ++ const union acpi_object *property; ++ int ret; ++ ++ /* Map the memory resources */ ++ ret = amd_xgbe_phy_map_resources(priv, phy_pdev, 2); ++ if (ret) ++ return ret; ++ ++ /* Get the device serdes channel property */ ++ ret = acpi_dev_get_property(adev, XGBE_PHY_CHANNEL_PROPERTY, ++ ACPI_TYPE_INTEGER, &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_PHY_CHANNEL_PROPERTY); ++ goto err_resources; ++ } ++ priv->serdes_channel = property->integer.value; ++ ++ /* Get the device speed set property */ ++ ret = acpi_dev_get_property(adev, XGBE_PHY_SPEEDSET_PROPERTY, ++ ACPI_TYPE_INTEGER, &property); ++ if (ret) { ++ dev_err(dev, "unable to obtain %s acpi property\n", ++ XGBE_PHY_SPEEDSET_PROPERTY); ++ goto err_resources; ++ } ++ priv->speed_set = property->integer.value; ++ ++ return 0; ++ ++err_resources: ++ amd_xgbe_phy_unmap_resources(priv); ++ ++ return ret; ++} ++#else /* CONFIG_ACPI */ ++static int amd_xgbe_phy_acpi_support(struct amd_xgbe_phy_priv *priv) ++{ ++ return -EINVAL; ++} ++#endif /* CONFIG_ACPI */ ++ ++#ifdef CONFIG_OF ++static int amd_xgbe_phy_of_support(struct amd_xgbe_phy_priv *priv) ++{ ++ struct platform_device *phy_pdev; ++ struct device_node *bus_node; ++ struct device_node *phy_node; ++ struct device *dev = priv->dev; ++ const __be32 *property; ++ int ret; ++ ++ bus_node = priv->dev->of_node; ++ phy_node = of_parse_phandle(bus_node, "phy-handle", 0); ++ if (!phy_node) { ++ dev_err(dev, "unable to parse phy-handle\n"); ++ return -EINVAL; ++ } ++ ++ phy_pdev = of_find_device_by_node(phy_node); ++ if (!phy_pdev) { ++ dev_err(dev, "unable to obtain phy device\n"); ++ ret = -EINVAL; ++ goto err_put; ++ } ++ ++ /* Map the memory resources */ ++ ret = amd_xgbe_phy_map_resources(priv, phy_pdev, 0); ++ if (ret) ++ goto err_put; ++ ++ /* Get the device serdes channel property */ ++ property = of_get_property(phy_node, XGBE_PHY_CHANNEL_PROPERTY, NULL); ++ if (!property) { ++ dev_err(dev, "unable to obtain %s property\n", ++ XGBE_PHY_CHANNEL_PROPERTY); ++ ret = -EINVAL; ++ goto err_resources; ++ } ++ priv->serdes_channel = be32_to_cpu(*property); ++ ++ /* Get the device speed set property */ ++ property = of_get_property(phy_node, XGBE_PHY_SPEEDSET_PROPERTY, NULL); ++ if (property) ++ priv->speed_set = be32_to_cpu(*property); ++ ++ of_node_put(phy_node); ++ ++ return 0; ++ ++err_resources: ++ amd_xgbe_phy_unmap_resources(priv); ++ ++err_put: ++ of_node_put(phy_node); ++ ++ return ret; ++} ++#else /* CONFIG_OF */ ++static int amd_xgbe_phy_of_support(struct amd_xgbe_phy_priv *priv) ++{ ++ return -EINVAL; ++} ++#endif /* CONFIG_OF */ ++ + static int amd_xgbe_phy_probe(struct phy_device *phydev) + { + struct amd_xgbe_phy_priv *priv; +- struct platform_device *pdev; + struct device *dev; + char *wq_name; +- const __be32 *property; +- unsigned int speed_set; + int ret; + +- if (!phydev->dev.of_node) ++ if (!phydev->bus || !phydev->bus->parent) + return -EINVAL; + +- pdev = of_find_device_by_node(phydev->dev.of_node); +- if (!pdev) +- return -EINVAL; +- dev = &pdev->dev; ++ dev = phydev->bus->parent; + + wq_name = kasprintf(GFP_KERNEL, "%s-amd-xgbe-phy", phydev->bus->name); +- if (!wq_name) { +- ret = -ENOMEM; +- goto err_pdev; +- } ++ if (!wq_name) ++ return -ENOMEM; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) { +@@ -1318,86 +1429,54 @@ static int amd_xgbe_phy_probe(struct phy_device *phydev) + goto err_name; } +- priv->pdev = pdev; ++ priv->pdev = to_platform_device(dev); ++ priv->adev = ACPI_COMPANION(dev); + priv->dev = dev; + priv->phydev = phydev; + +- /* Get the device mmio areas */ +- priv->rxtx_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); +- priv->rxtx_regs = devm_ioremap_resource(dev, priv->rxtx_res); +- if (IS_ERR(priv->rxtx_regs)) { +- dev_err(dev, "rxtx ioremap failed\n"); +- ret = PTR_ERR(priv->rxtx_regs); ++ if (priv->adev && !acpi_disabled) ++ ret = amd_xgbe_phy_acpi_support(priv); ++ else ++ ret = amd_xgbe_phy_of_support(priv); ++ if (ret) + goto err_priv; +- } +- +- priv->sir0_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); +- priv->sir0_regs = devm_ioremap_resource(dev, priv->sir0_res); +- if (IS_ERR(priv->sir0_regs)) { +- dev_err(dev, "sir0 ioremap failed\n"); +- ret = PTR_ERR(priv->sir0_regs); +- goto err_rxtx; +- } +- - priv->sir1_res = platform_get_resource(pdev, IORESOURCE_MEM, 2); - priv->sir1_regs = devm_ioremap_resource(dev, priv->sir1_res); - if (IS_ERR(priv->sir1_regs)) { - dev_err(dev, "sir1 ioremap failed\n"); - ret = PTR_ERR(priv->sir1_regs); - goto err_sir0; -+ /* Get the device serdes channel property */ -+ property = of_get_property(dev->of_node, XGBE_PHY_CHANNEL_PROPERTY, -+ NULL); -+ if (!property) { -+ dev_err(dev, "unable to obtain serdes_channel property\n"); -+ ret = -EINVAL; -+ goto err_cmu; - } -+ priv->serdes_channel = be32_to_cpu(*property); +- } - /* Get the device speed set property */ - speed_set = 0; -@@ -1324,14 +1326,14 @@ static int amd_xgbe_phy_probe(struct phy_device *phydev) +- /* Get the device speed set property */ +- speed_set = 0; +- property = of_get_property(dev->of_node, XGBE_PHY_SPEEDSET_PROPERTY, +- NULL); +- if (property) +- speed_set = be32_to_cpu(*property); +- +- switch (speed_set) { +- case 0: +- priv->speed_set = AMD_XGBE_PHY_SPEEDSET_1000_10000; +- break; +- case 1: +- priv->speed_set = AMD_XGBE_PHY_SPEEDSET_2500_10000; ++ switch (priv->speed_set) { ++ case AMD_XGBE_PHY_SPEEDSET_1000_10000: ++ case AMD_XGBE_PHY_SPEEDSET_2500_10000: + break; default: dev_err(dev, "invalid amd,speed-set property\n"); ret = -EINVAL; - goto err_sir1; -+ goto err_cmu; ++ goto err_resources; } priv->link = 1; - ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL2); - if (ret < 0) -- goto err_sir1; -+ goto err_cmu; - if ((ret & MDIO_PCS_CTRL2_TYPE) == MDIO_PCS_CTRL2_10GBR) - priv->mode = AMD_XGBE_MODE_KR; - else -@@ -1342,7 +1344,7 @@ static int amd_xgbe_phy_probe(struct phy_device *phydev) ++ ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_CTRL2); ++ if (ret < 0) ++ goto err_resources; ++ if ((ret & MDIO_PCS_CTRL2_TYPE) == MDIO_PCS_CTRL2_10GBR) ++ priv->mode = AMD_XGBE_MODE_KR; ++ else ++ priv->mode = AMD_XGBE_MODE_KX; ++ + mutex_init(&priv->an_mutex); + INIT_WORK(&priv->an_work, amd_xgbe_an_state_machine); priv->an_workqueue = create_singlethread_workqueue(wq_name); if (!priv->an_workqueue) { ret = -ENOMEM; - goto err_sir1; -+ goto err_cmu; ++ goto err_resources; } phydev->priv = priv; -@@ -1352,15 +1354,8 @@ static int amd_xgbe_phy_probe(struct phy_device *phydev) + + kfree(wq_name); +- of_dev_put(pdev); return 0; @@ -5380,12 +11231,27 @@ index f3230ee..90145d9 100644 - devm_iounmap(dev, priv->sir0_regs); - devm_release_mem_region(dev, priv->sir0_res->start, - resource_size(priv->sir0_res)); -+err_cmu: -+ devm_iounmap(dev, priv->cmu_regs); +- +-err_rxtx: +- devm_iounmap(dev, priv->rxtx_regs); +- devm_release_mem_region(dev, priv->rxtx_res->start, +- resource_size(priv->rxtx_res)); ++err_resources: ++ amd_xgbe_phy_unmap_resources(priv); + + err_priv: + devm_kfree(dev, priv); +@@ -1405,9 +1484,6 @@ err_priv: + err_name: + kfree(wq_name); + +-err_pdev: +- of_dev_put(pdev); +- + return ret; + } - err_rxtx: - devm_iounmap(dev, priv->rxtx_regs); -@@ -1392,14 +1387,7 @@ static void amd_xgbe_phy_remove(struct phy_device *phydev) +@@ -1424,18 +1500,7 @@ static void amd_xgbe_phy_remove(struct phy_device *phydev) flush_workqueue(priv->an_workqueue); destroy_workqueue(priv->an_workqueue); @@ -5397,698 +11263,181 @@ index f3230ee..90145d9 100644 - devm_iounmap(dev, priv->sir0_regs); - devm_release_mem_region(dev, priv->sir0_res->start, - resource_size(priv->sir0_res)); -+ devm_iounmap(dev, priv->cmu_regs); - - devm_iounmap(dev, priv->rxtx_regs); - devm_release_mem_region(dev, priv->rxtx_res->start, -diff --git a/drivers/of/address.c b/drivers/of/address.c -index e371825..afdb782 100644 ---- a/drivers/of/address.c -+++ b/drivers/of/address.c -@@ -5,6 +5,8 @@ - #include <linux/module.h> - #include <linux/of_address.h> - #include <linux/pci_regs.h> -+#include <linux/sizes.h> -+#include <linux/slab.h> - #include <linux/string.h> - - /* Max address size we deal with */ -@@ -293,6 +295,51 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser, - } - EXPORT_SYMBOL_GPL(of_pci_range_parser_one); - -+/* -+ * of_pci_range_to_resource - Create a resource from an of_pci_range -+ * @range: the PCI range that describes the resource -+ * @np: device node where the range belongs to -+ * @res: pointer to a valid resource that will be updated to -+ * reflect the values contained in the range. -+ * -+ * Returns EINVAL if the range cannot be converted to resource. -+ * -+ * Note that if the range is an IO range, the resource will be converted -+ * using pci_address_to_pio() which can fail if it is called too early or -+ * if the range cannot be matched to any host bridge IO space (our case here). -+ * To guard against that we try to register the IO range first. -+ * If that fails we know that pci_address_to_pio() will do too. -+ */ -+int of_pci_range_to_resource(struct of_pci_range *range, -+ struct device_node *np, struct resource *res) -+{ -+ int err; -+ res->flags = range->flags; -+ res->parent = res->child = res->sibling = NULL; -+ res->name = np->full_name; -+ -+ if (res->flags & IORESOURCE_IO) { -+ unsigned long port; -+ err = pci_register_io_range(range->cpu_addr, range->size); -+ if (err) -+ goto invalid_range; -+ port = pci_address_to_pio(range->cpu_addr); -+ if (port == (unsigned long)-1) { -+ err = -EINVAL; -+ goto invalid_range; -+ } -+ res->start = port; -+ } else { -+ res->start = range->cpu_addr; -+ } -+ res->end = res->start + range->size - 1; -+ return 0; -+ -+invalid_range: -+ res->start = (resource_size_t)OF_BAD_ADDR; -+ res->end = (resource_size_t)OF_BAD_ADDR; -+ return err; -+} - #endif /* CONFIG_PCI */ - - /* -@@ -601,12 +648,119 @@ const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, - } - EXPORT_SYMBOL(of_get_address); - -+#ifdef PCI_IOBASE -+struct io_range { -+ struct list_head list; -+ phys_addr_t start; -+ resource_size_t size; -+}; -+ -+static LIST_HEAD(io_range_list); -+static DEFINE_SPINLOCK(io_range_lock); -+#endif -+ -+/* -+ * Record the PCI IO range (expressed as CPU physical address + size). -+ * Return a negative value if an error has occured, zero otherwise -+ */ -+int __weak pci_register_io_range(phys_addr_t addr, resource_size_t size) -+{ -+ int err = 0; -+ -+#ifdef PCI_IOBASE -+ struct io_range *range; -+ resource_size_t allocated_size = 0; -+ -+ /* check if the range hasn't been previously recorded */ -+ spin_lock(&io_range_lock); -+ list_for_each_entry(range, &io_range_list, list) { -+ if (addr >= range->start && addr + size <= range->start + size) { -+ /* range already registered, bail out */ -+ goto end_register; -+ } -+ allocated_size += range->size; -+ } -+ -+ /* range not registed yet, check for available space */ -+ if (allocated_size + size - 1 > IO_SPACE_LIMIT) { -+ /* if it's too big check if 64K space can be reserved */ -+ if (allocated_size + SZ_64K - 1 > IO_SPACE_LIMIT) { -+ err = -E2BIG; -+ goto end_register; -+ } -+ -+ size = SZ_64K; -+ pr_warn("Requested IO range too big, new size set to 64K\n"); -+ } -+ -+ /* add the range to the list */ -+ range = kzalloc(sizeof(*range), GFP_KERNEL); -+ if (!range) { -+ err = -ENOMEM; -+ goto end_register; -+ } -+ -+ range->start = addr; -+ range->size = size; -+ -+ list_add_tail(&range->list, &io_range_list); -+ -+end_register: -+ spin_unlock(&io_range_lock); -+#endif -+ -+ return err; -+} -+ -+phys_addr_t pci_pio_to_address(unsigned long pio) -+{ -+ phys_addr_t address = (phys_addr_t)OF_BAD_ADDR; -+ -+#ifdef PCI_IOBASE -+ struct io_range *range; -+ resource_size_t allocated_size = 0; -+ -+ if (pio > IO_SPACE_LIMIT) -+ return address; -+ -+ spin_lock(&io_range_lock); -+ list_for_each_entry(range, &io_range_list, list) { -+ if (pio >= allocated_size && pio < allocated_size + range->size) { -+ address = range->start + pio - allocated_size; -+ break; -+ } -+ allocated_size += range->size; -+ } -+ spin_unlock(&io_range_lock); -+#endif -+ -+ return address; -+} -+ - unsigned long __weak pci_address_to_pio(phys_addr_t address) - { -+#ifdef PCI_IOBASE -+ struct io_range *res; -+ resource_size_t offset = 0; -+ unsigned long addr = -1; -+ -+ spin_lock(&io_range_lock); -+ list_for_each_entry(res, &io_range_list, list) { -+ if (address >= res->start && address < res->start + res->size) { -+ addr = res->start - address + offset; -+ break; -+ } -+ offset += res->size; -+ } -+ spin_unlock(&io_range_lock); -+ -+ return addr; -+#else - if (address > IO_SPACE_LIMIT) - return (unsigned long)-1; - - return (unsigned long) address; -+#endif - } - - static int __of_address_to_resource(struct device_node *dev, -diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c -index 8481996..8882b46 100644 ---- a/drivers/of/of_pci.c -+++ b/drivers/of/of_pci.c -@@ -1,7 +1,9 @@ - #include <linux/kernel.h> - #include <linux/export.h> - #include <linux/of.h> -+#include <linux/of_address.h> - #include <linux/of_pci.h> -+#include <linux/slab.h> +- +- devm_iounmap(dev, priv->rxtx_regs); +- devm_release_mem_region(dev, priv->rxtx_res->start, +- resource_size(priv->rxtx_res)); ++ amd_xgbe_phy_unmap_resources(priv); - static inline int __of_pci_pci_compare(struct device_node *node, - unsigned int data) -@@ -89,6 +91,146 @@ int of_pci_parse_bus_range(struct device_node *node, struct resource *res) + devm_kfree(dev, priv); } - EXPORT_SYMBOL_GPL(of_pci_parse_bus_range); +diff --git a/drivers/of/base.c b/drivers/of/base.c +index 3823edf..4c2ccde 100644 +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -1250,6 +1250,39 @@ int of_property_read_u64(const struct device_node *np, const char *propname, + EXPORT_SYMBOL_GPL(of_property_read_u64); -+/** -+ * This function will try to obtain the host bridge domain number by -+ * finding a property called "linux,pci-domain" of the given device node. -+ * -+ * @node: device tree node with the domain information -+ * -+ * Returns the associated domain number from DT in the range [0-0xffff], or -+ * a negative value if the required property is not found. -+ */ -+int of_get_pci_domain_nr(struct device_node *node) -+{ -+ const __be32 *value; -+ int len; -+ u16 domain; -+ -+ value = of_get_property(node, "linux,pci-domain", &len); -+ if (!value || len < sizeof(*value)) -+ return -EINVAL; -+ -+ domain = (u16)be32_to_cpup(value); -+ -+ return domain; -+} -+EXPORT_SYMBOL_GPL(of_get_pci_domain_nr); -+ -+#if defined(CONFIG_OF_ADDRESS) -+/** -+ * of_pci_get_host_bridge_resources - Parse PCI host bridge resources from DT -+ * @dev: device node of the host bridge having the range property -+ * @busno: bus number associated with the bridge root bus -+ * @bus_max: maximum number of buses for this bridge -+ * @resources: list where the range of resources will be added after DT parsing -+ * @io_base: pointer to a variable that will contain on return the physical -+ * address for the start of the I/O range. Can be NULL if the caller doesn't -+ * expect IO ranges to be present in the device tree. + /** ++ * of_property_read_u64_array - Find and read an array of 64 bit integers ++ * from a property. + * -+ * It is the caller's job to free the @resources list. ++ * @np: device node from which the property value is to be read. ++ * @propname: name of the property to be searched. ++ * @out_values: pointer to return value, modified only if return value is 0. ++ * @sz: number of array elements to read + * -+ * This function will parse the "ranges" property of a PCI host bridge device -+ * node and setup the resource mapping based on its content. It is expected -+ * that the property conforms with the Power ePAPR document. ++ * Search for a property in a device node and read 64-bit value(s) from ++ * it. Returns 0 on success, -EINVAL if the property does not exist, ++ * -ENODATA if property does not have a value, and -EOVERFLOW if the ++ * property data isn't large enough. + * -+ * It returns zero if the range parsing has been successful or a standard error -+ * value if it failed. ++ * The out_values is modified only if a valid u64 value can be decoded. + */ -+int of_pci_get_host_bridge_resources(struct device_node *dev, -+ unsigned char busno, unsigned char bus_max, -+ struct list_head *resources, resource_size_t *io_base) ++int of_property_read_u64_array(const struct device_node *np, ++ const char *propname, u64 *out_values, ++ size_t sz) +{ -+ struct resource *res; -+ struct resource *bus_range; -+ struct of_pci_range range; -+ struct of_pci_range_parser parser; -+ char range_type[4]; -+ int err; -+ -+ if (io_base) -+ *io_base = (resource_size_t)OF_BAD_ADDR; -+ -+ bus_range = kzalloc(sizeof(*bus_range), GFP_KERNEL); -+ if (!bus_range) -+ return -ENOMEM; ++ const __be32 *val = of_find_property_value_of_size(np, propname, ++ (sz * sizeof(*out_values))); + -+ pr_info("PCI host bridge %s ranges:\n", dev->full_name); ++ if (IS_ERR(val)) ++ return PTR_ERR(val); + -+ err = of_pci_parse_bus_range(dev, bus_range); -+ if (err) { -+ bus_range->start = busno; -+ bus_range->end = bus_max; -+ bus_range->flags = IORESOURCE_BUS; -+ pr_info(" No bus range found for %s, using %pR\n", -+ dev->full_name, bus_range); -+ } else { -+ if (bus_range->end > bus_range->start + bus_max) -+ bus_range->end = bus_range->start + bus_max; ++ while (sz--) { ++ *out_values++ = of_read_number(val, 2); ++ val += 2; + } -+ pci_add_resource(resources, bus_range); -+ -+ /* Check for ranges property */ -+ err = of_pci_range_parser_init(&parser, dev); -+ if (err) -+ goto parse_failed; -+ -+ pr_debug("Parsing ranges property...\n"); -+ for_each_of_pci_range(&parser, &range) { -+ /* Read next ranges element */ -+ if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_IO) -+ snprintf(range_type, 4, " IO"); -+ else if ((range.flags & IORESOURCE_TYPE_BITS) == IORESOURCE_MEM) -+ snprintf(range_type, 4, "MEM"); -+ else -+ snprintf(range_type, 4, "err"); -+ pr_info(" %s %#010llx..%#010llx -> %#010llx\n", range_type, -+ range.cpu_addr, range.cpu_addr + range.size - 1, -+ range.pci_addr); -+ -+ /* -+ * If we failed translation or got a zero-sized region -+ * then skip this range -+ */ -+ if (range.cpu_addr == OF_BAD_ADDR || range.size == 0) -+ continue; -+ -+ res = kzalloc(sizeof(struct resource), GFP_KERNEL); -+ if (!res) { -+ err = -ENOMEM; -+ goto parse_failed; -+ } -+ -+ err = of_pci_range_to_resource(&range, dev, res); -+ if (err) -+ goto conversion_failed; -+ -+ if (resource_type(res) == IORESOURCE_IO) { -+ if (!io_base) { -+ pr_err("I/O range found for %s. Please provide an io_base pointer to save CPU base address\n", -+ dev->full_name); -+ err = -EINVAL; -+ goto conversion_failed; -+ } -+ if (*io_base != (resource_size_t)OF_BAD_ADDR) -+ pr_warn("More than one I/O resource converted for %s. CPU base address for old range lost!\n", -+ dev->full_name); -+ *io_base = range.cpu_addr; -+ } -+ -+ pci_add_resource_offset(resources, res, res->start - range.pci_addr); -+ } -+ + return 0; -+ -+conversion_failed: -+ kfree(res); -+parse_failed: -+ pci_free_resource_list(resources); -+ return err; +} -+EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources); -+#endif /* CONFIG_OF_ADDRESS */ -+ - #ifdef CONFIG_PCI_MSI - - static LIST_HEAD(of_pci_msi_chip_list); -diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig -index 90f5cca..382fd3d 100644 ---- a/drivers/pci/host/Kconfig -+++ b/drivers/pci/host/Kconfig -@@ -63,4 +63,14 @@ config PCIE_SPEAR13XX - help - Say Y here if you want PCIe support on SPEAr13XX SoCs. - -+config PCI_XGENE -+ bool "X-Gene PCIe controller" -+ depends on ARCH_XGENE -+ depends on OF -+ select PCIEPORTBUS -+ help -+ Say Y here if you want internal PCI support on APM X-Gene SoC. -+ There are 5 internal PCIe ports available. Each port is GEN3 capable -+ and have varied lanes from x1 to x8. + - endmenu -diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile -index d0e88f1..845611f 100644 ---- a/drivers/pci/host/Makefile -+++ b/drivers/pci/host/Makefile -@@ -8,3 +8,4 @@ obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o - obj-$(CONFIG_PCI_RCAR_GEN2_PCIE) += pcie-rcar.o - obj-$(CONFIG_PCI_HOST_GENERIC) += pci-host-generic.o - obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o -+obj-$(CONFIG_PCI_XGENE) += pci-xgene.o -diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c -index 0fb0fdb..946935d 100644 ---- a/drivers/pci/host/pci-tegra.c -+++ b/drivers/pci/host/pci-tegra.c -@@ -626,13 +626,14 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_relax_enable); - static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) - { - struct tegra_pcie *pcie = sys_to_pcie(sys); -+ phys_addr_t io_start = pci_pio_to_address(pcie->io.start); - - pci_add_resource_offset(&sys->resources, &pcie->mem, sys->mem_offset); - pci_add_resource_offset(&sys->resources, &pcie->prefetch, - sys->mem_offset); - pci_add_resource(&sys->resources, &pcie->busn); - -- pci_ioremap_io(nr * SZ_64K, pcie->io.start); -+ pci_ioremap_io(nr * SZ_64K, io_start); ++/** + * of_property_read_string - Find and read a string from a property + * @np: device node from which the property value is to be read. + * @propname: name of the property to be searched. +diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c +index 9ecabfa..9029d59c 100644 +--- a/drivers/pci/host/pci-xgene.c ++++ b/drivers/pci/host/pci-xgene.c +@@ -29,6 +29,7 @@ + #include <linux/pci.h> + #include <linux/platform_device.h> + #include <linux/slab.h> ++#include <linux/acpi.h> - return 1; + #define PCIECORE_CTLANDSTATUS 0x50 + #define PIM1_1L 0x80 +@@ -235,6 +236,13 @@ static int xgene_pcie_read_config(struct pci_bus *bus, unsigned int devfn, + break; + case 2: + xgene_pcie_cfg_in16(addr, offset, val); ++ /* FIXME. ++ * Something wrong with Configuration Request Retry Status ++ * on this hw. Pretend it isn't supported until the problem ++ * gets sorted out properly. ++ */ ++ if (pci_is_root_bus(bus) && offset == (0x40 + PCI_EXP_RTCAP)) ++ *val &= ~PCI_EXP_RTCAP_CRSVIS; + break; + default: + xgene_pcie_cfg_in32(addr, offset, val); +@@ -600,6 +608,165 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port, + return 0; } -@@ -737,6 +738,7 @@ static irqreturn_t tegra_pcie_isr(int irq, void *arg) - static void tegra_pcie_setup_translations(struct tegra_pcie *pcie) - { - u32 fpci_bar, size, axi_address; -+ phys_addr_t io_start = pci_pio_to_address(pcie->io.start); - - /* Bar 0: type 1 extended configuration space */ - fpci_bar = 0xfe100000; -@@ -749,7 +751,7 @@ static void tegra_pcie_setup_translations(struct tegra_pcie *pcie) - /* Bar 1: downstream IO bar */ - fpci_bar = 0xfdfc0000; - size = resource_size(&pcie->io); -- axi_address = pcie->io.start; -+ axi_address = io_start; - afi_writel(pcie, axi_address, AFI_AXI_BAR1_START); - afi_writel(pcie, size >> 12, AFI_AXI_BAR1_SZ); - afi_writel(pcie, fpci_bar, AFI_FPCI_BAR1); -@@ -1520,7 +1522,9 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie) - } - - for_each_of_pci_range(&parser, &range) { -- of_pci_range_to_resource(&range, np, &res); -+ err = of_pci_range_to_resource(&range, np, &res); -+ if (err < 0) -+ return err; - switch (res.flags & IORESOURCE_TYPE_BITS) { - case IORESOURCE_IO: -diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c -new file mode 100644 -index 0000000..41c76b8 ---- /dev/null -+++ b/drivers/pci/host/pci-xgene.c -@@ -0,0 +1,659 @@ -+/** -+ * APM X-Gene PCIe Driver -+ * -+ * Copyright (c) 2014 Applied Micro Circuits Corporation. -+ * -+ * Author: Tanmay Inamdar <tinamdar@apm.com>. -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+#include <linux/clk-private.h> -+#include <linux/delay.h> -+#include <linux/io.h> -+#include <linux/jiffies.h> -+#include <linux/memblock.h> -+#include <linux/module.h> -+#include <linux/of.h> -+#include <linux/of_address.h> -+#include <linux/of_irq.h> -+#include <linux/of_pci.h> -+#include <linux/pci.h> -+#include <linux/platform_device.h> -+#include <linux/slab.h> -+ -+#define PCIECORE_CTLANDSTATUS 0x50 -+#define PIM1_1L 0x80 -+#define IBAR2 0x98 -+#define IR2MSK 0x9c -+#define PIM2_1L 0xa0 -+#define IBAR3L 0xb4 -+#define IR3MSKL 0xbc -+#define PIM3_1L 0xc4 -+#define OMR1BARL 0x100 -+#define OMR2BARL 0x118 -+#define OMR3BARL 0x130 -+#define CFGBARL 0x154 -+#define CFGBARH 0x158 -+#define CFGCTL 0x15c -+#define RTDID 0x160 -+#define BRIDGE_CFG_0 0x2000 -+#define BRIDGE_CFG_4 0x2010 -+#define BRIDGE_STATUS_0 0x2600 -+ -+#define LINK_UP_MASK 0x00000100 -+#define AXI_EP_CFG_ACCESS 0x10000 -+#define EN_COHERENCY 0xF0000000 -+#define EN_REG 0x00000001 -+#define OB_LO_IO 0x00000002 -+#define XGENE_PCIE_VENDORID 0x10E8 -+#define XGENE_PCIE_DEVICEID 0xE004 -+#define SZ_1T (SZ_1G*1024ULL) -+#define PIPE_PHY_RATE_RD(src) ((0xc000 & (u32)(src)) >> 0xe) -+ -+struct xgene_pcie_port { -+ struct device_node *node; -+ struct device *dev; -+ struct clk *clk; -+ void __iomem *csr_base; -+ void __iomem *cfg_base; -+ unsigned long cfg_addr; -+ bool link_up; ++#ifdef CONFIG_ACPI ++struct xgene_mcfg_info { ++ void __iomem *csr_base; +}; + -+static inline u32 pcie_bar_low_val(u32 addr, u32 flags) -+{ -+ return (addr & PCI_BASE_ADDRESS_MEM_MASK) | flags; -+} -+ -+/* PCIE Configuration Out/In */ -+static inline void xgene_pcie_cfg_out32(void __iomem *addr, int offset, u32 val) -+{ -+ writel(val, addr + offset); -+} -+ -+static inline void xgene_pcie_cfg_out16(void __iomem *addr, int offset, u16 val) -+{ -+ u32 val32 = readl(addr + (offset & ~0x3)); -+ -+ switch (offset & 0x3) { -+ case 2: -+ val32 &= ~0xFFFF0000; -+ val32 |= (u32)val << 16; -+ break; -+ case 0: -+ default: -+ val32 &= ~0xFFFF; -+ val32 |= val; -+ break; -+ } -+ writel(val32, addr + (offset & ~0x3)); -+} -+ -+static inline void xgene_pcie_cfg_out8(void __iomem *addr, int offset, u8 val) -+{ -+ u32 val32 = readl(addr + (offset & ~0x3)); -+ -+ switch (offset & 0x3) { -+ case 0: -+ val32 &= ~0xFF; -+ val32 |= val; -+ break; -+ case 1: -+ val32 &= ~0xFF00; -+ val32 |= (u32)val << 8; -+ break; -+ case 2: -+ val32 &= ~0xFF0000; -+ val32 |= (u32)val << 16; -+ break; -+ case 3: -+ default: -+ val32 &= ~0xFF000000; -+ val32 |= (u32)val << 24; -+ break; -+ } -+ writel(val32, addr + (offset & ~0x3)); -+} -+ -+static inline void xgene_pcie_cfg_in32(void __iomem *addr, int offset, u32 *val) -+{ -+ *val = readl(addr + offset); -+} -+ -+static inline void xgene_pcie_cfg_in16(void __iomem *addr, int offset, u32 *val) -+{ -+ *val = readl(addr + (offset & ~0x3)); -+ -+ switch (offset & 0x3) { -+ case 2: -+ *val >>= 16; -+ break; -+ } -+ -+ *val &= 0xFFFF; -+} -+ -+static inline void xgene_pcie_cfg_in8(void __iomem *addr, int offset, u32 *val) -+{ -+ *val = readl(addr + (offset & ~0x3)); -+ -+ switch (offset & 0x3) { -+ case 3: -+ *val = *val >> 24; -+ break; -+ case 2: -+ *val = *val >> 16; -+ break; -+ case 1: -+ *val = *val >> 8; -+ break; -+ } -+ *val &= 0xFF; -+} -+ +/* + * When the address bit [17:16] is 2'b01, the Configuration access will be + * treated as Type 1 and it will be forwarded to external PCIe device. + */ -+static void __iomem *xgene_pcie_get_cfg_base(struct pci_bus *bus) ++static void __iomem *__get_cfg_base(struct pci_mmcfg_region *cfg, ++ unsigned int bus) +{ -+ struct xgene_pcie_port *port = bus->sysdata; -+ -+ if (bus->number >= (bus->primary + 1)) -+ return port->cfg_base + AXI_EP_CFG_ACCESS; ++ if (bus > cfg->start_bus) ++ return cfg->virt + AXI_EP_CFG_ACCESS; + -+ return port->cfg_base; ++ return cfg->virt; +} + +/* + * For Configuration request, RTDID register is used as Bus Number, + * Device Number and Function number of the header fields. + */ -+static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn) ++static void __set_rtdid_reg(struct pci_mmcfg_region *cfg, ++ unsigned int bus, unsigned int devfn) +{ -+ struct xgene_pcie_port *port = bus->sysdata; ++ struct xgene_mcfg_info *info = cfg->data; + unsigned int b, d, f; + u32 rtdid_val = 0; + -+ b = bus->number; ++ b = bus; + d = PCI_SLOT(devfn); + f = PCI_FUNC(devfn); + -+ if (!pci_is_root_bus(bus)) ++ if (bus != cfg->start_bus) + rtdid_val = (b << 8) | (d << 3) | f; + -+ writel(rtdid_val, port->csr_base + RTDID); ++ writel(rtdid_val, info->csr_base + RTDID); + /* read the register back to ensure flush */ -+ readl(port->csr_base + RTDID); -+} -+ -+/* -+ * X-Gene PCIe port uses BAR0-BAR1 of RC's configuration space as -+ * the translation between PCI bus to native BUS. Entire DDR region -+ * is mapped on to PCIe space using these registers, so that it is -+ * accessible for EP devices for DMA. The BAR0/1 of bridge should be -+ * hidden during enumeration to avoid the sizing and resource allocation -+ * by PCIe core. -+ */ -+static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset) -+{ -+ if (pci_is_root_bus(bus) && ((offset == PCI_BASE_ADDRESS_0) || -+ (offset == PCI_BASE_ADDRESS_1))) -+ return true; -+ -+ return false; ++ readl(info->csr_base + RTDID); +} + -+static int xgene_pcie_read_config(struct pci_bus *bus, unsigned int devfn, -+ int offset, int len, u32 *val) ++static int xgene_raw_pci_read(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int offset, int len, u32 *val) +{ -+ struct xgene_pcie_port *port = bus->sysdata; + void __iomem *addr; + -+ if ((pci_is_root_bus(bus) && devfn != 0) || !port->link_up) -+ return PCIBIOS_DEVICE_NOT_FOUND; ++ if (bus == cfg->start_bus) { ++ if (devfn != 0) { ++ *val = 0xffffffff; ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ } + -+ if (xgene_pcie_hide_rc_bars(bus, offset)) { -+ *val = 0; -+ return PCIBIOS_SUCCESSFUL; ++ /* see xgene_pcie_hide_rc_bars() above */ ++ if (offset == PCI_BASE_ADDRESS_0 || ++ offset == PCI_BASE_ADDRESS_1) { ++ *val = 0; ++ return PCIBIOS_SUCCESSFUL; ++ } + } + -+ xgene_pcie_set_rtdid_reg(bus, devfn); -+ addr = xgene_pcie_get_cfg_base(bus); ++ __set_rtdid_reg(cfg, bus, devfn); ++ addr = __get_cfg_base(cfg, bus); + switch (len) { + case 1: + xgene_pcie_cfg_in8(addr, offset, val); + break; + case 2: + xgene_pcie_cfg_in16(addr, offset, val); ++ /* FIXME. ++ * Something wrong with Configuration Request Retry Status ++ * on this hw. Pretend it isn't supported until the problem ++ * gets sorted out properly. ++ */ ++ if (bus == cfg->start_bus && offset == (0x40 + PCI_EXP_RTCAP)) ++ *val &= ~PCI_EXP_RTCAP_CRSVIS; + break; + default: + xgene_pcie_cfg_in32(addr, offset, val); + break; + } -+ + return PCIBIOS_SUCCESSFUL; +} + -+static int xgene_pcie_write_config(struct pci_bus *bus, unsigned int devfn, -+ int offset, int len, u32 val) ++static int xgene_raw_pci_write(struct pci_mmcfg_region *cfg, unsigned int bus, ++ unsigned int devfn, int offset, int len, u32 val) +{ -+ struct xgene_pcie_port *port = bus->sysdata; + void __iomem *addr; + -+ if ((pci_is_root_bus(bus) && devfn != 0) || !port->link_up) ++ if (bus == cfg->start_bus && devfn != 0) + return PCIBIOS_DEVICE_NOT_FOUND; + -+ if (xgene_pcie_hide_rc_bars(bus, offset)) -+ return PCIBIOS_SUCCESSFUL; -+ -+ xgene_pcie_set_rtdid_reg(bus, devfn); -+ addr = xgene_pcie_get_cfg_base(bus); ++ __set_rtdid_reg(cfg, bus, devfn); ++ addr = __get_cfg_base(cfg, bus); + switch (len) { + case 1: + xgene_pcie_cfg_out8(addr, offset, (u8)val); @@ -6100,631 +11449,64 @@ index 0000000..41c76b8 + xgene_pcie_cfg_out32(addr, offset, val); + break; + } -+ + return PCIBIOS_SUCCESSFUL; +} + -+static struct pci_ops xgene_pcie_ops = { -+ .read = xgene_pcie_read_config, -+ .write = xgene_pcie_write_config -+}; -+ -+static u64 xgene_pcie_set_ib_mask(void __iomem *csr_base, u32 addr, -+ u32 flags, u64 size) -+{ -+ u64 mask = (~(size - 1) & PCI_BASE_ADDRESS_MEM_MASK) | flags; -+ u32 val32 = 0; -+ u32 val; -+ -+ val32 = readl(csr_base + addr); -+ val = (val32 & 0x0000ffff) | (lower_32_bits(mask) << 16); -+ writel(val, csr_base + addr); -+ -+ val32 = readl(csr_base + addr + 0x04); -+ val = (val32 & 0xffff0000) | (lower_32_bits(mask) >> 16); -+ writel(val, csr_base + addr + 0x04); -+ -+ val32 = readl(csr_base + addr + 0x04); -+ val = (val32 & 0x0000ffff) | (upper_32_bits(mask) << 16); -+ writel(val, csr_base + addr + 0x04); -+ -+ val32 = readl(csr_base + addr + 0x08); -+ val = (val32 & 0xffff0000) | (upper_32_bits(mask) >> 16); -+ writel(val, csr_base + addr + 0x08); -+ -+ return mask; -+} -+ -+static void xgene_pcie_linkup(struct xgene_pcie_port *port, -+ u32 *lanes, u32 *speed) -+{ -+ void __iomem *csr_base = port->csr_base; -+ u32 val32; -+ -+ port->link_up = false; -+ val32 = readl(csr_base + PCIECORE_CTLANDSTATUS); -+ if (val32 & LINK_UP_MASK) { -+ port->link_up = true; -+ *speed = PIPE_PHY_RATE_RD(val32); -+ val32 = readl(csr_base + BRIDGE_STATUS_0); -+ *lanes = val32 >> 26; -+ } -+} -+ -+static int xgene_pcie_init_port(struct xgene_pcie_port *port) ++static acpi_status find_csr_base(struct acpi_resource *acpi_res, void *data) +{ -+ int rc; -+ -+ port->clk = clk_get(port->dev, NULL); -+ if (IS_ERR(port->clk)) { -+ dev_err(port->dev, "clock not available\n"); -+ return -ENODEV; -+ } -+ -+ rc = clk_prepare_enable(port->clk); -+ if (rc) { -+ dev_err(port->dev, "clock enable failed\n"); -+ return rc; -+ } -+ -+ return 0; -+} -+ -+static int xgene_pcie_map_reg(struct xgene_pcie_port *port, -+ struct platform_device *pdev) -+{ -+ struct resource *res; -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "csr"); -+ port->csr_base = devm_ioremap_resource(port->dev, res); -+ if (IS_ERR(port->csr_base)) -+ return PTR_ERR(port->csr_base); -+ -+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg"); -+ port->cfg_base = devm_ioremap_resource(port->dev, res); -+ if (IS_ERR(port->cfg_base)) -+ return PTR_ERR(port->cfg_base); -+ port->cfg_addr = res->start; -+ -+ return 0; -+} -+ -+static void xgene_pcie_setup_ob_reg(struct xgene_pcie_port *port, -+ struct resource *res, u32 offset, -+ u64 cpu_addr, u64 pci_addr) -+{ -+ void __iomem *base = port->csr_base + offset; -+ resource_size_t size = resource_size(res); -+ u64 restype = resource_type(res); -+ u64 mask = 0; -+ u32 min_size; -+ u32 flag = EN_REG; -+ -+ if (restype == IORESOURCE_MEM) { -+ min_size = SZ_128M; -+ } else { -+ min_size = 128; -+ flag |= OB_LO_IO; -+ } -+ -+ if (size >= min_size) -+ mask = ~(size - 1) | flag; -+ else -+ dev_warn(port->dev, "res size 0x%llx less than minimum 0x%x\n", -+ (u64)size, min_size); -+ -+ writel(lower_32_bits(cpu_addr), base); -+ writel(upper_32_bits(cpu_addr), base + 0x04); -+ writel(lower_32_bits(mask), base + 0x08); -+ writel(upper_32_bits(mask), base + 0x0c); -+ writel(lower_32_bits(pci_addr), base + 0x10); -+ writel(upper_32_bits(pci_addr), base + 0x14); -+} -+ -+static void xgene_pcie_setup_cfg_reg(void __iomem *csr_base, u64 addr) -+{ -+ writel(lower_32_bits(addr), csr_base + CFGBARL); -+ writel(upper_32_bits(addr), csr_base + CFGBARH); -+ writel(EN_REG, csr_base + CFGCTL); -+} -+ -+static int xgene_pcie_map_ranges(struct xgene_pcie_port *port, -+ struct list_head *res, -+ resource_size_t io_base) -+{ -+ struct pci_host_bridge_window *window; -+ struct device *dev = port->dev; -+ int ret; -+ -+ list_for_each_entry(window, res, list) { -+ struct resource *res = window->res; -+ u64 restype = resource_type(res); -+ -+ dev_dbg(port->dev, "%pR\n", res); -+ -+ switch (restype) { -+ case IORESOURCE_IO: -+ xgene_pcie_setup_ob_reg(port, res, OMR3BARL, io_base, -+ res->start - window->offset); -+ ret = pci_remap_iospace(res, io_base); -+ if (ret < 0) -+ return ret; -+ break; -+ case IORESOURCE_MEM: -+ xgene_pcie_setup_ob_reg(port, res, OMR1BARL, res->start, -+ res->start - window->offset); -+ break; -+ case IORESOURCE_BUS: -+ break; -+ default: -+ dev_err(dev, "invalid io resource - %pR\n", res); -+ return -EINVAL; -+ } -+ } -+ xgene_pcie_setup_cfg_reg(port->csr_base, port->cfg_addr); -+ -+ return 0; -+} -+ -+static void xgene_pcie_setup_pims(void *addr, u64 pim, u64 size) -+{ -+ writel(lower_32_bits(pim), addr); -+ writel(upper_32_bits(pim) | EN_COHERENCY, addr + 0x04); -+ writel(lower_32_bits(size), addr + 0x10); -+ writel(upper_32_bits(size), addr + 0x14); -+} -+ -+/* -+ * X-Gene PCIe support maximum 3 inbound memory regions -+ * This function helps to select a region based on size of region -+ */ -+static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size) -+{ -+ if ((size > 4) && (size < SZ_16M) && !(*ib_reg_mask & (1 << 1))) { -+ *ib_reg_mask |= (1 << 1); -+ return 1; -+ } -+ -+ if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) { -+ *ib_reg_mask |= (1 << 0); -+ return 0; -+ } -+ -+ if ((size > SZ_1M) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 2))) { -+ *ib_reg_mask |= (1 << 2); -+ return 2; -+ } -+ -+ return -EINVAL; -+} -+ -+static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port, -+ struct of_pci_range *range, u8 *ib_reg_mask) -+{ -+ void __iomem *csr_base = port->csr_base; -+ void __iomem *cfg_base = port->cfg_base; -+ void *bar_addr; -+ void *pim_addr; -+ u64 cpu_addr = range->cpu_addr; -+ u64 pci_addr = range->pci_addr; -+ u64 size = range->size; -+ u64 mask = ~(size - 1) | EN_REG; -+ u32 flags = PCI_BASE_ADDRESS_MEM_TYPE_64; -+ u32 bar_low; -+ int region; -+ -+ region = xgene_pcie_select_ib_reg(ib_reg_mask, range->size); -+ if (region < 0) { -+ dev_warn(port->dev, "invalid pcie dma-range config\n"); -+ return; -+ } -+ -+ if (range->flags & IORESOURCE_PREFETCH) -+ flags |= PCI_BASE_ADDRESS_MEM_PREFETCH; -+ -+ bar_low = pcie_bar_low_val((u32)cpu_addr, flags); -+ switch (region) { -+ case 0: -+ xgene_pcie_set_ib_mask(csr_base, BRIDGE_CFG_4, flags, size); -+ bar_addr = cfg_base + PCI_BASE_ADDRESS_0; -+ writel(bar_low, bar_addr); -+ writel(upper_32_bits(cpu_addr), bar_addr + 0x4); -+ pim_addr = csr_base + PIM1_1L; -+ break; -+ case 1: -+ bar_addr = csr_base + IBAR2; -+ writel(bar_low, bar_addr); -+ writel(lower_32_bits(mask), csr_base + IR2MSK); -+ pim_addr = csr_base + PIM2_1L; -+ break; -+ case 2: -+ bar_addr = csr_base + IBAR3L; -+ writel(bar_low, bar_addr); -+ writel(upper_32_bits(cpu_addr), bar_addr + 0x4); -+ writel(lower_32_bits(mask), csr_base + IR3MSKL); -+ writel(upper_32_bits(mask), csr_base + IR3MSKL + 0x4); -+ pim_addr = csr_base + PIM3_1L; -+ break; ++ struct pci_mmcfg_region *cfg = data; ++ struct xgene_mcfg_info *info = cfg->data; ++ struct acpi_resource_fixed_memory32 *fixed32; ++ ++ if (acpi_res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) { ++ fixed32 = &acpi_res->data.fixed_memory32; ++ info->csr_base = ioremap(fixed32->address, ++ fixed32->address_length); ++ return AE_CTRL_TERMINATE; + } -+ -+ xgene_pcie_setup_pims(pim_addr, pci_addr, ~(size - 1)); ++ return AE_OK; +} + -+static int pci_dma_range_parser_init(struct of_pci_range_parser *parser, -+ struct device_node *node) ++static int xgene_mcfg_fixup(struct acpi_pci_root *root, ++ struct pci_mmcfg_region *cfg) +{ -+ const int na = 3, ns = 2; -+ int rlen; -+ -+ parser->node = node; -+ parser->pna = of_n_addr_cells(node); -+ parser->np = parser->pna + na + ns; -+ -+ parser->range = of_get_property(node, "dma-ranges", &rlen); -+ if (!parser->range) -+ return -ENOENT; -+ parser->end = parser->range + rlen / sizeof(__be32); -+ -+ return 0; -+} ++ struct acpi_device *device = root->device; ++ struct xgene_mcfg_info *info; + -+static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie_port *port) -+{ -+ struct device_node *np = port->node; -+ struct of_pci_range range; -+ struct of_pci_range_parser parser; -+ struct device *dev = port->dev; -+ u8 ib_reg_mask = 0; ++ info = kzalloc(sizeof(*info), GFP_KERNEL); ++ if (info == NULL) ++ return -ENOMEM; + -+ if (pci_dma_range_parser_init(&parser, np)) { -+ dev_err(dev, "missing dma-ranges property\n"); -+ return -EINVAL; -+ } ++ cfg->data = info; + -+ /* Get the dma-ranges from DT */ -+ for_each_of_pci_range(&parser, &range) { -+ u64 end = range.cpu_addr + range.size - 1; ++ acpi_walk_resources(device->handle, METHOD_NAME__CRS, ++ find_csr_base, cfg); + -+ dev_dbg(port->dev, "0x%08x 0x%016llx..0x%016llx -> 0x%016llx\n", -+ range.flags, range.cpu_addr, end, range.pci_addr); -+ xgene_pcie_setup_ib_reg(port, &range, &ib_reg_mask); ++ if (!info->csr_base) { ++ kfree(info); ++ cfg->data = NULL; ++ return -ENODEV; + } -+ return 0; -+} -+ -+/* clear bar configuration which was done by firmware */ -+static void xgene_pcie_clear_config(struct xgene_pcie_port *port) -+{ -+ int i; -+ -+ for (i = PIM1_1L; i <= CFGCTL; i += 4) -+ writel(0x0, port->csr_base + i); -+} -+ -+static int xgene_pcie_setup(struct xgene_pcie_port *port, -+ struct list_head *res, -+ resource_size_t io_base) -+{ -+ u32 val, lanes = 0, speed = 0; -+ int ret; -+ -+ xgene_pcie_clear_config(port); -+ -+ /* setup the vendor and device IDs correctly */ -+ val = (XGENE_PCIE_DEVICEID << 16) | XGENE_PCIE_VENDORID; -+ writel(val, port->csr_base + BRIDGE_CFG_0); -+ -+ ret = xgene_pcie_map_ranges(port, res, io_base); -+ if (ret) -+ return ret; -+ -+ ret = xgene_pcie_parse_map_dma_ranges(port); -+ if (ret) -+ return ret; -+ -+ xgene_pcie_linkup(port, &lanes, &speed); -+ if (!port->link_up) -+ dev_info(port->dev, "(rc) link down\n"); -+ else -+ dev_info(port->dev, "(rc) x%d gen-%d link up\n", -+ lanes, speed + 1); -+ return 0; -+} -+ -+static int xgene_pcie_probe_bridge(struct platform_device *pdev) -+{ -+ struct device_node *dn = pdev->dev.of_node; -+ struct xgene_pcie_port *port; -+ resource_size_t iobase = 0; -+ struct pci_bus *bus; -+ int ret; -+ LIST_HEAD(res); -+ -+ port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL); -+ if (!port) -+ return -ENOMEM; -+ port->node = of_node_get(pdev->dev.of_node); -+ port->dev = &pdev->dev; -+ -+ ret = xgene_pcie_map_reg(port, pdev); -+ if (ret) -+ return ret; + -+ ret = xgene_pcie_init_port(port); -+ if (ret) -+ return ret; -+ -+ ret = of_pci_get_host_bridge_resources(dn, 0, 0xff, &res, &iobase); -+ if (ret) -+ return ret; ++ cfg->read = xgene_raw_pci_read; ++ cfg->write = xgene_raw_pci_write; + -+ ret = xgene_pcie_setup(port, &res, iobase); -+ if (ret) -+ return ret; ++ /* actual last bus reachable through this mmconfig */ ++ cfg->end_bus = root->secondary.end; + -+ bus = pci_scan_root_bus(&pdev->dev, 0, &xgene_pcie_ops, port, &res); -+ if (!bus) -+ return -ENOMEM; ++ /* firmware should have done this */ ++ xgene_raw_pci_write(cfg, cfg->start_bus, 0, PCI_PRIMARY_BUS, 4, ++ cfg->start_bus | ((cfg->start_bus + 1) << 8) | ++ (cfg->end_bus << 16)); + -+ platform_set_drvdata(pdev, port); + return 0; +} ++DECLARE_ACPI_MCFG_FIXUP("APM ", "XGENE ", xgene_mcfg_fixup); ++#endif /* CONFIG_ACPI */ + -+static const struct of_device_id xgene_pcie_match_table[] = { -+ {.compatible = "apm,xgene-pcie",}, -+ {}, -+}; -+ -+static struct platform_driver xgene_pcie_driver = { -+ .driver = { -+ .name = "xgene-pcie", -+ .owner = THIS_MODULE, -+ .of_match_table = of_match_ptr(xgene_pcie_match_table), -+ }, -+ .probe = xgene_pcie_probe_bridge, -+}; -+module_platform_driver(xgene_pcie_driver); -+ -+MODULE_AUTHOR("Tanmay Inamdar <tinamdar@apm.com>"); -+MODULE_DESCRIPTION("APM X-Gene PCIe driver"); -+MODULE_LICENSE("GPL v2"); -diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c -index 4884ee5..61158e0 100644 ---- a/drivers/pci/host/pcie-rcar.c -+++ b/drivers/pci/host/pcie-rcar.c -@@ -323,6 +323,7 @@ static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie) - - /* Setup PCIe address space mappings for each resource */ - resource_size_t size; -+ resource_size_t res_start; - u32 mask; - - rcar_pci_write_reg(pcie, 0x00000000, PCIEPTCTLR(win)); -@@ -335,8 +336,13 @@ static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie) - mask = (roundup_pow_of_two(size) / SZ_128) - 1; - rcar_pci_write_reg(pcie, mask << 7, PCIEPAMR(win)); - -- rcar_pci_write_reg(pcie, upper_32_bits(res->start), PCIEPARH(win)); -- rcar_pci_write_reg(pcie, lower_32_bits(res->start), PCIEPARL(win)); -+ if (res->flags & IORESOURCE_IO) -+ res_start = pci_pio_to_address(res->start); -+ else -+ res_start = res->start; -+ -+ rcar_pci_write_reg(pcie, upper_32_bits(res_start), PCIEPARH(win)); -+ rcar_pci_write_reg(pcie, lower_32_bits(res_start), PCIEPARL(win)); - - /* First resource is for IO */ - mask = PAR_ENABLE; -@@ -363,9 +369,10 @@ static int rcar_pcie_setup(int nr, struct pci_sys_data *sys) - - rcar_pcie_setup_window(i, pcie); - -- if (res->flags & IORESOURCE_IO) -- pci_ioremap_io(nr * SZ_64K, res->start); -- else -+ if (res->flags & IORESOURCE_IO) { -+ phys_addr_t io_start = pci_pio_to_address(res->start); -+ pci_ioremap_io(nr * SZ_64K, io_start); -+ } else - pci_add_resource(&sys->resources, res); - } - pci_add_resource(&sys->resources, &pcie->busn); -@@ -935,8 +942,10 @@ static int rcar_pcie_probe(struct platform_device *pdev) - } - - for_each_of_pci_range(&parser, &range) { -- of_pci_range_to_resource(&range, pdev->dev.of_node, -+ err = of_pci_range_to_resource(&range, pdev->dev.of_node, - &pcie->res[win++]); -+ if (err < 0) -+ return err; - - if (win > RCAR_PCI_MAX_RESOURCES) - break; -diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c -index 2c9ac70..6e994fc 100644 ---- a/drivers/pci/pci.c -+++ b/drivers/pci/pci.c -@@ -2704,6 +2704,37 @@ int pci_request_regions_exclusive(struct pci_dev *pdev, const char *res_name) - } - EXPORT_SYMBOL(pci_request_regions_exclusive); - -+/** -+ * pci_remap_iospace - Remap the memory mapped I/O space -+ * @res: Resource describing the I/O space -+ * @phys_addr: physical address of range to be mapped -+ * -+ * Remap the memory mapped I/O space described by the @res -+ * and the CPU physical address @phys_addr into virtual address space. -+ * Only architectures that have memory mapped IO functions defined -+ * (and the PCI_IOBASE value defined) should call this function. -+ */ -+int __weak pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr) -+{ -+#if defined(PCI_IOBASE) && defined(CONFIG_MMU) -+ unsigned long vaddr = (unsigned long)PCI_IOBASE + res->start; -+ -+ if (!(res->flags & IORESOURCE_IO)) -+ return -EINVAL; -+ -+ if (res->end > IO_SPACE_LIMIT) -+ return -EINVAL; -+ -+ return ioremap_page_range(vaddr, vaddr + resource_size(res), phys_addr, -+ pgprot_device(PAGE_KERNEL)); -+#else -+ /* this architecture does not have memory mapped I/O space, -+ so this function should never be called */ -+ WARN_ONCE(1, "This architecture does not support memory mapped I/O\n"); -+ return -ENODEV; -+#endif -+} -+ - static void __pci_set_master(struct pci_dev *dev, bool enable) - { - u16 old_cmd, cmd; -@@ -4406,6 +4437,15 @@ static void pci_no_domains(void) - #endif - } - -+#ifdef CONFIG_PCI_DOMAINS -+static atomic_t __domain_nr = ATOMIC_INIT(-1); -+ -+int pci_get_new_domain_nr(void) -+{ -+ return atomic_inc_return(&__domain_nr); -+} -+#endif -+ - /** - * pci_ext_cfg_avail - can we access extended PCI config space? - * -diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c -index 4170113..c3cec34 100644 ---- a/drivers/pci/probe.c -+++ b/drivers/pci/probe.c -@@ -485,7 +485,7 @@ void pci_read_bridge_bases(struct pci_bus *child) - } - } - --static struct pci_bus *pci_alloc_bus(void) -+static struct pci_bus *pci_alloc_bus(struct pci_bus *parent) - { - struct pci_bus *b; - -@@ -500,6 +500,10 @@ static struct pci_bus *pci_alloc_bus(void) - INIT_LIST_HEAD(&b->resources); - b->max_bus_speed = PCI_SPEED_UNKNOWN; - b->cur_bus_speed = PCI_SPEED_UNKNOWN; -+#ifdef CONFIG_PCI_DOMAINS_GENERIC -+ if (parent) -+ b->domain_nr = parent->domain_nr; -+#endif - return b; - } - -@@ -515,7 +519,7 @@ static void pci_release_host_bridge_dev(struct device *dev) - kfree(bridge); - } - --static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) -+static struct pci_host_bridge *pci_alloc_host_bridge(void) + static int xgene_pcie_probe_bridge(struct platform_device *pdev) { - struct pci_host_bridge *bridge; - -@@ -524,7 +528,8 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) - return NULL; - - INIT_LIST_HEAD(&bridge->windows); -- bridge->bus = b; -+ bridge->dev.release = pci_release_host_bridge_dev; -+ - return bridge; - } - -@@ -671,7 +676,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, - /* - * Allocate a new bus, and inherit stuff from the parent.. - */ -- child = pci_alloc_bus(); -+ child = pci_alloc_bus(parent); - if (!child) - return NULL; - -@@ -1751,37 +1756,37 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, - char bus_addr[64]; - char *fmt; - -- b = pci_alloc_bus(); -- if (!b) -+ bridge = pci_alloc_host_bridge(); -+ if (!bridge) - return NULL; - -+ bridge->dev.parent = parent; -+ -+ b = pci_alloc_bus(NULL); -+ if (!b) -+ goto err_out; -+ - b->sysdata = sysdata; - b->ops = ops; - b->number = b->busn_res.start = bus; -+ pci_bus_assign_domain_nr(b, parent); - b2 = pci_find_bus(pci_domain_nr(b), bus); - if (b2) { - /* If we already got to this bus through a different bridge, ignore it */ - dev_dbg(&b2->dev, "bus already known\n"); -- goto err_out; -+ goto err_bus_out; - } - -- bridge = pci_alloc_host_bridge(b); -- if (!bridge) -- goto err_out; -- -- bridge->dev.parent = parent; -- bridge->dev.release = pci_release_host_bridge_dev; -+ bridge->bus = b; - dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); - error = pcibios_root_bridge_prepare(bridge); -- if (error) { -- kfree(bridge); -+ if (error) - goto err_out; -- } - - error = device_register(&bridge->dev); - if (error) { - put_device(&bridge->dev); -- goto err_out; -+ goto err_bus_out; - } - b->bridge = get_device(&bridge->dev); - device_enable_async_suspend(b->bridge); -@@ -1838,8 +1843,10 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, - class_dev_reg_err: - put_device(&bridge->dev); - device_unregister(&bridge->dev); --err_out: -+err_bus_out: - kfree(b); -+err_out: -+ kfree(bridge); - return NULL; - } - -@@ -1936,6 +1943,9 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, - if (!found) - pci_bus_update_busn_res_end(b, max); - -+ if (!pci_has_flag(PCI_PROBE_ONLY)) -+ pci_assign_unassigned_bus_resources(b); -+ - pci_bus_add_devices(b); - return b; - } + struct device_node *dn = pdev->dev.of_node; diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 782e822..d952462 100644 --- a/drivers/pnp/resource.c @@ -7133,10 +11915,10 @@ index 0000000..402f168 + +MODULE_LICENSE("GPL v2"); diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c -index 57d9df8..e075437 100644 +index beea6ca..7038a2d 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c -@@ -313,10 +313,18 @@ static int dw8250_probe_of(struct uart_port *p, +@@ -310,10 +310,18 @@ static int dw8250_probe_of(struct uart_port *p, static int dw8250_probe_acpi(struct uart_8250_port *up, struct dw8250_data *data) { @@ -7155,7 +11937,7 @@ index 57d9df8..e075437 100644 p->iotype = UPIO_MEM32; p->serial_in = dw8250_serial_in32; p->serial_out = dw8250_serial_out32; -@@ -541,6 +549,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = { +@@ -536,6 +544,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = { { "INT3435", 0 }, { "80860F0A", 0 }, { "8086228A", 0 }, @@ -7164,7 +11946,7 @@ index 57d9df8..e075437 100644 }; MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c -index c600ccf..10c4775 100644 +index ef9a165..9f1939c 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -100,8 +100,7 @@ @@ -7177,7 +11959,7 @@ index c600ccf..10c4775 100644 /* The alignment to use between consumer and producer parts of vring. * Currently hardcoded to the page size. */ -@@ -637,6 +636,14 @@ static struct of_device_id virtio_mmio_match[] = { +@@ -634,6 +633,14 @@ static struct of_device_id virtio_mmio_match[] = { }; MODULE_DEVICE_TABLE(of, virtio_mmio_match); @@ -7192,7 +11974,7 @@ index c600ccf..10c4775 100644 static struct platform_driver virtio_mmio_driver = { .probe = virtio_mmio_probe, .remove = virtio_mmio_remove, -@@ -644,6 +651,7 @@ static struct platform_driver virtio_mmio_driver = { +@@ -641,6 +648,7 @@ static struct platform_driver virtio_mmio_driver = { .name = "virtio-mmio", .owner = THIS_MODULE, .of_match_table = virtio_mmio_match, @@ -7200,26 +11982,31 @@ index c600ccf..10c4775 100644 }, }; -diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h -index c728113..f97804b 100644 ---- a/include/acpi/acnames.h -+++ b/include/acpi/acnames.h -@@ -59,6 +59,10 @@ - #define METHOD_NAME__PRS "_PRS" - #define METHOD_NAME__PRT "_PRT" - #define METHOD_NAME__PRW "_PRW" -+#define METHOD_NAME__PS0 "_PS0" -+#define METHOD_NAME__PS1 "_PS1" -+#define METHOD_NAME__PS2 "_PS2" -+#define METHOD_NAME__PS3 "_PS3" - #define METHOD_NAME__REG "_REG" - #define METHOD_NAME__SB_ "_SB_" - #define METHOD_NAME__SEG "_SEG" +diff --git a/drivers/xen/efi.c b/drivers/xen/efi.c +index 1f850c9..f745db2 100644 +--- a/drivers/xen/efi.c ++++ b/drivers/xen/efi.c +@@ -294,6 +294,7 @@ static const struct efi efi_xen __initconst = { + .acpi = EFI_INVALID_TABLE_ADDR, + .acpi20 = EFI_INVALID_TABLE_ADDR, + .smbios = EFI_INVALID_TABLE_ADDR, ++ .smbios3 = EFI_INVALID_TABLE_ADDR, + .sal_systab = EFI_INVALID_TABLE_ADDR, + .boot_info = EFI_INVALID_TABLE_ADDR, + .hcdp = EFI_INVALID_TABLE_ADDR, diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h -index 57ee052..a483e61 100644 +index f34a083..04d02fc 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h -@@ -68,6 +68,8 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs); +@@ -27,6 +27,7 @@ + #define __ACPI_BUS_H__ + + #include <linux/device.h> ++#include <linux/property.h> + + /* TBD: Make dynamic */ + #define ACPI_MAX_HANDLES 10 +@@ -68,6 +69,8 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs); union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, int rev, int func, union acpi_object *argv4); @@ -7228,6 +12015,61 @@ index 57ee052..a483e61 100644 static inline union acpi_object * acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, int rev, int func, union acpi_object *argv4, acpi_object_type type) +@@ -337,10 +340,20 @@ struct acpi_device_physical_node { + bool put_online:1; + }; + ++/* ACPI Device Specific Data (_DSD) */ ++struct acpi_device_data { ++ const union acpi_object *pointer; ++ const union acpi_object *properties; ++ const union acpi_object *of_compatible; ++}; ++ ++struct acpi_gpio_mapping; ++ + /* Device */ + struct acpi_device { + int device_type; + acpi_handle handle; /* no handle for fixed hardware */ ++ struct fwnode_handle fwnode; + struct acpi_device *parent; + struct list_head children; + struct list_head node; +@@ -353,9 +366,11 @@ struct acpi_device { + struct acpi_device_wakeup wakeup; + struct acpi_device_perf performance; + struct acpi_device_dir dir; ++ struct acpi_device_data data; + struct acpi_scan_handler *handler; + struct acpi_hotplug_context *hp; + struct acpi_driver *driver; ++ const struct acpi_gpio_mapping *driver_gpios; + void *driver_data; + struct device dev; + unsigned int physical_node_count; +@@ -364,6 +379,21 @@ struct acpi_device { + void (*remove)(struct acpi_device *); + }; + ++static inline bool is_acpi_node(struct fwnode_handle *fwnode) ++{ ++ return fwnode && fwnode->type == FWNODE_ACPI; ++} ++ ++static inline struct acpi_device *acpi_node(struct fwnode_handle *fwnode) ++{ ++ return fwnode ? container_of(fwnode, struct acpi_device, fwnode) : NULL; ++} ++ ++static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev) ++{ ++ return &adev->fwnode; ++} ++ + static inline void *acpi_driver_data(struct acpi_device *d) + { + return d->driver_data; diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h index 444671e..9d573db 100644 --- a/include/acpi/acpi_io.h @@ -7250,118 +12092,29 @@ index 444671e..9d573db 100644 return ioremap_cache(phys, size); } -diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h -index b7c89d4..dc9d037 100644 ---- a/include/acpi/acpixf.h -+++ b/include/acpi/acpixf.h -@@ -46,7 +46,7 @@ - - /* Current ACPICA subsystem version in YYYYMMDD format */ - --#define ACPI_CA_VERSION 0x20140724 -+#define ACPI_CA_VERSION 0x20140828 - - #include <acpi/acconfig.h> - #include <acpi/actypes.h> -diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h -index 7626bfe..29e7937 100644 ---- a/include/acpi/actbl1.h -+++ b/include/acpi/actbl1.h -@@ -952,7 +952,8 @@ enum acpi_srat_type { - ACPI_SRAT_TYPE_CPU_AFFINITY = 0, - ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, - ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, -- ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ -+ ACPI_SRAT_TYPE_GICC_AFFINITY = 3, -+ ACPI_SRAT_TYPE_RESERVED = 4 /* 4 and greater are reserved */ - }; - - /* -@@ -968,7 +969,7 @@ struct acpi_srat_cpu_affinity { - u32 flags; - u8 local_sapic_eid; - u8 proximity_domain_hi[3]; -- u32 reserved; /* Reserved, must be zero */ -+ u32 clock_domain; - }; - - /* Flags */ -@@ -1010,6 +1011,20 @@ struct acpi_srat_x2apic_cpu_affinity { - - #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ - -+/* 3: GICC Affinity (ACPI 5.1) */ -+ -+struct acpi_srat_gicc_affinity { -+ struct acpi_subtable_header header; -+ u32 proximity_domain; -+ u32 acpi_processor_uid; -+ u32 flags; -+ u32 clock_domain; -+}; -+ -+/* Flags for struct acpi_srat_gicc_affinity */ -+ -+#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ -+ - /* Reset to default packing */ - - #pragma pack() -diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h -index 787bcc8..5480cb2 100644 ---- a/include/acpi/actbl3.h -+++ b/include/acpi/actbl3.h -@@ -310,10 +310,15 @@ struct acpi_gtdt_timer_entry { - u32 common_flags; - }; - -+/* Flag Definitions: timer_flags and virtual_timer_flags above */ -+ -+#define ACPI_GTDT_GT_IRQ_MODE (1) -+#define ACPI_GTDT_GT_IRQ_POLARITY (1<<1) -+ - /* Flag Definitions: common_flags above */ - --#define ACPI_GTDT_GT_IS_SECURE_TIMER (1) --#define ACPI_GTDT_GT_ALWAYS_ON (1<<1) -+#define ACPI_GTDT_GT_IS_SECURE_TIMER (1) -+#define ACPI_GTDT_GT_ALWAYS_ON (1<<1) - - /* 1: SBSA Generic Watchdog Structure */ - -diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h -index 975e1cc..2e2161b 100644 ---- a/include/asm-generic/io.h -+++ b/include/asm-generic/io.h -@@ -331,7 +331,7 @@ static inline void iounmap(void __iomem *addr) - #ifndef CONFIG_GENERIC_IOMAP - static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) - { -- return (void __iomem *) port; -+ return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT)); - } - - static inline void ioport_unmap(void __iomem *p) -diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h -index 53b2acc..977e545 100644 ---- a/include/asm-generic/pgtable.h -+++ b/include/asm-generic/pgtable.h -@@ -249,6 +249,10 @@ static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b) - #define pgprot_writecombine pgprot_noncached - #endif - -+#ifndef pgprot_device -+#define pgprot_device pgprot_noncached -+#endif -+ - /* - * When walking page tables, get the address of the next boundary, - * or the end address of the range if that comes earlier. Although no +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h +index aa70cbd..1261fef 100644 +--- a/include/asm-generic/vmlinux.lds.h ++++ b/include/asm-generic/vmlinux.lds.h +@@ -275,6 +275,13 @@ + VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .; \ + } \ + \ ++ /* ACPI quirks */ \ ++ .acpi_fixup : AT(ADDR(.acpi_fixup) - LOAD_OFFSET) { \ ++ VMLINUX_SYMBOL(__start_acpi_mcfg_fixups) = .; \ ++ *(.acpi_fixup_mcfg) \ ++ VMLINUX_SYMBOL(__end_acpi_mcfg_fixups) = .; \ ++ } \ ++ \ + /* Built-in firmware blobs */ \ + .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \ + VMLINUX_SYMBOL(__start_builtin_fw) = .; \ diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h -index 35b0c12..d98e96b 100644 +index 206dcc3..660dbfc 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h -@@ -237,17 +237,19 @@ bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, +@@ -289,17 +289,19 @@ bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) #define vgic_initialized(k) ((k)->arch.vgic.ready) @@ -7391,10 +12144,18 @@ index 35b0c12..d98e96b 100644 return -ENODEV; } diff --git a/include/linux/acpi.h b/include/linux/acpi.h -index 807cbc4..4615eb1 100644 +index 407a12f..de81de3 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h -@@ -71,6 +71,7 @@ enum acpi_irq_model_id { +@@ -28,6 +28,7 @@ + #include <linux/errno.h> + #include <linux/ioport.h> /* for struct resource */ + #include <linux/device.h> ++#include <linux/property.h> + + #ifndef _LINUX + #define _LINUX +@@ -71,6 +72,7 @@ enum acpi_irq_model_id { ACPI_IRQ_MODEL_IOAPIC, ACPI_IRQ_MODEL_IOSAPIC, ACPI_IRQ_MODEL_PLATFORM, @@ -7402,7 +12163,7 @@ index 807cbc4..4615eb1 100644 ACPI_IRQ_MODEL_COUNT }; -@@ -123,6 +124,10 @@ int acpi_numa_init (void); +@@ -123,6 +125,10 @@ int acpi_numa_init (void); int acpi_table_init (void); int acpi_table_parse(char *id, acpi_tbl_table_handler handler); @@ -7413,8 +12174,162 @@ index 807cbc4..4615eb1 100644 int __init acpi_table_parse_entries(char *id, unsigned long table_size, int entry_id, acpi_tbl_entry_handler handler, +@@ -423,12 +429,8 @@ extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *), + const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids, + const struct device *dev); + +-static inline bool acpi_driver_match_device(struct device *dev, +- const struct device_driver *drv) +-{ +- return !!acpi_match_device(drv->acpi_match_table, dev); +-} +- ++extern bool acpi_driver_match_device(struct device *dev, ++ const struct device_driver *drv); + int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); + int acpi_device_modalias(struct device *, char *, int); + +@@ -443,6 +445,23 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *); + #define ACPI_COMPANION_SET(dev, adev) do { } while (0) + #define ACPI_HANDLE(dev) (NULL) + ++struct fwnode_handle; ++ ++static inline bool is_acpi_node(struct fwnode_handle *fwnode) ++{ ++ return false; ++} ++ ++static inline struct acpi_device *acpi_node(struct fwnode_handle *fwnode) ++{ ++ return NULL; ++} ++ ++static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev) ++{ ++ return NULL; ++} ++ + static inline const char *acpi_dev_name(struct acpi_device *adev) + { + return NULL; +@@ -659,4 +678,114 @@ do { \ + #endif + #endif + ++struct acpi_gpio_params { ++ unsigned int crs_entry_index; ++ unsigned int line_index; ++ bool active_low; ++}; ++ ++struct acpi_gpio_mapping { ++ const char *name; ++ const struct acpi_gpio_params *data; ++ unsigned int size; ++}; ++ ++#if defined(CONFIG_ACPI) && defined(CONFIG_GPIOLIB) ++int acpi_dev_add_driver_gpios(struct acpi_device *adev, ++ const struct acpi_gpio_mapping *gpios); ++ ++static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev) ++{ ++ if (adev) ++ adev->driver_gpios = NULL; ++} ++#else ++static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev, ++ const struct acpi_gpio_mapping *gpios) ++{ ++ return -ENXIO; ++} ++static inline void acpi_dev_remove_driver_gpios(struct acpi_device *adev) {} ++#endif ++ ++/* Device properties */ ++ ++#define MAX_ACPI_REFERENCE_ARGS 8 ++struct acpi_reference_args { ++ struct acpi_device *adev; ++ size_t nargs; ++ u64 args[MAX_ACPI_REFERENCE_ARGS]; ++}; ++ ++#ifdef CONFIG_ACPI ++int acpi_dev_get_property(struct acpi_device *adev, const char *name, ++ acpi_object_type type, const union acpi_object **obj); ++int acpi_dev_get_property_array(struct acpi_device *adev, const char *name, ++ acpi_object_type type, ++ const union acpi_object **obj); ++int acpi_dev_get_property_reference(struct acpi_device *adev, ++ const char *name, size_t index, ++ struct acpi_reference_args *args); ++ ++int acpi_dev_prop_get(struct acpi_device *adev, const char *propname, ++ void **valptr); ++int acpi_dev_prop_read_single(struct acpi_device *adev, const char *propname, ++ enum dev_prop_type proptype, void *val); ++int acpi_dev_prop_read(struct acpi_device *adev, const char *propname, ++ enum dev_prop_type proptype, void *val, size_t nval); ++ ++struct acpi_device *acpi_get_next_child(struct device *dev, ++ struct acpi_device *child); ++#else ++static inline int acpi_dev_get_property(struct acpi_device *adev, ++ const char *name, acpi_object_type type, ++ const union acpi_object **obj) ++{ ++ return -ENXIO; ++} ++static inline int acpi_dev_get_property_array(struct acpi_device *adev, ++ const char *name, ++ acpi_object_type type, ++ const union acpi_object **obj) ++{ ++ return -ENXIO; ++} ++static inline int acpi_dev_get_property_reference(struct acpi_device *adev, ++ const char *name, const char *cells_name, ++ size_t index, struct acpi_reference_args *args) ++{ ++ return -ENXIO; ++} ++ ++static inline int acpi_dev_prop_get(struct acpi_device *adev, ++ const char *propname, ++ void **valptr) ++{ ++ return -ENXIO; ++} ++ ++static inline int acpi_dev_prop_read_single(struct acpi_device *adev, ++ const char *propname, ++ enum dev_prop_type proptype, ++ void *val) ++{ ++ return -ENXIO; ++} ++ ++static inline int acpi_dev_prop_read(struct acpi_device *adev, ++ const char *propname, ++ enum dev_prop_type proptype, ++ void *val, size_t nval) ++{ ++ return -ENXIO; ++} ++ ++static inline struct acpi_device *acpi_get_next_child(struct device *dev, ++ struct acpi_device *child) ++{ ++ return NULL; ++} ++ ++#endif ++ + #endif /*_LINUX_ACPI_H*/ diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h -index 653f0e2..5839f98 100644 +index abcafaa..4f5caa1 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -346,4 +346,10 @@ extern void clocksource_of_init(void); @@ -7428,6 +12343,76 @@ index 653f0e2..5839f98 100644 +#endif + #endif /* _LINUX_CLOCKSOURCE_H */ +diff --git a/include/linux/efi.h b/include/linux/efi.h +index 0949f9c..0238d61 100644 +--- a/include/linux/efi.h ++++ b/include/linux/efi.h +@@ -547,6 +547,9 @@ void efi_native_runtime_setup(void); + #define SMBIOS_TABLE_GUID \ + EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) + ++#define SMBIOS3_TABLE_GUID \ ++ EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 ) ++ + #define SAL_SYSTEM_TABLE_GUID \ + EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) + +@@ -810,7 +813,8 @@ extern struct efi { + unsigned long mps; /* MPS table */ + unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ + unsigned long acpi20; /* ACPI table (ACPI 2.0) */ +- unsigned long smbios; /* SM BIOS table */ ++ unsigned long smbios; /* SMBIOS table (32 bit entry point) */ ++ unsigned long smbios3; /* SMBIOS table (64 bit entry point) */ + unsigned long sal_systab; /* SAL system table */ + unsigned long boot_info; /* boot info table */ + unsigned long hcdp; /* HCDP table */ +diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h +index 12f146f..00b1b70 100644 +--- a/include/linux/gpio/consumer.h ++++ b/include/linux/gpio/consumer.h +@@ -94,6 +94,13 @@ int gpiod_to_irq(const struct gpio_desc *desc); + struct gpio_desc *gpio_to_desc(unsigned gpio); + int desc_to_gpio(const struct gpio_desc *desc); + ++/* Child properties interface */ ++struct fwnode_handle; ++ ++struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode, ++ const char *propname); ++struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, ++ struct fwnode_handle *child); + #else /* CONFIG_GPIOLIB */ + + static inline struct gpio_desc *__must_check __gpiod_get(struct device *dev, +diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h +index 8b62246..ee2d8c6 100644 +--- a/include/linux/gpio_keys.h ++++ b/include/linux/gpio_keys.h +@@ -2,6 +2,7 @@ + #define _GPIO_KEYS_H + + struct device; ++struct gpio_desc; + + /** + * struct gpio_keys_button - configuration parameters +@@ -17,6 +18,7 @@ struct device; + * disable button via sysfs + * @value: axis value for %EV_ABS + * @irq: Irq number in case of interrupt keys ++ * @gpiod: GPIO descriptor + */ + struct gpio_keys_button { + unsigned int code; +@@ -29,6 +31,7 @@ struct gpio_keys_button { + bool can_disable; + int value; + unsigned int irq; ++ struct gpio_desc *gpiod; + }; + + /** diff --git a/include/linux/irqchip/arm-gic-acpi.h b/include/linux/irqchip/arm-gic-acpi.h new file mode 100644 index 0000000..ad5b577 @@ -7466,111 +12451,131 @@ index 0000000..ad5b577 + +#endif /* ARM_GIC_ACPI_H_ */ diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h -index 45e2d8c..2b0f246 100644 +index 13eed92..dc9cb5f 100644 --- a/include/linux/irqchip/arm-gic.h +++ b/include/linux/irqchip/arm-gic.h -@@ -39,6 +39,8 @@ - #define GIC_DIST_SGI_PENDING_CLEAR 0xf10 - #define GIC_DIST_SGI_PENDING_SET 0xf20 +@@ -55,6 +55,8 @@ + (GICD_INT_DEF_PRI << 8) |\ + GICD_INT_DEF_PRI) +#define GIC_DIST_SOFTINT_NSATT 0x8000 + #define GICH_HCR 0x0 #define GICH_VTR 0x4 #define GICH_VMCR 0x8 -diff --git a/include/linux/of_address.h b/include/linux/of_address.h -index fb7b722..7ebb877 100644 ---- a/include/linux/of_address.h -+++ b/include/linux/of_address.h -@@ -23,17 +23,6 @@ struct of_pci_range { - #define for_each_of_pci_range(parser, range) \ - for (; of_pci_range_parser_one(parser, range);) - --static inline void of_pci_range_to_resource(struct of_pci_range *range, -- struct device_node *np, -- struct resource *res) --{ -- res->flags = range->flags; -- res->start = range->cpu_addr; -- res->end = range->cpu_addr + range->size - 1; -- res->parent = res->child = res->sibling = NULL; -- res->name = np->full_name; --} -- - /* Translate a DMA address from device space to CPU space */ - extern u64 of_translate_dma_address(struct device_node *dev, - const __be32 *in_addr); -@@ -55,7 +44,9 @@ extern void __iomem *of_iomap(struct device_node *device, int index); - extern const __be32 *of_get_address(struct device_node *dev, int index, - u64 *size, unsigned int *flags); - -+extern int pci_register_io_range(phys_addr_t addr, resource_size_t size); - extern unsigned long pci_address_to_pio(phys_addr_t addr); -+extern phys_addr_t pci_pio_to_address(unsigned long pio); - - extern int of_pci_range_parser_init(struct of_pci_range_parser *parser, - struct device_node *node); -@@ -138,6 +129,9 @@ extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, - u64 *size, unsigned int *flags); - extern int of_pci_address_to_resource(struct device_node *dev, int bar, - struct resource *r); -+extern int of_pci_range_to_resource(struct of_pci_range *range, -+ struct device_node *np, -+ struct resource *res); - #else /* CONFIG_OF_ADDRESS && CONFIG_PCI */ - static inline int of_pci_address_to_resource(struct device_node *dev, int bar, - struct resource *r) -@@ -153,4 +147,3 @@ static inline const __be32 *of_get_pci_address(struct device_node *dev, - #endif /* CONFIG_OF_ADDRESS && CONFIG_PCI */ - - #endif /* __OF_ADDRESS_H */ -- -diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h -index dde3a4a..1fd207e 100644 ---- a/include/linux/of_pci.h -+++ b/include/linux/of_pci.h -@@ -15,6 +15,7 @@ struct device_node *of_pci_find_child_device(struct device_node *parent, - int of_pci_get_devfn(struct device_node *np); - int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); - int of_pci_parse_bus_range(struct device_node *node, struct resource *res); -+int of_get_pci_domain_nr(struct device_node *node); - #else - static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq) - { -@@ -43,6 +44,18 @@ of_pci_parse_bus_range(struct device_node *node, struct resource *res) +diff --git a/include/linux/leds.h b/include/linux/leds.h +index a57611d..361101f 100644 +--- a/include/linux/leds.h ++++ b/include/linux/leds.h +@@ -261,6 +261,7 @@ struct gpio_led { + unsigned retain_state_suspended : 1; + unsigned default_state : 2; + /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ ++ struct gpio_desc *gpiod; + }; + #define LEDS_GPIO_DEFSTATE_OFF 0 + #define LEDS_GPIO_DEFSTATE_ON 1 +@@ -273,7 +274,7 @@ struct gpio_led_platform_data { + #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ + #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ + #define GPIO_LED_BLINK 2 /* Please, blink */ +- int (*gpio_blink_set)(unsigned gpio, int state, ++ int (*gpio_blink_set)(struct gpio_desc *desc, int state, + unsigned long *delay_on, + unsigned long *delay_off); + }; +diff --git a/include/linux/of.h b/include/linux/of.h +index 29f0adc..cf79be1 100644 +--- a/include/linux/of.h ++++ b/include/linux/of.h +@@ -23,6 +23,7 @@ + #include <linux/spinlock.h> + #include <linux/topology.h> + #include <linux/notifier.h> ++#include <linux/property.h> + + #include <asm/byteorder.h> + #include <asm/errno.h> +@@ -49,6 +50,7 @@ struct device_node { + const char *type; + phandle phandle; + const char *full_name; ++ struct fwnode_handle fwnode; + + struct property *properties; + struct property *deadprops; /* removed properties */ +@@ -79,6 +81,7 @@ extern struct kobj_type of_node_ktype; + static inline void of_node_init(struct device_node *node) { - return -EINVAL; + kobject_init(&node->kobj, &of_node_ktype); ++ node->fwnode.type = FWNODE_OF; } + + /* true when node is initialized */ +@@ -114,6 +117,16 @@ extern struct device_node *of_aliases; + extern struct device_node *of_stdout; + extern raw_spinlock_t devtree_lock; + ++static inline bool is_of_node(struct fwnode_handle *fwnode) ++{ ++ return fwnode && fwnode->type == FWNODE_OF; ++} + -+static inline int -+of_get_pci_domain_nr(struct device_node *node) ++static inline struct device_node *of_node(struct fwnode_handle *fwnode) +{ -+ return -1; ++ return fwnode ? container_of(fwnode, struct device_node, fwnode) : NULL; +} -+#endif + -+#if defined(CONFIG_OF_ADDRESS) -+int of_pci_get_host_bridge_resources(struct device_node *dev, -+ unsigned char busno, unsigned char bus_max, -+ struct list_head *resources, resource_size_t *io_base); - #endif + static inline bool of_have_populated_dt(void) + { + return of_allnodes != NULL; +@@ -263,6 +276,10 @@ extern int of_property_read_u32_array(const struct device_node *np, + size_t sz); + extern int of_property_read_u64(const struct device_node *np, + const char *propname, u64 *out_value); ++extern int of_property_read_u64_array(const struct device_node *np, ++ const char *propname, ++ u64 *out_values, ++ size_t sz); + + extern int of_property_read_string(struct device_node *np, + const char *propname, +@@ -355,6 +372,16 @@ bool of_console_check(struct device_node *dn, char *name, int index); + + #else /* CONFIG_OF */ + ++static inline bool is_of_node(struct fwnode_handle *fwnode) ++{ ++ return false; ++} ++ ++static inline struct device_node *of_node(struct fwnode_handle *fwnode) ++{ ++ return NULL; ++} ++ + static inline const char* of_node_full_name(const struct device_node *np) + { + return "<no-node>"; +@@ -477,6 +504,13 @@ static inline int of_property_read_u32_array(const struct device_node *np, + return -ENOSYS; + } - #if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI) ++static inline int of_property_read_u64_array(const struct device_node *np, ++ const char *propname, ++ u64 *out_values, size_t sz) ++{ ++ return -ENOSYS; ++} ++ + static inline int of_property_read_string(struct device_node *np, + const char *propname, + const char **out_string) diff --git a/include/linux/pci.h b/include/linux/pci.h -index 96453f9..6d540b9 100644 +index 5be8db4..6afba72 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -457,6 +457,9 @@ struct pci_bus { - unsigned char primary; /* number of primary bridge */ - unsigned char max_bus_speed; /* enum pci_bus_speed */ - unsigned char cur_bus_speed; /* enum pci_bus_speed */ -+#ifdef CONFIG_PCI_DOMAINS_GENERIC -+ int domain_nr; -+#endif - - char name[48]; - -@@ -559,15 +562,6 @@ struct pci_ops { +@@ -562,15 +562,6 @@ struct pci_ops { int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); }; @@ -7586,48 +12591,7 @@ index 96453f9..6d540b9 100644 struct pci_bus_region { dma_addr_t start; dma_addr_t end; -@@ -1103,6 +1097,9 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, - resource_size_t), - void *alignf_data); - -+ -+int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); -+ - static inline dma_addr_t pci_bus_address(struct pci_dev *pdev, int bar) - { - struct pci_bus_region region; -@@ -1288,17 +1285,47 @@ void pci_cfg_access_unlock(struct pci_dev *dev); - */ - #ifdef CONFIG_PCI_DOMAINS - extern int pci_domains_supported; -+int pci_get_new_domain_nr(void); - #else - enum { pci_domains_supported = 0 }; - static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } - static inline int pci_proc_domain(struct pci_bus *bus) { return 0; } -+static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } - #endif /* CONFIG_PCI_DOMAINS */ - -+/* -+ * Generic implementation for PCI domain support. If your -+ * architecture does not need custom management of PCI -+ * domains then this implementation will be used -+ */ -+#ifdef CONFIG_PCI_DOMAINS_GENERIC -+static inline int pci_domain_nr(struct pci_bus *bus) -+{ -+ return bus->domain_nr; -+} -+void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent); -+#else -+static inline void pci_bus_assign_domain_nr(struct pci_bus *bus, -+ struct device *parent) -+{ -+} -+#endif -+ - /* some architectures require additional setup to direct VGA traffic */ - typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, +@@ -1325,6 +1316,16 @@ typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, unsigned int command_bits, u32 flags); void pci_register_set_vga_state(arch_set_vga_state_t func); @@ -7644,7 +12608,7 @@ index 96453f9..6d540b9 100644 #else /* CONFIG_PCI is not enabled */ /* -@@ -1400,8 +1427,26 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, +@@ -1426,6 +1427,23 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn) { return NULL; } @@ -7667,11 +12631,8 @@ index 96453f9..6d540b9 100644 + static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } static inline struct pci_dev *pci_dev_get(struct pci_dev *dev) { return NULL; } -+static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } - - #define dev_is_pci(d) (false) - #define dev_is_pf(d) (false) -@@ -1613,7 +1658,6 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, + static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } +@@ -1635,7 +1653,6 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); int pcibios_add_device(struct pci_dev *dev); void pcibios_release_device(struct pci_dev *dev); @@ -7679,18 +12640,211 @@ index 96453f9..6d540b9 100644 #ifdef CONFIG_HIBERNATE_CALLBACKS extern struct dev_pm_ops pcibios_pm_ops; -diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h -index e9441b9..1d3f39c 100644 ---- a/tools/perf/arch/arm64/include/perf_regs.h -+++ b/tools/perf/arch/arm64/include/perf_regs.h -@@ -6,6 +6,8 @@ - #include <asm/perf_regs.h> +diff --git a/include/linux/property.h b/include/linux/property.h +new file mode 100644 +index 0000000..a6a3d98 +--- /dev/null ++++ b/include/linux/property.h +@@ -0,0 +1,143 @@ ++/* ++ * property.h - Unified device property interface. ++ * ++ * Copyright (C) 2014, Intel Corporation ++ * Authors: Rafael J. Wysocki <rafael.j.wysocki@intel.com> ++ * Mika Westerberg <mika.westerberg@linux.intel.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _LINUX_PROPERTY_H_ ++#define _LINUX_PROPERTY_H_ ++ ++#include <linux/types.h> ++ ++struct device; ++ ++enum dev_prop_type { ++ DEV_PROP_U8, ++ DEV_PROP_U16, ++ DEV_PROP_U32, ++ DEV_PROP_U64, ++ DEV_PROP_STRING, ++ DEV_PROP_MAX, ++}; ++ ++bool device_property_present(struct device *dev, const char *propname); ++int device_property_read_u8_array(struct device *dev, const char *propname, ++ u8 *val, size_t nval); ++int device_property_read_u16_array(struct device *dev, const char *propname, ++ u16 *val, size_t nval); ++int device_property_read_u32_array(struct device *dev, const char *propname, ++ u32 *val, size_t nval); ++int device_property_read_u64_array(struct device *dev, const char *propname, ++ u64 *val, size_t nval); ++int device_property_read_string_array(struct device *dev, const char *propname, ++ const char **val, size_t nval); ++int device_property_read_string(struct device *dev, const char *propname, ++ const char **val); ++ ++enum fwnode_type { ++ FWNODE_INVALID = 0, ++ FWNODE_OF, ++ FWNODE_ACPI, ++}; ++ ++struct fwnode_handle { ++ enum fwnode_type type; ++}; ++ ++bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname); ++int fwnode_property_read_u8_array(struct fwnode_handle *fwnode, ++ const char *propname, u8 *val, ++ size_t nval); ++int fwnode_property_read_u16_array(struct fwnode_handle *fwnode, ++ const char *propname, u16 *val, ++ size_t nval); ++int fwnode_property_read_u32_array(struct fwnode_handle *fwnode, ++ const char *propname, u32 *val, ++ size_t nval); ++int fwnode_property_read_u64_array(struct fwnode_handle *fwnode, ++ const char *propname, u64 *val, ++ size_t nval); ++int fwnode_property_read_string_array(struct fwnode_handle *fwnode, ++ const char *propname, const char **val, ++ size_t nval); ++int fwnode_property_read_string(struct fwnode_handle *fwnode, ++ const char *propname, const char **val); ++ ++struct fwnode_handle *device_get_next_child_node(struct device *dev, ++ struct fwnode_handle *child); ++ ++#define device_for_each_child_node(dev, child) \ ++ for (child = device_get_next_child_node(dev, NULL); child; \ ++ child = device_get_next_child_node(dev, child)) ++ ++void fwnode_handle_put(struct fwnode_handle *fwnode); ++ ++unsigned int device_get_child_node_count(struct device *dev); ++ ++static inline bool device_property_read_bool(struct device *dev, ++ const char *propname) ++{ ++ return device_property_present(dev, propname); ++} ++ ++static inline int device_property_read_u8(struct device *dev, ++ const char *propname, u8 *val) ++{ ++ return device_property_read_u8_array(dev, propname, val, 1); ++} ++ ++static inline int device_property_read_u16(struct device *dev, ++ const char *propname, u16 *val) ++{ ++ return device_property_read_u16_array(dev, propname, val, 1); ++} ++ ++static inline int device_property_read_u32(struct device *dev, ++ const char *propname, u32 *val) ++{ ++ return device_property_read_u32_array(dev, propname, val, 1); ++} ++ ++static inline int device_property_read_u64(struct device *dev, ++ const char *propname, u64 *val) ++{ ++ return device_property_read_u64_array(dev, propname, val, 1); ++} ++ ++static inline bool fwnode_property_read_bool(struct fwnode_handle *fwnode, ++ const char *propname) ++{ ++ return fwnode_property_present(fwnode, propname); ++} ++ ++static inline int fwnode_property_read_u8(struct fwnode_handle *fwnode, ++ const char *propname, u8 *val) ++{ ++ return fwnode_property_read_u8_array(fwnode, propname, val, 1); ++} ++ ++static inline int fwnode_property_read_u16(struct fwnode_handle *fwnode, ++ const char *propname, u16 *val) ++{ ++ return fwnode_property_read_u16_array(fwnode, propname, val, 1); ++} ++ ++static inline int fwnode_property_read_u32(struct fwnode_handle *fwnode, ++ const char *propname, u32 *val) ++{ ++ return fwnode_property_read_u32_array(fwnode, propname, val, 1); ++} ++ ++static inline int fwnode_property_read_u64(struct fwnode_handle *fwnode, ++ const char *propname, u64 *val) ++{ ++ return fwnode_property_read_u64_array(fwnode, propname, val, 1); ++} ++ ++#endif /* _LINUX_PROPERTY_H_ */ +diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c +index 0f62326..2a47179 100644 +--- a/net/rfkill/rfkill-gpio.c ++++ b/net/rfkill/rfkill-gpio.c +@@ -63,6 +63,15 @@ static const struct rfkill_ops rfkill_gpio_ops = { + .set_block = rfkill_gpio_set_power, + }; - #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1) -+#define PERF_REGS_MAX PERF_REG_ARM64_MAX ++static const struct acpi_gpio_params reset_gpios = { 0, 0, false }; ++static const struct acpi_gpio_params shutdown_gpios = { 1, 0, false }; + - #define PERF_REG_IP PERF_REG_ARM64_PC - #define PERF_REG_SP PERF_REG_ARM64_SP ++static const struct acpi_gpio_mapping acpi_rfkill_default_gpios[] = { ++ { "reset-gpios", &reset_gpios, 1 }, ++ { "shutdown-gpios", &shutdown_gpios, 1 }, ++ { }, ++}; ++ + static int rfkill_gpio_acpi_probe(struct device *dev, + struct rfkill_gpio_data *rfkill) + { +@@ -75,7 +84,8 @@ static int rfkill_gpio_acpi_probe(struct device *dev, + rfkill->name = dev_name(dev); + rfkill->type = (unsigned)id->driver_data; + +- return 0; ++ return acpi_dev_add_driver_gpios(ACPI_COMPANION(dev), ++ acpi_rfkill_default_gpios); + } + + static int rfkill_gpio_probe(struct platform_device *pdev) +@@ -102,7 +112,7 @@ static int rfkill_gpio_probe(struct platform_device *pdev) + + rfkill->clk = devm_clk_get(&pdev->dev, NULL); + +- gpio = devm_gpiod_get_index(&pdev->dev, "reset", 0); ++ gpio = devm_gpiod_get(&pdev->dev, "reset"); + if (!IS_ERR(gpio)) { + ret = gpiod_direction_output(gpio, 0); + if (ret) +@@ -110,7 +120,7 @@ static int rfkill_gpio_probe(struct platform_device *pdev) + rfkill->reset_gpio = gpio; + } + +- gpio = devm_gpiod_get_index(&pdev->dev, "shutdown", 1); ++ gpio = devm_gpiod_get(&pdev->dev, "shutdown"); + if (!IS_ERR(gpio)) { + ret = gpiod_direction_output(gpio, 0); + if (ret) +@@ -150,6 +160,8 @@ static int rfkill_gpio_remove(struct platform_device *pdev) + rfkill_unregister(rfkill->rfkill_dev); + rfkill_destroy(rfkill->rfkill_dev); + ++ acpi_dev_remove_driver_gpios(ACPI_COMPANION(&pdev->dev)); ++ + return 0; + } diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 22fa819..9cd5dbd 100644 @@ -7839,7 +12993,7 @@ index 22fa819..9cd5dbd 100644 void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c -index 416baed..53bdd33 100644 +index 2935405..196f49e 100644 --- a/virt/kvm/arm/vgic-v2.c +++ b/virt/kvm/arm/vgic-v2.c @@ -19,6 +19,7 @@ @@ -7858,7 +13012,7 @@ index 416baed..53bdd33 100644 #include <asm/kvm_emulate.h> #include <asm/kvm_arm.h> #include <asm/kvm_mmu.h> -@@ -177,7 +179,7 @@ static const struct vgic_ops vgic_v2_ops = { +@@ -159,7 +161,7 @@ static const struct vgic_ops vgic_v2_ops = { static struct vgic_params vgic_v2_params; /** @@ -7867,7 +13021,7 @@ index 416baed..53bdd33 100644 * @node: pointer to the DT node * @ops: address of a pointer to the GICv2 operations * @params: address of a pointer to HW-specific parameters -@@ -186,7 +188,7 @@ static struct vgic_params vgic_v2_params; +@@ -168,7 +170,7 @@ static struct vgic_params vgic_v2_params; * in *ops and the HW parameters in *params. Returns an error code * otherwise. */ @@ -7876,7 +13030,7 @@ index 416baed..53bdd33 100644 const struct vgic_ops **ops, const struct vgic_params **params) { -@@ -263,3 +265,72 @@ out: +@@ -245,3 +247,72 @@ out: of_node_put(vgic_node); return ret; } @@ -7976,7 +13130,7 @@ index 1c2c8ee..8b56920 100644 int ret = 0; u32 gicv_idx; diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c -index 73eba79..ca98a3b 100644 +index 3aaca49..f6e9922 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -25,9 +25,11 @@ @@ -7991,7 +13145,7 @@ index 73eba79..ca98a3b 100644 #include <asm/kvm_emulate.h> #include <asm/kvm_arm.h> #include <asm/kvm_mmu.h> -@@ -1549,31 +1551,39 @@ static struct notifier_block vgic_cpu_nb = { +@@ -2427,31 +2429,39 @@ static struct notifier_block vgic_cpu_nb = { }; static const struct of_device_id vgic_ids[] = { @@ -8007,8 +13161,8 @@ index 73eba79..ca98a3b 100644 int kvm_vgic_hyp_init(void) { const struct of_device_id *matched_id; - int (*vgic_probe)(struct device_node *,const struct vgic_ops **, - const struct vgic_params **); + const int (*vgic_probe)(struct device_node *,const struct vgic_ops **, + const struct vgic_params **); struct device_node *vgic_node; - int ret; + int ret = -ENODEV; diff --git a/freed-ora/current/master/kernel.spec b/freed-ora/current/master/kernel.spec index a3017d581..7e61a88d4 100644 --- a/freed-ora/current/master/kernel.spec +++ b/freed-ora/current/master/kernel.spec @@ -6,7 +6,7 @@ Summary: The Linux kernel # For a stable, released kernel, released_kernel should be 1. For rawhide # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. -%global released_kernel 1 +%global released_kernel 0 %global aarch64patches 1 @@ -59,7 +59,7 @@ Summary: The Linux kernel # To be inserted between "patch" and "-2.6.". #define stablelibre -3.17%{?stablegnux} -#define rcrevlibre -3.17%{?rcrevgnux} +%define rcrevlibre -3.17%{?rcrevgnux} #define gitrevlibre -3.17%{?gitrevgnux} %if 0%{?stablelibre:1} @@ -105,7 +105,7 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 0 +%define rcrev 6 # The git snapshot level %define gitrev 0 # Set rpm version accordingly @@ -429,6 +429,9 @@ BuildRequires: sparse %if %{with_perf} BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) bison flex BuildRequires: audit-libs-devel +%ifnarch s390 s390x %{arm} +BuildRequires: numactl-devel +%endif %endif %if %{with_tools} BuildRequires: pciutils-devel gettext ncurses-devel @@ -455,7 +458,7 @@ Source0: http://linux-libre.fsfla.org/pub/linux-libre/freed-ora/src/linux%{?base Source3: deblob-main Source4: deblob-check Source5: deblob-%{kversion} -#Source6: deblob-3.%{upstream_sublevel} +Source6: deblob-3.%{upstream_sublevel} Source10: perf-man-%{kversion}.tar.gz Source11: x509.genkey @@ -619,7 +622,7 @@ Patch14010: lis3-improve-handling-of-null-rate.patch Patch15000: watchdog-Disable-watchdog-on-virtual-machines.patch # PPC -Patch18000: ppc64-fixtools.patch + # ARM64 # ARMv7 @@ -647,34 +650,21 @@ Patch21247: ath9k-rx-dma-stop-check.patch Patch22000: weird-root-dentry-name-debug.patch -#rhbz 1025603 -Patch25063: disable-libdw-unwind-on-non-x86.patch - -#rhbz 983342 1093120 -Patch25069: acpi-video-Add-4-new-models-to-the-use_native_backli.patch - -Patch26000: perf-install-trace-event-plugins.patch - # Patch series from Hans for various backlight and platform driver fixes Patch26002: samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch -Patch26013: acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch -Patch26014: acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch -#rhbz 1134969 -Patch26016: HID-wacom-Add-support-for-the-Cintiq-Companion.patch +Patch26058: asus-nb-wmi-Add-wapf4-quirk-for-the-X550VB.patch -#rhbz 1110011 -Patch26019: psmouse-Add-psmouse_matches_pnp_id-helper-function.patch -Patch26020: psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch +#rhbz 1111138 +Patch26059: i8042-Add-notimeout-quirk-for-Fujitsu-Lifebook-A544-.patch -#rhbz 1138759 -Patch26021: drm-vmwgfx-Fix-drm.h-include.patch +Patch26064: Input-add-driver-for-the-Goodix-touchpanel.patch -#rhbz 1123584 -Patch26028: HID-rmi-check-sanity-of-incoming-report.patch +#rhbz 1135338 +Patch26070: HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch -#rhbz 1145318 -Patch26029: KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch +#rhbz 1165206 +Patch26071: usb-quirks-Add-reset-resume-quirk-for-MS-Wireless-La.patch # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1333,7 +1323,7 @@ ApplyOptionalPatch upstream-reverts.patch -R ApplyPatch lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch # PPC -ApplyPatch ppc64-fixtools.patch + # ARM64 # @@ -1468,34 +1458,21 @@ ApplyPatch criu-no-expert.patch #rhbz 892811 ApplyPatch ath9k-rx-dma-stop-check.patch -#rhbz 1025603 -ApplyPatch disable-libdw-unwind-on-non-x86.patch - -#rhbz 983342 1093120 -ApplyPatch acpi-video-Add-4-new-models-to-the-use_native_backli.patch - -ApplyPatch perf-install-trace-event-plugins.patch - # Patch series from Hans for various backlight and platform driver fixes ApplyPatch samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch -ApplyPatch acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch -ApplyPatch acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch -#rhbz 1134969 -ApplyPatch HID-wacom-Add-support-for-the-Cintiq-Companion.patch +ApplyPatch asus-nb-wmi-Add-wapf4-quirk-for-the-X550VB.patch -#rhbz 1110011 -ApplyPatch psmouse-Add-psmouse_matches_pnp_id-helper-function.patch -ApplyPatch psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch +#rhbz 1111138 +ApplyPatch i8042-Add-notimeout-quirk-for-Fujitsu-Lifebook-A544-.patch -#rhbz 1138759 -ApplyPatch drm-vmwgfx-Fix-drm.h-include.patch +ApplyPatch Input-add-driver-for-the-Goodix-touchpanel.patch -#rhbz 1123584 -ApplyPatch HID-rmi-check-sanity-of-incoming-report.patch +#rhbz 1135338 +ApplyPatch HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch -#rhbz 1145318 -ApplyPatch KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch +#rhbz 1165206 +ApplyPatch usb-quirks-Add-reset-resume-quirk-for-MS-Wireless-La.patch %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch @@ -1911,7 +1888,7 @@ BuildKernel %make_target %kernel_image %endif %global perf_make \ - make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} + make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} %if %{with_perf} # perf %{perf_make} DESTDIR=$RPM_BUILD_ROOT all @@ -2034,7 +2011,7 @@ find $RPM_BUILD_ROOT/usr/include \ %if %{with_perf} # perf tool binary and supporting scripts/binaries -%{perf_make} DESTDIR=$RPM_BUILD_ROOT MULTILIBDIR=%{_lib} install-bin install-traceevent-plugins +%{perf_make} DESTDIR=$RPM_BUILD_ROOT lib=%{_lib} install-bin install-traceevent-plugins # remove the 'trace' symlink. rm -f %{buildroot}%{_bindir}/trace @@ -2378,6 +2355,190 @@ fi # ||----w | # || || %changelog +* Tue Nov 25 2014 Alexandre Oliva <lxoliva@fsfla.org> -libre +- GNU Linux-libre 3.18-rc6-gnu. + +* Mon Nov 24 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Linux v3.18-rc6 +- Add quirk for Laser Mouse 6000 (rhbz 1165206) + +* Fri Nov 21 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Move TPM drivers to main kernel package (rhbz 1164937) + +* Wed Nov 19 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Disable SERIAL_8250 on s390x (rhbz 1158848) + +* Mon Nov 17 2014 Kyle McMartin <kyle@fedoraproject.org> - 3.18.0-0.rc5.git0.2 +- Re-merge kernel-arm64.patch + +* Mon Nov 17 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc5.git0.1 +- Linux v3.18-rc5 +- Disable debugging options. + +* Fri Nov 14 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Enable I40EVF driver (rhbz 1164029) + +* Fri Nov 14 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc4.git2.1 +- Linux v3.18-rc4-184-gb23dc5a7cc6e + +* Thu Nov 13 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Add patch for MS Surface Pro 3 Type Cover (rhbz 1135338) +- CVE-2014-7843 aarch64: copying from /dev/zero causes local DoS (rhbz 1163744 1163745) + +* Thu Nov 13 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc4.git1.1 +- Linux v3.18-rc4-52-g04689e749b7e +- Reenable debugging options. + +* Wed Nov 12 2014 Josh Boyer <jwboyer@fedoraproject.org> +- CVE-2014-7841 sctp: NULL ptr deref on malformed packet (rhbz 1163087 1163095) + +* Tue Nov 11 2014 Kyle McMartin <kyle@fedoraproject.org> - 3.18.0-0.rc4.git0.2 +- Re-enable kernel-arm64.patch, and fix up merge conflicts with 3.18-rc4 + +* Mon Nov 10 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Fix Samsung pci-e SSD handling on some macbooks (rhbz 1161805) + +* Mon Nov 10 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc4.git0.1 +- Linux v3.18-rc4 +- Temporarily disable aarch64patches +- Disable debugging options. + +* Fri Nov 07 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc3.git4.1 +- Linux v3.18-rc3-82-ged78bb846e8b + +* Thu Nov 06 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc3.git3.1 +- Linux v3.18-rc3-68-g20f3963d8f48 + +* Wed Nov 05 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc3.git2.1 +- Linux v3.18-rc3-61-ga1cff6e25e6e + +* Tue Nov 04 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc3.git1.1 +- Linux v3.18-rc3-31-g980d0d51b1c9 +- Reenable debugging options. + +* Mon Nov 03 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Enable CONFIG_KXCJK1013 +- Add driver for goodix touchscreen from Bastien Nocera + +* Mon Nov 03 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc3.git0.1 +- Linux v3.18-rc3 +- Disable debugging options. + +* Thu Oct 30 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc2.git3.1 +- Linux v3.18-rc2-106-ga7ca10f263d7 + +* Wed Oct 29 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc2.git2.1 +- Linux v3.18-rc2-53-g9f76628da20f + +* Tue Oct 28 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Add quirk for rfkill on Yoga 3 machines (rhbz 1157327) + +* Tue Oct 28 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc2.git1.1 +- Linux v3.18-rc2-43-gf7e87a44ef60 +- Add two RCU patches to fix a deadlock and a hang +- Reenable debugging options. + +* Mon Oct 27 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc2.git0.1 +- Linux v3.18-rc2 +- Disable debugging options. + +* Sun Oct 26 2014 Peter Robinson <pbrobinson@fedoraproject.org> +- Update ARM config options, some minor cleanups + +* Sun Oct 26 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git4.1 +- Linux v3.18-rc1-422-g2cc91884b6b3 + +* Fri Oct 24 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git3.3 +- CVE-2014-3610 kvm: noncanonical MSR writes (rhbz 1144883 1156543) +- CVE-2014-3611 kvm: PIT timer race condition (rhbz 1144878 1156537) +- CVE-2014-3646 kvm: vmx: invvpid vm exit not handled (rhbz 1144825 1156534) +- CVE-2014-8369 kvm: excessive pages un-pinning in kvm_iommu_map error path (rhbz 1156518 1156522) +- CVE-2014-8480 CVE-2014-8481 kvm: NULL pointer dereference during rip relative instruction emulation (rhbz 1156615 1156616) + +* Fri Oct 24 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git3.1 +- Linux v3.18-rc1-280-g816fb4175c29 +- Add touchpad quirk for Fujitsu Lifebook A544/AH544 models (rhbz 1111138) + +* Wed Oct 22 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git2.1 +- Linux v3.18-rc1-221-gc3351dfabf5c +- Add patch to fix wifi on X550VB machines (rhbz 1089731) + +* Tue Oct 21 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Drop pinctrl qcom revert now that it's dependencies should be merged + +* Tue Oct 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 3.18.0-0.rc1.git1.2 +- Re-enable kernel-arm64.patch after updating. +- CONFIG_SERIAL_8250_FINTEK moved to generic since it appears on x86-generic + and arm64 now. +- CONFIG_IMX_THERMAL=n added to config-arm64. +- arm64: disable BPF_JIT temporarily + +* Tue Oct 21 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git1.1 +- Linux v3.18-rc1-68-gc2661b806092 +- Make LOG_BUF_SHIFT on arm64 the same as the rest of the arches (rhbz 1123327) +- Enable RTC PL031 driver on arm64 (rhbz 1123882) +- Reenable debugging options. + +* Mon Oct 20 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc1.git0.1 +- Linux v3.18-rc1 +- Disable debugging options. + +* Fri Oct 17 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git9.4 +- CVE-2014-8086 ext4: race condition (rhbz 1151353 1152608) +- Enable B43_PHY_G to fix b43 driver regression (rhbz 1152502) + +* Wed Oct 15 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git9.3 +- Revert Btrfs ro snapshot commit that causes filesystem corruption + +* Wed Oct 15 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git9.1 +- Linux v3.17-9670-g0429fbc0bdc2 + +* Tue Oct 14 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Add patches to fix elantech touchscreens (rhbz 1149509) + +* Tue Oct 14 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git8.1 +- Linux v3.17-9283-g2d65a9f48fcd + +* Tue Oct 14 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git7.1 +- Linux v3.17-8307-gf1d0d14120a8 + +* Mon Oct 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> +- Update armv7/aarch64 config options + +* Mon Oct 13 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git6.1 +- Linux v3.17-7872-g5ff0b9e1a1da + +* Sun Oct 12 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git5.1 +- Linux v3.17-7639-g90eac7eee2f4 + +* Sun Oct 12 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Enable CONFIG_I2C_DESIGNWARE_PCI (rhbz 1045821) + +* Fri Oct 10 2014 Josh Boyer <jwboyer@fedoraproject.org> +- CVE-2014-7970 VFS: DoS with USER_NS (rhbz 1151095 1151484) + +* Fri Oct 10 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git4.1 +- Linux v3.17-6136-gc798360cd143 + +* Thu Oct 09 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git3.1 +- Linux v3.17-5585-g782d59c5dfc5 + +* Thu Oct 09 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git2.1 +- Linux v3.17-5503-g35a9ad8af0bb + +* Wed Oct 08 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc0.git1.1 +- Linux v3.17-2860-gef0625b70dac +- Reenable debugging options. +- Temporarily disable aarch64patches +- Add patch to fix ATA blacklist + +* Tue Oct 07 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Add patch to fix GFS2 regression (from Bob Peterson) + +* Mon Oct 06 2014 Kyle McMartin <kyle@fedoraproject.org> +- enable 64K pages on arm64... (presently) needed to boot on amd seattle + platforms due to physical memory being unreachable. + * Mon Oct 6 2014 Alexandre Oliva <lxoliva@fsfla.org> -libre - GNU Linux-libre 3.17-gnu. diff --git a/freed-ora/current/master/kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch b/freed-ora/current/master/kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch index b33213738..f6f72ada5 100644 --- a/freed-ora/current/master/kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch +++ b/freed-ora/current/master/kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch @@ -13,7 +13,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 8 insertions(+) diff --git a/kernel/kexec.c b/kernel/kexec.c -index 2bee072268d9..891477dbfee0 100644 +index 2abf9f6e9a61..417bd0599024 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -36,6 +36,7 @@ diff --git a/freed-ora/current/master/mod-extra.list b/freed-ora/current/master/mod-extra.list index 2803a4325..6e980f6aa 100644 --- a/freed-ora/current/master/mod-extra.list +++ b/freed-ora/current/master/mod-extra.list @@ -164,10 +164,6 @@ ksdazzle-sir.ko ma600-sir.ko mcp2120-sir.ko toim3232-sir.ko -tpm_atmel.ko -tpm_infineon.ko -tpm_nsc.ko -tpm_tis.ko slip.ko nilfs2.ko batman-adv.ko diff --git a/freed-ora/current/master/patch-3.17-gnu-3.18-rc6-gnu.xz.sign b/freed-ora/current/master/patch-3.17-gnu-3.18-rc6-gnu.xz.sign new file mode 100644 index 000000000..7a3fdca6b --- /dev/null +++ b/freed-ora/current/master/patch-3.17-gnu-3.18-rc6-gnu.xz.sign @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iEYEABECAAYFAlR1RkoACgkQvLfPh359R6cQcACeP4A8Ym689Bfi/eiBlQQ3lpKi +7mcAoKOqpjFsp/QBihiSDFzj2sB43p/Q +=Ktri +-----END PGP SIGNATURE----- diff --git a/freed-ora/current/master/perf-install-trace-event-plugins.patch b/freed-ora/current/master/perf-install-trace-event-plugins.patch deleted file mode 100644 index 9a7ad3aa3..000000000 --- a/freed-ora/current/master/perf-install-trace-event-plugins.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Kyle McMartin <kmcmarti@redhat.com> -Date: Mon, 2 Jun 2014 15:11:01 -0400 -Subject: [PATCH] perf: install trace-event plugins - -perf hardcodes $libdir to be lib for all but x86_64, so kludge around it -until upstream gets their act together. ---- - tools/perf/config/Makefile | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile -index 86c21a24da46..bf0fe97bd358 100644 ---- a/tools/perf/config/Makefile -+++ b/tools/perf/config/Makefile -@@ -642,8 +642,12 @@ endif - ifeq ($(IS_X86_64),1) - lib = lib64 - else -+ifdef MULTILIBDIR -+lib = $(MULTILIBDIR) -+else - lib = lib - endif -+endif - libdir = $(prefix)/$(lib) - - # Shell quote (do not use $(call) to accommodate ancient setups); --- -1.9.3 - diff --git a/freed-ora/current/master/pinctrl-pinctrl-single-must-be-initialized-early.patch b/freed-ora/current/master/pinctrl-pinctrl-single-must-be-initialized-early.patch index d19b75f50..73af44f56 100644 --- a/freed-ora/current/master/pinctrl-pinctrl-single-must-be-initialized-early.patch +++ b/freed-ora/current/master/pinctrl-pinctrl-single-must-be-initialized-early.patch @@ -10,10 +10,10 @@ exercise left to the reader. 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c -index 95dd9cf55cb3..800fc34d7ea9 100644 +index fb94b772ad62..99668ad01b54 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c -@@ -2012,7 +2012,17 @@ static struct platform_driver pcs_driver = { +@@ -2026,7 +2026,17 @@ static struct platform_driver pcs_driver = { #endif }; diff --git a/freed-ora/current/master/ppc64-fixtools.patch b/freed-ora/current/master/ppc64-fixtools.patch deleted file mode 100644 index f461d298a..000000000 --- a/freed-ora/current/master/ppc64-fixtools.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/perf/arch/powerpc/util/skip-callchain-idx.c -index a7c23a4..d73ef8b 100644 ---- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c -+++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c -@@ -15,6 +15,7 @@ - - #include "util/thread.h" - #include "util/callchain.h" -+#include "util/debug.h" - - /* - * When saving the callchain on Power, the kernel conservatively saves diff --git a/freed-ora/current/master/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch b/freed-ora/current/master/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch deleted file mode 100644 index 59adcedaf..000000000 --- a/freed-ora/current/master/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch +++ /dev/null @@ -1,99 +0,0 @@ -From: Hans de Goede <hdegoede@redhat.com> -Date: Fri, 27 Jun 2014 18:46:42 +0200 -Subject: [PATCH] psmouse: Add psmouse_matches_pnp_id helper function - -The matches_pnp_id function from the synaptics driver is useful for other -drivers too. Make it a generic psmouse helper function. - -Bugzilla: 1110011 -Upstream-status: sent for 3.17/3.18 - -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/input/mouse/psmouse-base.c | 14 ++++++++++++++ - drivers/input/mouse/psmouse.h | 1 + - drivers/input/mouse/synaptics.c | 17 +++-------------- - 3 files changed, 18 insertions(+), 14 deletions(-) - -diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c -index b4e1f014ddc2..02e68c3008a3 100644 ---- a/drivers/input/mouse/psmouse-base.c -+++ b/drivers/input/mouse/psmouse-base.c -@@ -462,6 +462,20 @@ static int psmouse_poll(struct psmouse *psmouse) - PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)); - } - -+/* -+ * psmouse_matches_pnp_id - check if psmouse matches one of the passed in ids. -+ */ -+bool psmouse_matches_pnp_id(struct psmouse *psmouse, const char * const ids[]) -+{ -+ int i; -+ -+ if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) -+ for (i = 0; ids[i]; i++) -+ if (strstr(psmouse->ps2dev.serio->firmware_id, ids[i])) -+ return true; -+ -+ return false; -+} - - /* - * Genius NetMouse magic init. -diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h -index 2f0b39d59a9b..f4cf664c7db3 100644 ---- a/drivers/input/mouse/psmouse.h -+++ b/drivers/input/mouse/psmouse.h -@@ -108,6 +108,7 @@ void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution); - psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse); - int psmouse_activate(struct psmouse *psmouse); - int psmouse_deactivate(struct psmouse *psmouse); -+bool psmouse_matches_pnp_id(struct psmouse *psmouse, const char * const ids[]); - - struct psmouse_attribute { - struct device_attribute dattr; -diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c -index fd23181c1fb7..6394d9b5bfd3 100644 ---- a/drivers/input/mouse/synaptics.c -+++ b/drivers/input/mouse/synaptics.c -@@ -185,18 +185,6 @@ static const char * const topbuttonpad_pnp_ids[] = { - NULL - }; - --static bool matches_pnp_id(struct psmouse *psmouse, const char * const ids[]) --{ -- int i; -- -- if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) -- for (i = 0; ids[i]; i++) -- if (strstr(psmouse->ps2dev.serio->firmware_id, ids[i])) -- return true; -- -- return false; --} -- - /***************************************************************************** - * Synaptics communications functions - ****************************************************************************/ -@@ -362,7 +350,8 @@ static int synaptics_resolution(struct psmouse *psmouse) - } - - for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) { -- if (matches_pnp_id(psmouse, min_max_pnpid_table[i].pnp_ids)) { -+ if (psmouse_matches_pnp_id(psmouse, -+ min_max_pnpid_table[i].pnp_ids)) { - priv->x_min = min_max_pnpid_table[i].x_min; - priv->x_max = min_max_pnpid_table[i].x_max; - priv->y_min = min_max_pnpid_table[i].y_min; -@@ -1492,7 +1481,7 @@ static void set_input_params(struct psmouse *psmouse, - - if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { - __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); -- if (matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) -+ if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) - __set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit); - /* Clickpads report only left button */ - __clear_bit(BTN_RIGHT, dev->keybit); --- -1.9.3 - diff --git a/freed-ora/current/master/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch b/freed-ora/current/master/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch deleted file mode 100644 index 0d0583d5f..000000000 --- a/freed-ora/current/master/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch +++ /dev/null @@ -1,157 +0,0 @@ -From: Hans de Goede <hdegoede@redhat.com> -Date: Fri, 27 Jun 2014 18:50:33 +0200 -Subject: [PATCH] psmouse: Add support for detecting FocalTech PS/2 touchpads - -The Asus X450 and X550 laptops use a PS/2 touchpad from a new manufacturer -called FocalTech: - -https://bugzilla.kernel.org/show_bug.cgi?id=77391 -https://bugzilla.redhat.com/show_bug.cgi?id=1110011 - -The protocol for these devices is not known at this time, but even without -knowing the protocol they need some special handling. They get upset by some -of our other PS/2 device probing, and once upset generate random mouse events -making things unusable even with an external mouse. - -This patch adds detection of these devices based on their pnp ids, and when -they are detected, treats them as a bare ps/2 mouse. Doing things this way -they at least work in their ps/2 mouse emulation mode. - -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/input/mouse/Makefile | 2 +- - drivers/input/mouse/focaltech.c | 44 ++++++++++++++++++++++++++++++++++++++ - drivers/input/mouse/focaltech.h | 21 ++++++++++++++++++ - drivers/input/mouse/psmouse-base.c | 10 +++++++++ - 4 files changed, 76 insertions(+), 1 deletion(-) - create mode 100644 drivers/input/mouse/focaltech.c - create mode 100644 drivers/input/mouse/focaltech.h - -diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile -index c25efdb3f288..dda507f8b3a2 100644 ---- a/drivers/input/mouse/Makefile -+++ b/drivers/input/mouse/Makefile -@@ -23,7 +23,7 @@ obj-$(CONFIG_MOUSE_SYNAPTICS_I2C) += synaptics_i2c.o - obj-$(CONFIG_MOUSE_SYNAPTICS_USB) += synaptics_usb.o - obj-$(CONFIG_MOUSE_VSXXXAA) += vsxxxaa.o - --psmouse-objs := psmouse-base.o synaptics.o -+psmouse-objs := psmouse-base.o synaptics.o focaltech.o - - psmouse-$(CONFIG_MOUSE_PS2_ALPS) += alps.o - psmouse-$(CONFIG_MOUSE_PS2_ELANTECH) += elantech.o -diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c -new file mode 100644 -index 000000000000..d83a23554d63 ---- /dev/null -+++ b/drivers/input/mouse/focaltech.c -@@ -0,0 +1,44 @@ -+/* -+ * Focaltech TouchPad PS/2 mouse driver -+ * -+ * Copyright (c) 2014 Red Hat Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * Red Hat authors: -+ * -+ * Hans de Goede <hdegoede@redhat.com> -+ */ -+ -+/* -+ * The Focaltech PS/2 touchpad protocol is unknown. This drivers deals with -+ * detection only, to avoid further detection attempts confusing the touchpad -+ * this way it at least works in PS/2 mouse compatibility mode. -+ */ -+ -+#include <linux/device.h> -+#include <linux/libps2.h> -+#include "psmouse.h" -+ -+static const char * const focaltech_pnp_ids[] = { -+ "FLT0101", -+ "FLT0102", -+ "FLT0103", -+ NULL -+}; -+ -+int focaltech_detect(struct psmouse *psmouse, bool set_properties) -+{ -+ if (!psmouse_matches_pnp_id(psmouse, focaltech_pnp_ids)) -+ return -ENODEV; -+ -+ if (set_properties) { -+ psmouse->vendor = "FocalTech"; -+ psmouse->name = "FocalTech Touchpad in mouse emulation mode"; -+ } -+ -+ return 0; -+} -diff --git a/drivers/input/mouse/focaltech.h b/drivers/input/mouse/focaltech.h -new file mode 100644 -index 000000000000..0d0fc49451fe ---- /dev/null -+++ b/drivers/input/mouse/focaltech.h -@@ -0,0 +1,21 @@ -+/* -+ * Focaltech TouchPad PS/2 mouse driver -+ * -+ * Copyright (c) 2014 Red Hat Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * Red Hat authors: -+ * -+ * Hans de Goede <hdegoede@redhat.com> -+ */ -+ -+#ifndef _FOCALTECH_H -+#define _FOCALTECH_H -+ -+int focaltech_detect(struct psmouse *psmouse, bool set_properties); -+ -+#endif -diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c -index 02e68c3008a3..2c8c8e2172a2 100644 ---- a/drivers/input/mouse/psmouse-base.c -+++ b/drivers/input/mouse/psmouse-base.c -@@ -35,6 +35,7 @@ - #include "elantech.h" - #include "sentelic.h" - #include "cypress_ps2.h" -+#include "focaltech.h" - - #define DRIVER_DESC "PS/2 mouse driver" - -@@ -722,6 +723,13 @@ static int psmouse_extensions(struct psmouse *psmouse, - { - bool synaptics_hardware = false; - -+/* Always check for focaltech, this is safe as it uses pnp-id matching */ -+ if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) { -+ /* Not supported yet, use bare protocol */ -+ psmouse_max_proto = max_proto = PSMOUSE_PS2; -+ goto reset_to_defaults; -+ } -+ - /* - * We always check for lifebook because it does not disturb mouse - * (it only checks DMI information). -@@ -873,6 +881,8 @@ static int psmouse_extensions(struct psmouse *psmouse, - } - } - -+reset_to_defaults: -+ - /* - * Reset to defaults in case the device got confused by extended - * protocol probes. Note that we follow up with full reset because --- -1.9.3 - diff --git a/freed-ora/current/master/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch b/freed-ora/current/master/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch index 3dd7bc143..4c12bd76b 100644 --- a/freed-ora/current/master/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch +++ b/freed-ora/current/master/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch @@ -14,10 +14,10 @@ Signed-off-by: Hans de Goede <hdegoede@redhat.com> 1 file changed, 10 insertions(+) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c -index 5a5966512277..0d7954e0fc74 100644 +index ff765d8e1a09..864290243e46 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c -@@ -1568,6 +1568,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { +@@ -1578,6 +1578,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { }, .driver_data = &samsung_np740u3e, }, diff --git a/freed-ora/current/master/scripts/check-configs.pl b/freed-ora/current/master/scripts/check-configs.pl new file mode 100644 index 000000000..10282aa74 --- /dev/null +++ b/freed-ora/current/master/scripts/check-configs.pl @@ -0,0 +1,83 @@ +# By Paul Bolle October 2014. +# +# Contributed to the public domain by its author. + +use 5.016; +use warnings; +use autodie; + +use File::Find; + +my @Kconfigs; + +my $Kconfigre = qr/Kconfig.*/; +my $configre = qr/^\s*(menu)?config\s+(?<config>(\w+))$/; +my $CONFIG_re = qr/\bCONFIG_(?<CONFIG_>(\w+))/; + +sub match { + push( @Kconfigs, $File::Find::name ) if ($_ =~ $Kconfigre); +} + +sub parse_kconfig { + my ($path) = @_; + + my @ret; + + open( my $kconfig, "<", $path ); + my $slurp = do { local $/ = undef; <$kconfig> }; + close( $kconfig ); + my @lines = split ( /\n/, $slurp ); + foreach my $line (@lines) { + if ($line =~ /$configre/) { + push( @ret, $+{config} ); + } + } + + @ret; +} + +sub parse_shipped { + my ($path) = @_; + + my @ret; + + open( my $shipped, "<", $path ); + my $slurp = do { local $/ = undef; <$shipped> }; + close( $shipped ); + my @lines = split ( /\n/, $slurp ); + my $i = 1; + foreach my $line (@lines) { + if ($line =~ /$CONFIG_re/) { + push( @ret, [$i, $+{CONFIG_}] ); + } + $i++; + } + + @ret; +} + +exit main ( @ARGV ); + +sub main { + my %configs; + + find( \&match, @_ ); + + foreach my $Kconfig (@Kconfigs) { + my (@tmp) = parse_kconfig( $Kconfig ); + foreach my $config ( @tmp ) { + $configs{ $config }++; + } + } + + foreach my $shipped (glob("config-*")) { + my (@tmp) = parse_shipped( $shipped ); + foreach my $ref ( @tmp ) { + say( STDERR "$shipped:$ref->[0]: No Kconfig symbol matches 'CONFIG_$ref->[1]'" ) + unless (grep( /$ref->[1]/, keys( %configs ))); + } + } + + 0; +} + diff --git a/freed-ora/current/master/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch b/freed-ora/current/master/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch index 9dad35ce2..ec9e06bec 100644 --- a/freed-ora/current/master/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch +++ b/freed-ora/current/master/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch @@ -9,10 +9,10 @@ Upstream-status: Fedora mustard (might be worth dropping...) 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c -index 2c2041ca4b70..e10812d985af 100644 +index cfba74cd8e8b..5127df3cc064 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c -@@ -2749,13 +2749,18 @@ static int sd_try_extended_inquiry(struct scsi_device *sdp) +@@ -2768,13 +2768,18 @@ static int sd_try_extended_inquiry(struct scsi_device *sdp) static int sd_revalidate_disk(struct gendisk *disk) { struct scsi_disk *sdkp = scsi_disk(disk); diff --git a/freed-ora/current/master/silence-fbcon-logo.patch b/freed-ora/current/master/silence-fbcon-logo.patch index 2b907f90b..20a5b6a70 100644 --- a/freed-ora/current/master/silence-fbcon-logo.patch +++ b/freed-ora/current/master/silence-fbcon-logo.patch @@ -9,10 +9,10 @@ Upstream-status: Fedora mustard 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c -index 57b1d44acbfe..31048a85713d 100644 +index eb976ee3a02f..275f20a643f4 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c -@@ -638,13 +638,15 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, +@@ -637,13 +637,15 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info, kfree(save); } @@ -35,7 +35,7 @@ index 57b1d44acbfe..31048a85713d 100644 } } #endif /* MODULE */ -@@ -3625,6 +3627,14 @@ static int __init fb_console_init(void) +@@ -3624,6 +3626,14 @@ static int __init fb_console_init(void) return 0; } diff --git a/freed-ora/current/master/sources b/freed-ora/current/master/sources index 28743f1dd..32f416de7 100644 --- a/freed-ora/current/master/sources +++ b/freed-ora/current/master/sources @@ -1,2 +1,3 @@ 61aaf05e9ccb9be9bcf9135993e9ee3e linux-libre-3.17-gnu.tar.xz 159e969cbc27201d8e2fa0f609dc722f perf-man-3.17.tar.gz +7cf669e7d43f6f99d0c8a6e691c017ee patch-3.17-gnu-3.18-rc6-gnu.xz diff --git a/freed-ora/current/master/usb-quirks-Add-reset-resume-quirk-for-MS-Wireless-La.patch b/freed-ora/current/master/usb-quirks-Add-reset-resume-quirk-for-MS-Wireless-La.patch new file mode 100644 index 000000000..e590df222 --- /dev/null +++ b/freed-ora/current/master/usb-quirks-Add-reset-resume-quirk-for-MS-Wireless-La.patch @@ -0,0 +1,31 @@ +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 20 Nov 2014 15:16:01 +0100 +Subject: [PATCH] usb-quirks: Add reset-resume quirk for MS Wireless Laser + Mouse 6000 + +This wireless mouse receiver needs a reset-resume quirk to properly come +out of reset. + +BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1165206 +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/usb/core/quirks.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c +index 39b4081b632d..96fafed92b76 100644 +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -44,6 +44,9 @@ static const struct usb_device_id usb_quirk_list[] = { + /* Creative SB Audigy 2 NX */ + { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* Microsoft Wireless Laser Mouse 6000 Receiver */ ++ { USB_DEVICE(0x045e, 0x00e1), .driver_info = USB_QUIRK_RESET_RESUME }, ++ + /* Microsoft LifeCam-VX700 v2.0 */ + { USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME }, + +-- +1.9.3 + diff --git a/freed-ora/current/master/watchdog-Disable-watchdog-on-virtual-machines.patch b/freed-ora/current/master/watchdog-Disable-watchdog-on-virtual-machines.patch index 23a17c054..610c7e0f1 100644 --- a/freed-ora/current/master/watchdog-Disable-watchdog-on-virtual-machines.patch +++ b/freed-ora/current/master/watchdog-Disable-watchdog-on-virtual-machines.patch @@ -20,10 +20,10 @@ Signed-off-by: Dave Jones <davej@redhat.com> 1 file changed, 29 insertions(+) diff --git a/kernel/watchdog.c b/kernel/watchdog.c -index a8d6914030fe..d0a8c308170d 100644 +index 70bf11815f84..4eeb9923472b 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c -@@ -24,6 +24,7 @@ +@@ -19,6 +19,7 @@ #include <linux/sysctl.h> #include <linux/smpboot.h> #include <linux/sched/rt.h> @@ -31,7 +31,7 @@ index a8d6914030fe..d0a8c308170d 100644 #include <asm/irq_regs.h> #include <linux/kvm_para.h> -@@ -112,6 +113,32 @@ static int __init softlockup_all_cpu_backtrace_setup(char *str) +@@ -135,6 +136,32 @@ static int __init softlockup_all_cpu_backtrace_setup(char *str) __setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup); #endif @@ -64,7 +64,7 @@ index a8d6914030fe..d0a8c308170d 100644 /* * Hard-lockup warnings should be triggered after just a few seconds. Soft- * lockups can have false positives under extreme conditions. So we generally -@@ -644,6 +671,8 @@ out: +@@ -704,6 +731,8 @@ out: void __init lockup_detector_init(void) { diff --git a/freed-ora/current/master/x86-Lock-down-IO-port-access-when-module-security-is.patch b/freed-ora/current/master/x86-Lock-down-IO-port-access-when-module-security-is.patch index 327c65ef6..4d0b4ac02 100644 --- a/freed-ora/current/master/x86-Lock-down-IO-port-access-when-module-security-is.patch +++ b/freed-ora/current/master/x86-Lock-down-IO-port-access-when-module-security-is.patch @@ -44,7 +44,7 @@ index 4ddaf66ea35f..00b440307419 100644 } regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12); diff --git a/drivers/char/mem.c b/drivers/char/mem.c -index 917403fe10da..cdf839f9defe 100644 +index 524b707894ef..c268e2581ed6 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -27,6 +27,7 @@ |