Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
  • Loading branch information
davem330 committed Feb 17, 2017
2 parents f3caf86 + 4695dae commit 3f64116
Show file tree
Hide file tree
Showing 66 changed files with 594 additions and 290 deletions.
5 changes: 2 additions & 3 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -2478,12 +2478,11 @@ S: D-90453 Nuernberg
S: Germany

N: Arnaldo Carvalho de Melo
E: acme@ghostprotocols.net
E: acme@kernel.org
E: [email protected]
E: [email protected]
W: http://oops.ghostprotocols.net:81/blog/
P: 1024D/9224DF01 D5DF E3BB E3C8 BCBB F8AD 841A B6AB 4681 9224 DF01
D: IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks
D: tools/, IPX, LLC, DCCP, cyc2x, wl3501_cs, net/ hacks
S: Brazil

N: Karsten Merker
Expand Down
23 changes: 17 additions & 6 deletions Documentation/media/uapi/v4l/pixfmt-007.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ Colorspace sRGB (V4L2_COLORSPACE_SRGB)
The :ref:`srgb` standard defines the colorspace used by most webcams
and computer graphics. The default transfer function is
``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is
``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range.
``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range.

Note that the :ref:`sycc` standard specifies full range quantization,
however all current capture hardware supported by the kernel convert
R'G'B' to limited range Y'CbCr. So choosing full range as the default
would break how applications interpret the quantization range.

The chromaticities of the primary colors and the white reference are:


