sched: added Simple I/O scheduler

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
CPU: added VDD control sysfs interface [modified for QSD8x50]

Thanks to DooMLoRD
add mkboot, gitignore

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
*remove bad directory one time

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
[Wifi] add vendor (Wifi, kexec tools)

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
[Wifi] edit Makefile, add make script

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
[Wifi] add git ignore

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
es209: bootloader hack for locked x10 by zdzihu

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
ACPU: CPU overclock to 1,2Ghz

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
msm: Remove unused CONFIG_MSM_CPU_FREQ_SCREEN support.

This feature is obsolete and no longer used.  Remove it.

Change-Id: I5163583625a75200e308e19faee0ae11278c69dd
Signed-off-by: Matt Wagantall <mattw@quicinc.com>
Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
CPU: governor: added interactive, interactivex. smartass, smartassV2, lagfree, scary, minmax

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
CPU: governor: update ondemand, conservative
video: nt35580: disable nv_sync

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
Merge bzip2/lzma support from .32

kbuild: Fix size_append issue for bzip2/lzma kernel
kbuild: correct initramfs compression comment
bzip2/lzma: remove nasty uncompressed size hack in pre-boot environment
bzip2/lzma/gzip: fix comments describing decompressor API
kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs
bzip2/lzma: quiet Kconfig warning for INITRAMFS_COMPRESSION_NONE
bzip2/lzma: don't ask for compression mode for the default initramfs
bzip2/lzma: consistently capitalize LZMA in Kconfig
bzip2/lzma: clarify the meaning of the CONFIG_RD_ options
bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDED
bzip2/lzma: make internal initramfs compression configurable
bzip2/lzma: don't leave empty files around on failure
bzip2/lzma: don't stop search at first unconfigured compression
bzip2/lzma: comprehensible error messages for missing decompressor
bzip2/lzma: make flush_buffer() unconditional
bzip2/lzma: centralize format detection
bzip2/lzma: fix decompress_inflate.c vs multi-block-with-embedded-filename
bzip2/lzma: fix constant in decompress_inflate
bzip2/lzma: fix built-in initramfs vs CONFIG_RD_GZIP
bzip2/lzma: move initrd/ramfs options out of BLK_DEV
bzip2/lzma: DECOMPRESS_GZIP should select ZLIB_INFLATE
bzip2/lzma: proper Kconfig dependencies for the ramdisk options
bzip2/lzma: make config machinery an arch configurable
bzip2/lzma: handle failures from bzip2 and lzma correctly
bzip2/lzma: use a table to search for initramfs compression formats
bzip2/lzma: config and initramfs support for bzip2/lzma decompression
bzip2/lzma: library support for gzip, bzip2 and lzma decompression

Conflicts:

	kernel/lib/Makefile
netfilter: netfilter match speedup, fix error, add missing

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
Squashed commit of Bluetooth fixes from Google

Bluetooth: Fix connection establishment with low security requirement

The Bluetooth 2.1 specification introduced four different security modes
that can be mapped using Legacy Pairing and Simple Pairing. With the
usage of Simple Pairing it is required that all connections (except
the ones for SDP) are encrypted. So even the low security requirement
mandates an encrypted connection when using Simple Pairing. When using
Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
since it causes interoperability issues.

To support this properly the low security requirement translates into
different host controller transactions depending if Simple Pairing is
supported or not. However in case of Simple Pairing the command to
switch on encryption after a successful authentication is not triggered
for the low security mode. This patch fixes this and actually makes
the logic to differentiate between Simple Pairing and Legacy Pairing
a lot simpler.

Based on a report by Ville Tervo <ville.tervo@nokia.com>

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Bluetooth: Set general bonding security for ACL by default

This patch fixes double pairing issues with SSP.

It was observed that when pairing with SSP bluez asks confirmation
2 times.
http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when we initiate SSP connection from Vista.

The reason is because bluetoothd does not store link keys since
ioctl  HCIGETAUTHINFO returns 0. Setting default general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>

Bluetooth: Enter active mode before establishing a SCO link.

When in sniff mode with a long interval time (1.28s) it can take 4+ seconds to
establish a SCO link. Fix by requesting active mode before requesting SCO
connection. This improves SCO setup time to ~500ms.

Bluetooth headsets that use a long interval time, and exhibit the long SCO
connection time include Motorola H790, HX1 and H17. They have a CSR 2.1 chipset

Verified this behavior and fix with host Bluetooth chipsets: BCM4329 and
TI1271.

Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Add ACL MTU, available buffers and total buffers to hci_conn_info.

This provides userspace debugging tools access to ACL flow control state.

Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Introduce L2CAP_LM_FLUSHABLE to allow flushing of ACL packets.

With Bluetooth 2.1 ACL packets can be flushable or non-flushable. This changes
makes the default ACL packet non-flushable, and allows selection of flushable
packets on a per-L2CAP socket basis with L2CAP_LM_FLUSHABLE.

Note the HCI Write Automatic Flush Timeout command also needs to be issued
to set the flush timeout to non-zero.

Need to featurize this change to Bluetooth 2.1 chipsets only before pushing
upstream.

Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Hack: Do not use power_save feature.

power_save is a feature to allow HID devices to control the sniff mode.
Unfortunately it also prevents us exiting sniff mode on some A2DP devices
that do not explicitly exit sniff mode themselves, resulting in skipping
audio.

