Skip to content

Commit

Permalink
Merge pull request #84 from torvalds/master
Browse files Browse the repository at this point in the history
Sync up with Linus
  • Loading branch information
dabrace committed Jul 17, 2015
2 parents 3efe98b + eb25437 commit 157d9a3
Show file tree
Hide file tree
Showing 202 changed files with 2,179 additions and 1,388 deletions.
6 changes: 2 additions & 4 deletions Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -1234,10 +1234,8 @@ Description:
object is near the sensor, usually be observing
reflectivity of infrared or ultrasound emitted.
Often these sensors are unit less and as such conversion
to SI units is not possible. Where it is, the units should
be meters. If such a conversion is not possible, the reported
values should behave in the same way as a distance, i.e. lower
values indicate something is closer to the sensor.
to SI units is not possible. Higher proximity measurements
indicate closer objects, and vice versa.

What: /sys/.../iio:deviceX/in_illuminance_input
What: /sys/.../iio:deviceX/in_illuminance_raw
Expand Down
2 changes: 1 addition & 1 deletion Documentation/DocBook/drm.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3383,7 +3383,7 @@ void intel_crt_init(struct drm_device *dev)
<td valign="top" >TBD</td>
</tr>
<tr>
<td rowspan="2" valign="top" >omap</td>
<td valign="top" >omap</td>
<td valign="top" >Generic</td>
<td valign="top" >“zorder”</td>
<td valign="top" >RANGE</td>
Expand Down
26 changes: 24 additions & 2 deletions Documentation/devicetree/bindings/drm/imx/fsl-imx-drm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ Optional properties:
- edid: verbatim EDID data block describing attached display.
- ddc: phandle describing the i2c bus handling the display data
channel
- port: A port node with endpoint definitions as defined in
- port@[0-1]: Port nodes with endpoint definitions as defined in
Documentation/devicetree/bindings/media/video-interfaces.txt.
Port 0 is the input port connected to the IPU display interface,
port 1 is the output port connected to a panel.

example:

