From 0f49b46be3139032b0b898e7843e01f98d15f6bd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 27 Jun 2014 16:46:31 -0700 Subject: [PATCH] 3.15-stable patches added patches: acpi-add-dynamic_debug-support.patch acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch acpica-utstring-check-array-index-bound-before-use.patch media-exynos4-is-fix-compilation-for-config_common_clk.patch media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch --- .../acpi-add-dynamic_debug-support.patch | 187 ++++++++++++++++++ ...-customized-dsdt-and-dsdt-local-copy.patch | 46 +++++ ...hotplug-contexts-to-pci-host-bridges.patch | 158 +++++++++++++++ ...-the-working-initialization-ordering.patch | 168 ++++++++++++++++ ...g-check-array-index-bound-before-use.patch | 33 ++++ ...ix-compilation-for-config_common_clk.patch | 57 ++++++ ...mc-is-cpu-memory-only-when-allocated.patch | 35 ++++ queue-3.15/series | 7 + 8 files changed, 691 insertions(+) create mode 100644 queue-3.15/acpi-add-dynamic_debug-support.patch create mode 100644 queue-3.15/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch create mode 100644 queue-3.15/acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch create mode 100644 queue-3.15/acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch create mode 100644 queue-3.15/acpica-utstring-check-array-index-bound-before-use.patch create mode 100644 queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.patch create mode 100644 queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch diff --git a/queue-3.15/acpi-add-dynamic_debug-support.patch b/queue-3.15/acpi-add-dynamic_debug-support.patch new file mode 100644 index 00000000000..c5b06c83437 --- /dev/null +++ b/queue-3.15/acpi-add-dynamic_debug-support.patch @@ -0,0 +1,187 @@ +From 45fef5b88d1f2f47ecdefae6354372d440ca5c84 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Thu, 22 May 2014 12:47:47 +0200 +Subject: ACPI: add dynamic_debug support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= + +commit 45fef5b88d1f2f47ecdefae6354372d440ca5c84 upstream. + +Commit 1a699476e258 ("ACPI / hotplug / PCI: Hotplug notifications +from acpi_bus_notify()") added debug messages for a few common +events. These debug messages are unconditionally enabled if +CONFIG_DYNAMIC_DEBUG is defined, contrary to the documented +meaning, making the ACPI system spew lots of unwanted noise on +any kernel with dynamic debugging. + +The bug was introduced by commit fbfddae69657 ("ACPI: Add +acpi_handle_() interfaces"), which added the +CONFIG_DYNAMIC_DEBUG dependency without respecting its meaning. + +Fix by adding real support for dynamic_debug. + +Fixes: fbfddae69657 ("ACPI: Add acpi_handle_() interfaces") +Signed-off-by: Bjørn Mork +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/utils.c | 64 +++++++++++++++++++++++++++++++++++++++++---------- + include/linux/acpi.h | 22 +++++++++++++++-- + 2 files changed, 72 insertions(+), 14 deletions(-) + +--- a/drivers/acpi/utils.c ++++ b/drivers/acpi/utils.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "internal.h" + +@@ -457,6 +458,24 @@ acpi_evaluate_ost(acpi_handle handle, u3 + EXPORT_SYMBOL(acpi_evaluate_ost); + + /** ++ * acpi_handle_path: Return the object path of handle ++ * ++ * Caller must free the returned buffer ++ */ ++static char *acpi_handle_path(acpi_handle handle) ++{ ++ struct acpi_buffer buffer = { ++ .length = ACPI_ALLOCATE_BUFFER, ++ .pointer = NULL ++ }; ++ ++ if (in_interrupt() || ++ acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer) != AE_OK) ++ return NULL; ++ return buffer.pointer; ++} ++ ++/** + * acpi_handle_printk: Print message with ACPI prefix and object path + * + * This function is called through acpi_handle_ macros and prints +@@ -469,29 +488,50 @@ acpi_handle_printk(const char *level, ac + { + struct va_format vaf; + va_list args; +- struct acpi_buffer buffer = { +- .length = ACPI_ALLOCATE_BUFFER, +- .pointer = NULL +- }; + const char *path; + + va_start(args, fmt); + vaf.fmt = fmt; + vaf.va = &args; + +- if (in_interrupt() || +- acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer) != AE_OK) +- path = ""; +- else +- path = buffer.pointer; +- +- printk("%sACPI: %s: %pV", level, path, &vaf); ++ path = acpi_handle_path(handle); ++ printk("%sACPI: %s: %pV", level, path ? path : "" , &vaf); + + va_end(args); +- kfree(buffer.pointer); ++ kfree(path); + } + EXPORT_SYMBOL(acpi_handle_printk); + ++#if defined(CONFIG_DYNAMIC_DEBUG) ++/** ++ * __acpi_handle_debug: pr_debug with ACPI prefix and object path ++ * ++ * This function is called through acpi_handle_debug macro and debug ++ * prints a message with ACPI prefix and object path. This function ++ * acquires the global namespace mutex to obtain an object path. In ++ * interrupt context, it shows the object path as . ++ */ ++void ++__acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, ++ const char *fmt, ...) ++{ ++ struct va_format vaf; ++ va_list args; ++ const char *path; ++ ++ va_start(args, fmt); ++ vaf.fmt = fmt; ++ vaf.va = &args; ++ ++ path = acpi_handle_path(handle); ++ __dynamic_pr_debug(descriptor, "ACPI: %s: %pV", path ? path : "", &vaf); ++ ++ va_end(args); ++ kfree(path); ++} ++EXPORT_SYMBOL(__acpi_handle_debug); ++#endif ++ + /** + * acpi_has_method: Check whether @handle has a method named @name + * @handle: ACPI device handle +--- a/include/linux/acpi.h ++++ b/include/linux/acpi.h +@@ -37,6 +37,7 @@ + + #include + #include ++#include + + #include + #include +@@ -589,6 +590,14 @@ static inline __printf(3, 4) void + acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} + #endif /* !CONFIG_ACPI */ + ++#if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) ++__printf(3, 4) ++void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...); ++#else ++#define __acpi_handle_debug(descriptor, handle, fmt, ...) \ ++ acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); ++#endif ++ + /* + * acpi_handle_: Print message with ACPI prefix and object path + * +@@ -610,11 +619,19 @@ acpi_handle_printk(const char *level, vo + #define acpi_handle_info(handle, fmt, ...) \ + acpi_handle_printk(KERN_INFO, handle, fmt, ##__VA_ARGS__) + +-/* REVISIT: Support CONFIG_DYNAMIC_DEBUG when necessary */ +-#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) ++#if defined(DEBUG) + #define acpi_handle_debug(handle, fmt, ...) \ + acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__) + #else ++#if defined(CONFIG_DYNAMIC_DEBUG) ++#define acpi_handle_debug(handle, fmt, ...) \ ++do { \ ++ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ ++ if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ ++ __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ ++ ##__VA_ARGS__); \ ++} while (0) ++#else + #define acpi_handle_debug(handle, fmt, ...) \ + ({ \ + if (0) \ +@@ -622,5 +639,6 @@ acpi_handle_printk(const char *level, vo + 0; \ + }) + #endif ++#endif + + #endif /*_LINUX_ACPI_H*/ diff --git a/queue-3.15/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch b/queue-3.15/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch new file mode 100644 index 00000000000..db8286d0558 --- /dev/null +++ b/queue-3.15/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch @@ -0,0 +1,46 @@ +From 73577d1df8e1f31f6b1a5eebcdbc334eb0330e47 Mon Sep 17 00:00:00 2001 +From: Lv Zheng +Date: Mon, 12 May 2014 15:50:16 +0800 +Subject: ACPI: Fix conflict between customized DSDT and DSDT local copy + +From: Lv Zheng + +commit 73577d1df8e1f31f6b1a5eebcdbc334eb0330e47 upstream. + +This patch fixes the following issue: +If DSDT is customized, no local DSDT copy is needed. + +References: https://bugzilla.kernel.org/show_bug.cgi?id=69711 +Signed-off-by: Enrico Etxe Arte +Signed-off-by: Lv Zheng +[rjw: Subject] +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/bus.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/acpi/bus.c ++++ b/drivers/acpi/bus.c +@@ -52,6 +52,12 @@ struct proc_dir_entry *acpi_root_dir; + EXPORT_SYMBOL(acpi_root_dir); + + #ifdef CONFIG_X86 ++#ifdef CONFIG_ACPI_CUSTOM_DSDT ++static inline int set_copy_dsdt(const struct dmi_system_id *id) ++{ ++ return 0; ++} ++#else + static int set_copy_dsdt(const struct dmi_system_id *id) + { + printk(KERN_NOTICE "%s detected - " +@@ -59,6 +65,7 @@ static int set_copy_dsdt(const struct dm + acpi_gbl_copy_dsdt_locally = 1; + return 0; + } ++#endif + + static struct dmi_system_id dsdt_dmi_table[] __initdata = { + /* diff --git a/queue-3.15/acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch b/queue-3.15/acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch new file mode 100644 index 00000000000..3cbd6250637 --- /dev/null +++ b/queue-3.15/acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch @@ -0,0 +1,158 @@ +From 882d18a702c66404fcb62b84748f719f9b47441c Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" +Date: Tue, 10 Jun 2014 22:46:35 +0200 +Subject: ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges + +From: "Rafael J. Wysocki" + +commit 882d18a702c66404fcb62b84748f719f9b47441c upstream. + +After relatively recent changes in the ACPI-based PCI hotplug +(ACPIPHP) code, the acpiphp_check_host_bridge() executed for PCI +host bridges via acpi_pci_root_scan_dependent() doesn't do anything +useful, because those bridges do not have hotplug contexts. That +happens by mistake, so fix it by making acpiphp_enumerate_slots() +add hotplug contexts to PCI host bridges too and modify +acpiphp_remove_slots() to drop those contexts for host bridges +as appropriate. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=76901 +Fixes: 2d8b1d566a5f (ACPI / hotplug / PCI: Get rid of check_sub_bridges()) +Reported-and-tested-by: Gavin Guo +Acked-by: Bjorn Helgaas +Reviewed-by: Mika Westerberg +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/hotplug/acpiphp.h | 10 ++++++ + drivers/pci/hotplug/acpiphp_glue.c | 60 +++++++++++++++++++++++++------------ + 2 files changed, 52 insertions(+), 18 deletions(-) + +--- a/drivers/pci/hotplug/acpiphp.h ++++ b/drivers/pci/hotplug/acpiphp.h +@@ -142,6 +142,16 @@ static inline acpi_handle func_to_handle + return func_to_acpi_device(func)->handle; + } + ++struct acpiphp_root_context { ++ struct acpi_hotplug_context hp; ++ struct acpiphp_bridge *root_bridge; ++}; ++ ++static inline struct acpiphp_root_context *to_acpiphp_root_context(struct acpi_hotplug_context *hp) ++{ ++ return container_of(hp, struct acpiphp_root_context, hp); ++} ++ + /* + * struct acpiphp_attention_info - device specific attention registration + * +--- a/drivers/pci/hotplug/acpiphp_glue.c ++++ b/drivers/pci/hotplug/acpiphp_glue.c +@@ -374,17 +374,13 @@ static acpi_status acpiphp_add_context(a + + static struct acpiphp_bridge *acpiphp_dev_to_bridge(struct acpi_device *adev) + { +- struct acpiphp_context *context; + struct acpiphp_bridge *bridge = NULL; + + acpi_lock_hp_context(); +- context = acpiphp_get_context(adev); +- if (context) { +- bridge = context->bridge; ++ if (adev->hp) { ++ bridge = to_acpiphp_root_context(adev->hp)->root_bridge; + if (bridge) + get_bridge(bridge); +- +- acpiphp_put_context(context); + } + acpi_unlock_hp_context(); + return bridge; +@@ -883,7 +879,17 @@ void acpiphp_enumerate_slots(struct pci_ + */ + get_device(&bus->dev); + +- if (!pci_is_root_bus(bridge->pci_bus)) { ++ acpi_lock_hp_context(); ++ if (pci_is_root_bus(bridge->pci_bus)) { ++ struct acpiphp_root_context *root_context; ++ ++ root_context = kzalloc(sizeof(*root_context), GFP_KERNEL); ++ if (!root_context) ++ goto err; ++ ++ root_context->root_bridge = bridge; ++ acpi_set_hp_context(adev, &root_context->hp, NULL, NULL, NULL); ++ } else { + struct acpiphp_context *context; + + /* +@@ -892,21 +898,16 @@ void acpiphp_enumerate_slots(struct pci_ + * parent is going to be handled by pciehp, in which case this + * bridge is not interesting to us either. + */ +- acpi_lock_hp_context(); + context = acpiphp_get_context(adev); +- if (!context) { +- acpi_unlock_hp_context(); +- put_device(&bus->dev); +- pci_dev_put(bridge->pci_dev); +- kfree(bridge); +- return; +- } ++ if (!context) ++ goto err; ++ + bridge->context = context; + context->bridge = bridge; + /* Get a reference to the parent bridge. */ + get_bridge(context->func.parent); +- acpi_unlock_hp_context(); + } ++ acpi_unlock_hp_context(); + + /* Must be added to the list prior to calling acpiphp_add_context(). */ + mutex_lock(&bridge_mutex); +@@ -921,6 +922,30 @@ void acpiphp_enumerate_slots(struct pci_ + cleanup_bridge(bridge); + put_bridge(bridge); + } ++ return; ++ ++ err: ++ acpi_unlock_hp_context(); ++ put_device(&bus->dev); ++ pci_dev_put(bridge->pci_dev); ++ kfree(bridge); ++} ++ ++void acpiphp_drop_bridge(struct acpiphp_bridge *bridge) ++{ ++ if (pci_is_root_bus(bridge->pci_bus)) { ++ struct acpiphp_root_context *root_context; ++ struct acpi_device *adev; ++ ++ acpi_lock_hp_context(); ++ adev = ACPI_COMPANION(bridge->pci_bus->bridge); ++ root_context = to_acpiphp_root_context(adev->hp); ++ adev->hp = NULL; ++ acpi_unlock_hp_context(); ++ kfree(root_context); ++ } ++ cleanup_bridge(bridge); ++ put_bridge(bridge); + } + + /** +@@ -938,8 +963,7 @@ void acpiphp_remove_slots(struct pci_bus + list_for_each_entry(bridge, &bridge_list, list) + if (bridge->pci_bus == bus) { + mutex_unlock(&bridge_mutex); +- cleanup_bridge(bridge); +- put_bridge(bridge); ++ acpiphp_drop_bridge(bridge); + return; + } + diff --git a/queue-3.15/acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch b/queue-3.15/acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch new file mode 100644 index 00000000000..80aa853bffa --- /dev/null +++ b/queue-3.15/acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch @@ -0,0 +1,168 @@ +From 12e27b115472ad0f3b142ddf59d3998305984408 Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" +Date: Fri, 13 Jun 2014 01:17:03 +0200 +Subject: ACPI / ia64 / sba_iommu: Restore the working initialization ordering +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: "Rafael J. Wysocki" + +commit 12e27b115472ad0f3b142ddf59d3998305984408 upstream. + +Commit 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler +for device discovery) changed the ordering of SBA (System Bus Adapter) +IOMMU initialization with respect to the PCI host bridge initialization +which broke things inadvertently, because the SBA IOMMU initialization +code has to run after the PCI host bridge has been initialized. + +Fix that by reworking the SBA IOMMU ACPI scan handler so that it +claims the discovered matching ACPI device objects without attempting +to initialize anything and move the entire SBA IOMMU initialization +to sba_init() that runs after the PCI bus has been enumerated. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=76691 +Fixes: 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery) +Reported-and-tested-by: Émeric Maschino +Cc: Tony Luck +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + arch/ia64/hp/common/sba_iommu.c | 64 +++++++++++++++++++++++----------------- + 1 file changed, 37 insertions(+), 27 deletions(-) + +--- a/arch/ia64/hp/common/sba_iommu.c ++++ b/arch/ia64/hp/common/sba_iommu.c +@@ -242,7 +242,7 @@ struct ioc { + struct pci_dev *sac_only_dev; + }; + +-static struct ioc *ioc_list; ++static struct ioc *ioc_list, *ioc_found; + static int reserve_sba_gart = 1; + + static SBA_INLINE void sba_mark_invalid(struct ioc *, dma_addr_t, size_t); +@@ -1809,20 +1809,13 @@ static struct ioc_iommu ioc_iommu_info[] + { SX2000_IOC_ID, "sx2000", NULL }, + }; + +-static struct ioc * +-ioc_init(unsigned long hpa, void *handle) ++static void ioc_init(unsigned long hpa, struct ioc *ioc) + { +- struct ioc *ioc; + struct ioc_iommu *info; + +- ioc = kzalloc(sizeof(*ioc), GFP_KERNEL); +- if (!ioc) +- return NULL; +- + ioc->next = ioc_list; + ioc_list = ioc; + +- ioc->handle = handle; + ioc->ioc_hpa = ioremap(hpa, 0x1000); + + ioc->func_id = READ_REG(ioc->ioc_hpa + IOC_FUNC_ID); +@@ -1863,8 +1856,6 @@ ioc_init(unsigned long hpa, void *handle + "%s %d.%d HPA 0x%lx IOVA space %dMb at 0x%lx\n", + ioc->name, (ioc->rev >> 4) & 0xF, ioc->rev & 0xF, + hpa, ioc->iov_size >> 20, ioc->ibase); +- +- return ioc; + } + + +@@ -2031,22 +2022,21 @@ sba_map_ioc_to_node(struct ioc *ioc, acp + #endif + } + +-static int +-acpi_sba_ioc_add(struct acpi_device *device, +- const struct acpi_device_id *not_used) ++static void acpi_sba_ioc_add(struct ioc *ioc) + { +- struct ioc *ioc; ++ acpi_handle handle = ioc->handle; + acpi_status status; + u64 hpa, length; + struct acpi_device_info *adi; + +- status = hp_acpi_csr_space(device->handle, &hpa, &length); ++ ioc_found = ioc->next; ++ status = hp_acpi_csr_space(handle, &hpa, &length); + if (ACPI_FAILURE(status)) +- return 1; ++ goto err; + +- status = acpi_get_object_info(device->handle, &adi); ++ status = acpi_get_object_info(handle, &adi); + if (ACPI_FAILURE(status)) +- return 1; ++ goto err; + + /* + * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI +@@ -2067,13 +2057,13 @@ acpi_sba_ioc_add(struct acpi_device *dev + if (!iovp_shift) + iovp_shift = 12; + +- ioc = ioc_init(hpa, device->handle); +- if (!ioc) +- return 1; +- ++ ioc_init(hpa, ioc); + /* setup NUMA node association */ +- sba_map_ioc_to_node(ioc, device->handle); +- return 0; ++ sba_map_ioc_to_node(ioc, handle); ++ return; ++ ++ err: ++ kfree(ioc); + } + + static const struct acpi_device_id hp_ioc_iommu_device_ids[] = { +@@ -2081,9 +2071,26 @@ static const struct acpi_device_id hp_io + {"HWP0004", 0}, + {"", 0}, + }; ++ ++static int acpi_sba_ioc_attach(struct acpi_device *device, ++ const struct acpi_device_id *not_used) ++{ ++ struct ioc *ioc; ++ ++ ioc = kzalloc(sizeof(*ioc), GFP_KERNEL); ++ if (!ioc) ++ return -ENOMEM; ++ ++ ioc->next = ioc_found; ++ ioc_found = ioc; ++ ioc->handle = device->handle; ++ return 1; ++} ++ ++ + static struct acpi_scan_handler acpi_sba_ioc_handler = { + .ids = hp_ioc_iommu_device_ids, +- .attach = acpi_sba_ioc_add, ++ .attach = acpi_sba_ioc_attach, + }; + + static int __init acpi_sba_ioc_init_acpi(void) +@@ -2118,9 +2125,12 @@ sba_init(void) + #endif + + /* +- * ioc_list should be populated by the acpi_sba_ioc_handler's .attach() ++ * ioc_found should be populated by the acpi_sba_ioc_handler's .attach() + * routine, but that only happens if acpi_scan_init() has already run. + */ ++ while (ioc_found) ++ acpi_sba_ioc_add(ioc_found); ++ + if (!ioc_list) { + #ifdef CONFIG_IA64_GENERIC + /* diff --git a/queue-3.15/acpica-utstring-check-array-index-bound-before-use.patch b/queue-3.15/acpica-utstring-check-array-index-bound-before-use.patch new file mode 100644 index 00000000000..a23aabc35f2 --- /dev/null +++ b/queue-3.15/acpica-utstring-check-array-index-bound-before-use.patch @@ -0,0 +1,33 @@ +From 5d42b0fa25df7ef2f575107597c1aaebe2407d10 Mon Sep 17 00:00:00 2001 +From: David Binderman +Date: Fri, 4 Apr 2014 12:36:55 +0800 +Subject: ACPICA: utstring: Check array index bound before use. + +From: David Binderman + +commit 5d42b0fa25df7ef2f575107597c1aaebe2407d10 upstream. + +ACPICA BZ 1077. David Binderman. + +References: https://bugs.acpica.org/show_bug.cgi?id=1077 +Signed-off-by: David Binderman +Signed-off-by: Bob Moore +Signed-off-by: Lv Zheng +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/acpica/utstring.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/acpi/acpica/utstring.c ++++ b/drivers/acpi/acpica/utstring.c +@@ -353,7 +353,7 @@ void acpi_ut_print_string(char *string, + } + + acpi_os_printf("\""); +- for (i = 0; string[i] && (i < max_length); i++) { ++ for (i = 0; (i < max_length) && string[i]; i++) { + + /* Escape sequences */ + diff --git a/queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.patch b/queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.patch new file mode 100644 index 00000000000..5b7a6e0c627 --- /dev/null +++ b/queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.patch @@ -0,0 +1,57 @@ +From f486e7c3cb9849b6a661931fa8c51a43d477046b Mon Sep 17 00:00:00 2001 +From: Sylwester Nawrocki +Date: Tue, 15 Apr 2014 14:34:29 -0300 +Subject: media: exynos4-is: Fix compilation for !CONFIG_COMMON_CLK + +From: Sylwester Nawrocki + +commit f486e7c3cb9849b6a661931fa8c51a43d477046b upstream. + +CONFIG_COMMON_CLK is not enabled on S5PV210 platform, so include +some clk API data structures conditionally to avoid compilation +errors. These #ifdefs will be removed for next kernel release, +when the S5PV210 platform moves to DT and the common clk API. + +Signed-off-by: Sylwester Nawrocki +Acked-by: Kyungmin Park +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/platform/exynos4-is/media-dev.c | 2 +- + drivers/media/platform/exynos4-is/media-dev.h | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/media/platform/exynos4-is/media-dev.c ++++ b/drivers/media/platform/exynos4-is/media-dev.c +@@ -1520,7 +1520,7 @@ err: + } + #else + #define fimc_md_register_clk_provider(fmd) (0) +-#define fimc_md_unregister_clk_provider(fmd) (0) ++#define fimc_md_unregister_clk_provider(fmd) + #endif + + static int subdev_notifier_bound(struct v4l2_async_notifier *notifier, +--- a/drivers/media/platform/exynos4-is/media-dev.h ++++ b/drivers/media/platform/exynos4-is/media-dev.h +@@ -94,7 +94,9 @@ struct fimc_sensor_info { + }; + + struct cam_clk { ++#ifdef CONFIG_COMMON_CLK + struct clk_hw hw; ++#endif + struct fimc_md *fmd; + }; + #define to_cam_clk(_hw) container_of(_hw, struct cam_clk, hw) +@@ -142,7 +144,9 @@ struct fimc_md { + + struct cam_clk_provider { + struct clk *clks[FIMC_MAX_CAMCLKS]; ++#ifdef CONFIG_COMMON_CLK + struct clk_onecell_data clk_data; ++#endif + struct device_node *of_node; + struct cam_clk camclk[FIMC_MAX_CAMCLKS]; + int num_clocks; diff --git a/queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch b/queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch new file mode 100644 index 00000000000..3797b24cc57 --- /dev/null +++ b/queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch @@ -0,0 +1,35 @@ +From 404a90abc60f60df2757cb272660e003d326881f Mon Sep 17 00:00:00 2001 +From: Sylwester Nawrocki +Date: Thu, 8 May 2014 14:35:15 -0300 +Subject: media: exynos4-is: Free FIMC-IS CPU memory only when allocated + +From: Sylwester Nawrocki + +commit 404a90abc60f60df2757cb272660e003d326881f upstream. + +Ensure dma_free_coherent() is not called with incorrect arguments +and only when the memory was actually allocated. This will prevent +possible crashes on error paths of the top level media device driver, +when fimc-is device gets unregistered and its driver detached. + +Signed-off-by: Sylwester Nawrocki +Acked-by: Kyungmin Park +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/platform/exynos4-is/fimc-is.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/media/platform/exynos4-is/fimc-is.c ++++ b/drivers/media/platform/exynos4-is/fimc-is.c +@@ -367,6 +367,9 @@ static void fimc_is_free_cpu_memory(stru + { + struct device *dev = &is->pdev->dev; + ++ if (is->memory.vaddr == NULL) ++ return; ++ + dma_free_coherent(dev, is->memory.size, is->memory.vaddr, + is->memory.paddr); + } diff --git a/queue-3.15/series b/queue-3.15/series index 9ac03dff3d0..f2d629507cd 100644 --- a/queue-3.15/series +++ b/queue-3.15/series @@ -61,3 +61,10 @@ usb-qcserial-add-additional-sierra-wireless-qmi-devices.patch usb-serial-fix-potential-runtime-pm-imbalance-at-device-remove.patch media-ivtv-fix-oops-when-no-firmware-is-loaded.patch media-stk1160-avoid-stack-allocated-buffer-for-control-urbs.patch +media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch +media-exynos4-is-fix-compilation-for-config_common_clk.patch +acpi-add-dynamic_debug-support.patch +acpica-utstring-check-array-index-bound-before-use.patch +acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch +acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch +acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch -- 2.47.3