diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-07-11 08:15:48 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-07-11 08:15:55 -0400 |
commit | b7e9c223be8ce335e30f2cf6ba588e6a4092275c (patch) | |
tree | 2d1e3b75606abc18df7ad65e51ac3f90cd68b38d /arch/sh | |
parent | c172d82500a6cf3c32d1e650722a1055d72ce858 (diff) | |
parent | e3bbfa78bab125f58b831b5f7f45b5a305091d72 (diff) |
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 5 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 48 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 22 | ||||
-rw-r--r-- | arch/sh/configs/sh7757lcr_defconfig | 8 | ||||
-rw-r--r-- | arch/sh/configs/titan_defconfig | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/cmpxchg-grb.h | 21 | ||||
-rw-r--r-- | arch/sh/include/asm/mmzone.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/processor_64.h | 1 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh4/cpu/sh7724.h | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 40 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 106 | ||||
-rw-r--r-- | arch/sh/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/process_32.c | 2 | ||||
-rw-r--r-- | arch/sh/mm/alignment.c | 9 | ||||
-rw-r--r-- | arch/sh/mm/cache-debugfs.c | 25 |
15 files changed, 227 insertions, 80 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index f03338c2f088..bbdeb48bbf8e 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -348,6 +348,7 @@ config CPU_SUBTYPE_SH7720 | |||
348 | select SYS_SUPPORTS_CMT | 348 | select SYS_SUPPORTS_CMT |
349 | select ARCH_WANT_OPTIONAL_GPIOLIB | 349 | select ARCH_WANT_OPTIONAL_GPIOLIB |
350 | select USB_ARCH_HAS_OHCI | 350 | select USB_ARCH_HAS_OHCI |
351 | select USB_OHCI_SH if USB_OHCI_HCD | ||
351 | help | 352 | help |
352 | Select SH7720 if you have a SH3-DSP SH7720 CPU. | 353 | Select SH7720 if you have a SH3-DSP SH7720 CPU. |
353 | 354 | ||
@@ -357,6 +358,7 @@ config CPU_SUBTYPE_SH7721 | |||
357 | select CPU_HAS_DSP | 358 | select CPU_HAS_DSP |
358 | select SYS_SUPPORTS_CMT | 359 | select SYS_SUPPORTS_CMT |
359 | select USB_ARCH_HAS_OHCI | 360 | select USB_ARCH_HAS_OHCI |
361 | select USB_OHCI_SH if USB_OHCI_HCD | ||
360 | help | 362 | help |
361 | Select SH7721 if you have a SH3-DSP SH7721 CPU. | 363 | Select SH7721 if you have a SH3-DSP SH7721 CPU. |
362 | 364 | ||
@@ -440,6 +442,7 @@ config CPU_SUBTYPE_SH7763 | |||
440 | bool "Support SH7763 processor" | 442 | bool "Support SH7763 processor" |
441 | select CPU_SH4A | 443 | select CPU_SH4A |
442 | select USB_ARCH_HAS_OHCI | 444 | select USB_ARCH_HAS_OHCI |
445 | select USB_OHCI_SH if USB_OHCI_HCD | ||
443 | help | 446 | help |
444 | Select SH7763 if you have a SH4A SH7763(R5S77631) CPU. | 447 | Select SH7763 if you have a SH4A SH7763(R5S77631) CPU. |
445 | 448 | ||
@@ -467,7 +470,9 @@ config CPU_SUBTYPE_SH7786 | |||
467 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 470 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
468 | select ARCH_WANT_OPTIONAL_GPIOLIB | 471 | select ARCH_WANT_OPTIONAL_GPIOLIB |
469 | select USB_ARCH_HAS_OHCI | 472 | select USB_ARCH_HAS_OHCI |
473 | select USB_OHCI_SH if USB_OHCI_HCD | ||
470 | select USB_ARCH_HAS_EHCI | 474 | select USB_ARCH_HAS_EHCI |
475 | select USB_EHCI_SH if USB_EHCI_HCD | ||
471 | 476 | ||
472 | config CPU_SUBTYPE_SHX3 | 477 | config CPU_SUBTYPE_SHX3 |
473 | bool "Support SH-X3 processor" | 478 | bool "Support SH-X3 processor" |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index f80478f36d56..b24d69d509e7 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/usb/r8a66597.h> | 22 | #include <linux/usb/r8a66597.h> |
23 | #include <linux/usb/renesas_usbhs.h> | ||
23 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
24 | #include <linux/i2c/tsc2007.h> | 25 | #include <linux/i2c/tsc2007.h> |
25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = { | |||
232 | .resource = usb1_common_resources, | 233 | .resource = usb1_common_resources, |
233 | }; | 234 | }; |
234 | 235 | ||
236 | /* | ||
237 | * USBHS | ||
238 | */ | ||
239 | static int usbhs_get_id(struct platform_device *pdev) | ||
240 | { | ||
241 | return gpio_get_value(GPIO_PTB3); | ||
242 | } | ||
243 | |||
244 | static struct renesas_usbhs_platform_info usbhs_info = { | ||
245 | .platform_callback = { | ||
246 | .get_id = usbhs_get_id, | ||
247 | }, | ||
248 | .driver_param = { | ||
249 | .buswait_bwait = 4, | ||
250 | .detection_delay = 5, | ||
251 | }, | ||
252 | }; | ||
253 | |||
254 | static struct resource usbhs_resources[] = { | ||
255 | [0] = { | ||
256 | .start = 0xa4d90000, | ||
257 | .end = 0xa4d90124 - 1, | ||
258 | .flags = IORESOURCE_MEM, | ||
259 | }, | ||
260 | [1] = { | ||
261 | .start = 66, | ||
262 | .end = 66, | ||
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device usbhs_device = { | ||
268 | .name = "renesas_usbhs", | ||
269 | .id = 1, | ||
270 | .dev = { | ||
271 | .dma_mask = NULL, /* not use dma */ | ||
272 | .coherent_dma_mask = 0xffffffff, | ||
273 | .platform_data = &usbhs_info, | ||
274 | }, | ||
275 | .num_resources = ARRAY_SIZE(usbhs_resources), | ||
276 | .resource = usbhs_resources, | ||
277 | .archdata = { | ||
278 | .hwblk_id = HWBLK_USB1, | ||
279 | }, | ||
280 | }; | ||
281 | |||
235 | /* LCDC */ | 282 | /* LCDC */ |
236 | static const struct fb_videomode ecovec_lcd_modes[] = { | 283 | static const struct fb_videomode ecovec_lcd_modes[] = { |
237 | { | 284 | { |
@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
897 | &sh_eth_device, | 944 | &sh_eth_device, |
898 | &usb0_host_device, | 945 | &usb0_host_device, |
899 | &usb1_common_device, | 946 | &usb1_common_device, |
947 | &usbhs_device, | ||
900 | &lcdc_device, | 948 | &lcdc_device, |
901 | &ceu0_device, | 949 | &ceu0_device, |
902 | &ceu1_device, | 950 | &ceu1_device, |
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 780e083e4d17..23bc849d9c64 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -27,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
27 | $(CONFIG_BOOT_LINK_OFFSET)]') | 27 | $(CONFIG_BOOT_LINK_OFFSET)]') |
28 | endif | 28 | endif |
29 | 29 | ||
30 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
31 | |||
32 | ifeq ($(CONFIG_MCOUNT),y) | 30 | ifeq ($(CONFIG_MCOUNT),y) |
33 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 31 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
34 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 32 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
@@ -37,7 +35,25 @@ endif | |||
37 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ | 35 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
38 | -T $(obj)/../../kernel/vmlinux.lds | 36 | -T $(obj)/../../kernel/vmlinux.lds |
39 | 37 | ||
40 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | 38 | # |
39 | # Pull in the necessary libgcc bits from the in-kernel implementation. | ||
40 | # | ||
41 | lib1funcs-$(CONFIG_SUPERH32) := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \ | ||
42 | lshrsi3.S | ||
43 | lib1funcs-obj := \ | ||
44 | $(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y)))) | ||
45 | |||
46 | lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib | ||
47 | ifeq ($(BITS),64) | ||
48 | lib1funcs-dir := $(addsuffix $(BITS), $(lib1funcs-dir)) | ||
49 | endif | ||
50 | |||
51 | KBUILD_CFLAGS += -I$(lib1funcs-dir) | ||
52 | |||
53 | $(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE | ||
54 | $(call cmd,shipped) | ||
55 | |||
56 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE | ||
41 | $(call if_changed,ld) | 57 | $(call if_changed,ld) |
42 | @: | 58 | @: |
43 | 59 | ||
diff --git a/arch/sh/configs/sh7757lcr_defconfig b/arch/sh/configs/sh7757lcr_defconfig index 33ddb130a7c8..cfde98ddb29d 100644 --- a/arch/sh/configs/sh7757lcr_defconfig +++ b/arch/sh/configs/sh7757lcr_defconfig | |||
@@ -9,7 +9,6 @@ CONFIG_TASK_XACCT=y | |||
9 | CONFIG_TASK_IO_ACCOUNTING=y | 9 | CONFIG_TASK_IO_ACCOUNTING=y |
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
13 | # CONFIG_SYSCTL_SYSCALL is not set | 12 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | CONFIG_KALLSYMS_ALL=y | 13 | CONFIG_KALLSYMS_ALL=y |
15 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
@@ -39,8 +38,6 @@ CONFIG_IPV6=y | |||
39 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 38 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
40 | # CONFIG_FW_LOADER is not set | 39 | # CONFIG_FW_LOADER is not set |
41 | CONFIG_MTD=y | 40 | CONFIG_MTD=y |
42 | CONFIG_MTD_CONCAT=y | ||
43 | CONFIG_MTD_PARTITIONS=y | ||
44 | CONFIG_MTD_CHAR=y | 41 | CONFIG_MTD_CHAR=y |
45 | CONFIG_MTD_BLOCK=y | 42 | CONFIG_MTD_BLOCK=y |
46 | CONFIG_MTD_M25P80=y | 43 | CONFIG_MTD_M25P80=y |
@@ -56,18 +53,19 @@ CONFIG_SH_ETH=y | |||
56 | # CONFIG_KEYBOARD_ATKBD is not set | 53 | # CONFIG_KEYBOARD_ATKBD is not set |
57 | # CONFIG_MOUSE_PS2 is not set | 54 | # CONFIG_MOUSE_PS2 is not set |
58 | # CONFIG_SERIO is not set | 55 | # CONFIG_SERIO is not set |
56 | # CONFIG_LEGACY_PTYS is not set | ||
59 | CONFIG_SERIAL_SH_SCI=y | 57 | CONFIG_SERIAL_SH_SCI=y |
60 | CONFIG_SERIAL_SH_SCI_NR_UARTS=3 | 58 | CONFIG_SERIAL_SH_SCI_NR_UARTS=3 |
61 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 59 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
62 | # CONFIG_LEGACY_PTYS is not set | ||
63 | # CONFIG_HW_RANDOM is not set | 60 | # CONFIG_HW_RANDOM is not set |
64 | CONFIG_SPI=y | 61 | CONFIG_SPI=y |
65 | CONFIG_SPI_SH=y | 62 | CONFIG_SPI_SH=y |
66 | # CONFIG_HWMON is not set | 63 | # CONFIG_HWMON is not set |
67 | CONFIG_MFD_SH_MOBILE_SDHI=y | ||
68 | CONFIG_USB=y | 64 | CONFIG_USB=y |
69 | CONFIG_USB_EHCI_HCD=y | 65 | CONFIG_USB_EHCI_HCD=y |
66 | CONFIG_USB_EHCI_SH=y | ||
70 | CONFIG_USB_OHCI_HCD=y | 67 | CONFIG_USB_OHCI_HCD=y |
68 | CONFIG_USB_OHCI_SH=y | ||
71 | CONFIG_USB_STORAGE=y | 69 | CONFIG_USB_STORAGE=y |
72 | CONFIG_MMC=y | 70 | CONFIG_MMC=y |
73 | CONFIG_MMC_SDHI=y | 71 | CONFIG_MMC_SDHI=y |
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig index 0f558914e760..e2cbd92d520b 100644 --- a/arch/sh/configs/titan_defconfig +++ b/arch/sh/configs/titan_defconfig | |||
@@ -227,7 +227,7 @@ CONFIG_USB_SERIAL=m | |||
227 | CONFIG_USB_SERIAL_GENERIC=y | 227 | CONFIG_USB_SERIAL_GENERIC=y |
228 | CONFIG_USB_SERIAL_ARK3116=m | 228 | CONFIG_USB_SERIAL_ARK3116=m |
229 | CONFIG_USB_SERIAL_PL2303=m | 229 | CONFIG_USB_SERIAL_PL2303=m |
230 | CONFIG_RTC_CLASS=m | 230 | CONFIG_RTC_CLASS=y |
231 | CONFIG_RTC_DRV_SH=m | 231 | CONFIG_RTC_DRV_SH=m |
232 | CONFIG_EXT2_FS=y | 232 | CONFIG_EXT2_FS=y |
233 | CONFIG_EXT3_FS=y | 233 | CONFIG_EXT3_FS=y |
diff --git a/arch/sh/include/asm/cmpxchg-grb.h b/arch/sh/include/asm/cmpxchg-grb.h index 4676bf57693a..f848dec9e483 100644 --- a/arch/sh/include/asm/cmpxchg-grb.h +++ b/arch/sh/include/asm/cmpxchg-grb.h | |||
@@ -15,8 +15,9 @@ static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val) | |||
15 | " mov.l %2, @%1 \n\t" /* store new value */ | 15 | " mov.l %2, @%1 \n\t" /* store new value */ |
16 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 16 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
17 | : "=&r" (retval), | 17 | : "=&r" (retval), |
18 | "+r" (m) | 18 | "+r" (m), |
19 | : "r" (val) | 19 | "+r" (val) /* inhibit r15 overloading */ |
20 | : | ||
20 | : "memory", "r0", "r1"); | 21 | : "memory", "r0", "r1"); |
21 | 22 | ||
22 | return retval; | 23 | return retval; |
@@ -36,8 +37,9 @@ static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val) | |||
36 | " mov.b %2, @%1 \n\t" /* store new value */ | 37 | " mov.b %2, @%1 \n\t" /* store new value */ |
37 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 38 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
38 | : "=&r" (retval), | 39 | : "=&r" (retval), |
39 | "+r" (m) | 40 | "+r" (m), |
40 | : "r" (val) | 41 | "+r" (val) /* inhibit r15 overloading */ |
42 | : | ||
41 | : "memory" , "r0", "r1"); | 43 | : "memory" , "r0", "r1"); |
42 | 44 | ||
43 | return retval; | 45 | return retval; |
@@ -54,13 +56,14 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, | |||
54 | " nop \n\t" | 56 | " nop \n\t" |
55 | " mov r15, r1 \n\t" /* r1 = saved sp */ | 57 | " mov r15, r1 \n\t" /* r1 = saved sp */ |
56 | " mov #-8, r15 \n\t" /* LOGIN */ | 58 | " mov #-8, r15 \n\t" /* LOGIN */ |
57 | " mov.l @%1, %0 \n\t" /* load old value */ | 59 | " mov.l @%3, %0 \n\t" /* load old value */ |
58 | " cmp/eq %0, %2 \n\t" | 60 | " cmp/eq %0, %1 \n\t" |
59 | " bf 1f \n\t" /* if not equal */ | 61 | " bf 1f \n\t" /* if not equal */ |
60 | " mov.l %3, @%1 \n\t" /* store new value */ | 62 | " mov.l %2, @%3 \n\t" /* store new value */ |
61 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 63 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
62 | : "=&r" (retval) | 64 | : "=&r" (retval), |
63 | : "r" (m), "r" (old), "r" (new) | 65 | "+r" (old), "+r" (new) /* old or new can be r15 */ |
66 | : "r" (m) | ||
64 | : "memory" , "r0", "r1", "t"); | 67 | : "memory" , "r0", "r1", "t"); |
65 | 68 | ||
66 | return retval; | 69 | return retval; |
diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h index 8887baff5eff..15a8496960e6 100644 --- a/arch/sh/include/asm/mmzone.h +++ b/arch/sh/include/asm/mmzone.h | |||
@@ -9,10 +9,6 @@ | |||
9 | extern struct pglist_data *node_data[]; | 9 | extern struct pglist_data *node_data[]; |
10 | #define NODE_DATA(nid) (node_data[nid]) | 10 | #define NODE_DATA(nid) (node_data[nid]) |
11 | 11 | ||
12 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
13 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ | ||
14 | NODE_DATA(nid)->node_spanned_pages) | ||
15 | |||
16 | static inline int pfn_to_nid(unsigned long pfn) | 12 | static inline int pfn_to_nid(unsigned long pfn) |
17 | { | 13 | { |
18 | int nid; | 14 | int nid; |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 2a541ddb5a1b..e25c4c7d6b63 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
@@ -150,7 +150,6 @@ struct thread_struct { | |||
150 | #define SR_USER (SR_MMU | SR_FD) | 150 | #define SR_USER (SR_MMU | SR_FD) |
151 | 151 | ||
152 | #define start_thread(_regs, new_pc, new_sp) \ | 152 | #define start_thread(_regs, new_pc, new_sp) \ |
153 | set_fs(USER_DS); \ | ||
154 | _regs->sr = SR_USER; /* User mode. */ \ | 153 | _regs->sr = SR_USER; /* User mode. */ \ |
155 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ | 154 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ |
156 | _regs->pc |= 1; /* Set SHmedia ! */ \ | 155 | _regs->pc |= 1; /* Set SHmedia ! */ \ |
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h index 3daef8ecbc63..cbc47e6bcab5 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h | |||
@@ -298,6 +298,14 @@ enum { | |||
298 | SHDMA_SLAVE_SCIF4_RX, | 298 | SHDMA_SLAVE_SCIF4_RX, |
299 | SHDMA_SLAVE_SCIF5_TX, | 299 | SHDMA_SLAVE_SCIF5_TX, |
300 | SHDMA_SLAVE_SCIF5_RX, | 300 | SHDMA_SLAVE_SCIF5_RX, |
301 | SHDMA_SLAVE_USB0D0_TX, | ||
302 | SHDMA_SLAVE_USB0D0_RX, | ||
303 | SHDMA_SLAVE_USB0D1_TX, | ||
304 | SHDMA_SLAVE_USB0D1_RX, | ||
305 | SHDMA_SLAVE_USB1D0_TX, | ||
306 | SHDMA_SLAVE_USB1D0_RX, | ||
307 | SHDMA_SLAVE_USB1D1_TX, | ||
308 | SHDMA_SLAVE_USB1D1_RX, | ||
301 | SHDMA_SLAVE_SDHI0_TX, | 309 | SHDMA_SLAVE_SDHI0_TX, |
302 | SHDMA_SLAVE_SDHI0_RX, | 310 | SHDMA_SLAVE_SDHI0_RX, |
303 | SHDMA_SLAVE_SDHI1_TX, | 311 | SHDMA_SLAVE_SDHI1_TX, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 0333fe9e3881..134a397b1918 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -93,6 +93,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = { | |||
93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
94 | .mid_rid = 0x36, | 94 | .mid_rid = 0x36, |
95 | }, { | 95 | }, { |
96 | .slave_id = SHDMA_SLAVE_USB0D0_TX, | ||
97 | .addr = 0xA4D80100, | ||
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
99 | .mid_rid = 0x73, | ||
100 | }, { | ||
101 | .slave_id = SHDMA_SLAVE_USB0D0_RX, | ||
102 | .addr = 0xA4D80100, | ||
103 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
104 | .mid_rid = 0x73, | ||
105 | }, { | ||
106 | .slave_id = SHDMA_SLAVE_USB0D1_TX, | ||
107 | .addr = 0xA4D80120, | ||
108 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
109 | .mid_rid = 0x77, | ||
110 | }, { | ||
111 | .slave_id = SHDMA_SLAVE_USB0D1_RX, | ||
112 | .addr = 0xA4D80120, | ||
113 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
114 | .mid_rid = 0x77, | ||
115 | }, { | ||
116 | .slave_id = SHDMA_SLAVE_USB1D0_TX, | ||
117 | .addr = 0xA4D90100, | ||
118 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
119 | .mid_rid = 0xab, | ||
120 | }, { | ||
121 | .slave_id = SHDMA_SLAVE_USB1D0_RX, | ||
122 | .addr = 0xA4D90100, | ||
123 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
124 | .mid_rid = 0xab, | ||
125 | }, { | ||
126 | .slave_id = SHDMA_SLAVE_USB1D1_TX, | ||
127 | .addr = 0xA4D90120, | ||
128 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
129 | .mid_rid = 0xaf, | ||
130 | }, { | ||
131 | .slave_id = SHDMA_SLAVE_USB1D1_RX, | ||
132 | .addr = 0xA4D90120, | ||
133 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
134 | .mid_rid = 0xaf, | ||
135 | }, { | ||
96 | .slave_id = SHDMA_SLAVE_SDHI0_TX, | 136 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
97 | .addr = 0x04ce0030, | 137 | .addr = 0x04ce0030, |
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), | 138 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 423dabf542d3..e915deafac89 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -183,7 +183,7 @@ static const struct sh_dmae_slave_config sh7757_dmae1_slaves[] = { | |||
183 | { | 183 | { |
184 | .slave_id = SHDMA_SLAVE_SCIF2_RX, | 184 | .slave_id = SHDMA_SLAVE_SCIF2_RX, |
185 | .addr = 0x1f4b0014, | 185 | .addr = 0x1f4b0014, |
186 | .chcr = SM_INC | 0x800 | 0x40000000 | | 186 | .chcr = DM_INC | 0x800 | 0x40000000 | |
187 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 187 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
188 | .mid_rid = 0x22, | 188 | .mid_rid = 0x22, |
189 | }, | 189 | }, |
@@ -197,7 +197,7 @@ static const struct sh_dmae_slave_config sh7757_dmae1_slaves[] = { | |||
197 | { | 197 | { |
198 | .slave_id = SHDMA_SLAVE_SCIF3_RX, | 198 | .slave_id = SHDMA_SLAVE_SCIF3_RX, |
199 | .addr = 0x1f4c0014, | 199 | .addr = 0x1f4c0014, |
200 | .chcr = SM_INC | 0x800 | 0x40000000 | | 200 | .chcr = DM_INC | 0x800 | 0x40000000 | |
201 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 201 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
202 | .mid_rid = 0x2a, | 202 | .mid_rid = 0x2a, |
203 | }, | 203 | }, |
@@ -211,7 +211,7 @@ static const struct sh_dmae_slave_config sh7757_dmae1_slaves[] = { | |||
211 | { | 211 | { |
212 | .slave_id = SHDMA_SLAVE_SCIF4_RX, | 212 | .slave_id = SHDMA_SLAVE_SCIF4_RX, |
213 | .addr = 0x1f4d0014, | 213 | .addr = 0x1f4d0014, |
214 | .chcr = SM_INC | 0x800 | 0x40000000 | | 214 | .chcr = DM_INC | 0x800 | 0x40000000 | |
215 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 215 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
216 | .mid_rid = 0x42, | 216 | .mid_rid = 0x42, |
217 | }, | 217 | }, |
@@ -228,7 +228,7 @@ static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { | |||
228 | { | 228 | { |
229 | .slave_id = SHDMA_SLAVE_RIIC0_RX, | 229 | .slave_id = SHDMA_SLAVE_RIIC0_RX, |
230 | .addr = 0x1e500013, | 230 | .addr = 0x1e500013, |
231 | .chcr = SM_INC | 0x800 | 0x40000000 | | 231 | .chcr = DM_INC | 0x800 | 0x40000000 | |
232 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 232 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
233 | .mid_rid = 0x22, | 233 | .mid_rid = 0x22, |
234 | }, | 234 | }, |
@@ -242,7 +242,7 @@ static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { | |||
242 | { | 242 | { |
243 | .slave_id = SHDMA_SLAVE_RIIC1_RX, | 243 | .slave_id = SHDMA_SLAVE_RIIC1_RX, |
244 | .addr = 0x1e510013, | 244 | .addr = 0x1e510013, |
245 | .chcr = SM_INC | 0x800 | 0x40000000 | | 245 | .chcr = DM_INC | 0x800 | 0x40000000 | |
246 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 246 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
247 | .mid_rid = 0x2a, | 247 | .mid_rid = 0x2a, |
248 | }, | 248 | }, |
@@ -256,7 +256,7 @@ static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { | |||
256 | { | 256 | { |
257 | .slave_id = SHDMA_SLAVE_RIIC2_RX, | 257 | .slave_id = SHDMA_SLAVE_RIIC2_RX, |
258 | .addr = 0x1e520013, | 258 | .addr = 0x1e520013, |
259 | .chcr = SM_INC | 0x800 | 0x40000000 | | 259 | .chcr = DM_INC | 0x800 | 0x40000000 | |
260 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 260 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
261 | .mid_rid = 0xa2, | 261 | .mid_rid = 0xa2, |
262 | }, | 262 | }, |
@@ -265,12 +265,12 @@ static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { | |||
265 | .addr = 0x1e530012, | 265 | .addr = 0x1e530012, |
266 | .chcr = SM_INC | 0x800 | 0x40000000 | | 266 | .chcr = SM_INC | 0x800 | 0x40000000 | |
267 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 267 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
268 | .mid_rid = 0xab, | 268 | .mid_rid = 0xa9, |
269 | }, | 269 | }, |
270 | { | 270 | { |
271 | .slave_id = SHDMA_SLAVE_RIIC3_RX, | 271 | .slave_id = SHDMA_SLAVE_RIIC3_RX, |
272 | .addr = 0x1e530013, | 272 | .addr = 0x1e530013, |
273 | .chcr = SM_INC | 0x800 | 0x40000000 | | 273 | .chcr = DM_INC | 0x800 | 0x40000000 | |
274 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 274 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
275 | .mid_rid = 0xaf, | 275 | .mid_rid = 0xaf, |
276 | }, | 276 | }, |
@@ -279,14 +279,14 @@ static const struct sh_dmae_slave_config sh7757_dmae2_slaves[] = { | |||
279 | .addr = 0x1e540012, | 279 | .addr = 0x1e540012, |
280 | .chcr = SM_INC | 0x800 | 0x40000000 | | 280 | .chcr = SM_INC | 0x800 | 0x40000000 | |
281 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 281 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
282 | .mid_rid = 0xc1, | 282 | .mid_rid = 0xc5, |
283 | }, | 283 | }, |
284 | { | 284 | { |
285 | .slave_id = SHDMA_SLAVE_RIIC4_RX, | 285 | .slave_id = SHDMA_SLAVE_RIIC4_RX, |
286 | .addr = 0x1e540013, | 286 | .addr = 0x1e540013, |
287 | .chcr = SM_INC | 0x800 | 0x40000000 | | 287 | .chcr = DM_INC | 0x800 | 0x40000000 | |
288 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 288 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
289 | .mid_rid = 0xc2, | 289 | .mid_rid = 0xc6, |
290 | }, | 290 | }, |
291 | }; | 291 | }; |
292 | 292 | ||
@@ -301,7 +301,7 @@ static const struct sh_dmae_slave_config sh7757_dmae3_slaves[] = { | |||
301 | { | 301 | { |
302 | .slave_id = SHDMA_SLAVE_RIIC5_RX, | 302 | .slave_id = SHDMA_SLAVE_RIIC5_RX, |
303 | .addr = 0x1e550013, | 303 | .addr = 0x1e550013, |
304 | .chcr = SM_INC | 0x800 | 0x40000000 | | 304 | .chcr = DM_INC | 0x800 | 0x40000000 | |
305 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 305 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
306 | .mid_rid = 0x22, | 306 | .mid_rid = 0x22, |
307 | }, | 307 | }, |
@@ -315,7 +315,7 @@ static const struct sh_dmae_slave_config sh7757_dmae3_slaves[] = { | |||
315 | { | 315 | { |
316 | .slave_id = SHDMA_SLAVE_RIIC6_RX, | 316 | .slave_id = SHDMA_SLAVE_RIIC6_RX, |
317 | .addr = 0x1e560013, | 317 | .addr = 0x1e560013, |
318 | .chcr = SM_INC | 0x800 | 0x40000000 | | 318 | .chcr = DM_INC | 0x800 | 0x40000000 | |
319 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 319 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
320 | .mid_rid = 0x2a, | 320 | .mid_rid = 0x2a, |
321 | }, | 321 | }, |
@@ -329,7 +329,7 @@ static const struct sh_dmae_slave_config sh7757_dmae3_slaves[] = { | |||
329 | { | 329 | { |
330 | .slave_id = SHDMA_SLAVE_RIIC7_RX, | 330 | .slave_id = SHDMA_SLAVE_RIIC7_RX, |
331 | .addr = 0x1e570013, | 331 | .addr = 0x1e570013, |
332 | .chcr = SM_INC | 0x800 | 0x40000000 | | 332 | .chcr = DM_INC | 0x800 | 0x40000000 | |
333 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 333 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
334 | .mid_rid = 0x42, | 334 | .mid_rid = 0x42, |
335 | }, | 335 | }, |
@@ -343,7 +343,7 @@ static const struct sh_dmae_slave_config sh7757_dmae3_slaves[] = { | |||
343 | { | 343 | { |
344 | .slave_id = SHDMA_SLAVE_RIIC8_RX, | 344 | .slave_id = SHDMA_SLAVE_RIIC8_RX, |
345 | .addr = 0x1e580013, | 345 | .addr = 0x1e580013, |
346 | .chcr = SM_INC | 0x800 | 0x40000000 | | 346 | .chcr = DM_INC | 0x800 | 0x40000000 | |
347 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 347 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
348 | .mid_rid = 0x46, | 348 | .mid_rid = 0x46, |
349 | }, | 349 | }, |
@@ -357,7 +357,7 @@ static const struct sh_dmae_slave_config sh7757_dmae3_slaves[] = { | |||
357 | { | 357 | { |
358 | .slave_id = SHDMA_SLAVE_RIIC9_RX, | 358 | .slave_id = SHDMA_SLAVE_RIIC9_RX, |
359 | .addr = 0x1e590013, | 359 | .addr = 0x1e590013, |
360 | .chcr = SM_INC | 0x800 | 0x40000000 | | 360 | .chcr = DM_INC | 0x800 | 0x40000000 | |
361 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 361 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
362 | .mid_rid = 0x52, | 362 | .mid_rid = 0x52, |
363 | }, | 363 | }, |
@@ -659,6 +659,54 @@ static struct platform_device spi0_device = { | |||
659 | .resource = spi0_resources, | 659 | .resource = spi0_resources, |
660 | }; | 660 | }; |
661 | 661 | ||
662 | static struct resource usb_ehci_resources[] = { | ||
663 | [0] = { | ||
664 | .start = 0xfe4f1000, | ||
665 | .end = 0xfe4f10ff, | ||
666 | .flags = IORESOURCE_MEM, | ||
667 | }, | ||
668 | [1] = { | ||
669 | .start = 57, | ||
670 | .end = 57, | ||
671 | .flags = IORESOURCE_IRQ, | ||
672 | }, | ||
673 | }; | ||
674 | |||
675 | static struct platform_device usb_ehci_device = { | ||
676 | .name = "sh_ehci", | ||
677 | .id = -1, | ||
678 | .dev = { | ||
679 | .dma_mask = &usb_ehci_device.dev.coherent_dma_mask, | ||
680 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
681 | }, | ||
682 | .num_resources = ARRAY_SIZE(usb_ehci_resources), | ||
683 | .resource = usb_ehci_resources, | ||
684 | }; | ||
685 | |||
686 | static struct resource usb_ohci_resources[] = { | ||
687 | [0] = { | ||
688 | .start = 0xfe4f1800, | ||
689 | .end = 0xfe4f18ff, | ||
690 | .flags = IORESOURCE_MEM, | ||
691 | }, | ||
692 | [1] = { | ||
693 | .start = 57, | ||
694 | .end = 57, | ||
695 | .flags = IORESOURCE_IRQ, | ||
696 | }, | ||
697 | }; | ||
698 | |||
699 | static struct platform_device usb_ohci_device = { | ||
700 | .name = "sh_ohci", | ||
701 | .id = -1, | ||
702 | .dev = { | ||
703 | .dma_mask = &usb_ohci_device.dev.coherent_dma_mask, | ||
704 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
705 | }, | ||
706 | .num_resources = ARRAY_SIZE(usb_ohci_resources), | ||
707 | .resource = usb_ohci_resources, | ||
708 | }; | ||
709 | |||
662 | static struct platform_device *sh7757_devices[] __initdata = { | 710 | static struct platform_device *sh7757_devices[] __initdata = { |
663 | &scif2_device, | 711 | &scif2_device, |
664 | &scif3_device, | 712 | &scif3_device, |
@@ -670,6 +718,8 @@ static struct platform_device *sh7757_devices[] __initdata = { | |||
670 | &dma2_device, | 718 | &dma2_device, |
671 | &dma3_device, | 719 | &dma3_device, |
672 | &spi0_device, | 720 | &spi0_device, |
721 | &usb_ehci_device, | ||
722 | &usb_ohci_device, | ||
673 | }; | 723 | }; |
674 | 724 | ||
675 | static int __init sh7757_devices_setup(void) | 725 | static int __init sh7757_devices_setup(void) |
@@ -1039,13 +1089,13 @@ static DECLARE_INTC_DESC(intc_desc, "sh7757", vectors, groups, | |||
1039 | 1089 | ||
1040 | /* Support for external interrupt pins in IRQ mode */ | 1090 | /* Support for external interrupt pins in IRQ mode */ |
1041 | static struct intc_vect vectors_irq0123[] __initdata = { | 1091 | static struct intc_vect vectors_irq0123[] __initdata = { |
1042 | INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280), | 1092 | INTC_VECT(IRQ0, 0x200), INTC_VECT(IRQ1, 0x240), |
1043 | INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300), | 1093 | INTC_VECT(IRQ2, 0x280), INTC_VECT(IRQ3, 0x2c0), |
1044 | }; | 1094 | }; |
1045 | 1095 | ||
1046 | static struct intc_vect vectors_irq4567[] __initdata = { | 1096 | static struct intc_vect vectors_irq4567[] __initdata = { |
1047 | INTC_VECT(IRQ4, 0x340), INTC_VECT(IRQ5, 0x380), | 1097 | INTC_VECT(IRQ4, 0x300), INTC_VECT(IRQ5, 0x340), |
1048 | INTC_VECT(IRQ6, 0x3c0), INTC_VECT(IRQ7, 0x200), | 1098 | INTC_VECT(IRQ6, 0x380), INTC_VECT(IRQ7, 0x3c0), |
1049 | }; | 1099 | }; |
1050 | 1100 | ||
1051 | static struct intc_sense_reg sense_registers[] __initdata = { | 1101 | static struct intc_sense_reg sense_registers[] __initdata = { |
@@ -1079,14 +1129,14 @@ static struct intc_vect vectors_irl0123[] __initdata = { | |||
1079 | }; | 1129 | }; |
1080 | 1130 | ||
1081 | static struct intc_vect vectors_irl4567[] __initdata = { | 1131 | static struct intc_vect vectors_irl4567[] __initdata = { |
1082 | INTC_VECT(IRL4_LLLL, 0xb00), INTC_VECT(IRL4_LLLH, 0xb20), | 1132 | INTC_VECT(IRL4_LLLL, 0x200), INTC_VECT(IRL4_LLLH, 0x220), |
1083 | INTC_VECT(IRL4_LLHL, 0xb40), INTC_VECT(IRL4_LLHH, 0xb60), | 1133 | INTC_VECT(IRL4_LLHL, 0x240), INTC_VECT(IRL4_LLHH, 0x260), |
1084 | INTC_VECT(IRL4_LHLL, 0xb80), INTC_VECT(IRL4_LHLH, 0xba0), | 1134 | INTC_VECT(IRL4_LHLL, 0x280), INTC_VECT(IRL4_LHLH, 0x2a0), |
1085 | INTC_VECT(IRL4_LHHL, 0xbc0), INTC_VECT(IRL4_LHHH, 0xbe0), | 1135 | INTC_VECT(IRL4_LHHL, 0x2c0), INTC_VECT(IRL4_LHHH, 0x2e0), |
1086 | INTC_VECT(IRL4_HLLL, 0xc00), INTC_VECT(IRL4_HLLH, 0xc20), | 1136 | INTC_VECT(IRL4_HLLL, 0x300), INTC_VECT(IRL4_HLLH, 0x320), |
1087 | INTC_VECT(IRL4_HLHL, 0xc40), INTC_VECT(IRL4_HLHH, 0xc60), | 1137 | INTC_VECT(IRL4_HLHL, 0x340), INTC_VECT(IRL4_HLHH, 0x360), |
1088 | INTC_VECT(IRL4_HHLL, 0xc80), INTC_VECT(IRL4_HHLH, 0xca0), | 1138 | INTC_VECT(IRL4_HHLL, 0x380), INTC_VECT(IRL4_HHLH, 0x3a0), |
1089 | INTC_VECT(IRL4_HHHL, 0xcc0), | 1139 | INTC_VECT(IRL4_HHHL, 0x3c0), |
1090 | }; | 1140 | }; |
1091 | 1141 | ||
1092 | static DECLARE_INTC_DESC(intc_desc_irl0123, "sh7757-irl0123", vectors_irl0123, | 1142 | static DECLARE_INTC_DESC(intc_desc_irl0123, "sh7757-irl0123", vectors_irl0123, |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 91971103b62b..a3ee91971129 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/ftrace.h> | 14 | #include <linux/ftrace.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/ratelimit.h> | ||
16 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
17 | #include <asm/machvec.h> | 18 | #include <asm/machvec.h> |
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
@@ -268,9 +269,8 @@ void migrate_irqs(void) | |||
268 | unsigned int newcpu = cpumask_any_and(data->affinity, | 269 | unsigned int newcpu = cpumask_any_and(data->affinity, |
269 | cpu_online_mask); | 270 | cpu_online_mask); |
270 | if (newcpu >= nr_cpu_ids) { | 271 | if (newcpu >= nr_cpu_ids) { |
271 | if (printk_ratelimit()) | 272 | pr_info_ratelimited("IRQ%u no longer affine to CPU%u\n", |
272 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", | 273 | irq, cpu); |
273 | irq, cpu); | ||
274 | 274 | ||
275 | cpumask_setall(data->affinity); | 275 | cpumask_setall(data->affinity); |
276 | newcpu = cpumask_any_and(data->affinity, | 276 | newcpu = cpumask_any_and(data->affinity, |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index b473f0c06fbc..aaf6d59c2012 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -102,8 +102,6 @@ EXPORT_SYMBOL(kernel_thread); | |||
102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, | 102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, |
103 | unsigned long new_sp) | 103 | unsigned long new_sp) |
104 | { | 104 | { |
105 | set_fs(USER_DS); | ||
106 | |||
107 | regs->pr = 0; | 105 | regs->pr = 0; |
108 | regs->sr = SR_FD; | 106 | regs->sr = SR_FD; |
109 | regs->pc = new_pc; | 107 | regs->pc = new_pc; |
diff --git a/arch/sh/mm/alignment.c b/arch/sh/mm/alignment.c index b2595b8548ee..620fa7ff9eec 100644 --- a/arch/sh/mm/alignment.c +++ b/arch/sh/mm/alignment.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/proc_fs.h> | 14 | #include <linux/proc_fs.h> |
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
16 | #include <linux/ratelimit.h> | ||
16 | #include <asm/alignment.h> | 17 | #include <asm/alignment.h> |
17 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
18 | 19 | ||
@@ -95,13 +96,13 @@ int set_unalign_ctl(struct task_struct *tsk, unsigned int val) | |||
95 | void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn, | 96 | void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn, |
96 | struct pt_regs *regs) | 97 | struct pt_regs *regs) |
97 | { | 98 | { |
98 | if (user_mode(regs) && (se_usermode & UM_WARN) && printk_ratelimit()) | 99 | if (user_mode(regs) && (se_usermode & UM_WARN)) |
99 | pr_notice("Fixing up unaligned userspace access " | 100 | pr_notice_ratelimited("Fixing up unaligned userspace access " |
100 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 101 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", |
101 | tsk->comm, task_pid_nr(tsk), | 102 | tsk->comm, task_pid_nr(tsk), |
102 | (void *)instruction_pointer(regs), insn); | 103 | (void *)instruction_pointer(regs), insn); |
103 | else if (se_kernmode_warn && printk_ratelimit()) | 104 | else if (se_kernmode_warn) |
104 | pr_notice("Fixing up unaligned kernel access " | 105 | pr_notice_ratelimited("Fixing up unaligned kernel access " |
105 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 106 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", |
106 | tsk->comm, task_pid_nr(tsk), | 107 | tsk->comm, task_pid_nr(tsk), |
107 | (void *)instruction_pointer(regs), insn); | 108 | (void *)instruction_pointer(regs), insn); |
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c index 52411462c409..115725198038 100644 --- a/arch/sh/mm/cache-debugfs.c +++ b/arch/sh/mm/cache-debugfs.c | |||
@@ -26,9 +26,9 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
26 | { | 26 | { |
27 | unsigned int cache_type = (unsigned int)file->private; | 27 | unsigned int cache_type = (unsigned int)file->private; |
28 | struct cache_info *cache; | 28 | struct cache_info *cache; |
29 | unsigned int waysize, way, cache_size; | 29 | unsigned int waysize, way; |
30 | unsigned long ccr, base; | 30 | unsigned long ccr; |
31 | static unsigned long addrstart = 0; | 31 | unsigned long addrstart = 0; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Go uncached immediately so we don't skew the results any | 34 | * Go uncached immediately so we don't skew the results any |
@@ -45,28 +45,13 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | if (cache_type == CACHE_TYPE_DCACHE) { | 47 | if (cache_type == CACHE_TYPE_DCACHE) { |
48 | base = CACHE_OC_ADDRESS_ARRAY; | 48 | addrstart = CACHE_OC_ADDRESS_ARRAY; |
49 | cache = ¤t_cpu_data.dcache; | 49 | cache = ¤t_cpu_data.dcache; |
50 | } else { | 50 | } else { |
51 | base = CACHE_IC_ADDRESS_ARRAY; | 51 | addrstart = CACHE_IC_ADDRESS_ARRAY; |
52 | cache = ¤t_cpu_data.icache; | 52 | cache = ¤t_cpu_data.icache; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | ||
56 | * Due to the amount of data written out (depending on the cache size), | ||
57 | * we may be iterated over multiple times. In this case, keep track of | ||
58 | * the entry position in addrstart, and rewind it when we've hit the | ||
59 | * end of the cache. | ||
60 | * | ||
61 | * Likewise, the same code is used for multiple caches, so care must | ||
62 | * be taken for bouncing addrstart back and forth so the appropriate | ||
63 | * cache is hit. | ||
64 | */ | ||
65 | cache_size = cache->ways * cache->sets * cache->linesz; | ||
66 | if (((addrstart & 0xff000000) != base) || | ||
67 | (addrstart & 0x00ffffff) > cache_size) | ||
68 | addrstart = base; | ||
69 | |||
70 | waysize = cache->sets; | 55 | waysize = cache->sets; |
71 | 56 | ||
72 | /* | 57 | /* |