diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-01 14:46:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-01 14:46:30 -0400 |
commit | 5a475ce4692f668b2615ae4ea1365c7c2d93f1dd (patch) | |
tree | 0349690bce5fe2396a3788bb1a4084ffd87ee308 /arch | |
parent | d960eea974f5e500c0dcb95a934239cc1f481cfd (diff) | |
parent | 1c6a307a54668eda556f499c94e75086aaf8f80f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: LCDC dcache flush for deferred io
sh: Fix compiler error and include the definition of IS_ERR_VALUE
sh: re-add LCDC fbdev support to the Migo-R defconfig
sh: fix se7724 ceu names
sh: ms7724se: Enable sh_eth in defconfig.
arch/sh/boards/mach-se/7206/io.c: Remove unnecessary semicolons
sh: ms7724se: Add sh_eth support
nommu: provide follow_pfn().
sh: Kill off unused DEBUG_BOOTMEM symbol.
perf_counter tools: add cpu_relax()/rmb() definitions for sh.
sh64: Hook up page fault events for software perf counters.
sh: Hook up page fault events for software perf counters.
sh: make set_perf_counter_pending() static inline.
clocksource: sh_tmu: Make undefined TCOR behaviour less undefined.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/Kconfig.debug | 4 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 110 | ||||
-rw-r--r-- | arch/sh/configs/migor_defconfig | 53 | ||||
-rw-r--r-- | arch/sh/configs/se7724_defconfig | 25 | ||||
-rw-r--r-- | arch/sh/include/asm/perf_counter.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/syscall_32.h | 1 | ||||
-rw-r--r-- | arch/sh/include/mach-se/mach/se7724.h | 5 | ||||
-rw-r--r-- | arch/sh/mm/fault_32.c | 61 | ||||
-rw-r--r-- | arch/sh/mm/tlbflush_64.c | 15 |
10 files changed, 230 insertions, 48 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 8ece0b5bd028..39224b57c6ef 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -61,10 +61,6 @@ config EARLY_PRINTK | |||
61 | select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using | 61 | select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using |
62 | the kernel command line option to toggle back and forth. | 62 | the kernel command line option to toggle back and forth. |
63 | 63 | ||
64 | config DEBUG_BOOTMEM | ||
65 | depends on DEBUG_KERNEL | ||
66 | bool "Debug BOOTMEM initialization" | ||
67 | |||
68 | config DEBUG_STACKOVERFLOW | 64 | config DEBUG_STACKOVERFLOW |
69 | bool "Check for stack overflows" | 65 | bool "Check for stack overflows" |
70 | depends on DEBUG_KERNEL && SUPERH32 | 66 | depends on DEBUG_KERNEL && SUPERH32 |
diff --git a/arch/sh/boards/mach-se/7206/io.c b/arch/sh/boards/mach-se/7206/io.c index 9c3a33210d61..180455642a43 100644 --- a/arch/sh/boards/mach-se/7206/io.c +++ b/arch/sh/boards/mach-se/7206/io.c | |||
@@ -50,7 +50,7 @@ unsigned char se7206_inb_p(unsigned long port) | |||
50 | 50 | ||
51 | unsigned short se7206_inw(unsigned long port) | 51 | unsigned short se7206_inw(unsigned long port) |
52 | { | 52 | { |
53 | return *port2adr(port);; | 53 | return *port2adr(port); |
54 | } | 54 | } |
55 | 55 | ||
56 | void se7206_outb(unsigned char value, unsigned long port) | 56 | void se7206_outb(unsigned char value, unsigned long port) |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 9cd04bd558b8..c050a8d76dfd 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <media/sh_mobile_ceu.h> | 23 | #include <media/sh_mobile_ceu.h> |
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <asm/heartbeat.h> | 25 | #include <asm/heartbeat.h> |
26 | #include <asm/sh_eth.h> | ||
27 | #include <asm/clock.h> | ||
26 | #include <asm/sh_keysc.h> | 28 | #include <asm/sh_keysc.h> |
27 | #include <cpu/sh7724.h> | 29 | #include <cpu/sh7724.h> |
28 | #include <mach-se/mach/se7724.h> | 30 | #include <mach-se/mach/se7724.h> |
@@ -272,6 +274,34 @@ static struct platform_device keysc_device = { | |||
272 | }, | 274 | }, |
273 | }; | 275 | }; |
274 | 276 | ||
277 | /* SH Eth */ | ||
278 | static struct resource sh_eth_resources[] = { | ||
279 | [0] = { | ||
280 | .start = SH_ETH_ADDR, | ||
281 | .end = SH_ETH_ADDR + 0x1FC, | ||
282 | .flags = IORESOURCE_MEM, | ||
283 | }, | ||
284 | [1] = { | ||
285 | .start = 91, | ||
286 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | struct sh_eth_plat_data sh_eth_plat = { | ||
291 | .phy = 0x1f, /* SMSC LAN8187 */ | ||
292 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
293 | }; | ||
294 | |||
295 | static struct platform_device sh_eth_device = { | ||
296 | .name = "sh-eth", | ||
297 | .id = 0, | ||
298 | .dev = { | ||
299 | .platform_data = &sh_eth_plat, | ||
300 | }, | ||
301 | .num_resources = ARRAY_SIZE(sh_eth_resources), | ||
302 | .resource = sh_eth_resources, | ||
303 | }; | ||
304 | |||
275 | static struct platform_device *ms7724se_devices[] __initdata = { | 305 | static struct platform_device *ms7724se_devices[] __initdata = { |
276 | &heartbeat_device, | 306 | &heartbeat_device, |
277 | &smc91x_eth_device, | 307 | &smc91x_eth_device, |
@@ -280,8 +310,57 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
280 | &ceu0_device, | 310 | &ceu0_device, |
281 | &ceu1_device, | 311 | &ceu1_device, |
282 | &keysc_device, | 312 | &keysc_device, |
313 | &sh_eth_device, | ||
283 | }; | 314 | }; |
284 | 315 | ||
316 | #define EEPROM_OP 0xBA206000 | ||
317 | #define EEPROM_ADR 0xBA206004 | ||
318 | #define EEPROM_DATA 0xBA20600C | ||
319 | #define EEPROM_STAT 0xBA206010 | ||
320 | #define EEPROM_STRT 0xBA206014 | ||
321 | static int __init sh_eth_is_eeprom_ready(void) | ||
322 | { | ||
323 | int t = 10000; | ||
324 | |||
325 | while (t--) { | ||
326 | if (!ctrl_inw(EEPROM_STAT)) | ||
327 | return 1; | ||
328 | cpu_relax(); | ||
329 | } | ||
330 | |||
331 | printk(KERN_ERR "ms7724se can not access to eeprom\n"); | ||
332 | return 0; | ||
333 | } | ||
334 | |||
335 | static void __init sh_eth_init(void) | ||
336 | { | ||
337 | int i; | ||
338 | u16 mac[3]; | ||
339 | |||
340 | /* check EEPROM status */ | ||
341 | if (!sh_eth_is_eeprom_ready()) | ||
342 | return; | ||
343 | |||
344 | /* read MAC addr from EEPROM */ | ||
345 | for (i = 0 ; i < 3 ; i++) { | ||
346 | ctrl_outw(0x0, EEPROM_OP); /* read */ | ||
347 | ctrl_outw(i*2, EEPROM_ADR); | ||
348 | ctrl_outw(0x1, EEPROM_STRT); | ||
349 | if (!sh_eth_is_eeprom_ready()) | ||
350 | return; | ||
351 | |||
352 | mac[i] = ctrl_inw(EEPROM_DATA); | ||
353 | mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */ | ||
354 | } | ||
355 | |||
356 | /* reset sh-eth */ | ||
357 | ctrl_outl(0x1, SH_ETH_ADDR + 0x0); | ||
358 | |||
359 | /* set MAC addr */ | ||
360 | ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR); | ||
361 | ctrl_outl((mac[2]), SH_ETH_MALR); | ||
362 | } | ||
363 | |||
285 | #define SW4140 0xBA201000 | 364 | #define SW4140 0xBA201000 |
286 | #define FPGA_OUT 0xBA200400 | 365 | #define FPGA_OUT 0xBA200400 |
287 | #define PORT_HIZA 0xA4050158 | 366 | #define PORT_HIZA 0xA4050158 |
@@ -302,7 +381,8 @@ static int __init devices_setup(void) | |||
302 | ctrl_outw(ctrl_inw(FPGA_OUT) & | 381 | ctrl_outw(ctrl_inw(FPGA_OUT) & |
303 | ~((1 << 1) | /* LAN */ | 382 | ~((1 << 1) | /* LAN */ |
304 | (1 << 6) | /* VIDEO DAC */ | 383 | (1 << 6) | /* VIDEO DAC */ |
305 | (1 << 12)), /* USB0 */ | 384 | (1 << 12) | /* USB0 */ |
385 | (1 << 14)), /* RMII */ | ||
306 | FPGA_OUT); | 386 | FPGA_OUT); |
307 | 387 | ||
308 | /* enable IRQ 0,1,2 */ | 388 | /* enable IRQ 0,1,2 */ |
@@ -374,7 +454,7 @@ static int __init devices_setup(void) | |||
374 | gpio_request(GPIO_FN_VIO0_CLK, NULL); | 454 | gpio_request(GPIO_FN_VIO0_CLK, NULL); |
375 | gpio_request(GPIO_FN_VIO0_FLD, NULL); | 455 | gpio_request(GPIO_FN_VIO0_FLD, NULL); |
376 | gpio_request(GPIO_FN_VIO0_HD, NULL); | 456 | gpio_request(GPIO_FN_VIO0_HD, NULL); |
377 | platform_resource_setup_memory(&ceu0_device, "ceu", 4 << 20); | 457 | platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20); |
378 | 458 | ||
379 | /* enable CEU1 */ | 459 | /* enable CEU1 */ |
380 | gpio_request(GPIO_FN_VIO1_D7, NULL); | 460 | gpio_request(GPIO_FN_VIO1_D7, NULL); |
@@ -389,7 +469,7 @@ static int __init devices_setup(void) | |||
389 | gpio_request(GPIO_FN_VIO1_HD, NULL); | 469 | gpio_request(GPIO_FN_VIO1_HD, NULL); |
390 | gpio_request(GPIO_FN_VIO1_VD, NULL); | 470 | gpio_request(GPIO_FN_VIO1_VD, NULL); |
391 | gpio_request(GPIO_FN_VIO1_CLK, NULL); | 471 | gpio_request(GPIO_FN_VIO1_CLK, NULL); |
392 | platform_resource_setup_memory(&ceu1_device, "ceu", 4 << 20); | 472 | platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20); |
393 | 473 | ||
394 | /* KEYSC */ | 474 | /* KEYSC */ |
395 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); | 475 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); |
@@ -404,6 +484,28 @@ static int __init devices_setup(void) | |||
404 | gpio_request(GPIO_FN_KEYOUT1, NULL); | 484 | gpio_request(GPIO_FN_KEYOUT1, NULL); |
405 | gpio_request(GPIO_FN_KEYOUT0, NULL); | 485 | gpio_request(GPIO_FN_KEYOUT0, NULL); |
406 | 486 | ||
487 | /* | ||
488 | * enable SH-Eth | ||
489 | * | ||
490 | * please remove J33 pin from your board !! | ||
491 | * | ||
492 | * ms7724 board should not use GPIO_FN_LNKSTA pin | ||
493 | * So, This time PTX5 is set to input pin | ||
494 | */ | ||
495 | gpio_request(GPIO_FN_RMII_RXD0, NULL); | ||
496 | gpio_request(GPIO_FN_RMII_RXD1, NULL); | ||
497 | gpio_request(GPIO_FN_RMII_TXD0, NULL); | ||
498 | gpio_request(GPIO_FN_RMII_TXD1, NULL); | ||
499 | gpio_request(GPIO_FN_RMII_REF_CLK, NULL); | ||
500 | gpio_request(GPIO_FN_RMII_TX_EN, NULL); | ||
501 | gpio_request(GPIO_FN_RMII_RX_ER, NULL); | ||
502 | gpio_request(GPIO_FN_RMII_CRS_DV, NULL); | ||
503 | gpio_request(GPIO_FN_MDIO, NULL); | ||
504 | gpio_request(GPIO_FN_MDC, NULL); | ||
505 | gpio_request(GPIO_PTX5, NULL); | ||
506 | gpio_direction_input(GPIO_PTX5); | ||
507 | sh_eth_init(); | ||
508 | |||
407 | if (sw & SW41_B) { | 509 | if (sw & SW41_B) { |
408 | /* SVGA */ | 510 | /* SVGA */ |
409 | lcdc_info.ch[0].lcd_cfg.xres = 800; | 511 | lcdc_info.ch[0].lcd_cfg.xres = 800; |
@@ -437,7 +539,7 @@ static int __init devices_setup(void) | |||
437 | } | 539 | } |
438 | 540 | ||
439 | return platform_add_devices(ms7724se_devices, | 541 | return platform_add_devices(ms7724se_devices, |
440 | ARRAY_SIZE(ms7724se_devices)); | 542 | ARRAY_SIZE(ms7724se_devices)); |
441 | } | 543 | } |
442 | device_initcall(devices_setup); | 544 | device_initcall(devices_setup); |
443 | 545 | ||
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig index da627d22c009..b18cfd39cac6 100644 --- a/arch/sh/configs/migor_defconfig +++ b/arch/sh/configs/migor_defconfig | |||
@@ -309,7 +309,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000 | |||
309 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 309 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
310 | CONFIG_ENTRY_OFFSET=0x00001000 | 310 | CONFIG_ENTRY_OFFSET=0x00001000 |
311 | CONFIG_CMDLINE_BOOL=y | 311 | CONFIG_CMDLINE_BOOL=y |
312 | CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp" | 312 | CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 earlyprintk=serial ip=on root=/dev/nfs ip=dhcp" |
313 | 313 | ||
314 | # | 314 | # |
315 | # Bus options | 315 | # Bus options |
@@ -858,7 +858,35 @@ CONFIG_VIDEO_SH_MOBILE_CEU=y | |||
858 | # | 858 | # |
859 | # CONFIG_VGASTATE is not set | 859 | # CONFIG_VGASTATE is not set |
860 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 860 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
861 | # CONFIG_FB is not set | 861 | CONFIG_FB=y |
862 | # CONFIG_FIRMWARE_EDID is not set | ||
863 | # CONFIG_FB_DDC is not set | ||
864 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
865 | # CONFIG_FB_CFB_FILLRECT is not set | ||
866 | # CONFIG_FB_CFB_COPYAREA is not set | ||
867 | # CONFIG_FB_CFB_IMAGEBLIT is not set | ||
868 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
869 | CONFIG_FB_SYS_FILLRECT=y | ||
870 | CONFIG_FB_SYS_COPYAREA=y | ||
871 | CONFIG_FB_SYS_IMAGEBLIT=y | ||
872 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
873 | CONFIG_FB_SYS_FOPS=y | ||
874 | CONFIG_FB_DEFERRED_IO=y | ||
875 | # CONFIG_FB_SVGALIB is not set | ||
876 | # CONFIG_FB_MACMODES is not set | ||
877 | # CONFIG_FB_BACKLIGHT is not set | ||
878 | # CONFIG_FB_MODE_HELPERS is not set | ||
879 | # CONFIG_FB_TILEBLITTING is not set | ||
880 | |||
881 | # | ||
882 | # Frame buffer hardware drivers | ||
883 | # | ||
884 | # CONFIG_FB_S1D13XXX is not set | ||
885 | CONFIG_FB_SH_MOBILE_LCDC=y | ||
886 | # CONFIG_FB_VIRTUAL is not set | ||
887 | # CONFIG_FB_METRONOME is not set | ||
888 | # CONFIG_FB_MB862XX is not set | ||
889 | # CONFIG_FB_BROADSHEET is not set | ||
862 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 890 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
863 | 891 | ||
864 | # | 892 | # |
@@ -870,6 +898,27 @@ CONFIG_VIDEO_SH_MOBILE_CEU=y | |||
870 | # Console display driver support | 898 | # Console display driver support |
871 | # | 899 | # |
872 | CONFIG_DUMMY_CONSOLE=y | 900 | CONFIG_DUMMY_CONSOLE=y |
901 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
902 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
903 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
904 | CONFIG_FONTS=y | ||
905 | # CONFIG_FONT_8x8 is not set | ||
906 | # CONFIG_FONT_8x16 is not set | ||
907 | # CONFIG_FONT_6x11 is not set | ||
908 | # CONFIG_FONT_7x14 is not set | ||
909 | # CONFIG_FONT_PEARL_8x8 is not set | ||
910 | # CONFIG_FONT_ACORN_8x8 is not set | ||
911 | CONFIG_FONT_MINI_4x6=y | ||
912 | # CONFIG_FONT_SUN8x16 is not set | ||
913 | # CONFIG_FONT_SUN12x22 is not set | ||
914 | # CONFIG_FONT_10x18 is not set | ||
915 | CONFIG_LOGO=y | ||
916 | # CONFIG_LOGO_LINUX_MONO is not set | ||
917 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
918 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
919 | # CONFIG_LOGO_SUPERH_MONO is not set | ||
920 | CONFIG_LOGO_SUPERH_VGA16=y | ||
921 | # CONFIG_LOGO_SUPERH_CLUT224 is not set | ||
873 | # CONFIG_SOUND is not set | 922 | # CONFIG_SOUND is not set |
874 | CONFIG_HID_SUPPORT=y | 923 | CONFIG_HID_SUPPORT=y |
875 | CONFIG_HID=y | 924 | CONFIG_HID=y |
diff --git a/arch/sh/configs/se7724_defconfig b/arch/sh/configs/se7724_defconfig index 3840270283e4..3ee783a0a075 100644 --- a/arch/sh/configs/se7724_defconfig +++ b/arch/sh/configs/se7724_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.30 | 3 | # Linux kernel version: 2.6.30 |
4 | # Thu Jun 18 16:09:05 2009 | 4 | # Mon Jun 29 16:28:43 2009 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -14,6 +14,7 @@ CONFIG_GENERIC_HWEIGHT=y | |||
14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
16 | CONFIG_GENERIC_IRQ_PROBE=y | 16 | CONFIG_GENERIC_IRQ_PROBE=y |
17 | CONFIG_IRQ_PER_CPU=y | ||
17 | CONFIG_GENERIC_GPIO=y | 18 | CONFIG_GENERIC_GPIO=y |
18 | CONFIG_GENERIC_TIME=y | 19 | CONFIG_GENERIC_TIME=y |
19 | CONFIG_GENERIC_CLOCKEVENTS=y | 20 | CONFIG_GENERIC_CLOCKEVENTS=y |
@@ -28,7 +29,9 @@ CONFIG_HAVE_LATENCYTOP_SUPPORT=y | |||
28 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 29 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
29 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 30 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
30 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y | 31 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y |
32 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y | ||
31 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 33 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
34 | CONFIG_CONSTRUCTORS=y | ||
32 | 35 | ||
33 | # | 36 | # |
34 | # General setup | 37 | # General setup |
@@ -88,10 +91,12 @@ CONFIG_TIMERFD=y | |||
88 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
89 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
90 | CONFIG_AIO=y | 93 | CONFIG_AIO=y |
94 | CONFIG_HAVE_PERF_COUNTERS=y | ||
91 | 95 | ||
92 | # | 96 | # |
93 | # Performance Counters | 97 | # Performance Counters |
94 | # | 98 | # |
99 | # CONFIG_PERF_COUNTERS is not set | ||
95 | CONFIG_VM_EVENT_COUNTERS=y | 100 | CONFIG_VM_EVENT_COUNTERS=y |
96 | # CONFIG_STRIP_ASM_SYMS is not set | 101 | # CONFIG_STRIP_ASM_SYMS is not set |
97 | CONFIG_COMPAT_BRK=y | 102 | CONFIG_COMPAT_BRK=y |
@@ -107,6 +112,10 @@ CONFIG_HAVE_KRETPROBES=y | |||
107 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 112 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
108 | CONFIG_HAVE_CLK=y | 113 | CONFIG_HAVE_CLK=y |
109 | CONFIG_HAVE_DMA_API_DEBUG=y | 114 | CONFIG_HAVE_DMA_API_DEBUG=y |
115 | |||
116 | # | ||
117 | # GCOV-based kernel profiling | ||
118 | # | ||
110 | # CONFIG_SLOW_WORK is not set | 119 | # CONFIG_SLOW_WORK is not set |
111 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | 120 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y |
112 | CONFIG_SLABINFO=y | 121 | CONFIG_SLABINFO=y |
@@ -119,7 +128,7 @@ CONFIG_MODULE_UNLOAD=y | |||
119 | # CONFIG_MODVERSIONS is not set | 128 | # CONFIG_MODVERSIONS is not set |
120 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 129 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
121 | CONFIG_BLOCK=y | 130 | CONFIG_BLOCK=y |
122 | # CONFIG_LBD is not set | 131 | CONFIG_LBDAF=y |
123 | # CONFIG_BLK_DEV_BSG is not set | 132 | # CONFIG_BLK_DEV_BSG is not set |
124 | # CONFIG_BLK_DEV_INTEGRITY is not set | 133 | # CONFIG_BLK_DEV_INTEGRITY is not set |
125 | 134 | ||
@@ -584,7 +593,6 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
584 | # CONFIG_SCSI_SRP_ATTRS is not set | 593 | # CONFIG_SCSI_SRP_ATTRS is not set |
585 | CONFIG_SCSI_LOWLEVEL=y | 594 | CONFIG_SCSI_LOWLEVEL=y |
586 | # CONFIG_ISCSI_TCP is not set | 595 | # CONFIG_ISCSI_TCP is not set |
587 | # CONFIG_SCSI_BNX2_ISCSI is not set | ||
588 | # CONFIG_LIBFC is not set | 596 | # CONFIG_LIBFC is not set |
589 | # CONFIG_LIBFCOE is not set | 597 | # CONFIG_LIBFCOE is not set |
590 | # CONFIG_SCSI_DEBUG is not set | 598 | # CONFIG_SCSI_DEBUG is not set |
@@ -624,7 +632,7 @@ CONFIG_NET_ETHERNET=y | |||
624 | CONFIG_MII=y | 632 | CONFIG_MII=y |
625 | # CONFIG_AX88796 is not set | 633 | # CONFIG_AX88796 is not set |
626 | # CONFIG_STNIC is not set | 634 | # CONFIG_STNIC is not set |
627 | # CONFIG_SH_ETH is not set | 635 | CONFIG_SH_ETH=y |
628 | CONFIG_SMC91X=y | 636 | CONFIG_SMC91X=y |
629 | # CONFIG_ENC28J60 is not set | 637 | # CONFIG_ENC28J60 is not set |
630 | # CONFIG_ETHOC is not set | 638 | # CONFIG_ETHOC is not set |
@@ -801,6 +809,11 @@ CONFIG_SPI_BITBANG=y | |||
801 | # | 809 | # |
802 | # CONFIG_SPI_SPIDEV is not set | 810 | # CONFIG_SPI_SPIDEV is not set |
803 | # CONFIG_SPI_TLE62X0 is not set | 811 | # CONFIG_SPI_TLE62X0 is not set |
812 | |||
813 | # | ||
814 | # PPS support | ||
815 | # | ||
816 | # CONFIG_PPS is not set | ||
804 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | 817 | CONFIG_ARCH_REQUIRE_GPIOLIB=y |
805 | CONFIG_GPIOLIB=y | 818 | CONFIG_GPIOLIB=y |
806 | # CONFIG_GPIO_SYSFS is not set | 819 | # CONFIG_GPIO_SYSFS is not set |
@@ -851,6 +864,8 @@ CONFIG_SSB_POSSIBLE=y | |||
851 | # CONFIG_MFD_WM8400 is not set | 864 | # CONFIG_MFD_WM8400 is not set |
852 | # CONFIG_MFD_WM8350_I2C is not set | 865 | # CONFIG_MFD_WM8350_I2C is not set |
853 | # CONFIG_MFD_PCF50633 is not set | 866 | # CONFIG_MFD_PCF50633 is not set |
867 | # CONFIG_AB3100_CORE is not set | ||
868 | # CONFIG_EZX_PCAP is not set | ||
854 | # CONFIG_REGULATOR is not set | 869 | # CONFIG_REGULATOR is not set |
855 | CONFIG_MEDIA_SUPPORT=y | 870 | CONFIG_MEDIA_SUPPORT=y |
856 | 871 | ||
@@ -1196,6 +1211,7 @@ CONFIG_RTC_DRV_PCF8563=y | |||
1196 | # CONFIG_RTC_DRV_S35390A is not set | 1211 | # CONFIG_RTC_DRV_S35390A is not set |
1197 | # CONFIG_RTC_DRV_FM3130 is not set | 1212 | # CONFIG_RTC_DRV_FM3130 is not set |
1198 | # CONFIG_RTC_DRV_RX8581 is not set | 1213 | # CONFIG_RTC_DRV_RX8581 is not set |
1214 | # CONFIG_RTC_DRV_RX8025 is not set | ||
1199 | 1215 | ||
1200 | # | 1216 | # |
1201 | # SPI RTC drivers | 1217 | # SPI RTC drivers |
@@ -1260,6 +1276,7 @@ CONFIG_FS_MBCACHE=y | |||
1260 | # CONFIG_JFS_FS is not set | 1276 | # CONFIG_JFS_FS is not set |
1261 | CONFIG_FS_POSIX_ACL=y | 1277 | CONFIG_FS_POSIX_ACL=y |
1262 | # CONFIG_XFS_FS is not set | 1278 | # CONFIG_XFS_FS is not set |
1279 | # CONFIG_GFS2_FS is not set | ||
1263 | # CONFIG_OCFS2_FS is not set | 1280 | # CONFIG_OCFS2_FS is not set |
1264 | # CONFIG_BTRFS_FS is not set | 1281 | # CONFIG_BTRFS_FS is not set |
1265 | CONFIG_FILE_LOCKING=y | 1282 | CONFIG_FILE_LOCKING=y |
diff --git a/arch/sh/include/asm/perf_counter.h b/arch/sh/include/asm/perf_counter.h index a8153c2aa6fa..61c2b40c802c 100644 --- a/arch/sh/include/asm/perf_counter.h +++ b/arch/sh/include/asm/perf_counter.h | |||
@@ -2,6 +2,6 @@ | |||
2 | #define __ASM_SH_PERF_COUNTER_H | 2 | #define __ASM_SH_PERF_COUNTER_H |
3 | 3 | ||
4 | /* SH only supports software counters through this interface. */ | 4 | /* SH only supports software counters through this interface. */ |
5 | #define set_perf_counter_pending() do { } while (0) | 5 | static inline void set_perf_counter_pending(void) {} |
6 | 6 | ||
7 | #endif /* __ASM_SH_PERF_COUNTER_H */ | 7 | #endif /* __ASM_SH_PERF_COUNTER_H */ |
diff --git a/arch/sh/include/asm/syscall_32.h b/arch/sh/include/asm/syscall_32.h index 5bc34681d994..6f83f2cc45c1 100644 --- a/arch/sh/include/asm/syscall_32.h +++ b/arch/sh/include/asm/syscall_32.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/err.h> | ||
6 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
7 | 8 | ||
8 | /* The system call number is given by the user in R3 */ | 9 | /* The system call number is given by the user in R3 */ |
diff --git a/arch/sh/include/mach-se/mach/se7724.h b/arch/sh/include/mach-se/mach/se7724.h index 74164b60d0db..29514a39d0f5 100644 --- a/arch/sh/include/mach-se/mach/se7724.h +++ b/arch/sh/include/mach-se/mach/se7724.h | |||
@@ -20,6 +20,11 @@ | |||
20 | */ | 20 | */ |
21 | #include <asm/addrspace.h> | 21 | #include <asm/addrspace.h> |
22 | 22 | ||
23 | /* SH Eth */ | ||
24 | #define SH_ETH_ADDR (0xA4600000) | ||
25 | #define SH_ETH_MAHR (SH_ETH_ADDR + 0x1C0) | ||
26 | #define SH_ETH_MALR (SH_ETH_ADDR + 0x1C8) | ||
27 | |||
23 | #define PA_LED (0xba203000) /* 8bit LED */ | 28 | #define PA_LED (0xba203000) /* 8bit LED */ |
24 | #define IRQ_MODE (0xba200010) | 29 | #define IRQ_MODE (0xba200010) |
25 | #define IRQ0_SR (0xba200014) | 30 | #define IRQ0_SR (0xba200014) |
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c index cc8ddbdf3d7a..71925946f1e1 100644 --- a/arch/sh/mm/fault_32.c +++ b/arch/sh/mm/fault_32.c | |||
@@ -15,12 +15,28 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/hardirq.h> | 16 | #include <linux/hardirq.h> |
17 | #include <linux/kprobes.h> | 17 | #include <linux/kprobes.h> |
18 | #include <linux/marker.h> | 18 | #include <linux/perf_counter.h> |
19 | #include <asm/io_trapped.h> | 19 | #include <asm/io_trapped.h> |
20 | #include <asm/system.h> | 20 | #include <asm/system.h> |
21 | #include <asm/mmu_context.h> | 21 | #include <asm/mmu_context.h> |
22 | #include <asm/tlbflush.h> | 22 | #include <asm/tlbflush.h> |
23 | 23 | ||
24 | static inline int notify_page_fault(struct pt_regs *regs, int trap) | ||
25 | { | ||
26 | int ret = 0; | ||
27 | |||
28 | #ifdef CONFIG_KPROBES | ||
29 | if (!user_mode(regs)) { | ||
30 | preempt_disable(); | ||
31 | if (kprobe_running() && kprobe_fault_handler(regs, trap)) | ||
32 | ret = 1; | ||
33 | preempt_enable(); | ||
34 | } | ||
35 | #endif | ||
36 | |||
37 | return ret; | ||
38 | } | ||
39 | |||
24 | /* | 40 | /* |
25 | * This routine handles page faults. It determines the address, | 41 | * This routine handles page faults. It determines the address, |
26 | * and the problem, and then passes it off to one of the appropriate | 42 | * and the problem, and then passes it off to one of the appropriate |
@@ -87,13 +103,16 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
87 | return; | 103 | return; |
88 | } | 104 | } |
89 | 105 | ||
106 | mm = tsk->mm; | ||
107 | |||
108 | if (unlikely(notify_page_fault(regs, lookup_exception_vector()))) | ||
109 | return; | ||
110 | |||
90 | /* Only enable interrupts if they were on before the fault */ | 111 | /* Only enable interrupts if they were on before the fault */ |
91 | if ((regs->sr & SR_IMASK) != SR_IMASK) { | 112 | if ((regs->sr & SR_IMASK) != SR_IMASK) |
92 | trace_hardirqs_on(); | ||
93 | local_irq_enable(); | 113 | local_irq_enable(); |
94 | } | ||
95 | 114 | ||
96 | mm = tsk->mm; | 115 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); |
97 | 116 | ||
98 | /* | 117 | /* |
99 | * If we're in an interrupt or have no user | 118 | * If we're in an interrupt or have no user |
@@ -141,10 +160,15 @@ survive: | |||
141 | goto do_sigbus; | 160 | goto do_sigbus; |
142 | BUG(); | 161 | BUG(); |
143 | } | 162 | } |
144 | if (fault & VM_FAULT_MAJOR) | 163 | if (fault & VM_FAULT_MAJOR) { |
145 | tsk->maj_flt++; | 164 | tsk->maj_flt++; |
146 | else | 165 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, |
166 | regs, address); | ||
167 | } else { | ||
147 | tsk->min_flt++; | 168 | tsk->min_flt++; |
169 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, | ||
170 | regs, address); | ||
171 | } | ||
148 | 172 | ||
149 | up_read(&mm->mmap_sem); | 173 | up_read(&mm->mmap_sem); |
150 | return; | 174 | return; |
@@ -245,22 +269,6 @@ do_sigbus: | |||
245 | goto no_context; | 269 | goto no_context; |
246 | } | 270 | } |
247 | 271 | ||
248 | static inline int notify_page_fault(struct pt_regs *regs, int trap) | ||
249 | { | ||
250 | int ret = 0; | ||
251 | |||
252 | #ifdef CONFIG_KPROBES | ||
253 | if (!user_mode(regs)) { | ||
254 | preempt_disable(); | ||
255 | if (kprobe_running() && kprobe_fault_handler(regs, trap)) | ||
256 | ret = 1; | ||
257 | preempt_enable(); | ||
258 | } | ||
259 | #endif | ||
260 | |||
261 | return ret; | ||
262 | } | ||
263 | |||
264 | /* | 272 | /* |
265 | * Called with interrupts disabled. | 273 | * Called with interrupts disabled. |
266 | */ | 274 | */ |
@@ -273,12 +281,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, | |||
273 | pmd_t *pmd; | 281 | pmd_t *pmd; |
274 | pte_t *pte; | 282 | pte_t *pte; |
275 | pte_t entry; | 283 | pte_t entry; |
276 | int ret = 0; | 284 | int ret = 1; |
277 | |||
278 | if (notify_page_fault(regs, lookup_exception_vector())) | ||
279 | goto out; | ||
280 | |||
281 | ret = 1; | ||
282 | 285 | ||
283 | /* | 286 | /* |
284 | * We don't take page faults for P1, P2, and parts of P4, these | 287 | * We don't take page faults for P1, P2, and parts of P4, these |
diff --git a/arch/sh/mm/tlbflush_64.c b/arch/sh/mm/tlbflush_64.c index fcbb6e135cef..3ce40ea34824 100644 --- a/arch/sh/mm/tlbflush_64.c +++ b/arch/sh/mm/tlbflush_64.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2000, 2001 Paolo Alberelli | 4 | * Copyright (C) 2000, 2001 Paolo Alberelli |
5 | * Copyright (C) 2003 Richard Curnow (/proc/tlb, bug fixes) | 5 | * Copyright (C) 2003 Richard Curnow (/proc/tlb, bug fixes) |
6 | * Copyright (C) 2003 Paul Mundt | 6 | * Copyright (C) 2003 - 2009 Paul Mundt |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 8 | * This file is subject to the terms and conditions of the GNU General Public |
9 | * License. See the file "COPYING" in the main directory of this archive | 9 | * License. See the file "COPYING" in the main directory of this archive |
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/perf_counter.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -115,6 +116,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | |||
115 | /* Not an IO address, so reenable interrupts */ | 116 | /* Not an IO address, so reenable interrupts */ |
116 | local_irq_enable(); | 117 | local_irq_enable(); |
117 | 118 | ||
119 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, address); | ||
120 | |||
118 | /* | 121 | /* |
119 | * If we're in an interrupt or have no user | 122 | * If we're in an interrupt or have no user |
120 | * context, we must not take the fault.. | 123 | * context, we must not take the fault.. |
@@ -195,10 +198,16 @@ survive: | |||
195 | goto do_sigbus; | 198 | goto do_sigbus; |
196 | BUG(); | 199 | BUG(); |
197 | } | 200 | } |
198 | if (fault & VM_FAULT_MAJOR) | 201 | |
202 | if (fault & VM_FAULT_MAJOR) { | ||
199 | tsk->maj_flt++; | 203 | tsk->maj_flt++; |
200 | else | 204 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, |
205 | regs, address); | ||
206 | } else { | ||
201 | tsk->min_flt++; | 207 | tsk->min_flt++; |
208 | perf_swcounter_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, | ||
209 | regs, address); | ||
210 | } | ||
202 | 211 | ||
203 | /* If we get here, the page fault has been handled. Do the TLB refill | 212 | /* If we get here, the page fault has been handled. Do the TLB refill |
204 | now from the newly-setup PTE, to avoid having to fault again right | 213 | now from the newly-setup PTE, to avoid having to fault again right |