Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310684
b: refs/heads/master
c: c02feee
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 13, 2012
1 parent dd180c9 commit 1457dd1
Show file tree
Hide file tree
Showing 29 changed files with 116 additions and 131 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9473c4c16700ec965904f23234fd0f8677ce6231
refs/heads/master: c02feeea3dadf7e312f31d832c5d1799bd3bf7e1
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ static struct platform_device *create_simple_dss_pdev(const char *pdev_name,
goto err;
}

r = omap_device_register(pdev);
r = platform_device_add(pdev);
if (r) {
pr_err("Could not register omap_device for %s\n", pdev_name);
pr_err("Could not register platform_device for %s\n", pdev_name);
goto err;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ config M68K
select GENERIC_IRQ_SHOW
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
select GENERIC_CPU_DEVICES
select GENERIC_STRNCPY_FROM_USER if MMU
select GENERIC_STRNLEN_USER if MMU
select FPU if MMU
select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include include/asm-generic/Kbuild.asm
header-y += cachectl.h

generic-y += word-at-a-time.h
2 changes: 1 addition & 1 deletion trunk/arch/m68k/include/asm/m528xsim.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
/*
* QSPI module.
*/
#define MCFQSPI_IOBASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_BASE (MCF_IPSBAR + 0x340)
#define MCFQSPI_SIZE 0x40

#define MCFQSPI_CS0 147
Expand Down
11 changes: 7 additions & 4 deletions trunk/arch/m68k/include/asm/uaccess_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,15 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
#define copy_from_user(to, from, n) __copy_from_user(to, from, n)
#define copy_to_user(to, from, n) __copy_to_user(to, from, n)

long strncpy_from_user(char *dst, const char __user *src, long count);
long strnlen_user(const char __user *src, long n);
#define user_addr_max() \
(segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL)

extern long strncpy_from_user(char *dst, const char __user *src, long count);
extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);

unsigned long __clear_user(void __user *to, unsigned long n);

#define clear_user __clear_user

#define strlen_user(str) strnlen_user(str, 32767)

#endif /* _M68K_UACCESS_H */
2 changes: 1 addition & 1 deletion trunk/arch/m68k/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ asmlinkage void syscall_trace(void)
}
}

#ifdef CONFIG_COLDFIRE
#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
asmlinkage int syscall_trace_enter(void)
{
int ret = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/m68k/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void __init time_init(void)
mach_sched_init(timer_interrupt);
}

#ifdef CONFIG_M68KCLASSIC
#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET

u32 arch_gettimeoffset(void)
{
Expand All @@ -108,4 +108,4 @@ static int __init rtc_init(void)

module_init(rtc_init);

#endif /* CONFIG_M68KCLASSIC */
#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
74 changes: 0 additions & 74 deletions trunk/arch/m68k/lib/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,80 +103,6 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,
}
EXPORT_SYMBOL(__generic_copy_to_user);

/*
* Copy a null terminated string from userspace.
*/
long strncpy_from_user(char *dst, const char __user *src, long count)
{
long res;
char c;

if (count <= 0)
return count;

asm volatile ("\n"
"1: "MOVES".b (%2)+,%4\n"
" move.b %4,(%1)+\n"
" jeq 2f\n"
" subq.l #1,%3\n"
" jne 1b\n"
"2: sub.l %3,%0\n"
"3:\n"
" .section .fixup,\"ax\"\n"
" .even\n"
"10: move.l %5,%0\n"
" jra 3b\n"
" .previous\n"
"\n"
" .section __ex_table,\"a\"\n"
" .align 4\n"
" .long 1b,10b\n"
" .previous"
: "=d" (res), "+a" (dst), "+a" (src), "+r" (count), "=&d" (c)
: "i" (-EFAULT), "0" (count));

return res;
}
EXPORT_SYMBOL(strncpy_from_user);

/*
* Return the size of a string (including the ending 0)
*
* Return 0 on exception, a value greater than N if too long
*/
long strnlen_user(const char __user *src, long n)
{
char c;
long res;

asm volatile ("\n"
"1: subq.l #1,%1\n"
" jmi 3f\n"
"2: "MOVES".b (%0)+,%2\n"
" tst.b %2\n"
" jne 1b\n"
" jra 4f\n"
"\n"
"3: addq.l #1,%0\n"
"4: sub.l %4,%0\n"
"5:\n"
" .section .fixup,\"ax\"\n"
" .even\n"
"20: sub.l %0,%0\n"
" jra 5b\n"
" .previous\n"
"\n"
" .section __ex_table,\"a\"\n"
" .align 4\n"
" .long 2b,20b\n"
" .previous\n"
: "=&a" (res), "+d" (n), "=&d" (c)
: "0" (src), "r" (src));

return res;
}
EXPORT_SYMBOL(strnlen_user);

