fix compiler warnings
fix GCC 4.7 errors

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
Update: staging

staging: android: lowmemorykiller: sysfs node and notifications
staging: ram_console: Fix section mismatches
binder: Quiet binder
lowmemorykiller: Account for ZONE_MOVABLE during hotplug.

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
drivercore: Add driver probe deferral mechanism

Allow drivers to report at probe time that they cannot get all the resources
required by the device, and should be retried at a later time.

This should completely solve the problem of getting devices
initialized in the right order.  Right now this is mostly handled by
mucking about with initcall ordering which is a complete hack, and
doesn't even remotely handle the case where device drivers are in
modules.  This approach completely sidesteps the issues by allowing
driver registration to occur in any order, and any driver can request
to be retried after a few more other drivers get probed.

v4: - Integrate Manjunath's addition of a separate workqueue
    - Change -EAGAIN to -EPROBE_DEFER for drivers to trigger deferral
    - Update comment blocks to reflect how the code really works
v3: - Hold off workqueue scheduling until late_initcall so that the bulk
      of driver probes are complete before we start retrying deferred devices.
    - Tested with simple use cases.  Still needs more testing though.
      Using it to get rid of the gpio early_initcall madness, or to replace
      the ASoC internal probe deferral code would be ideal.
v2: - added locking so it should no longer be utterly broken in that regard
    - remove device from deferred list at device_del time.
    - Still completely untested with any real use case, but has been
      boot tested.

Change-Id: Iaf6bb62f70c2d82c6cccbe468bc5007b1989af93
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dilan Lee <dilee@nvidia.com>
Cc: Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: David Daney <david.daney@cavium.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Latest st-ericcson patches

cg2900: Fix for softirq warning during booting
audio: Fix for choppy playback in Ubuntu pulse audio
pm: Fix for prcmu pending interrupt during suspend
pm: Fix for Ethernet doesn't work after suspend
android: compilation failure with new version of svn
pm: Fix for Basic Suspend/Resume to work
usb: musb: SW workaround for USB host issue
clock: ux500: add debugfs support for powerdebug

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
WIFI: including wifi driver in Ramdisk

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
Ramdisk: insert CWM

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
Merge block: for FIOPS scheduler

cfq-iosched: fix use-after-free of cfqq
vfs: fix up ENOIOCTLCMD error handling
block: fix blk_queue_end_tag()
block: remove WARN_ON_ONCE() in exit_io_context()
block: an exiting task should be allowed to create io_context
block: re-use existing 'reading' variable instead of checking direction again
block: ioc_cgroup_changed() needs to be exported
block: don't kick empty queue in blk_drain_queue()
block: fix merge error from "block, cfq: move icq creation and rq->elv.icq association to block core"
block, cfq: move icq creation and rq->elv.icq association to  block core
block, cfq: restructure io_cq creation path for io_context  interface cleanup
block, cfq: move io_cq exit/release to blk-ioc.c
block, cfq: move icq cache management to block core
block, cfq: move io_cq lookup to blk-ioc.c
block, cfq: move cfqd->icq_list to request_queue and add request->elv.icq
block, cfq: reorganize cfq_io_context into generic and cfq specific parts
block: remove elevator_queue->ops
block: reorder elevator switch sequence
block, cfq: replace current_io_context() with create_io_context()
block, cfq: kill ioc_gone
block, cfq: remove delayed unlink
block, cfq: unlink cfq_io_context's immediately
block: fix merge error from "block, cfq: move ioc ioprio/cgroup changed handling to cic"
block, cfq: fix cic lookup locking
block, cfq: fix race condition in cic creation path and tighten locking
block, cfq: move ioc ioprio/cgroup changed handling to cic
block, cfq: misc updates to cfq_io_context
block: misc updates to blk_get_queue()
block: make ioc get/put interface more conventional and fix race on alloction
block: rename the return of two functions
block: misc ioc cleanups
ida: simplified functions for id allocation
block, cfq: move cfqd->cic_index to q->id
block: add missing blk_queue_dead() checks
block: fix drain_all condition in blk_drain_queue()
block: add blk_queue_dead()
block: add missed trace_block_plug
block: avoid unnecessary plug list flush
block: don't call blk_drain_queue() if elevator is not up
blk-throttle: use queue_is_locked() instead of lockdep_is_held()
blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
blk-throttle: Free up policy node associated with deleted
block: warn if tag is greater than real_max_depth.
blk-flush: move the queue kick into
blk-flush: fix invalid BUG_ON in blk_insert_flush
block: fix flush machinery for stacking drivers with differring flush flags
block: Remove the control of complete cpu from bio.
block: fix a typo in the blk-cgroup.h file
block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown
block: drop @tsk from attempt_plug_merge() and explain sync
block: make get_request[_wait]() fail if queue is dead
block: reorganize throtl_get_tg() and blk_throtl_bio()
block: reorganize queue draining
block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
block: pass around REQ_* flags instead of broken down booleans during request alloc/free
block: move blk_throtl prototypes to block/blk.h
block: fix genhd refcounting in blkio_policy_parse_and_set()
block/blk-sysfs.c: fix kerneldoc references
block: refactor generic_make_request
block: Don't check QUEUE_FLAG_SAME_COMP in blk_complete_request
block: remove support for bio remapping from ->make_request
fail_make_request: cleanup should_fail_request
block: fix warning with calling smp_processor_id() in preemptible section
block: rename __make_request() to blk_queue_bio()
block: export __make_request
elevator: use ELV_NAME_MAX instead of magic number 16 for chosen_elevator
block: simplify force plug flush code a little bit
block: change force plug flush call order
block: Fix queue_flag update when rq_affinity goes from 2 to 1
block: strict rq_affinity
block: add GENHD_FL_NO_PART_SCAN
block: Invalidate the cache for a parent block-device if blkdev_issue_flush() was called for a partition
block: separate priority boosting from REQ_META
cfq-iosched: Reduce linked group count upon group destruction
CFQ: add think time check for service tree
CFQ: move think time check variables to a separate struct
block: avoid unnecessary plug list flush
block, sx8: kill blk_insert_request()
block: simplify force plug flush code a little bit
block: avoid building too big plug list
block: fix deadlock through percpu allocation in blk-cgroup
block, cfq: fix empty queue crash caused by request merge
make default readahead size a kernel parameter
block: limit default readahead size for small devices

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
block: fiops ioscheduler core