Expand All @@ -75,9 +77,29 @@ display@di0 {
edid = [edid-data];
interface-pix-fmt = "rgb24";

port {
port@0 {
reg = <0>;

display_in: endpoint {
remote-endpoint = <&ipu_di0_disp0>;
};
};

port@1 {
reg = <1>;

display_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};

panel {
...

port {
panel_in: endpoint {
remote-endpoint = <&display_out>;
};
};
};
8 changes: 8 additions & 0 deletions Documentation/kbuild/makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,14 @@ When kbuild executes, the following steps are followed (roughly):
$(KBUILD_ARFLAGS) set by the top level Makefile to "D" (deterministic
mode) if this option is supported by $(AR).

ARCH_CPPFLAGS, ARCH_AFLAGS, ARCH_CFLAGS Overrides the kbuild defaults

These variables are appended to the KBUILD_CPPFLAGS,
KBUILD_AFLAGS, and KBUILD_CFLAGS, respectively, after the
top-level Makefile has set any other flags. This provides a
means for an architecture to override the defaults.


--- 6.2 Add prerequisites to archheaders:

The archheaders: rule is used to generate header files that
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,11 @@ endif
include scripts/Makefile.kasan
include scripts/Makefile.extrawarn

# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
KBUILD_CPPFLAGS += $(KCPPFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)
KBUILD_CFLAGS += $(KCFLAGS)
# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
# last assignments
KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
KBUILD_AFLAGS += $(ARCH_AFLAGS) $(KAFLAGS)
KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS)

# Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ if ISA_ARCOMPACT

config ARC_CPU_750D
bool "ARC750D"
select ARC_CANT_LLSC
help
Support for ARC750 core

Expand Down Expand Up @@ -362,7 +363,7 @@ config ARC_CANT_LLSC
config ARC_HAS_LLSC
bool "Insn: LLOCK/SCOND (efficient atomic ops)"
default y
depends on !ARC_CPU_750D && !ARC_CANT_LLSC
depends on !ARC_CANT_LLSC

config ARC_HAS_SWAPE
bool "Insn: SWAPE (endian-swap)"
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ endif

ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
# Generic build system uses -O2, we want -O3
cflags-y += -O3
# Note: No need to add to cflags-y as that happens anyways
ARCH_CFLAGS += -O3
endif

# small data is default for elf32 tool-chain. If not usable, disable it
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/boot/dts/axc003.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/ {
compatible = "snps,arc";
clock-frequency = <75000000>;
clock-frequency = <90000000>;
#address-cells = <1>;
#size-cells = <1>;

Expand Down
2 changes: 1 addition & 1 deletion arch/arc/boot/dts/axc003_idu.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/ {
compatible = "snps,arc";
clock-frequency = <75000000>;
clock-frequency = <90000000>;
#address-cells = <1>;
#size-cells = <1>;

Expand Down
35 changes: 9 additions & 26 deletions arch/arc/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ static inline void op##_bit(unsigned long nr, volatile unsigned long *m)\
* done for const @nr, but no code is generated due to gcc \
* const prop. \
*/ \
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
nr &= 0x1f; \
\
__asm__ __volatile__( \
"1: llock %0, [%1] \n" \
Expand Down Expand Up @@ -82,8 +81,7 @@ static inline int test_and_##op##_bit(unsigned long nr, volatile unsigned long *
\
m += nr >> 5; \
\
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
nr &= 0x1f; \
\
/* \
* Explicit full memory barrier needed before/after as \
Expand Down Expand Up @@ -129,16 +127,13 @@ static inline void op##_bit(unsigned long nr, volatile unsigned long *m)\
unsigned long temp, flags; \
m += nr >> 5; \
\
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
\
/* \
* spin lock/unlock provide the needed smp_mb() before/after \
*/ \
bitops_lock(flags); \
\
temp = *m; \
*m = temp c_op (1UL << nr); \
*m = temp c_op (1UL << (nr & 0x1f)); \
\
bitops_unlock(flags); \
}
Expand All @@ -149,17 +144,14 @@ static inline int test_and_##op##_bit(unsigned long nr, volatile unsigned long *
unsigned long old, flags; \
m += nr >> 5; \
\
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
\
bitops_lock(flags); \
\
old = *m; \
*m = old c_op (1 << nr); \
*m = old c_op (1UL << (nr & 0x1f)); \
\
bitops_unlock(flags); \
\
return (old & (1 << nr)) != 0; \
return (old & (1UL << (nr & 0x1f))) != 0; \
}

#endif /* CONFIG_ARC_HAS_LLSC */
Expand All @@ -174,11 +166,8 @@ static inline void __##op##_bit(unsigned long nr, volatile unsigned long *m) \
unsigned long temp; \
m += nr >> 5; \
\
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
\
temp = *m; \
*m = temp c_op (1UL << nr); \
*m = temp c_op (1UL << (nr & 0x1f)); \
}

#define __TEST_N_BIT_OP(op, c_op, asm_op) \
Expand All @@ -187,13 +176,10 @@ static inline int __test_and_##op##_bit(unsigned long nr, volatile unsigned long
unsigned long old; \
m += nr >> 5; \
\
if (__builtin_constant_p(nr)) \
nr &= 0x1f; \
\
old = *m; \
*m = old c_op (1 << nr); \
*m = old c_op (1UL << (nr & 0x1f)); \
\
return (old & (1 << nr)) != 0; \
return (old & (1UL << (nr & 0x1f))) != 0; \
}

#define BIT_OPS(op, c_op, asm_op) \
Expand Down Expand Up @@ -224,10 +210,7 @@ test_bit(unsigned int nr, const volatile unsigned long *addr)

addr += nr >> 5;

if (__builtin_constant_p(nr))
nr &= 0x1f;

mask = 1 << nr;
mask = 1UL << (nr & 0x1f);

return ((mask & *addr) != 0);
}
Expand Down
48 changes: 42 additions & 6 deletions arch/arc/include/asm/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,40 @@
#include <linux/uaccess.h>
#include <asm/errno.h>

#ifdef CONFIG_ARC_HAS_LLSC

