Skip to content

Commit

Permalink
Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/lethal/sh-2.6

* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Change __nosave_XXX symbols to long
  sh: Flush executable pages in copy_user_highpage
  sh: Ensure ST40-300 BogoMIPS value is consistent
  sh: sh7750: Fix incompatible pointer type
  sh: sh7750: move machtypes.h to include/generated
  • Loading branch information
Linus Torvalds committed Mar 5, 2011
2 parents be91bfe + d60cf53 commit f0678f3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/sh/include/asm/sections.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <asm-generic/sections.h>

extern void __nosave_begin, __nosave_end;
extern long __nosave_begin, __nosave_end;
extern long __machvec_start, __machvec_end;
extern char __uncached_start, __uncached_end;
extern char _ebss[];
Expand Down
13 changes: 9 additions & 4 deletions arch/sh/kernel/cpu/sh4/setup-sh7750.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/io.h>
#include <linux/sh_timer.h>
#include <linux/serial_sci.h>
#include <asm/machtypes.h>
#include <generated/machtypes.h>

static struct resource rtc_resources[] = {
[0] = {
Expand Down Expand Up @@ -255,12 +255,17 @@ static struct platform_device *sh7750_early_devices[] __initdata = {

void __init plat_early_device_setup(void)
{
struct platform_device *dev[1];

if (mach_is_rts7751r2d()) {
scif_platform_data.scscr |= SCSCR_CKE1;
early_platform_add_devices(&scif_device, 1);
dev[0] = &scif_device;
early_platform_add_devices(dev, 1);
} else {
early_platform_add_devices(&sci_device, 1);
early_platform_add_devices(&scif_device, 1);
dev[0] = &sci_device;
early_platform_add_devices(dev, 1);
dev[0] = &scif_device;
early_platform_add_devices(dev, 1);
}

early_platform_add_devices(sh7750_early_devices,
Expand Down
10 changes: 10 additions & 0 deletions arch/sh/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
void __delay(unsigned long loops)
{
__asm__ __volatile__(
/*
* ST40-300 appears to have an issue with this code,
* normally taking two cycles each loop, as with all
* other SH variants. If however the branch and the
* delay slot straddle an 8 byte boundary, this increases
* to 3 cycles.
* This align directive ensures this doesn't occur.
*/
".balign 8\n\t"

"tst %0, %0\n\t"
"1:\t"
"bf/s 1b\n\t"
Expand Down
3 changes: 2 additions & 1 deletion arch/sh/mm/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ void copy_user_highpage(struct page *to, struct page *from,
kunmap_atomic(vfrom, KM_USER0);
}

if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK))
if (pages_do_alias((unsigned long)vto, vaddr & PAGE_MASK) ||
(vma->vm_flags & VM_EXEC))
__flush_purge_region(vto, PAGE_SIZE);

kunmap_atomic(vto, KM_USER1);
Expand Down

0 comments on commit f0678f3

Please sign in to comment.