mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Linux 3.10-rc7
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQEbBAABAgAGBQJRxf9cAAoJEHm+PkMAQRiGMWkH911xM4gRmFgE7SqVW4F4AWBm ngcqMqNy9IdqKfibORUUDvVfEa5gjD5ai2quIKpfQiaukbpQJ696H90ijuAkajLn DQBrN243s0pzhhc/quWINnWxsFQ613JjdUMUMaD7e9A1aKjYzWrPGt/tSjrFXGCP tArTupVzc/iOmnEQDKiROI/Nokq44QJ36aTGPM7n08xMtpKmkCXM+9/UosBteB0O HVI33dmjwz7i55fI53XAWyuZCE+gSEnA4z8spJ9LfXso2W14V+roc+GuL6OyeeTI pCn/+4niVPb4B0ROZlpyVmdZjbPPcMMEK5o+BSJI68SH6LHZTQh2iVuqYfpSyA== =uUH5 -----END PGP SIGNATURE----- Merge tag 'v3.10-rc7' into drm-next Linux 3.10-rc7 The sdvo lvds fix in this -fixes pull commitc3456fb3e4Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Jun 10 09:47:58 2013 +0200 drm/i915: prefer VBT modes for SVDO-LVDS over EDID has a silent functional conflict with commit990256aec2Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 31 12:17:07 2013 +0000 drm: Add probed modes in probe order in drm-next. W simply need to add the vbt modes before edid modes, i.e. the other way round than now. Conflicts: drivers/gpu/drm/drm_prime.c drivers/gpu/drm/i915/intel_sdvo.c
This commit is contained in:
commit
4300a0f8bd
1058 changed files with 13456 additions and 7048 deletions
|
|
@ -865,16 +865,24 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,
|
|||
if (r->entropy_count / 8 < min + reserved) {
|
||||
nbytes = 0;
|
||||
} else {
|
||||
int entropy_count, orig;
|
||||
retry:
|
||||
entropy_count = orig = ACCESS_ONCE(r->entropy_count);
|
||||
/* If limited, never pull more than available */
|
||||
if (r->limit && nbytes + reserved >= r->entropy_count / 8)
|
||||
nbytes = r->entropy_count/8 - reserved;
|
||||
if (r->limit && nbytes + reserved >= entropy_count / 8)
|
||||
nbytes = entropy_count/8 - reserved;
|
||||
|
||||
if (r->entropy_count / 8 >= nbytes + reserved)
|
||||
r->entropy_count -= nbytes*8;
|
||||
else
|
||||
r->entropy_count = reserved;
|
||||
if (entropy_count / 8 >= nbytes + reserved) {
|
||||
entropy_count -= nbytes*8;
|
||||
if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
|
||||
goto retry;
|
||||
} else {
|
||||
entropy_count = reserved;
|
||||
if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
|
||||
goto retry;
|
||||
}
|
||||
|
||||
if (r->entropy_count < random_write_wakeup_thresh)
|
||||
if (entropy_count < random_write_wakeup_thresh)
|
||||
wakeup_write = 1;
|
||||
}
|
||||
|
||||
|
|
@ -957,10 +965,23 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
|
|||
{
|
||||
ssize_t ret = 0, i;
|
||||
__u8 tmp[EXTRACT_SIZE];
|
||||
unsigned long flags;
|
||||
|
||||
/* if last_data isn't primed, we need EXTRACT_SIZE extra bytes */
|
||||
if (fips_enabled && !r->last_data_init)
|
||||
nbytes += EXTRACT_SIZE;
|
||||
if (fips_enabled) {
|
||||
spin_lock_irqsave(&r->lock, flags);
|
||||
if (!r->last_data_init) {
|
||||
r->last_data_init = true;
|
||||
spin_unlock_irqrestore(&r->lock, flags);
|
||||
trace_extract_entropy(r->name, EXTRACT_SIZE,
|
||||
r->entropy_count, _RET_IP_);
|
||||
xfer_secondary_pool(r, EXTRACT_SIZE);
|
||||
extract_buf(r, tmp);
|
||||
spin_lock_irqsave(&r->lock, flags);
|
||||
memcpy(r->last_data, tmp, EXTRACT_SIZE);
|
||||
}
|
||||
spin_unlock_irqrestore(&r->lock, flags);
|
||||
}
|
||||
|
||||
trace_extract_entropy(r->name, nbytes, r->entropy_count, _RET_IP_);
|
||||
xfer_secondary_pool(r, nbytes);
|
||||
|
|
@ -970,19 +991,6 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
|
|||
extract_buf(r, tmp);
|
||||
|
||||
if (fips_enabled) {
|
||||
unsigned long flags;
|
||||
|
||||
|
||||
/* prime last_data value if need be, per fips 140-2 */
|
||||
if (!r->last_data_init) {
|
||||
spin_lock_irqsave(&r->lock, flags);
|
||||
memcpy(r->last_data, tmp, EXTRACT_SIZE);
|
||||
r->last_data_init = true;
|
||||
nbytes -= EXTRACT_SIZE;
|
||||
spin_unlock_irqrestore(&r->lock, flags);
|
||||
extract_buf(r, tmp);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&r->lock, flags);
|
||||
if (!memcmp(tmp, r->last_data, EXTRACT_SIZE))
|
||||
panic("Hardware RNG duplicated output!\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue