Bring JF kernel up to date with CM.

Squashed commit of the following:

commit 2d6c58eac429edca005d3837edc591c04a79d6e4
Merge: fa11cfe b63bb39
Author: DaMadOne <insane.palmer@gmail.com>
Date:   Fri Oct 25 01:57:16 2013 -0400

    Merge remote-tracking branch 'cm/cm-10.2' into test

    Conflicts:
    	arch/arm/configs/cyanogen_jf_defconfig

    Change-Id: Ia211aff345cbebc0afdb462215bbacc120698776

commit b63bb3962e04ce87a5344f4f6c6044929c4f32d3
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Thu Oct 10 00:08:04 2013 -0500

    jf: clean up and consolidate defconfigs

    * regenerate commonized defconfig
    * clean up the mess

    Change-Id: I6895d70d3256d0d0337373919ed9f29658f30e86

commit 5812fb551bc32aca6a1ea8c4a4486f6a028b7aa3
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Tue Oct 15 08:03:21 2013 -0500

    jflteatt: conform to the rest of jf devices

    * fixes build issues with our consolidated defconfig

    Change-Id: I514385e7ca3f1cbd884f7fc15c4426575da29fb0

commit cd838940c4ac1d27d8d15bc5251eae735fff1552
Merge: 2c8f5cd 47a5a4a
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Tue Oct 22 04:39:28 2013 +0000

    Merge "Revert "mmc: core: handle flush requests timeout"" into cm-10.2

commit 47a5a4a98f4f4430ea89626f3b123b313f832c69
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Tue Oct 22 04:39:16 2013 +0000

    Revert "mmc: core: handle flush requests timeout"

    * somehow causes random reboots when on 3g only

    This reverts commit 2ec43f0da44d74e7adca62867fc2f8245a62e878.

    Change-Id: Iff7e8e8b76e8ca12428175c1e882c5570aa27480

commit 2c8f5cd8e4df8658f743d649d04668a923087302
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Sat Oct 19 14:27:19 2013 -0500

    board-8064-storage: fix splash screen hang

    What an annoying bug...

    To reproduce:
    * Turn device off, unplugged
    * Plug in, allow offmode charging to do its thing
    * Once on the black screen, turn device on
    * It'll hang on the splash screen until you pull the battery

    Likely this will fix the random occurances of this too. That is yet to
    be verified though.

    Change-Id: Id3c419d93e7ae73c6b7d34e989483003cfece7f3

commit 2ec43f0da44d74e7adca62867fc2f8245a62e878
Author: Konstantin Dorfman <kdorfman@codeaurora.org>
Date:   Sun Jun 30 09:31:21 2013 +0300

    mmc: core: handle flush requests timeout

    According to the eMMC 4.5 spec "Flushing a large amount of cached data may
    take very unpredictably long time". Therefore the timeout for FLUSH should
    be increased to prevent timeouts.

    In case the timeout occurs HPI issued.

    CRs-Fixed: 500874
    Change-Id: Ib00d087d3fe2fa72f5eac096976d3f24b5e4966a
    Signed-off-by: Maya Erez <merez@codeaurora.org>
    Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>

commit 087567e44ebc1b5d6175bbc6272642ab5ff92587
Author: Subhash Jadavani <subhashj@codeaurora.org>
Date:   Tue Jun 25 13:13:24 2013 +0530

    mmc: core: expose HPI capability to SWITCH commands

    Some of the time consuming operations such as BKOPS, SANITIZE, CACHE
    flush/off use the SWITCH command (CMD6) but as these operations don't
    have card specification defined timeout for completion, we may see
    timeout errors if card doesn't complete the operation within the SW
    defined timeout. If SW defined timeout is hit, above operations are
    considered to be failed and no real recovery mechanism is implemented
    after timeout.

    Most of the above operations (BKOPS/SANITIZE/CACHE flush/off) can be
    interrupted by sending the HPI (High Priority Interrupt) command to card
    if they taking longer than expected. This change adds the base support
    which will these operations to be HPIed after timeout.

    Change-Id: Ibd9061525756aaae656b1ceeeaed62e04fb80cce
    Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>

commit 5b5aa297853b91a25ef4db13f9c0d3f33c6889fe
Author: Sahitya Tummala <stummala@codeaurora.org>
Date:   Thu Jun 13 10:34:48 2013 +0530

    mmc: core: Fix MMC clock scaling in case of tuning failure

    When the clock scaling state is changed from MMC_LOAD_LOW to
    MMC_LOAD_HIGH, the clocks are first scaled up and then tuning
    is performed. But in case of tuning failure, the current code
    does nothing but still retain the previous clock scale stats
    (state and curr_freq within struct clk_scaling). Hence, correct
    it to scale down the clocks in case of tuning failure so that
    clock scaling stats reflect the correct status. This also helps
    proceed with data transfers at lower clock rate in such cases.

    Change-Id: I7e9379d1e3ddc863132af31019604c22a42f8d59
    Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>

commit 372e3e28fbcc10d484190903df800dbd379cde7b
Author: Maya Erez <merez@codeaurora.org>
Date:   Mon Jul 8 18:23:44 2013 +0300

    mmc: core: remove the polling for BKOPS completion

    The original intention of polling for BKOPS completion was to give
    the card enough time to perform the BKOPS before it is runtime suspended.
    But as the BKOPS completion polling was happening in a different
    context, it may race with card runtime/platform suspend which is quite
    difficult to fix. So instead of BKOPS polling, let the runtime suspend
    get deferred if the BKOPS is running on the card. Also if BKOPS is running
    when platform suspend is triggered, stop the BKOPS before suspending the
    card.

    Conflicts:
    	drivers/mmc/core/core.c
    	include/linux/mmc/card.h

    CRs-Fixed: 489523
    Change-Id: I21e524dc2da37c4985c210abfaca00a28049c651
    Signed-off-by: Maya Erez <merez@codeaurora.org>
    Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>