/*
* Zero Userspace
*/
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/m68k/platform/68328/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#endif

static u32 m68328_tick_cnt;
static irq_handler_t timer_interrupt;

/***************************************************************************/

Expand All @@ -62,7 +63,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
TSTAT &= 0;

m68328_tick_cnt += TICKS_PER_JIFFY;
return arch_timer_interrupt(irq, dummy);
return timer_interrupt(irq, dummy);
}

/***************************************************************************/
Expand Down Expand Up @@ -99,7 +100,7 @@ static struct clocksource m68328_clk = {

/***************************************************************************/

void hw_timer_init(void)
void hw_timer_init(irq_handler_t handler)
{
/* disable timer 1 */
TCTL = 0;
Expand All @@ -115,6 +116,7 @@ void hw_timer_init(void)
/* Enable timer 1 */
TCTL |= TCTL_TEN;
clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ);
timer_interrupt = handler;
}

/***************************************************************************/
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/m68k/platform/68360/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern void m360_cpm_reset(void);
#define OSCILLATOR (unsigned long int)33000000
#endif

static irq_handler_t timer_interrupt;
unsigned long int system_clock;

extern QUICC *pquicc;
Expand All @@ -52,7 +53,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)

pquicc->timer_ter1 = 0x0002; /* clear timer event */

return arch_timer_interrupt(irq, dummy);
return timer_interrupt(irq, dummy);
}

static struct irqaction m68360_timer_irq = {
Expand All @@ -61,7 +62,7 @@ static struct irqaction m68360_timer_irq = {
.handler = hw_tick,
};

void hw_timer_init(void)
void hw_timer_init(irq_handler_t handler)
{
unsigned char prescaler;
unsigned short tgcr_save;
Expand Down Expand Up @@ -94,6 +95,8 @@ void hw_timer_init(void)

pquicc->timer_ter1 = 0x0003; /* clear timer events */

timer_interrupt = handler;

/* enable timer 1 interrupt in CIMR */
setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);

Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/x86/crypto/aesni-intel_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -2460,10 +2460,12 @@ ENTRY(aesni_cbc_dec)
pxor IN3, STATE4
movaps IN4, IV
#else
pxor (INP), STATE2
pxor 0x10(INP), STATE3
pxor IN1, STATE4
movaps IN2, IV
movups (INP), IN1
pxor IN1, STATE2
movups 0x10(INP), IN2
pxor IN2, STATE3
#endif
movups STATE1, (OUTP)
movups STATE2, 0x10(OUTP)
Expand Down
10 changes: 6 additions & 4 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ struct regmap *regmap_init(struct device *dev,
map->lock = regmap_lock_mutex;
map->unlock = regmap_unlock_mutex;
}
map->format.buf_size = (config->reg_bits + config->val_bits) / 8;
map->format.reg_bytes = DIV_ROUND_UP(config->reg_bits, 8);
map->format.pad_bytes = config->pad_bits / 8;
map->format.val_bytes = DIV_ROUND_UP(config->val_bits, 8);
map->format.buf_size += map->format.pad_bytes;
map->format.buf_size = DIV_ROUND_UP(config->reg_bits +
config->val_bits + config->pad_bits, 8);
map->reg_shift = config->pad_bits % 8;
if (config->reg_stride)
map->reg_stride = config->reg_stride;
Expand Down Expand Up @@ -368,7 +368,7 @@ struct regmap *regmap_init(struct device *dev,

ret = regcache_init(map, config);
if (ret < 0)
goto err_free_workbuf;
goto err_debugfs;

/* Add a devres resource for dev_get_regmap() */
m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL);
Expand All @@ -383,7 +383,8 @@ struct regmap *regmap_init(struct device *dev,

err_cache:
regcache_exit(map);
err_free_workbuf:
err_debugfs:
regmap_debugfs_exit(map);
kfree(map->work_buf);
err_map:
kfree(map);
Expand Down Expand Up @@ -471,6 +472,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)

return ret;
}
EXPORT_SYMBOL_GPL(regmap_reinit_cache);

/**
* regmap_exit(): Free a previously allocated register map
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/char/hw_random/atmel-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
/* data ready? */
if (readl(trng->base + TRNG_ODATA) & 1) {
*data = readl(trng->base + TRNG_ODATA);
/*
ensure data ready is only set again AFTER the next data
word is ready in case it got set between checking ISR
and reading ODATA, so we don't risk re-reading the
same word
*/
readl(trng->base + TRNG_ISR);
return 4;
} else
return 0;
Expand Down
Loading

0 comments on commit 1457dd1

Please sign in to comment.