aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/clock.c2
-rw-r--r--arch/arm/mach-davinci/board-tnetv107x-evm.c6
-rw-r--r--arch/arm/mach-davinci/da830.c48
-rw-r--r--arch/arm/mach-davinci/da850.c6
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c4
-rw-r--r--arch/arm/mach-omap2/display.c6
-rw-r--r--arch/arm64/include/asm/compat.h60
-rw-r--r--arch/arm64/kernel/signal32.c53
-rw-r--r--arch/avr32/include/asm/elf.h3
-rw-r--r--arch/blackfin/include/asm/elf.h3
-rw-r--r--arch/c6x/include/asm/elf.h3
-rw-r--r--arch/cris/include/asm/elf.h3
-rw-r--r--arch/frv/include/asm/elf.h3
-rw-r--r--arch/frv/kernel/pm.c19
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/frv/mb93090-mb00/pci-irq.c2
-rw-r--r--arch/h8300/include/asm/elf.h3
-rw-r--r--arch/h8300/kernel/sys_h8300.c1
-rw-r--r--arch/h8300/kernel/timer/itu.c2
-rw-r--r--arch/h8300/kernel/timer/timer16.c2
-rw-r--r--arch/h8300/kernel/timer/timer8.c2
-rw-r--r--arch/h8300/kernel/timer/tpu.c2
-rw-r--r--arch/h8300/platform/h8300h/irq.c4
-rw-r--r--arch/h8300/platform/h8s/irq.c4
-rw-r--r--arch/hexagon/include/asm/elf.h3
-rw-r--r--arch/ia64/xen/irq_xen.c2
-rw-r--r--arch/ia64/xen/irq_xen.h2
-rw-r--r--arch/m32r/include/asm/elf.h3
-rw-r--r--arch/m68k/include/asm/elf.h3
-rw-r--r--arch/microblaze/include/asm/elf.h3
-rw-r--r--arch/mips/bcm63xx/boards/board_bcm963xx.c2
-rw-r--r--arch/mips/include/asm/compat-signal.h62
-rw-r--r--arch/mips/include/asm/compat.h69
-rw-r--r--arch/mips/pci/pci-octeon.c2
-rw-r--r--arch/mn10300/Makefile2
-rw-r--r--arch/mn10300/include/asm/elf.h3
-rw-r--r--arch/openrisc/include/asm/elf.h3
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/parisc/include/asm/compat.h59
-rw-r--r--arch/parisc/kernel/signal32.h52
-rw-r--r--arch/powerpc/include/asm/bitops.h10
-rw-r--r--arch/powerpc/include/asm/compat.h60
-rw-r--r--arch/powerpc/include/asm/siginfo.h1
-rw-r--r--arch/powerpc/kernel/ppc32.h51
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c2
-rw-r--r--arch/powerpc/platforms/512x/mpc5121_generic.c2
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c2
-rw-r--r--arch/powerpc/platforms/52xx/media5200.c2
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c2
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c2
-rw-r--r--arch/s390/include/asm/compat.h75
-rw-r--r--arch/s390/kernel/compat_linux.h68
-rw-r--r--arch/score/Kconfig1
-rw-r--r--arch/score/include/asm/elf.h2
-rw-r--r--arch/score/kernel/sys_score.c1
-rw-r--r--arch/sh/include/asm/elf.h3
-rw-r--r--arch/sh/include/asm/io.h2
-rw-r--r--arch/sh/kernel/ioport.c2
-rw-r--r--arch/sparc/include/asm/compat.h61
-rw-r--r--arch/sparc/include/asm/elf_32.h3
-rw-r--r--arch/sparc/include/asm/siginfo.h1
-rw-r--r--arch/sparc/kernel/signal32.c52
-rw-r--r--arch/tile/include/asm/compat.h62
-rw-r--r--arch/tile/include/asm/elf.h4
-rw-r--r--arch/tile/kernel/compat_signal.c57
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/x86/include/asm/apic.h2
-rw-r--r--arch/x86/include/asm/compat.h74
-rw-r--r--arch/x86/include/asm/ia32.h67
-rw-r--r--arch/x86/kernel/apic/apic_numachip.c4
-rw-r--r--arch/x86/kernel/rtc.c2
-rw-r--r--arch/xtensa/include/asm/elf.h3
72 files changed, 633 insertions, 562 deletions
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 188c82971ebd..33361505c0cd 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -625,7 +625,7 @@ fail:
625 return 0; 625 return 0;
626} 626}
627 627
628static struct clk *const standard_pmc_clocks[] __initdata = { 628static struct clk *const standard_pmc_clocks[] __initconst = {
629 /* four primary clocks */ 629 /* four primary clocks */
630 &clk32k, 630 &clk32k,
631 &main_clk, 631 &main_clk,
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index ac4e003ad863..be3099733b1f 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -88,7 +88,7 @@ static struct davinci_mmc_config mmc_config = {
88 .version = MMC_CTLR_VERSION_1, 88 .version = MMC_CTLR_VERSION_1,
89}; 89};
90 90
91static const short sdio1_pins[] __initdata = { 91static const short sdio1_pins[] __initconst = {
92 TNETV107X_SDIO1_CLK_1, TNETV107X_SDIO1_CMD_1, 92 TNETV107X_SDIO1_CLK_1, TNETV107X_SDIO1_CMD_1,
93 TNETV107X_SDIO1_DATA0_1, TNETV107X_SDIO1_DATA1_1, 93 TNETV107X_SDIO1_DATA0_1, TNETV107X_SDIO1_DATA1_1,
94 TNETV107X_SDIO1_DATA2_1, TNETV107X_SDIO1_DATA3_1, 94 TNETV107X_SDIO1_DATA2_1, TNETV107X_SDIO1_DATA3_1,
@@ -96,12 +96,12 @@ static const short sdio1_pins[] __initdata = {
96 -1 96 -1
97}; 97};
98 98
99static const short uart1_pins[] __initdata = { 99static const short uart1_pins[] __initconst = {
100 TNETV107X_UART1_RD, TNETV107X_UART1_TD, 100 TNETV107X_UART1_RD, TNETV107X_UART1_TD,
101 -1 101 -1
102}; 102};
103 103
104static const short ssp_pins[] __initdata = { 104static const short ssp_pins[] __initconst = {
105 TNETV107X_SSP0_0, TNETV107X_SSP0_1, TNETV107X_SSP0_2, 105 TNETV107X_SSP0_0, TNETV107X_SSP0_1, TNETV107X_SSP0_2,
106 TNETV107X_SSP1_0, TNETV107X_SSP1_1, TNETV107X_SSP1_2, 106 TNETV107X_SSP1_0, TNETV107X_SSP1_1, TNETV107X_SSP1_2,
107 TNETV107X_SSP1_3, -1 107 TNETV107X_SSP1_3, -1
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index deee5c2da754..510648e0394b 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -838,7 +838,7 @@ static const struct mux_config da830_pins[] = {
838#endif 838#endif
839}; 839};
840 840
841const short da830_emif25_pins[] __initdata = { 841const short da830_emif25_pins[] __initconst = {
842 DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3, 842 DA830_EMA_D_0, DA830_EMA_D_1, DA830_EMA_D_2, DA830_EMA_D_3,
843 DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7, 843 DA830_EMA_D_4, DA830_EMA_D_5, DA830_EMA_D_6, DA830_EMA_D_7,
844 DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11, 844 DA830_EMA_D_8, DA830_EMA_D_9, DA830_EMA_D_10, DA830_EMA_D_11,
@@ -853,19 +853,19 @@ const short da830_emif25_pins[] __initdata = {
853 -1 853 -1
854}; 854};
855 855
856const short da830_spi0_pins[] __initdata = { 856const short da830_spi0_pins[] __initconst = {
857 DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA, 857 DA830_SPI0_SOMI_0, DA830_SPI0_SIMO_0, DA830_SPI0_CLK, DA830_NSPI0_ENA,
858 DA830_NSPI0_SCS_0, 858 DA830_NSPI0_SCS_0,
859 -1 859 -1
860}; 860};
861 861
862const short da830_spi1_pins[] __initdata = { 862const short da830_spi1_pins[] __initconst = {
863 DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA, 863 DA830_SPI1_SOMI_0, DA830_SPI1_SIMO_0, DA830_SPI1_CLK, DA830_NSPI1_ENA,
864 DA830_NSPI1_SCS_0, 864 DA830_NSPI1_SCS_0,
865 -1 865 -1
866}; 866};
867 867
868const short da830_mmc_sd_pins[] __initdata = { 868const short da830_mmc_sd_pins[] __initconst = {
869 DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2, 869 DA830_MMCSD_DAT_0, DA830_MMCSD_DAT_1, DA830_MMCSD_DAT_2,
870 DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5, 870 DA830_MMCSD_DAT_3, DA830_MMCSD_DAT_4, DA830_MMCSD_DAT_5,
871 DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK, 871 DA830_MMCSD_DAT_6, DA830_MMCSD_DAT_7, DA830_MMCSD_CLK,
@@ -873,32 +873,32 @@ const short da830_mmc_sd_pins[] __initdata = {
873 -1 873 -1
874}; 874};
875 875
876const short da830_uart0_pins[] __initdata = { 876const short da830_uart0_pins[] __initconst = {
877 DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD, 877 DA830_NUART0_CTS, DA830_NUART0_RTS, DA830_UART0_RXD, DA830_UART0_TXD,
878 -1 878 -1
879}; 879};
880 880
881const short da830_uart1_pins[] __initdata = { 881const short da830_uart1_pins[] __initconst = {
882 DA830_UART1_RXD, DA830_UART1_TXD, 882 DA830_UART1_RXD, DA830_UART1_TXD,
883 -1 883 -1
884}; 884};
885 885
886const short da830_uart2_pins[] __initdata = { 886const short da830_uart2_pins[] __initconst = {
887 DA830_UART2_RXD, DA830_UART2_TXD, 887 DA830_UART2_RXD, DA830_UART2_TXD,
888 -1 888 -1
889}; 889};
890 890
891const short da830_usb20_pins[] __initdata = { 891const short da830_usb20_pins[] __initconst = {
892 DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN, 892 DA830_USB0_DRVVBUS, DA830_USB_REFCLKIN,
893 -1 893 -1
894}; 894};
895 895
896const short da830_usb11_pins[] __initdata = { 896const short da830_usb11_pins[] __initconst = {
897 DA830_USB_REFCLKIN, 897 DA830_USB_REFCLKIN,
898 -1 898 -1
899}; 899};
900 900
901const short da830_uhpi_pins[] __initdata = { 901const short da830_uhpi_pins[] __initconst = {
902 DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3, 902 DA830_UHPI_HD_0, DA830_UHPI_HD_1, DA830_UHPI_HD_2, DA830_UHPI_HD_3,
903 DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7, 903 DA830_UHPI_HD_4, DA830_UHPI_HD_5, DA830_UHPI_HD_6, DA830_UHPI_HD_7,
904 DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11, 904 DA830_UHPI_HD_8, DA830_UHPI_HD_9, DA830_UHPI_HD_10, DA830_UHPI_HD_11,
@@ -909,14 +909,14 @@ const short da830_uhpi_pins[] __initdata = {
909 -1 909 -1
910}; 910};
911 911
912const short da830_cpgmac_pins[] __initdata = { 912const short da830_cpgmac_pins[] __initconst = {
913 DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV, 913 DA830_RMII_TXD_0, DA830_RMII_TXD_1, DA830_RMII_TXEN, DA830_RMII_CRS_DV,
914 DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK, 914 DA830_RMII_RXD_0, DA830_RMII_RXD_1, DA830_RMII_RXER, DA830_MDIO_CLK,
915 DA830_MDIO_D, 915 DA830_MDIO_D,
916 -1 916 -1
917}; 917};
918 918
919const short da830_emif3c_pins[] __initdata = { 919const short da830_emif3c_pins[] __initconst = {
920 DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0, 920 DA830_EMB_SDCKE, DA830_EMB_CLK_GLUE, DA830_EMB_CLK, DA830_NEMB_CS_0,
921 DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1, 921 DA830_NEMB_CAS, DA830_NEMB_RAS, DA830_NEMB_WE, DA830_EMB_BA_1,
922 DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2, 922 DA830_EMB_BA_0, DA830_EMB_A_0, DA830_EMB_A_1, DA830_EMB_A_2,
@@ -935,7 +935,7 @@ const short da830_emif3c_pins[] __initdata = {
935 -1 935 -1
936}; 936};
937 937
938const short da830_mcasp0_pins[] __initdata = { 938const short da830_mcasp0_pins[] __initconst = {
939 DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0, 939 DA830_AHCLKX0, DA830_ACLKX0, DA830_AFSX0,
940 DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0, 940 DA830_AHCLKR0, DA830_ACLKR0, DA830_AFSR0, DA830_AMUTE0,
941 DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3, 941 DA830_AXR0_0, DA830_AXR0_1, DA830_AXR0_2, DA830_AXR0_3,
@@ -945,7 +945,7 @@ const short da830_mcasp0_pins[] __initdata = {
945 -1 945 -1
946}; 946};
947 947
948const short da830_mcasp1_pins[] __initdata = { 948const short da830_mcasp1_pins[] __initconst = {
949 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1, 949 DA830_AHCLKX1, DA830_ACLKX1, DA830_AFSX1,
950 DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1, 950 DA830_AHCLKR1, DA830_ACLKR1, DA830_AFSR1, DA830_AMUTE1,
951 DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3, 951 DA830_AXR1_0, DA830_AXR1_1, DA830_AXR1_2, DA830_AXR1_3,
@@ -954,24 +954,24 @@ const short da830_mcasp1_pins[] __initdata = {
954 -1 954 -1
955}; 955};
956 956
957const short da830_mcasp2_pins[] __initdata = { 957const short da830_mcasp2_pins[] __initconst = {
958 DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2, 958 DA830_AHCLKX2, DA830_ACLKX2, DA830_AFSX2,
959 DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2, 959 DA830_AHCLKR2, DA830_ACLKR2, DA830_AFSR2, DA830_AMUTE2,
960 DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3, 960 DA830_AXR2_0, DA830_AXR2_1, DA830_AXR2_2, DA830_AXR2_3,
961 -1 961 -1
962}; 962};
963 963
964const short da830_i2c0_pins[] __initdata = { 964const short da830_i2c0_pins[] __initconst = {
965 DA830_I2C0_SDA, DA830_I2C0_SCL, 965 DA830_I2C0_SDA, DA830_I2C0_SCL,
966 -1 966 -1
967}; 967};
968 968
969const short da830_i2c1_pins[] __initdata = { 969const short da830_i2c1_pins[] __initconst = {
970 DA830_I2C1_SCL, DA830_I2C1_SDA, 970 DA830_I2C1_SCL, DA830_I2C1_SDA,
971 -1 971 -1
972}; 972};
973 973
974const short da830_lcdcntl_pins[] __initdata = { 974const short da830_lcdcntl_pins[] __initconst = {
975 DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3, 975 DA830_LCD_D_0, DA830_LCD_D_1, DA830_LCD_D_2, DA830_LCD_D_3,
976 DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7, 976 DA830_LCD_D_4, DA830_LCD_D_5, DA830_LCD_D_6, DA830_LCD_D_7,
977 DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11, 977 DA830_LCD_D_8, DA830_LCD_D_9, DA830_LCD_D_10, DA830_LCD_D_11,
@@ -981,34 +981,34 @@ const short da830_lcdcntl_pins[] __initdata = {
981 -1 981 -1
982}; 982};
983 983
984const short da830_pwm_pins[] __initdata = { 984const short da830_pwm_pins[] __initconst = {
985 DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A, 985 DA830_ECAP0_APWM0, DA830_ECAP1_APWM1, DA830_EPWM0B, DA830_EPWM0A,
986 DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ, 986 DA830_EPWMSYNCI, DA830_EPWMSYNC0, DA830_ECAP2_APWM2, DA830_EHRPWMGLUETZ,
987 DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A, 987 DA830_EPWM2B, DA830_EPWM2A, DA830_EPWM1B, DA830_EPWM1A,
988 -1 988 -1
989}; 989};
990 990
991const short da830_ecap0_pins[] __initdata = { 991const short da830_ecap0_pins[] __initconst = {
992 DA830_ECAP0_APWM0, 992 DA830_ECAP0_APWM0,
993 -1 993 -1
994}; 994};
995 995
996const short da830_ecap1_pins[] __initdata = { 996const short da830_ecap1_pins[] __initconst = {
997 DA830_ECAP1_APWM1, 997 DA830_ECAP1_APWM1,
998 -1 998 -1
999}; 999};
1000 1000
1001const short da830_ecap2_pins[] __initdata = { 1001const short da830_ecap2_pins[] __initconst = {
1002 DA830_ECAP2_APWM2, 1002 DA830_ECAP2_APWM2,
1003 -1 1003 -1
1004}; 1004};
1005 1005
1006const short da830_eqep0_pins[] __initdata = { 1006const short da830_eqep0_pins[] __initconst = {
1007 DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B, 1007 DA830_EQEP0I, DA830_EQEP0S, DA830_EQEP0A, DA830_EQEP0B,
1008 -1 1008 -1
1009}; 1009};
1010 1010
1011const short da830_eqep1_pins[] __initdata = { 1011const short da830_eqep1_pins[] __initconst = {
1012 DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B, 1012 DA830_EQEP1I, DA830_EQEP1S, DA830_EQEP1A, DA830_EQEP1B,
1013 -1 1013 -1
1014}; 1014};
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index b44dc844e15e..6676dee7104e 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -576,17 +576,17 @@ static const struct mux_config da850_pins[] = {
576#endif 576#endif
577}; 577};
578 578
579const short da850_i2c0_pins[] __initdata = { 579const short da850_i2c0_pins[] __initconst = {
580 DA850_I2C0_SDA, DA850_I2C0_SCL, 580 DA850_I2C0_SDA, DA850_I2C0_SCL,
581 -1 581 -1
582}; 582};
583 583
584const short da850_i2c1_pins[] __initdata = { 584const short da850_i2c1_pins[] __initconst = {
585 DA850_I2C1_SCL, DA850_I2C1_SDA, 585 DA850_I2C1_SCL, DA850_I2C1_SDA,
586 -1 586 -1
587}; 587};
588 588
589const short da850_lcdcntl_pins[] __initdata = { 589const short da850_lcdcntl_pins[] __initconst = {
590 DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3, 590 DA850_LCD_D_0, DA850_LCD_D_1, DA850_LCD_D_2, DA850_LCD_D_3,
591 DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7, 591 DA850_LCD_D_4, DA850_LCD_D_5, DA850_LCD_D_6, DA850_LCD_D_7,
592 DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11, 592 DA850_LCD_D_8, DA850_LCD_D_9, DA850_LCD_D_10, DA850_LCD_D_11,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index a344a373928b..2448fcf09eb1 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -37,8 +37,8 @@
37#include "devices.h" 37#include "devices.h"
38#include "common.h" 38#include "common.h"
39 39
40static const resource_size_t qsd8x50_surf_smc91x_base __initdata = 0x70000300; 40static const resource_size_t qsd8x50_surf_smc91x_base __initconst = 0x70000300;
41static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156; 41static const unsigned qsd8x50_surf_smc91x_gpio __initconst = 156;
42 42
43/* Leave smc91x resources empty here, as we'll fill them in 43/* Leave smc91x resources empty here, as we'll fill them in
44 * at run-time: they vary from board to board, and the true 44 * at run-time: they vary from board to board, and the true
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index af1ed7d24a1f..e470c6e50acd 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -76,14 +76,14 @@ struct omap_dss_hwmod_data {
76 const int id; 76 const int id;
77}; 77};
78 78
79static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initdata = { 79static const struct omap_dss_hwmod_data omap2_dss_hwmod_data[] __initconst = {
80 { "dss_core", "omapdss_dss", -1 }, 80 { "dss_core", "omapdss_dss", -1 },
81 { "dss_dispc", "omapdss_dispc", -1 }, 81 { "dss_dispc", "omapdss_dispc", -1 },
82 { "dss_rfbi", "omapdss_rfbi", -1 }, 82 { "dss_rfbi", "omapdss_rfbi", -1 },
83 { "dss_venc", "omapdss_venc", -1 }, 83 { "dss_venc", "omapdss_venc", -1 },
84}; 84};
85 85
86static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = { 86static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initconst = {
87 { "dss_core", "omapdss_dss", -1 }, 87 { "dss_core", "omapdss_dss", -1 },
88 { "dss_dispc", "omapdss_dispc", -1 }, 88 { "dss_dispc", "omapdss_dispc", -1 },
89 { "dss_rfbi", "omapdss_rfbi", -1 }, 89 { "dss_rfbi", "omapdss_rfbi", -1 },
@@ -91,7 +91,7 @@ static const struct omap_dss_hwmod_data omap3_dss_hwmod_data[] __initdata = {
91 { "dss_dsi1", "omapdss_dsi", 0 }, 91 { "dss_dsi1", "omapdss_dsi", 0 },
92}; 92};
93 93
94static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = { 94static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
95 { "dss_core", "omapdss_dss", -1 }, 95 { "dss_core", "omapdss_dss", -1 },
96 { "dss_dispc", "omapdss_dispc", -1 }, 96 { "dss_dispc", "omapdss_dispc", -1 },
97 { "dss_rfbi", "omapdss_rfbi", -1 }, 97 { "dss_rfbi", "omapdss_rfbi", -1 },
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index a670a33ad736..37e610dc084e 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -55,6 +55,7 @@ typedef s64 compat_s64;
55typedef u32 compat_uint_t; 55typedef u32 compat_uint_t;
56typedef u32 compat_ulong_t; 56typedef u32 compat_ulong_t;
57typedef u64 compat_u64; 57typedef u64 compat_u64;
58typedef u32 compat_uptr_t;
58 59
59struct compat_timespec { 60struct compat_timespec {
60 compat_time_t tv_sec; 61 compat_time_t tv_sec;
@@ -130,6 +131,64 @@ typedef u32 compat_old_sigset_t;
130 131
131typedef u32 compat_sigset_word; 132typedef u32 compat_sigset_word;
132 133
134typedef union compat_sigval {
135 compat_int_t sival_int;
136 compat_uptr_t sival_ptr;
137} compat_sigval_t;
138
139typedef struct compat_siginfo {
140 int si_signo;
141 int si_errno;
142 int si_code;
143
144 union {
145 /* The padding is the same size as AArch64. */
146 int _pad[128/sizeof(int) - 3];
147
148 /* kill() */
149 struct {
150 compat_pid_t _pid; /* sender's pid */
151 __compat_uid32_t _uid; /* sender's uid */
152 } _kill;
153
154 /* POSIX.1b timers */
155 struct {
156 compat_timer_t _tid; /* timer id */
157 int _overrun; /* overrun count */
158 compat_sigval_t _sigval; /* same as below */
159 int _sys_private; /* not to be passed to user */
160 } _timer;
161
162 /* POSIX.1b signals */
163 struct {
164 compat_pid_t _pid; /* sender's pid */
165 __compat_uid32_t _uid; /* sender's uid */
166 compat_sigval_t _sigval;
167 } _rt;
168
169 /* SIGCHLD */
170 struct {
171 compat_pid_t _pid; /* which child */
172 __compat_uid32_t _uid; /* sender's uid */
173 int _status; /* exit code */
174 compat_clock_t _utime;
175 compat_clock_t _stime;
176 } _sigchld;
177
178 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
179 struct {
180 compat_uptr_t _addr; /* faulting insn/memory ref. */
181 short _addr_lsb; /* LSB of the reported address */
182 } _sigfault;
183
184 /* SIGPOLL */
185 struct {
186 compat_long_t _band; /* POLL_IN, POLL_OUT, POLL_MSG */
187 int _fd;
188 } _sigpoll;
189 } _sifields;
190} compat_siginfo_t;
191
133#define COMPAT_OFF_T_MAX 0x7fffffff 192#define COMPAT_OFF_T_MAX 0x7fffffff
134#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 193#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
135 194
@@ -139,7 +198,6 @@ typedef u32 compat_sigset_word;
139 * as pointers because the syscall entry code will have 198 * as pointers because the syscall entry code will have
140 * appropriately converted them already. 199 * appropriately converted them already.
141 */ 200 */
142typedef u32 compat_uptr_t;
143 201
144static inline void __user *compat_ptr(compat_uptr_t uptr) 202static inline void __user *compat_ptr(compat_uptr_t uptr)
145{ 203{
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index ac74c2f261e3..0790a87a4346 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -30,59 +30,6 @@
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/unistd.h> 31#include <asm/unistd.h>
32 32
33typedef struct compat_siginfo {
34 int si_signo;
35 int si_errno;
36 int si_code;
37
38 union {
39 /* The padding is the same size as AArch64. */
40 int _pad[SI_PAD_SIZE];
41
42 /* kill() */
43 struct {
44 compat_pid_t _pid; /* sender's pid */
45 __compat_uid32_t _uid; /* sender's uid */
46 } _kill;
47
48 /* POSIX.1b timers */
49 struct {
50 compat_timer_t _tid; /* timer id */
51 int _overrun; /* overrun count */
52 compat_sigval_t _sigval; /* same as below */
53 int _sys_private; /* not to be passed to user */
54 } _timer;
55
56 /* POSIX.1b signals */
57 struct {
58 compat_pid_t _pid; /* sender's pid */
59 __compat_uid32_t _uid; /* sender's uid */
60 compat_sigval_t _sigval;
61 } _rt;
62
63 /* SIGCHLD */
64 struct {
65 compat_pid_t _pid; /* which child */
66 __compat_uid32_t _uid; /* sender's uid */
67 int _status; /* exit code */
68 compat_clock_t _utime;
69 compat_clock_t _stime;
70 } _sigchld;
71
72 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
73 struct {
74 compat_uptr_t _addr; /* faulting insn/memory ref. */
75 short _addr_lsb; /* LSB of the reported address */
76 } _sigfault;
77
78 /* SIGPOLL */
79 struct {
80 compat_long_t _band; /* POLL_IN, POLL_OUT, POLL_MSG */
81 int _fd;
82 } _sigpoll;
83 } _sifields;
84} compat_siginfo_t;
85
86struct compat_sigaction { 33struct compat_sigaction {
87 compat_uptr_t sa_handler; 34 compat_uptr_t sa_handler;
88 compat_ulong_t sa_flags; 35 compat_ulong_t sa_flags;
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
index 3b3159b710d4..e2c328739808 100644
--- a/arch/avr32/include/asm/elf.h
+++ b/arch/avr32/include/asm/elf.h
@@ -102,6 +102,7 @@ typedef struct user_fpu_struct elf_fpregset_t;
102 102
103#define ELF_PLATFORM (NULL) 103#define ELF_PLATFORM (NULL)
104 104
105#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 105#define SET_PERSONALITY(ex) \
106 set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
106 107
107#endif /* __ASM_AVR32_ELF_H */ 108#endif /* __ASM_AVR32_ELF_H */
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h
index e6c6812a9abd..14bc98ff668f 100644
--- a/arch/blackfin/include/asm/elf.h
+++ b/arch/blackfin/include/asm/elf.h
@@ -132,6 +132,7 @@ do { \
132 132
133#define ELF_PLATFORM (NULL) 133#define ELF_PLATFORM (NULL)
134 134
135#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 135#define SET_PERSONALITY(ex) \
136 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
136 137
137#endif 138#endif
diff --git a/arch/c6x/include/asm/elf.h b/arch/c6x/include/asm/elf.h
index f4552db20b4a..32b997126adf 100644
--- a/arch/c6x/include/asm/elf.h
+++ b/arch/c6x/include/asm/elf.h
@@ -77,7 +77,8 @@ do { \
77 77
78#define ELF_PLATFORM (NULL) 78#define ELF_PLATFORM (NULL)
79 79
80#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 80#define SET_PERSONALITY(ex) \
81 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
81 82
82/* C6X specific section types */ 83/* C6X specific section types */
83#define SHT_C6000_UNWIND 0x70000001 84#define SHT_C6000_UNWIND 0x70000001
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h
index 8a3d8e2b33c1..8182f2dc89d0 100644
--- a/arch/cris/include/asm/elf.h
+++ b/arch/cris/include/asm/elf.h
@@ -86,6 +86,7 @@ typedef unsigned long elf_fpregset_t;
86 86
87#define ELF_PLATFORM (NULL) 87#define ELF_PLATFORM (NULL)
88 88
89#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 89#define SET_PERSONALITY(ex) \
90 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
90 91
91#endif 92#endif
diff --git a/arch/frv/include/asm/elf.h b/arch/frv/include/asm/elf.h
index c3819804a74b..9ccbc80f0b11 100644
--- a/arch/frv/include/asm/elf.h
+++ b/arch/frv/include/asm/elf.h
@@ -137,6 +137,7 @@ do { \
137 137
138#define ELF_PLATFORM (NULL) 138#define ELF_PLATFORM (NULL)
139 139
140#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 140#define SET_PERSONALITY(ex) \
141 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
141 142
142#endif 143#endif
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 5fa3889d858b..0b579927439d 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -153,23 +153,22 @@ static int user_atoi(char __user *ubuf, size_t len)
153static int sysctl_pm_do_suspend(ctl_table *ctl, int write, 153static int sysctl_pm_do_suspend(ctl_table *ctl, int write,
154 void __user *buffer, size_t *lenp, loff_t *fpos) 154 void __user *buffer, size_t *lenp, loff_t *fpos)
155{ 155{
156 int retval, mode; 156 int mode;
157 157
158 if (*lenp <= 0) 158 if (*lenp <= 0)
159 return -EIO; 159 return -EIO;
160 160
161 mode = user_atoi(buffer, *lenp); 161 mode = user_atoi(buffer, *lenp);
162 if ((mode != 1) && (mode != 5)) 162 switch (mode) {
163 return -EINVAL; 163 case 1:
164 return pm_do_suspend();
164 165
165 if (retval == 0) { 166 case 5:
166 if (mode == 5) 167 return pm_do_bus_sleep();
167 retval = pm_do_bus_sleep();
168 else
169 retval = pm_do_suspend();
170 }
171 168
172 return retval; 169 default:
170 return -EINVAL;
171 }
173} 172}
174 173
175static int try_set_cmode(int new_cmode) 174static int try_set_cmode(int new_cmode)
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 75cf7f4b2fa8..1f1e5efb3385 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -184,7 +184,7 @@ static struct clock_cmode __pminitdata clock_cmodes_fr555[16] = {
184 [6] = { _x1, _x1_5, _x1_5, _x4_5, _x0_375 }, 184 [6] = { _x1, _x1_5, _x1_5, _x4_5, _x0_375 },
185}; 185};
186 186
187static const struct clock_cmode __pminitdata *clock_cmodes; 187static const struct clock_cmode __pminitconst *clock_cmodes;
188static int __pminitdata clock_doubled; 188static int __pminitdata clock_doubled;
189 189
190static struct uart_port __pminitdata __frv_uart0 = { 190static struct uart_port __pminitdata __frv_uart0 = {
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 20f6497b2cd5..c677b9d81d30 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -28,7 +28,7 @@
28 * 28 *
29 */ 29 */
30 30
31static const uint8_t __initdata pci_bus0_irq_routing[32][4] = { 31static const uint8_t __initconst pci_bus0_irq_routing[32][4] = {
32 [0 ] = { IRQ_FPGA_MB86943_PCI_INTA }, 32 [0 ] = { IRQ_FPGA_MB86943_PCI_INTA },
33 [16] = { IRQ_FPGA_RTL8029_INTA }, 33 [16] = { IRQ_FPGA_RTL8029_INTA },
34 [17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB }, 34 [17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB },
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h
index c24fa250d653..41193c396bff 100644
--- a/arch/h8300/include/asm/elf.h
+++ b/arch/h8300/include/asm/elf.h
@@ -54,7 +54,8 @@ typedef unsigned long elf_fpregset_t;
54 54
55#define ELF_PLATFORM (NULL) 55#define ELF_PLATFORM (NULL)
56 56
57#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 57#define SET_PERSONALITY(ex) \
58 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
58 59
59#define R_H8_NONE 0 60#define R_H8_NONE 0
60#define R_H8_DIR32 1 61#define R_H8_DIR32 1
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c
index aaf5e5a48f93..4bdc7311784e 100644
--- a/arch/h8300/kernel/sys_h8300.c
+++ b/arch/h8300/kernel/sys_h8300.c
@@ -51,6 +51,7 @@ asmlinkage void syscall_print(void *dummy,...)
51 * Do a system call from kernel instead of calling sys_execve so we 51 * Do a system call from kernel instead of calling sys_execve so we
52 * end up with proper pt_regs. 52 * end up with proper pt_regs.
53 */ 53 */
54asmlinkage
54int kernel_execve(const char *filename, 55int kernel_execve(const char *filename,
55 const char *const argv[], 56 const char *const argv[],
56 const char *const envp[]) 57 const char *const envp[])
diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c
index a2ae5e952137..0a8b5cd5bf38 100644
--- a/arch/h8300/kernel/timer/itu.c
+++ b/arch/h8300/kernel/timer/itu.c
@@ -62,7 +62,7 @@ static struct irqaction itu_irq = {
62 .flags = IRQF_DISABLED | IRQF_TIMER, 62 .flags = IRQF_DISABLED | IRQF_TIMER,
63}; 63};
64 64
65static const int __initdata divide_rate[] = {1, 2, 4, 8}; 65static const int __initconst divide_rate[] = {1, 2, 4, 8};
66 66
67void __init h8300_timer_setup(void) 67void __init h8300_timer_setup(void)
68{ 68{
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c
index ae0d38161139..462d9f581719 100644
--- a/arch/h8300/kernel/timer/timer16.c
+++ b/arch/h8300/kernel/timer/timer16.c
@@ -57,7 +57,7 @@ static struct irqaction timer16_irq = {
57 .flags = IRQF_DISABLED | IRQF_TIMER, 57 .flags = IRQF_DISABLED | IRQF_TIMER,
58}; 58};
59 59
60static const int __initdata divide_rate[] = {1, 2, 4, 8}; 60static const int __initconst divide_rate[] = {1, 2, 4, 8};
61 61
62void __init h8300_timer_setup(void) 62void __init h8300_timer_setup(void)
63{ 63{
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c
index 7a1533fad47d..505f3415b40f 100644
--- a/arch/h8300/kernel/timer/timer8.c
+++ b/arch/h8300/kernel/timer/timer8.c
@@ -77,7 +77,7 @@ static struct irqaction timer8_irq = {
77 .flags = IRQF_DISABLED | IRQF_TIMER, 77 .flags = IRQF_DISABLED | IRQF_TIMER,
78}; 78};
79 79
80static const int __initdata divide_rate[] = {8, 64, 8192}; 80static const int __initconst divide_rate[] = {8, 64, 8192};
81 81
82void __init h8300_timer_setup(void) 82void __init h8300_timer_setup(void)
83{ 83{
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index 2193a2e2859a..0350f6204ecf 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -66,7 +66,7 @@ static struct irqaction tpu_irq = {
66 .flags = IRQF_DISABLED | IRQF_TIMER, 66 .flags = IRQF_DISABLED | IRQF_TIMER,
67}; 67};
68 68
69static const int __initdata divide_rate[] = { 69static const int __initconst divide_rate[] = {
70#if CONFIG_H8300_TPU_CH == 0 70#if CONFIG_H8300_TPU_CH == 0
71 1,4,16,64,0,0,0,0, 71 1,4,16,64,0,0,0,0,
72#elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5) 72#elif (CONFIG_H8300_TPU_CH == 1) || (CONFIG_H8300_TPU_CH == 5)
diff --git a/arch/h8300/platform/h8300h/irq.c b/arch/h8300/platform/h8300h/irq.c
index bc4f51bceef5..0a50353e09d5 100644
--- a/arch/h8300/platform/h8300h/irq.c
+++ b/arch/h8300/platform/h8300h/irq.c
@@ -14,14 +14,14 @@
14#include <asm/gpio-internal.h> 14#include <asm/gpio-internal.h>
15#include <asm/regs306x.h> 15#include <asm/regs306x.h>
16 16
17const int __initdata h8300_saved_vectors[] = { 17const int __initconst h8300_saved_vectors[] = {
18#if defined(CONFIG_GDB_DEBUG) 18#if defined(CONFIG_GDB_DEBUG)
19 TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */ 19 TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */
20#endif 20#endif
21 -1, 21 -1,
22}; 22};
23 23
24const h8300_vector __initdata h8300_trap_table[] = { 24const h8300_vector __initconst h8300_trap_table[] = {
25 0, 0, 0, 0, 0, 0, 0, 0, 25 0, 0, 0, 0, 0, 0, 0, 0,
26 system_call, 26 system_call,
27 0, 27 0,
diff --git a/arch/h8300/platform/h8s/irq.c b/arch/h8300/platform/h8s/irq.c
index 7b5f29febc07..f3a5511c16b1 100644
--- a/arch/h8300/platform/h8s/irq.c
+++ b/arch/h8300/platform/h8s/irq.c
@@ -18,7 +18,7 @@
18#include <asm/regs267x.h> 18#include <asm/regs267x.h>
19 19
20/* saved vector list */ 20/* saved vector list */
21const int __initdata h8300_saved_vectors[]={ 21const int __initconst h8300_saved_vectors[] = {
22#if defined(CONFIG_GDB_DEBUG) 22#if defined(CONFIG_GDB_DEBUG)
23 TRACE_VEC, 23 TRACE_VEC,
24 TRAP3_VEC, 24 TRAP3_VEC,
@@ -27,7 +27,7 @@ const int __initdata h8300_saved_vectors[]={
27}; 27};
28 28
29/* trap entry table */ 29/* trap entry table */
30const H8300_VECTOR __initdata h8300_trap_table[] = { 30const H8300_VECTOR __initconst h8300_trap_table[] = {
31 0,0,0,0,0, 31 0,0,0,0,0,
32 trace_break, /* TRACE */ 32 trace_break, /* TRACE */
33 0,0, 33 0,0,
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h
index 37976a0d3650..82b499621e05 100644
--- a/arch/hexagon/include/asm/elf.h
+++ b/arch/hexagon/include/asm/elf.h
@@ -217,7 +217,8 @@ do { \
217#define ELF_PLATFORM (NULL) 217#define ELF_PLATFORM (NULL)
218 218
219#ifdef __KERNEL__ 219#ifdef __KERNEL__
220#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 220#define SET_PERSONALITY(ex) \
221 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
221#endif 222#endif
222 223
223#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 224#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 3bb12230721f..01f479ee1c43 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -433,7 +433,7 @@ xen_resend_irq(unsigned int vector)
433 (void)resend_irq_on_evtchn(vector); 433 (void)resend_irq_on_evtchn(vector);
434} 434}
435 435
436const struct pv_irq_ops xen_irq_ops __initdata = { 436const struct pv_irq_ops xen_irq_ops __initconst = {
437 .register_ipi = xen_register_ipi, 437 .register_ipi = xen_register_ipi,
438 438
439 .assign_irq_vector = xen_assign_irq_vector, 439 .assign_irq_vector = xen_assign_irq_vector,
diff --git a/arch/ia64/xen/irq_xen.h b/arch/ia64/xen/irq_xen.h
index 26110f330c87..1778517b90fe 100644
--- a/arch/ia64/xen/irq_xen.h
+++ b/arch/ia64/xen/irq_xen.h
@@ -27,7 +27,7 @@ extern void (*late_time_init)(void);
27extern char xen_event_callback; 27extern char xen_event_callback;
28void __init xen_init_IRQ(void); 28void __init xen_init_IRQ(void);
29 29
30extern const struct pv_irq_ops xen_irq_ops __initdata; 30extern const struct pv_irq_ops xen_irq_ops __initconst;
31extern void xen_smp_intr_init(void); 31extern void xen_smp_intr_init(void);
32extern void xen_send_ipi(int cpu, int vec); 32extern void xen_send_ipi(int cpu, int vec);
33 33
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h
index b8da7d0574d2..70896161c636 100644
--- a/arch/m32r/include/asm/elf.h
+++ b/arch/m32r/include/asm/elf.h
@@ -128,6 +128,7 @@ typedef elf_fpreg_t elf_fpregset_t;
128 intent than poking at uname or /proc/cpuinfo. */ 128 intent than poking at uname or /proc/cpuinfo. */
129#define ELF_PLATFORM (NULL) 129#define ELF_PLATFORM (NULL)
130 130
131#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 131#define SET_PERSONALITY(ex) \
132 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
132 133
133#endif /* _ASM_M32R__ELF_H */ 134#endif /* _ASM_M32R__ELF_H */
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
index e9b7cda59744..f83c1d0a87cf 100644
--- a/arch/m68k/include/asm/elf.h
+++ b/arch/m68k/include/asm/elf.h
@@ -113,6 +113,7 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
113 113
114#define ELF_PLATFORM (NULL) 114#define ELF_PLATFORM (NULL)
115 115
116#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 116#define SET_PERSONALITY(ex) \
117 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
117 118
118#endif 119#endif
diff --git a/arch/microblaze/include/asm/elf.h b/arch/microblaze/include/asm/elf.h
index 834849f59ae8..640ddd4b6a9b 100644
--- a/arch/microblaze/include/asm/elf.h
+++ b/arch/microblaze/include/asm/elf.h
@@ -116,7 +116,8 @@ do { \
116} while (0) 116} while (0)
117 117
118#ifdef __KERNEL__ 118#ifdef __KERNEL__
119#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 119#define SET_PERSONALITY(ex) \
120 set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
120#endif 121#endif
121 122
122#endif /* __uClinux__ */ 123#endif /* __uClinux__ */
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index feb05258a4d1..dd18e4b761a8 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -632,7 +632,7 @@ static struct board_info __initdata board_DWVS0 = {
632/* 632/*
633 * all boards 633 * all boards
634 */ 634 */
635static const struct board_info __initdata *bcm963xx_boards[] = { 635static const struct board_info __initconst *bcm963xx_boards[] = {
636#ifdef CONFIG_BCM63XX_CPU_6328 636#ifdef CONFIG_BCM63XX_CPU_6328
637 &board_96328avng, 637 &board_96328avng,
638#endif 638#endif
diff --git a/arch/mips/include/asm/compat-signal.h b/arch/mips/include/asm/compat-signal.h
index 368a99e5c3e1..6599a901b63e 100644
--- a/arch/mips/include/asm/compat-signal.h
+++ b/arch/mips/include/asm/compat-signal.h
@@ -10,68 +10,6 @@
10 10
11#include <asm/uaccess.h> 11#include <asm/uaccess.h>
12 12
13#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
14
15typedef struct compat_siginfo {
16 int si_signo;
17 int si_code;
18 int si_errno;
19
20 union {
21 int _pad[SI_PAD_SIZE32];
22
23 /* kill() */
24 struct {
25 compat_pid_t _pid; /* sender's pid */
26 compat_uid_t _uid; /* sender's uid */
27 } _kill;
28
29 /* SIGCHLD */
30 struct {
31 compat_pid_t _pid; /* which child */
32 compat_uid_t _uid; /* sender's uid */
33 int _status; /* exit code */
34 compat_clock_t _utime;
35 compat_clock_t _stime;
36 } _sigchld;
37
38 /* IRIX SIGCHLD */
39 struct {
40 compat_pid_t _pid; /* which child */
41 compat_clock_t _utime;
42 int _status; /* exit code */
43 compat_clock_t _stime;
44 } _irix_sigchld;
45
46 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
47 struct {
48 s32 _addr; /* faulting insn/memory ref. */
49 } _sigfault;
50
51 /* SIGPOLL, SIGXFSZ (To do ...) */
52 struct {
53 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
54 int _fd;
55 } _sigpoll;
56
57 /* POSIX.1b timers */
58 struct {
59 timer_t _tid; /* timer id */
60 int _overrun; /* overrun count */
61 compat_sigval_t _sigval;/* same as below */
62 int _sys_private; /* not to be passed to user */
63 } _timer;
64
65 /* POSIX.1b signals */
66 struct {
67 compat_pid_t _pid; /* sender's pid */
68 compat_uid_t _uid; /* sender's uid */
69 compat_sigval_t _sigval;
70 } _rt;
71
72 } _sifields;
73} compat_siginfo_t;
74
75static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, 13static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d,
76 const sigset_t *s) 14 const sigset_t *s)
77{ 15{
diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h
index b77df0366ee6..58277e0e9cd4 100644
--- a/arch/mips/include/asm/compat.h
+++ b/arch/mips/include/asm/compat.h
@@ -43,6 +43,7 @@ typedef s64 compat_s64;
43typedef u32 compat_uint_t; 43typedef u32 compat_uint_t;
44typedef u32 compat_ulong_t; 44typedef u32 compat_ulong_t;
45typedef u64 compat_u64; 45typedef u64 compat_u64;
46typedef u32 compat_uptr_t;
46 47
47struct compat_timespec { 48struct compat_timespec {
48 compat_time_t tv_sec; 49 compat_time_t tv_sec;
@@ -124,6 +125,73 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
124 125
125typedef u32 compat_sigset_word; 126typedef u32 compat_sigset_word;
126 127
128typedef union compat_sigval {
129 compat_int_t sival_int;
130 compat_uptr_t sival_ptr;
131} compat_sigval_t;
132
133#define SI_PAD_SIZE32 (128/sizeof(int) - 3)
134
135typedef struct compat_siginfo {
136 int si_signo;
137 int si_code;
138 int si_errno;
139
140 union {
141 int _pad[SI_PAD_SIZE32];
142
143 /* kill() */
144 struct {
145 compat_pid_t _pid; /* sender's pid */
146 __compat_uid_t _uid; /* sender's uid */
147 } _kill;
148
149 /* SIGCHLD */
150 struct {
151 compat_pid_t _pid; /* which child */
152 __compat_uid_t _uid; /* sender's uid */
153 int _status; /* exit code */
154 compat_clock_t _utime;
155 compat_clock_t _stime;
156 } _sigchld;
157
158 /* IRIX SIGCHLD */
159 struct {
160 compat_pid_t _pid; /* which child */
161 compat_clock_t _utime;
162 int _status; /* exit code */
163 compat_clock_t _stime;
164 } _irix_sigchld;
165
166 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
167 struct {
168 s32 _addr; /* faulting insn/memory ref. */
169 } _sigfault;
170
171 /* SIGPOLL, SIGXFSZ (To do ...) */
172 struct {
173 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
174 int _fd;
175 } _sigpoll;
176
177 /* POSIX.1b timers */
178 struct {
179 timer_t _tid; /* timer id */
180 int _overrun; /* overrun count */
181 compat_sigval_t _sigval;/* same as below */
182 int _sys_private; /* not to be passed to user */
183 } _timer;
184
185 /* POSIX.1b signals */
186 struct {
187 compat_pid_t _pid; /* sender's pid */
188 __compat_uid_t _uid; /* sender's uid */
189 compat_sigval_t _sigval;
190 } _rt;
191
192 } _sifields;
193} compat_siginfo_t;
194
127#define COMPAT_OFF_T_MAX 0x7fffffff 195#define COMPAT_OFF_T_MAX 0x7fffffff
128#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 196#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
129 197
@@ -133,7 +201,6 @@ typedef u32 compat_sigset_word;
133 * as pointers because the syscall entry code will have 201 * as pointers because the syscall entry code will have
134 * appropriately converted them already. 202 * appropriately converted them already.
135 */ 203 */
136typedef u32 compat_uptr_t;
137 204
138static inline void __user *compat_ptr(compat_uptr_t uptr) 205static inline void __user *compat_ptr(compat_uptr_t uptr)
139{ 206{
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
index c5dfb2c87d44..4b0c347d7a82 100644
--- a/arch/mips/pci/pci-octeon.c
+++ b/arch/mips/pci/pci-octeon.c
@@ -58,7 +58,7 @@ union octeon_pci_address {
58 } s; 58 } s;
59}; 59};
60 60
61int __initdata (*octeon_pcibios_map_irq)(const struct pci_dev *dev, 61int __initconst (*octeon_pcibios_map_irq)(const struct pci_dev *dev,
62 u8 slot, u8 pin); 62 u8 slot, u8 pin);
63enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; 63enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID;
64 64
diff --git a/arch/mn10300/Makefile b/arch/mn10300/Makefile
index 33188b6e81e4..a3d0fef3b126 100644
--- a/arch/mn10300/Makefile
+++ b/arch/mn10300/Makefile
@@ -26,7 +26,7 @@ CHECKFLAGS +=
26PROCESSOR := unset 26PROCESSOR := unset
27UNIT := unset 27UNIT := unset
28 28
29KBUILD_CFLAGS += -mam33 -mmem-funcs -DCPU=AM33 29KBUILD_CFLAGS += -mam33 -DCPU=AM33 $(call cc-option,-mmem-funcs,)
30KBUILD_AFLAGS += -mam33 -DCPU=AM33 30KBUILD_AFLAGS += -mam33 -DCPU=AM33
31 31
32ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y) 32ifeq ($(CONFIG_MN10300_CURRENT_IN_E2),y)
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h
index 8157c9267f42..4ebd6b3a0a1e 100644
--- a/arch/mn10300/include/asm/elf.h
+++ b/arch/mn10300/include/asm/elf.h
@@ -151,7 +151,8 @@ do { \
151#define ELF_PLATFORM (NULL) 151#define ELF_PLATFORM (NULL)
152 152
153#ifdef __KERNEL__ 153#ifdef __KERNEL__
154#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 154#define SET_PERSONALITY(ex) \
155 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
155#endif 156#endif
156 157
157#endif /* _ASM_ELF_H */ 158#endif /* _ASM_ELF_H */
diff --git a/arch/openrisc/include/asm/elf.h b/arch/openrisc/include/asm/elf.h
index a8fe2c513070..225a7ff320ad 100644
--- a/arch/openrisc/include/asm/elf.h
+++ b/arch/openrisc/include/asm/elf.h
@@ -110,7 +110,8 @@ extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt);
110 110
111#define ELF_PLATFORM (NULL) 111#define ELF_PLATFORM (NULL)
112 112
113#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 113#define SET_PERSONALITY(ex) \
114 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
114 115
115#endif /* __KERNEL__ */ 116#endif /* __KERNEL__ */
116#endif 117#endif
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 3ff21b536f28..b87438bb3384 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -13,6 +13,7 @@ config PARISC
13 select HAVE_PERF_EVENTS 13 select HAVE_PERF_EVENTS
14 select GENERIC_ATOMIC64 if !64BIT 14 select GENERIC_ATOMIC64 if !64BIT
15 select HAVE_GENERIC_HARDIRQS 15 select HAVE_GENERIC_HARDIRQS
16 select BROKEN_RODATA
16 select GENERIC_IRQ_PROBE 17 select GENERIC_IRQ_PROBE
17 select GENERIC_PCI_IOMAP 18 select GENERIC_PCI_IOMAP
18 select IRQ_PER_CPU 19 select IRQ_PER_CPU
diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h
index 760f331d4fa3..db7a662691a8 100644
--- a/arch/parisc/include/asm/compat.h
+++ b/arch/parisc/include/asm/compat.h
@@ -36,6 +36,7 @@ typedef s64 compat_s64;
36typedef u32 compat_uint_t; 36typedef u32 compat_uint_t;
37typedef u32 compat_ulong_t; 37typedef u32 compat_ulong_t;
38typedef u64 compat_u64; 38typedef u64 compat_u64;
39typedef u32 compat_uptr_t;
39 40
40struct compat_timespec { 41struct compat_timespec {
41 compat_time_t tv_sec; 42 compat_time_t tv_sec;
@@ -127,6 +128,63 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
127 128
128typedef u32 compat_sigset_word; 129typedef u32 compat_sigset_word;
129 130
131typedef union compat_sigval {
132 compat_int_t sival_int;
133 compat_uptr_t sival_ptr;
134} compat_sigval_t;
135
136typedef struct compat_siginfo {
137 int si_signo;
138 int si_errno;
139 int si_code;
140
141 union {
142 int _pad[128/sizeof(int) - 3];
143
144 /* kill() */
145 struct {
146 unsigned int _pid; /* sender's pid */
147 unsigned int _uid; /* sender's uid */
148 } _kill;
149
150 /* POSIX.1b timers */
151 struct {
152 compat_timer_t _tid; /* timer id */
153 int _overrun; /* overrun count */
154 char _pad[sizeof(unsigned int) - sizeof(int)];
155 compat_sigval_t _sigval; /* same as below */
156 int _sys_private; /* not to be passed to user */
157 } _timer;
158
159 /* POSIX.1b signals */
160 struct {
161 unsigned int _pid; /* sender's pid */
162 unsigned int _uid; /* sender's uid */
163 compat_sigval_t _sigval;
164 } _rt;
165
166 /* SIGCHLD */
167 struct {
168 unsigned int _pid; /* which child */
169 unsigned int _uid; /* sender's uid */
170 int _status; /* exit code */
171 compat_clock_t _utime;
172 compat_clock_t _stime;
173 } _sigchld;
174
175 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
176 struct {
177 unsigned int _addr; /* faulting insn/memory ref. */
178 } _sigfault;
179
180 /* SIGPOLL */
181 struct {
182 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
183 int _fd;
184 } _sigpoll;
185 } _sifields;
186} compat_siginfo_t;
187
130#define COMPAT_OFF_T_MAX 0x7fffffff 188#define COMPAT_OFF_T_MAX 0x7fffffff
131#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 189#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
132 190
@@ -136,7 +194,6 @@ typedef u32 compat_sigset_word;
136 * as pointers because the syscall entry code will have 194 * as pointers because the syscall entry code will have
137 * appropriately converted them already. 195 * appropriately converted them already.
138 */ 196 */
139typedef u32 compat_uptr_t;
140 197
141static inline void __user *compat_ptr(compat_uptr_t uptr) 198static inline void __user *compat_ptr(compat_uptr_t uptr)
142{ 199{
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
index c7800846422c..08a88b5349a2 100644
--- a/arch/parisc/kernel/signal32.h
+++ b/arch/parisc/kernel/signal32.h
@@ -55,58 +55,6 @@ struct k_sigaction32 {
55 struct compat_sigaction sa; 55 struct compat_sigaction sa;
56}; 56};
57 57
58typedef struct compat_siginfo {
59 int si_signo;
60 int si_errno;
61 int si_code;
62
63 union {
64 int _pad[((128/sizeof(int)) - 3)];
65
66 /* kill() */
67 struct {
68 unsigned int _pid; /* sender's pid */
69 unsigned int _uid; /* sender's uid */
70 } _kill;
71
72 /* POSIX.1b timers */
73 struct {
74 compat_timer_t _tid; /* timer id */
75 int _overrun; /* overrun count */
76 char _pad[sizeof(unsigned int) - sizeof(int)];
77 compat_sigval_t _sigval; /* same as below */
78 int _sys_private; /* not to be passed to user */
79 } _timer;
80
81 /* POSIX.1b signals */
82 struct {
83 unsigned int _pid; /* sender's pid */
84 unsigned int _uid; /* sender's uid */
85 compat_sigval_t _sigval;
86 } _rt;
87
88 /* SIGCHLD */
89 struct {
90 unsigned int _pid; /* which child */
91 unsigned int _uid; /* sender's uid */
92 int _status; /* exit code */
93 compat_clock_t _utime;
94 compat_clock_t _stime;
95 } _sigchld;
96
97 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
98 struct {
99 unsigned int _addr; /* faulting insn/memory ref. */
100 } _sigfault;
101
102 /* SIGPOLL */
103 struct {
104 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
105 int _fd;
106 } _sigpoll;
107 } _sifields;
108} compat_siginfo_t;
109
110int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from); 58int copy_siginfo_to_user32 (compat_siginfo_t __user *to, siginfo_t *from);
111int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); 59int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from);
112 60
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index efdc92618b38..dc2cf9c6d9e6 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -288,6 +288,16 @@ static __inline__ int test_bit_le(unsigned long nr,
288 return (tmp[nr >> 3] >> (nr & 7)) & 1; 288 return (tmp[nr >> 3] >> (nr & 7)) & 1;
289} 289}
290 290
291static inline void set_bit_le(int nr, void *addr)
292{
293 set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
294}
295
296static inline void clear_bit_le(int nr, void *addr)
297{
298 clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
299}
300
291static inline void __set_bit_le(int nr, void *addr) 301static inline void __set_bit_le(int nr, void *addr)
292{ 302{
293 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); 303 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h
index 88e602f6430d..84fdf6857c31 100644
--- a/arch/powerpc/include/asm/compat.h
+++ b/arch/powerpc/include/asm/compat.h
@@ -38,6 +38,7 @@ typedef s64 compat_s64;
38typedef u32 compat_uint_t; 38typedef u32 compat_uint_t;
39typedef u32 compat_ulong_t; 39typedef u32 compat_ulong_t;
40typedef u64 compat_u64; 40typedef u64 compat_u64;
41typedef u32 compat_uptr_t;
41 42
42struct compat_timespec { 43struct compat_timespec {
43 compat_time_t tv_sec; 44 compat_time_t tv_sec;
@@ -114,6 +115,64 @@ typedef u32 compat_old_sigset_t;
114 115
115typedef u32 compat_sigset_word; 116typedef u32 compat_sigset_word;
116 117
118typedef union compat_sigval {
119 compat_int_t sival_int;
120 compat_uptr_t sival_ptr;
121} compat_sigval_t;
122
123#define SI_PAD_SIZE32 (128/sizeof(int) - 3)
124
125typedef struct compat_siginfo {
126 int si_signo;
127 int si_errno;
128 int si_code;
129
130 union {
131 int _pad[SI_PAD_SIZE32];
132
133 /* kill() */
134 struct {
135 compat_pid_t _pid; /* sender's pid */
136 __compat_uid_t _uid; /* sender's uid */
137 } _kill;
138
139 /* POSIX.1b timers */
140 struct {
141 compat_timer_t _tid; /* timer id */
142 int _overrun; /* overrun count */
143 compat_sigval_t _sigval; /* same as below */
144 int _sys_private; /* not to be passed to user */
145 } _timer;
146
147 /* POSIX.1b signals */
148 struct {
149 compat_pid_t _pid; /* sender's pid */
150 __compat_uid_t _uid; /* sender's uid */
151 compat_sigval_t _sigval;
152 } _rt;
153
154 /* SIGCHLD */
155 struct {
156 compat_pid_t _pid; /* which child */
157 __compat_uid_t _uid; /* sender's uid */
158 int _status; /* exit code */
159 compat_clock_t _utime;
160 compat_clock_t _stime;
161 } _sigchld;
162
163 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
164 struct {
165 unsigned int _addr; /* faulting insn/memory ref. */
166 } _sigfault;
167
168 /* SIGPOLL */
169 struct {
170 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
171 int _fd;
172 } _sigpoll;
173 } _sifields;
174} compat_siginfo_t;
175
117#define COMPAT_OFF_T_MAX 0x7fffffff 176#define COMPAT_OFF_T_MAX 0x7fffffff
118#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 177#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
119 178
@@ -123,7 +182,6 @@ typedef u32 compat_sigset_word;
123 * as pointers because the syscall entry code will have 182 * as pointers because the syscall entry code will have
124 * appropriately converted them already. 183 * appropriately converted them already.
125 */ 184 */
126typedef u32 compat_uptr_t;
127 185
128static inline void __user *compat_ptr(compat_uptr_t uptr) 186static inline void __user *compat_ptr(compat_uptr_t uptr)
129{ 187{
diff --git a/arch/powerpc/include/asm/siginfo.h b/arch/powerpc/include/asm/siginfo.h
index 49495b0534ed..ccce3ef5cd86 100644
--- a/arch/powerpc/include/asm/siginfo.h
+++ b/arch/powerpc/include/asm/siginfo.h
@@ -10,7 +10,6 @@
10 10
11#ifdef __powerpc64__ 11#ifdef __powerpc64__
12# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 12# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
13# define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
14#endif 13#endif
15 14
16#include <asm-generic/siginfo.h> 15#include <asm-generic/siginfo.h>
diff --git a/arch/powerpc/kernel/ppc32.h b/arch/powerpc/kernel/ppc32.h
index dc16aefe1dd0..02fb0ee26093 100644
--- a/arch/powerpc/kernel/ppc32.h
+++ b/arch/powerpc/kernel/ppc32.h
@@ -16,57 +16,6 @@
16 16
17/* These are here to support 32-bit syscalls on a 64-bit kernel. */ 17/* These are here to support 32-bit syscalls on a 64-bit kernel. */
18 18
19typedef struct compat_siginfo {
20 int si_signo;
21 int si_errno;
22 int si_code;
23
24 union {
25 int _pad[SI_PAD_SIZE32];
26
27 /* kill() */
28 struct {
29 compat_pid_t _pid; /* sender's pid */
30 compat_uid_t _uid; /* sender's uid */
31 } _kill;
32
33 /* POSIX.1b timers */
34 struct {
35 compat_timer_t _tid; /* timer id */
36 int _overrun; /* overrun count */
37 compat_sigval_t _sigval; /* same as below */
38 int _sys_private; /* not to be passed to user */
39 } _timer;
40
41 /* POSIX.1b signals */
42 struct {
43 compat_pid_t _pid; /* sender's pid */
44 compat_uid_t _uid; /* sender's uid */
45 compat_sigval_t _sigval;
46 } _rt;
47
48 /* SIGCHLD */
49 struct {
50 compat_pid_t _pid; /* which child */
51 compat_uid_t _uid; /* sender's uid */
52 int _status; /* exit code */
53 compat_clock_t _utime;
54 compat_clock_t _stime;
55 } _sigchld;
56
57 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
58 struct {
59 unsigned int _addr; /* faulting insn/memory ref. */
60 } _sigfault;
61
62 /* SIGPOLL */
63 struct {
64 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
65 int _fd;
66 } _sigpoll;
67 } _sifields;
68} compat_siginfo_t;
69
70#define __old_sigaction32 old_sigaction32 19#define __old_sigaction32 old_sigaction32
71 20
72struct __old_sigaction32 { 21struct __old_sigaction32 {
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 97612068fae3..969dddcf3320 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -50,7 +50,7 @@ machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
50 * Again, if your board needs to do things differently then create a 50 * Again, if your board needs to do things differently then create a
51 * board.c file for it rather than adding it to this list. 51 * board.c file for it rather than adding it to this list.
52 */ 52 */
53static const char *board[] __initdata = { 53static const char * const board[] __initconst = {
54 "amcc,acadia", 54 "amcc,acadia",
55 "amcc,haleakala", 55 "amcc,haleakala",
56 "amcc,kilauea", 56 "amcc,kilauea",
diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c
index 926731f1ff01..ca1ca6669990 100644
--- a/arch/powerpc/platforms/512x/mpc5121_generic.c
+++ b/arch/powerpc/platforms/512x/mpc5121_generic.c
@@ -26,7 +26,7 @@
26/* 26/*
27 * list of supported boards 27 * list of supported boards
28 */ 28 */
29static const char *board[] __initdata = { 29static const char * const board[] __initconst = {
30 "prt,prtlvt", 30 "prt,prtlvt",
31 NULL 31 NULL
32}; 32};
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 01ffa64d2aa7..448d862bcf3d 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -172,7 +172,7 @@ static void __init lite5200_setup_arch(void)
172 mpc52xx_setup_pci(); 172 mpc52xx_setup_pci();
173} 173}
174 174
175static const char *board[] __initdata = { 175static const char * const board[] __initconst = {
176 "fsl,lite5200", 176 "fsl,lite5200",
177 "fsl,lite5200b", 177 "fsl,lite5200b",
178 NULL, 178 NULL,
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c
index 17d91b7da315..070d315dd6cd 100644
--- a/arch/powerpc/platforms/52xx/media5200.c
+++ b/arch/powerpc/platforms/52xx/media5200.c
@@ -232,7 +232,7 @@ static void __init media5200_setup_arch(void)
232} 232}
233 233
234/* list of the supported boards */ 234/* list of the supported boards */
235static const char *board[] __initdata = { 235static const char * const board[] __initconst = {
236 "fsl,media5200", 236 "fsl,media5200",
237 NULL 237 NULL
238}; 238};
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index 16c9c9cbbb7f..eca1f0960fff 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -60,7 +60,7 @@ static void __init mpc837x_rdb_setup_arch(void)
60 60
61machine_device_initcall(mpc837x_rdb, mpc83xx_declare_of_platform_devices); 61machine_device_initcall(mpc837x_rdb, mpc83xx_declare_of_platform_devices);
62 62
63static const char *board[] __initdata = { 63static const char * const board[] __initconst = {
64 "fsl,mpc8377rdb", 64 "fsl,mpc8377rdb",
65 "fsl,mpc8378rdb", 65 "fsl,mpc8378rdb",
66 "fsl,mpc8379rdb", 66 "fsl,mpc8379rdb",
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index 3e70a2035e53..b62fa87521a3 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1520,
125 125
126machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices); 126machine_device_initcall(tqm85xx, mpc85xx_common_publish_devices);
127 127
128static const char *board[] __initdata = { 128static const char * const board[] __initconst = {
129 "tqc,tqm8540", 129 "tqc,tqm8540",
130 "tqc,tqm8541", 130 "tqc,tqm8541",
131 "tqc,tqm8548", 131 "tqc,tqm8548",
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h
index 234f1d859cea..a34a9d612fc0 100644
--- a/arch/s390/include/asm/compat.h
+++ b/arch/s390/include/asm/compat.h
@@ -65,6 +65,7 @@ typedef s64 compat_s64;
65typedef u32 compat_uint_t; 65typedef u32 compat_uint_t;
66typedef u32 compat_ulong_t; 66typedef u32 compat_ulong_t;
67typedef u64 compat_u64; 67typedef u64 compat_u64;
68typedef u32 compat_uptr_t;
68 69
69struct compat_timespec { 70struct compat_timespec {
70 compat_time_t tv_sec; 71 compat_time_t tv_sec;
@@ -144,6 +145,79 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
144 145
145typedef u32 compat_sigset_word; 146typedef u32 compat_sigset_word;
146 147
148typedef union compat_sigval {
149 compat_int_t sival_int;
150 compat_uptr_t sival_ptr;
151} compat_sigval_t;
152
153typedef struct compat_siginfo {
154 int si_signo;
155 int si_errno;
156 int si_code;
157
158 union {
159 int _pad[128/sizeof(int) - 3];
160
161 /* kill() */
162 struct {
163 pid_t _pid; /* sender's pid */
164 uid_t _uid; /* sender's uid */
165 } _kill;
166
167 /* POSIX.1b timers */
168 struct {
169 compat_timer_t _tid; /* timer id */
170 int _overrun; /* overrun count */
171 compat_sigval_t _sigval; /* same as below */
172 int _sys_private; /* not to be passed to user */
173 } _timer;
174
175 /* POSIX.1b signals */
176 struct {
177 pid_t _pid; /* sender's pid */
178 uid_t _uid; /* sender's uid */
179 compat_sigval_t _sigval;
180 } _rt;
181
182 /* SIGCHLD */
183 struct {
184 pid_t _pid; /* which child */
185 uid_t _uid; /* sender's uid */
186 int _status;/* exit code */
187 compat_clock_t _utime;
188 compat_clock_t _stime;
189 } _sigchld;
190
191 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
192 struct {
193 __u32 _addr; /* faulting insn/memory ref. - pointer */
194 } _sigfault;
195
196 /* SIGPOLL */
197 struct {
198 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
199 int _fd;
200 } _sigpoll;
201 } _sifields;
202} compat_siginfo_t;
203
204/*
205 * How these fields are to be accessed.
206 */
207#define si_pid _sifields._kill._pid
208#define si_uid _sifields._kill._uid
209#define si_status _sifields._sigchld._status
210#define si_utime _sifields._sigchld._utime
211#define si_stime _sifields._sigchld._stime
212#define si_value _sifields._rt._sigval
213#define si_int _sifields._rt._sigval.sival_int
214#define si_ptr _sifields._rt._sigval.sival_ptr
215#define si_addr _sifields._sigfault._addr
216#define si_band _sifields._sigpoll._band
217#define si_fd _sifields._sigpoll._fd
218#define si_tid _sifields._timer._tid
219#define si_overrun _sifields._timer._overrun
220
147#define COMPAT_OFF_T_MAX 0x7fffffff 221#define COMPAT_OFF_T_MAX 0x7fffffff
148#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 222#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
149 223
@@ -153,7 +227,6 @@ typedef u32 compat_sigset_word;
153 * as pointers because the syscall entry code will have 227 * as pointers because the syscall entry code will have
154 * appropriately converted them already. 228 * appropriately converted them already.
155 */ 229 */
156typedef u32 compat_uptr_t;
157 230
158static inline void __user *compat_ptr(compat_uptr_t uptr) 231static inline void __user *compat_ptr(compat_uptr_t uptr)
159{ 232{
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 9635d759c2b9..90887bd98cf0 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -23,74 +23,6 @@ struct old_sigaction32 {
23 __u32 sa_flags; 23 __u32 sa_flags;
24 __u32 sa_restorer; /* Another 32 bit pointer */ 24 __u32 sa_restorer; /* Another 32 bit pointer */
25}; 25};
26
27typedef struct compat_siginfo {
28 int si_signo;
29 int si_errno;
30 int si_code;
31
32 union {
33 int _pad[((128/sizeof(int)) - 3)];
34
35 /* kill() */
36 struct {
37 pid_t _pid; /* sender's pid */
38 uid_t _uid; /* sender's uid */
39 } _kill;
40
41 /* POSIX.1b timers */
42 struct {
43 compat_timer_t _tid; /* timer id */
44 int _overrun; /* overrun count */
45 compat_sigval_t _sigval; /* same as below */
46 int _sys_private; /* not to be passed to user */
47 } _timer;
48
49 /* POSIX.1b signals */
50 struct {
51 pid_t _pid; /* sender's pid */
52 uid_t _uid; /* sender's uid */
53 compat_sigval_t _sigval;
54 } _rt;
55
56 /* SIGCHLD */
57 struct {
58 pid_t _pid; /* which child */
59 uid_t _uid; /* sender's uid */
60 int _status;/* exit code */
61 compat_clock_t _utime;
62 compat_clock_t _stime;
63 } _sigchld;
64
65 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
66 struct {
67 __u32 _addr; /* faulting insn/memory ref. - pointer */
68 } _sigfault;
69
70 /* SIGPOLL */
71 struct {
72 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
73 int _fd;
74 } _sigpoll;
75 } _sifields;
76} compat_siginfo_t;
77
78/*
79 * How these fields are to be accessed.
80 */
81#define si_pid _sifields._kill._pid
82#define si_uid _sifields._kill._uid
83#define si_status _sifields._sigchld._status
84#define si_utime _sifields._sigchld._utime
85#define si_stime _sifields._sigchld._stime
86#define si_value _sifields._rt._sigval
87#define si_int _sifields._rt._sigval.sival_int
88#define si_ptr _sifields._rt._sigval.sival_ptr
89#define si_addr _sifields._sigfault._addr
90#define si_band _sifields._sigpoll._band
91#define si_fd _sifields._sigpoll._fd
92#define si_tid _sifields._timer._tid
93#define si_overrun _sifields._timer._overrun
94 26
95/* asm/sigcontext.h */ 27/* asm/sigcontext.h */
96typedef union 28typedef union
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index ba0f412920be..461c23747491 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -5,6 +5,7 @@ config SCORE
5 select HAVE_GENERIC_HARDIRQS 5 select HAVE_GENERIC_HARDIRQS
6 select GENERIC_IRQ_SHOW 6 select GENERIC_IRQ_SHOW
7 select GENERIC_IOMAP 7 select GENERIC_IOMAP
8 select GENERIC_ATOMIC64
8 select HAVE_MEMBLOCK 9 select HAVE_MEMBLOCK
9 select HAVE_MEMBLOCK_NODE_MAP 10 select HAVE_MEMBLOCK_NODE_MAP
10 select ARCH_DISCARD_MEMBLOCK 11 select ARCH_DISCARD_MEMBLOCK
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h
index f478ce94181f..5d566c7a0af2 100644
--- a/arch/score/include/asm/elf.h
+++ b/arch/score/include/asm/elf.h
@@ -54,7 +54,7 @@ typedef elf_fpreg_t elf_fpregset_t;
54 54
55#define SET_PERSONALITY(ex) \ 55#define SET_PERSONALITY(ex) \
56do { \ 56do { \
57 set_personality(PER_LINUX); \ 57 set_personality(PER_LINUX | (current->personality & (~PER_MASK))); \
58} while (0) 58} while (0)
59 59
60struct task_struct; 60struct task_struct;
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c
index e478bf9a7e91..21e867974066 100644
--- a/arch/score/kernel/sys_score.c
+++ b/arch/score/kernel/sys_score.c
@@ -112,6 +112,7 @@ score_execve(struct pt_regs *regs)
112 * Do a system call from kernel instead of calling sys_execve so we 112 * Do a system call from kernel instead of calling sys_execve so we
113 * end up with proper pt_regs. 113 * end up with proper pt_regs.
114 */ 114 */
115asmlinkage
115int kernel_execve(const char *filename, 116int kernel_execve(const char *filename,
116 const char *const argv[], 117 const char *const argv[],
117 const char *const envp[]) 118 const char *const envp[])
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index f38112be67d2..37924afa8d8a 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -183,7 +183,8 @@ do { \
183} while (0) 183} while (0)
184#endif 184#endif
185 185
186#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 186#define SET_PERSONALITY(ex) \
187 set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
187 188
188#ifdef CONFIG_VSYSCALL 189#ifdef CONFIG_VSYSCALL
189/* vDSO has arch_setup_additional_pages */ 190/* vDSO has arch_setup_additional_pages */
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 0cf60a628814..73a23f4617a3 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -134,7 +134,7 @@ __BUILD_MEMORY_STRING(__raw_, q, u64)
134 * load/store instructions. sh_io_port_base is the virtual address to 134 * load/store instructions. sh_io_port_base is the virtual address to
135 * which all ports are being mapped. 135 * which all ports are being mapped.
136 */ 136 */
137extern const unsigned long sh_io_port_base; 137extern unsigned long sh_io_port_base;
138 138
139static inline void __set_io_port_base(unsigned long pbase) 139static inline void __set_io_port_base(unsigned long pbase)
140{ 140{
diff --git a/arch/sh/kernel/ioport.c b/arch/sh/kernel/ioport.c
index e3ad6103e7c1..cca14ba84a37 100644
--- a/arch/sh/kernel/ioport.c
+++ b/arch/sh/kernel/ioport.c
@@ -11,7 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/io.h> 12#include <linux/io.h>
13 13
14const unsigned long sh_io_port_base __read_mostly = -1; 14unsigned long sh_io_port_base __read_mostly = -1;
15EXPORT_SYMBOL(sh_io_port_base); 15EXPORT_SYMBOL(sh_io_port_base);
16 16
17void __iomem *__ioport_map(unsigned long addr, unsigned int size) 17void __iomem *__ioport_map(unsigned long addr, unsigned int size)
diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h
index b8be20d42a0a..cef99fbc0a21 100644
--- a/arch/sparc/include/asm/compat.h
+++ b/arch/sparc/include/asm/compat.h
@@ -36,6 +36,7 @@ typedef s64 compat_s64;
36typedef u32 compat_uint_t; 36typedef u32 compat_uint_t;
37typedef u32 compat_ulong_t; 37typedef u32 compat_ulong_t;
38typedef u64 compat_u64; 38typedef u64 compat_u64;
39typedef u32 compat_uptr_t;
39 40
40struct compat_timespec { 41struct compat_timespec {
41 compat_time_t tv_sec; 42 compat_time_t tv_sec;
@@ -147,6 +148,65 @@ typedef u32 compat_old_sigset_t;
147 148
148typedef u32 compat_sigset_word; 149typedef u32 compat_sigset_word;
149 150
151typedef union compat_sigval {
152 compat_int_t sival_int;
153 compat_uptr_t sival_ptr;
154} compat_sigval_t;
155
156#define SI_PAD_SIZE32 (128/sizeof(int) - 3)
157
158typedef struct compat_siginfo {
159 int si_signo;
160 int si_errno;
161 int si_code;
162
163 union {
164 int _pad[SI_PAD_SIZE32];
165
166 /* kill() */
167 struct {
168 compat_pid_t _pid; /* sender's pid */
169 unsigned int _uid; /* sender's uid */
170 } _kill;
171
172 /* POSIX.1b timers */
173 struct {
174 compat_timer_t _tid; /* timer id */
175 int _overrun; /* overrun count */
176 compat_sigval_t _sigval; /* same as below */
177 int _sys_private; /* not to be passed to user */
178 } _timer;
179
180 /* POSIX.1b signals */
181 struct {
182 compat_pid_t _pid; /* sender's pid */
183 unsigned int _uid; /* sender's uid */
184 compat_sigval_t _sigval;
185 } _rt;
186
187 /* SIGCHLD */
188 struct {
189 compat_pid_t _pid; /* which child */
190 unsigned int _uid; /* sender's uid */
191 int _status; /* exit code */
192 compat_clock_t _utime;
193 compat_clock_t _stime;
194 } _sigchld;
195
196 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
197 struct {
198 u32 _addr; /* faulting insn/memory ref. */
199 int _trapno;
200 } _sigfault;
201
202 /* SIGPOLL */
203 struct {
204 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
205 int _fd;
206 } _sigpoll;
207 } _sifields;
208} compat_siginfo_t;
209
150#define COMPAT_OFF_T_MAX 0x7fffffff 210#define COMPAT_OFF_T_MAX 0x7fffffff
151#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 211#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
152 212
@@ -156,7 +216,6 @@ typedef u32 compat_sigset_word;
156 * as pointers because the syscall entry code will have 216 * as pointers because the syscall entry code will have
157 * appropriately converted them already. 217 * appropriately converted them already.
158 */ 218 */
159typedef u32 compat_uptr_t;
160 219
161static inline void __user *compat_ptr(compat_uptr_t uptr) 220static inline void __user *compat_ptr(compat_uptr_t uptr)
162{ 221{
diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
index 2d4d755cba9e..ac74a2c98e6d 100644
--- a/arch/sparc/include/asm/elf_32.h
+++ b/arch/sparc/include/asm/elf_32.h
@@ -128,6 +128,7 @@ typedef struct {
128 128
129#define ELF_PLATFORM (NULL) 129#define ELF_PLATFORM (NULL)
130 130
131#define SET_PERSONALITY(ex) set_personality(PER_LINUX) 131#define SET_PERSONALITY(ex) \
132 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
132 133
133#endif /* !(__ASMSPARC_ELF_H) */ 134#endif /* !(__ASMSPARC_ELF_H) */
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h
index 215900fce21b..dbc182c438b4 100644
--- a/arch/sparc/include/asm/siginfo.h
+++ b/arch/sparc/include/asm/siginfo.h
@@ -3,7 +3,6 @@
3 3
4#if defined(__sparc__) && defined(__arch64__) 4#if defined(__sparc__) && defined(__arch64__)
5 5
6#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
7#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 6#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
8#define __ARCH_SI_BAND_T int 7#define __ARCH_SI_BAND_T int
9 8
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c
index a53e0a5fd3a3..53e48f721ce3 100644
--- a/arch/sparc/kernel/signal32.c
+++ b/arch/sparc/kernel/signal32.c
@@ -54,58 +54,6 @@ struct signal_frame32 {
54 /* __siginfo_rwin_t * */u32 rwin_save; 54 /* __siginfo_rwin_t * */u32 rwin_save;
55} __attribute__((aligned(8))); 55} __attribute__((aligned(8)));
56 56
57typedef struct compat_siginfo{
58 int si_signo;
59 int si_errno;
60 int si_code;
61
62 union {
63 int _pad[SI_PAD_SIZE32];
64
65 /* kill() */
66 struct {
67 compat_pid_t _pid; /* sender's pid */
68 unsigned int _uid; /* sender's uid */
69 } _kill;
70
71 /* POSIX.1b timers */
72 struct {
73 compat_timer_t _tid; /* timer id */
74 int _overrun; /* overrun count */
75 compat_sigval_t _sigval; /* same as below */
76 int _sys_private; /* not to be passed to user */
77 } _timer;
78
79 /* POSIX.1b signals */
80 struct {
81 compat_pid_t _pid; /* sender's pid */
82 unsigned int _uid; /* sender's uid */
83 compat_sigval_t _sigval;
84 } _rt;
85
86 /* SIGCHLD */
87 struct {
88 compat_pid_t _pid; /* which child */
89 unsigned int _uid; /* sender's uid */
90 int _status; /* exit code */
91 compat_clock_t _utime;
92 compat_clock_t _stime;
93 } _sigchld;
94
95 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
96 struct {
97 u32 _addr; /* faulting insn/memory ref. */
98 int _trapno;
99 } _sigfault;
100
101 /* SIGPOLL */
102 struct {
103 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
104 int _fd;
105 } _sigpoll;
106 } _sifields;
107}compat_siginfo_t;
108
109struct rt_signal_frame32 { 57struct rt_signal_frame32 {
110 struct sparc_stackf32 ss; 58 struct sparc_stackf32 ss;
111 compat_siginfo_t info; 59 compat_siginfo_t info;
diff --git a/arch/tile/include/asm/compat.h b/arch/tile/include/asm/compat.h
index 6e74450ff0a1..3063e6fc8daa 100644
--- a/arch/tile/include/asm/compat.h
+++ b/arch/tile/include/asm/compat.h
@@ -110,6 +110,68 @@ struct compat_flock64 {
110 110
111typedef u32 compat_sigset_word; 111typedef u32 compat_sigset_word;
112 112
113typedef union compat_sigval {
114 compat_int_t sival_int;
115 compat_uptr_t sival_ptr;
116} compat_sigval_t;
117
118#define COMPAT_SI_PAD_SIZE (128/sizeof(int) - 3)
119
120typedef struct compat_siginfo {
121 int si_signo;
122 int si_errno;
123 int si_code;
124
125 union {
126 int _pad[COMPAT_SI_PAD_SIZE];
127
128 /* kill() */
129 struct {
130 unsigned int _pid; /* sender's pid */
131 unsigned int _uid; /* sender's uid */
132 } _kill;
133
134 /* POSIX.1b timers */
135 struct {
136 compat_timer_t _tid; /* timer id */
137 int _overrun; /* overrun count */
138 compat_sigval_t _sigval; /* same as below */
139 int _sys_private; /* not to be passed to user */
140 int _overrun_incr; /* amount to add to overrun */
141 } _timer;
142
143 /* POSIX.1b signals */
144 struct {
145 unsigned int _pid; /* sender's pid */
146 unsigned int _uid; /* sender's uid */
147 compat_sigval_t _sigval;
148 } _rt;
149
150 /* SIGCHLD */
151 struct {
152 unsigned int _pid; /* which child */
153 unsigned int _uid; /* sender's uid */
154 int _status; /* exit code */
155 compat_clock_t _utime;
156 compat_clock_t _stime;
157 } _sigchld;
158
159 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
160 struct {
161 unsigned int _addr; /* faulting insn/memory ref. */
162#ifdef __ARCH_SI_TRAPNO
163 int _trapno; /* TRAP # which caused the signal */
164#endif
165 } _sigfault;
166
167 /* SIGPOLL */
168 struct {
169 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
170 int _fd;
171 } _sigpoll;
172 } _sifields;
173} compat_siginfo_t;
174
113#define COMPAT_OFF_T_MAX 0x7fffffff 175#define COMPAT_OFF_T_MAX 0x7fffffff
114#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 176#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
115 177
diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h
index d16d006d660e..f8ccf08f6934 100644
--- a/arch/tile/include/asm/elf.h
+++ b/arch/tile/include/asm/elf.h
@@ -156,12 +156,12 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
156#undef SET_PERSONALITY 156#undef SET_PERSONALITY
157#define SET_PERSONALITY(ex) \ 157#define SET_PERSONALITY(ex) \
158do { \ 158do { \
159 current->personality = PER_LINUX; \ 159 set_personality(PER_LINUX | (current->personality & (~PER_MASK))); \
160 current_thread_info()->status &= ~TS_COMPAT; \ 160 current_thread_info()->status &= ~TS_COMPAT; \
161} while (0) 161} while (0)
162#define COMPAT_SET_PERSONALITY(ex) \ 162#define COMPAT_SET_PERSONALITY(ex) \
163do { \ 163do { \
164 current->personality = PER_LINUX_32BIT; \ 164 set_personality(PER_LINUX | (current->personality & (~PER_MASK))); \
165 current_thread_info()->status |= TS_COMPAT; \ 165 current_thread_info()->status |= TS_COMPAT; \
166} while (0) 166} while (0)
167 167
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
index 474571b84085..7bc0859a9f5e 100644
--- a/arch/tile/kernel/compat_signal.c
+++ b/arch/tile/kernel/compat_signal.c
@@ -55,63 +55,6 @@ struct compat_ucontext {
55 sigset_t uc_sigmask; /* mask last for extensibility */ 55 sigset_t uc_sigmask; /* mask last for extensibility */
56}; 56};
57 57
58#define COMPAT_SI_PAD_SIZE ((SI_MAX_SIZE - 3 * sizeof(int)) / sizeof(int))
59
60struct compat_siginfo {
61 int si_signo;
62 int si_errno;
63 int si_code;
64
65 union {
66 int _pad[COMPAT_SI_PAD_SIZE];
67
68 /* kill() */
69 struct {
70 unsigned int _pid; /* sender's pid */
71 unsigned int _uid; /* sender's uid */
72 } _kill;
73
74 /* POSIX.1b timers */
75 struct {
76 compat_timer_t _tid; /* timer id */
77 int _overrun; /* overrun count */
78 compat_sigval_t _sigval; /* same as below */
79 int _sys_private; /* not to be passed to user */
80 int _overrun_incr; /* amount to add to overrun */
81 } _timer;
82
83 /* POSIX.1b signals */
84 struct {
85 unsigned int _pid; /* sender's pid */
86 unsigned int _uid; /* sender's uid */
87 compat_sigval_t _sigval;
88 } _rt;
89
90 /* SIGCHLD */
91 struct {
92 unsigned int _pid; /* which child */
93 unsigned int _uid; /* sender's uid */
94 int _status; /* exit code */
95 compat_clock_t _utime;
96 compat_clock_t _stime;
97 } _sigchld;
98
99 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
100 struct {
101 unsigned int _addr; /* faulting insn/memory ref. */
102#ifdef __ARCH_SI_TRAPNO
103 int _trapno; /* TRAP # which caused the signal */
104#endif
105 } _sigfault;
106
107 /* SIGPOLL */
108 struct {
109 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
110 int _fd;
111 } _sigpoll;
112 } _sifields;
113};
114
115struct compat_rt_sigframe { 58struct compat_rt_sigframe {
116 unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; /* caller save area */ 59 unsigned char save_area[C_ABI_SAVE_AREA_SIZE]; /* caller save area */
117 struct compat_siginfo info; 60 struct compat_siginfo info;
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index b0a47433341e..1e638e75a6b7 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -6,6 +6,7 @@ config UNICORE32
6 select HAVE_DMA_ATTRS 6 select HAVE_DMA_ATTRS
7 select HAVE_KERNEL_GZIP 7 select HAVE_KERNEL_GZIP
8 select HAVE_KERNEL_BZIP2 8 select HAVE_KERNEL_BZIP2
9 select GENERIC_ATOMIC64
9 select HAVE_KERNEL_LZO 10 select HAVE_KERNEL_LZO
10 select HAVE_KERNEL_LZMA 11 select HAVE_KERNEL_LZMA
11 select ARCH_HAVE_CUSTOM_GPIO_H 12 select ARCH_HAVE_CUSTOM_GPIO_H
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index f34261296ffb..338803422239 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -409,7 +409,7 @@ extern struct apic *apic;
409 * to enforce the order with in them. 409 * to enforce the order with in them.
410 */ 410 */
411#define apic_driver(sym) \ 411#define apic_driver(sym) \
412 static struct apic *__apicdrivers_##sym __used \ 412 static const struct apic *__apicdrivers_##sym __used \
413 __aligned(sizeof(struct apic *)) \ 413 __aligned(sizeof(struct apic *)) \
414 __section(.apicdrivers) = { &sym } 414 __section(.apicdrivers) = { &sym }
415 415
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
index fedf32b73e65..59c6c401f79f 100644
--- a/arch/x86/include/asm/compat.h
+++ b/arch/x86/include/asm/compat.h
@@ -41,6 +41,7 @@ typedef s64 __attribute__((aligned(4))) compat_s64;
41typedef u32 compat_uint_t; 41typedef u32 compat_uint_t;
42typedef u32 compat_ulong_t; 42typedef u32 compat_ulong_t;
43typedef u64 __attribute__((aligned(4))) compat_u64; 43typedef u64 __attribute__((aligned(4))) compat_u64;
44typedef u32 compat_uptr_t;
44 45
45struct compat_timespec { 46struct compat_timespec {
46 compat_time_t tv_sec; 47 compat_time_t tv_sec;
@@ -124,6 +125,78 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */
124 125
125typedef u32 compat_sigset_word; 126typedef u32 compat_sigset_word;
126 127
128typedef union compat_sigval {
129 compat_int_t sival_int;
130 compat_uptr_t sival_ptr;
131} compat_sigval_t;
132
133typedef struct compat_siginfo {
134 int si_signo;
135 int si_errno;
136 int si_code;
137
138 union {
139 int _pad[128/sizeof(int) - 3];
140
141 /* kill() */
142 struct {
143 unsigned int _pid; /* sender's pid */
144 unsigned int _uid; /* sender's uid */
145 } _kill;
146
147 /* POSIX.1b timers */
148 struct {
149 compat_timer_t _tid; /* timer id */
150 int _overrun; /* overrun count */
151 compat_sigval_t _sigval; /* same as below */
152 int _sys_private; /* not to be passed to user */
153 int _overrun_incr; /* amount to add to overrun */
154 } _timer;
155
156 /* POSIX.1b signals */
157 struct {
158 unsigned int _pid; /* sender's pid */
159 unsigned int _uid; /* sender's uid */
160 compat_sigval_t _sigval;
161 } _rt;
162
163 /* SIGCHLD */
164 struct {
165 unsigned int _pid; /* which child */
166 unsigned int _uid; /* sender's uid */
167 int _status; /* exit code */
168 compat_clock_t _utime;
169 compat_clock_t _stime;
170 } _sigchld;
171
172 /* SIGCHLD (x32 version) */
173 struct {
174 unsigned int _pid; /* which child */
175 unsigned int _uid; /* sender's uid */
176 int _status; /* exit code */
177 compat_s64 _utime;
178 compat_s64 _stime;
179 } _sigchld_x32;
180
181 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
182 struct {
183 unsigned int _addr; /* faulting insn/memory ref. */
184 } _sigfault;
185
186 /* SIGPOLL */
187 struct {
188 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
189 int _fd;
190 } _sigpoll;
191
192 struct {
193 unsigned int _call_addr; /* calling insn */
194 int _syscall; /* triggering system call number */
195 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
196 } _sigsys;
197 } _sifields;
198} compat_siginfo_t;
199
127#define COMPAT_OFF_T_MAX 0x7fffffff 200#define COMPAT_OFF_T_MAX 0x7fffffff
128#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 201#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
129 202
@@ -209,7 +282,6 @@ typedef struct user_regs_struct32 compat_elf_gregset_t;
209 * as pointers because the syscall entry code will have 282 * as pointers because the syscall entry code will have
210 * appropriately converted them already. 283 * appropriately converted them already.
211 */ 284 */
212typedef u32 compat_uptr_t;
213 285
214static inline void __user *compat_ptr(compat_uptr_t uptr) 286static inline void __user *compat_ptr(compat_uptr_t uptr)
215{ 287{
diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h
index b04cbdb138cd..e6232773ce49 100644
--- a/arch/x86/include/asm/ia32.h
+++ b/arch/x86/include/asm/ia32.h
@@ -86,73 +86,6 @@ struct stat64 {
86 unsigned long long st_ino; 86 unsigned long long st_ino;
87} __attribute__((packed)); 87} __attribute__((packed));
88 88
89typedef struct compat_siginfo {
90 int si_signo;
91 int si_errno;
92 int si_code;
93
94 union {
95 int _pad[((128 / sizeof(int)) - 3)];
96
97 /* kill() */
98 struct {
99 unsigned int _pid; /* sender's pid */
100 unsigned int _uid; /* sender's uid */
101 } _kill;
102
103 /* POSIX.1b timers */
104 struct {
105 compat_timer_t _tid; /* timer id */
106 int _overrun; /* overrun count */
107 compat_sigval_t _sigval; /* same as below */
108 int _sys_private; /* not to be passed to user */
109 int _overrun_incr; /* amount to add to overrun */
110 } _timer;
111
112 /* POSIX.1b signals */
113 struct {
114 unsigned int _pid; /* sender's pid */
115 unsigned int _uid; /* sender's uid */
116 compat_sigval_t _sigval;
117 } _rt;
118
119 /* SIGCHLD */
120 struct {
121 unsigned int _pid; /* which child */
122 unsigned int _uid; /* sender's uid */
123 int _status; /* exit code */
124 compat_clock_t _utime;
125 compat_clock_t _stime;
126 } _sigchld;
127
128 /* SIGCHLD (x32 version) */
129 struct {
130 unsigned int _pid; /* which child */
131 unsigned int _uid; /* sender's uid */
132 int _status; /* exit code */
133 compat_s64 _utime;
134 compat_s64 _stime;
135 } _sigchld_x32;
136
137 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
138 struct {
139 unsigned int _addr; /* faulting insn/memory ref. */
140 } _sigfault;
141
142 /* SIGPOLL */
143 struct {
144 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
145 int _fd;
146 } _sigpoll;
147
148 struct {
149 unsigned int _call_addr; /* calling insn */
150 int _syscall; /* triggering system call number */
151 unsigned int _arch; /* AUDIT_ARCH_* of syscall */
152 } _sigsys;
153 } _sifields;
154} compat_siginfo_t;
155
156#define IA32_STACK_TOP IA32_PAGE_OFFSET 89#define IA32_STACK_TOP IA32_PAGE_OFFSET
157 90
158#ifdef __KERNEL__ 91#ifdef __KERNEL__
diff --git a/arch/x86/kernel/apic/apic_numachip.c b/arch/x86/kernel/apic/apic_numachip.c
index bc552cff2578..a65829ac2b9a 100644
--- a/arch/x86/kernel/apic/apic_numachip.c
+++ b/arch/x86/kernel/apic/apic_numachip.c
@@ -30,7 +30,7 @@
30 30
31static int numachip_system __read_mostly; 31static int numachip_system __read_mostly;
32 32
33static struct apic apic_numachip __read_mostly; 33static const struct apic apic_numachip __read_mostly;
34 34
35static unsigned int get_apic_id(unsigned long x) 35static unsigned int get_apic_id(unsigned long x)
36{ 36{
@@ -199,7 +199,7 @@ static int numachip_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
199 return 0; 199 return 0;
200} 200}
201 201
202static struct apic apic_numachip __refconst = { 202static const struct apic apic_numachip __refconst = {
203 203
204 .name = "NumaConnect system", 204 .name = "NumaConnect system",
205 .probe = numachip_probe, 205 .probe = numachip_probe,
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index af6db6ec5b2a..4929c1be0ac0 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -225,7 +225,7 @@ static struct platform_device rtc_device = {
225static __init int add_rtc_cmos(void) 225static __init int add_rtc_cmos(void)
226{ 226{
227#ifdef CONFIG_PNP 227#ifdef CONFIG_PNP
228 static const char *ids[] __initconst = 228 static const char * const const ids[] __initconst =
229 { "PNP0b00", "PNP0b01", "PNP0b02", }; 229 { "PNP0b00", "PNP0b01", "PNP0b02", };
230 struct pnp_dev *dev; 230 struct pnp_dev *dev;
231 struct pnp_id *id; 231 struct pnp_id *id;
diff --git a/arch/xtensa/include/asm/elf.h b/arch/xtensa/include/asm/elf.h
index 6e65eadaae14..5293312bc6a4 100644
--- a/arch/xtensa/include/asm/elf.h
+++ b/arch/xtensa/include/asm/elf.h
@@ -189,7 +189,8 @@ typedef struct {
189#endif 189#endif
190} elf_xtregs_t; 190} elf_xtregs_t;
191 191
192#define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 192#define SET_PERSONALITY(ex) \
193 set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK)))
193 194
194struct task_struct; 195struct task_struct;
195 196