diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:54 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:54 -0400 |
commit | 9134d02bc0af4a8747d448d1f811ec5f8eb96df6 (patch) | |
tree | 704c3e5dcc10f360815c4868a74711f82fb62e27 /arch/sh | |
parent | bbb20089a3275a19e475dbc21320c3742e3ca423 (diff) | |
parent | 80ffb3cceaefa405f2ecd46d66500ed8d53efe74 (diff) |
Merge commit 'md/for-linus' into async-tx-next
Conflicts:
drivers/md/raid5.c
Diffstat (limited to 'arch/sh')
-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 | 148 | ||||
-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 | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/pgalloc.h | 10 | ||||
-rw-r--r-- | arch/sh/include/asm/syscall_32.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/tlb.h | 6 | ||||
-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/tlb-sh3.c | 1 | ||||
-rw-r--r-- | arch/sh/mm/tlbflush_64.c | 15 |
14 files changed, 275 insertions, 62 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..8fed45a2fb85 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -19,10 +19,13 @@ | |||
19 | #include <linux/smc91x.h> | 19 | #include <linux/smc91x.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/usb/r8a66597.h> | ||
22 | #include <video/sh_mobile_lcdc.h> | 23 | #include <video/sh_mobile_lcdc.h> |
23 | #include <media/sh_mobile_ceu.h> | 24 | #include <media/sh_mobile_ceu.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/heartbeat.h> | 26 | #include <asm/heartbeat.h> |
27 | #include <asm/sh_eth.h> | ||
28 | #include <asm/clock.h> | ||
26 | #include <asm/sh_keysc.h> | 29 | #include <asm/sh_keysc.h> |
27 | #include <cpu/sh7724.h> | 30 | #include <cpu/sh7724.h> |
28 | #include <mach-se/mach/se7724.h> | 31 | #include <mach-se/mach/se7724.h> |
@@ -272,6 +275,62 @@ static struct platform_device keysc_device = { | |||
272 | }, | 275 | }, |
273 | }; | 276 | }; |
274 | 277 | ||
278 | /* SH Eth */ | ||
279 | static struct resource sh_eth_resources[] = { | ||
280 | [0] = { | ||
281 | .start = SH_ETH_ADDR, | ||
282 | .end = SH_ETH_ADDR + 0x1FC, | ||
283 | .flags = IORESOURCE_MEM, | ||
284 | }, | ||
285 | [1] = { | ||
286 | .start = 91, | ||
287 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
288 | }, | ||
289 | }; | ||
290 | |||
291 | struct sh_eth_plat_data sh_eth_plat = { | ||
292 | .phy = 0x1f, /* SMSC LAN8187 */ | ||
293 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
294 | }; | ||
295 | |||
296 | static struct platform_device sh_eth_device = { | ||
297 | .name = "sh-eth", | ||
298 | .id = 0, | ||
299 | .dev = { | ||
300 | .platform_data = &sh_eth_plat, | ||
301 | }, | ||
302 | .num_resources = ARRAY_SIZE(sh_eth_resources), | ||
303 | .resource = sh_eth_resources, | ||
304 | }; | ||
305 | |||
306 | static struct r8a66597_platdata sh7724_usb0_host_data = { | ||
307 | }; | ||
308 | |||
309 | static struct resource sh7724_usb0_host_resources[] = { | ||
310 | [0] = { | ||
311 | .start = 0xa4d80000, | ||
312 | .end = 0xa4d800ff, | ||
313 | .flags = IORESOURCE_MEM, | ||
314 | }, | ||
315 | [1] = { | ||
316 | .start = 65, | ||
317 | .end = 65, | ||
318 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, | ||
319 | }, | ||
320 | }; | ||
321 | |||
322 | static struct platform_device sh7724_usb0_host_device = { | ||
323 | .name = "r8a66597_hcd", | ||
324 | .id = 0, | ||
325 | .dev = { | ||
326 | .dma_mask = NULL, /* not use dma */ | ||
327 | .coherent_dma_mask = 0xffffffff, | ||
328 | .platform_data = &sh7724_usb0_host_data, | ||
329 | }, | ||
330 | .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), | ||
331 | .resource = sh7724_usb0_host_resources, | ||
332 | }; | ||
333 | |||
275 | static struct platform_device *ms7724se_devices[] __initdata = { | 334 | static struct platform_device *ms7724se_devices[] __initdata = { |
276 | &heartbeat_device, | 335 | &heartbeat_device, |
277 | &smc91x_eth_device, | 336 | &smc91x_eth_device, |
@@ -280,11 +339,62 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
280 | &ceu0_device, | 339 | &ceu0_device, |
281 | &ceu1_device, | 340 | &ceu1_device, |
282 | &keysc_device, | 341 | &keysc_device, |
342 | &sh_eth_device, | ||
343 | &sh7724_usb0_host_device, | ||
283 | }; | 344 | }; |
284 | 345 | ||
346 | #define EEPROM_OP 0xBA206000 | ||
347 | #define EEPROM_ADR 0xBA206004 | ||
348 | #define EEPROM_DATA 0xBA20600C | ||
349 | #define EEPROM_STAT 0xBA206010 | ||
350 | #define EEPROM_STRT 0xBA206014 | ||
351 | static int __init sh_eth_is_eeprom_ready(void) | ||
352 | { | ||
353 | int t = 10000; | ||
354 | |||
355 | while (t--) { | ||
356 | if (!ctrl_inw(EEPROM_STAT)) | ||
357 | return 1; | ||
358 | cpu_relax(); | ||
359 | } | ||
360 | |||
361 | printk(KERN_ERR "ms7724se can not access to eeprom\n"); | ||
362 | return 0; | ||
363 | } | ||
364 | |||
365 | static void __init sh_eth_init(void) | ||
366 | { | ||
367 | int i; | ||
368 | u16 mac[3]; | ||
369 | |||
370 | /* check EEPROM status */ | ||
371 | if (!sh_eth_is_eeprom_ready()) | ||
372 | return; | ||
373 | |||
374 | /* read MAC addr from EEPROM */ | ||
375 | for (i = 0 ; i < 3 ; i++) { | ||
376 | ctrl_outw(0x0, EEPROM_OP); /* read */ | ||
377 | ctrl_outw(i*2, EEPROM_ADR); | ||
378 | ctrl_outw(0x1, EEPROM_STRT); | ||
379 | if (!sh_eth_is_eeprom_ready()) | ||
380 | return; | ||
381 | |||
382 | mac[i] = ctrl_inw(EEPROM_DATA); | ||
383 | mac[i] = ((mac[i] & 0xFF) << 8) | (mac[i] >> 8); /* swap */ | ||
384 | } | ||
385 | |||
386 | /* reset sh-eth */ | ||
387 | ctrl_outl(0x1, SH_ETH_ADDR + 0x0); | ||
388 | |||
389 | /* set MAC addr */ | ||
390 | ctrl_outl(((mac[0] << 16) | (mac[1])), SH_ETH_MAHR); | ||
391 | ctrl_outl((mac[2]), SH_ETH_MALR); | ||
392 | } | ||
393 | |||
285 | #define SW4140 0xBA201000 | 394 | #define SW4140 0xBA201000 |
286 | #define FPGA_OUT 0xBA200400 | 395 | #define FPGA_OUT 0xBA200400 |
287 | #define PORT_HIZA 0xA4050158 | 396 | #define PORT_HIZA 0xA4050158 |
397 | #define PORT_MSELCRB 0xA4050182 | ||
288 | 398 | ||
289 | #define SW41_A 0x0100 | 399 | #define SW41_A 0x0100 |
290 | #define SW41_B 0x0200 | 400 | #define SW41_B 0x0200 |
@@ -294,6 +404,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
294 | #define SW41_F 0x2000 | 404 | #define SW41_F 0x2000 |
295 | #define SW41_G 0x4000 | 405 | #define SW41_G 0x4000 |
296 | #define SW41_H 0x8000 | 406 | #define SW41_H 0x8000 |
407 | |||
297 | static int __init devices_setup(void) | 408 | static int __init devices_setup(void) |
298 | { | 409 | { |
299 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ | 410 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ |
@@ -302,9 +413,16 @@ static int __init devices_setup(void) | |||
302 | ctrl_outw(ctrl_inw(FPGA_OUT) & | 413 | ctrl_outw(ctrl_inw(FPGA_OUT) & |
303 | ~((1 << 1) | /* LAN */ | 414 | ~((1 << 1) | /* LAN */ |
304 | (1 << 6) | /* VIDEO DAC */ | 415 | (1 << 6) | /* VIDEO DAC */ |
305 | (1 << 12)), /* USB0 */ | 416 | (1 << 12) | /* USB0 */ |
417 | (1 << 14)), /* RMII */ | ||
306 | FPGA_OUT); | 418 | FPGA_OUT); |
307 | 419 | ||
420 | /* turn on USB clocks, use external clock */ | ||
421 | ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); | ||
422 | |||
423 | /* enable USB0 port */ | ||
424 | ctrl_outw(0x0600, 0xa40501d4); | ||
425 | |||
308 | /* enable IRQ 0,1,2 */ | 426 | /* enable IRQ 0,1,2 */ |
309 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | 427 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); |
310 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | 428 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); |
@@ -374,7 +492,7 @@ static int __init devices_setup(void) | |||
374 | gpio_request(GPIO_FN_VIO0_CLK, NULL); | 492 | gpio_request(GPIO_FN_VIO0_CLK, NULL); |
375 | gpio_request(GPIO_FN_VIO0_FLD, NULL); | 493 | gpio_request(GPIO_FN_VIO0_FLD, NULL); |
376 | gpio_request(GPIO_FN_VIO0_HD, NULL); | 494 | gpio_request(GPIO_FN_VIO0_HD, NULL); |
377 | platform_resource_setup_memory(&ceu0_device, "ceu", 4 << 20); | 495 | platform_resource_setup_memory(&ceu0_device, "ceu0", 4 << 20); |
378 | 496 | ||
379 | /* enable CEU1 */ | 497 | /* enable CEU1 */ |
380 | gpio_request(GPIO_FN_VIO1_D7, NULL); | 498 | gpio_request(GPIO_FN_VIO1_D7, NULL); |
@@ -389,7 +507,7 @@ static int __init devices_setup(void) | |||
389 | gpio_request(GPIO_FN_VIO1_HD, NULL); | 507 | gpio_request(GPIO_FN_VIO1_HD, NULL); |
390 | gpio_request(GPIO_FN_VIO1_VD, NULL); | 508 | gpio_request(GPIO_FN_VIO1_VD, NULL); |
391 | gpio_request(GPIO_FN_VIO1_CLK, NULL); | 509 | gpio_request(GPIO_FN_VIO1_CLK, NULL); |
392 | platform_resource_setup_memory(&ceu1_device, "ceu", 4 << 20); | 510 | platform_resource_setup_memory(&ceu1_device, "ceu1", 4 << 20); |
393 | 511 | ||
394 | /* KEYSC */ | 512 | /* KEYSC */ |
395 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); | 513 | gpio_request(GPIO_FN_KEYOUT5_IN5, NULL); |
@@ -404,6 +522,28 @@ static int __init devices_setup(void) | |||
404 | gpio_request(GPIO_FN_KEYOUT1, NULL); | 522 | gpio_request(GPIO_FN_KEYOUT1, NULL); |
405 | gpio_request(GPIO_FN_KEYOUT0, NULL); | 523 | gpio_request(GPIO_FN_KEYOUT0, NULL); |
406 | 524 | ||
525 | /* | ||
526 | * enable SH-Eth | ||
527 | * | ||
528 | * please remove J33 pin from your board !! | ||
529 | * | ||
530 | * ms7724 board should not use GPIO_FN_LNKSTA pin | ||
531 | * So, This time PTX5 is set to input pin | ||
532 | */ | ||
533 | gpio_request(GPIO_FN_RMII_RXD0, NULL); | ||
534 | gpio_request(GPIO_FN_RMII_RXD1, NULL); | ||
535 | gpio_request(GPIO_FN_RMII_TXD0, NULL); | ||
536 | gpio_request(GPIO_FN_RMII_TXD1, NULL); | ||
537 | gpio_request(GPIO_FN_RMII_REF_CLK, NULL); | ||
538 | gpio_request(GPIO_FN_RMII_TX_EN, NULL); | ||
539 | gpio_request(GPIO_FN_RMII_RX_ER, NULL); | ||
540 | gpio_request(GPIO_FN_RMII_CRS_DV, NULL); | ||
541 | gpio_request(GPIO_FN_MDIO, NULL); | ||
542 | gpio_request(GPIO_FN_MDC, NULL); | ||
543 | gpio_request(GPIO_PTX5, NULL); | ||
544 | gpio_direction_input(GPIO_PTX5); | ||
545 | sh_eth_init(); | ||
546 | |||
407 | if (sw & SW41_B) { | 547 | if (sw & SW41_B) { |
408 | /* SVGA */ | 548 | /* SVGA */ |
409 | lcdc_info.ch[0].lcd_cfg.xres = 800; | 549 | lcdc_info.ch[0].lcd_cfg.xres = 800; |
@@ -437,7 +577,7 @@ static int __init devices_setup(void) | |||
437 | } | 577 | } |
438 | 578 | ||
439 | return platform_add_devices(ms7724se_devices, | 579 | return platform_add_devices(ms7724se_devices, |
440 | ARRAY_SIZE(ms7724se_devices)); | 580 | ARRAY_SIZE(ms7724se_devices)); |
441 | } | 581 | } |
442 | device_initcall(devices_setup); | 582 | device_initcall(devices_setup); |
443 | 583 | ||
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..d8e6bb9c0ccc 100644 --- a/arch/sh/include/asm/perf_counter.h +++ b/arch/sh/include/asm/perf_counter.h | |||
@@ -2,6 +2,8 @@ | |||
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 | |||
7 | #define PERF_COUNTER_INDEX_OFFSET 0 | ||
6 | 8 | ||
7 | #endif /* __ASM_SH_PERF_COUNTER_H */ | 9 | #endif /* __ASM_SH_PERF_COUNTER_H */ |
diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h index 84dd2db7104c..63ca37bd9a95 100644 --- a/arch/sh/include/asm/pgalloc.h +++ b/arch/sh/include/asm/pgalloc.h | |||
@@ -73,20 +73,12 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t pte) | |||
73 | quicklist_free_page(QUICK_PT, NULL, pte); | 73 | quicklist_free_page(QUICK_PT, NULL, pte); |
74 | } | 74 | } |
75 | 75 | ||
76 | #define __pte_free_tlb(tlb,pte) \ | 76 | #define __pte_free_tlb(tlb,pte,addr) \ |
77 | do { \ | 77 | do { \ |
78 | pgtable_page_dtor(pte); \ | 78 | pgtable_page_dtor(pte); \ |
79 | tlb_remove_page((tlb), (pte)); \ | 79 | tlb_remove_page((tlb), (pte)); \ |
80 | } while (0) | 80 | } while (0) |
81 | 81 | ||
82 | /* | ||
83 | * allocating and freeing a pmd is trivial: the 1-entry pmd is | ||
84 | * inside the pgd, so has no extra memory associated with it. | ||
85 | */ | ||
86 | |||
87 | #define pmd_free(mm, x) do { } while (0) | ||
88 | #define __pmd_free_tlb(tlb,x) do { } while (0) | ||
89 | |||
90 | static inline void check_pgt_cache(void) | 82 | static inline void check_pgt_cache(void) |
91 | { | 83 | { |
92 | quicklist_trim(QUICK_PGD, NULL, 25, 16); | 84 | quicklist_trim(QUICK_PGD, NULL, 25, 16); |
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/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index f09ac4806294..d570ac2e5cb9 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -51,7 +51,7 @@ struct thread_info { | |||
51 | .exec_domain = &default_exec_domain, \ | 51 | .exec_domain = &default_exec_domain, \ |
52 | .flags = 0, \ | 52 | .flags = 0, \ |
53 | .cpu = 0, \ | 53 | .cpu = 0, \ |
54 | .preempt_count = 1, \ | 54 | .preempt_count = INIT_PREEMPT_COUNT, \ |
55 | .addr_limit = KERNEL_DS, \ | 55 | .addr_limit = KERNEL_DS, \ |
56 | .restart_block = { \ | 56 | .restart_block = { \ |
57 | .fn = do_no_restart_syscall, \ | 57 | .fn = do_no_restart_syscall, \ |
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h index 9c16f737074a..da8fe7ab8728 100644 --- a/arch/sh/include/asm/tlb.h +++ b/arch/sh/include/asm/tlb.h | |||
@@ -91,9 +91,9 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) | 93 | #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) |
94 | #define pte_free_tlb(tlb, ptep) pte_free((tlb)->mm, ptep) | 94 | #define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep) |
95 | #define pmd_free_tlb(tlb, pmdp) pmd_free((tlb)->mm, pmdp) | 95 | #define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) |
96 | #define pud_free_tlb(tlb, pudp) pud_free((tlb)->mm, pudp) | 96 | #define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) |
97 | 97 | ||
98 | #define tlb_migrate_finish(mm) do { } while (0) | 98 | #define tlb_migrate_finish(mm) do { } while (0) |
99 | 99 | ||
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/tlb-sh3.c b/arch/sh/mm/tlb-sh3.c index 7fbfd5a11ffa..17cb7c3adf22 100644 --- a/arch/sh/mm/tlb-sh3.c +++ b/arch/sh/mm/tlb-sh3.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/mman.h> | 18 | #include <linux/mman.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/smp_lock.h> | ||
22 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
23 | 22 | ||
24 | #include <asm/system.h> | 23 | #include <asm/system.h> |
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 |