ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline

Add an option to force usage of the in-kernel cmdline even if the boot
loader passes another command string to the kernel.

Useful if someone cannot or don't want to change the
command-line options of the boot loader but is able to change
the kernel.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[P350] Update Defconfig

Change-Id: I06dc2270cfd7fb7407f1c6b7a585b5891ca4bfea
Signed-off-by: RonGokhale <cips173@gmail.com>
block:  remove bfq-v2 code

so we can add bfq-v3 with proper credit

Change-Id: I3f2696caf8d56929dd88ec144d5e7f5d527128fc
block: prepare I/O context code for BFQ-v3r1 for 2.6.38

BFQ uses struct cfq_io_context to store its per-process per-device data,
reusing the same code for cic handling of CFQ.  The code is not shared
ATM to minimize the impact of these patches.

This patch introduces a new hlist to each io_context to store all the
cic's allocated by BFQ to allow calling the right destructor on module
unload; the radix tree used for cic lookup needs to be duplicated
because it can contain dead keys inserted by a scheduler and later
retrieved by the other one.

Update the io_context exit and free paths to take care also of
the BFQ cic's.

Change the type of cfqq inside struct cfq_io_context to void *
to use it also for BFQ per-queue data.

A new bfq-specific ioprio_changed field is necessary, too, to avoid
clobbering cfq's one, so switch ioprio_changed to a bitmap, with one
element per scheduler.

Change-Id: Ib07a30174535fb5c0f2fbd2e5ef33b35eff8ab37
Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
block: cgroups, kconfig, build bits for BFQ-v3r1-2.6.38

Add a Kconfig option and do the related Makefile changes to compile
the BFQ I/O scheduler.  Also let the cgroups subsystem know about the
BFQ I/O controller.

Change-Id: Icd3434fe50dc45150f9fcd2f5e5c2a0458460f3d
Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
block: introduce the BFQ-v3r1 I/O sched for 2.6.38

Add the BFQ-v3r1 I/O scheduler to 2.6.38.
The general structure is borrowed from CFQ, as much of the code. A (bfq_)queue
is associated to each task doing I/O on a device, and each time a scheduling
decision has to be taken a queue is selected and it is served until it expires.

The main differences are:
    - Slices are given in the service domain: tasks are assigned budgets,
      measured in number of sectors. Once got the disk, a task must
      however consume its assigned budget within a configurable maximum time
      (by default, the maximum possible value of the budgets is automatically
      computed to comply with this timeout). This allows the desired latency
      vs "throughput boosting" tradeoff to be set.

    - Budgets are scheduled according to a variant of WF2Q+, implemented
      using an augmented rb-tree to take eligibility into account while
      preserving an O(log N) overall complexity.

    - A low-latency tunable is provided; if enabled, both interactive and soft
      real-time applications are guaranteed very low latency.

    - Latency guarantees are preserved also in presence of NCQ.

    - Useful features borrowed from CFQ: cooperating-queues merging (with
      some additional optimizations with respect to the original CFQ version),
      static fallback queue for OOM.

    - BFQ supports full hierarchical scheduling, exporting a cgroups
      interface.  Each node has a full scheduler, so each group can
      be assigned its own ioprio and an ioprio_class.

    - If the cgroups interface is used, weights can be explictly assigned,
      otherwise ioprio values are mapped to weights using the relation
      weight = IOPRIO_BE_NR - ioprio.

    - ioprio classes are served in strict priority order, i.e., lower
      priority queues are not served as long as there are higher priority
      queues.  Among queues in the same class the bandwidth is distributed
      in proportion to the weights of each queue. A very thin extra bandwidth
      is however guaranteed to the Idle class, to prevent it from starving.

Regarding what has not changed it is worth noting:
    - the handling of cfq_io_contexts to associate queues to tasks.
      Much of the code has been reused just renaming it.  (There is room for
      code sharing with CFQ but we wanted to minimize the impact of this
      patch.)

    - The handling of async queues.

    - The handling of idle windows.

    - The handling of merging.

    - The heuristics to assert that a task is worth an idle window (with
      minor modifications to hw_tag/CIC_SEEKY detection).

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
block: Fix BFQ-V3 Build errors

Change-Id: I4607a7ea3c05b8d35a151a6a058e44b1f6142548
usb: Add support diag host driver

USB diag host driver will be used to connect diag interface
exposed by Qualcomm devices. This driver currently supports
usb qualcomm devices with product id: 9001 and vendor id:
0x5c6. Also add simple unit test driver to test diag host
driver.

Change-Id: Id811edb6af79dcdff10bbe9821358d7880475b0a
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
[P350] Updated defconfig

Change-Id: Ie27012a7c7ba8dc4dcdc21f51b5aa48e578f8876
arm: Allow CPU-supported unaligned accesses

This change reconfigures the CPU to allow CPU-supported unaligned
accesses, which are generally faster than software-only fixups,
resulting in fewer alignment exceptions.

Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>
[P350] Updated defconfig

Change-Id: Ica5c4c67ab85f85ffbc369796c36017352775efe
USB: gadget: Add 10 microsec delay before fetching setup_data

USB hardware sometimes generate interrupt before 8 bytes of
SETUP packet are written to system memory.
This results in wrong setup_data when tried to read immediately
after receiving an interrupt.
Add a delay of 10 microsec before fetching setup packet to allow
writes from hardware to system memory to complete.

CRs-Fixed: 291466
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
(cherry picked from commit f89bec0737c0b824495ca85868c949ed0bd1258b)

Change-Id: I154e0bc07661ac8c7d0ca18bb15a38b06d12e207
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Merge branch 'cm-10.1' of github.com:PecanCM/lge-kernel-pecan into cm-10.1

Change-Id: I0243194c6fff2ea24616f22f5d88f6f880cb0251