FIOPS (Fair IOPS) ioscheduler is IOPS based ioscheduler, so only targets
for drive without I/O seek. It's quite similar like CFQ, but the dispatch
decision is made according to IOPS instead of slice.

The algorithm is simple. Drive has a service tree, and each task lives in
the tree. The key into the tree is called vios (virtual I/O). Every request
has vios, which is calculated according to its ioprio, request size and so
on. Task's vios is the sum of vios of all requests it dispatches. FIOPS
always selects task with minimum vios in the service tree and let the task
dispatch request. The dispatched request's vios is then added to the task's
vios and the task is repositioned in the sevice tree.

Unlike CFQ, FIOPS doesn't have separate sync/async queues, because with I/O
less writeback, usually a task can only dispatch either sync or async requests.
Bias read or write request can still be done with read/write scale.

One issue is if workload iodepth is lower than drive queue_depth, IOPS
share of a task might not be strictly according to its priority, request
size and so on. In this case, the drive is in idle actually. Solving the
problem need make drive idle, so impact performance. I believe CFQ isn't
completely fair between tasks in such case too.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops read/write request scale

read/write speed of Flash based storage usually is different. For example,
in my SSD maxium thoughput of read is about 3 times faster than that of
write. Add a scale to differenate read and write. Also add a tunable, so
user can assign different scale for read and write.

By default, the scale is 1:1, which means the scale is a noop.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops sync/async scale

CFQ gives 2.5 times more share to sync workload. This matches CFQ.

Note this is different with the read/write scale. We have 3 types of
requests:
1. read
2. sync write
3. write
CFQ doesn't differentitate type 1 and 2, but request cost of 1 and 2
are usually different for flash based storage. So we have both sync/async
and read/write scale here.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops add ioprio support

Add CFQ-like ioprio support. Priority A will get 20% more share than priority
A+1, which matches CFQ.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops preserve vios key for deep queue depth workload

If the task has running request, even it's added into service tree newly,
we preserve its vios key, so it will not lost its share. This should work
for task driving big queue depth. For single depth task, there is no approach
to preserve its vios key.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops bias sync workload

If there are async requests running, delay async workload. Otherwise
async workload (usually very deep iodepth) will use all queue iodepth
and later sync requests will get long delayed. The idea is from CFQ.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops add some trace information

Add some trace information, which is helpful when I do debugging.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
fix compiler warnings