Marcel is trying to finalize a setsockopt() API to control whether power_save
is enabled on a per socket basis. In the mean-time, turn off power_save for
Android, since we do not have official HID support, and this is causing
problems for A2DP which we do support.

(Note the power_save logic is reversed, 0 is on, 1 is off).

Change-Id: Ife4478055128b81669bf49308d2e2199e1aa11a1
Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Allow SCO/eSCO packet type selection for outgoing SCO connections.

__u16 sco_pkt_type is introduced to struct sockaddr_sco. It allows bitwise
selection of SCO/eSCO packet types. Currently those bits are:

0x0001 HV1 may be used.
0x0002 HV2 may be used.
0x0004 HV3 may be used.
0x0008 EV3 may be used.
0x0010 EV4 may be used.
0x0020 EV5 may be used.
0x0040 2-EV3 may be used.
0x0080 3-EV3 may be used.
0x0100 2-EV5 may be used.
0x0200 3-EV5 may be used.

This is similar to the Packet Type parameter in the HCI Setup Synchronous
Connection Command, except that we are not reversing the logic on the EDR bits.
This makes the use of sco_pkt_tpye forward portable for the use case of
white-listing packet types, which we expect will be the primary use case.

If sco_pkt_type is zero, or userspace uses the old struct sockaddr_sco,
then the default behavior is to allow all packet types.

Packet type selection is just a request made to the Bluetooth chipset, and
it is up to the link manager on the chipset to negiotiate and decide on the
actual packet types used. Furthermore, when a SCO/eSCO connection is eventually
made there is no way for the host stack to determine which packet type was used
(however it is possible to get the link type of SCO or eSCO).

sco_pkt_type is ignored for incoming SCO connections. It is possible
to add this in the future as a parameter to the Accept Synchronous Connection
Command, however its a little trickier because the kernel does not
currently preserve sockaddr_sco data between userspace calls to accept().

The most common use for sco_pkt_type will be to white-list only SCO packets,
which can be done with the hci.h constant SCO_ESCO_MASK.

This patch is motivated by broken Bluetooth carkits such as the Motorolo
HF850 (it claims to support eSCO, but will actually reject eSCO connections
after 5 seconds) and the 2007/2008 Infiniti G35/37 (fails to route audio
if a 2-EV5 packet type is negiotiated). With this patch userspace can maintain
a list of compatible packet types to workaround remote devices such as these.

Based on a patch by Marcel Holtmann.

Change-Id: I304d8fda5b4145254820a3003820163bf53de5a5
Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Hack: Don't dereference null pointer.

This avoids the S305 panic during incoming connection.

S305 sends PSM 25 L2CAP connection request before the L2CAP info response.
When we receive that info response we crash on null pointer here.

Bug: 2127637
Change-Id: Ib637516251f46fa9a9c87ac015dc2f27df5a27fd
Signed-off-by: Nick Pelly <npelly@google.com>

Bluetooth: Defer SCO setup if mode change is pending

Certain headsets such as the Motorola H350 will reject SCO and eSCO
connection requests while the ACL is transitioning from sniff mode
to active mode. Add synchronization so that SCO and eSCO connection
requests will wait until the ACL has fully transitioned to active mode.

< HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2
    handle 12
> HCI Event: Command Status (0x0f) plen 4
    Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1
< HCI Command:  Setup Synchronous Connection (0x01|0x0028) plen 17
    handle 12 voice setting 0x0040
> HCI Event: Command Status (0x0f) plen 4
    Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 1
> HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 12 mode 0x00 interval 0
    Mode: Active
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
    status 0x10 handle 14 bdaddr 00:1A:0E:50:28:A4 type SCO
    Error: Connection Accept Timeout Exceeded

Signed-off-by: Ron Shaffer <rshaffer@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
hrtimer: Preserve timer state in remove_hrtimer()

The race is described as follows:

CPU X                                 CPU Y
remove_hrtimer
// state & QUEUED == 0
timer->state = CALLBACK
unlock timer base
timer->f(n) //very long
                                  hrtimer_start
                                    lock timer base
                                    remove_hrtimer // no effect
                                    hrtimer_enqueue
                                    timer->state = CALLBACK |
                                                   QUEUED
                                    unlock timer base
                                  hrtimer_start
                                    lock timer base
                                    remove_hrtimer
                                        mode = INACTIVE
                                        // CALLBACK bit lost!
                                    switch_hrtimer_base
                                            CALLBACK bit not set:
                                                    timer->base
                                                    changes to a
                                                    different CPU.
lock this CPU's timer base

The bug was introduced with commit ca109491f (hrtimer: removing all ur
callback modes) in 2.6.29

[ tglx: Feed new state via local variable and add a comment. ]

Signed-off-by: Salman Qazi <sqazi@google.com>
Cc: akpm@linux-foundation.org
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20101012142351.8485.21823.stgit@dungbeetle.mtv.corp.google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Merge: mutex

mutex: adaptive spinnning, performance tweaks
mutex: implement adaptive spinning
mutex: preemption fixes
mutex: small cleanup
sched_features: better for android battery

Signed-off-by: hayashikejinan <hayashikejinan@gmail.com>
es209ra: pmem: decrease pmem size to 28MB from 42MB

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