Expand Down Expand Up @@ -276,7 +282,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`:
Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
[-0.5…0.5]. This transform is identical to one defined in SMPTE
170M/BT.601. The Y'CbCr quantization is full range.
170M/BT.601. The Y'CbCr quantization is limited range.


.. _col-adobergb:
Expand All @@ -288,10 +294,15 @@ The :ref:`adobergb` standard defines the colorspace used by computer
graphics that use the AdobeRGB colorspace. This is also known as the
:ref:`oprgb` standard. The default transfer function is
``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is
``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full
range. The chromaticities of the primary colors and the white reference
are:
``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited
range.

Note that the :ref:`oprgb` standard specifies full range quantization,
however all current capture hardware supported by the kernel convert
R'G'B' to limited range Y'CbCr. So choosing full range as the default
would break how applications interpret the quantization range.

The chromaticities of the primary colors and the white reference are:


.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
Expand Down Expand Up @@ -344,7 +355,7 @@ the following ``V4L2_YCBCR_ENC_601`` encoding:
Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range
[-0.5…0.5]. This transform is identical to one defined in SMPTE
170M/BT.601. The Y'CbCr quantization is full range.
170M/BT.601. The Y'CbCr quantization is limited range.


.. _col-bt2020:
Expand Down
15 changes: 6 additions & 9 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ S: Odd fixes
F: drivers/hwmon/applesmc.c

APPLETALK NETWORK LAYER
M: Arnaldo Carvalho de Melo <[email protected]>
S: Maintained
L: [email protected]
S: Odd fixes
F: drivers/net/appletalk/
F: net/appletalk/

Expand Down Expand Up @@ -6748,9 +6748,8 @@ S: Odd Fixes
F: drivers/tty/ipwireless/

IPX NETWORK LAYER
M: Arnaldo Carvalho de Melo <[email protected]>
L: [email protected]
S: Maintained
S: Odd fixes
F: include/net/ipx.h
F: include/uapi/linux/ipx.h
F: net/ipx/
Expand Down Expand Up @@ -7522,8 +7521,8 @@ S: Maintained
F: drivers/misc/lkdtm*

LLC (802.2)
M: Arnaldo Carvalho de Melo <[email protected]>
S: Maintained
L: [email protected]
S: Odd fixes
F: include/linux/llc.h
F: include/uapi/linux/llc.h
F: include/net/llc*
Expand Down Expand Up @@ -13416,10 +13415,8 @@ S: Maintained
F: drivers/input/misc/wistron_btns.c

WL3501 WIRELESS PCMCIA CARD DRIVER
M: Arnaldo Carvalho de Melo <[email protected]>
L: [email protected]
W: http://oops.ghostprotocols.net:81/blog
S: Maintained
S: Odd fixes
F: drivers/net/wireless/wl3501*

WOLFSON MICROELECTRONICS DRIVERS
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 4
PATCHLEVEL = 10
SUBLEVEL = 0
EXTRAVERSION = -rc7
EXTRAVERSION = -rc8
NAME = Fearless Coyote

# *DOCUMENTATION*
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ struct cpuinfo_x86 {
__u8 x86_phys_bits;
/* CPUID returned core id bits: */
__u8 x86_coreid_bits;
__u8 cu_id;
/* Max extended CPUID function supported: */
__u32 extended_cpuid_level;
/* Maximum supported CPUID level, -1=no CPUID: */
Expand Down
16 changes: 15 additions & 1 deletion arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,22 @@ static void amd_get_topology(struct cpuinfo_x86 *c)

/* get information required for multi-node processors */
if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
u32 eax, ebx, ecx, edx;

node_id = cpuid_ecx(0x8000001e) & 7;
cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);

node_id = ecx & 0xff;
smp_num_siblings = ((ebx >> 8) & 0xff) + 1;

if (c->x86 == 0x15)
c->cu_id = ebx & 0xff;

if (c->x86 >= 0x17) {
c->cpu_core_id = ebx & 0xff;

if (smp_num_siblings > 1)
c->x86_max_cores /= smp_num_siblings;
}

/*
* We may have multiple LLCs if L3 caches exist, so check if we
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,7 @@ static void identify_cpu(struct cpuinfo_x86 *c)
c->x86_model_id[0] = '\0'; /* Unset */
c->x86_max_cores = 1;
c->x86_coreid_bits = 0;
c->cu_id = 0xff;
#ifdef CONFIG_X86_64
c->x86_clflush_size = 64;
c->x86_phys_bits = 36;
Expand Down
12 changes: 9 additions & 3 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,15 @@ static bool match_smt(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
int cpu1 = c->cpu_index, cpu2 = o->cpu_index;

if (c->phys_proc_id == o->phys_proc_id &&
per_cpu(cpu_llc_id, cpu1) == per_cpu(cpu_llc_id, cpu2) &&
c->cpu_core_id == o->cpu_core_id)
return topology_sane(c, o, "smt");
per_cpu(cpu_llc_id, cpu1) == per_cpu(cpu_llc_id, cpu2)) {
if (c->cpu_core_id == o->cpu_core_id)
return topology_sane(c, o, "smt");

if ((c->cu_id != 0xff) &&
(o->cu_id != 0xff) &&
(c->cu_id == o->cu_id))
return topology_sane(c, o, "smt");
}

} else if (c->phys_proc_id == o->phys_proc_id &&
c->cpu_core_id == o->cpu_core_id) {
Expand Down
5 changes: 3 additions & 2 deletions arch/x86/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,9 @@ void __init tsc_init(void)
(unsigned long)cpu_khz / 1000,
(unsigned long)cpu_khz % 1000);

/* Sanitize TSC ADJUST before cyc2ns gets initialized */
tsc_store_and_check_tsc_adjust(true);

/*
* Secondary CPUs do not run through tsc_init(), so set up
* all the scale factors for all CPUs, assuming the same
Expand Down Expand Up @@ -1386,8 +1389,6 @@ void __init tsc_init(void)

if (unsynchronized_tsc())
mark_tsc_unstable("TSCs unsynchronized");
else
tsc_store_and_check_tsc_adjust(true);

check_system_tsc_reliable();

Expand Down
16 changes: 7 additions & 9 deletions arch/x86/kernel/tsc_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,6 @@ void check_tsc_sync_source(int cpu)
if (unsynchronized_tsc())
return;

if (tsc_clocksource_reliable) {
if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING)
pr_info(
"Skipped synchronization checks as TSC is reliable.\n");
return;
}

/*
* Set the maximum number of test runs to
* 1 if the CPU does not provide the TSC_ADJUST MSR
Expand Down Expand Up @@ -380,14 +373,19 @@ void check_tsc_sync_target(void)
int cpus = 2;

/* Also aborts if there is no TSC. */
if (unsynchronized_tsc() || tsc_clocksource_reliable)
if (unsynchronized_tsc())
return;

/*
* Store, verify and sanitize the TSC adjust register. If
* successful skip the test.
*
* The test is also skipped when the TSC is marked reliable. This
* is true for SoCs which have no fallback clocksource. On these
* SoCs the TSC is frequency synchronized, but still the TSC ADJUST
* register might have been wreckaged by the BIOS..
*/
if (tsc_store_and_check_tsc_adjust(false)) {
if (tsc_store_and_check_tsc_adjust(false) || tsc_clocksource_reliable) {
atomic_inc(&skip_test);
return;
}
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/mm/dump_pagetables.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/debugfs.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/seq_file.h>

#include <asm/pgtable.h>
Expand Down Expand Up @@ -406,6 +407,7 @@ static void ptdump_walk_pgd_level_core(struct seq_file *m, pgd_t *pgd,
} else
note_page(m, &st, __pgprot(0), 1);

cond_resched();
start++;
}

Expand Down
28 changes: 19 additions & 9 deletions drivers/irqchip/irq-keystone.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/irqchip.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/mfd/syscon.h>
Expand All @@ -39,6 +39,7 @@ struct keystone_irq_device {
struct irq_domain *irqd;
struct regmap *devctrl_regs;
u32 devctrl_offset;
raw_spinlock_t wa_lock;
};

static inline u32 keystone_irq_readl(struct keystone_irq_device *kirq)
Expand Down Expand Up @@ -83,17 +84,15 @@ static void keystone_irq_ack(struct irq_data *d)
/* nothing to do here */
}

static void keystone_irq_handler(struct irq_desc *desc)
static irqreturn_t keystone_irq_handler(int irq, void *keystone_irq)
{
unsigned int irq = irq_desc_get_irq(desc);
struct keystone_irq_device *kirq = irq_desc_get_handler_data(desc);
struct keystone_irq_device *kirq = keystone_irq;
unsigned long wa_lock_flags;
unsigned long pending;
int src, virq;

dev_dbg(kirq->dev, "start irq %d\n", irq);

chained_irq_enter(irq_desc_get_chip(desc), desc);

pending = keystone_irq_readl(kirq);
keystone_irq_writel(kirq, pending);

Expand All @@ -111,13 +110,15 @@ static void keystone_irq_handler(struct irq_desc *desc)
if (!virq)
dev_warn(kirq->dev, "spurious irq detected hwirq %d, virq %d\n",
src, virq);
raw_spin_lock_irqsave(&kirq->wa_lock, wa_lock_flags);
generic_handle_irq(virq);
raw_spin_unlock_irqrestore(&kirq->wa_lock,
wa_lock_flags);
}
}

chained_irq_exit(irq_desc_get_chip(desc), desc);

dev_dbg(kirq->dev, "end irq %d\n", irq);
return IRQ_HANDLED;
}

static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
Expand Down Expand Up @@ -182,9 +183,16 @@ static int keystone_irq_probe(struct platform_device *pdev)
return -ENODEV;
}

raw_spin_lock_init(&kirq->wa_lock);

platform_set_drvdata(pdev, kirq);

irq_set_chained_handler_and_data(kirq->irq, keystone_irq_handler, kirq);
ret = request_irq(kirq->irq, keystone_irq_handler,
0, dev_name(dev), kirq);
if (ret) {
irq_domain_remove(kirq->irqd);
return ret;
}

/* clear all source bits */
keystone_irq_writel(kirq, ~0x0);
Expand All @@ -199,6 +207,8 @@ static int keystone_irq_remove(struct platform_device *pdev)
struct keystone_irq_device *kirq = platform_get_drvdata(pdev);
int hwirq;

free_irq(kirq->irq, kirq);

for (hwirq = 0; hwirq < KEYSTONE_N_IRQ; hwirq++)
irq_dispose_mapping(irq_find_mapping(kirq->irqd, hwirq));

Expand Down
4 changes: 4 additions & 0 deletions drivers/irqchip/irq-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ static struct irq_chip mxs_icoll_chip = {
.irq_ack = icoll_ack_irq,
.irq_mask = icoll_mask_irq,
.irq_unmask = icoll_unmask_irq,
.flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_SKIP_SET_WAKE,
};

static struct irq_chip asm9260_icoll_chip = {
.irq_ack = icoll_ack_irq,
.irq_mask = asm9260_mask_irq,
.irq_unmask = asm9260_unmask_irq,
.flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_SKIP_SET_WAKE,
};

asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
Expand Down
7 changes: 3 additions & 4 deletions drivers/media/cec/cec-adap.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
}
memset(msg->msg + msg->len, 0, sizeof(msg->msg) - msg->len);
if (msg->len == 1) {
if (cec_msg_initiator(msg) != 0xf ||
cec_msg_destination(msg) == 0xf) {
if (cec_msg_destination(msg) == 0xf) {
dprintk(1, "cec_transmit_msg: invalid poll message\n");
return -EINVAL;
}
Expand All @@ -638,7 +637,7 @@ int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
dprintk(1, "cec_transmit_msg: destination is the adapter itself\n");
return -EINVAL;
}
if (cec_msg_initiator(msg) != 0xf &&
if (msg->len > 1 && adap->is_configured &&
!cec_has_log_addr(adap, cec_msg_initiator(msg))) {
dprintk(1, "cec_transmit_msg: initiator has unknown logical address %d\n",
cec_msg_initiator(msg));
Expand Down Expand Up @@ -1072,7 +1071,7 @@ static int cec_config_log_addr(struct cec_adapter *adap,

/* Send poll message */
msg.len = 1;
msg.msg[0] = 0xf0 | log_addr;
msg.msg[0] = (log_addr << 4) | log_addr;
err = cec_transmit_msg_fh(adap, &msg, NULL, true);

/*
Expand Down
Loading

0 comments on commit 3f64116

Please sign in to comment.