#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\
\
__asm__ __volatile__( \
"1: llock %1, [%2] \n" \
insn "\n" \
"2: scond %0, [%2] \n" \
" bnz 1b \n" \
" mov %0, 0 \n" \
"3: \n" \
" .section .fixup,\"ax\" \n" \
" .align 4 \n" \
"4: mov %0, %4 \n" \
" b 3b \n" \
" .previous \n" \
" .section __ex_table,\"a\" \n" \
" .align 4 \n" \
" .word 1b, 4b \n" \
" .word 2b, 4b \n" \
" .previous \n" \
\
: "=&r" (ret), "=&r" (oldval) \
: "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \
: "cc", "memory")

#else /* !CONFIG_ARC_HAS_LLSC */

#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)\
\
__asm__ __volatile__( \
"1: ld %1, [%2] \n" \
"1: ld %1, [%2] \n" \
insn "\n" \
"2: st %0, [%2] \n" \
"2: st %0, [%2] \n" \
" mov %0, 0 \n" \
"3: \n" \
" .section .fixup,\"ax\" \n" \
Expand All @@ -39,6 +67,8 @@
: "r" (uaddr), "r" (oparg), "ir" (-EFAULT) \
: "cc", "memory")

#endif

static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr)
{
int op = (encoded_op >> 28) & 7;
Expand Down Expand Up @@ -123,11 +153,17 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval,

pagefault_disable();

/* TBD : can use llock/scond */
__asm__ __volatile__(
"1: ld %0, [%3] \n"
" brne %0, %1, 3f \n"
"2: st %2, [%3] \n"
#ifdef CONFIG_ARC_HAS_LLSC
"1: llock %0, [%3] \n"
" brne %0, %1, 3f \n"
"2: scond %2, [%3] \n"
" bnz 1b \n"
#else
"1: ld %0, [%3] \n"
" brne %0, %1, 3f \n"
"2: st %2, [%3] \n"
#endif
"3: \n"
" .section .fixup,\"ax\" \n"
"4: mov %0, %4 \n"
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct callee_regs {
long r25, r24, r23, r22, r21, r20, r19, r18, r17, r16, r15, r14, r13;
};

#define instruction_pointer(regs) ((regs)->ret)
#define instruction_pointer(regs) (unsigned long)((regs)->ret)
#define profile_pc(regs) instruction_pointer(regs)

/* return 1 if user mode or 0 if kernel mode */
Expand Down
1 change: 0 additions & 1 deletion arch/arc/kernel/intc-arcv2.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/of.h>
#include <linux/irqdomain.h>
#include <linux/irqchip.h>
#include "../../drivers/irqchip/irqchip.h"
#include <asm/irq.h>

/*
Expand Down
1 change: 0 additions & 1 deletion arch/arc/kernel/intc-compact.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/of.h>
#include <linux/irqdomain.h>
#include <linux/irqchip.h>
#include "../../drivers/irqchip/irqchip.h"
#include <asm/irq.h>

/*
Expand Down
23 changes: 19 additions & 4 deletions arch/arc/kernel/mcip.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ void mcip_init_early_smp(void)
#include <linux/irqchip.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include "../../drivers/irqchip/irqchip.h"

/*
* Set the DEST for @cmn_irq to @cpu_mask (1 bit per core)
Expand Down Expand Up @@ -218,11 +217,28 @@ static void idu_irq_unmask(struct irq_data *data)
raw_spin_unlock_irqrestore(&mcip_lock, flags);
}

#ifdef CONFIG_SMP
static int
idu_irq_set_affinity(struct irq_data *d, const struct cpumask *cpumask, bool f)
idu_irq_set_affinity(struct irq_data *data, const struct cpumask *cpumask,
bool force)
{
unsigned long flags;
cpumask_t online;

/* errout if no online cpu per @cpumask */
if (!cpumask_and(&online, cpumask, cpu_online_mask))
return -EINVAL;

raw_spin_lock_irqsave(&mcip_lock, flags);

idu_set_dest(data->hwirq, cpumask_bits(&online)[0]);
idu_set_mode(data->hwirq, IDU_M_TRIG_LEVEL, IDU_M_DISTRI_RR);

raw_spin_unlock_irqrestore(&mcip_lock, flags);

return IRQ_SET_MASK_OK;
}
#endif

static struct irq_chip idu_irq_chip = {
.name = "MCIP IDU Intc",
Expand Down Expand Up @@ -330,8 +346,7 @@ idu_of_init(struct device_node *intc, struct device_node *parent)
if (!i)
idu_first_irq = irq;

irq_set_handler_data(irq, domain);
irq_set_chained_handler(irq, idu_cascade_isr);
irq_set_chained_handler_and_data(irq, idu_cascade_isr, domain);
}

__mcip_cmd(CMD_IDU_ENABLE, 0);
Expand Down
Loading

0 comments on commit 157d9a3

Please sign in to comment.