commit eecb06a03c28c5106af4d940cb31dbf5d924dbe3
Author: Tomasz Stanislawski <t.stanislaws@samsung.com>
Date:   Wed Jun 12 21:05:02 2013 +0000

    mm/page_alloc.c: fix watermark check in __zone_watermark_ok()

    The watermark check consists of two sub-checks.  The first one is:

    	if (free_pages <= min + lowmem_reserve)
    		return false;

    The check assures that there is minimal amount of RAM in the zone.  If
    CMA is used then the free_pages is reduced by the number of free pages
    in CMA prior to the over-mentioned check.

    	if (!(alloc_flags & ALLOC_CMA))
    		free_pages -= zone_page_state(z, NR_FREE_CMA_PAGES);

    This prevents the zone from being drained from pages available for
    non-movable allocations.

    The second check prevents the zone from getting too fragmented.

    	for (o = 0; o < order; o++) {
    		free_pages -= z->free_area[o].nr_free << o;
    		min >>= 1;
    		if (free_pages <= min)
    			return false;
    	}

    The field z->free_area[o].nr_free is equal to the number of free pages
    including free CMA pages.  Therefore the CMA pages are subtracted twice.
    This may cause a false positive fail of __zone_watermark_ok() if the CMA
    area gets strongly fragmented.  In such a case there are many 0-order
    free pages located in CMA.  Those pages are subtracted twice therefore
    they will quickly drain free_pages during the check against
    fragmentation.  The test fails even though there are many free non-cma
    pages in the zone.

    This patch fixes this issue by subtracting CMA pages only for a purpose of
    (free_pages <= min + lowmem_reserve) check.

    Laura said:

      We were observing allocation failures of higher order pages (order 5 =
      128K typically) under tight memory conditions resulting in driver
      failure.  The output from the page allocation failure showed plenty of
      free pages of the appropriate order/type/zone and mostly CMA pages in
      the lower orders.

      For full disclosure, we still observed some page allocation failures
      even after applying the patch but the number was drastically reduced and
      those failures were attributed to fragmentation/other system issues.

    Change-Id: Ic2c0c233993c41c630e24d71df5e12aa614588e5
    CRs-Fixed:549847
    Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
    Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
    Tested-by: Laura Abbott <lauraa@codeaurora.org>
    Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    Acked-by: Minchan Kim <minchan@kernel.org>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Cc: <stable@vger.kernel.org>	[3.7+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Git-commit: 026b08147923142e925a7d0aaa39038055ae0156
    Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
    Signed-off-by: Srinivasarao P <spathi@codeaurora.org>

commit de142806214fcc559d780fe012586a280ae3cdb2
Author: Mayank Chopra <makchopra@codeaurora.org>
Date:   Fri Sep 6 16:08:25 2013 +0530

    msm: rotator: Add support to YCBYCR rotator format

    Add support for MDP_YCBYCR_H2V1 interleaved YUV format in rotator
    block.

    Change-Id: I4bb192aaab1e72f6e5687ae222a5f9ea2c254bd4
    Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

commit 361d5ab106fc7b1278058b83e927a8c05aa60cb4
Author: Mayank Chopra <makchopra@codeaurora.org>
Date:   Fri Sep 6 16:07:59 2013 +0530

    msm_fb: display: Add support to YCBYCR MDP format

    Add support of MDP_YCBYCR_H2V1 interleaved YUV format to MDP
    for a-family targets.

    Change-Id: I5afb84a95693d1ced114152364782a10c4d56bc2
    Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

commit a646f5583a217ef7039c8a746f1610d0e3309626
Author: Patrick McHardy <kaber@trash.net>
Date:   Fri Apr 5 08:13:30 2013 +0000

    netfilter: nf_ct_sip: don't drop packets with offsets pointing outside the packet

    Some Cisco phones create huge messages that are spread over multiple packets.
    After calculating the offset of the SIP body, it is validated to be within
    the packet and the packet is dropped otherwise. This breaks operation of
    these phones. Since connection tracking is supposed to be passive, just let
    those packets pass unmodified and untracked.

    Signed-off-by: Patrick McHardy <kaber@trash.net>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

    Conflicts:
    	net/netfilter/nf_conntrack_sip.c

    This commit appears in the 3.8 and 3.9 branches of the Linux kernel
    and according to feanor3 on xda-developers:

    The "Cisco Jabber" app lets you use your cell phone as a SIP
    endpoint with your work number on a Cisco phone system. The
    registration packets that Cisco uses are apparently larger
    than normal. With your kernel, the registration does not complete.
    With your kernel and line 1421 changed to NF_ACCEPT, the registration
    complete

    Change-Id: If0c4eff68fa10af43767ad49808394910cae4309

commit 912483fa94f5fb729864fa3073bf8981ba851149
Author: Arne Coucheron <arco68@gmail.com>
Date:   Fri Sep 27 16:53:10 2013 +0200

    defconfig: Fix selinux typos

    Change-Id: I9b3e5b9ac50449a6190b1876cde912d7174b7023

Change-Id: I649436cc9694244f894a74e080a2f12e503b6748