diff options
Diffstat (limited to 'include')
157 files changed, 1204 insertions, 5512 deletions
diff --git a/include/asm-avr32/arch-at32ap/at32ap700x.h b/include/asm-avr32/arch-at32ap/at32ap700x.h deleted file mode 100644 index d18a3053be0d..000000000000 --- a/include/asm-avr32/arch-at32ap/at32ap700x.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * Pin definitions for AT32AP7000. | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_AT32AP700X_H__ | ||
11 | #define __ASM_ARCH_AT32AP700X_H__ | ||
12 | |||
13 | #define GPIO_PERIPH_A 0 | ||
14 | #define GPIO_PERIPH_B 1 | ||
15 | |||
16 | /* | ||
17 | * Pin numbers identifying specific GPIO pins on the chip. They can | ||
18 | * also be converted to IRQ numbers by passing them through | ||
19 | * gpio_to_irq(). | ||
20 | */ | ||
21 | #define GPIO_PIOA_BASE (0) | ||
22 | #define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32) | ||
23 | #define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32) | ||
24 | #define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32) | ||
25 | #define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32) | ||
26 | |||
27 | #define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N)) | ||
28 | #define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N)) | ||
29 | #define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N)) | ||
30 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) | ||
31 | #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) | ||
32 | |||
33 | |||
34 | /* | ||
35 | * DMAC peripheral hardware handshaking interfaces, used with dw_dmac | ||
36 | */ | ||
37 | #define DMAC_MCI_RX 0 | ||
38 | #define DMAC_MCI_TX 1 | ||
39 | #define DMAC_DAC_TX 2 | ||
40 | #define DMAC_AC97_A_RX 3 | ||
41 | #define DMAC_AC97_A_TX 4 | ||
42 | #define DMAC_AC97_B_RX 5 | ||
43 | #define DMAC_AC97_B_TX 6 | ||
44 | #define DMAC_DMAREQ_0 7 | ||
45 | #define DMAC_DMAREQ_1 8 | ||
46 | #define DMAC_DMAREQ_2 9 | ||
47 | #define DMAC_DMAREQ_3 10 | ||
48 | |||
49 | #endif /* __ASM_ARCH_AT32AP700X_H__ */ | ||
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h deleted file mode 100644 index e60e9076544d..000000000000 --- a/include/asm-avr32/arch-at32ap/board.h +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | /* | ||
2 | * Platform data definitions. | ||
3 | */ | ||
4 | #ifndef __ASM_ARCH_BOARD_H | ||
5 | #define __ASM_ARCH_BOARD_H | ||
6 | |||
7 | #include <linux/types.h> | ||
8 | |||
9 | #define GPIO_PIN_NONE (-1) | ||
10 | |||
11 | /* | ||
12 | * Clock rates for various on-board oscillators. The number of entries | ||
13 | * in this array is chip-dependent. | ||
14 | */ | ||
15 | extern unsigned long at32_board_osc_rates[]; | ||
16 | |||
17 | /* Add basic devices: system manager, interrupt controller, portmuxes, etc. */ | ||
18 | void at32_add_system_devices(void); | ||
19 | |||
20 | #define ATMEL_MAX_UART 4 | ||
21 | extern struct platform_device *atmel_default_console_device; | ||
22 | |||
23 | struct atmel_uart_data { | ||
24 | short use_dma_tx; /* use transmit DMA? */ | ||
25 | short use_dma_rx; /* use receive DMA? */ | ||
26 | void __iomem *regs; /* virtual base address, if any */ | ||
27 | }; | ||
28 | void at32_map_usart(unsigned int hw_id, unsigned int line); | ||
29 | struct platform_device *at32_add_device_usart(unsigned int id); | ||
30 | |||
31 | struct eth_platform_data { | ||
32 | u32 phy_mask; | ||
33 | u8 is_rmii; | ||
34 | }; | ||
35 | struct platform_device * | ||
36 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | ||
37 | |||
38 | struct spi_board_info; | ||
39 | struct platform_device * | ||
40 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); | ||
41 | |||
42 | struct atmel_lcdfb_info; | ||
43 | struct platform_device * | ||
44 | at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, | ||
45 | unsigned long fbmem_start, unsigned long fbmem_len, | ||
46 | unsigned int pin_config); | ||
47 | |||
48 | struct usba_platform_data; | ||
49 | struct platform_device * | ||
50 | at32_add_device_usba(unsigned int id, struct usba_platform_data *data); | ||
51 | |||
52 | struct ide_platform_data { | ||
53 | u8 cs; | ||
54 | }; | ||
55 | struct platform_device * | ||
56 | at32_add_device_ide(unsigned int id, unsigned int extint, | ||
57 | struct ide_platform_data *data); | ||
58 | |||
59 | /* mask says which PWM channels to mux */ | ||
60 | struct platform_device *at32_add_device_pwm(u32 mask); | ||
61 | |||
62 | /* depending on what's hooked up, not all SSC pins will be used */ | ||
63 | #define ATMEL_SSC_TK 0x01 | ||
64 | #define ATMEL_SSC_TF 0x02 | ||
65 | #define ATMEL_SSC_TD 0x04 | ||
66 | #define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD) | ||
67 | |||
68 | #define ATMEL_SSC_RK 0x10 | ||
69 | #define ATMEL_SSC_RF 0x20 | ||
70 | #define ATMEL_SSC_RD 0x40 | ||
71 | #define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD) | ||
72 | |||
73 | struct platform_device * | ||
74 | at32_add_device_ssc(unsigned int id, unsigned int flags); | ||
75 | |||
76 | struct i2c_board_info; | ||
77 | struct platform_device *at32_add_device_twi(unsigned int id, | ||
78 | struct i2c_board_info *b, | ||
79 | unsigned int n); | ||
80 | |||
81 | struct mci_platform_data; | ||
82 | struct platform_device * | ||
83 | at32_add_device_mci(unsigned int id, struct mci_platform_data *data); | ||
84 | |||
85 | struct ac97c_platform_data { | ||
86 | unsigned short dma_rx_periph_id; | ||
87 | unsigned short dma_tx_periph_id; | ||
88 | unsigned short dma_controller_id; | ||
89 | int reset_pin; | ||
90 | }; | ||
91 | struct platform_device * | ||
92 | at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data); | ||
93 | |||
94 | struct platform_device *at32_add_device_abdac(unsigned int id); | ||
95 | struct platform_device *at32_add_device_psif(unsigned int id); | ||
96 | |||
97 | struct cf_platform_data { | ||
98 | int detect_pin; | ||
99 | int reset_pin; | ||
100 | int vcc_pin; | ||
101 | int ready_pin; | ||
102 | u8 cs; | ||
103 | }; | ||
104 | struct platform_device * | ||
105 | at32_add_device_cf(unsigned int id, unsigned int extint, | ||
106 | struct cf_platform_data *data); | ||
107 | |||
108 | /* NAND / SmartMedia */ | ||
109 | struct atmel_nand_data { | ||
110 | int enable_pin; /* chip enable */ | ||
111 | int det_pin; /* card detect */ | ||
112 | int rdy_pin; /* ready/busy */ | ||
113 | u8 ale; /* address line number connected to ALE */ | ||
114 | u8 cle; /* address line number connected to CLE */ | ||
115 | u8 bus_width_16; /* buswidth is 16 bit */ | ||
116 | struct mtd_partition *(*partition_info)(int size, int *num_partitions); | ||
117 | }; | ||
118 | struct platform_device * | ||
119 | at32_add_device_nand(unsigned int id, struct atmel_nand_data *data); | ||
120 | |||
121 | #endif /* __ASM_ARCH_BOARD_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/include/asm-avr32/arch-at32ap/cpu.h deleted file mode 100644 index 44d0bfa1f409..000000000000 --- a/include/asm-avr32/arch-at32ap/cpu.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * AVR32 and (fake) AT91 CPU identification | ||
3 | * | ||
4 | * Copyright (C) 2007 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_CPU_H | ||
11 | #define __ASM_ARCH_CPU_H | ||
12 | |||
13 | /* | ||
14 | * Only AT32AP7000 is defined for now. We can identify the specific | ||
15 | * chip at runtime, but I'm not sure if it's really worth it. | ||
16 | */ | ||
17 | #ifdef CONFIG_CPU_AT32AP700X | ||
18 | # define cpu_is_at32ap7000() (1) | ||
19 | #else | ||
20 | # define cpu_is_at32ap7000() (0) | ||
21 | #endif | ||
22 | |||
23 | /* | ||
24 | * Since this is AVR32, we will never run on any AT91 CPU. But these | ||
25 | * definitions may reduce clutter in common drivers. | ||
26 | */ | ||
27 | #define cpu_is_at91rm9200() (0) | ||
28 | #define cpu_is_at91sam9xe() (0) | ||
29 | #define cpu_is_at91sam9260() (0) | ||
30 | #define cpu_is_at91sam9261() (0) | ||
31 | #define cpu_is_at91sam9263() (0) | ||
32 | #define cpu_is_at91sam9rl() (0) | ||
33 | #define cpu_is_at91cap9() (0) | ||
34 | |||
35 | #endif /* __ASM_ARCH_CPU_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h deleted file mode 100644 index 0180f584ef03..000000000000 --- a/include/asm-avr32/arch-at32ap/gpio.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_GPIO_H | ||
2 | #define __ASM_AVR32_ARCH_GPIO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <asm/irq.h> | ||
6 | |||
7 | |||
8 | /* Some GPIO chips can manage IRQs; some can't. The exact numbers can | ||
9 | * be changed if needed, but for the moment they're not configurable. | ||
10 | */ | ||
11 | #define ARCH_NR_GPIOS (NR_GPIO_IRQS + 2 * 32) | ||
12 | |||
13 | |||
14 | /* Arch-neutral GPIO API, supporting both "native" and external GPIOs. */ | ||
15 | #include <asm-generic/gpio.h> | ||
16 | |||
17 | static inline int gpio_get_value(unsigned int gpio) | ||
18 | { | ||
19 | return __gpio_get_value(gpio); | ||
20 | } | ||
21 | |||
22 | static inline void gpio_set_value(unsigned int gpio, int value) | ||
23 | { | ||
24 | __gpio_set_value(gpio, value); | ||
25 | } | ||
26 | |||
27 | static inline int gpio_cansleep(unsigned int gpio) | ||
28 | { | ||
29 | return __gpio_cansleep(gpio); | ||
30 | } | ||
31 | |||
32 | |||
33 | static inline int gpio_to_irq(unsigned int gpio) | ||
34 | { | ||
35 | if (gpio < NR_GPIO_IRQS) | ||
36 | return gpio + GPIO_IRQ_BASE; | ||
37 | return -EINVAL; | ||
38 | } | ||
39 | |||
40 | static inline int irq_to_gpio(unsigned int irq) | ||
41 | { | ||
42 | return irq - GPIO_IRQ_BASE; | ||
43 | } | ||
44 | |||
45 | #endif /* __ASM_AVR32_ARCH_GPIO_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/init.h b/include/asm-avr32/arch-at32ap/init.h deleted file mode 100644 index bc40e3d46150..000000000000 --- a/include/asm-avr32/arch-at32ap/init.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * AT32AP platform initialization calls. | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_AVR32_AT32AP_INIT_H__ | ||
11 | #define __ASM_AVR32_AT32AP_INIT_H__ | ||
12 | |||
13 | void setup_platform(void); | ||
14 | void setup_board(void); | ||
15 | |||
16 | void at32_setup_serial_console(unsigned int usart_id); | ||
17 | |||
18 | #endif /* __ASM_AVR32_AT32AP_INIT_H__ */ | ||
diff --git a/include/asm-avr32/arch-at32ap/io.h b/include/asm-avr32/arch-at32ap/io.h deleted file mode 100644 index 4ec6abc68ea3..000000000000 --- a/include/asm-avr32/arch-at32ap/io.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_AT32AP_IO_H | ||
2 | #define __ASM_AVR32_ARCH_AT32AP_IO_H | ||
3 | |||
4 | /* For "bizarre" halfword swapping */ | ||
5 | #include <linux/byteorder/swabb.h> | ||
6 | |||
7 | #if defined(CONFIG_AP700X_32_BIT_SMC) | ||
8 | # define __swizzle_addr_b(addr) (addr ^ 3UL) | ||
9 | # define __swizzle_addr_w(addr) (addr ^ 2UL) | ||
10 | # define __swizzle_addr_l(addr) (addr) | ||
11 | # define ioswabb(a, x) (x) | ||
12 | # define ioswabw(a, x) (x) | ||
13 | # define ioswabl(a, x) (x) | ||
14 | # define __mem_ioswabb(a, x) (x) | ||
15 | # define __mem_ioswabw(a, x) swab16(x) | ||
16 | # define __mem_ioswabl(a, x) swab32(x) | ||
17 | #elif defined(CONFIG_AP700X_16_BIT_SMC) | ||
18 | # define __swizzle_addr_b(addr) (addr ^ 1UL) | ||
19 | # define __swizzle_addr_w(addr) (addr) | ||
20 | # define __swizzle_addr_l(addr) (addr) | ||
21 | # define ioswabb(a, x) (x) | ||
22 | # define ioswabw(a, x) (x) | ||
23 | # define ioswabl(a, x) swahw32(x) | ||
24 | # define __mem_ioswabb(a, x) (x) | ||
25 | # define __mem_ioswabw(a, x) swab16(x) | ||
26 | # define __mem_ioswabl(a, x) swahb32(x) | ||
27 | #else | ||
28 | # define __swizzle_addr_b(addr) (addr) | ||
29 | # define __swizzle_addr_w(addr) (addr) | ||
30 | # define __swizzle_addr_l(addr) (addr) | ||
31 | # define ioswabb(a, x) (x) | ||
32 | # define ioswabw(a, x) swab16(x) | ||
33 | # define ioswabl(a, x) swab32(x) | ||
34 | # define __mem_ioswabb(a, x) (x) | ||
35 | # define __mem_ioswabw(a, x) (x) | ||
36 | # define __mem_ioswabl(a, x) (x) | ||
37 | #endif | ||
38 | |||
39 | #endif /* __ASM_AVR32_ARCH_AT32AP_IO_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/irq.h b/include/asm-avr32/arch-at32ap/irq.h deleted file mode 100644 index 608e350368c7..000000000000 --- a/include/asm-avr32/arch-at32ap/irq.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_IRQ_H | ||
2 | #define __ASM_AVR32_ARCH_IRQ_H | ||
3 | |||
4 | #define EIM_IRQ_BASE NR_INTERNAL_IRQS | ||
5 | #define NR_EIM_IRQS 32 | ||
6 | #define AT32_EXTINT(n) (EIM_IRQ_BASE + (n)) | ||
7 | |||
8 | #define GPIO_IRQ_BASE (EIM_IRQ_BASE + NR_EIM_IRQS) | ||
9 | #define NR_GPIO_CTLR (5 /*internal*/ + 1 /*external*/) | ||
10 | #define NR_GPIO_IRQS (NR_GPIO_CTLR * 32) | ||
11 | |||
12 | #define NR_IRQS (GPIO_IRQ_BASE + NR_GPIO_IRQS) | ||
13 | |||
14 | #endif /* __ASM_AVR32_ARCH_IRQ_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/pm.h b/include/asm-avr32/arch-at32ap/pm.h deleted file mode 100644 index 979b355b77b6..000000000000 --- a/include/asm-avr32/arch-at32ap/pm.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * AVR32 AP Power Management. | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_AVR32_ARCH_PM_H | ||
11 | #define __ASM_AVR32_ARCH_PM_H | ||
12 | |||
13 | /* Possible arguments to the "sleep" instruction */ | ||
14 | #define CPU_SLEEP_IDLE 0 | ||
15 | #define CPU_SLEEP_FROZEN 1 | ||
16 | #define CPU_SLEEP_STANDBY 2 | ||
17 | #define CPU_SLEEP_STOP 3 | ||
18 | #define CPU_SLEEP_STATIC 5 | ||
19 | |||
20 | #ifndef __ASSEMBLY__ | ||
21 | extern void cpu_enter_idle(void); | ||
22 | extern void cpu_enter_standby(unsigned long sdramc_base); | ||
23 | |||
24 | extern bool disable_idle_sleep; | ||
25 | |||
26 | static inline void cpu_disable_idle_sleep(void) | ||
27 | { | ||
28 | disable_idle_sleep = true; | ||
29 | } | ||
30 | |||
31 | static inline void cpu_enable_idle_sleep(void) | ||
32 | { | ||
33 | disable_idle_sleep = false; | ||
34 | } | ||
35 | |||
36 | static inline void cpu_idle_sleep(void) | ||
37 | { | ||
38 | /* | ||
39 | * If we're using the COUNT and COMPARE registers for | ||
40 | * timekeeping, we can't use the IDLE state. | ||
41 | */ | ||
42 | if (disable_idle_sleep) | ||
43 | cpu_relax(); | ||
44 | else | ||
45 | cpu_enter_idle(); | ||
46 | } | ||
47 | |||
48 | void intc_set_suspend_handler(unsigned long offset); | ||
49 | #endif | ||
50 | |||
51 | #endif /* __ASM_AVR32_ARCH_PM_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/include/asm-avr32/arch-at32ap/portmux.h deleted file mode 100644 index b1abe6b4e4ef..000000000000 --- a/include/asm-avr32/arch-at32ap/portmux.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * AT32 portmux interface. | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_PORTMUX_H__ | ||
11 | #define __ASM_ARCH_PORTMUX_H__ | ||
12 | |||
13 | /* | ||
14 | * Set up pin multiplexing, called from board init only. | ||
15 | * | ||
16 | * The following flags determine the initial state of the pin. | ||
17 | */ | ||
18 | #define AT32_GPIOF_PULLUP 0x00000001 /* (not-OUT) Enable pull-up */ | ||
19 | #define AT32_GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ | ||
20 | #define AT32_GPIOF_HIGH 0x00000004 /* (OUT) Set output high */ | ||
21 | #define AT32_GPIOF_DEGLITCH 0x00000008 /* (IN) Filter glitches */ | ||
22 | #define AT32_GPIOF_MULTIDRV 0x00000010 /* Enable multidriver option */ | ||
23 | |||
24 | void at32_select_periph(unsigned int pin, unsigned int periph, | ||
25 | unsigned long flags); | ||
26 | void at32_select_gpio(unsigned int pin, unsigned long flags); | ||
27 | void at32_reserve_pin(unsigned int pin); | ||
28 | |||
29 | #endif /* __ASM_ARCH_PORTMUX_H__ */ | ||
diff --git a/include/asm-avr32/arch-at32ap/smc.h b/include/asm-avr32/arch-at32ap/smc.h deleted file mode 100644 index c98eea44a70a..000000000000 --- a/include/asm-avr32/arch-at32ap/smc.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * Static Memory Controller for AT32 chips | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation | ||
5 | * | ||
6 | * Inspired by the OMAP2 General-Purpose Memory Controller interface | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __ARCH_AT32AP_SMC_H | ||
13 | #define __ARCH_AT32AP_SMC_H | ||
14 | |||
15 | /* | ||
16 | * All timing parameters are in nanoseconds. | ||
17 | */ | ||
18 | struct smc_timing { | ||
19 | /* Delay from address valid to assertion of given strobe */ | ||
20 | int ncs_read_setup; | ||
21 | int nrd_setup; | ||
22 | int ncs_write_setup; | ||
23 | int nwe_setup; | ||
24 | |||
25 | /* Pulse length of given strobe */ | ||
26 | int ncs_read_pulse; | ||
27 | int nrd_pulse; | ||
28 | int ncs_write_pulse; | ||
29 | int nwe_pulse; | ||
30 | |||
31 | /* Total cycle length of given operation */ | ||
32 | int read_cycle; | ||
33 | int write_cycle; | ||
34 | |||
35 | /* Minimal recovery times, will extend cycle if needed */ | ||
36 | int ncs_read_recover; | ||
37 | int nrd_recover; | ||
38 | int ncs_write_recover; | ||
39 | int nwe_recover; | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * All timing parameters are in clock cycles. | ||
44 | */ | ||
45 | struct smc_config { | ||
46 | |||
47 | /* Delay from address valid to assertion of given strobe */ | ||
48 | u8 ncs_read_setup; | ||
49 | u8 nrd_setup; | ||
50 | u8 ncs_write_setup; | ||
51 | u8 nwe_setup; | ||
52 | |||
53 | /* Pulse length of given strobe */ | ||
54 | u8 ncs_read_pulse; | ||
55 | u8 nrd_pulse; | ||
56 | u8 ncs_write_pulse; | ||
57 | u8 nwe_pulse; | ||
58 | |||
59 | /* Total cycle length of given operation */ | ||
60 | u8 read_cycle; | ||
61 | u8 write_cycle; | ||
62 | |||
63 | /* Bus width in bytes */ | ||
64 | u8 bus_width; | ||
65 | |||
66 | /* | ||
67 | * 0: Data is sampled on rising edge of NCS | ||
68 | * 1: Data is sampled on rising edge of NRD | ||
69 | */ | ||
70 | unsigned int nrd_controlled:1; | ||
71 | |||
72 | /* | ||
73 | * 0: Data is driven on falling edge of NCS | ||
74 | * 1: Data is driven on falling edge of NWR | ||
75 | */ | ||
76 | unsigned int nwe_controlled:1; | ||
77 | |||
78 | /* | ||
79 | * 0: NWAIT is disabled | ||
80 | * 1: Reserved | ||
81 | * 2: NWAIT is frozen mode | ||
82 | * 3: NWAIT in ready mode | ||
83 | */ | ||
84 | unsigned int nwait_mode:2; | ||
85 | |||
86 | /* | ||
87 | * 0: Byte select access type | ||
88 | * 1: Byte write access type | ||
89 | */ | ||
90 | unsigned int byte_write:1; | ||
91 | |||
92 | /* | ||
93 | * Number of clock cycles before data is released after | ||
94 | * the rising edge of the read controlling signal | ||
95 | * | ||
96 | * Total cycles from SMC is tdf_cycles + 1 | ||
97 | */ | ||
98 | unsigned int tdf_cycles:4; | ||
99 | |||
100 | /* | ||
101 | * 0: TDF optimization disabled | ||
102 | * 1: TDF optimization enabled | ||
103 | */ | ||
104 | unsigned int tdf_mode:1; | ||
105 | }; | ||
106 | |||
107 | extern void smc_set_timing(struct smc_config *config, | ||
108 | const struct smc_timing *timing); | ||
109 | |||
110 | extern int smc_set_configuration(int cs, const struct smc_config *config); | ||
111 | extern struct smc_config *smc_get_configuration(int cs); | ||
112 | |||
113 | #endif /* __ARCH_AT32AP_SMC_H */ | ||
diff --git a/include/asm-avr32/arch-at32ap/sram.h b/include/asm-avr32/arch-at32ap/sram.h deleted file mode 100644 index 4838dae7601a..000000000000 --- a/include/asm-avr32/arch-at32ap/sram.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Simple SRAM allocator | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_AVR32_ARCH_SRAM_H | ||
11 | #define __ASM_AVR32_ARCH_SRAM_H | ||
12 | |||
13 | #include <linux/genalloc.h> | ||
14 | |||
15 | extern struct gen_pool *sram_pool; | ||
16 | |||
17 | static inline unsigned long sram_alloc(size_t len) | ||
18 | { | ||
19 | if (!sram_pool) | ||
20 | return 0UL; | ||
21 | |||
22 | return gen_pool_alloc(sram_pool, len); | ||
23 | } | ||
24 | |||
25 | static inline void sram_free(unsigned long addr, size_t len) | ||
26 | { | ||
27 | return gen_pool_free(sram_pool, addr, len); | ||
28 | } | ||
29 | |||
30 | #endif /* __ASM_AVR32_ARCH_SRAM_H */ | ||
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h index 864181385579..15828b2d663c 100644 --- a/include/asm-generic/ioctl.h +++ b/include/asm-generic/ioctl.h | |||
@@ -68,12 +68,16 @@ | |||
68 | ((nr) << _IOC_NRSHIFT) | \ | 68 | ((nr) << _IOC_NRSHIFT) | \ |
69 | ((size) << _IOC_SIZESHIFT)) | 69 | ((size) << _IOC_SIZESHIFT)) |
70 | 70 | ||
71 | #ifdef __KERNEL__ | ||
71 | /* provoke compile error for invalid uses of size argument */ | 72 | /* provoke compile error for invalid uses of size argument */ |
72 | extern unsigned int __invalid_size_argument_for_IOC; | 73 | extern unsigned int __invalid_size_argument_for_IOC; |
73 | #define _IOC_TYPECHECK(t) \ | 74 | #define _IOC_TYPECHECK(t) \ |
74 | ((sizeof(t) == sizeof(t[1]) && \ | 75 | ((sizeof(t) == sizeof(t[1]) && \ |
75 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ | 76 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ |
76 | sizeof(t) : __invalid_size_argument_for_IOC) | 77 | sizeof(t) : __invalid_size_argument_for_IOC) |
78 | #else | ||
79 | #define _IOC_TYPECHECK(t) (sizeof(t)) | ||
80 | #endif | ||
77 | 81 | ||
78 | /* used to create numbers */ | 82 | /* used to create numbers */ |
79 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) | 83 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) |
diff --git a/include/asm-h8300/Kbuild b/include/asm-h8300/Kbuild deleted file mode 100644 index c68e1680da01..000000000000 --- a/include/asm-h8300/Kbuild +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
diff --git a/include/asm-h8300/a.out.h b/include/asm-h8300/a.out.h deleted file mode 100644 index ded780f0a492..000000000000 --- a/include/asm-h8300/a.out.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __H8300_A_OUT_H__ | ||
2 | #define __H8300_A_OUT_H__ | ||
3 | |||
4 | struct exec | ||
5 | { | ||
6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | ||
7 | unsigned a_text; /* length of text, in bytes */ | ||
8 | unsigned a_data; /* length of data, in bytes */ | ||
9 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
10 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
11 | unsigned a_entry; /* start address */ | ||
12 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
13 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
14 | }; | ||
15 | |||
16 | #define N_TRSIZE(a) ((a).a_trsize) | ||
17 | #define N_DRSIZE(a) ((a).a_drsize) | ||
18 | #define N_SYMSIZE(a) ((a).a_syms) | ||
19 | |||
20 | #endif /* __H8300_A_OUT_H__ */ | ||
diff --git a/include/asm-h8300/atomic.h b/include/asm-h8300/atomic.h deleted file mode 100644 index b4cf0ea97ede..000000000000 --- a/include/asm-h8300/atomic.h +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_ATOMIC__ | ||
2 | #define __ARCH_H8300_ATOMIC__ | ||
3 | |||
4 | /* | ||
5 | * Atomic operations that C can't guarantee us. Useful for | ||
6 | * resource counting etc.. | ||
7 | */ | ||
8 | |||
9 | typedef struct { int counter; } atomic_t; | ||
10 | #define ATOMIC_INIT(i) { (i) } | ||
11 | |||
12 | #define atomic_read(v) ((v)->counter) | ||
13 | #define atomic_set(v, i) (((v)->counter) = i) | ||
14 | |||
15 | #include <asm/system.h> | ||
16 | #include <linux/kernel.h> | ||
17 | |||
18 | static __inline__ int atomic_add_return(int i, atomic_t *v) | ||
19 | { | ||
20 | int ret,flags; | ||
21 | local_irq_save(flags); | ||
22 | ret = v->counter += i; | ||
23 | local_irq_restore(flags); | ||
24 | return ret; | ||
25 | } | ||
26 | |||
27 | #define atomic_add(i, v) atomic_add_return(i, v) | ||
28 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
29 | |||
30 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | ||
31 | { | ||
32 | int ret,flags; | ||
33 | local_irq_save(flags); | ||
34 | ret = v->counter -= i; | ||
35 | local_irq_restore(flags); | ||
36 | return ret; | ||
37 | } | ||
38 | |||
39 | #define atomic_sub(i, v) atomic_sub_return(i, v) | ||
40 | #define atomic_sub_and_test(i,v) (atomic_sub_return(i, v) == 0) | ||
41 | |||
42 | static __inline__ int atomic_inc_return(atomic_t *v) | ||
43 | { | ||
44 | int ret,flags; | ||
45 | local_irq_save(flags); | ||
46 | v->counter++; | ||
47 | ret = v->counter; | ||
48 | local_irq_restore(flags); | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | #define atomic_inc(v) atomic_inc_return(v) | ||
53 | |||
54 | /* | ||
55 | * atomic_inc_and_test - increment and test | ||
56 | * @v: pointer of type atomic_t | ||
57 | * | ||
58 | * Atomically increments @v by 1 | ||
59 | * and returns true if the result is zero, or false for all | ||
60 | * other cases. | ||
61 | */ | ||
62 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | ||
63 | |||
64 | static __inline__ int atomic_dec_return(atomic_t *v) | ||
65 | { | ||
66 | int ret,flags; | ||
67 | local_irq_save(flags); | ||
68 | --v->counter; | ||
69 | ret = v->counter; | ||
70 | local_irq_restore(flags); | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | #define atomic_dec(v) atomic_dec_return(v) | ||
75 | |||
76 | static __inline__ int atomic_dec_and_test(atomic_t *v) | ||
77 | { | ||
78 | int ret,flags; | ||
79 | local_irq_save(flags); | ||
80 | --v->counter; | ||
81 | ret = v->counter; | ||
82 | local_irq_restore(flags); | ||
83 | return ret == 0; | ||
84 | } | ||
85 | |||
86 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
87 | { | ||
88 | int ret; | ||
89 | unsigned long flags; | ||
90 | |||
91 | local_irq_save(flags); | ||
92 | ret = v->counter; | ||
93 | if (likely(ret == old)) | ||
94 | v->counter = new; | ||
95 | local_irq_restore(flags); | ||
96 | return ret; | ||
97 | } | ||
98 | |||
99 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
100 | |||
101 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | ||
102 | { | ||
103 | int ret; | ||
104 | unsigned long flags; | ||
105 | |||
106 | local_irq_save(flags); | ||
107 | ret = v->counter; | ||
108 | if (ret != u) | ||
109 | v->counter += a; | ||
110 | local_irq_restore(flags); | ||
111 | return ret != u; | ||
112 | } | ||
113 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
114 | |||
115 | static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *v) | ||
116 | { | ||
117 | __asm__ __volatile__("stc ccr,r1l\n\t" | ||
118 | "orc #0x80,ccr\n\t" | ||
119 | "mov.l %0,er0\n\t" | ||
120 | "and.l %1,er0\n\t" | ||
121 | "mov.l er0,%0\n\t" | ||
122 | "ldc r1l,ccr" | ||
123 | : "=m" (*v) : "g" (~(mask)) :"er0","er1"); | ||
124 | } | ||
125 | |||
126 | static __inline__ void atomic_set_mask(unsigned long mask, unsigned long *v) | ||
127 | { | ||
128 | __asm__ __volatile__("stc ccr,r1l\n\t" | ||
129 | "orc #0x80,ccr\n\t" | ||
130 | "mov.l %0,er0\n\t" | ||
131 | "or.l %1,er0\n\t" | ||
132 | "mov.l er0,%0\n\t" | ||
133 | "ldc r1l,ccr" | ||
134 | : "=m" (*v) : "g" (mask) :"er0","er1"); | ||
135 | } | ||
136 | |||
137 | /* Atomic operations are already serializing */ | ||
138 | #define smp_mb__before_atomic_dec() barrier() | ||
139 | #define smp_mb__after_atomic_dec() barrier() | ||
140 | #define smp_mb__before_atomic_inc() barrier() | ||
141 | #define smp_mb__after_atomic_inc() barrier() | ||
142 | |||
143 | #include <asm-generic/atomic.h> | ||
144 | #endif /* __ARCH_H8300_ATOMIC __ */ | ||
diff --git a/include/asm-h8300/auxvec.h b/include/asm-h8300/auxvec.h deleted file mode 100644 index 1d36fe38b088..000000000000 --- a/include/asm-h8300/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __ASMH8300_AUXVEC_H | ||
2 | #define __ASMH8300_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h deleted file mode 100644 index cb18e3b0aa94..000000000000 --- a/include/asm-h8300/bitops.h +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | #ifndef _H8300_BITOPS_H | ||
2 | #define _H8300_BITOPS_H | ||
3 | |||
4 | /* | ||
5 | * Copyright 1992, Linus Torvalds. | ||
6 | * Copyright 2002, Yoshinori Sato | ||
7 | */ | ||
8 | |||
9 | #include <linux/compiler.h> | ||
10 | #include <asm/system.h> | ||
11 | |||
12 | #ifdef __KERNEL__ | ||
13 | |||
14 | #ifndef _LINUX_BITOPS_H | ||
15 | #error only <linux/bitops.h> can be included directly | ||
16 | #endif | ||
17 | |||
18 | /* | ||
19 | * Function prototypes to keep gcc -Wall happy | ||
20 | */ | ||
21 | |||
22 | /* | ||
23 | * ffz = Find First Zero in word. Undefined if no zero exists, | ||
24 | * so code should check against ~0UL first.. | ||
25 | */ | ||
26 | static __inline__ unsigned long ffz(unsigned long word) | ||
27 | { | ||
28 | unsigned long result; | ||
29 | |||
30 | result = -1; | ||
31 | __asm__("1:\n\t" | ||
32 | "shlr.l %2\n\t" | ||
33 | "adds #1,%0\n\t" | ||
34 | "bcs 1b" | ||
35 | : "=r" (result) | ||
36 | : "0" (result),"r" (word)); | ||
37 | return result; | ||
38 | } | ||
39 | |||
40 | #define H8300_GEN_BITOP_CONST(OP,BIT) \ | ||
41 | case BIT: \ | ||
42 | __asm__(OP " #" #BIT ",@%0"::"r"(b_addr):"memory"); \ | ||
43 | break; | ||
44 | |||
45 | #define H8300_GEN_BITOP(FNAME,OP) \ | ||
46 | static __inline__ void FNAME(int nr, volatile unsigned long* addr) \ | ||
47 | { \ | ||
48 | volatile unsigned char *b_addr; \ | ||
49 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
50 | if (__builtin_constant_p(nr)) { \ | ||
51 | switch(nr & 7) { \ | ||
52 | H8300_GEN_BITOP_CONST(OP,0) \ | ||
53 | H8300_GEN_BITOP_CONST(OP,1) \ | ||
54 | H8300_GEN_BITOP_CONST(OP,2) \ | ||
55 | H8300_GEN_BITOP_CONST(OP,3) \ | ||
56 | H8300_GEN_BITOP_CONST(OP,4) \ | ||
57 | H8300_GEN_BITOP_CONST(OP,5) \ | ||
58 | H8300_GEN_BITOP_CONST(OP,6) \ | ||
59 | H8300_GEN_BITOP_CONST(OP,7) \ | ||
60 | } \ | ||
61 | } else { \ | ||
62 | __asm__(OP " %w0,@%1"::"r"(nr),"r"(b_addr):"memory"); \ | ||
63 | } \ | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * clear_bit() doesn't provide any barrier for the compiler. | ||
68 | */ | ||
69 | #define smp_mb__before_clear_bit() barrier() | ||
70 | #define smp_mb__after_clear_bit() barrier() | ||
71 | |||
72 | H8300_GEN_BITOP(set_bit ,"bset") | ||
73 | H8300_GEN_BITOP(clear_bit ,"bclr") | ||
74 | H8300_GEN_BITOP(change_bit,"bnot") | ||
75 | #define __set_bit(nr,addr) set_bit((nr),(addr)) | ||
76 | #define __clear_bit(nr,addr) clear_bit((nr),(addr)) | ||
77 | #define __change_bit(nr,addr) change_bit((nr),(addr)) | ||
78 | |||
79 | #undef H8300_GEN_BITOP | ||
80 | #undef H8300_GEN_BITOP_CONST | ||
81 | |||
82 | static __inline__ int test_bit(int nr, const unsigned long* addr) | ||
83 | { | ||
84 | return (*((volatile unsigned char *)addr + | ||
85 | ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0; | ||
86 | } | ||
87 | |||
88 | #define __test_bit(nr, addr) test_bit(nr, addr) | ||
89 | |||
90 | #define H8300_GEN_TEST_BITOP_CONST_INT(OP,BIT) \ | ||
91 | case BIT: \ | ||
92 | __asm__("stc ccr,%w1\n\t" \ | ||
93 | "orc #0x80,ccr\n\t" \ | ||
94 | "bld #" #BIT ",@%4\n\t" \ | ||
95 | OP " #" #BIT ",@%4\n\t" \ | ||
96 | "rotxl.l %0\n\t" \ | ||
97 | "ldc %w1,ccr" \ | ||
98 | : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \ | ||
99 | : "0" (retval),"r" (b_addr) \ | ||
100 | : "memory"); \ | ||
101 | break; | ||
102 | |||
103 | #define H8300_GEN_TEST_BITOP_CONST(OP,BIT) \ | ||
104 | case BIT: \ | ||
105 | __asm__("bld #" #BIT ",@%3\n\t" \ | ||
106 | OP " #" #BIT ",@%3\n\t" \ | ||
107 | "rotxl.l %0\n\t" \ | ||
108 | : "=r"(retval),"=m"(*b_addr) \ | ||
109 | : "0" (retval),"r" (b_addr) \ | ||
110 | : "memory"); \ | ||
111 | break; | ||
112 | |||
113 | #define H8300_GEN_TEST_BITOP(FNNAME,OP) \ | ||
114 | static __inline__ int FNNAME(int nr, volatile void * addr) \ | ||
115 | { \ | ||
116 | int retval = 0; \ | ||
117 | char ccrsave; \ | ||
118 | volatile unsigned char *b_addr; \ | ||
119 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
120 | if (__builtin_constant_p(nr)) { \ | ||
121 | switch(nr & 7) { \ | ||
122 | H8300_GEN_TEST_BITOP_CONST_INT(OP,0) \ | ||
123 | H8300_GEN_TEST_BITOP_CONST_INT(OP,1) \ | ||
124 | H8300_GEN_TEST_BITOP_CONST_INT(OP,2) \ | ||
125 | H8300_GEN_TEST_BITOP_CONST_INT(OP,3) \ | ||
126 | H8300_GEN_TEST_BITOP_CONST_INT(OP,4) \ | ||
127 | H8300_GEN_TEST_BITOP_CONST_INT(OP,5) \ | ||
128 | H8300_GEN_TEST_BITOP_CONST_INT(OP,6) \ | ||
129 | H8300_GEN_TEST_BITOP_CONST_INT(OP,7) \ | ||
130 | } \ | ||
131 | } else { \ | ||
132 | __asm__("stc ccr,%w1\n\t" \ | ||
133 | "orc #0x80,ccr\n\t" \ | ||
134 | "btst %w5,@%4\n\t" \ | ||
135 | OP " %w5,@%4\n\t" \ | ||
136 | "beq 1f\n\t" \ | ||
137 | "inc.l #1,%0\n" \ | ||
138 | "1:\n\t" \ | ||
139 | "ldc %w1,ccr" \ | ||
140 | : "=r"(retval),"=&r"(ccrsave),"=m"(*b_addr) \ | ||
141 | : "0" (retval),"r" (b_addr),"r"(nr) \ | ||
142 | : "memory"); \ | ||
143 | } \ | ||
144 | return retval; \ | ||
145 | } \ | ||
146 | \ | ||
147 | static __inline__ int __ ## FNNAME(int nr, volatile void * addr) \ | ||
148 | { \ | ||
149 | int retval = 0; \ | ||
150 | volatile unsigned char *b_addr; \ | ||
151 | b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3); \ | ||
152 | if (__builtin_constant_p(nr)) { \ | ||
153 | switch(nr & 7) { \ | ||
154 | H8300_GEN_TEST_BITOP_CONST(OP,0) \ | ||
155 | H8300_GEN_TEST_BITOP_CONST(OP,1) \ | ||
156 | H8300_GEN_TEST_BITOP_CONST(OP,2) \ | ||
157 | H8300_GEN_TEST_BITOP_CONST(OP,3) \ | ||
158 | H8300_GEN_TEST_BITOP_CONST(OP,4) \ | ||
159 | H8300_GEN_TEST_BITOP_CONST(OP,5) \ | ||
160 | H8300_GEN_TEST_BITOP_CONST(OP,6) \ | ||
161 | H8300_GEN_TEST_BITOP_CONST(OP,7) \ | ||
162 | } \ | ||
163 | } else { \ | ||
164 | __asm__("btst %w4,@%3\n\t" \ | ||
165 | OP " %w4,@%3\n\t" \ | ||
166 | "beq 1f\n\t" \ | ||
167 | "inc.l #1,%0\n" \ | ||
168 | "1:" \ | ||
169 | : "=r"(retval),"=m"(*b_addr) \ | ||
170 | : "0" (retval),"r" (b_addr),"r"(nr) \ | ||
171 | : "memory"); \ | ||
172 | } \ | ||
173 | return retval; \ | ||
174 | } | ||
175 | |||
176 | H8300_GEN_TEST_BITOP(test_and_set_bit, "bset") | ||
177 | H8300_GEN_TEST_BITOP(test_and_clear_bit, "bclr") | ||
178 | H8300_GEN_TEST_BITOP(test_and_change_bit,"bnot") | ||
179 | #undef H8300_GEN_TEST_BITOP_CONST | ||
180 | #undef H8300_GEN_TEST_BITOP_CONST_INT | ||
181 | #undef H8300_GEN_TEST_BITOP | ||
182 | |||
183 | #include <asm-generic/bitops/ffs.h> | ||
184 | |||
185 | static __inline__ unsigned long __ffs(unsigned long word) | ||
186 | { | ||
187 | unsigned long result; | ||
188 | |||
189 | result = -1; | ||
190 | __asm__("1:\n\t" | ||
191 | "shlr.l %2\n\t" | ||
192 | "adds #1,%0\n\t" | ||
193 | "bcc 1b" | ||
194 | : "=r" (result) | ||
195 | : "0"(result),"r"(word)); | ||
196 | return result; | ||
197 | } | ||
198 | |||
199 | #include <asm-generic/bitops/find.h> | ||
200 | #include <asm-generic/bitops/sched.h> | ||
201 | #include <asm-generic/bitops/hweight.h> | ||
202 | #include <asm-generic/bitops/lock.h> | ||
203 | #include <asm-generic/bitops/ext2-non-atomic.h> | ||
204 | #include <asm-generic/bitops/ext2-atomic.h> | ||
205 | #include <asm-generic/bitops/minix.h> | ||
206 | |||
207 | #endif /* __KERNEL__ */ | ||
208 | |||
209 | #include <asm-generic/bitops/fls.h> | ||
210 | #include <asm-generic/bitops/fls64.h> | ||
211 | |||
212 | #endif /* _H8300_BITOPS_H */ | ||
diff --git a/include/asm-h8300/bootinfo.h b/include/asm-h8300/bootinfo.h deleted file mode 100644 index 5bed7e7aac0a..000000000000 --- a/include/asm-h8300/bootinfo.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | |||
2 | /* Nothing for h8300 */ | ||
diff --git a/include/asm-h8300/bug.h b/include/asm-h8300/bug.h deleted file mode 100644 index edddf5b086e5..000000000000 --- a/include/asm-h8300/bug.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _H8300_BUG_H | ||
2 | #define _H8300_BUG_H | ||
3 | #include <asm-generic/bug.h> | ||
4 | #endif | ||
diff --git a/include/asm-h8300/bugs.h b/include/asm-h8300/bugs.h deleted file mode 100644 index 1cb4afba6eb1..000000000000 --- a/include/asm-h8300/bugs.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1994 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This is included by init/main.c to check for architecture-dependent bugs. | ||
9 | * | ||
10 | * Needs: | ||
11 | * void check_bugs(void); | ||
12 | */ | ||
13 | |||
14 | static void check_bugs(void) | ||
15 | { | ||
16 | } | ||
diff --git a/include/asm-h8300/byteorder.h b/include/asm-h8300/byteorder.h deleted file mode 100644 index 36e597d61619..000000000000 --- a/include/asm-h8300/byteorder.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _H8300_BYTEORDER_H | ||
2 | #define _H8300_BYTEORDER_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
7 | # define __BYTEORDER_HAS_U64__ | ||
8 | # define __SWAB_64_THRU_32__ | ||
9 | #endif | ||
10 | |||
11 | #include <linux/byteorder/big_endian.h> | ||
12 | |||
13 | #endif /* _H8300_BYTEORDER_H */ | ||
diff --git a/include/asm-h8300/cache.h b/include/asm-h8300/cache.h deleted file mode 100644 index c6350283649d..000000000000 --- a/include/asm-h8300/cache.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_CACHE_H | ||
2 | #define __ARCH_H8300_CACHE_H | ||
3 | |||
4 | /* bytes per L1 cache line */ | ||
5 | #define L1_CACHE_BYTES 4 | ||
6 | |||
7 | /* m68k-elf-gcc 2.95.2 doesn't like these */ | ||
8 | |||
9 | #define __cacheline_aligned | ||
10 | #define ____cacheline_aligned | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-h8300/cachectl.h b/include/asm-h8300/cachectl.h deleted file mode 100644 index c464022d8e26..000000000000 --- a/include/asm-h8300/cachectl.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _H8300_CACHECTL_H | ||
2 | #define _H8300_CACHECTL_H | ||
3 | |||
4 | /* Definitions for the cacheflush system call. */ | ||
5 | |||
6 | #define FLUSH_SCOPE_LINE 0 /* Flush a cache line */ | ||
7 | #define FLUSH_SCOPE_PAGE 0 /* Flush a page */ | ||
8 | #define FLUSH_SCOPE_ALL 0 /* Flush the whole cache -- superuser only */ | ||
9 | |||
10 | #define FLUSH_CACHE_DATA 0 /* Writeback and flush data cache */ | ||
11 | #define FLUSH_CACHE_INSN 0 /* Flush instruction cache */ | ||
12 | #define FLUSH_CACHE_BOTH 0 /* Flush both caches */ | ||
13 | |||
14 | #endif /* _H8300_CACHECTL_H */ | ||
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h deleted file mode 100644 index 5ffdca217b95..000000000000 --- a/include/asm-h8300/cacheflush.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp> | ||
3 | */ | ||
4 | |||
5 | #ifndef _ASM_H8300_CACHEFLUSH_H | ||
6 | #define _ASM_H8300_CACHEFLUSH_H | ||
7 | |||
8 | /* | ||
9 | * Cache handling functions | ||
10 | * No Cache memory all dummy functions | ||
11 | */ | ||
12 | |||
13 | #define flush_cache_all() | ||
14 | #define flush_cache_mm(mm) | ||
15 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
16 | #define flush_cache_range(vma,a,b) | ||
17 | #define flush_cache_page(vma,p,pfn) | ||
18 | #define flush_dcache_page(page) | ||
19 | #define flush_dcache_mmap_lock(mapping) | ||
20 | #define flush_dcache_mmap_unlock(mapping) | ||
21 | #define flush_icache() | ||
22 | #define flush_icache_page(vma,page) | ||
23 | #define flush_icache_range(start,len) | ||
24 | #define flush_cache_vmap(start, end) | ||
25 | #define flush_cache_vunmap(start, end) | ||
26 | #define cache_push_v(vaddr,len) | ||
27 | #define cache_push(paddr,len) | ||
28 | #define cache_clear(paddr,len) | ||
29 | |||
30 | #define flush_dcache_range(a,b) | ||
31 | |||
32 | #define flush_icache_user_range(vma,page,addr,len) | ||
33 | |||
34 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
35 | memcpy(dst, src, len) | ||
36 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
37 | memcpy(dst, src, len) | ||
38 | |||
39 | #endif /* _ASM_H8300_CACHEFLUSH_H */ | ||
diff --git a/include/asm-h8300/checksum.h b/include/asm-h8300/checksum.h deleted file mode 100644 index 98724e12508c..000000000000 --- a/include/asm-h8300/checksum.h +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | #ifndef _H8300_CHECKSUM_H | ||
2 | #define _H8300_CHECKSUM_H | ||
3 | |||
4 | /* | ||
5 | * computes the checksum of a memory block at buff, length len, | ||
6 | * and adds in "sum" (32-bit) | ||
7 | * | ||
8 | * returns a 32-bit number suitable for feeding into itself | ||
9 | * or csum_tcpudp_magic | ||
10 | * | ||
11 | * this function must be called with even lengths, except | ||
12 | * for the last fragment, which may be odd | ||
13 | * | ||
14 | * it's best to have buff aligned on a 32-bit boundary | ||
15 | */ | ||
16 | __wsum csum_partial(const void *buff, int len, __wsum sum); | ||
17 | |||
18 | /* | ||
19 | * the same as csum_partial, but copies from src while it | ||
20 | * checksums | ||
21 | * | ||
22 | * here even more important to align src and dst on a 32-bit (or even | ||
23 | * better 64-bit) boundary | ||
24 | */ | ||
25 | |||
26 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); | ||
27 | |||
28 | |||
29 | /* | ||
30 | * the same as csum_partial_copy, but copies from user space. | ||
31 | * | ||
32 | * here even more important to align src and dst on a 32-bit (or even | ||
33 | * better 64-bit) boundary | ||
34 | */ | ||
35 | |||
36 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, | ||
37 | int len, __wsum sum, int *csum_err); | ||
38 | |||
39 | __sum16 ip_fast_csum(const void *iph, unsigned int ihl); | ||
40 | |||
41 | |||
42 | /* | ||
43 | * Fold a partial checksum | ||
44 | */ | ||
45 | |||
46 | static inline __sum16 csum_fold(__wsum sum) | ||
47 | { | ||
48 | __asm__("mov.l %0,er0\n\t" | ||
49 | "add.w e0,r0\n\t" | ||
50 | "xor.w e0,e0\n\t" | ||
51 | "rotxl.w e0\n\t" | ||
52 | "add.w e0,r0\n\t" | ||
53 | "sub.w e0,e0\n\t" | ||
54 | "mov.l er0,%0" | ||
55 | : "=r"(sum) | ||
56 | : "0"(sum) | ||
57 | : "er0"); | ||
58 | return (__force __sum16)~sum; | ||
59 | } | ||
60 | |||
61 | |||
62 | /* | ||
63 | * computes the checksum of the TCP/UDP pseudo-header | ||
64 | * returns a 16-bit checksum, already complemented | ||
65 | */ | ||
66 | |||
67 | static inline __wsum | ||
68 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | ||
69 | unsigned short proto, __wsum sum) | ||
70 | { | ||
71 | __asm__ ("sub.l er0,er0\n\t" | ||
72 | "add.l %2,%0\n\t" | ||
73 | "addx #0,r0l\n\t" | ||
74 | "add.l %3,%0\n\t" | ||
75 | "addx #0,r0l\n\t" | ||
76 | "add.l %4,%0\n\t" | ||
77 | "addx #0,r0l\n\t" | ||
78 | "add.l er0,%0\n\t" | ||
79 | "bcc 1f\n\t" | ||
80 | "inc.l #1,%0\n" | ||
81 | "1:" | ||
82 | : "=&r" (sum) | ||
83 | : "0" (sum), "r" (daddr), "r" (saddr), "r" (len + proto) | ||
84 | :"er0"); | ||
85 | return sum; | ||
86 | } | ||
87 | |||
88 | static inline __sum16 | ||
89 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, | ||
90 | unsigned short proto, __wsum sum) | ||
91 | { | ||
92 | return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
97 | * in icmp.c | ||
98 | */ | ||
99 | |||
100 | extern __sum16 ip_compute_csum(const void *buff, int len); | ||
101 | |||
102 | #endif /* _H8300_CHECKSUM_H */ | ||
diff --git a/include/asm-h8300/cputime.h b/include/asm-h8300/cputime.h deleted file mode 100644 index 092e187c7b08..000000000000 --- a/include/asm-h8300/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_CPUTIME_H | ||
2 | #define __H8300_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __H8300_CPUTIME_H */ | ||
diff --git a/include/asm-h8300/current.h b/include/asm-h8300/current.h deleted file mode 100644 index 57d74ee55a14..000000000000 --- a/include/asm-h8300/current.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _H8300_CURRENT_H | ||
2 | #define _H8300_CURRENT_H | ||
3 | /* | ||
4 | * current.h | ||
5 | * (C) Copyright 2000, Lineo, David McCullough <davidm@lineo.com> | ||
6 | * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) | ||
7 | * | ||
8 | * rather than dedicate a register (as the m68k source does), we | ||
9 | * just keep a global, we should probably just change it all to be | ||
10 | * current and lose _current_task. | ||
11 | */ | ||
12 | |||
13 | #include <linux/thread_info.h> | ||
14 | #include <asm/thread_info.h> | ||
15 | |||
16 | struct task_struct; | ||
17 | |||
18 | static inline struct task_struct *get_current(void) | ||
19 | { | ||
20 | return(current_thread_info()->task); | ||
21 | } | ||
22 | |||
23 | #define current get_current() | ||
24 | |||
25 | #endif /* _H8300_CURRENT_H */ | ||
diff --git a/include/asm-h8300/dbg.h b/include/asm-h8300/dbg.h deleted file mode 100644 index 2c6d1cbcf736..000000000000 --- a/include/asm-h8300/dbg.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #define DEBUG 1 | ||
2 | #define BREAK asm volatile ("trap #3") | ||
diff --git a/include/asm-h8300/delay.h b/include/asm-h8300/delay.h deleted file mode 100644 index 743beba70f82..000000000000 --- a/include/asm-h8300/delay.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | #ifndef _H8300_DELAY_H | ||
2 | #define _H8300_DELAY_H | ||
3 | |||
4 | #include <asm/param.h> | ||
5 | |||
6 | /* | ||
7 | * Copyright (C) 2002 Yoshinori Sato <ysato@sourceforge.jp> | ||
8 | * | ||
9 | * Delay routines, using a pre-computed "loops_per_second" value. | ||
10 | */ | ||
11 | |||
12 | static inline void __delay(unsigned long loops) | ||
13 | { | ||
14 | __asm__ __volatile__ ("1:\n\t" | ||
15 | "dec.l #1,%0\n\t" | ||
16 | "bne 1b" | ||
17 | :"=r" (loops):"0"(loops)); | ||
18 | } | ||
19 | |||
20 | /* | ||
21 | * Use only for very small delays ( < 1 msec). Should probably use a | ||
22 | * lookup table, really, as the multiplications take much too long with | ||
23 | * short delays. This is a "reasonable" implementation, though (and the | ||
24 | * first constant multiplications gets optimized away if the delay is | ||
25 | * a constant) | ||
26 | */ | ||
27 | |||
28 | extern unsigned long loops_per_jiffy; | ||
29 | |||
30 | static inline void udelay(unsigned long usecs) | ||
31 | { | ||
32 | usecs *= 4295; /* 2**32 / 1000000 */ | ||
33 | usecs /= (loops_per_jiffy*HZ); | ||
34 | if (usecs) | ||
35 | __delay(usecs); | ||
36 | } | ||
37 | |||
38 | #endif /* _H8300_DELAY_H */ | ||
diff --git a/include/asm-h8300/device.h b/include/asm-h8300/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/include/asm-h8300/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/include/asm-h8300/div64.h b/include/asm-h8300/div64.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/include/asm-h8300/div64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/include/asm-h8300/dma.h b/include/asm-h8300/dma.h deleted file mode 100644 index 3edbaaaedf5b..000000000000 --- a/include/asm-h8300/dma.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _H8300_DMA_H | ||
2 | #define _H8300_DMA_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * Set number of channels of DMA on ColdFire for different implementations. | ||
7 | */ | ||
8 | #define MAX_DMA_CHANNELS 0 | ||
9 | #define MAX_DMA_ADDRESS PAGE_OFFSET | ||
10 | |||
11 | /* These are in kernel/dma.c: */ | ||
12 | extern int request_dma(unsigned int dmanr, const char *device_id); /* reserve a DMA channel */ | ||
13 | extern void free_dma(unsigned int dmanr); /* release it again */ | ||
14 | |||
15 | #endif /* _H8300_DMA_H */ | ||
diff --git a/include/asm-h8300/elf.h b/include/asm-h8300/elf.h deleted file mode 100644 index a8b57d1f4128..000000000000 --- a/include/asm-h8300/elf.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | #ifndef __ASMH8300_ELF_H | ||
2 | #define __ASMH8300_ELF_H | ||
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/user.h> | ||
10 | |||
11 | typedef unsigned long elf_greg_t; | ||
12 | |||
13 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
14 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
15 | typedef unsigned long elf_fpregset_t; | ||
16 | |||
17 | /* | ||
18 | * This is used to ensure we don't load something for the wrong architecture. | ||
19 | */ | ||
20 | #define elf_check_arch(x) ((x)->e_machine == EM_H8_300) | ||
21 | |||
22 | /* | ||
23 | * These are used to set parameters in the core dumps. | ||
24 | */ | ||
25 | #define ELF_CLASS ELFCLASS32 | ||
26 | #define ELF_DATA ELFDATA2MSB | ||
27 | #define ELF_ARCH EM_H8_300 | ||
28 | #if defined(__H8300H__) | ||
29 | #define ELF_CORE_EFLAGS 0x810000 | ||
30 | #endif | ||
31 | #if defined(__H8300S__) | ||
32 | #define ELF_CORE_EFLAGS 0x820000 | ||
33 | #endif | ||
34 | |||
35 | #define ELF_PLAT_INIT(_r) _r->er1 = 0 | ||
36 | |||
37 | #define USE_ELF_CORE_DUMP | ||
38 | #define ELF_EXEC_PAGESIZE 4096 | ||
39 | |||
40 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
41 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
42 | the loader. We need to make sure that it is out of the way of the program | ||
43 | that it will "exec", and that there is sufficient room for the brk. */ | ||
44 | |||
45 | #define ELF_ET_DYN_BASE 0xD0000000UL | ||
46 | |||
47 | /* This yields a mask that user programs can use to figure out what | ||
48 | instruction set this cpu supports. */ | ||
49 | |||
50 | #define ELF_HWCAP (0) | ||
51 | |||
52 | /* This yields a string that ld.so will use to load implementation | ||
53 | specific libraries for optimization. This is more specific in | ||
54 | intent than poking at uname or /proc/cpuinfo. */ | ||
55 | |||
56 | #define ELF_PLATFORM (NULL) | ||
57 | |||
58 | #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) | ||
59 | |||
60 | #define R_H8_NONE 0 | ||
61 | #define R_H8_DIR32 1 | ||
62 | #define R_H8_DIR32_28 2 | ||
63 | #define R_H8_DIR32_24 3 | ||
64 | #define R_H8_DIR32_16 4 | ||
65 | #define R_H8_DIR32U 6 | ||
66 | #define R_H8_DIR32U_28 7 | ||
67 | #define R_H8_DIR32U_24 8 | ||
68 | #define R_H8_DIR32U_20 9 | ||
69 | #define R_H8_DIR32U_16 10 | ||
70 | #define R_H8_DIR24 11 | ||
71 | #define R_H8_DIR24_20 12 | ||
72 | #define R_H8_DIR24_16 13 | ||
73 | #define R_H8_DIR24U 14 | ||
74 | #define R_H8_DIR24U_20 15 | ||
75 | #define R_H8_DIR24U_16 16 | ||
76 | #define R_H8_DIR16 17 | ||
77 | #define R_H8_DIR16U 18 | ||
78 | #define R_H8_DIR16S_32 19 | ||
79 | #define R_H8_DIR16S_28 20 | ||
80 | #define R_H8_DIR16S_24 21 | ||
81 | #define R_H8_DIR16S_20 22 | ||
82 | #define R_H8_DIR16S 23 | ||
83 | #define R_H8_DIR8 24 | ||
84 | #define R_H8_DIR8U 25 | ||
85 | #define R_H8_DIR8Z_32 26 | ||
86 | #define R_H8_DIR8Z_28 27 | ||
87 | #define R_H8_DIR8Z_24 28 | ||
88 | #define R_H8_DIR8Z_20 29 | ||
89 | #define R_H8_DIR8Z_16 30 | ||
90 | #define R_H8_PCREL16 31 | ||
91 | #define R_H8_PCREL8 32 | ||
92 | #define R_H8_BPOS 33 | ||
93 | #define R_H8_PCREL32 34 | ||
94 | #define R_H8_GOT32O 35 | ||
95 | #define R_H8_GOT16O 36 | ||
96 | #define R_H8_DIR16A8 59 | ||
97 | #define R_H8_DIR16R8 60 | ||
98 | #define R_H8_DIR24A8 61 | ||
99 | #define R_H8_DIR24R8 62 | ||
100 | #define R_H8_DIR32A16 63 | ||
101 | #define R_H8_ABS32 65 | ||
102 | #define R_H8_ABS32A16 127 | ||
103 | |||
104 | #endif | ||
diff --git a/include/asm-h8300/emergency-restart.h b/include/asm-h8300/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/include/asm-h8300/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-h8300/errno.h b/include/asm-h8300/errno.h deleted file mode 100644 index 0c2f5641fdcc..000000000000 --- a/include/asm-h8300/errno.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_ERRNO_H | ||
2 | #define _H8300_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno.h> | ||
5 | |||
6 | #endif /* _H8300_ERRNO_H */ | ||
diff --git a/include/asm-h8300/fb.h b/include/asm-h8300/fb.h deleted file mode 100644 index c7df38030992..000000000000 --- a/include/asm-h8300/fb.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_FB_H_ | ||
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | |||
5 | #define fb_pgprotect(...) do {} while (0) | ||
6 | |||
7 | static inline int fb_is_primary_device(struct fb_info *info) | ||
8 | { | ||
9 | return 0; | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h deleted file mode 100644 index 1952cb2e3b06..000000000000 --- a/include/asm-h8300/fcntl.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _H8300_FCNTL_H | ||
2 | #define _H8300_FCNTL_H | ||
3 | |||
4 | #define O_DIRECTORY 040000 /* must be a directory */ | ||
5 | #define O_NOFOLLOW 0100000 /* don't follow links */ | ||
6 | #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ | ||
7 | #define O_LARGEFILE 0400000 | ||
8 | |||
9 | #include <asm-generic/fcntl.h> | ||
10 | |||
11 | #endif /* _H8300_FCNTL_H */ | ||
diff --git a/include/asm-h8300/flat.h b/include/asm-h8300/flat.h deleted file mode 100644 index 2a873508a9a1..000000000000 --- a/include/asm-h8300/flat.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/flat.h -- uClinux flat-format executables | ||
3 | */ | ||
4 | |||
5 | #ifndef __H8300_FLAT_H__ | ||
6 | #define __H8300_FLAT_H__ | ||
7 | |||
8 | #define flat_stack_align(sp) /* nothing needed */ | ||
9 | #define flat_argvp_envp_on_stack() 1 | ||
10 | #define flat_old_ram_flag(flags) 1 | ||
11 | #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) | ||
12 | #define flat_set_persistent(relval, p) 0 | ||
13 | |||
14 | /* | ||
15 | * on the H8 a couple of the relocations have an instruction in the | ||
16 | * top byte. As there can only be 24bits of address space, we just | ||
17 | * always preserve that 8bits at the top, when it isn't an instruction | ||
18 | * is is 0 (davidm@snapgear.com) | ||
19 | */ | ||
20 | |||
21 | #define flat_get_relocate_addr(rel) (rel) | ||
22 | #define flat_get_addr_from_rp(rp, relval, flags, persistent) \ | ||
23 | (get_unaligned(rp) & ((flags & FLAT_FLAG_GOTPIC) ? 0xffffffff: 0x00ffffff)) | ||
24 | #define flat_put_addr_at_rp(rp, addr, rel) \ | ||
25 | put_unaligned (((*(char *)(rp)) << 24) | ((addr) & 0x00ffffff), rp) | ||
26 | |||
27 | #endif /* __H8300_FLAT_H__ */ | ||
diff --git a/include/asm-h8300/fpu.h b/include/asm-h8300/fpu.h deleted file mode 100644 index 4fc416e80bef..000000000000 --- a/include/asm-h8300/fpu.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* Nothing do */ | ||
diff --git a/include/asm-h8300/futex.h b/include/asm-h8300/futex.h deleted file mode 100644 index 6a332a9f099c..000000000000 --- a/include/asm-h8300/futex.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #include <asm-generic/futex.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/gpio.h b/include/asm-h8300/gpio.h deleted file mode 100644 index a714f0c0efbc..000000000000 --- a/include/asm-h8300/gpio.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | #ifndef _H8300_GPIO_H | ||
2 | #define _H8300_GPIO_H | ||
3 | |||
4 | #define H8300_GPIO_P1 0 | ||
5 | #define H8300_GPIO_P2 1 | ||
6 | #define H8300_GPIO_P3 2 | ||
7 | #define H8300_GPIO_P4 3 | ||
8 | #define H8300_GPIO_P5 4 | ||
9 | #define H8300_GPIO_P6 5 | ||
10 | #define H8300_GPIO_P7 6 | ||
11 | #define H8300_GPIO_P8 7 | ||
12 | #define H8300_GPIO_P9 8 | ||
13 | #define H8300_GPIO_PA 9 | ||
14 | #define H8300_GPIO_PB 10 | ||
15 | #define H8300_GPIO_PC 11 | ||
16 | #define H8300_GPIO_PD 12 | ||
17 | #define H8300_GPIO_PE 13 | ||
18 | #define H8300_GPIO_PF 14 | ||
19 | #define H8300_GPIO_PG 15 | ||
20 | #define H8300_GPIO_PH 16 | ||
21 | |||
22 | #define H8300_GPIO_B7 0x80 | ||
23 | #define H8300_GPIO_B6 0x40 | ||
24 | #define H8300_GPIO_B5 0x20 | ||
25 | #define H8300_GPIO_B4 0x10 | ||
26 | #define H8300_GPIO_B3 0x08 | ||
27 | #define H8300_GPIO_B2 0x04 | ||
28 | #define H8300_GPIO_B1 0x02 | ||
29 | #define H8300_GPIO_B0 0x01 | ||
30 | |||
31 | #define H8300_GPIO_INPUT 0 | ||
32 | #define H8300_GPIO_OUTPUT 1 | ||
33 | |||
34 | #define H8300_GPIO_RESERVE(port, bits) \ | ||
35 | h8300_reserved_gpio(port, bits) | ||
36 | |||
37 | #define H8300_GPIO_FREE(port, bits) \ | ||
38 | h8300_free_gpio(port, bits) | ||
39 | |||
40 | #define H8300_GPIO_DDR(port, bit, dir) \ | ||
41 | h8300_set_gpio_dir(((port) << 8) | (bit), dir) | ||
42 | |||
43 | #define H8300_GPIO_GETDIR(port, bit) \ | ||
44 | h8300_get_gpio_dir(((port) << 8) | (bit)) | ||
45 | |||
46 | extern int h8300_reserved_gpio(int port, int bits); | ||
47 | extern int h8300_free_gpio(int port, int bits); | ||
48 | extern int h8300_set_gpio_dir(int port_bit, int dir); | ||
49 | extern int h8300_get_gpio_dir(int port_bit); | ||
50 | extern int h8300_init_gpio(void); | ||
51 | |||
52 | #endif | ||
diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h deleted file mode 100644 index 9d7f7a7462b2..000000000000 --- a/include/asm-h8300/hardirq.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #ifndef __H8300_HARDIRQ_H | ||
2 | #define __H8300_HARDIRQ_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/interrupt.h> | ||
7 | #include <linux/irq.h> | ||
8 | |||
9 | typedef struct { | ||
10 | unsigned int __softirq_pending; | ||
11 | } ____cacheline_aligned irq_cpustat_t; | ||
12 | |||
13 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
14 | |||
15 | extern void ack_bad_irq(unsigned int irq); | ||
16 | |||
17 | #define HARDIRQ_BITS 8 | ||
18 | |||
19 | /* | ||
20 | * The hardirq mask has to be large enough to have | ||
21 | * space for potentially all IRQ sources in the system | ||
22 | * nesting on a single CPU: | ||
23 | */ | ||
24 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
25 | # error HARDIRQ_BITS is too low! | ||
26 | #endif | ||
27 | |||
28 | #endif | ||
diff --git a/include/asm-h8300/hw_irq.h b/include/asm-h8300/hw_irq.h deleted file mode 100644 index d75a5a1119e8..000000000000 --- a/include/asm-h8300/hw_irq.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* Do Nothing */ | ||
diff --git a/include/asm-h8300/io.h b/include/asm-h8300/io.h deleted file mode 100644 index 26dc6ccd9441..000000000000 --- a/include/asm-h8300/io.h +++ /dev/null | |||
@@ -1,324 +0,0 @@ | |||
1 | #ifndef _H8300_IO_H | ||
2 | #define _H8300_IO_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <asm/virtconvert.h> | ||
7 | |||
8 | #if defined(CONFIG_H83007) || defined(CONFIG_H83068) | ||
9 | #include <asm/regs306x.h> | ||
10 | #elif defined(CONFIG_H8S2678) | ||
11 | #include <asm/regs267x.h> | ||
12 | #else | ||
13 | #error UNKNOWN CPU TYPE | ||
14 | #endif | ||
15 | |||
16 | |||
17 | /* | ||
18 | * These are for ISA/PCI shared memory _only_ and should never be used | ||
19 | * on any other type of memory, including Zorro memory. They are meant to | ||
20 | * access the bus in the bus byte order which is little-endian!. | ||
21 | * | ||
22 | * readX/writeX() are used to access memory mapped devices. On some | ||
23 | * architectures the memory mapped IO stuff needs to be accessed | ||
24 | * differently. On the m68k architecture, we just read/write the | ||
25 | * memory location directly. | ||
26 | */ | ||
27 | /* ++roman: The assignments to temp. vars avoid that gcc sometimes generates | ||
28 | * two accesses to memory, which may be undesireable for some devices. | ||
29 | */ | ||
30 | |||
31 | /* | ||
32 | * swap functions are sometimes needed to interface little-endian hardware | ||
33 | */ | ||
34 | |||
35 | static inline unsigned short _swapw(volatile unsigned short v) | ||
36 | { | ||
37 | #ifndef H8300_IO_NOSWAP | ||
38 | unsigned short r; | ||
39 | __asm__("xor.b %w0,%x0\n\t" | ||
40 | "xor.b %x0,%w0\n\t" | ||
41 | "xor.b %w0,%x0" | ||
42 | :"=r"(r) | ||
43 | :"0"(v)); | ||
44 | return r; | ||
45 | #else | ||
46 | return v; | ||
47 | #endif | ||
48 | } | ||
49 | |||
50 | static inline unsigned long _swapl(volatile unsigned long v) | ||
51 | { | ||
52 | #ifndef H8300_IO_NOSWAP | ||
53 | unsigned long r; | ||
54 | __asm__("xor.b %w0,%x0\n\t" | ||
55 | "xor.b %x0,%w0\n\t" | ||
56 | "xor.b %w0,%x0\n\t" | ||
57 | "xor.w %e0,%f0\n\t" | ||
58 | "xor.w %f0,%e0\n\t" | ||
59 | "xor.w %e0,%f0\n\t" | ||
60 | "xor.b %w0,%x0\n\t" | ||
61 | "xor.b %x0,%w0\n\t" | ||
62 | "xor.b %w0,%x0" | ||
63 | :"=r"(r) | ||
64 | :"0"(v)); | ||
65 | return r; | ||
66 | #else | ||
67 | return v; | ||
68 | #endif | ||
69 | } | ||
70 | |||
71 | #define readb(addr) \ | ||
72 | ({ unsigned char __v = \ | ||
73 | *(volatile unsigned char *)((unsigned long)(addr) & 0x00ffffff); \ | ||
74 | __v; }) | ||
75 | #define readw(addr) \ | ||
76 | ({ unsigned short __v = \ | ||
77 | *(volatile unsigned short *)((unsigned long)(addr) & 0x00ffffff); \ | ||
78 | __v; }) | ||
79 | #define readl(addr) \ | ||
80 | ({ unsigned long __v = \ | ||
81 | *(volatile unsigned long *)((unsigned long)(addr) & 0x00ffffff); \ | ||
82 | __v; }) | ||
83 | |||
84 | #define writeb(b,addr) (void)((*(volatile unsigned char *) \ | ||
85 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
86 | #define writew(b,addr) (void)((*(volatile unsigned short *) \ | ||
87 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
88 | #define writel(b,addr) (void)((*(volatile unsigned long *) \ | ||
89 | ((unsigned long)(addr) & 0x00ffffff)) = (b)) | ||
90 | #define readb_relaxed(addr) readb(addr) | ||
91 | #define readw_relaxed(addr) readw(addr) | ||
92 | #define readl_relaxed(addr) readl(addr) | ||
93 | |||
94 | #define __raw_readb readb | ||
95 | #define __raw_readw readw | ||
96 | #define __raw_readl readl | ||
97 | #define __raw_writeb writeb | ||
98 | #define __raw_writew writew | ||
99 | #define __raw_writel writel | ||
100 | |||
101 | static inline int h8300_buswidth(unsigned int addr) | ||
102 | { | ||
103 | return (*(volatile unsigned char *)ABWCR & (1 << ((addr >> 21) & 7))) == 0; | ||
104 | } | ||
105 | |||
106 | static inline void io_outsb(unsigned int addr, const void *buf, int len) | ||
107 | { | ||
108 | volatile unsigned char *ap_b = (volatile unsigned char *) addr; | ||
109 | volatile unsigned short *ap_w = (volatile unsigned short *) addr; | ||
110 | unsigned char *bp = (unsigned char *) buf; | ||
111 | |||
112 | if(h8300_buswidth(addr) && (addr & 1)) { | ||
113 | while (len--) | ||
114 | *ap_w = *bp++; | ||
115 | } else { | ||
116 | while (len--) | ||
117 | *ap_b = *bp++; | ||
118 | } | ||
119 | } | ||
120 | |||
121 | static inline void io_outsw(unsigned int addr, const void *buf, int len) | ||
122 | { | ||
123 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
124 | unsigned short *bp = (unsigned short *) buf; | ||
125 | while (len--) | ||
126 | *ap = _swapw(*bp++); | ||
127 | } | ||
128 | |||
129 | static inline void io_outsl(unsigned int addr, const void *buf, int len) | ||
130 | { | ||
131 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
132 | unsigned long *bp = (unsigned long *) buf; | ||
133 | while (len--) | ||
134 | *ap = _swapl(*bp++); | ||
135 | } | ||
136 | |||
137 | static inline void io_outsw_noswap(unsigned int addr, const void *buf, int len) | ||
138 | { | ||
139 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
140 | unsigned short *bp = (unsigned short *) buf; | ||
141 | while (len--) | ||
142 | *ap = *bp++; | ||
143 | } | ||
144 | |||
145 | static inline void io_outsl_noswap(unsigned int addr, const void *buf, int len) | ||
146 | { | ||
147 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
148 | unsigned long *bp = (unsigned long *) buf; | ||
149 | while (len--) | ||
150 | *ap = *bp++; | ||
151 | } | ||
152 | |||
153 | static inline void io_insb(unsigned int addr, void *buf, int len) | ||
154 | { | ||
155 | volatile unsigned char *ap_b; | ||
156 | volatile unsigned short *ap_w; | ||
157 | unsigned char *bp = (unsigned char *) buf; | ||
158 | |||
159 | if(h8300_buswidth(addr)) { | ||
160 | ap_w = (volatile unsigned short *)(addr & ~1); | ||
161 | while (len--) | ||
162 | *bp++ = *ap_w & 0xff; | ||
163 | } else { | ||
164 | ap_b = (volatile unsigned char *)addr; | ||
165 | while (len--) | ||
166 | *bp++ = *ap_b; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | static inline void io_insw(unsigned int addr, void *buf, int len) | ||
171 | { | ||
172 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
173 | unsigned short *bp = (unsigned short *) buf; | ||
174 | while (len--) | ||
175 | *bp++ = _swapw(*ap); | ||
176 | } | ||
177 | |||
178 | static inline void io_insl(unsigned int addr, void *buf, int len) | ||
179 | { | ||
180 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
181 | unsigned long *bp = (unsigned long *) buf; | ||
182 | while (len--) | ||
183 | *bp++ = _swapl(*ap); | ||
184 | } | ||
185 | |||
186 | static inline void io_insw_noswap(unsigned int addr, void *buf, int len) | ||
187 | { | ||
188 | volatile unsigned short *ap = (volatile unsigned short *) addr; | ||
189 | unsigned short *bp = (unsigned short *) buf; | ||
190 | while (len--) | ||
191 | *bp++ = *ap; | ||
192 | } | ||
193 | |||
194 | static inline void io_insl_noswap(unsigned int addr, void *buf, int len) | ||
195 | { | ||
196 | volatile unsigned long *ap = (volatile unsigned long *) addr; | ||
197 | unsigned long *bp = (unsigned long *) buf; | ||
198 | while (len--) | ||
199 | *bp++ = *ap; | ||
200 | } | ||
201 | |||
202 | /* | ||
203 | * make the short names macros so specific devices | ||
204 | * can override them as required | ||
205 | */ | ||
206 | |||
207 | #define memset_io(a,b,c) memset((void *)(a),(b),(c)) | ||
208 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) | ||
209 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) | ||
210 | |||
211 | #define mmiowb() | ||
212 | |||
213 | #define inb(addr) ((h8300_buswidth(addr))?readw((addr) & ~1) & 0xff:readb(addr)) | ||
214 | #define inw(addr) _swapw(readw(addr)) | ||
215 | #define inl(addr) _swapl(readl(addr)) | ||
216 | #define outb(x,addr) ((void)((h8300_buswidth(addr) && \ | ||
217 | ((addr) & 1))?writew(x,(addr) & ~1):writeb(x,addr))) | ||
218 | #define outw(x,addr) ((void) writew(_swapw(x),addr)) | ||
219 | #define outl(x,addr) ((void) writel(_swapl(x),addr)) | ||
220 | |||
221 | #define inb_p(addr) inb(addr) | ||
222 | #define inw_p(addr) inw(addr) | ||
223 | #define inl_p(addr) inl(addr) | ||
224 | #define outb_p(x,addr) outb(x,addr) | ||
225 | #define outw_p(x,addr) outw(x,addr) | ||
226 | #define outl_p(x,addr) outl(x,addr) | ||
227 | |||
228 | #define outsb(a,b,l) io_outsb(a,b,l) | ||
229 | #define outsw(a,b,l) io_outsw(a,b,l) | ||
230 | #define outsl(a,b,l) io_outsl(a,b,l) | ||
231 | |||
232 | #define insb(a,b,l) io_insb(a,b,l) | ||
233 | #define insw(a,b,l) io_insw(a,b,l) | ||
234 | #define insl(a,b,l) io_insl(a,b,l) | ||
235 | |||
236 | #define IO_SPACE_LIMIT 0xffffff | ||
237 | |||
238 | |||
239 | /* Values for nocacheflag and cmode */ | ||
240 | #define IOMAP_FULL_CACHING 0 | ||
241 | #define IOMAP_NOCACHE_SER 1 | ||
242 | #define IOMAP_NOCACHE_NONSER 2 | ||
243 | #define IOMAP_WRITETHROUGH 3 | ||
244 | |||
245 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | ||
246 | extern void __iounmap(void *addr, unsigned long size); | ||
247 | |||
248 | static inline void *ioremap(unsigned long physaddr, unsigned long size) | ||
249 | { | ||
250 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | ||
251 | } | ||
252 | static inline void *ioremap_nocache(unsigned long physaddr, unsigned long size) | ||
253 | { | ||
254 | return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); | ||
255 | } | ||
256 | static inline void *ioremap_writethrough(unsigned long physaddr, unsigned long size) | ||
257 | { | ||
258 | return __ioremap(physaddr, size, IOMAP_WRITETHROUGH); | ||
259 | } | ||
260 | static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size) | ||
261 | { | ||
262 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); | ||
263 | } | ||
264 | |||
265 | extern void iounmap(void *addr); | ||
266 | |||
267 | /* H8/300 internal I/O functions */ | ||
268 | static __inline__ unsigned char ctrl_inb(unsigned long addr) | ||
269 | { | ||
270 | return *(volatile unsigned char*)addr; | ||
271 | } | ||
272 | |||
273 | static __inline__ unsigned short ctrl_inw(unsigned long addr) | ||
274 | { | ||
275 | return *(volatile unsigned short*)addr; | ||
276 | } | ||
277 | |||
278 | static __inline__ unsigned long ctrl_inl(unsigned long addr) | ||
279 | { | ||
280 | return *(volatile unsigned long*)addr; | ||
281 | } | ||
282 | |||
283 | static __inline__ void ctrl_outb(unsigned char b, unsigned long addr) | ||
284 | { | ||
285 | *(volatile unsigned char*)addr = b; | ||
286 | } | ||
287 | |||
288 | static __inline__ void ctrl_outw(unsigned short b, unsigned long addr) | ||
289 | { | ||
290 | *(volatile unsigned short*)addr = b; | ||
291 | } | ||
292 | |||
293 | static __inline__ void ctrl_outl(unsigned long b, unsigned long addr) | ||
294 | { | ||
295 | *(volatile unsigned long*)addr = b; | ||
296 | } | ||
297 | |||
298 | /* Pages to physical address... */ | ||
299 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | ||
300 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | ||
301 | |||
302 | /* | ||
303 | * Macros used for converting between virtual and physical mappings. | ||
304 | */ | ||
305 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | ||
306 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | ||
307 | |||
308 | #define virt_to_bus virt_to_phys | ||
309 | #define bus_to_virt phys_to_virt | ||
310 | |||
311 | /* | ||
312 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | ||
313 | * access | ||
314 | */ | ||
315 | #define xlate_dev_mem_ptr(p) __va(p) | ||
316 | |||
317 | /* | ||
318 | * Convert a virtual cached pointer to an uncached pointer | ||
319 | */ | ||
320 | #define xlate_dev_kmem_ptr(p) p | ||
321 | |||
322 | #endif /* __KERNEL__ */ | ||
323 | |||
324 | #endif /* _H8300_IO_H */ | ||
diff --git a/include/asm-h8300/ioctl.h b/include/asm-h8300/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/include/asm-h8300/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/include/asm-h8300/ioctls.h b/include/asm-h8300/ioctls.h deleted file mode 100644 index 98a53d067269..000000000000 --- a/include/asm-h8300/ioctls.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_IOCTLS_H__ | ||
2 | #define __ARCH_H8300_IOCTLS_H__ | ||
3 | |||
4 | #include <asm/ioctl.h> | ||
5 | |||
6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
7 | |||
8 | #define TCGETS 0x5401 | ||
9 | #define TCSETS 0x5402 | ||
10 | #define TCSETSW 0x5403 | ||
11 | #define TCSETSF 0x5404 | ||
12 | #define TCGETA 0x5405 | ||
13 | #define TCSETA 0x5406 | ||
14 | #define TCSETAW 0x5407 | ||
15 | #define TCSETAF 0x5408 | ||
16 | #define TCSBRK 0x5409 | ||
17 | #define TCXONC 0x540A | ||
18 | #define TCFLSH 0x540B | ||
19 | #define TIOCEXCL 0x540C | ||
20 | #define TIOCNXCL 0x540D | ||
21 | #define TIOCSCTTY 0x540E | ||
22 | #define TIOCGPGRP 0x540F | ||
23 | #define TIOCSPGRP 0x5410 | ||
24 | #define TIOCOUTQ 0x5411 | ||
25 | #define TIOCSTI 0x5412 | ||
26 | #define TIOCGWINSZ 0x5413 | ||
27 | #define TIOCSWINSZ 0x5414 | ||
28 | #define TIOCMGET 0x5415 | ||
29 | #define TIOCMBIS 0x5416 | ||
30 | #define TIOCMBIC 0x5417 | ||
31 | #define TIOCMSET 0x5418 | ||
32 | #define TIOCGSOFTCAR 0x5419 | ||
33 | #define TIOCSSOFTCAR 0x541A | ||
34 | #define FIONREAD 0x541B | ||
35 | #define TIOCINQ FIONREAD | ||
36 | #define TIOCLINUX 0x541C | ||
37 | #define TIOCCONS 0x541D | ||
38 | #define TIOCGSERIAL 0x541E | ||
39 | #define TIOCSSERIAL 0x541F | ||
40 | #define TIOCPKT 0x5420 | ||
41 | #define FIONBIO 0x5421 | ||
42 | #define TIOCNOTTY 0x5422 | ||
43 | #define TIOCSETD 0x5423 | ||
44 | #define TIOCGETD 0x5424 | ||
45 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
46 | #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | ||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
56 | |||
57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
58 | #define FIOCLEX 0x5451 | ||
59 | #define FIOASYNC 0x5452 | ||
60 | #define TIOCSERCONFIG 0x5453 | ||
61 | #define TIOCSERGWILD 0x5454 | ||
62 | #define TIOCSERSWILD 0x5455 | ||
63 | #define TIOCGLCKTRMIOS 0x5456 | ||
64 | #define TIOCSLCKTRMIOS 0x5457 | ||
65 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
66 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
67 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
68 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
69 | |||
70 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
71 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
72 | #define FIOQSIZE 0x545E | ||
73 | |||
74 | /* Used for packet mode */ | ||
75 | #define TIOCPKT_DATA 0 | ||
76 | #define TIOCPKT_FLUSHREAD 1 | ||
77 | #define TIOCPKT_FLUSHWRITE 2 | ||
78 | #define TIOCPKT_STOP 4 | ||
79 | #define TIOCPKT_START 8 | ||
80 | #define TIOCPKT_NOSTOP 16 | ||
81 | #define TIOCPKT_DOSTOP 32 | ||
82 | |||
83 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
84 | |||
85 | #endif /* __ARCH_H8300_IOCTLS_H__ */ | ||
diff --git a/include/asm-h8300/ipcbuf.h b/include/asm-h8300/ipcbuf.h deleted file mode 100644 index 2cd1ebcc109d..000000000000 --- a/include/asm-h8300/ipcbuf.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef __H8300_IPCBUF_H__ | ||
2 | #define __H8300_IPCBUF_H__ | ||
3 | |||
4 | /* | ||
5 | * The user_ipc_perm structure for H8/300 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __H8300_IPCBUF_H__ */ | ||
diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h deleted file mode 100644 index 13d7c601cd0a..000000000000 --- a/include/asm-h8300/irq.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _H8300_IRQ_H_ | ||
2 | #define _H8300_IRQ_H_ | ||
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | #if defined(CONFIG_CPU_H8300H) | ||
7 | #define NR_IRQS 64 | ||
8 | #define EXT_IRQ0 12 | ||
9 | #define EXT_IRQ1 13 | ||
10 | #define EXT_IRQ2 14 | ||
11 | #define EXT_IRQ3 15 | ||
12 | #define EXT_IRQ4 16 | ||
13 | #define EXT_IRQ5 17 | ||
14 | #define EXT_IRQ6 18 | ||
15 | #define EXT_IRQ7 19 | ||
16 | #define EXT_IRQS 5 | ||
17 | #define IER_REGS *(volatile unsigned char *)IER | ||
18 | #endif | ||
19 | #if defined(CONFIG_CPU_H8S) | ||
20 | #define NR_IRQS 128 | ||
21 | #define EXT_IRQ0 16 | ||
22 | #define EXT_IRQ1 17 | ||
23 | #define EXT_IRQ2 18 | ||
24 | #define EXT_IRQ3 19 | ||
25 | #define EXT_IRQ4 20 | ||
26 | #define EXT_IRQ5 21 | ||
27 | #define EXT_IRQ6 22 | ||
28 | #define EXT_IRQ7 23 | ||
29 | #define EXT_IRQ8 24 | ||
30 | #define EXT_IRQ9 25 | ||
31 | #define EXT_IRQ10 26 | ||
32 | #define EXT_IRQ11 27 | ||
33 | #define EXT_IRQ12 28 | ||
34 | #define EXT_IRQ13 29 | ||
35 | #define EXT_IRQ14 30 | ||
36 | #define EXT_IRQ15 31 | ||
37 | #define EXT_IRQS 15 | ||
38 | |||
39 | #define IER_REGS *(volatile unsigned short *)IER | ||
40 | #endif | ||
41 | |||
42 | static __inline__ int irq_canonicalize(int irq) | ||
43 | { | ||
44 | return irq; | ||
45 | } | ||
46 | |||
47 | typedef void (*h8300_vector)(void); | ||
48 | |||
49 | #endif /* _H8300_IRQ_H_ */ | ||
diff --git a/include/asm-h8300/irq_regs.h b/include/asm-h8300/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/include/asm-h8300/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/include/asm-h8300/kdebug.h b/include/asm-h8300/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/include/asm-h8300/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/include/asm-h8300/kmap_types.h b/include/asm-h8300/kmap_types.h deleted file mode 100644 index 1ec8a3427120..000000000000 --- a/include/asm-h8300/kmap_types.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_KMAP_TYPES_H | ||
2 | #define _ASM_H8300_KMAP_TYPES_H | ||
3 | |||
4 | enum km_type { | ||
5 | KM_BOUNCE_READ, | ||
6 | KM_SKB_SUNRPC_DATA, | ||
7 | KM_SKB_DATA_SOFTIRQ, | ||
8 | KM_USER0, | ||
9 | KM_USER1, | ||
10 | KM_BIO_SRC_IRQ, | ||
11 | KM_BIO_DST_IRQ, | ||
12 | KM_PTE0, | ||
13 | KM_PTE1, | ||
14 | KM_IRQ0, | ||
15 | KM_IRQ1, | ||
16 | KM_SOFTIRQ0, | ||
17 | KM_SOFTIRQ1, | ||
18 | KM_TYPE_NR | ||
19 | }; | ||
20 | |||
21 | #endif | ||
diff --git a/include/asm-h8300/linkage.h b/include/asm-h8300/linkage.h deleted file mode 100644 index 6f4df7d46180..000000000000 --- a/include/asm-h8300/linkage.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _H8300_LINKAGE_H | ||
2 | #define _H8300_LINKAGE_H | ||
3 | |||
4 | #undef SYMBOL_NAME_LABEL | ||
5 | #undef SYMBOL_NAME | ||
6 | #define SYMBOL_NAME_LABEL(_name_) _##_name_##: | ||
7 | #define SYMBOL_NAME(_name_) _##_name_ | ||
8 | #endif | ||
diff --git a/include/asm-h8300/local.h b/include/asm-h8300/local.h deleted file mode 100644 index fdd4efe437cd..000000000000 --- a/include/asm-h8300/local.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_LOCAL_H_ | ||
2 | #define _H8300_LOCAL_H_ | ||
3 | |||
4 | #include <asm-generic/local.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/mc146818rtc.h b/include/asm-h8300/mc146818rtc.h deleted file mode 100644 index ab9d9646d241..000000000000 --- a/include/asm-h8300/mc146818rtc.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifndef _H8300_MC146818RTC_H | ||
5 | #define _H8300_MC146818RTC_H | ||
6 | |||
7 | /* empty include file to satisfy the include in genrtc.c/ide-geometry.c */ | ||
8 | |||
9 | #endif /* _H8300_MC146818RTC_H */ | ||
diff --git a/include/asm-h8300/md.h b/include/asm-h8300/md.h deleted file mode 100644 index 1a47dc6691fb..000000000000 --- a/include/asm-h8300/md.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* $Id: md.h,v 1.1 2002/11/19 02:09:26 gerg Exp $ | ||
2 | * md.h: High speed xor_block operation for RAID4/5 | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifndef __ASM_MD_H | ||
7 | #define __ASM_MD_H | ||
8 | |||
9 | /* #define HAVE_ARCH_XORBLOCK */ | ||
10 | |||
11 | #define MD_XORBLOCK_ALIGNMENT sizeof(long) | ||
12 | |||
13 | #endif /* __ASM_MD_H */ | ||
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h deleted file mode 100644 index b9f104f22a36..000000000000 --- a/include/asm-h8300/mman.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef __H8300_MMAN_H__ | ||
2 | #define __H8300_MMAN_H__ | ||
3 | |||
4 | #include <asm-generic/mman.h> | ||
5 | |||
6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
9 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
13 | |||
14 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
15 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
16 | |||
17 | #endif /* __H8300_MMAN_H__ */ | ||
diff --git a/include/asm-h8300/mmu.h b/include/asm-h8300/mmu.h deleted file mode 100644 index 2ce06ea46104..000000000000 --- a/include/asm-h8300/mmu.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __MMU_H | ||
2 | #define __MMU_H | ||
3 | |||
4 | /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */ | ||
5 | |||
6 | typedef struct { | ||
7 | struct vm_list_struct *vmlist; | ||
8 | unsigned long end_brk; | ||
9 | } mm_context_t; | ||
10 | |||
11 | #endif | ||
diff --git a/include/asm-h8300/mmu_context.h b/include/asm-h8300/mmu_context.h deleted file mode 100644 index f44b730da54d..000000000000 --- a/include/asm-h8300/mmu_context.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef __H8300_MMU_CONTEXT_H | ||
2 | #define __H8300_MMU_CONTEXT_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | #include <asm/page.h> | ||
6 | #include <asm/pgalloc.h> | ||
7 | #include <asm-generic/mm_hooks.h> | ||
8 | |||
9 | static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | static inline int | ||
14 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | ||
15 | { | ||
16 | // mm->context = virt_to_phys(mm->pgd); | ||
17 | return(0); | ||
18 | } | ||
19 | |||
20 | #define destroy_context(mm) do { } while(0) | ||
21 | #define deactivate_mm(tsk,mm) do { } while(0) | ||
22 | |||
23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | static inline void activate_mm(struct mm_struct *prev_mm, | ||
28 | struct mm_struct *next_mm) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | #endif | ||
diff --git a/include/asm-h8300/module.h b/include/asm-h8300/module.h deleted file mode 100644 index de23231f3196..000000000000 --- a/include/asm-h8300/module.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_MODULE_H | ||
2 | #define _ASM_H8300_MODULE_H | ||
3 | /* | ||
4 | * This file contains the H8/300 architecture specific module code. | ||
5 | */ | ||
6 | struct mod_arch_specific { }; | ||
7 | #define Elf_Shdr Elf32_Shdr | ||
8 | #define Elf_Sym Elf32_Sym | ||
9 | #define Elf_Ehdr Elf32_Ehdr | ||
10 | |||
11 | #define MODULE_SYMBOL_PREFIX "_" | ||
12 | |||
13 | #endif /* _ASM_H8/300_MODULE_H */ | ||
diff --git a/include/asm-h8300/msgbuf.h b/include/asm-h8300/msgbuf.h deleted file mode 100644 index 6b148cd09aa5..000000000000 --- a/include/asm-h8300/msgbuf.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _H8300_MSGBUF_H | ||
2 | #define _H8300_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for H8/300 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct msqid64_ds { | ||
15 | struct ipc64_perm msg_perm; | ||
16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
19 | unsigned long __unused2; | ||
20 | __kernel_time_t msg_ctime; /* last change time */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
27 | unsigned long __unused4; | ||
28 | unsigned long __unused5; | ||
29 | }; | ||
30 | |||
31 | #endif /* _H8300_MSGBUF_H */ | ||
diff --git a/include/asm-h8300/mutex.h b/include/asm-h8300/mutex.h deleted file mode 100644 index 458c1f7fbc18..000000000000 --- a/include/asm-h8300/mutex.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * Pull in the generic implementation for the mutex fastpath. | ||
3 | * | ||
4 | * TODO: implement optimized primitives instead, or leave the generic | ||
5 | * implementation in place, or pick the atomic_xchg() based generic | ||
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | ||
7 | */ | ||
8 | |||
9 | #include <asm-generic/mutex-dec.h> | ||
diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h deleted file mode 100644 index 0b6acf0b03aa..000000000000 --- a/include/asm-h8300/page.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #ifndef _H8300_PAGE_H | ||
2 | #define _H8300_PAGE_H | ||
3 | |||
4 | /* PAGE_SHIFT determines the page size */ | ||
5 | |||
6 | #define PAGE_SHIFT (12) | ||
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
8 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | |||
14 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
15 | #define free_user_page(page, addr) free_page(addr) | ||
16 | |||
17 | #define clear_page(page) memset((page), 0, PAGE_SIZE) | ||
18 | #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) | ||
19 | |||
20 | #define clear_user_page(page, vaddr, pg) clear_page(page) | ||
21 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
22 | |||
23 | #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \ | ||
24 | alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) | ||
25 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | ||
26 | |||
27 | /* | ||
28 | * These are used to make use of C type-checking.. | ||
29 | */ | ||
30 | typedef struct { unsigned long pte; } pte_t; | ||
31 | typedef struct { unsigned long pmd[16]; } pmd_t; | ||
32 | typedef struct { unsigned long pgd; } pgd_t; | ||
33 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
34 | typedef struct page *pgtable_t; | ||
35 | |||
36 | #define pte_val(x) ((x).pte) | ||
37 | #define pmd_val(x) ((&x)->pmd[0]) | ||
38 | #define pgd_val(x) ((x).pgd) | ||
39 | #define pgprot_val(x) ((x).pgprot) | ||
40 | |||
41 | #define __pte(x) ((pte_t) { (x) } ) | ||
42 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
43 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
44 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
45 | |||
46 | extern unsigned long memory_start; | ||
47 | extern unsigned long memory_end; | ||
48 | |||
49 | #endif /* !__ASSEMBLY__ */ | ||
50 | |||
51 | #include <asm/page_offset.h> | ||
52 | |||
53 | #define PAGE_OFFSET (PAGE_OFFSET_RAW) | ||
54 | |||
55 | #ifndef __ASSEMBLY__ | ||
56 | |||
57 | #define __pa(vaddr) virt_to_phys(vaddr) | ||
58 | #define __va(paddr) phys_to_virt((unsigned long)paddr) | ||
59 | |||
60 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | ||
61 | #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) | ||
62 | |||
63 | #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) | ||
64 | #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) | ||
65 | #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) | ||
66 | #define pfn_valid(page) (page < max_mapnr) | ||
67 | |||
68 | #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) | ||
69 | |||
70 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | ||
71 | ((void *)(kaddr) < (void *)memory_end)) | ||
72 | |||
73 | #endif /* __ASSEMBLY__ */ | ||
74 | |||
75 | #include <asm-generic/memory_model.h> | ||
76 | #include <asm-generic/page.h> | ||
77 | |||
78 | #endif /* _H8300_PAGE_H */ | ||
diff --git a/include/asm-h8300/page_offset.h b/include/asm-h8300/page_offset.h deleted file mode 100644 index f8706463008c..000000000000 --- a/include/asm-h8300/page_offset.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | |||
2 | #define PAGE_OFFSET_RAW 0x00000000 | ||
3 | |||
diff --git a/include/asm-h8300/param.h b/include/asm-h8300/param.h deleted file mode 100644 index 1c72fb8080ff..000000000000 --- a/include/asm-h8300/param.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _H8300_PARAM_H | ||
2 | #define _H8300_PARAM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #define HZ CONFIG_HZ | ||
6 | #define USER_HZ HZ | ||
7 | #define CLOCKS_PER_SEC (USER_HZ) | ||
8 | #else | ||
9 | #define HZ 100 | ||
10 | #endif | ||
11 | |||
12 | #define EXEC_PAGESIZE 4096 | ||
13 | |||
14 | #ifndef NOGROUP | ||
15 | #define NOGROUP (-1) | ||
16 | #endif | ||
17 | |||
18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
19 | |||
20 | #endif /* _H8300_PARAM_H */ | ||
diff --git a/include/asm-h8300/pci.h b/include/asm-h8300/pci.h deleted file mode 100644 index 97389b35aa35..000000000000 --- a/include/asm-h8300/pci.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_PCI_H | ||
2 | #define _ASM_H8300_PCI_H | ||
3 | |||
4 | /* | ||
5 | * asm-h8300/pci.h - H8/300 specific PCI declarations. | ||
6 | * | ||
7 | * Yoshinori Sato <ysato@users.sourceforge.jp> | ||
8 | */ | ||
9 | |||
10 | #define pcibios_assign_all_busses() 0 | ||
11 | #define pcibios_scan_all_fns(a, b) 0 | ||
12 | |||
13 | static inline void pcibios_set_master(struct pci_dev *dev) | ||
14 | { | ||
15 | /* No special bus mastering setup handling */ | ||
16 | } | ||
17 | |||
18 | static inline void pcibios_penalize_isa_irq(int irq, int active) | ||
19 | { | ||
20 | /* We don't do dynamic PCI IRQ allocation */ | ||
21 | } | ||
22 | |||
23 | #define PCI_DMA_BUS_IS_PHYS (1) | ||
24 | |||
25 | #endif /* _ASM_H8300_PCI_H */ | ||
diff --git a/include/asm-h8300/percpu.h b/include/asm-h8300/percpu.h deleted file mode 100644 index 72c03e3666d8..000000000000 --- a/include/asm-h8300/percpu.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_PERCPU__ | ||
2 | #define __ARCH_H8300_PERCPU__ | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif /* __ARCH_H8300_PERCPU__ */ | ||
diff --git a/include/asm-h8300/pgalloc.h b/include/asm-h8300/pgalloc.h deleted file mode 100644 index c2e89a286d23..000000000000 --- a/include/asm-h8300/pgalloc.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _H8300_PGALLOC_H | ||
2 | #define _H8300_PGALLOC_H | ||
3 | |||
4 | #include <asm/setup.h> | ||
5 | |||
6 | #define check_pgt_cache() do { } while (0) | ||
7 | |||
8 | #endif /* _H8300_PGALLOC_H */ | ||
diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h deleted file mode 100644 index a09230a08e02..000000000000 --- a/include/asm-h8300/pgtable.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | #ifndef _H8300_PGTABLE_H | ||
2 | #define _H8300_PGTABLE_H | ||
3 | |||
4 | #include <asm-generic/4level-fixup.h> | ||
5 | |||
6 | #include <linux/slab.h> | ||
7 | #include <asm/processor.h> | ||
8 | #include <asm/page.h> | ||
9 | #include <asm/io.h> | ||
10 | |||
11 | #define pgd_present(pgd) (1) /* pages are always present on NO_MM */ | ||
12 | #define pgd_none(pgd) (0) | ||
13 | #define pgd_bad(pgd) (0) | ||
14 | #define pgd_clear(pgdp) | ||
15 | #define kern_addr_valid(addr) (1) | ||
16 | #define pmd_offset(a, b) ((void *)0) | ||
17 | #define pmd_none(pmd) (1) | ||
18 | #define pgd_offset_k(adrdress) ((pgd_t *)0) | ||
19 | #define pte_offset_kernel(dir, address) ((pte_t *)0) | ||
20 | |||
21 | #define PAGE_NONE __pgprot(0) /* these mean nothing to NO_MM */ | ||
22 | #define PAGE_SHARED __pgprot(0) /* these mean nothing to NO_MM */ | ||
23 | #define PAGE_COPY __pgprot(0) /* these mean nothing to NO_MM */ | ||
24 | #define PAGE_READONLY __pgprot(0) /* these mean nothing to NO_MM */ | ||
25 | #define PAGE_KERNEL __pgprot(0) /* these mean nothing to NO_MM */ | ||
26 | |||
27 | extern void paging_init(void); | ||
28 | #define swapper_pg_dir ((pgd_t *) 0) | ||
29 | |||
30 | #define __swp_type(x) (0) | ||
31 | #define __swp_offset(x) (0) | ||
32 | #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) | ||
33 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | ||
34 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | ||
35 | |||
36 | static inline int pte_file(pte_t pte) { return 0; } | ||
37 | |||
38 | /* | ||
39 | * ZERO_PAGE is a global shared page that is always zero: used | ||
40 | * for zero-mapped memory areas etc.. | ||
41 | */ | ||
42 | #define ZERO_PAGE(vaddr) (virt_to_page(0)) | ||
43 | |||
44 | /* | ||
45 | * These would be in other places but having them here reduces the diffs. | ||
46 | */ | ||
47 | extern unsigned int kobjsize(const void *objp); | ||
48 | extern int is_in_rom(unsigned long); | ||
49 | |||
50 | /* | ||
51 | * No page table caches to initialise | ||
52 | */ | ||
53 | #define pgtable_cache_init() do { } while (0) | ||
54 | |||
55 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
56 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
57 | |||
58 | /* | ||
59 | * All 32bit addresses are effectively valid for vmalloc... | ||
60 | * Sort of meaningless for non-VM targets. | ||
61 | */ | ||
62 | #define VMALLOC_START 0 | ||
63 | #define VMALLOC_END 0xffffffff | ||
64 | |||
65 | /* | ||
66 | * All 32bit addresses are effectively valid for vmalloc... | ||
67 | * Sort of meaningless for non-VM targets. | ||
68 | */ | ||
69 | #define VMALLOC_START 0 | ||
70 | #define VMALLOC_END 0xffffffff | ||
71 | |||
72 | #define arch_enter_lazy_cpu_mode() do {} while (0) | ||
73 | #endif /* _H8300_PGTABLE_H */ | ||
diff --git a/include/asm-h8300/poll.h b/include/asm-h8300/poll.h deleted file mode 100644 index f61540c22d94..000000000000 --- a/include/asm-h8300/poll.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __H8300_POLL_H | ||
2 | #define __H8300_POLL_H | ||
3 | |||
4 | #define POLLWRNORM POLLOUT | ||
5 | #define POLLWRBAND 256 | ||
6 | |||
7 | #include <asm-generic/poll.h> | ||
8 | |||
9 | #undef POLLREMOVE | ||
10 | |||
11 | #endif | ||
diff --git a/include/asm-h8300/posix_types.h b/include/asm-h8300/posix_types.h deleted file mode 100644 index 5c553927fc53..000000000000 --- a/include/asm-h8300/posix_types.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_POSIX_TYPES_H | ||
2 | #define __ARCH_H8300_POSIX_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This file is generally used by user-level software, so you need to | ||
6 | * be a little careful about namespace pollution etc. Also, we cannot | ||
7 | * assume GCC is being used. | ||
8 | */ | ||
9 | |||
10 | typedef unsigned long __kernel_ino_t; | ||
11 | typedef unsigned short __kernel_mode_t; | ||
12 | typedef unsigned short __kernel_nlink_t; | ||
13 | typedef long __kernel_off_t; | ||
14 | typedef int __kernel_pid_t; | ||
15 | typedef unsigned short __kernel_ipc_pid_t; | ||
16 | typedef unsigned short __kernel_uid_t; | ||
17 | typedef unsigned short __kernel_gid_t; | ||
18 | typedef unsigned int __kernel_size_t; | ||
19 | typedef int __kernel_ssize_t; | ||
20 | typedef int __kernel_ptrdiff_t; | ||
21 | typedef long __kernel_time_t; | ||
22 | typedef long __kernel_suseconds_t; | ||
23 | typedef long __kernel_clock_t; | ||
24 | typedef int __kernel_timer_t; | ||
25 | typedef int __kernel_clockid_t; | ||
26 | typedef int __kernel_daddr_t; | ||
27 | typedef char * __kernel_caddr_t; | ||
28 | typedef unsigned short __kernel_uid16_t; | ||
29 | typedef unsigned short __kernel_gid16_t; | ||
30 | typedef unsigned int __kernel_uid32_t; | ||
31 | typedef unsigned int __kernel_gid32_t; | ||
32 | |||
33 | typedef unsigned short __kernel_old_uid_t; | ||
34 | typedef unsigned short __kernel_old_gid_t; | ||
35 | |||
36 | #ifdef __GNUC__ | ||
37 | typedef long long __kernel_loff_t; | ||
38 | #endif | ||
39 | |||
40 | typedef struct { | ||
41 | int val[2]; | ||
42 | } __kernel_fsid_t; | ||
43 | |||
44 | #if defined(__KERNEL__) | ||
45 | |||
46 | #undef __FD_SET | ||
47 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | ||
48 | |||
49 | #undef __FD_CLR | ||
50 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | ||
51 | |||
52 | #undef __FD_ISSET | ||
53 | #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) | ||
54 | |||
55 | #undef __FD_ZERO | ||
56 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | ||
57 | |||
58 | #endif /* defined(__KERNEL__) */ | ||
59 | |||
60 | #endif | ||
diff --git a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h deleted file mode 100644 index 69e8a34eb6d5..000000000000 --- a/include/asm-h8300/processor.h +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-h8300/processor.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Yoshinori Sato | ||
5 | * | ||
6 | * Based on: linux/asm-m68nommu/processor.h | ||
7 | * | ||
8 | * Copyright (C) 1995 Hamish Macdonald | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_H8300_PROCESSOR_H | ||
12 | #define __ASM_H8300_PROCESSOR_H | ||
13 | |||
14 | /* | ||
15 | * Default implementation of macro that returns current | ||
16 | * instruction pointer ("program counter"). | ||
17 | */ | ||
18 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | ||
19 | |||
20 | #include <linux/compiler.h> | ||
21 | #include <asm/segment.h> | ||
22 | #include <asm/fpu.h> | ||
23 | #include <asm/ptrace.h> | ||
24 | #include <asm/current.h> | ||
25 | |||
26 | static inline unsigned long rdusp(void) { | ||
27 | extern unsigned int sw_usp; | ||
28 | return(sw_usp); | ||
29 | } | ||
30 | |||
31 | static inline void wrusp(unsigned long usp) { | ||
32 | extern unsigned int sw_usp; | ||
33 | sw_usp = usp; | ||
34 | } | ||
35 | |||
36 | /* | ||
37 | * User space process size: 3.75GB. This is hardcoded into a few places, | ||
38 | * so don't change it unless you know what you are doing. | ||
39 | */ | ||
40 | #define TASK_SIZE (0xFFFFFFFFUL) | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
43 | #define STACK_TOP TASK_SIZE | ||
44 | #define STACK_TOP_MAX STACK_TOP | ||
45 | #endif | ||
46 | |||
47 | /* | ||
48 | * This decides where the kernel will search for a free chunk of vm | ||
49 | * space during mmap's. We won't be using it | ||
50 | */ | ||
51 | #define TASK_UNMAPPED_BASE 0 | ||
52 | |||
53 | struct thread_struct { | ||
54 | unsigned long ksp; /* kernel stack pointer */ | ||
55 | unsigned long usp; /* user stack pointer */ | ||
56 | unsigned long ccr; /* saved status register */ | ||
57 | unsigned long esp0; /* points to SR of stack frame */ | ||
58 | struct { | ||
59 | unsigned short *addr; | ||
60 | unsigned short inst; | ||
61 | } breakinfo; | ||
62 | }; | ||
63 | |||
64 | #define INIT_THREAD { \ | ||
65 | .ksp = sizeof(init_stack) + (unsigned long)init_stack, \ | ||
66 | .usp = 0, \ | ||
67 | .ccr = PS_S, \ | ||
68 | .esp0 = 0, \ | ||
69 | .breakinfo = { \ | ||
70 | .addr = (unsigned short *)-1, \ | ||
71 | .inst = 0 \ | ||
72 | } \ | ||
73 | } | ||
74 | |||
75 | /* | ||
76 | * Do necessary setup to start up a newly executed thread. | ||
77 | * | ||
78 | * pass the data segment into user programs if it exists, | ||
79 | * it can't hurt anything as far as I can tell | ||
80 | */ | ||
81 | #if defined(__H8300H__) | ||
82 | #define start_thread(_regs, _pc, _usp) \ | ||
83 | do { \ | ||
84 | set_fs(USER_DS); /* reads from user space */ \ | ||
85 | (_regs)->pc = (_pc); \ | ||
86 | (_regs)->ccr = 0x00; /* clear all flags */ \ | ||
87 | (_regs)->er5 = current->mm->start_data; /* GOT base */ \ | ||
88 | wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \ | ||
89 | } while(0) | ||
90 | #endif | ||
91 | #if defined(__H8300S__) | ||
92 | #define start_thread(_regs, _pc, _usp) \ | ||
93 | do { \ | ||
94 | set_fs(USER_DS); /* reads from user space */ \ | ||
95 | (_regs)->pc = (_pc); \ | ||
96 | (_regs)->ccr = 0x00; /* clear kernel flag */ \ | ||
97 | (_regs)->exr = 0x78; /* enable all interrupts */ \ | ||
98 | (_regs)->er5 = current->mm->start_data; /* GOT base */ \ | ||
99 | /* 14 = space for retaddr(4), vector(4), er0(4) and ext(2) on stack */ \ | ||
100 | wrusp(((unsigned long)(_usp)) - 14); \ | ||
101 | } while(0) | ||
102 | #endif | ||
103 | |||
104 | /* Forward declaration, a strange C thing */ | ||
105 | struct task_struct; | ||
106 | |||
107 | /* Free all resources held by a thread. */ | ||
108 | static inline void release_thread(struct task_struct *dead_task) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
113 | |||
114 | #define prepare_to_copy(tsk) do { } while (0) | ||
115 | |||
116 | /* | ||
117 | * Free current thread data structures etc.. | ||
118 | */ | ||
119 | static inline void exit_thread(void) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * Return saved PC of a blocked thread. | ||
125 | */ | ||
126 | unsigned long thread_saved_pc(struct task_struct *tsk); | ||
127 | unsigned long get_wchan(struct task_struct *p); | ||
128 | |||
129 | #define KSTK_EIP(tsk) \ | ||
130 | ({ \ | ||
131 | unsigned long eip = 0; \ | ||
132 | if ((tsk)->thread.esp0 > PAGE_SIZE && \ | ||
133 | MAP_NR((tsk)->thread.esp0) < max_mapnr) \ | ||
134 | eip = ((struct pt_regs *) (tsk)->thread.esp0)->pc; \ | ||
135 | eip; }) | ||
136 | #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) | ||
137 | |||
138 | #define cpu_relax() barrier() | ||
139 | |||
140 | #endif | ||
diff --git a/include/asm-h8300/ptrace.h b/include/asm-h8300/ptrace.h deleted file mode 100644 index c2e05e4b512e..000000000000 --- a/include/asm-h8300/ptrace.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #ifndef _H8300_PTRACE_H | ||
2 | #define _H8300_PTRACE_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | #define PT_ER1 0 | ||
7 | #define PT_ER2 1 | ||
8 | #define PT_ER3 2 | ||
9 | #define PT_ER4 3 | ||
10 | #define PT_ER5 4 | ||
11 | #define PT_ER6 5 | ||
12 | #define PT_ER0 6 | ||
13 | #define PT_ORIG_ER0 7 | ||
14 | #define PT_CCR 8 | ||
15 | #define PT_PC 9 | ||
16 | #define PT_USP 10 | ||
17 | #define PT_EXR 12 | ||
18 | |||
19 | /* this struct defines the way the registers are stored on the | ||
20 | stack during a system call. */ | ||
21 | |||
22 | struct pt_regs { | ||
23 | long retpc; | ||
24 | long er4; | ||
25 | long er5; | ||
26 | long er6; | ||
27 | long er3; | ||
28 | long er2; | ||
29 | long er1; | ||
30 | long orig_er0; | ||
31 | unsigned short ccr; | ||
32 | long er0; | ||
33 | long vector; | ||
34 | #if defined(CONFIG_CPU_H8S) | ||
35 | unsigned short exr; | ||
36 | #endif | ||
37 | unsigned long pc; | ||
38 | } __attribute__((aligned(2),packed)); | ||
39 | |||
40 | #define PTRACE_GETREGS 12 | ||
41 | #define PTRACE_SETREGS 13 | ||
42 | |||
43 | #ifdef __KERNEL__ | ||
44 | #ifndef PS_S | ||
45 | #define PS_S (0x10) | ||
46 | #endif | ||
47 | |||
48 | #if defined(__H8300H__) | ||
49 | #define H8300_REGS_NO 11 | ||
50 | #endif | ||
51 | #if defined(__H8300S__) | ||
52 | #define H8300_REGS_NO 12 | ||
53 | #endif | ||
54 | |||
55 | /* Find the stack offset for a register, relative to thread.esp0. */ | ||
56 | #define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg) | ||
57 | |||
58 | #define user_mode(regs) (!((regs)->ccr & PS_S)) | ||
59 | #define instruction_pointer(regs) ((regs)->pc) | ||
60 | #define profile_pc(regs) instruction_pointer(regs) | ||
61 | extern void show_regs(struct pt_regs *); | ||
62 | #endif /* __KERNEL__ */ | ||
63 | #endif /* __ASSEMBLY__ */ | ||
64 | #endif /* _H8300_PTRACE_H */ | ||
diff --git a/include/asm-h8300/regs267x.h b/include/asm-h8300/regs267x.h deleted file mode 100644 index 1bff731a9f77..000000000000 --- a/include/asm-h8300/regs267x.h +++ /dev/null | |||
@@ -1,336 +0,0 @@ | |||
1 | /* internal Peripherals Register address define */ | ||
2 | /* CPU: H8/306x */ | ||
3 | |||
4 | #if !defined(__REGS_H8S267x__) | ||
5 | #define __REGS_H8S267x__ | ||
6 | |||
7 | #if defined(__KERNEL__) | ||
8 | |||
9 | #define DASTCR 0xFEE01A | ||
10 | #define DADR0 0xFFFFA4 | ||
11 | #define DADR1 0xFFFFA5 | ||
12 | #define DACR01 0xFFFFA6 | ||
13 | #define DADR2 0xFFFFA8 | ||
14 | #define DADR3 0xFFFFA9 | ||
15 | #define DACR23 0xFFFFAA | ||
16 | |||
17 | #define ADDRA 0xFFFF90 | ||
18 | #define ADDRAH 0xFFFF90 | ||
19 | #define ADDRAL 0xFFFF91 | ||
20 | #define ADDRB 0xFFFF92 | ||
21 | #define ADDRBH 0xFFFF92 | ||
22 | #define ADDRBL 0xFFFF93 | ||
23 | #define ADDRC 0xFFFF94 | ||
24 | #define ADDRCH 0xFFFF94 | ||
25 | #define ADDRCL 0xFFFF95 | ||
26 | #define ADDRD 0xFFFF96 | ||
27 | #define ADDRDH 0xFFFF96 | ||
28 | #define ADDRDL 0xFFFF97 | ||
29 | #define ADDRE 0xFFFF98 | ||
30 | #define ADDREH 0xFFFF98 | ||
31 | #define ADDREL 0xFFFF99 | ||
32 | #define ADDRF 0xFFFF9A | ||
33 | #define ADDRFH 0xFFFF9A | ||
34 | #define ADDRFL 0xFFFF9B | ||
35 | #define ADDRG 0xFFFF9C | ||
36 | #define ADDRGH 0xFFFF9C | ||
37 | #define ADDRGL 0xFFFF9D | ||
38 | #define ADDRH 0xFFFF9E | ||
39 | #define ADDRHH 0xFFFF9E | ||
40 | #define ADDRHL 0xFFFF9F | ||
41 | |||
42 | #define ADCSR 0xFFFFA0 | ||
43 | #define ADCR 0xFFFFA1 | ||
44 | |||
45 | #define ABWCR 0xFFFEC0 | ||
46 | #define ASTCR 0xFFFEC1 | ||
47 | #define WTCRAH 0xFFFEC2 | ||
48 | #define WTCRAL 0xFFFEC3 | ||
49 | #define WTCRBH 0xFFFEC4 | ||
50 | #define WTCRBL 0xFFFEC5 | ||
51 | #define RDNCR 0xFFFEC6 | ||
52 | #define CSACRH 0xFFFEC8 | ||
53 | #define CSACRL 0xFFFEC9 | ||
54 | #define BROMCRH 0xFFFECA | ||
55 | #define BROMCRL 0xFFFECB | ||
56 | #define BCR 0xFFFECC | ||
57 | #define DRAMCR 0xFFFED0 | ||
58 | #define DRACCR 0xFFFED2 | ||
59 | #define REFCR 0xFFFED4 | ||
60 | #define RTCNT 0xFFFED6 | ||
61 | #define RTCOR 0xFFFED7 | ||
62 | |||
63 | #define MAR0AH 0xFFFEE0 | ||
64 | #define MAR0AL 0xFFFEE2 | ||
65 | #define IOAR0A 0xFFFEE4 | ||
66 | #define ETCR0A 0xFFFEE6 | ||
67 | #define MAR0BH 0xFFFEE8 | ||
68 | #define MAR0BL 0xFFFEEA | ||
69 | #define IOAR0B 0xFFFEEC | ||
70 | #define ETCR0B 0xFFFEEE | ||
71 | #define MAR1AH 0xFFFEF0 | ||
72 | #define MAR1AL 0xFFFEF2 | ||
73 | #define IOAR1A 0xFFFEF4 | ||
74 | #define ETCR1A 0xFFFEF6 | ||
75 | #define MAR1BH 0xFFFEF8 | ||
76 | #define MAR1BL 0xFFFEFA | ||
77 | #define IOAR1B 0xFFFEFC | ||
78 | #define ETCR1B 0xFFFEFE | ||
79 | #define DMAWER 0xFFFF20 | ||
80 | #define DMATCR 0xFFFF21 | ||
81 | #define DMACR0A 0xFFFF22 | ||
82 | #define DMACR0B 0xFFFF23 | ||
83 | #define DMACR1A 0xFFFF24 | ||
84 | #define DMACR1B 0xFFFF25 | ||
85 | #define DMABCRH 0xFFFF26 | ||
86 | #define DMABCRL 0xFFFF27 | ||
87 | |||
88 | #define EDSAR0 0xFFFDC0 | ||
89 | #define EDDAR0 0xFFFDC4 | ||
90 | #define EDTCR0 0xFFFDC8 | ||
91 | #define EDMDR0 0xFFFDCC | ||
92 | #define EDMDR0H 0xFFFDCC | ||
93 | #define EDMDR0L 0xFFFDCD | ||
94 | #define EDACR0 0xFFFDCE | ||
95 | #define EDSAR1 0xFFFDD0 | ||
96 | #define EDDAR1 0xFFFDD4 | ||
97 | #define EDTCR1 0xFFFDD8 | ||
98 | #define EDMDR1 0xFFFDDC | ||
99 | #define EDMDR1H 0xFFFDDC | ||
100 | #define EDMDR1L 0xFFFDDD | ||
101 | #define EDACR1 0xFFFDDE | ||
102 | #define EDSAR2 0xFFFDE0 | ||
103 | #define EDDAR2 0xFFFDE4 | ||
104 | #define EDTCR2 0xFFFDE8 | ||
105 | #define EDMDR2 0xFFFDEC | ||
106 | #define EDMDR2H 0xFFFDEC | ||
107 | #define EDMDR2L 0xFFFDED | ||
108 | #define EDACR2 0xFFFDEE | ||
109 | #define EDSAR3 0xFFFDF0 | ||
110 | #define EDDAR3 0xFFFDF4 | ||
111 | #define EDTCR3 0xFFFDF8 | ||
112 | #define EDMDR3 0xFFFDFC | ||
113 | #define EDMDR3H 0xFFFDFC | ||
114 | #define EDMDR3L 0xFFFDFD | ||
115 | #define EDACR3 0xFFFDFE | ||
116 | |||
117 | #define IPRA 0xFFFE00 | ||
118 | #define IPRB 0xFFFE02 | ||
119 | #define IPRC 0xFFFE04 | ||
120 | #define IPRD 0xFFFE06 | ||
121 | #define IPRE 0xFFFE08 | ||
122 | #define IPRF 0xFFFE0A | ||
123 | #define IPRG 0xFFFE0C | ||
124 | #define IPRH 0xFFFE0E | ||
125 | #define IPRI 0xFFFE10 | ||
126 | #define IPRJ 0xFFFE12 | ||
127 | #define IPRK 0xFFFE14 | ||
128 | #define ITSR 0xFFFE16 | ||
129 | #define SSIER 0xFFFE18 | ||
130 | #define ISCRH 0xFFFE1A | ||
131 | #define ISCRL 0xFFFE1C | ||
132 | |||
133 | #define INTCR 0xFFFF31 | ||
134 | #define IER 0xFFFF32 | ||
135 | #define IERH 0xFFFF32 | ||
136 | #define IERL 0xFFFF33 | ||
137 | #define ISR 0xFFFF34 | ||
138 | #define ISRH 0xFFFF34 | ||
139 | #define ISRL 0xFFFF35 | ||
140 | |||
141 | #define P1DDR 0xFFFE20 | ||
142 | #define P2DDR 0xFFFE21 | ||
143 | #define P3DDR 0xFFFE22 | ||
144 | #define P4DDR 0xFFFE23 | ||
145 | #define P5DDR 0xFFFE24 | ||
146 | #define P6DDR 0xFFFE25 | ||
147 | #define P7DDR 0xFFFE26 | ||
148 | #define P8DDR 0xFFFE27 | ||
149 | #define P9DDR 0xFFFE28 | ||
150 | #define PADDR 0xFFFE29 | ||
151 | #define PBDDR 0xFFFE2A | ||
152 | #define PCDDR 0xFFFE2B | ||
153 | #define PDDDR 0xFFFE2C | ||
154 | #define PEDDR 0xFFFE2D | ||
155 | #define PFDDR 0xFFFE2E | ||
156 | #define PGDDR 0xFFFE2F | ||
157 | #define PHDDR 0xFFFF74 | ||
158 | |||
159 | #define PFCR0 0xFFFE32 | ||
160 | #define PFCR1 0xFFFE33 | ||
161 | #define PFCR2 0xFFFE34 | ||
162 | |||
163 | #define PAPCR 0xFFFE36 | ||
164 | #define PBPCR 0xFFFE37 | ||
165 | #define PCPCR 0xFFFE38 | ||
166 | #define PDPCR 0xFFFE39 | ||
167 | #define PEPCR 0xFFFE3A | ||
168 | |||
169 | #define P3ODR 0xFFFE3C | ||
170 | #define PAODR 0xFFFE3D | ||
171 | |||
172 | #define P1DR 0xFFFF60 | ||
173 | #define P2DR 0xFFFF61 | ||
174 | #define P3DR 0xFFFF62 | ||
175 | #define P4DR 0xFFFF63 | ||
176 | #define P5DR 0xFFFF64 | ||
177 | #define P6DR 0xFFFF65 | ||
178 | #define P7DR 0xFFFF66 | ||
179 | #define P8DR 0xFFFF67 | ||
180 | #define P9DR 0xFFFF68 | ||
181 | #define PADR 0xFFFF69 | ||
182 | #define PBDR 0xFFFF6A | ||
183 | #define PCDR 0xFFFF6B | ||
184 | #define PDDR 0xFFFF6C | ||
185 | #define PEDR 0xFFFF6D | ||
186 | #define PFDR 0xFFFF6E | ||
187 | #define PGDR 0xFFFF6F | ||
188 | #define PHDR 0xFFFF72 | ||
189 | |||
190 | #define PORT1 0xFFFF50 | ||
191 | #define PORT2 0xFFFF51 | ||
192 | #define PORT3 0xFFFF52 | ||
193 | #define PORT4 0xFFFF53 | ||
194 | #define PORT5 0xFFFF54 | ||
195 | #define PORT6 0xFFFF55 | ||
196 | #define PORT7 0xFFFF56 | ||
197 | #define PORT8 0xFFFF57 | ||
198 | #define PORT9 0xFFFF58 | ||
199 | #define PORTA 0xFFFF59 | ||
200 | #define PORTB 0xFFFF5A | ||
201 | #define PORTC 0xFFFF5B | ||
202 | #define PORTD 0xFFFF5C | ||
203 | #define PORTE 0xFFFF5D | ||
204 | #define PORTF 0xFFFF5E | ||
205 | #define PORTG 0xFFFF5F | ||
206 | #define PORTH 0xFFFF70 | ||
207 | |||
208 | #define PCR 0xFFFF46 | ||
209 | #define PMR 0xFFFF47 | ||
210 | #define NDERH 0xFFFF48 | ||
211 | #define NDERL 0xFFFF49 | ||
212 | #define PODRH 0xFFFF4A | ||
213 | #define PODRL 0xFFFF4B | ||
214 | #define NDRH1 0xFFFF4C | ||
215 | #define NDRL1 0xFFFF4D | ||
216 | #define NDRH2 0xFFFF4E | ||
217 | #define NDRL2 0xFFFF4F | ||
218 | |||
219 | #define SMR0 0xFFFF78 | ||
220 | #define BRR0 0xFFFF79 | ||
221 | #define SCR0 0xFFFF7A | ||
222 | #define TDR0 0xFFFF7B | ||
223 | #define SSR0 0xFFFF7C | ||
224 | #define RDR0 0xFFFF7D | ||
225 | #define SCMR0 0xFFFF7E | ||
226 | #define SMR1 0xFFFF80 | ||
227 | #define BRR1 0xFFFF81 | ||
228 | #define SCR1 0xFFFF82 | ||
229 | #define TDR1 0xFFFF83 | ||
230 | #define SSR1 0xFFFF84 | ||
231 | #define RDR1 0xFFFF85 | ||
232 | #define SCMR1 0xFFFF86 | ||
233 | #define SMR2 0xFFFF88 | ||
234 | #define BRR2 0xFFFF89 | ||
235 | #define SCR2 0xFFFF8A | ||
236 | #define TDR2 0xFFFF8B | ||
237 | #define SSR2 0xFFFF8C | ||
238 | #define RDR2 0xFFFF8D | ||
239 | #define SCMR2 0xFFFF8E | ||
240 | |||
241 | #define IRCR0 0xFFFE1E | ||
242 | #define SEMR 0xFFFDA8 | ||
243 | |||
244 | #define MDCR 0xFFFF3E | ||
245 | #define SYSCR 0xFFFF3D | ||
246 | #define MSTPCRH 0xFFFF40 | ||
247 | #define MSTPCRL 0xFFFF41 | ||
248 | #define FLMCR1 0xFFFFC8 | ||
249 | #define FLMCR2 0xFFFFC9 | ||
250 | #define EBR1 0xFFFFCA | ||
251 | #define EBR2 0xFFFFCB | ||
252 | #define CTGARC_RAMCR 0xFFFECE | ||
253 | #define SBYCR 0xFFFF3A | ||
254 | #define SCKCR 0xFFFF3B | ||
255 | #define PLLCR 0xFFFF45 | ||
256 | |||
257 | #define TSTR 0xFFFFC0 | ||
258 | #define TSNC 0XFFFFC1 | ||
259 | |||
260 | #define TCR0 0xFFFFD0 | ||
261 | #define TMDR0 0xFFFFD1 | ||
262 | #define TIORH0 0xFFFFD2 | ||
263 | #define TIORL0 0xFFFFD3 | ||
264 | #define TIER0 0xFFFFD4 | ||
265 | #define TSR0 0xFFFFD5 | ||
266 | #define TCNT0 0xFFFFD6 | ||
267 | #define GRA0 0xFFFFD8 | ||
268 | #define GRB0 0xFFFFDA | ||
269 | #define GRC0 0xFFFFDC | ||
270 | #define GRD0 0xFFFFDE | ||
271 | #define TCR1 0xFFFFE0 | ||
272 | #define TMDR1 0xFFFFE1 | ||
273 | #define TIORH1 0xFFFFE2 | ||
274 | #define TIORL1 0xFFFFE3 | ||
275 | #define TIER1 0xFFFFE4 | ||
276 | #define TSR1 0xFFFFE5 | ||
277 | #define TCNT1 0xFFFFE6 | ||
278 | #define GRA1 0xFFFFE8 | ||
279 | #define GRB1 0xFFFFEA | ||
280 | #define TCR2 0xFFFFF0 | ||
281 | #define TMDR2 0xFFFFF1 | ||
282 | #define TIORH2 0xFFFFF2 | ||
283 | #define TIORL2 0xFFFFF3 | ||
284 | #define TIER2 0xFFFFF4 | ||
285 | #define TSR2 0xFFFFF5 | ||
286 | #define TCNT2 0xFFFFF6 | ||
287 | #define GRA2 0xFFFFF8 | ||
288 | #define GRB2 0xFFFFFA | ||
289 | #define TCR3 0xFFFE80 | ||
290 | #define TMDR3 0xFFFE81 | ||
291 | #define TIORH3 0xFFFE82 | ||
292 | #define TIORL3 0xFFFE83 | ||
293 | #define TIER3 0xFFFE84 | ||
294 | #define TSR3 0xFFFE85 | ||
295 | #define TCNT3 0xFFFE86 | ||
296 | #define GRA3 0xFFFE88 | ||
297 | #define GRB3 0xFFFE8A | ||
298 | #define GRC3 0xFFFE8C | ||
299 | #define GRD3 0xFFFE8E | ||
300 | #define TCR4 0xFFFE90 | ||
301 | #define TMDR4 0xFFFE91 | ||
302 | #define TIORH4 0xFFFE92 | ||
303 | #define TIORL4 0xFFFE93 | ||
304 | #define TIER4 0xFFFE94 | ||
305 | #define TSR4 0xFFFE95 | ||
306 | #define TCNT4 0xFFFE96 | ||
307 | #define GRA4 0xFFFE98 | ||
308 | #define GRB4 0xFFFE9A | ||
309 | #define TCR5 0xFFFEA0 | ||
310 | #define TMDR5 0xFFFEA1 | ||
311 | #define TIORH5 0xFFFEA2 | ||
312 | #define TIORL5 0xFFFEA3 | ||
313 | #define TIER5 0xFFFEA4 | ||
314 | #define TSR5 0xFFFEA5 | ||
315 | #define TCNT5 0xFFFEA6 | ||
316 | #define GRA5 0xFFFEA8 | ||
317 | #define GRB5 0xFFFEAA | ||
318 | |||
319 | #define _8TCR0 0xFFFFB0 | ||
320 | #define _8TCR1 0xFFFFB1 | ||
321 | #define _8TCSR0 0xFFFFB2 | ||
322 | #define _8TCSR1 0xFFFFB3 | ||
323 | #define _8TCORA0 0xFFFFB4 | ||
324 | #define _8TCORA1 0xFFFFB5 | ||
325 | #define _8TCORB0 0xFFFFB6 | ||
326 | #define _8TCORB1 0xFFFFB7 | ||
327 | #define _8TCNT0 0xFFFFB8 | ||
328 | #define _8TCNT1 0xFFFFB9 | ||
329 | |||
330 | #define TCSR 0xFFFFBC | ||
331 | #define TCNT 0xFFFFBD | ||
332 | #define RSTCSRW 0xFFFFBE | ||
333 | #define RSTCSRR 0xFFFFBF | ||
334 | |||
335 | #endif /* __KERNEL__ */ | ||
336 | #endif /* __REGS_H8S267x__ */ | ||
diff --git a/include/asm-h8300/regs306x.h b/include/asm-h8300/regs306x.h deleted file mode 100644 index 027dd633fa25..000000000000 --- a/include/asm-h8300/regs306x.h +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | /* internal Peripherals Register address define */ | ||
2 | /* CPU: H8/306x */ | ||
3 | |||
4 | #if !defined(__REGS_H8306x__) | ||
5 | #define __REGS_H8306x__ | ||
6 | |||
7 | #if defined(__KERNEL__) | ||
8 | |||
9 | #define DASTCR 0xFEE01A | ||
10 | #define DADR0 0xFEE09C | ||
11 | #define DADR1 0xFEE09D | ||
12 | #define DACR 0xFEE09E | ||
13 | |||
14 | #define ADDRAH 0xFFFFE0 | ||
15 | #define ADDRAL 0xFFFFE1 | ||
16 | #define ADDRBH 0xFFFFE2 | ||
17 | #define ADDRBL 0xFFFFE3 | ||
18 | #define ADDRCH 0xFFFFE4 | ||
19 | #define ADDRCL 0xFFFFE5 | ||
20 | #define ADDRDH 0xFFFFE6 | ||
21 | #define ADDRDL 0xFFFFE7 | ||
22 | #define ADCSR 0xFFFFE8 | ||
23 | #define ADCR 0xFFFFE9 | ||
24 | |||
25 | #define BRCR 0xFEE013 | ||
26 | #define ADRCR 0xFEE01E | ||
27 | #define CSCR 0xFEE01F | ||
28 | #define ABWCR 0xFEE020 | ||
29 | #define ASTCR 0xFEE021 | ||
30 | #define WCRH 0xFEE022 | ||
31 | #define WCRL 0xFEE023 | ||
32 | #define BCR 0xFEE024 | ||
33 | #define DRCRA 0xFEE026 | ||
34 | #define DRCRB 0xFEE027 | ||
35 | #define RTMCSR 0xFEE028 | ||
36 | #define RTCNT 0xFEE029 | ||
37 | #define RTCOR 0xFEE02A | ||
38 | |||
39 | #define MAR0AR 0xFFFF20 | ||
40 | #define MAR0AE 0xFFFF21 | ||
41 | #define MAR0AH 0xFFFF22 | ||
42 | #define MAR0AL 0xFFFF23 | ||
43 | #define ETCR0AL 0xFFFF24 | ||
44 | #define ETCR0AH 0xFFFF25 | ||
45 | #define IOAR0A 0xFFFF26 | ||
46 | #define DTCR0A 0xFFFF27 | ||
47 | #define MAR0BR 0xFFFF28 | ||
48 | #define MAR0BE 0xFFFF29 | ||
49 | #define MAR0BH 0xFFFF2A | ||
50 | #define MAR0BL 0xFFFF2B | ||
51 | #define ETCR0BL 0xFFFF2C | ||
52 | #define ETCR0BH 0xFFFF2D | ||
53 | #define IOAR0B 0xFFFF2E | ||
54 | #define DTCR0B 0xFFFF2F | ||
55 | #define MAR1AR 0xFFFF30 | ||
56 | #define MAR1AE 0xFFFF31 | ||
57 | #define MAR1AH 0xFFFF32 | ||
58 | #define MAR1AL 0xFFFF33 | ||
59 | #define ETCR1AL 0xFFFF34 | ||
60 | #define ETCR1AH 0xFFFF35 | ||
61 | #define IOAR1A 0xFFFF36 | ||
62 | #define DTCR1A 0xFFFF37 | ||
63 | #define MAR1BR 0xFFFF38 | ||
64 | #define MAR1BE 0xFFFF39 | ||
65 | #define MAR1BH 0xFFFF3A | ||
66 | #define MAR1BL 0xFFFF3B | ||
67 | #define ETCR1BL 0xFFFF3C | ||
68 | #define ETCR1BH 0xFFFF3D | ||
69 | #define IOAR1B 0xFFFF3E | ||
70 | #define DTCR1B 0xFFFF3F | ||
71 | |||
72 | #define ISCR 0xFEE014 | ||
73 | #define IER 0xFEE015 | ||
74 | #define ISR 0xFEE016 | ||
75 | #define IPRA 0xFEE018 | ||
76 | #define IPRB 0xFEE019 | ||
77 | |||
78 | #define P1DDR 0xFEE000 | ||
79 | #define P2DDR 0xFEE001 | ||
80 | #define P3DDR 0xFEE002 | ||
81 | #define P4DDR 0xFEE003 | ||
82 | #define P5DDR 0xFEE004 | ||
83 | #define P6DDR 0xFEE005 | ||
84 | /*#define P7DDR 0xFEE006*/ | ||
85 | #define P8DDR 0xFEE007 | ||
86 | #define P9DDR 0xFEE008 | ||
87 | #define PADDR 0xFEE009 | ||
88 | #define PBDDR 0xFEE00A | ||
89 | |||
90 | #define P1DR 0xFFFFD0 | ||
91 | #define P2DR 0xFFFFD1 | ||
92 | #define P3DR 0xFFFFD2 | ||
93 | #define P4DR 0xFFFFD3 | ||
94 | #define P5DR 0xFFFFD4 | ||
95 | #define P6DR 0xFFFFD5 | ||
96 | /*#define P7DR 0xFFFFD6*/ | ||
97 | #define P8DR 0xFFFFD7 | ||
98 | #define P9DR 0xFFFFD8 | ||
99 | #define PADR 0xFFFFD9 | ||
100 | #define PBDR 0xFFFFDA | ||
101 | |||
102 | #define P2CR 0xFEE03C | ||
103 | #define P4CR 0xFEE03E | ||
104 | #define P5CR 0xFEE03F | ||
105 | |||
106 | #define SMR0 0xFFFFB0 | ||
107 | #define BRR0 0xFFFFB1 | ||
108 | #define SCR0 0xFFFFB2 | ||
109 | #define TDR0 0xFFFFB3 | ||
110 | #define SSR0 0xFFFFB4 | ||
111 | #define RDR0 0xFFFFB5 | ||
112 | #define SCMR0 0xFFFFB6 | ||
113 | #define SMR1 0xFFFFB8 | ||
114 | #define BRR1 0xFFFFB9 | ||
115 | #define SCR1 0xFFFFBA | ||
116 | #define TDR1 0xFFFFBB | ||
117 | #define SSR1 0xFFFFBC | ||
118 | #define RDR1 0xFFFFBD | ||
119 | #define SCMR1 0xFFFFBE | ||
120 | #define SMR2 0xFFFFC0 | ||
121 | #define BRR2 0xFFFFC1 | ||
122 | #define SCR2 0xFFFFC2 | ||
123 | #define TDR2 0xFFFFC3 | ||
124 | #define SSR2 0xFFFFC4 | ||
125 | #define RDR2 0xFFFFC5 | ||
126 | #define SCMR2 0xFFFFC6 | ||
127 | |||
128 | #define MDCR 0xFEE011 | ||
129 | #define SYSCR 0xFEE012 | ||
130 | #define DIVCR 0xFEE01B | ||
131 | #define MSTCRH 0xFEE01C | ||
132 | #define MSTCRL 0xFEE01D | ||
133 | #define FLMCR1 0xFEE030 | ||
134 | #define FLMCR2 0xFEE031 | ||
135 | #define EBR1 0xFEE032 | ||
136 | #define EBR2 0xFEE033 | ||
137 | #define RAMCR 0xFEE077 | ||
138 | |||
139 | #define TSTR 0xFFFF60 | ||
140 | #define TSNC 0XFFFF61 | ||
141 | #define TMDR 0xFFFF62 | ||
142 | #define TOLR 0xFFFF63 | ||
143 | #define TISRA 0xFFFF64 | ||
144 | #define TISRB 0xFFFF65 | ||
145 | #define TISRC 0xFFFF66 | ||
146 | #define TCR0 0xFFFF68 | ||
147 | #define TIOR0 0xFFFF69 | ||
148 | #define TCNT0H 0xFFFF6A | ||
149 | #define TCNT0L 0xFFFF6B | ||
150 | #define GRA0H 0xFFFF6C | ||
151 | #define GRA0L 0xFFFF6D | ||
152 | #define GRB0H 0xFFFF6E | ||
153 | #define GRB0L 0xFFFF6F | ||
154 | #define TCR1 0xFFFF70 | ||
155 | #define TIOR1 0xFFFF71 | ||
156 | #define TCNT1H 0xFFFF72 | ||
157 | #define TCNT1L 0xFFFF73 | ||
158 | #define GRA1H 0xFFFF74 | ||
159 | #define GRA1L 0xFFFF75 | ||
160 | #define GRB1H 0xFFFF76 | ||
161 | #define GRB1L 0xFFFF77 | ||
162 | #define TCR3 0xFFFF78 | ||
163 | #define TIOR3 0xFFFF79 | ||
164 | #define TCNT3H 0xFFFF7A | ||
165 | #define TCNT3L 0xFFFF7B | ||
166 | #define GRA3H 0xFFFF7C | ||
167 | #define GRA3L 0xFFFF7D | ||
168 | #define GRB3H 0xFFFF7E | ||
169 | #define GRB3L 0xFFFF7F | ||
170 | |||
171 | #define _8TCR0 0xFFFF80 | ||
172 | #define _8TCR1 0xFFFF81 | ||
173 | #define _8TCSR0 0xFFFF82 | ||
174 | #define _8TCSR1 0xFFFF83 | ||
175 | #define TCORA0 0xFFFF84 | ||
176 | #define TCORA1 0xFFFF85 | ||
177 | #define TCORB0 0xFFFF86 | ||
178 | #define TCORB1 0xFFFF87 | ||
179 | #define _8TCNT0 0xFFFF88 | ||
180 | #define _8TCNT1 0xFFFF89 | ||
181 | |||
182 | #define _8TCR2 0xFFFF90 | ||
183 | #define _8TCR3 0xFFFF91 | ||
184 | #define _8TCSR2 0xFFFF92 | ||
185 | #define _8TCSR3 0xFFFF93 | ||
186 | #define TCORA2 0xFFFF94 | ||
187 | #define TCORA3 0xFFFF95 | ||
188 | #define TCORB2 0xFFFF96 | ||
189 | #define TCORB3 0xFFFF97 | ||
190 | #define _8TCNT2 0xFFFF98 | ||
191 | #define _8TCNT3 0xFFFF99 | ||
192 | |||
193 | #define TCSR 0xFFFF8C | ||
194 | #define TCNT 0xFFFF8D | ||
195 | #define RSTCSR 0xFFFF8F | ||
196 | |||
197 | #define TPMR 0xFFFFA0 | ||
198 | #define TPCR 0xFFFFA1 | ||
199 | #define NDERB 0xFFFFA2 | ||
200 | #define NDERA 0xFFFFA3 | ||
201 | #define NDRB1 0xFFFFA4 | ||
202 | #define NDRA1 0xFFFFA5 | ||
203 | #define NDRB2 0xFFFFA6 | ||
204 | #define NDRA2 0xFFFFA7 | ||
205 | |||
206 | #define TCSR 0xFFFF8C | ||
207 | #define TCNT 0xFFFF8D | ||
208 | #define RSTCSRW 0xFFFF8E | ||
209 | #define RSTCSRR 0xFFFF8F | ||
210 | |||
211 | #endif /* __KERNEL__ */ | ||
212 | #endif /* __REGS_H8306x__ */ | ||
diff --git a/include/asm-h8300/resource.h b/include/asm-h8300/resource.h deleted file mode 100644 index 46c5f4391607..000000000000 --- a/include/asm-h8300/resource.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_RESOURCE_H | ||
2 | #define _H8300_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | ||
5 | |||
6 | #endif /* _H8300_RESOURCE_H */ | ||
diff --git a/include/asm-h8300/scatterlist.h b/include/asm-h8300/scatterlist.h deleted file mode 100644 index d3ecdd87ac90..000000000000 --- a/include/asm-h8300/scatterlist.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _H8300_SCATTERLIST_H | ||
2 | #define _H8300_SCATTERLIST_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | struct scatterlist { | ||
7 | #ifdef CONFIG_DEBUG_SG | ||
8 | unsigned long sg_magic; | ||
9 | #endif | ||
10 | unsigned long page_link; | ||
11 | unsigned int offset; | ||
12 | dma_addr_t dma_address; | ||
13 | unsigned int length; | ||
14 | }; | ||
15 | |||
16 | #define ISA_DMA_THRESHOLD (0xffffffff) | ||
17 | |||
18 | #endif /* !(_H8300_SCATTERLIST_H) */ | ||
diff --git a/include/asm-h8300/sections.h b/include/asm-h8300/sections.h deleted file mode 100644 index a81743e8b743..000000000000 --- a/include/asm-h8300/sections.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SECTIONS_H_ | ||
2 | #define _H8300_SECTIONS_H_ | ||
3 | |||
4 | #include <asm-generic/sections.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/segment.h b/include/asm-h8300/segment.h deleted file mode 100644 index b79a82d0f99d..000000000000 --- a/include/asm-h8300/segment.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _H8300_SEGMENT_H | ||
2 | #define _H8300_SEGMENT_H | ||
3 | |||
4 | /* define constants */ | ||
5 | #define USER_DATA (1) | ||
6 | #ifndef __USER_DS | ||
7 | #define __USER_DS (USER_DATA) | ||
8 | #endif | ||
9 | #define USER_PROGRAM (2) | ||
10 | #define SUPER_DATA (3) | ||
11 | #ifndef __KERNEL_DS | ||
12 | #define __KERNEL_DS (SUPER_DATA) | ||
13 | #endif | ||
14 | #define SUPER_PROGRAM (4) | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | typedef struct { | ||
19 | unsigned long seg; | ||
20 | } mm_segment_t; | ||
21 | |||
22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
23 | #define USER_DS MAKE_MM_SEG(__USER_DS) | ||
24 | #define KERNEL_DS MAKE_MM_SEG(__KERNEL_DS) | ||
25 | |||
26 | /* | ||
27 | * Get/set the SFC/DFC registers for MOVES instructions | ||
28 | */ | ||
29 | |||
30 | static inline mm_segment_t get_fs(void) | ||
31 | { | ||
32 | return USER_DS; | ||
33 | } | ||
34 | |||
35 | static inline mm_segment_t get_ds(void) | ||
36 | { | ||
37 | /* return the supervisor data space code */ | ||
38 | return KERNEL_DS; | ||
39 | } | ||
40 | |||
41 | static inline void set_fs(mm_segment_t val) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | #define segment_eq(a,b) ((a).seg == (b).seg) | ||
46 | |||
47 | #endif /* __ASSEMBLY__ */ | ||
48 | |||
49 | #endif /* _H8300_SEGMENT_H */ | ||
diff --git a/include/asm-h8300/sembuf.h b/include/asm-h8300/sembuf.h deleted file mode 100644 index e04a3ec0cb92..000000000000 --- a/include/asm-h8300/sembuf.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _H8300_SEMBUF_H | ||
2 | #define _H8300_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for m68k architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct semid64_ds { | ||
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
16 | __kernel_time_t sem_otime; /* last semop time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t sem_ctime; /* last change time */ | ||
19 | unsigned long __unused2; | ||
20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long __unused4; | ||
23 | }; | ||
24 | |||
25 | #endif /* _H8300_SEMBUF_H */ | ||
diff --git a/include/asm-h8300/setup.h b/include/asm-h8300/setup.h deleted file mode 100644 index e2c600e96733..000000000000 --- a/include/asm-h8300/setup.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_SETUP_H | ||
2 | #define __H8300_SETUP_H | ||
3 | |||
4 | #define COMMAND_LINE_SIZE 512 | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/sh_bios.h b/include/asm-h8300/sh_bios.h deleted file mode 100644 index b6bb6e58295c..000000000000 --- a/include/asm-h8300/sh_bios.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* eCos HAL interface header */ | ||
2 | |||
3 | #ifndef SH_BIOS_H | ||
4 | #define SH_BIOS_H | ||
5 | |||
6 | #define HAL_IF_VECTOR_TABLE 0xfffe20 | ||
7 | #define CALL_IF_SET_CONSOLE_COMM 13 | ||
8 | #define QUERY_CURRENT -1 | ||
9 | #define MANGLER -3 | ||
10 | |||
11 | /* Checking for GDB stub active */ | ||
12 | /* suggestion Jonathan Larmour */ | ||
13 | static int sh_bios_in_gdb_mode(void) | ||
14 | { | ||
15 | static int gdb_active = -1; | ||
16 | if (gdb_active == -1) { | ||
17 | int (*set_console_comm)(int); | ||
18 | set_console_comm = ((void **)HAL_IF_VECTOR_TABLE)[CALL_IF_SET_CONSOLE_COMM]; | ||
19 | gdb_active = (set_console_comm(QUERY_CURRENT) == MANGLER); | ||
20 | } | ||
21 | return gdb_active; | ||
22 | } | ||
23 | |||
24 | static void sh_bios_gdb_detach(void) | ||
25 | { | ||
26 | |||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-h8300/shm.h b/include/asm-h8300/shm.h deleted file mode 100644 index ed6623c0545d..000000000000 --- a/include/asm-h8300/shm.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _H8300_SHM_H | ||
2 | #define _H8300_SHM_H | ||
3 | |||
4 | |||
5 | /* format of page table entries that correspond to shared memory pages | ||
6 | currently out in swap space (see also mm/swap.c): | ||
7 | bits 0-1 (PAGE_PRESENT) is = 0 | ||
8 | bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE | ||
9 | bits 31..9 are used like this: | ||
10 | bits 15..9 (SHM_ID) the id of the shared memory segment | ||
11 | bits 30..16 (SHM_IDX) the index of the page within the shared memory segment | ||
12 | (actually only bits 25..16 get used since SHMMAX is so low) | ||
13 | bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach | ||
14 | */ | ||
15 | /* on the m68k both bits 0 and 1 must be zero */ | ||
16 | /* format on the sun3 is similar, but bits 30, 31 are set to zero and all | ||
17 | others are reduced by 2. --m */ | ||
18 | |||
19 | #ifndef CONFIG_SUN3 | ||
20 | #define SHM_ID_SHIFT 9 | ||
21 | #else | ||
22 | #define SHM_ID_SHIFT 7 | ||
23 | #endif | ||
24 | #define _SHM_ID_BITS 7 | ||
25 | #define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1) | ||
26 | |||
27 | #define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS) | ||
28 | #define _SHM_IDX_BITS 15 | ||
29 | #define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1) | ||
30 | |||
31 | #endif /* _H8300_SHM_H */ | ||
diff --git a/include/asm-h8300/shmbuf.h b/include/asm-h8300/shmbuf.h deleted file mode 100644 index 64e77993a7a9..000000000000 --- a/include/asm-h8300/shmbuf.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _H8300_SHMBUF_H | ||
2 | #define _H8300_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for m68k architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct shmid64_ds { | ||
15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
17 | __kernel_time_t shm_atime; /* last attach time */ | ||
18 | unsigned long __unused1; | ||
19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
20 | unsigned long __unused2; | ||
21 | __kernel_time_t shm_ctime; /* last change time */ | ||
22 | unsigned long __unused3; | ||
23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
26 | unsigned long __unused4; | ||
27 | unsigned long __unused5; | ||
28 | }; | ||
29 | |||
30 | struct shminfo64 { | ||
31 | unsigned long shmmax; | ||
32 | unsigned long shmmin; | ||
33 | unsigned long shmmni; | ||
34 | unsigned long shmseg; | ||
35 | unsigned long shmall; | ||
36 | unsigned long __unused1; | ||
37 | unsigned long __unused2; | ||
38 | unsigned long __unused3; | ||
39 | unsigned long __unused4; | ||
40 | }; | ||
41 | |||
42 | #endif /* _H8300_SHMBUF_H */ | ||
diff --git a/include/asm-h8300/shmparam.h b/include/asm-h8300/shmparam.h deleted file mode 100644 index d1863953ec64..000000000000 --- a/include/asm-h8300/shmparam.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SHMPARAM_H | ||
2 | #define _H8300_SHMPARAM_H | ||
3 | |||
4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
5 | |||
6 | #endif /* _H8300_SHMPARAM_H */ | ||
diff --git a/include/asm-h8300/sigcontext.h b/include/asm-h8300/sigcontext.h deleted file mode 100644 index e4b81505f8f8..000000000000 --- a/include/asm-h8300/sigcontext.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_SIGCONTEXT_H | ||
2 | #define _ASM_H8300_SIGCONTEXT_H | ||
3 | |||
4 | struct sigcontext { | ||
5 | unsigned long sc_mask; /* old sigmask */ | ||
6 | unsigned long sc_usp; /* old user stack pointer */ | ||
7 | unsigned long sc_er0; | ||
8 | unsigned long sc_er1; | ||
9 | unsigned long sc_er2; | ||
10 | unsigned long sc_er3; | ||
11 | unsigned long sc_er4; | ||
12 | unsigned long sc_er5; | ||
13 | unsigned long sc_er6; | ||
14 | unsigned short sc_ccr; | ||
15 | unsigned long sc_pc; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-h8300/siginfo.h b/include/asm-h8300/siginfo.h deleted file mode 100644 index bc8fbea931a5..000000000000 --- a/include/asm-h8300/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_SIGINFO_H | ||
2 | #define _H8300_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h deleted file mode 100644 index 7bc15048a64f..000000000000 --- a/include/asm-h8300/signal.h +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | #ifndef _H8300_SIGNAL_H | ||
2 | #define _H8300_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | ||
11 | is taken to make libc match. */ | ||
12 | |||
13 | #define _NSIG 64 | ||
14 | #define _NSIG_BPW 32 | ||
15 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
16 | |||
17 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
18 | |||
19 | typedef struct { | ||
20 | unsigned long sig[_NSIG_WORDS]; | ||
21 | } sigset_t; | ||
22 | |||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | /* | ||
74 | * SA_FLAGS values: | ||
75 | * | ||
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
77 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
79 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
80 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
81 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
82 | * | ||
83 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
84 | * Unix names RESETHAND and NODEFER respectively. | ||
85 | */ | ||
86 | #define SA_NOCLDSTOP 0x00000001 | ||
87 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
88 | #define SA_SIGINFO 0x00000004 | ||
89 | #define SA_ONSTACK 0x08000000 | ||
90 | #define SA_RESTART 0x10000000 | ||
91 | #define SA_NODEFER 0x40000000 | ||
92 | #define SA_RESETHAND 0x80000000 | ||
93 | |||
94 | #define SA_NOMASK SA_NODEFER | ||
95 | #define SA_ONESHOT SA_RESETHAND | ||
96 | |||
97 | #define SA_RESTORER 0x04000000 | ||
98 | |||
99 | /* | ||
100 | * sigaltstack controls | ||
101 | */ | ||
102 | #define SS_ONSTACK 1 | ||
103 | #define SS_DISABLE 2 | ||
104 | |||
105 | #define MINSIGSTKSZ 2048 | ||
106 | #define SIGSTKSZ 8192 | ||
107 | |||
108 | #include <asm-generic/signal.h> | ||
109 | |||
110 | #ifdef __KERNEL__ | ||
111 | struct old_sigaction { | ||
112 | __sighandler_t sa_handler; | ||
113 | old_sigset_t sa_mask; | ||
114 | unsigned long sa_flags; | ||
115 | void (*sa_restorer)(void); | ||
116 | }; | ||
117 | |||
118 | struct sigaction { | ||
119 | __sighandler_t sa_handler; | ||
120 | unsigned long sa_flags; | ||
121 | void (*sa_restorer)(void); | ||
122 | sigset_t sa_mask; /* mask last for extensibility */ | ||
123 | }; | ||
124 | |||
125 | struct k_sigaction { | ||
126 | struct sigaction sa; | ||
127 | }; | ||
128 | #else | ||
129 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
130 | |||
131 | struct sigaction { | ||
132 | union { | ||
133 | __sighandler_t _sa_handler; | ||
134 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
135 | } _u; | ||
136 | sigset_t sa_mask; | ||
137 | unsigned long sa_flags; | ||
138 | void (*sa_restorer)(void); | ||
139 | }; | ||
140 | |||
141 | #define sa_handler _u._sa_handler | ||
142 | #define sa_sigaction _u._sa_sigaction | ||
143 | |||
144 | #endif /* __KERNEL__ */ | ||
145 | |||
146 | typedef struct sigaltstack { | ||
147 | void *ss_sp; | ||
148 | int ss_flags; | ||
149 | size_t ss_size; | ||
150 | } stack_t; | ||
151 | |||
152 | #ifdef __KERNEL__ | ||
153 | |||
154 | #include <asm/sigcontext.h> | ||
155 | #undef __HAVE_ARCH_SIG_BITOPS | ||
156 | |||
157 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
158 | |||
159 | #endif /* __KERNEL__ */ | ||
160 | |||
161 | #endif /* _H8300_SIGNAL_H */ | ||
diff --git a/include/asm-h8300/smp.h b/include/asm-h8300/smp.h deleted file mode 100644 index 9e9bd7e58922..000000000000 --- a/include/asm-h8300/smp.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* nothing required here yet */ | ||
diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h deleted file mode 100644 index da2520dbf254..000000000000 --- a/include/asm-h8300/socket.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | #ifndef _ASM_SOCKET_H | ||
2 | #define _ASM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockoptions(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | /* To add :#define SO_REUSEPORT 15 */ | ||
26 | #define SO_PASSCRED 16 | ||
27 | #define SO_PEERCRED 17 | ||
28 | #define SO_RCVLOWAT 18 | ||
29 | #define SO_SNDLOWAT 19 | ||
30 | #define SO_RCVTIMEO 20 | ||
31 | #define SO_SNDTIMEO 21 | ||
32 | |||
33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
37 | |||
38 | #define SO_BINDTODEVICE 25 | ||
39 | |||
40 | /* Socket filtering */ | ||
41 | #define SO_ATTACH_FILTER 26 | ||
42 | #define SO_DETACH_FILTER 27 | ||
43 | |||
44 | #define SO_PEERNAME 28 | ||
45 | #define SO_TIMESTAMP 29 | ||
46 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
47 | |||
48 | #define SO_ACCEPTCONN 30 | ||
49 | |||
50 | #define SO_PEERSEC 31 | ||
51 | #define SO_PASSSEC 34 | ||
52 | #define SO_TIMESTAMPNS 35 | ||
53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
54 | |||
55 | #define SO_MARK 36 | ||
56 | |||
57 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/include/asm-h8300/sockios.h b/include/asm-h8300/sockios.h deleted file mode 100644 index e9c7ec810c23..000000000000 --- a/include/asm-h8300/sockios.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_SOCKIOS__ | ||
2 | #define __ARCH_H8300_SOCKIOS__ | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif /* __ARCH_H8300_SOCKIOS__ */ | ||
diff --git a/include/asm-h8300/spinlock.h b/include/asm-h8300/spinlock.h deleted file mode 100644 index d5407fa173e4..000000000000 --- a/include/asm-h8300/spinlock.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __H8300_SPINLOCK_H | ||
2 | #define __H8300_SPINLOCK_H | ||
3 | |||
4 | #error "H8/300 doesn't do SMP yet" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-h8300/stat.h b/include/asm-h8300/stat.h deleted file mode 100644 index 62c3cc24dfe6..000000000000 --- a/include/asm-h8300/stat.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #ifndef _H8300_STAT_H | ||
2 | #define _H8300_STAT_H | ||
3 | |||
4 | struct __old_kernel_stat { | ||
5 | unsigned short st_dev; | ||
6 | unsigned short st_ino; | ||
7 | unsigned short st_mode; | ||
8 | unsigned short st_nlink; | ||
9 | unsigned short st_uid; | ||
10 | unsigned short st_gid; | ||
11 | unsigned short st_rdev; | ||
12 | unsigned long st_size; | ||
13 | unsigned long st_atime; | ||
14 | unsigned long st_mtime; | ||
15 | unsigned long st_ctime; | ||
16 | }; | ||
17 | |||
18 | struct stat { | ||
19 | unsigned short st_dev; | ||
20 | unsigned short __pad1; | ||
21 | unsigned long st_ino; | ||
22 | unsigned short st_mode; | ||
23 | unsigned short st_nlink; | ||
24 | unsigned short st_uid; | ||
25 | unsigned short st_gid; | ||
26 | unsigned short st_rdev; | ||
27 | unsigned short __pad2; | ||
28 | unsigned long st_size; | ||
29 | unsigned long st_blksize; | ||
30 | unsigned long st_blocks; | ||
31 | unsigned long st_atime; | ||
32 | unsigned long __unused1; | ||
33 | unsigned long st_mtime; | ||
34 | unsigned long __unused2; | ||
35 | unsigned long st_ctime; | ||
36 | unsigned long __unused3; | ||
37 | unsigned long __unused4; | ||
38 | unsigned long __unused5; | ||
39 | }; | ||
40 | |||
41 | /* This matches struct stat64 in glibc2.1, hence the absolutely | ||
42 | * insane amounts of padding around dev_t's. | ||
43 | */ | ||
44 | struct stat64 { | ||
45 | unsigned long long st_dev; | ||
46 | unsigned char __pad1[2]; | ||
47 | |||
48 | #define STAT64_HAS_BROKEN_ST_INO 1 | ||
49 | unsigned long __st_ino; | ||
50 | |||
51 | unsigned int st_mode; | ||
52 | unsigned int st_nlink; | ||
53 | |||
54 | unsigned long st_uid; | ||
55 | unsigned long st_gid; | ||
56 | |||
57 | unsigned long long st_rdev; | ||
58 | unsigned char __pad3[2]; | ||
59 | |||
60 | long long st_size; | ||
61 | unsigned long st_blksize; | ||
62 | |||
63 | unsigned long __pad4; /* future possible st_blocks high bits */ | ||
64 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
65 | |||
66 | unsigned long st_atime; | ||
67 | unsigned long st_atime_nsec; | ||
68 | |||
69 | unsigned long st_mtime; | ||
70 | unsigned long st_mtime_nsec; | ||
71 | |||
72 | unsigned long st_ctime; | ||
73 | unsigned long st_ctime_nsec; | ||
74 | |||
75 | unsigned long long st_ino; | ||
76 | }; | ||
77 | |||
78 | #endif /* _H8300_STAT_H */ | ||
diff --git a/include/asm-h8300/statfs.h b/include/asm-h8300/statfs.h deleted file mode 100644 index b96efa712aac..000000000000 --- a/include/asm-h8300/statfs.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _H8300_STATFS_H | ||
2 | #define _H8300_STATFS_H | ||
3 | |||
4 | #include <asm-generic/statfs.h> | ||
5 | |||
6 | #endif /* _H8300_STATFS_H */ | ||
diff --git a/include/asm-h8300/string.h b/include/asm-h8300/string.h deleted file mode 100644 index ca5034897d87..000000000000 --- a/include/asm-h8300/string.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _H8300_STRING_H_ | ||
2 | #define _H8300_STRING_H_ | ||
3 | |||
4 | #ifdef __KERNEL__ /* only set these up for kernel code */ | ||
5 | |||
6 | #include <asm/setup.h> | ||
7 | #include <asm/page.h> | ||
8 | |||
9 | #define __HAVE_ARCH_MEMSET | ||
10 | extern void * memset(void * s, int c, size_t count); | ||
11 | |||
12 | #define __HAVE_ARCH_MEMCPY | ||
13 | extern void * memcpy(void *d, const void *s, size_t count); | ||
14 | |||
15 | #else /* KERNEL */ | ||
16 | |||
17 | /* | ||
18 | * let user libraries deal with these, | ||
19 | * IMHO the kernel has no place defining these functions for user apps | ||
20 | */ | ||
21 | |||
22 | #define __HAVE_ARCH_STRCPY 1 | ||
23 | #define __HAVE_ARCH_STRNCPY 1 | ||
24 | #define __HAVE_ARCH_STRCAT 1 | ||
25 | #define __HAVE_ARCH_STRNCAT 1 | ||
26 | #define __HAVE_ARCH_STRCMP 1 | ||
27 | #define __HAVE_ARCH_STRNCMP 1 | ||
28 | #define __HAVE_ARCH_STRNICMP 1 | ||
29 | #define __HAVE_ARCH_STRCHR 1 | ||
30 | #define __HAVE_ARCH_STRRCHR 1 | ||
31 | #define __HAVE_ARCH_STRSTR 1 | ||
32 | #define __HAVE_ARCH_STRLEN 1 | ||
33 | #define __HAVE_ARCH_STRNLEN 1 | ||
34 | #define __HAVE_ARCH_MEMSET 1 | ||
35 | #define __HAVE_ARCH_MEMCPY 1 | ||
36 | #define __HAVE_ARCH_MEMMOVE 1 | ||
37 | #define __HAVE_ARCH_MEMSCAN 1 | ||
38 | #define __HAVE_ARCH_MEMCMP 1 | ||
39 | #define __HAVE_ARCH_MEMCHR 1 | ||
40 | #define __HAVE_ARCH_STRTOK 1 | ||
41 | |||
42 | #endif /* KERNEL */ | ||
43 | |||
44 | #endif /* _M68K_STRING_H_ */ | ||
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h deleted file mode 100644 index 4b8e475908ae..000000000000 --- a/include/asm-h8300/system.h +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | #ifndef _H8300_SYSTEM_H | ||
2 | #define _H8300_SYSTEM_H | ||
3 | |||
4 | #include <linux/linkage.h> | ||
5 | |||
6 | /* | ||
7 | * switch_to(n) should switch tasks to task ptr, first checking that | ||
8 | * ptr isn't the current task, in which case it does nothing. This | ||
9 | * also clears the TS-flag if the task we switched to has used the | ||
10 | * math co-processor latest. | ||
11 | */ | ||
12 | /* | ||
13 | * switch_to() saves the extra registers, that are not saved | ||
14 | * automatically by SAVE_SWITCH_STACK in resume(), ie. d0-d5 and | ||
15 | * a0-a1. Some of these are used by schedule() and its predecessors | ||
16 | * and so we might get see unexpected behaviors when a task returns | ||
17 | * with unexpected register values. | ||
18 | * | ||
19 | * syscall stores these registers itself and none of them are used | ||
20 | * by syscall after the function in the syscall has been called. | ||
21 | * | ||
22 | * Beware that resume now expects *next to be in d1 and the offset of | ||
23 | * tss to be in a1. This saves a few instructions as we no longer have | ||
24 | * to push them onto the stack and read them back right after. | ||
25 | * | ||
26 | * 02/17/96 - Jes Sorensen (jds@kom.auc.dk) | ||
27 | * | ||
28 | * Changed 96/09/19 by Andreas Schwab | ||
29 | * pass prev in a0, next in a1, offset of tss in d1, and whether | ||
30 | * the mm structures are shared in d2 (to avoid atc flushing). | ||
31 | * | ||
32 | * H8/300 Porting 2002/09/04 Yoshinori Sato | ||
33 | */ | ||
34 | |||
35 | asmlinkage void resume(void); | ||
36 | #define switch_to(prev,next,last) { \ | ||
37 | void *_last; \ | ||
38 | __asm__ __volatile__( \ | ||
39 | "mov.l %1, er0\n\t" \ | ||
40 | "mov.l %2, er1\n\t" \ | ||
41 | "mov.l %3, er2\n\t" \ | ||
42 | "jsr @_resume\n\t" \ | ||
43 | "mov.l er2,%0\n\t" \ | ||
44 | : "=r" (_last) \ | ||
45 | : "r" (&(prev->thread)), \ | ||
46 | "r" (&(next->thread)), \ | ||
47 | "g" (prev) \ | ||
48 | : "cc", "er0", "er1", "er2", "er3"); \ | ||
49 | (last) = _last; \ | ||
50 | } | ||
51 | |||
52 | #define __sti() asm volatile ("andc #0x7f,ccr") | ||
53 | #define __cli() asm volatile ("orc #0x80,ccr") | ||
54 | |||
55 | #define __save_flags(x) \ | ||
56 | asm volatile ("stc ccr,%w0":"=r" (x)) | ||
57 | |||
58 | #define __restore_flags(x) \ | ||
59 | asm volatile ("ldc %w0,ccr": :"r" (x)) | ||
60 | |||
61 | #define irqs_disabled() \ | ||
62 | ({ \ | ||
63 | unsigned char flags; \ | ||
64 | __save_flags(flags); \ | ||
65 | ((flags & 0x80) == 0x80); \ | ||
66 | }) | ||
67 | |||
68 | #define iret() __asm__ __volatile__ ("rte": : :"memory", "sp", "cc") | ||
69 | |||
70 | /* For spinlocks etc */ | ||
71 | #define local_irq_disable() __cli() | ||
72 | #define local_irq_enable() __sti() | ||
73 | #define local_irq_save(x) ({ __save_flags(x); local_irq_disable(); }) | ||
74 | #define local_irq_restore(x) __restore_flags(x) | ||
75 | #define local_save_flags(x) __save_flags(x) | ||
76 | |||
77 | /* | ||
78 | * Force strict CPU ordering. | ||
79 | * Not really required on H8... | ||
80 | */ | ||
81 | #define nop() asm volatile ("nop"::) | ||
82 | #define mb() asm volatile ("" : : :"memory") | ||
83 | #define rmb() asm volatile ("" : : :"memory") | ||
84 | #define wmb() asm volatile ("" : : :"memory") | ||
85 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | ||
86 | |||
87 | #ifdef CONFIG_SMP | ||
88 | #define smp_mb() mb() | ||
89 | #define smp_rmb() rmb() | ||
90 | #define smp_wmb() wmb() | ||
91 | #define smp_read_barrier_depends() read_barrier_depends() | ||
92 | #else | ||
93 | #define smp_mb() barrier() | ||
94 | #define smp_rmb() barrier() | ||
95 | #define smp_wmb() barrier() | ||
96 | #define smp_read_barrier_depends() do { } while(0) | ||
97 | #endif | ||
98 | |||
99 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | ||
100 | |||
101 | struct __xchg_dummy { unsigned long a[100]; }; | ||
102 | #define __xg(x) ((volatile struct __xchg_dummy *)(x)) | ||
103 | |||
104 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) | ||
105 | { | ||
106 | unsigned long tmp, flags; | ||
107 | |||
108 | local_irq_save(flags); | ||
109 | |||
110 | switch (size) { | ||
111 | case 1: | ||
112 | __asm__ __volatile__ | ||
113 | ("mov.b %2,%0\n\t" | ||
114 | "mov.b %1,%2" | ||
115 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
116 | break; | ||
117 | case 2: | ||
118 | __asm__ __volatile__ | ||
119 | ("mov.w %2,%0\n\t" | ||
120 | "mov.w %1,%2" | ||
121 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
122 | break; | ||
123 | case 4: | ||
124 | __asm__ __volatile__ | ||
125 | ("mov.l %2,%0\n\t" | ||
126 | "mov.l %1,%2" | ||
127 | : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory"); | ||
128 | break; | ||
129 | default: | ||
130 | tmp = 0; | ||
131 | } | ||
132 | local_irq_restore(flags); | ||
133 | return tmp; | ||
134 | } | ||
135 | |||
136 | #define HARD_RESET_NOW() ({ \ | ||
137 | local_irq_disable(); \ | ||
138 | asm("jmp @@0"); \ | ||
139 | }) | ||
140 | |||
141 | #include <asm-generic/cmpxchg-local.h> | ||
142 | |||
143 | /* | ||
144 | * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make | ||
145 | * them available. | ||
146 | */ | ||
147 | #define cmpxchg_local(ptr, o, n) \ | ||
148 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
149 | (unsigned long)(n), sizeof(*(ptr)))) | ||
150 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
151 | |||
152 | #ifndef CONFIG_SMP | ||
153 | #include <asm-generic/cmpxchg.h> | ||
154 | #endif | ||
155 | |||
156 | #define arch_align_stack(x) (x) | ||
157 | |||
158 | #endif /* _H8300_SYSTEM_H */ | ||
diff --git a/include/asm-h8300/target_time.h b/include/asm-h8300/target_time.h deleted file mode 100644 index 9f2a9aa1fe6f..000000000000 --- a/include/asm-h8300/target_time.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | extern int platform_timer_setup(void (*timer_int)(int, void *, struct pt_regs *)); | ||
2 | extern void platform_timer_eoi(void); | ||
3 | extern void platform_gettod(unsigned int *year, unsigned int *mon, unsigned int *day, | ||
4 | unsigned int *hour, unsigned int *min, unsigned int *sec); | ||
diff --git a/include/asm-h8300/termbits.h b/include/asm-h8300/termbits.h deleted file mode 100644 index 31eca81db3f7..000000000000 --- a/include/asm-h8300/termbits.h +++ /dev/null | |||
@@ -1,200 +0,0 @@ | |||
1 | #ifndef __ARCH_H8300_TERMBITS_H__ | ||
2 | #define __ARCH_H8300_TERMBITS_H__ | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | typedef unsigned int tcflag_t; | ||
9 | |||
10 | #define NCCS 19 | ||
11 | struct termios { | ||
12 | tcflag_t c_iflag; /* input mode flags */ | ||
13 | tcflag_t c_oflag; /* output mode flags */ | ||
14 | tcflag_t c_cflag; /* control mode flags */ | ||
15 | tcflag_t c_lflag; /* local mode flags */ | ||
16 | cc_t c_line; /* line discipline */ | ||
17 | cc_t c_cc[NCCS]; /* control characters */ | ||
18 | }; | ||
19 | |||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
31 | struct ktermios { | ||
32 | tcflag_t c_iflag; /* input mode flags */ | ||
33 | tcflag_t c_oflag; /* output mode flags */ | ||
34 | tcflag_t c_cflag; /* control mode flags */ | ||
35 | tcflag_t c_lflag; /* local mode flags */ | ||
36 | cc_t c_line; /* line discipline */ | ||
37 | cc_t c_cc[NCCS]; /* control characters */ | ||
38 | speed_t c_ispeed; /* input speed */ | ||
39 | speed_t c_ospeed; /* output speed */ | ||
40 | }; | ||
41 | |||
42 | /* c_cc characters */ | ||
43 | #define VINTR 0 | ||
44 | #define VQUIT 1 | ||
45 | #define VERASE 2 | ||
46 | #define VKILL 3 | ||
47 | #define VEOF 4 | ||
48 | #define VTIME 5 | ||
49 | #define VMIN 6 | ||
50 | #define VSWTC 7 | ||
51 | #define VSTART 8 | ||
52 | #define VSTOP 9 | ||
53 | #define VSUSP 10 | ||
54 | #define VEOL 11 | ||
55 | #define VREPRINT 12 | ||
56 | #define VDISCARD 13 | ||
57 | #define VWERASE 14 | ||
58 | #define VLNEXT 15 | ||
59 | #define VEOL2 16 | ||
60 | |||
61 | |||
62 | /* c_iflag bits */ | ||
63 | #define IGNBRK 0000001 | ||
64 | #define BRKINT 0000002 | ||
65 | #define IGNPAR 0000004 | ||
66 | #define PARMRK 0000010 | ||
67 | #define INPCK 0000020 | ||
68 | #define ISTRIP 0000040 | ||
69 | #define INLCR 0000100 | ||
70 | #define IGNCR 0000200 | ||
71 | #define ICRNL 0000400 | ||
72 | #define IUCLC 0001000 | ||
73 | #define IXON 0002000 | ||
74 | #define IXANY 0004000 | ||
75 | #define IXOFF 0010000 | ||
76 | #define IMAXBEL 0020000 | ||
77 | #define IUTF8 0040000 | ||
78 | |||
79 | /* c_oflag bits */ | ||
80 | #define OPOST 0000001 | ||
81 | #define OLCUC 0000002 | ||
82 | #define ONLCR 0000004 | ||
83 | #define OCRNL 0000010 | ||
84 | #define ONOCR 0000020 | ||
85 | #define ONLRET 0000040 | ||
86 | #define OFILL 0000100 | ||
87 | #define OFDEL 0000200 | ||
88 | #define NLDLY 0000400 | ||
89 | #define NL0 0000000 | ||
90 | #define NL1 0000400 | ||
91 | #define CRDLY 0003000 | ||
92 | #define CR0 0000000 | ||
93 | #define CR1 0001000 | ||
94 | #define CR2 0002000 | ||
95 | #define CR3 0003000 | ||
96 | #define TABDLY 0014000 | ||
97 | #define TAB0 0000000 | ||
98 | #define TAB1 0004000 | ||
99 | #define TAB2 0010000 | ||
100 | #define TAB3 0014000 | ||
101 | #define XTABS 0014000 | ||
102 | #define BSDLY 0020000 | ||
103 | #define BS0 0000000 | ||
104 | #define BS1 0020000 | ||
105 | #define VTDLY 0040000 | ||
106 | #define VT0 0000000 | ||
107 | #define VT1 0040000 | ||
108 | #define FFDLY 0100000 | ||
109 | #define FF0 0000000 | ||
110 | #define FF1 0100000 | ||
111 | |||
112 | /* c_cflag bit meaning */ | ||
113 | #define CBAUD 0010017 | ||
114 | #define B0 0000000 /* hang up */ | ||
115 | #define B50 0000001 | ||
116 | #define B75 0000002 | ||
117 | #define B110 0000003 | ||
118 | #define B134 0000004 | ||
119 | #define B150 0000005 | ||
120 | #define B200 0000006 | ||
121 | #define B300 0000007 | ||
122 | #define B600 0000010 | ||
123 | #define B1200 0000011 | ||
124 | #define B1800 0000012 | ||
125 | #define B2400 0000013 | ||
126 | #define B4800 0000014 | ||
127 | #define B9600 0000015 | ||
128 | #define B19200 0000016 | ||
129 | #define B38400 0000017 | ||
130 | #define EXTA B19200 | ||
131 | #define EXTB B38400 | ||
132 | #define CSIZE 0000060 | ||
133 | #define CS5 0000000 | ||
134 | #define CS6 0000020 | ||
135 | #define CS7 0000040 | ||
136 | #define CS8 0000060 | ||
137 | #define CSTOPB 0000100 | ||
138 | #define CREAD 0000200 | ||
139 | #define PARENB 0000400 | ||
140 | #define PARODD 0001000 | ||
141 | #define HUPCL 0002000 | ||
142 | #define CLOCAL 0004000 | ||
143 | #define CBAUDEX 0010000 | ||
144 | #define BOTHER 0010000 | ||
145 | #define B57600 0010001 | ||
146 | #define B115200 0010002 | ||
147 | #define B230400 0010003 | ||
148 | #define B460800 0010004 | ||
149 | #define B500000 0010005 | ||
150 | #define B576000 0010006 | ||
151 | #define B921600 0010007 | ||
152 | #define B1000000 0010010 | ||
153 | #define B1152000 0010011 | ||
154 | #define B1500000 0010012 | ||
155 | #define B2000000 0010013 | ||
156 | #define B2500000 0010014 | ||
157 | #define B3000000 0010015 | ||
158 | #define B3500000 0010016 | ||
159 | #define B4000000 0010017 | ||
160 | #define CIBAUD 002003600000 /* input baud rate */ | ||
161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
162 | #define CRTSCTS 020000000000 /* flow control */ | ||
163 | |||
164 | #define IBSHIFT 16 /* shift from CBAUD to CIBAUD */ | ||
165 | |||
166 | /* c_lflag bits */ | ||
167 | #define ISIG 0000001 | ||
168 | #define ICANON 0000002 | ||
169 | #define XCASE 0000004 | ||
170 | #define ECHO 0000010 | ||
171 | #define ECHOE 0000020 | ||
172 | #define ECHOK 0000040 | ||
173 | #define ECHONL 0000100 | ||
174 | #define NOFLSH 0000200 | ||
175 | #define TOSTOP 0000400 | ||
176 | #define ECHOCTL 0001000 | ||
177 | #define ECHOPRT 0002000 | ||
178 | #define ECHOKE 0004000 | ||
179 | #define FLUSHO 0010000 | ||
180 | #define PENDIN 0040000 | ||
181 | #define IEXTEN 0100000 | ||
182 | |||
183 | |||
184 | /* tcflow() and TCXONC use these */ | ||
185 | #define TCOOFF 0 | ||
186 | #define TCOON 1 | ||
187 | #define TCIOFF 2 | ||
188 | #define TCION 3 | ||
189 | |||
190 | /* tcflush() and TCFLSH use these */ | ||
191 | #define TCIFLUSH 0 | ||
192 | #define TCOFLUSH 1 | ||
193 | #define TCIOFLUSH 2 | ||
194 | |||
195 | /* tcsetattr uses these */ | ||
196 | #define TCSANOW 0 | ||
197 | #define TCSADRAIN 1 | ||
198 | #define TCSAFLUSH 2 | ||
199 | |||
200 | #endif /* __ARCH_H8300_TERMBITS_H__ */ | ||
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h deleted file mode 100644 index 70eea64b4213..000000000000 --- a/include/asm-h8300/termios.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #ifndef _H8300_TERMIOS_H | ||
2 | #define _H8300_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | ||
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
27 | start=^Q stop=^S susp=^Z eol=\0 | ||
28 | reprint=^R discard=^U werase=^W lnext=^V | ||
29 | eol2=\0 | ||
30 | */ | ||
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
53 | |||
54 | /* | ||
55 | * Translate a "termio" structure into a "termios". Ugh. | ||
56 | */ | ||
57 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
58 | ({ \ | ||
59 | unsigned short tmp; \ | ||
60 | get_user(tmp, &(termio)->c_iflag); \ | ||
61 | (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \ | ||
62 | get_user(tmp, &(termio)->c_oflag); \ | ||
63 | (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \ | ||
64 | get_user(tmp, &(termio)->c_cflag); \ | ||
65 | (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \ | ||
66 | get_user(tmp, &(termio)->c_lflag); \ | ||
67 | (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \ | ||
68 | get_user((termios)->c_line, &(termio)->c_line); \ | ||
69 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
70 | }) | ||
71 | |||
72 | /* | ||
73 | * Translate a "termios" structure into a "termio". Ugh. | ||
74 | */ | ||
75 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
76 | ({ \ | ||
77 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
78 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
79 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
80 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
81 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
83 | }) | ||
84 | |||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
89 | |||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #endif /* _H8300_TERMIOS_H */ | ||
diff --git a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h deleted file mode 100644 index aafd4d322ec3..000000000000 --- a/include/asm-h8300/thread_info.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* thread_info.h: h8300 low-level thread information | ||
2 | * adapted from the i386 and PPC versions by Yoshinori Sato <ysato@users.sourceforge.jp> | ||
3 | * | ||
4 | * Copyright (C) 2002 David Howells (dhowells@redhat.com) | ||
5 | * - Incorporating suggestions made by Linus Torvalds and Dave Miller | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_THREAD_INFO_H | ||
9 | #define _ASM_THREAD_INFO_H | ||
10 | |||
11 | #include <asm/page.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | /* | ||
18 | * low level task data. | ||
19 | * If you change this, change the TI_* offsets below to match. | ||
20 | */ | ||
21 | struct thread_info { | ||
22 | struct task_struct *task; /* main task structure */ | ||
23 | struct exec_domain *exec_domain; /* execution domain */ | ||
24 | unsigned long flags; /* low level flags */ | ||
25 | int cpu; /* cpu we're on */ | ||
26 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | ||
27 | struct restart_block restart_block; | ||
28 | }; | ||
29 | |||
30 | /* | ||
31 | * macros/functions for gaining access to the thread information structure | ||
32 | */ | ||
33 | #define INIT_THREAD_INFO(tsk) \ | ||
34 | { \ | ||
35 | .task = &tsk, \ | ||
36 | .exec_domain = &default_exec_domain, \ | ||
37 | .flags = 0, \ | ||
38 | .cpu = 0, \ | ||
39 | .preempt_count = 1, \ | ||
40 | .restart_block = { \ | ||
41 | .fn = do_no_restart_syscall, \ | ||
42 | }, \ | ||
43 | } | ||
44 | |||
45 | #define init_thread_info (init_thread_union.thread_info) | ||
46 | #define init_stack (init_thread_union.stack) | ||
47 | |||
48 | |||
49 | /* | ||
50 | * Size of kernel stack for each process. This must be a power of 2... | ||
51 | */ | ||
52 | #define THREAD_SIZE_ORDER 1 | ||
53 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
54 | |||
55 | |||
56 | /* how to get the thread information struct from C */ | ||
57 | static inline struct thread_info *current_thread_info(void) | ||
58 | { | ||
59 | struct thread_info *ti; | ||
60 | __asm__( | ||
61 | "mov.l sp, %0 \n\t" | ||
62 | "and.l %1, %0" | ||
63 | : "=&r"(ti) | ||
64 | : "i" (~(THREAD_SIZE-1)) | ||
65 | ); | ||
66 | return ti; | ||
67 | } | ||
68 | |||
69 | #endif /* __ASSEMBLY__ */ | ||
70 | |||
71 | /* | ||
72 | * Offsets in thread_info structure, used in assembly code | ||
73 | */ | ||
74 | #define TI_TASK 0 | ||
75 | #define TI_EXECDOMAIN 4 | ||
76 | #define TI_FLAGS 8 | ||
77 | #define TI_CPU 12 | ||
78 | #define TI_PRE_COUNT 16 | ||
79 | |||
80 | #define PREEMPT_ACTIVE 0x4000000 | ||
81 | |||
82 | /* | ||
83 | * thread information flag bit numbers | ||
84 | */ | ||
85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | ||
86 | #define TIF_SIGPENDING 1 /* signal pending */ | ||
87 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | ||
88 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling | ||
89 | TIF_NEED_RESCHED */ | ||
90 | #define TIF_MEMDIE 4 | ||
91 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | ||
92 | |||
93 | /* as above, but as bit values */ | ||
94 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | ||
95 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | ||
96 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | ||
97 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
98 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
99 | |||
100 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | ||
101 | |||
102 | #endif /* __KERNEL__ */ | ||
103 | |||
104 | #endif /* _ASM_THREAD_INFO_H */ | ||
diff --git a/include/asm-h8300/timex.h b/include/asm-h8300/timex.h deleted file mode 100644 index 23e67013439f..000000000000 --- a/include/asm-h8300/timex.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-h8300/timex.h | ||
3 | * | ||
4 | * H8/300 architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASM_H8300_TIMEX_H | ||
7 | #define _ASM_H8300_TIMEX_H | ||
8 | |||
9 | #define CLOCK_TICK_RATE (CONFIG_CPU_CLOCK*1000/8192) /* Timer input freq. */ | ||
10 | |||
11 | typedef unsigned long cycles_t; | ||
12 | extern short h8300_timer_count; | ||
13 | |||
14 | static inline cycles_t get_cycles(void) | ||
15 | { | ||
16 | return 0; | ||
17 | } | ||
18 | |||
19 | #endif | ||
diff --git a/include/asm-h8300/tlb.h b/include/asm-h8300/tlb.h deleted file mode 100644 index 3dea80ad9e6f..000000000000 --- a/include/asm-h8300/tlb.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | include/asm-h8300/tlb.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __H8300_TLB_H__ | ||
6 | #define __H8300_TLB_H__ | ||
7 | |||
8 | #define tlb_flush(tlb) do { } while(0) | ||
9 | |||
10 | /* | ||
11 | include/asm-h8300/tlb.h | ||
12 | */ | ||
13 | |||
14 | #ifndef __H8300_TLB_H__ | ||
15 | #define __H8300_TLB_H__ | ||
16 | |||
17 | #define tlb_flush(tlb) do { } while(0) | ||
18 | |||
19 | #include <asm-generic/tlb.h> | ||
20 | |||
21 | #endif | ||
22 | |||
23 | #endif | ||
diff --git a/include/asm-h8300/tlbflush.h b/include/asm-h8300/tlbflush.h deleted file mode 100644 index 41c148a9208e..000000000000 --- a/include/asm-h8300/tlbflush.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #ifndef _H8300_TLBFLUSH_H | ||
2 | #define _H8300_TLBFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2000 Lineo, David McCullough <davidm@uclinux.org> | ||
6 | * Copyright (C) 2000-2002, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | #include <asm/setup.h> | ||
10 | |||
11 | /* | ||
12 | * flush all user-space atc entries. | ||
13 | */ | ||
14 | static inline void __flush_tlb(void) | ||
15 | { | ||
16 | BUG(); | ||
17 | } | ||
18 | |||
19 | static inline void __flush_tlb_one(unsigned long addr) | ||
20 | { | ||
21 | BUG(); | ||
22 | } | ||
23 | |||
24 | #define flush_tlb() __flush_tlb() | ||
25 | |||
26 | /* | ||
27 | * flush all atc entries (both kernel and user-space entries). | ||
28 | */ | ||
29 | static inline void flush_tlb_all(void) | ||
30 | { | ||
31 | BUG(); | ||
32 | } | ||
33 | |||
34 | static inline void flush_tlb_mm(struct mm_struct *mm) | ||
35 | { | ||
36 | BUG(); | ||
37 | } | ||
38 | |||
39 | static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | ||
40 | { | ||
41 | BUG(); | ||
42 | } | ||
43 | |||
44 | static inline void flush_tlb_range(struct mm_struct *mm, | ||
45 | unsigned long start, unsigned long end) | ||
46 | { | ||
47 | BUG(); | ||
48 | } | ||
49 | |||
50 | static inline void flush_tlb_kernel_page(unsigned long addr) | ||
51 | { | ||
52 | BUG(); | ||
53 | } | ||
54 | |||
55 | #endif /* _H8300_TLBFLUSH_H */ | ||
diff --git a/include/asm-h8300/topology.h b/include/asm-h8300/topology.h deleted file mode 100644 index fdc121924d4c..000000000000 --- a/include/asm-h8300/topology.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_TOPOLOGY_H | ||
2 | #define _ASM_H8300_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | ||
5 | |||
6 | #endif /* _ASM_H8300_TOPOLOGY_H */ | ||
diff --git a/include/asm-h8300/traps.h b/include/asm-h8300/traps.h deleted file mode 100644 index 41cf6be02f68..000000000000 --- a/include/asm-h8300/traps.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-h8300/traps.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Yoshinori Sato <ysato@users.sourceforge.jp> | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #ifndef _H8300_TRAPS_H | ||
12 | #define _H8300_TRAPS_H | ||
13 | |||
14 | extern void system_call(void); | ||
15 | extern void interrupt_entry(void); | ||
16 | extern void trace_break(void); | ||
17 | |||
18 | #define JMP_OP 0x5a000000 | ||
19 | #define JSR_OP 0x5e000000 | ||
20 | #define VECTOR(address) ((JMP_OP)|((unsigned long)address)) | ||
21 | #define REDIRECT(address) ((JSR_OP)|((unsigned long)address)) | ||
22 | |||
23 | #define TRACE_VEC 5 | ||
24 | |||
25 | #define TRAP0_VEC 8 | ||
26 | #define TRAP1_VEC 9 | ||
27 | #define TRAP2_VEC 10 | ||
28 | #define TRAP3_VEC 11 | ||
29 | |||
30 | #if defined(__H8300H__) | ||
31 | #define NR_TRAPS 12 | ||
32 | #endif | ||
33 | #if defined(__H8300S__) | ||
34 | #define NR_TRAPS 16 | ||
35 | #endif | ||
36 | |||
37 | #endif /* _H8300_TRAPS_H */ | ||
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h deleted file mode 100644 index 12875190b156..000000000000 --- a/include/asm-h8300/types.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _H8300_TYPES_H | ||
2 | #define _H8300_TYPES_H | ||
3 | |||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
6 | #if !defined(__ASSEMBLY__) | ||
7 | |||
8 | /* | ||
9 | * This file is never included by application software unless | ||
10 | * explicitly requested (e.g., via linux/types.h) in which case the | ||
11 | * application is Linux specific so (user-) name space pollution is | ||
12 | * not a major issue. However, for interoperability, libraries still | ||
13 | * need to be careful to avoid a name clashes. | ||
14 | */ | ||
15 | |||
16 | typedef unsigned short umode_t; | ||
17 | |||
18 | /* | ||
19 | * These aren't exported outside the kernel to avoid name space clashes | ||
20 | */ | ||
21 | #ifdef __KERNEL__ | ||
22 | |||
23 | #define BITS_PER_LONG 32 | ||
24 | |||
25 | /* Dma addresses are 32-bits wide. */ | ||
26 | |||
27 | typedef u32 dma_addr_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #endif /* __ASSEMBLY__ */ | ||
32 | |||
33 | #endif /* _H8300_TYPES_H */ | ||
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h deleted file mode 100644 index 356068cd0879..000000000000 --- a/include/asm-h8300/uaccess.h +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | #ifndef __H8300_UACCESS_H | ||
2 | #define __H8300_UACCESS_H | ||
3 | |||
4 | /* | ||
5 | * User space memory access functions | ||
6 | */ | ||
7 | #include <linux/sched.h> | ||
8 | #include <linux/mm.h> | ||
9 | #include <linux/string.h> | ||
10 | |||
11 | #include <asm/segment.h> | ||
12 | |||
13 | #define VERIFY_READ 0 | ||
14 | #define VERIFY_WRITE 1 | ||
15 | |||
16 | /* We let the MMU do all checking */ | ||
17 | #define access_ok(type, addr, size) __access_ok((unsigned long)addr,size) | ||
18 | static inline int __access_ok(unsigned long addr, unsigned long size) | ||
19 | { | ||
20 | #define RANGE_CHECK_OK(addr, size, lower, upper) \ | ||
21 | (((addr) >= (lower)) && (((addr) + (size)) < (upper))) | ||
22 | |||
23 | extern unsigned long _ramend; | ||
24 | return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend)); | ||
25 | } | ||
26 | |||
27 | /* | ||
28 | * The exception table consists of pairs of addresses: the first is the | ||
29 | * address of an instruction that is allowed to fault, and the second is | ||
30 | * the address at which the program should continue. No registers are | ||
31 | * modified, so it is entirely up to the continuation code to figure out | ||
32 | * what to do. | ||
33 | * | ||
34 | * All the routines below use bits of fixup code that are out of line | ||
35 | * with the main instruction path. This means when everything is well, | ||
36 | * we don't even have to jump over them. Further, they do not intrude | ||
37 | * on our cache or tlb entries. | ||
38 | */ | ||
39 | |||
40 | struct exception_table_entry | ||
41 | { | ||
42 | unsigned long insn, fixup; | ||
43 | }; | ||
44 | |||
45 | /* Returns 0 if exception not found and fixup otherwise. */ | ||
46 | extern unsigned long search_exception_table(unsigned long); | ||
47 | |||
48 | |||
49 | /* | ||
50 | * These are the main single-value transfer routines. They automatically | ||
51 | * use the right size if we just have the right pointer type. | ||
52 | */ | ||
53 | |||
54 | #define put_user(x, ptr) \ | ||
55 | ({ \ | ||
56 | int __pu_err = 0; \ | ||
57 | typeof(*(ptr)) __pu_val = (x); \ | ||
58 | switch (sizeof (*(ptr))) { \ | ||
59 | case 1: \ | ||
60 | case 2: \ | ||
61 | case 4: \ | ||
62 | *(ptr) = (__pu_val); \ | ||
63 | break; \ | ||
64 | case 8: \ | ||
65 | memcpy(ptr, &__pu_val, sizeof (*(ptr))); \ | ||
66 | break; \ | ||
67 | default: \ | ||
68 | __pu_err = __put_user_bad(); \ | ||
69 | break; \ | ||
70 | } \ | ||
71 | __pu_err; \ | ||
72 | }) | ||
73 | #define __put_user(x, ptr) put_user(x, ptr) | ||
74 | |||
75 | extern int __put_user_bad(void); | ||
76 | |||
77 | /* | ||
78 | * Tell gcc we read from memory instead of writing: this is because | ||
79 | * we do not write to any memory gcc knows about, so there are no | ||
80 | * aliasing issues. | ||
81 | */ | ||
82 | |||
83 | #define __ptr(x) ((unsigned long *)(x)) | ||
84 | |||
85 | /* | ||
86 | * Tell gcc we read from memory instead of writing: this is because | ||
87 | * we do not write to any memory gcc knows about, so there are no | ||
88 | * aliasing issues. | ||
89 | */ | ||
90 | |||
91 | #define get_user(x, ptr) \ | ||
92 | ({ \ | ||
93 | int __gu_err = 0; \ | ||
94 | typeof(*(ptr)) __gu_val = *ptr; \ | ||
95 | switch (sizeof(*(ptr))) { \ | ||
96 | case 1: \ | ||
97 | case 2: \ | ||
98 | case 4: \ | ||
99 | case 8: \ | ||
100 | break; \ | ||
101 | default: \ | ||
102 | __gu_err = __get_user_bad(); \ | ||
103 | __gu_val = 0; \ | ||
104 | break; \ | ||
105 | } \ | ||
106 | (x) = __gu_val; \ | ||
107 | __gu_err; \ | ||
108 | }) | ||
109 | #define __get_user(x, ptr) get_user(x, ptr) | ||
110 | |||
111 | extern int __get_user_bad(void); | ||
112 | |||
113 | #define copy_from_user(to, from, n) (memcpy(to, from, n), 0) | ||
114 | #define copy_to_user(to, from, n) (memcpy(to, from, n), 0) | ||
115 | |||
116 | #define __copy_from_user(to, from, n) copy_from_user(to, from, n) | ||
117 | #define __copy_to_user(to, from, n) copy_to_user(to, from, n) | ||
118 | #define __copy_to_user_inatomic __copy_to_user | ||
119 | #define __copy_from_user_inatomic __copy_from_user | ||
120 | |||
121 | #define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) | ||
122 | |||
123 | #define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; }) | ||
124 | |||
125 | /* | ||
126 | * Copy a null terminated string from userspace. | ||
127 | */ | ||
128 | |||
129 | static inline long | ||
130 | strncpy_from_user(char *dst, const char *src, long count) | ||
131 | { | ||
132 | char *tmp; | ||
133 | strncpy(dst, src, count); | ||
134 | for (tmp = dst; *tmp && count > 0; tmp++, count--) | ||
135 | ; | ||
136 | return(tmp - dst); /* DAVIDM should we count a NUL ? check getname */ | ||
137 | } | ||
138 | |||
139 | /* | ||
140 | * Return the size of a string (including the ending 0) | ||
141 | * | ||
142 | * Return 0 on exception, a value greater than N if too long | ||
143 | */ | ||
144 | static inline long strnlen_user(const char *src, long n) | ||
145 | { | ||
146 | return(strlen(src) + 1); /* DAVIDM make safer */ | ||
147 | } | ||
148 | |||
149 | #define strlen_user(str) strnlen_user(str, 32767) | ||
150 | |||
151 | /* | ||
152 | * Zero Userspace | ||
153 | */ | ||
154 | |||
155 | static inline unsigned long | ||
156 | clear_user(void *to, unsigned long n) | ||
157 | { | ||
158 | memset(to, 0, n); | ||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | #endif /* _H8300_UACCESS_H */ | ||
diff --git a/include/asm-h8300/ucontext.h b/include/asm-h8300/ucontext.h deleted file mode 100644 index 0bcf8f85fab9..000000000000 --- a/include/asm-h8300/ucontext.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _H8300_UCONTEXT_H | ||
2 | #define _H8300_UCONTEXT_H | ||
3 | |||
4 | struct ucontext { | ||
5 | unsigned long uc_flags; | ||
6 | struct ucontext *uc_link; | ||
7 | stack_t uc_stack; | ||
8 | struct sigcontext uc_mcontext; | ||
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h deleted file mode 100644 index b8d06c70c2da..000000000000 --- a/include/asm-h8300/unaligned.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_UNALIGNED_H | ||
2 | #define _ASM_H8300_UNALIGNED_H | ||
3 | |||
4 | #include <linux/unaligned/be_memmove.h> | ||
5 | #include <linux/unaligned/le_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
7 | |||
8 | #define get_unaligned __get_unaligned_be | ||
9 | #define put_unaligned __put_unaligned_be | ||
10 | |||
11 | #endif /* _ASM_H8300_UNALIGNED_H */ | ||
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h deleted file mode 100644 index 99f3c3561ecb..000000000000 --- a/include/asm-h8300/unistd.h +++ /dev/null | |||
@@ -1,364 +0,0 @@ | |||
1 | #ifndef _ASM_H8300_UNISTD_H_ | ||
2 | #define _ASM_H8300_UNISTD_H_ | ||
3 | |||
4 | /* | ||
5 | * This file contains the system call numbers. | ||
6 | */ | ||
7 | |||
8 | #define __NR_restart_syscall 0 | ||
9 | #define __NR_exit 1 | ||
10 | #define __NR_fork 2 | ||
11 | #define __NR_read 3 | ||
12 | #define __NR_write 4 | ||
13 | #define __NR_open 5 | ||
14 | #define __NR_close 6 | ||
15 | #define __NR_waitpid 7 | ||
16 | #define __NR_creat 8 | ||
17 | #define __NR_link 9 | ||
18 | #define __NR_unlink 10 | ||
19 | #define __NR_execve 11 | ||
20 | #define __NR_chdir 12 | ||
21 | #define __NR_time 13 | ||
22 | #define __NR_mknod 14 | ||
23 | #define __NR_chmod 15 | ||
24 | #define __NR_lchown 16 | ||
25 | #define __NR_break 17 | ||
26 | #define __NR_oldstat 18 | ||
27 | #define __NR_lseek 19 | ||
28 | #define __NR_getpid 20 | ||
29 | #define __NR_mount 21 | ||
30 | #define __NR_umount 22 | ||
31 | #define __NR_setuid 23 | ||
32 | #define __NR_getuid 24 | ||
33 | #define __NR_stime 25 | ||
34 | #define __NR_ptrace 26 | ||
35 | #define __NR_alarm 27 | ||
36 | #define __NR_oldfstat 28 | ||
37 | #define __NR_pause 29 | ||
38 | #define __NR_utime 30 | ||
39 | #define __NR_stty 31 | ||
40 | #define __NR_gtty 32 | ||
41 | #define __NR_access 33 | ||
42 | #define __NR_nice 34 | ||
43 | #define __NR_ftime 35 | ||
44 | #define __NR_sync 36 | ||
45 | #define __NR_kill 37 | ||
46 | #define __NR_rename 38 | ||
47 | #define __NR_mkdir 39 | ||
48 | #define __NR_rmdir 40 | ||
49 | #define __NR_dup 41 | ||
50 | #define __NR_pipe 42 | ||
51 | #define __NR_times 43 | ||
52 | #define __NR_prof 44 | ||
53 | #define __NR_brk 45 | ||
54 | #define __NR_setgid 46 | ||
55 | #define __NR_getgid 47 | ||
56 | #define __NR_signal 48 | ||
57 | #define __NR_geteuid 49 | ||
58 | #define __NR_getegid 50 | ||
59 | #define __NR_acct 51 | ||
60 | #define __NR_umount2 52 | ||
61 | #define __NR_lock 53 | ||
62 | #define __NR_ioctl 54 | ||
63 | #define __NR_fcntl 55 | ||
64 | #define __NR_mpx 56 | ||
65 | #define __NR_setpgid 57 | ||
66 | #define __NR_ulimit 58 | ||
67 | #define __NR_oldolduname 59 | ||
68 | #define __NR_umask 60 | ||
69 | #define __NR_chroot 61 | ||
70 | #define __NR_ustat 62 | ||
71 | #define __NR_dup2 63 | ||
72 | #define __NR_getppid 64 | ||
73 | #define __NR_getpgrp 65 | ||
74 | #define __NR_setsid 66 | ||
75 | #define __NR_sigaction 67 | ||
76 | #define __NR_sgetmask 68 | ||
77 | #define __NR_ssetmask 69 | ||
78 | #define __NR_setreuid 70 | ||
79 | #define __NR_setregid 71 | ||
80 | #define __NR_sigsuspend 72 | ||
81 | #define __NR_sigpending 73 | ||
82 | #define __NR_sethostname 74 | ||
83 | #define __NR_setrlimit 75 | ||
84 | #define __NR_getrlimit 76 | ||
85 | #define __NR_getrusage 77 | ||
86 | #define __NR_gettimeofday 78 | ||
87 | #define __NR_settimeofday 79 | ||
88 | #define __NR_getgroups 80 | ||
89 | #define __NR_setgroups 81 | ||
90 | #define __NR_select 82 | ||
91 | #define __NR_symlink 83 | ||
92 | #define __NR_oldlstat 84 | ||
93 | #define __NR_readlink 85 | ||
94 | #define __NR_uselib 86 | ||
95 | #define __NR_swapon 87 | ||
96 | #define __NR_reboot 88 | ||
97 | #define __NR_readdir 89 | ||
98 | #define __NR_mmap 90 | ||
99 | #define __NR_munmap 91 | ||
100 | #define __NR_truncate 92 | ||
101 | #define __NR_ftruncate 93 | ||
102 | #define __NR_fchmod 94 | ||
103 | #define __NR_fchown 95 | ||
104 | #define __NR_getpriority 96 | ||
105 | #define __NR_setpriority 97 | ||
106 | #define __NR_profil 98 | ||
107 | #define __NR_statfs 99 | ||
108 | #define __NR_fstatfs 100 | ||
109 | #define __NR_ioperm 101 | ||
110 | #define __NR_socketcall 102 | ||
111 | #define __NR_syslog 103 | ||
112 | #define __NR_setitimer 104 | ||
113 | #define __NR_getitimer 105 | ||
114 | #define __NR_stat 106 | ||
115 | #define __NR_lstat 107 | ||
116 | #define __NR_fstat 108 | ||
117 | #define __NR_olduname 109 | ||
118 | #define __NR_iopl 110 | ||
119 | #define __NR_vhangup 111 | ||
120 | #define __NR_idle 112 | ||
121 | #define __NR_vm86old 113 | ||
122 | #define __NR_wait4 114 | ||
123 | #define __NR_swapoff 115 | ||
124 | #define __NR_sysinfo 116 | ||
125 | #define __NR_ipc 117 | ||
126 | #define __NR_fsync 118 | ||
127 | #define __NR_sigreturn 119 | ||
128 | #define __NR_clone 120 | ||
129 | #define __NR_setdomainname 121 | ||
130 | #define __NR_uname 122 | ||
131 | #define __NR_modify_ldt 123 | ||
132 | #define __NR_adjtimex 124 | ||
133 | #define __NR_mprotect 125 | ||
134 | #define __NR_sigprocmask 126 | ||
135 | #define __NR_create_module 127 | ||
136 | #define __NR_init_module 128 | ||
137 | #define __NR_delete_module 129 | ||
138 | #define __NR_get_kernel_syms 130 | ||
139 | #define __NR_quotactl 131 | ||
140 | #define __NR_getpgid 132 | ||
141 | #define __NR_fchdir 133 | ||
142 | #define __NR_bdflush 134 | ||
143 | #define __NR_sysfs 135 | ||
144 | #define __NR_personality 136 | ||
145 | #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
146 | #define __NR_setfsuid 138 | ||
147 | #define __NR_setfsgid 139 | ||
148 | #define __NR__llseek 140 | ||
149 | #define __NR_getdents 141 | ||
150 | #define __NR__newselect 142 | ||
151 | #define __NR_flock 143 | ||
152 | #define __NR_msync 144 | ||
153 | #define __NR_readv 145 | ||
154 | #define __NR_writev 146 | ||
155 | #define __NR_getsid 147 | ||
156 | #define __NR_fdatasync 148 | ||
157 | #define __NR__sysctl 149 | ||
158 | #define __NR_mlock 150 | ||
159 | #define __NR_munlock 151 | ||
160 | #define __NR_mlockall 152 | ||
161 | #define __NR_munlockall 153 | ||
162 | #define __NR_sched_setparam 154 | ||
163 | #define __NR_sched_getparam 155 | ||
164 | #define __NR_sched_setscheduler 156 | ||
165 | #define __NR_sched_getscheduler 157 | ||
166 | #define __NR_sched_yield 158 | ||
167 | #define __NR_sched_get_priority_max 159 | ||
168 | #define __NR_sched_get_priority_min 160 | ||
169 | #define __NR_sched_rr_get_interval 161 | ||
170 | #define __NR_nanosleep 162 | ||
171 | #define __NR_mremap 163 | ||
172 | #define __NR_setresuid 164 | ||
173 | #define __NR_getresuid 165 | ||
174 | #define __NR_vm86 166 | ||
175 | #define __NR_query_module 167 | ||
176 | #define __NR_poll 168 | ||
177 | #define __NR_nfsservctl 169 | ||
178 | #define __NR_setresgid 170 | ||
179 | #define __NR_getresgid 171 | ||
180 | #define __NR_prctl 172 | ||
181 | #define __NR_rt_sigreturn 173 | ||
182 | #define __NR_rt_sigaction 174 | ||
183 | #define __NR_rt_sigprocmask 175 | ||
184 | #define __NR_rt_sigpending 176 | ||
185 | #define __NR_rt_sigtimedwait 177 | ||
186 | #define __NR_rt_sigqueueinfo 178 | ||
187 | #define __NR_rt_sigsuspend 179 | ||
188 | #define __NR_pread64 180 | ||
189 | #define __NR_pwrite64 181 | ||
190 | #define __NR_chown 182 | ||
191 | #define __NR_getcwd 183 | ||
192 | #define __NR_capget 184 | ||
193 | #define __NR_capset 185 | ||
194 | #define __NR_sigaltstack 186 | ||
195 | #define __NR_sendfile 187 | ||
196 | #define __NR_getpmsg 188 /* some people actually want streams */ | ||
197 | #define __NR_putpmsg 189 /* some people actually want streams */ | ||
198 | #define __NR_vfork 190 | ||
199 | #define __NR_ugetrlimit 191 | ||
200 | #define __NR_mmap2 192 | ||
201 | #define __NR_truncate64 193 | ||
202 | #define __NR_ftruncate64 194 | ||
203 | #define __NR_stat64 195 | ||
204 | #define __NR_lstat64 196 | ||
205 | #define __NR_fstat64 197 | ||
206 | #define __NR_lchown32 198 | ||
207 | #define __NR_getuid32 199 | ||
208 | #define __NR_getgid32 200 | ||
209 | #define __NR_geteuid32 201 | ||
210 | #define __NR_getegid32 202 | ||
211 | #define __NR_setreuid32 203 | ||
212 | #define __NR_setregid32 204 | ||
213 | #define __NR_getgroups32 205 | ||
214 | #define __NR_setgroups32 206 | ||
215 | #define __NR_fchown32 207 | ||
216 | #define __NR_setresuid32 208 | ||
217 | #define __NR_getresuid32 209 | ||
218 | #define __NR_setresgid32 210 | ||
219 | #define __NR_getresgid32 211 | ||
220 | #define __NR_chown32 212 | ||
221 | #define __NR_setuid32 213 | ||
222 | #define __NR_setgid32 214 | ||
223 | #define __NR_setfsuid32 215 | ||
224 | #define __NR_setfsgid32 216 | ||
225 | #define __NR_pivot_root 217 | ||
226 | #define __NR_mincore 218 | ||
227 | #define __NR_madvise 219 | ||
228 | #define __NR_madvise1 219 | ||
229 | #define __NR_getdents64 220 | ||
230 | #define __NR_fcntl64 221 | ||
231 | /* 223 is unused */ | ||
232 | #define __NR_gettid 224 | ||
233 | #define __NR_readahead 225 | ||
234 | #define __NR_setxattr 226 | ||
235 | #define __NR_lsetxattr 227 | ||
236 | #define __NR_fsetxattr 228 | ||
237 | #define __NR_getxattr 229 | ||
238 | #define __NR_lgetxattr 230 | ||
239 | #define __NR_fgetxattr 231 | ||
240 | #define __NR_listxattr 232 | ||
241 | #define __NR_llistxattr 233 | ||
242 | #define __NR_flistxattr 234 | ||
243 | #define __NR_removexattr 235 | ||
244 | #define __NR_lremovexattr 236 | ||
245 | #define __NR_fremovexattr 237 | ||
246 | #define __NR_tkill 238 | ||
247 | #define __NR_sendfile64 239 | ||
248 | #define __NR_futex 240 | ||
249 | #define __NR_sched_setaffinity 241 | ||
250 | #define __NR_sched_getaffinity 242 | ||
251 | #define __NR_set_thread_area 243 | ||
252 | #define __NR_get_thread_area 244 | ||
253 | #define __NR_io_setup 245 | ||
254 | #define __NR_io_destroy 246 | ||
255 | #define __NR_io_getevents 247 | ||
256 | #define __NR_io_submit 248 | ||
257 | #define __NR_io_cancel 249 | ||
258 | #define __NR_fadvise64 250 | ||
259 | /* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ | ||
260 | #define __NR_exit_group 252 | ||
261 | #define __NR_lookup_dcookie 253 | ||
262 | #define __NR_epoll_create 254 | ||
263 | #define __NR_epoll_ctl 255 | ||
264 | #define __NR_epoll_wait 256 | ||
265 | #define __NR_remap_file_pages 257 | ||
266 | #define __NR_set_tid_address 258 | ||
267 | #define __NR_timer_create 259 | ||
268 | #define __NR_timer_settime (__NR_timer_create+1) | ||
269 | #define __NR_timer_gettime (__NR_timer_create+2) | ||
270 | #define __NR_timer_getoverrun (__NR_timer_create+3) | ||
271 | #define __NR_timer_delete (__NR_timer_create+4) | ||
272 | #define __NR_clock_settime (__NR_timer_create+5) | ||
273 | #define __NR_clock_gettime (__NR_timer_create+6) | ||
274 | #define __NR_clock_getres (__NR_timer_create+7) | ||
275 | #define __NR_clock_nanosleep (__NR_timer_create+8) | ||
276 | #define __NR_statfs64 268 | ||
277 | #define __NR_fstatfs64 269 | ||
278 | #define __NR_tgkill 270 | ||
279 | #define __NR_utimes 271 | ||
280 | #define __NR_fadvise64_64 272 | ||
281 | #define __NR_vserver 273 | ||
282 | #define __NR_mbind 274 | ||
283 | #define __NR_get_mempolicy 275 | ||
284 | #define __NR_set_mempolicy 276 | ||
285 | #define __NR_mq_open 277 | ||
286 | #define __NR_mq_unlink (__NR_mq_open+1) | ||
287 | #define __NR_mq_timedsend (__NR_mq_open+2) | ||
288 | #define __NR_mq_timedreceive (__NR_mq_open+3) | ||
289 | #define __NR_mq_notify (__NR_mq_open+4) | ||
290 | #define __NR_mq_getsetattr (__NR_mq_open+5) | ||
291 | #define __NR_kexec_load 283 | ||
292 | #define __NR_waitid 284 | ||
293 | /* #define __NR_sys_setaltroot 285 */ | ||
294 | #define __NR_add_key 286 | ||
295 | #define __NR_request_key 287 | ||
296 | #define __NR_keyctl 288 | ||
297 | #define __NR_ioprio_set 289 | ||
298 | #define __NR_ioprio_get 290 | ||
299 | #define __NR_inotify_init 291 | ||
300 | #define __NR_inotify_add_watch 292 | ||
301 | #define __NR_inotify_rm_watch 293 | ||
302 | #define __NR_migrate_pages 294 | ||
303 | #define __NR_openat 295 | ||
304 | #define __NR_mkdirat 296 | ||
305 | #define __NR_mknodat 297 | ||
306 | #define __NR_fchownat 298 | ||
307 | #define __NR_futimesat 299 | ||
308 | #define __NR_fstatat64 300 | ||
309 | #define __NR_unlinkat 301 | ||
310 | #define __NR_renameat 302 | ||
311 | #define __NR_linkat 303 | ||
312 | #define __NR_symlinkat 304 | ||
313 | #define __NR_readlinkat 305 | ||
314 | #define __NR_fchmodat 306 | ||
315 | #define __NR_faccessat 307 | ||
316 | #define __NR_pselect6 308 | ||
317 | #define __NR_ppoll 309 | ||
318 | #define __NR_unshare 310 | ||
319 | #define __NR_set_robust_list 311 | ||
320 | #define __NR_get_robust_list 312 | ||
321 | #define __NR_splice 313 | ||
322 | #define __NR_sync_file_range 314 | ||
323 | #define __NR_tee 315 | ||
324 | #define __NR_vmsplice 316 | ||
325 | #define __NR_move_pages 317 | ||
326 | #define __NR_getcpu 318 | ||
327 | #define __NR_epoll_pwait 319 | ||
328 | |||
329 | #ifdef __KERNEL__ | ||
330 | |||
331 | #define NR_syscalls 320 | ||
332 | |||
333 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
334 | #define __ARCH_WANT_OLD_READDIR | ||
335 | #define __ARCH_WANT_OLD_STAT | ||
336 | #define __ARCH_WANT_STAT64 | ||
337 | #define __ARCH_WANT_SYS_ALARM | ||
338 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
339 | #define __ARCH_WANT_SYS_PAUSE | ||
340 | #define __ARCH_WANT_SYS_SGETMASK | ||
341 | #define __ARCH_WANT_SYS_SIGNAL | ||
342 | #define __ARCH_WANT_SYS_TIME | ||
343 | #define __ARCH_WANT_SYS_UTIME | ||
344 | #define __ARCH_WANT_SYS_WAITPID | ||
345 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
346 | #define __ARCH_WANT_SYS_FADVISE64 | ||
347 | #define __ARCH_WANT_SYS_GETPGRP | ||
348 | #define __ARCH_WANT_SYS_LLSEEK | ||
349 | #define __ARCH_WANT_SYS_NICE | ||
350 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
351 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
352 | #define __ARCH_WANT_SYS_SIGPENDING | ||
353 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
354 | #define __ARCH_WANT_SYS_RT_SIGACTION | ||
355 | |||
356 | /* | ||
357 | * "Conditional" syscalls | ||
358 | */ | ||
359 | #define cond_syscall(name) \ | ||
360 | asm (".weak\t_" #name "\n" \ | ||
361 | ".set\t_" #name ",_sys_ni_syscall"); | ||
362 | |||
363 | #endif /* __KERNEL__ */ | ||
364 | #endif /* _ASM_H8300_UNISTD_H_ */ | ||
diff --git a/include/asm-h8300/user.h b/include/asm-h8300/user.h deleted file mode 100644 index 14a9e18950f1..000000000000 --- a/include/asm-h8300/user.h +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #ifndef _H8300_USER_H | ||
2 | #define _H8300_USER_H | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | |||
6 | /* Core file format: The core file is written in such a way that gdb | ||
7 | can understand it and provide useful information to the user (under | ||
8 | linux we use the 'trad-core' bfd). There are quite a number of | ||
9 | obstacles to being able to view the contents of the floating point | ||
10 | registers, and until these are solved you will not be able to view the | ||
11 | contents of them. Actually, you can read in the core file and look at | ||
12 | the contents of the user struct to find out what the floating point | ||
13 | registers contain. | ||
14 | The actual file contents are as follows: | ||
15 | UPAGE: 1 page consisting of a user struct that tells gdb what is present | ||
16 | in the file. Directly after this is a copy of the task_struct, which | ||
17 | is currently not used by gdb, but it may come in useful at some point. | ||
18 | All of the registers are stored as part of the upage. The upage should | ||
19 | always be only one page. | ||
20 | DATA: The data area is stored. We use current->end_text to | ||
21 | current->brk to pick up all of the user variables, plus any memory | ||
22 | that may have been malloced. No attempt is made to determine if a page | ||
23 | is demand-zero or if a page is totally unused, we just cover the entire | ||
24 | range. All of the addresses are rounded in such a way that an integral | ||
25 | number of pages is written. | ||
26 | STACK: We need the stack information in order to get a meaningful | ||
27 | backtrace. We need to write the data from (esp) to | ||
28 | current->start_stack, so we round each of these off in order to be able | ||
29 | to write an integer number of pages. | ||
30 | The minimum core file size is 3 pages, or 12288 bytes. | ||
31 | */ | ||
32 | |||
33 | /* This is the old layout of "struct pt_regs" as of Linux 1.x, and | ||
34 | is still the layout used by user (the new pt_regs doesn't have | ||
35 | all registers). */ | ||
36 | struct user_regs_struct { | ||
37 | long er1,er2,er3,er4,er5,er6; | ||
38 | long er0; | ||
39 | long usp; | ||
40 | long orig_er0; | ||
41 | short ccr; | ||
42 | long pc; | ||
43 | }; | ||
44 | |||
45 | |||
46 | /* When the kernel dumps core, it starts by dumping the user struct - | ||
47 | this will be used by gdb to figure out where the data and stack segments | ||
48 | are within the file, and what virtual addresses to use. */ | ||
49 | struct user{ | ||
50 | /* We start with the registers, to mimic the way that "memory" is returned | ||
51 | from the ptrace(3,...) function. */ | ||
52 | struct user_regs_struct regs; /* Where the registers are actually stored */ | ||
53 | /* ptrace does not yet supply these. Someday.... */ | ||
54 | /* The rest of this junk is to help gdb figure out what goes where */ | ||
55 | unsigned long int u_tsize; /* Text segment size (pages). */ | ||
56 | unsigned long int u_dsize; /* Data segment size (pages). */ | ||
57 | unsigned long int u_ssize; /* Stack segment size (pages). */ | ||
58 | unsigned long start_code; /* Starting virtual address of text. */ | ||
59 | unsigned long start_stack; /* Starting virtual address of stack area. | ||
60 | This is actually the bottom of the stack, | ||
61 | the top of the stack is always found in the | ||
62 | esp register. */ | ||
63 | long int signal; /* Signal that caused the core dump. */ | ||
64 | int reserved; /* No longer used */ | ||
65 | unsigned long u_ar0; /* Used by gdb to help find the values for */ | ||
66 | /* the registers. */ | ||
67 | unsigned long magic; /* To uniquely identify a core file */ | ||
68 | char u_comm[32]; /* User command that was responsible */ | ||
69 | }; | ||
70 | #define NBPG PAGE_SIZE | ||
71 | #define UPAGES 1 | ||
72 | #define HOST_TEXT_START_ADDR (u.start_code) | ||
73 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | ||
74 | |||
75 | #endif | ||
diff --git a/include/asm-h8300/virtconvert.h b/include/asm-h8300/virtconvert.h deleted file mode 100644 index 19cfd62b11c3..000000000000 --- a/include/asm-h8300/virtconvert.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __H8300_VIRT_CONVERT__ | ||
2 | #define __H8300_VIRT_CONVERT__ | ||
3 | |||
4 | /* | ||
5 | * Macros used for converting between virtual and physical mappings. | ||
6 | */ | ||
7 | |||
8 | #ifdef __KERNEL__ | ||
9 | |||
10 | #include <asm/setup.h> | ||
11 | #include <asm/page.h> | ||
12 | |||
13 | #define phys_to_virt(vaddr) ((void *) (vaddr)) | ||
14 | #define virt_to_phys(vaddr) ((unsigned long) (vaddr)) | ||
15 | |||
16 | #define virt_to_bus virt_to_phys | ||
17 | #define bus_to_virt phys_to_virt | ||
18 | |||
19 | #endif | ||
20 | #endif | ||
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index e72ba563f102..965abb8bc7ff 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -325,10 +325,16 @@ | |||
325 | #define __NR_fallocate 320 | 325 | #define __NR_fallocate 320 |
326 | #define __NR_timerfd_settime 321 | 326 | #define __NR_timerfd_settime 321 |
327 | #define __NR_timerfd_gettime 322 | 327 | #define __NR_timerfd_gettime 322 |
328 | #define __NR_signalfd4 323 | ||
329 | #define __NR_eventfd2 324 | ||
330 | #define __NR_epoll_create1 325 | ||
331 | #define __NR_dup3 326 | ||
332 | #define __NR_pipe2 327 | ||
333 | #define __NR_inotify_init1 328 | ||
328 | 334 | ||
329 | #ifdef __KERNEL__ | 335 | #ifdef __KERNEL__ |
330 | 336 | ||
331 | #define NR_syscalls 323 | 337 | #define NR_syscalls 329 |
332 | 338 | ||
333 | #define __ARCH_WANT_IPC_PARSE_VERSION | 339 | #define __ARCH_WANT_IPC_PARSE_VERSION |
334 | #define __ARCH_WANT_OLD_READDIR | 340 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/include/asm-x86/bugs.h b/include/asm-x86/bugs.h index 021cbdd5f258..00e4a0cd6f28 100644 --- a/include/asm-x86/bugs.h +++ b/include/asm-x86/bugs.h | |||
@@ -2,6 +2,11 @@ | |||
2 | #define _ASM_X86_BUGS_H | 2 | #define _ASM_X86_BUGS_H |
3 | 3 | ||
4 | extern void check_bugs(void); | 4 | extern void check_bugs(void); |
5 | |||
6 | #ifdef CONFIG_CPU_SUP_INTEL_32 | ||
5 | int ppro_with_ram_bug(void); | 7 | int ppro_with_ram_bug(void); |
8 | #else | ||
9 | static inline int ppro_with_ram_bug(void) { return 0; } | ||
10 | #endif | ||
6 | 11 | ||
7 | #endif /* _ASM_X86_BUGS_H */ | 12 | #endif /* _ASM_X86_BUGS_H */ |
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 89a7af37e37e..5fc4d55906d4 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
@@ -72,14 +72,15 @@ | |||
72 | #define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ | 72 | #define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ |
73 | #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ | 73 | #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ |
74 | #define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */ | 74 | #define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */ |
75 | #define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */ | 75 | #define X86_FEATURE_PEBS (3*32+12) /* Precise-Event Based Sampling */ |
76 | #define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */ | 76 | #define X86_FEATURE_BTS (3*32+13) /* Branch Trace Store */ |
77 | #define X86_FEATURE_SYSCALL32 (3*32+14) /* syscall in ia32 userspace */ | 77 | #define X86_FEATURE_SYSCALL32 (3*32+14) /* syscall in ia32 userspace */ |
78 | #define X86_FEATURE_SYSENTER32 (3*32+15) /* sysenter in ia32 userspace */ | 78 | #define X86_FEATURE_SYSENTER32 (3*32+15) /* sysenter in ia32 userspace */ |
79 | #define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well on this CPU */ | 79 | #define X86_FEATURE_REP_GOOD (3*32+16) /* rep microcode works well on this CPU */ |
80 | #define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */ | 80 | #define X86_FEATURE_MFENCE_RDTSC (3*32+17) /* Mfence synchronizes RDTSC */ |
81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ | 81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ |
82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ | 82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ |
83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ | ||
83 | 84 | ||
84 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 85 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
85 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 86 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h index 7ed2bd7a7f51..d4f2b0abe929 100644 --- a/include/asm-x86/efi.h +++ b/include/asm-x86/efi.h | |||
@@ -86,7 +86,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3, | |||
86 | efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ | 86 | efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ |
87 | (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) | 87 | (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) |
88 | 88 | ||
89 | extern void *efi_ioremap(unsigned long addr, unsigned long size); | 89 | extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size); |
90 | 90 | ||
91 | #endif /* CONFIG_X86_32 */ | 91 | #endif /* CONFIG_X86_32 */ |
92 | 92 | ||
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h index ef7a995ee81f..6c3651759e44 100644 --- a/include/asm-x86/hw_irq.h +++ b/include/asm-x86/hw_irq.h | |||
@@ -100,9 +100,17 @@ extern void (*const interrupt[NR_IRQS])(void); | |||
100 | #else | 100 | #else |
101 | typedef int vector_irq_t[NR_VECTORS]; | 101 | typedef int vector_irq_t[NR_VECTORS]; |
102 | DECLARE_PER_CPU(vector_irq_t, vector_irq); | 102 | DECLARE_PER_CPU(vector_irq_t, vector_irq); |
103 | extern spinlock_t vector_lock; | ||
104 | #endif | 103 | #endif |
105 | extern void setup_vector_irq(int cpu); | 104 | |
105 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64) | ||
106 | extern void lock_vector_lock(void); | ||
107 | extern void unlock_vector_lock(void); | ||
108 | extern void __setup_vector_irq(int cpu); | ||
109 | #else | ||
110 | static inline void lock_vector_lock(void) {} | ||
111 | static inline void unlock_vector_lock(void) {} | ||
112 | static inline void __setup_vector_irq(int cpu) {} | ||
113 | #endif | ||
106 | 114 | ||
107 | #endif /* !ASSEMBLY_ */ | 115 | #endif /* !ASSEMBLY_ */ |
108 | 116 | ||
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 96fa8449ff11..6d3b21063419 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/regset.h> | 15 | #include <linux/regset.h> |
16 | #include <linux/hardirq.h> | ||
16 | #include <asm/asm.h> | 17 | #include <asm/asm.h> |
17 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
18 | #include <asm/sigcontext.h> | 19 | #include <asm/sigcontext.h> |
@@ -236,6 +237,37 @@ static inline void kernel_fpu_end(void) | |||
236 | preempt_enable(); | 237 | preempt_enable(); |
237 | } | 238 | } |
238 | 239 | ||
240 | /* | ||
241 | * Some instructions like VIA's padlock instructions generate a spurious | ||
242 | * DNA fault but don't modify SSE registers. And these instructions | ||
243 | * get used from interrupt context aswell. To prevent these kernel instructions | ||
244 | * in interrupt context interact wrongly with other user/kernel fpu usage, we | ||
245 | * should use them only in the context of irq_ts_save/restore() | ||
246 | */ | ||
247 | static inline int irq_ts_save(void) | ||
248 | { | ||
249 | /* | ||
250 | * If we are in process context, we are ok to take a spurious DNA fault. | ||
251 | * Otherwise, doing clts() in process context require pre-emption to | ||
252 | * be disabled or some heavy lifting like kernel_fpu_begin() | ||
253 | */ | ||
254 | if (!in_interrupt()) | ||
255 | return 0; | ||
256 | |||
257 | if (read_cr0() & X86_CR0_TS) { | ||
258 | clts(); | ||
259 | return 1; | ||
260 | } | ||
261 | |||
262 | return 0; | ||
263 | } | ||
264 | |||
265 | static inline void irq_ts_restore(int TS_state) | ||
266 | { | ||
267 | if (TS_state) | ||
268 | stts(); | ||
269 | } | ||
270 | |||
239 | #ifdef CONFIG_X86_64 | 271 | #ifdef CONFIG_X86_64 |
240 | 272 | ||
241 | static inline void save_init_fpu(struct task_struct *tsk) | 273 | static inline void save_init_fpu(struct task_struct *tsk) |
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h index 90b1d1f12f08..b95d167b7fb2 100644 --- a/include/asm-x86/irq_vectors.h +++ b/include/asm-x86/irq_vectors.h | |||
@@ -109,7 +109,15 @@ | |||
109 | #define LAST_VM86_IRQ 15 | 109 | #define LAST_VM86_IRQ 15 |
110 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) | 110 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) |
111 | 111 | ||
112 | #if !defined(CONFIG_X86_VOYAGER) | 112 | #ifdef CONFIG_X86_64 |
113 | # if NR_CPUS < MAX_IO_APICS | ||
114 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | ||
115 | # else | ||
116 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | ||
117 | # endif | ||
118 | # define NR_IRQ_VECTORS NR_IRQS | ||
119 | |||
120 | #elif !defined(CONFIG_X86_VOYAGER) | ||
113 | 121 | ||
114 | # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) | 122 | # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) |
115 | 123 | ||
diff --git a/include/asm-x86/processor-cyrix.h b/include/asm-x86/processor-cyrix.h index 97568ada1f97..1198f2a0e42c 100644 --- a/include/asm-x86/processor-cyrix.h +++ b/include/asm-x86/processor-cyrix.h | |||
@@ -28,3 +28,11 @@ static inline void setCx86(u8 reg, u8 data) | |||
28 | outb(reg, 0x22); | 28 | outb(reg, 0x22); |
29 | outb(data, 0x23); | 29 | outb(data, 0x23); |
30 | } | 30 | } |
31 | |||
32 | #define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); }) | ||
33 | |||
34 | #define setCx86_old(reg, data) do { \ | ||
35 | outb((reg), 0x22); \ | ||
36 | outb((data), 0x23); \ | ||
37 | } while (0) | ||
38 | |||
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h index adec887dd7cd..5c2ff4bc2980 100644 --- a/include/asm-x86/required-features.h +++ b/include/asm-x86/required-features.h | |||
@@ -41,6 +41,12 @@ | |||
41 | # define NEED_3DNOW 0 | 41 | # define NEED_3DNOW 0 |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #if defined(CONFIG_X86_P6_NOP) || defined(CONFIG_X86_64) | ||
45 | # define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31)) | ||
46 | #else | ||
47 | # define NEED_NOPL 0 | ||
48 | #endif | ||
49 | |||
44 | #ifdef CONFIG_X86_64 | 50 | #ifdef CONFIG_X86_64 |
45 | #define NEED_PSE 0 | 51 | #define NEED_PSE 0 |
46 | #define NEED_MSR (1<<(X86_FEATURE_MSR & 31)) | 52 | #define NEED_MSR (1<<(X86_FEATURE_MSR & 31)) |
@@ -67,7 +73,7 @@ | |||
67 | #define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW) | 73 | #define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW) |
68 | 74 | ||
69 | #define REQUIRED_MASK2 0 | 75 | #define REQUIRED_MASK2 0 |
70 | #define REQUIRED_MASK3 0 | 76 | #define REQUIRED_MASK3 (NEED_NOPL) |
71 | #define REQUIRED_MASK4 0 | 77 | #define REQUIRED_MASK4 0 |
72 | #define REQUIRED_MASK5 0 | 78 | #define REQUIRED_MASK5 0 |
73 | #define REQUIRED_MASK6 0 | 79 | #define REQUIRED_MASK6 0 |
diff --git a/include/crypto/hash.h b/include/crypto/hash.h index d12498ec8a4e..ee48ef8fb2ea 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h | |||
@@ -101,6 +101,24 @@ static inline int crypto_ahash_digest(struct ahash_request *req) | |||
101 | return crt->digest(req); | 101 | return crt->digest(req); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline int crypto_ahash_init(struct ahash_request *req) | ||
105 | { | ||
106 | struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req)); | ||
107 | return crt->init(req); | ||
108 | } | ||
109 | |||
110 | static inline int crypto_ahash_update(struct ahash_request *req) | ||
111 | { | ||
112 | struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req)); | ||
113 | return crt->update(req); | ||
114 | } | ||
115 | |||
116 | static inline int crypto_ahash_final(struct ahash_request *req) | ||
117 | { | ||
118 | struct ahash_tfm *crt = crypto_ahash_crt(crypto_ahash_reqtfm(req)); | ||
119 | return crt->final(req); | ||
120 | } | ||
121 | |||
104 | static inline void ahash_request_set_tfm(struct ahash_request *req, | 122 | static inline void ahash_request_set_tfm(struct ahash_request *req, |
105 | struct crypto_ahash *tfm) | 123 | struct crypto_ahash *tfm) |
106 | { | 124 | { |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a26f565e8189..327f60658d94 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -356,6 +356,7 @@ unifdef-y += virtio_balloon.h | |||
356 | unifdef-y += virtio_console.h | 356 | unifdef-y += virtio_console.h |
357 | unifdef-y += virtio_pci.h | 357 | unifdef-y += virtio_pci.h |
358 | unifdef-y += virtio_ring.h | 358 | unifdef-y += virtio_ring.h |
359 | unifdef-y += virtio_rng.h | ||
359 | unifdef-y += vt.h | 360 | unifdef-y += vt.h |
360 | unifdef-y += wait.h | 361 | unifdef-y += wait.h |
361 | unifdef-y += wanrouter.h | 362 | unifdef-y += wanrouter.h |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 972b12bcfb36..2b8df8b420fd 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #ifndef _AGP_BACKEND_H | 30 | #ifndef _AGP_BACKEND_H |
31 | #define _AGP_BACKEND_H 1 | 31 | #define _AGP_BACKEND_H 1 |
32 | 32 | ||
33 | #include <linux/list.h> | ||
34 | |||
33 | enum chipset_type { | 35 | enum chipset_type { |
34 | NOT_SUPPORTED, | 36 | NOT_SUPPORTED, |
35 | SUPPORTED, | 37 | SUPPORTED, |
@@ -78,6 +80,8 @@ struct agp_memory { | |||
78 | bool is_bound; | 80 | bool is_bound; |
79 | bool is_flushed; | 81 | bool is_flushed; |
80 | bool vmalloc_flag; | 82 | bool vmalloc_flag; |
83 | /* list of agp_memory mapped to the aperture */ | ||
84 | struct list_head mapped_list; | ||
81 | }; | 85 | }; |
82 | 86 | ||
83 | #define AGP_NORMAL_MEMORY 0 | 87 | #define AGP_NORMAL_MEMORY 0 |
@@ -96,6 +100,7 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, | |||
96 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); | 100 | extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); |
97 | extern int agp_bind_memory(struct agp_memory *, off_t); | 101 | extern int agp_bind_memory(struct agp_memory *, off_t); |
98 | extern int agp_unbind_memory(struct agp_memory *); | 102 | extern int agp_unbind_memory(struct agp_memory *); |
103 | extern int agp_rebind_memory(void); | ||
99 | extern void agp_enable(struct agp_bridge_data *, u32); | 104 | extern void agp_enable(struct agp_bridge_data *, u32); |
100 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); | 105 | extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); |
101 | extern void agp_backend_release(struct agp_bridge_data *); | 106 | extern void agp_backend_release(struct agp_bridge_data *); |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 1abfe664c444..89781fd48859 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -110,6 +110,7 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits); | |||
110 | 110 | ||
111 | extern int bitmap_scnprintf(char *buf, unsigned int len, | 111 | extern int bitmap_scnprintf(char *buf, unsigned int len, |
112 | const unsigned long *src, int nbits); | 112 | const unsigned long *src, int nbits); |
113 | extern int bitmap_scnprintf_len(unsigned int nr_bits); | ||
113 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, | 114 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, |
114 | unsigned long *dst, int nbits); | 115 | unsigned long *dst, int nbits); |
115 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, | 116 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 652470b687c9..95837bfb5256 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -97,10 +97,14 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | |||
97 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 97 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE |
98 | #define alloc_bootmem(x) \ | 98 | #define alloc_bootmem(x) \ |
99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
100 | #define alloc_bootmem_nopanic(x) \ | ||
101 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
100 | #define alloc_bootmem_low(x) \ | 102 | #define alloc_bootmem_low(x) \ |
101 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) | 103 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) |
102 | #define alloc_bootmem_pages(x) \ | 104 | #define alloc_bootmem_pages(x) \ |
103 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 105 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
106 | #define alloc_bootmem_pages_nopanic(x) \ | ||
107 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
104 | #define alloc_bootmem_low_pages(x) \ | 108 | #define alloc_bootmem_low_pages(x) \ |
105 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | 109 | __alloc_bootmem_low(x, PAGE_SIZE, 0) |
106 | #define alloc_bootmem_node(pgdat, x) \ | 110 | #define alloc_bootmem_node(pgdat, x) \ |
diff --git a/include/linux/byteorder.h b/include/linux/byteorder.h new file mode 100644 index 000000000000..29f002d73d98 --- /dev/null +++ b/include/linux/byteorder.h | |||
@@ -0,0 +1,372 @@ | |||
1 | #ifndef _LINUX_BYTEORDER_H | ||
2 | #define _LINUX_BYTEORDER_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/swab.h> | ||
6 | |||
7 | #if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) | ||
8 | # error Fix asm/byteorder.h to define one endianness | ||
9 | #endif | ||
10 | |||
11 | #if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN) | ||
12 | # error Fix asm/byteorder.h to define arch endianness | ||
13 | #endif | ||
14 | |||
15 | #ifdef __LITTLE_ENDIAN | ||
16 | # undef __LITTLE_ENDIAN | ||
17 | # define __LITTLE_ENDIAN 1234 | ||
18 | #endif | ||
19 | |||
20 | #ifdef __BIG_ENDIAN | ||
21 | # undef __BIG_ENDIAN | ||
22 | # define __BIG_ENDIAN 4321 | ||
23 | #endif | ||
24 | |||
25 | #if defined(__LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN_BITFIELD) | ||
26 | # define __LITTLE_ENDIAN_BITFIELD | ||
27 | #endif | ||
28 | |||
29 | #if defined(__BIG_ENDIAN) && !defined(__BIG_ENDIAN_BITFIELD) | ||
30 | # define __BIG_ENDIAN_BITFIELD | ||
31 | #endif | ||
32 | |||
33 | #ifdef __LITTLE_ENDIAN | ||
34 | # define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ||
35 | # define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ||
36 | # define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) | ||
37 | # define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) | ||
38 | # define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) | ||
39 | # define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) | ||
40 | |||
41 | # define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) | ||
42 | # define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) | ||
43 | # define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) | ||
44 | # define __cpu_to_be16(x) ((__force __be16)__swab16(x)) | ||
45 | # define __cpu_to_be32(x) ((__force __be32)__swab32(x)) | ||
46 | # define __cpu_to_be64(x) ((__force __be64)__swab64(x)) | ||
47 | #endif | ||
48 | |||
49 | #ifdef __BIG_ENDIAN | ||
50 | # define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) | ||
51 | # define __be32_to_cpu(x) ((__force __u32)(__be32)(x)) | ||
52 | # define __be64_to_cpu(x) ((__force __u64)(__be64)(x)) | ||
53 | # define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) | ||
54 | # define __cpu_to_be32(x) ((__force __be32)(__u32)(x)) | ||
55 | # define __cpu_to_be64(x) ((__force __be64)(__u64)(x)) | ||
56 | |||
57 | # define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) | ||
58 | # define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) | ||
59 | # define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) | ||
60 | # define __cpu_to_le16(x) ((__force __le16)__swab16(x)) | ||
61 | # define __cpu_to_le32(x) ((__force __le32)__swab32(x)) | ||
62 | # define __cpu_to_le64(x) ((__force __le64)__swab64(x)) | ||
63 | #endif | ||
64 | |||
65 | /* | ||
66 | * These helpers could be phased out over time as the base version | ||
67 | * handles constant folding. | ||
68 | */ | ||
69 | #define __constant_htonl(x) __cpu_to_be32(x) | ||
70 | #define __constant_ntohl(x) __be32_to_cpu(x) | ||
71 | #define __constant_htons(x) __cpu_to_be16(x) | ||
72 | #define __constant_ntohs(x) __be16_to_cpu(x) | ||
73 | |||
74 | #define __constant_le16_to_cpu(x) __le16_to_cpu(x) | ||
75 | #define __constant_le32_to_cpu(x) __le32_to_cpu(x) | ||
76 | #define __constant_le64_to_cpu(x) __le64_to_cpu(x) | ||
77 | #define __constant_be16_to_cpu(x) __be16_to_cpu(x) | ||
78 | #define __constant_be32_to_cpu(x) __be32_to_cpu(x) | ||
79 | #define __constant_be64_to_cpu(x) __be64_to_cpu(x) | ||
80 | |||
81 | #define __constant_cpu_to_le16(x) __cpu_to_le16(x) | ||
82 | #define __constant_cpu_to_le32(x) __cpu_to_le32(x) | ||
83 | #define __constant_cpu_to_le64(x) __cpu_to_le64(x) | ||
84 | #define __constant_cpu_to_be16(x) __cpu_to_be16(x) | ||
85 | #define __constant_cpu_to_be32(x) __cpu_to_be32(x) | ||
86 | #define __constant_cpu_to_be64(x) __cpu_to_be64(x) | ||
87 | |||
88 | static inline void __le16_to_cpus(__u16 *p) | ||
89 | { | ||
90 | #ifdef __BIG_ENDIAN | ||
91 | __swab16s(p); | ||
92 | #endif | ||
93 | } | ||
94 | |||
95 | static inline void __cpu_to_le16s(__u16 *p) | ||
96 | { | ||
97 | #ifdef __BIG_ENDIAN | ||
98 | __swab16s(p); | ||
99 | #endif | ||
100 | } | ||
101 | |||
102 | static inline void __le32_to_cpus(__u32 *p) | ||
103 | { | ||
104 | #ifdef __BIG_ENDIAN | ||
105 | __swab32s(p); | ||
106 | #endif | ||
107 | } | ||
108 | |||
109 | static inline void __cpu_to_le32s(__u32 *p) | ||
110 | { | ||
111 | #ifdef __BIG_ENDIAN | ||
112 | __swab32s(p); | ||
113 | #endif | ||
114 | } | ||
115 | |||
116 | static inline void __le64_to_cpus(__u64 *p) | ||
117 | { | ||
118 | #ifdef __BIG_ENDIAN | ||
119 | __swab64s(p); | ||
120 | #endif | ||
121 | } | ||
122 | |||
123 | static inline void __cpu_to_le64s(__u64 *p) | ||
124 | { | ||
125 | #ifdef __BIG_ENDIAN | ||
126 | __swab64s(p); | ||
127 | #endif | ||
128 | } | ||
129 | |||
130 | static inline void __be16_to_cpus(__u16 *p) | ||
131 | { | ||
132 | #ifdef __LITTLE_ENDIAN | ||
133 | __swab16s(p); | ||
134 | #endif | ||
135 | } | ||
136 | |||
137 | static inline void __cpu_to_be16s(__u16 *p) | ||
138 | { | ||
139 | #ifdef __LITTLE_ENDIAN | ||
140 | __swab16s(p); | ||
141 | #endif | ||
142 | } | ||
143 | |||
144 | static inline void __be32_to_cpus(__u32 *p) | ||
145 | { | ||
146 | #ifdef __LITTLE_ENDIAN | ||
147 | __swab32s(p); | ||
148 | #endif | ||
149 | } | ||
150 | |||
151 | static inline void __cpu_to_be32s(__u32 *p) | ||
152 | { | ||
153 | #ifdef __LITTLE_ENDIAN | ||
154 | __swab32s(p); | ||
155 | #endif | ||
156 | } | ||
157 | |||
158 | static inline void __be64_to_cpus(__u64 *p) | ||
159 | { | ||
160 | #ifdef __LITTLE_ENDIAN | ||
161 | __swab64s(p); | ||
162 | #endif | ||
163 | } | ||
164 | |||
165 | static inline void __cpu_to_be64s(__u64 *p) | ||
166 | { | ||
167 | #ifdef __LITTLE_ENDIAN | ||
168 | __swab64s(p); | ||
169 | #endif | ||
170 | } | ||
171 | |||
172 | static inline __u16 __le16_to_cpup(const __le16 *p) | ||
173 | { | ||
174 | #ifdef __LITTLE_ENDIAN | ||
175 | return (__force __u16)*p; | ||
176 | #else | ||
177 | return __swab16p((__force __u16 *)p); | ||
178 | #endif | ||
179 | } | ||
180 | |||
181 | static inline __u32 __le32_to_cpup(const __le32 *p) | ||
182 | { | ||
183 | #ifdef __LITTLE_ENDIAN | ||
184 | return (__force __u32)*p; | ||
185 | #else | ||
186 | return __swab32p((__force __u32 *)p); | ||
187 | #endif | ||
188 | } | ||
189 | |||
190 | static inline __u64 __le64_to_cpup(const __le64 *p) | ||
191 | { | ||
192 | #ifdef __LITTLE_ENDIAN | ||
193 | return (__force __u64)*p; | ||
194 | #else | ||
195 | return __swab64p((__force __u64 *)p); | ||
196 | #endif | ||
197 | } | ||
198 | |||
199 | static inline __le16 __cpu_to_le16p(const __u16 *p) | ||
200 | { | ||
201 | #ifdef __LITTLE_ENDIAN | ||
202 | return (__force __le16)*p; | ||
203 | #else | ||
204 | return (__force __le16)__swab16p(p); | ||
205 | #endif | ||
206 | } | ||
207 | |||
208 | static inline __le32 __cpu_to_le32p(const __u32 *p) | ||
209 | { | ||
210 | #ifdef __LITTLE_ENDIAN | ||
211 | return (__force __le32)*p; | ||
212 | #else | ||
213 | return (__force __le32)__swab32p(p); | ||
214 | #endif | ||
215 | } | ||
216 | |||
217 | static inline __le64 __cpu_to_le64p(const __u64 *p) | ||
218 | { | ||
219 | #ifdef __LITTLE_ENDIAN | ||
220 | return (__force __le64)*p; | ||
221 | #else | ||
222 | return (__force __le64)__swab64p(p); | ||
223 | #endif | ||
224 | } | ||
225 | |||
226 | static inline __u16 __be16_to_cpup(const __be16 *p) | ||
227 | { | ||
228 | #ifdef __BIG_ENDIAN | ||
229 | return (__force __u16)*p; | ||
230 | #else | ||
231 | return __swab16p((__force __u16 *)p); | ||
232 | #endif | ||
233 | } | ||
234 | |||
235 | static inline __u32 __be32_to_cpup(const __be32 *p) | ||
236 | { | ||
237 | #ifdef __BIG_ENDIAN | ||
238 | return (__force __u32)*p; | ||
239 | #else | ||
240 | return __swab32p((__force __u32 *)p); | ||
241 | #endif | ||
242 | } | ||
243 | |||
244 | static inline __u64 __be64_to_cpup(const __be64 *p) | ||
245 | { | ||
246 | #ifdef __BIG_ENDIAN | ||
247 | return (__force __u64)*p; | ||
248 | #else | ||
249 | return __swab64p((__force __u64 *)p); | ||
250 | #endif | ||
251 | } | ||
252 | |||
253 | static inline __be16 __cpu_to_be16p(const __u16 *p) | ||
254 | { | ||
255 | #ifdef __BIG_ENDIAN | ||
256 | return (__force __be16)*p; | ||
257 | #else | ||
258 | return (__force __be16)__swab16p(p); | ||
259 | #endif | ||
260 | } | ||
261 | |||
262 | static inline __be32 __cpu_to_be32p(const __u32 *p) | ||
263 | { | ||
264 | #ifdef __BIG_ENDIAN | ||
265 | return (__force __be32)*p; | ||
266 | #else | ||
267 | return (__force __be32)__swab32p(p); | ||
268 | #endif | ||
269 | } | ||
270 | |||
271 | static inline __be64 __cpu_to_be64p(const __u64 *p) | ||
272 | { | ||
273 | #ifdef __BIG_ENDIAN | ||
274 | return (__force __be64)*p; | ||
275 | #else | ||
276 | return (__force __be64)__swab64p(p); | ||
277 | #endif | ||
278 | } | ||
279 | |||
280 | #ifdef __KERNEL__ | ||
281 | |||
282 | # define le16_to_cpu __le16_to_cpu | ||
283 | # define le32_to_cpu __le32_to_cpu | ||
284 | # define le64_to_cpu __le64_to_cpu | ||
285 | # define be16_to_cpu __be16_to_cpu | ||
286 | # define be32_to_cpu __be32_to_cpu | ||
287 | # define be64_to_cpu __be64_to_cpu | ||
288 | # define cpu_to_le16 __cpu_to_le16 | ||
289 | # define cpu_to_le32 __cpu_to_le32 | ||
290 | # define cpu_to_le64 __cpu_to_le64 | ||
291 | # define cpu_to_be16 __cpu_to_be16 | ||
292 | # define cpu_to_be32 __cpu_to_be32 | ||
293 | # define cpu_to_be64 __cpu_to_be64 | ||
294 | |||
295 | # define le16_to_cpup __le16_to_cpup | ||
296 | # define le32_to_cpup __le32_to_cpup | ||
297 | # define le64_to_cpup __le64_to_cpup | ||
298 | # define be16_to_cpup __be16_to_cpup | ||
299 | # define be32_to_cpup __be32_to_cpup | ||
300 | # define be64_to_cpup __be64_to_cpup | ||
301 | # define cpu_to_le16p __cpu_to_le16p | ||
302 | # define cpu_to_le32p __cpu_to_le32p | ||
303 | # define cpu_to_le64p __cpu_to_le64p | ||
304 | # define cpu_to_be16p __cpu_to_be16p | ||
305 | # define cpu_to_be32p __cpu_to_be32p | ||
306 | # define cpu_to_be64p __cpu_to_be64p | ||
307 | |||
308 | # define le16_to_cpus __le16_to_cpus | ||
309 | # define le32_to_cpus __le32_to_cpus | ||
310 | # define le64_to_cpus __le64_to_cpus | ||
311 | # define be16_to_cpus __be16_to_cpus | ||
312 | # define be32_to_cpus __be32_to_cpus | ||
313 | # define be64_to_cpus __be64_to_cpus | ||
314 | # define cpu_to_le16s __cpu_to_le16s | ||
315 | # define cpu_to_le32s __cpu_to_le32s | ||
316 | # define cpu_to_le64s __cpu_to_le64s | ||
317 | # define cpu_to_be16s __cpu_to_be16s | ||
318 | # define cpu_to_be32s __cpu_to_be32s | ||
319 | # define cpu_to_be64s __cpu_to_be64s | ||
320 | |||
321 | /* | ||
322 | * They have to be macros in order to do the constant folding | ||
323 | * correctly - if the argument passed into a inline function | ||
324 | * it is no longer constant according to gcc.. | ||
325 | */ | ||
326 | # undef ntohl | ||
327 | # undef ntohs | ||
328 | # undef htonl | ||
329 | # undef htons | ||
330 | |||
331 | # define ___htonl(x) __cpu_to_be32(x) | ||
332 | # define ___htons(x) __cpu_to_be16(x) | ||
333 | # define ___ntohl(x) __be32_to_cpu(x) | ||
334 | # define ___ntohs(x) __be16_to_cpu(x) | ||
335 | |||
336 | # define htonl(x) ___htonl(x) | ||
337 | # define ntohl(x) ___ntohl(x) | ||
338 | # define htons(x) ___htons(x) | ||
339 | # define ntohs(x) ___ntohs(x) | ||
340 | |||
341 | static inline void le16_add_cpu(__le16 *var, u16 val) | ||
342 | { | ||
343 | *var = cpu_to_le16(le16_to_cpup(var) + val); | ||
344 | } | ||
345 | |||
346 | static inline void le32_add_cpu(__le32 *var, u32 val) | ||
347 | { | ||
348 | *var = cpu_to_le32(le32_to_cpup(var) + val); | ||
349 | } | ||
350 | |||
351 | static inline void le64_add_cpu(__le64 *var, u64 val) | ||
352 | { | ||
353 | *var = cpu_to_le64(le64_to_cpup(var) + val); | ||
354 | } | ||
355 | |||
356 | static inline void be16_add_cpu(__be16 *var, u16 val) | ||
357 | { | ||
358 | *var = cpu_to_be16(be16_to_cpup(var) + val); | ||
359 | } | ||
360 | |||
361 | static inline void be32_add_cpu(__be32 *var, u32 val) | ||
362 | { | ||
363 | *var = cpu_to_be32(be32_to_cpup(var) + val); | ||
364 | } | ||
365 | |||
366 | static inline void be64_add_cpu(__be64 *var, u64 val) | ||
367 | { | ||
368 | *var = cpu_to_be64(be64_to_cpup(var) + val); | ||
369 | } | ||
370 | |||
371 | #endif /* __KERNEL__ */ | ||
372 | #endif /* _LINUX_BYTEORDER_H */ | ||
diff --git a/include/linux/completion.h b/include/linux/completion.h index d2961b66d53d..57faa60de9bd 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -55,4 +55,49 @@ extern void complete_all(struct completion *); | |||
55 | 55 | ||
56 | #define INIT_COMPLETION(x) ((x).done = 0) | 56 | #define INIT_COMPLETION(x) ((x).done = 0) |
57 | 57 | ||
58 | |||
59 | /** | ||
60 | * try_wait_for_completion - try to decrement a completion without blocking | ||
61 | * @x: completion structure | ||
62 | * | ||
63 | * Returns: 0 if a decrement cannot be done without blocking | ||
64 | * 1 if a decrement succeeded. | ||
65 | * | ||
66 | * If a completion is being used as a counting completion, | ||
67 | * attempt to decrement the counter without blocking. This | ||
68 | * enables us to avoid waiting if the resource the completion | ||
69 | * is protecting is not available. | ||
70 | */ | ||
71 | static inline bool try_wait_for_completion(struct completion *x) | ||
72 | { | ||
73 | int ret = 1; | ||
74 | |||
75 | spin_lock_irq(&x->wait.lock); | ||
76 | if (!x->done) | ||
77 | ret = 0; | ||
78 | else | ||
79 | x->done--; | ||
80 | spin_unlock_irq(&x->wait.lock); | ||
81 | return ret; | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * completion_done - Test to see if a completion has any waiters | ||
86 | * @x: completion structure | ||
87 | * | ||
88 | * Returns: 0 if there are waiters (wait_for_completion() in progress) | ||
89 | * 1 if there are no waiters. | ||
90 | * | ||
91 | */ | ||
92 | static inline bool completion_done(struct completion *x) | ||
93 | { | ||
94 | int ret = 1; | ||
95 | |||
96 | spin_lock_irq(&x->wait.lock); | ||
97 | if (!x->done) | ||
98 | ret = 0; | ||
99 | spin_unlock_irq(&x->wait.lock); | ||
100 | return ret; | ||
101 | } | ||
102 | |||
58 | #endif | 103 | #endif |
diff --git a/include/linux/cred.h b/include/linux/cred.h new file mode 100644 index 000000000000..b69222cc1fd2 --- /dev/null +++ b/include/linux/cred.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* Credentials management | ||
2 | * | ||
3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_CRED_H | ||
13 | #define _LINUX_CRED_H | ||
14 | |||
15 | #define get_current_user() (get_uid(current->user)) | ||
16 | |||
17 | #define task_uid(task) ((task)->uid) | ||
18 | #define task_gid(task) ((task)->gid) | ||
19 | #define task_euid(task) ((task)->euid) | ||
20 | #define task_egid(task) ((task)->egid) | ||
21 | |||
22 | #define current_uid() (current->uid) | ||
23 | #define current_gid() (current->gid) | ||
24 | #define current_euid() (current->euid) | ||
25 | #define current_egid() (current->egid) | ||
26 | #define current_suid() (current->suid) | ||
27 | #define current_sgid() (current->sgid) | ||
28 | #define current_fsuid() (current->fsuid) | ||
29 | #define current_fsgid() (current->fsgid) | ||
30 | #define current_cap() (current->cap_effective) | ||
31 | |||
32 | #define current_uid_gid(_uid, _gid) \ | ||
33 | do { \ | ||
34 | *(_uid) = current->uid; \ | ||
35 | *(_gid) = current->gid; \ | ||
36 | } while(0) | ||
37 | |||
38 | #define current_euid_egid(_uid, _gid) \ | ||
39 | do { \ | ||
40 | *(_uid) = current->euid; \ | ||
41 | *(_gid) = current->egid; \ | ||
42 | } while(0) | ||
43 | |||
44 | #define current_fsuid_fsgid(_uid, _gid) \ | ||
45 | do { \ | ||
46 | *(_uid) = current->fsuid; \ | ||
47 | *(_gid) = current->fsgid; \ | ||
48 | } while(0) | ||
49 | |||
50 | #endif /* _LINUX_CRED_H */ | ||
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index acbdbcc16051..6e199c8dfacc 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
@@ -24,34 +24,8 @@ | |||
24 | */ | 24 | */ |
25 | #ifdef CONFIG_FIRMWARE_MEMMAP | 25 | #ifdef CONFIG_FIRMWARE_MEMMAP |
26 | 26 | ||
27 | /** | ||
28 | * Adds a firmware mapping entry. This function uses kmalloc() for memory | ||
29 | * allocation. Use firmware_map_add_early() if you want to use the bootmem | ||
30 | * allocator. | ||
31 | * | ||
32 | * That function must be called before late_initcall. | ||
33 | * | ||
34 | * @start: Start of the memory range. | ||
35 | * @end: End of the memory range (inclusive). | ||
36 | * @type: Type of the memory range. | ||
37 | * | ||
38 | * Returns 0 on success, or -ENOMEM if no memory could be allocated. | ||
39 | */ | ||
40 | int firmware_map_add(resource_size_t start, resource_size_t end, | 27 | int firmware_map_add(resource_size_t start, resource_size_t end, |
41 | const char *type); | 28 | const char *type); |
42 | |||
43 | /** | ||
44 | * Adds a firmware mapping entry. This function uses the bootmem allocator | ||
45 | * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). | ||
46 | * | ||
47 | * That function must be called before late_initcall. | ||
48 | * | ||
49 | * @start: Start of the memory range. | ||
50 | * @end: End of the memory range (inclusive). | ||
51 | * @type: Type of the memory range. | ||
52 | * | ||
53 | * Returns 0 on success, or -ENOMEM if no memory could be allocated. | ||
54 | */ | ||
55 | int firmware_map_add_early(resource_size_t start, resource_size_t end, | 29 | int firmware_map_add_early(resource_size_t start, resource_size_t end, |
56 | const char *type); | 30 | const char *type); |
57 | 31 | ||
diff --git a/include/linux/harrier_defs.h b/include/linux/harrier_defs.h deleted file mode 100644 index efef11db790f..000000000000 --- a/include/linux/harrier_defs.h +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | /* | ||
2 | * include/linux/harrier_defs.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG Harrier North Bridge & Memory controller | ||
5 | * | ||
6 | * Author: Dale Farnsworth | ||
7 | * dale.farnsworth@mvista.com | ||
8 | * | ||
9 | * Extracted from asm-ppc/harrier.h by: | ||
10 | * Randy Vinson | ||
11 | * rvinson@mvista.com | ||
12 | * | ||
13 | * Copyright 2001-2002 MontaVista Software Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASMPPC_HARRIER_DEFS_H | ||
22 | #define __ASMPPC_HARRIER_DEFS_H | ||
23 | |||
24 | #define HARRIER_DEFAULT_XCSR_BASE 0xfeff0000 | ||
25 | |||
26 | #define HARRIER_VEND_DEV_ID 0x1057480b | ||
27 | |||
28 | #define HARRIER_VENI_OFF 0x00 | ||
29 | |||
30 | #define HARRIER_REVI_OFF 0x05 | ||
31 | #define HARRIER_UCTL_OFF 0xd0 | ||
32 | #define HARRIER_XTAL64_MASK 0x02 | ||
33 | |||
34 | #define HARRIER_MISC_CSR_OFF 0x1c | ||
35 | #define HARRIER_RSTOUT 0x01000000 | ||
36 | #define HARRIER_SYSCON 0x08000000 | ||
37 | #define HARRIER_EREADY 0x10000000 | ||
38 | #define HARRIER_ERDYS 0x20000000 | ||
39 | |||
40 | /* Function exception registers */ | ||
41 | #define HARRIER_FEEN_OFF 0x40 /* enable */ | ||
42 | #define HARRIER_FEST_OFF 0x44 /* status */ | ||
43 | #define HARRIER_FEMA_OFF 0x48 /* mask */ | ||
44 | #define HARRIER_FECL_OFF 0x4c /* clear */ | ||
45 | |||
46 | #define HARRIER_FE_DMA 0x80 | ||
47 | #define HARRIER_FE_MIDB 0x40 | ||
48 | #define HARRIER_FE_MIM0 0x20 | ||
49 | #define HARRIER_FE_MIM1 0x10 | ||
50 | #define HARRIER_FE_MIP 0x08 | ||
51 | #define HARRIER_FE_UA0 0x04 | ||
52 | #define HARRIER_FE_UA1 0x02 | ||
53 | #define HARRIER_FE_ABT 0x01 | ||
54 | |||
55 | #define HARRIER_SERIAL_0_OFF 0xc0 | ||
56 | |||
57 | #define HARRIER_MBAR_OFF 0xe0 | ||
58 | #define HARRIER_MBAR_MSK 0xfffc0000 | ||
59 | #define HARRIER_MPIC_CSR_OFF 0xe4 | ||
60 | #define HARRIER_MPIC_OPI_ENABLE 0x40 | ||
61 | #define HARRIER_MPIC_IFEVP_OFF 0x10200 | ||
62 | #define HARRIER_MPIC_IFEVP_VECT_MSK 0xff | ||
63 | #define HARRIER_MPIC_IFEDE_OFF 0x10210 | ||
64 | |||
65 | /* | ||
66 | * Define the Memory Controller register offsets. | ||
67 | */ | ||
68 | #define HARRIER_SDBA_OFF 0x110 | ||
69 | #define HARRIER_SDBB_OFF 0x114 | ||
70 | #define HARRIER_SDBC_OFF 0x118 | ||
71 | #define HARRIER_SDBD_OFF 0x11c | ||
72 | #define HARRIER_SDBE_OFF 0x120 | ||
73 | #define HARRIER_SDBF_OFF 0x124 | ||
74 | #define HARRIER_SDBG_OFF 0x128 | ||
75 | #define HARRIER_SDBH_OFF 0x12c | ||
76 | |||
77 | #define HARRIER_SDB_ENABLE 0x00000100 | ||
78 | #define HARRIER_SDB_SIZE_MASK 0xf | ||
79 | #define HARRIER_SDB_SIZE_SHIFT 16 | ||
80 | #define HARRIER_SDB_BASE_MASK 0xff | ||
81 | #define HARRIER_SDB_BASE_SHIFT 24 | ||
82 | |||
83 | /* | ||
84 | * Define outbound register offsets. | ||
85 | */ | ||
86 | #define HARRIER_OTAD0_OFF 0x220 | ||
87 | #define HARRIER_OTOF0_OFF 0x224 | ||
88 | #define HARRIER_OTAD1_OFF 0x228 | ||
89 | #define HARRIER_OTOF1_OFF 0x22c | ||
90 | #define HARRIER_OTAD2_OFF 0x230 | ||
91 | #define HARRIER_OTOF2_OFF 0x234 | ||
92 | #define HARRIER_OTAD3_OFF 0x238 | ||
93 | #define HARRIER_OTOF3_OFF 0x23c | ||
94 | |||
95 | #define HARRIER_OTADX_START_MSK 0xffff0000UL | ||
96 | #define HARRIER_OTADX_END_MSK 0x0000ffffUL | ||
97 | |||
98 | #define HARRIER_OTOFX_OFF_MSK 0xffff0000UL | ||
99 | #define HARRIER_OTOFX_ENA 0x80UL | ||
100 | #define HARRIER_OTOFX_WPE 0x10UL | ||
101 | #define HARRIER_OTOFX_SGE 0x08UL | ||
102 | #define HARRIER_OTOFX_RAE 0x04UL | ||
103 | #define HARRIER_OTOFX_MEM 0x02UL | ||
104 | #define HARRIER_OTOFX_IOM 0x01UL | ||
105 | |||
106 | /* | ||
107 | * Define generic message passing register offsets | ||
108 | */ | ||
109 | /* Mirrored registers (visible from both PowerPC and PCI space) */ | ||
110 | #define HARRIER_XCSR_MP_BASE_OFF 0x290 /* base offset in XCSR space */ | ||
111 | #define HARRIER_PMEP_MP_BASE_OFF 0x100 /* base offset in PMEM space */ | ||
112 | #define HARRIER_MGOM0_OFF 0x00 /* outbound msg 0 */ | ||
113 | #define HARRIER_MGOM1_OFF 0x04 /* outbound msg 1 */ | ||
114 | #define HARRIER_MGOD_OFF 0x08 /* outbound doorbells */ | ||
115 | |||
116 | #define HARRIER_MGIM0_OFF 0x10 /* inbound msg 0 */ | ||
117 | #define HARRIER_MGIM1_OFF 0x14 /* inbound msg 1 */ | ||
118 | #define HARRIER_MGID_OFF 0x18 /* inbound doorbells */ | ||
119 | |||
120 | /* PowerPC-only registers */ | ||
121 | #define HARRIER_MGIDM_OFF 0x20 /* inbound doorbell mask */ | ||
122 | |||
123 | /* PCI-only registers */ | ||
124 | #define HARRIER_PMEP_MGST_OFF 0x20 /* (outbound) interrupt status */ | ||
125 | #define HARRIER_PMEP_MGMS_OFF 0x24 /* (outbound) interrupt mask */ | ||
126 | #define HARRIER_MG_OMI0 (1<<4) | ||
127 | #define HARRIER_MG_OMI1 (1<<5) | ||
128 | |||
129 | #define HARRIER_PMEP_MGODM_OFF 0x28 /* outbound doorbell mask */ | ||
130 | |||
131 | /* | ||
132 | * Define PCI configuration space register offsets | ||
133 | */ | ||
134 | #define HARRIER_XCSR_TO_PCFS_OFF 0x300 | ||
135 | |||
136 | /* | ||
137 | * Define message passing attribute register offset | ||
138 | */ | ||
139 | #define HARRIER_MPAT_OFF 0x44 | ||
140 | |||
141 | /* | ||
142 | * Define inbound attribute register offsets. | ||
143 | */ | ||
144 | #define HARRIER_ITSZ0_OFF 0x48 | ||
145 | #define HARRIER_ITAT0_OFF 0x4c | ||
146 | |||
147 | #define HARRIER_ITSZ1_OFF 0x50 | ||
148 | #define HARRIER_ITAT1_OFF 0x54 | ||
149 | |||
150 | #define HARRIER_ITSZ2_OFF 0x58 | ||
151 | #define HARRIER_ITAT2_OFF 0x5c | ||
152 | |||
153 | #define HARRIER_ITSZ3_OFF 0x60 | ||
154 | #define HARRIER_ITAT3_OFF 0x64 | ||
155 | |||
156 | /* inbound translation size constants */ | ||
157 | #define HARRIER_ITSZ_MSK 0xff | ||
158 | #define HARRIER_ITSZ_4KB 0x00 | ||
159 | #define HARRIER_ITSZ_8KB 0x01 | ||
160 | #define HARRIER_ITSZ_16KB 0x02 | ||
161 | #define HARRIER_ITSZ_32KB 0x03 | ||
162 | #define HARRIER_ITSZ_64KB 0x04 | ||
163 | #define HARRIER_ITSZ_128KB 0x05 | ||
164 | #define HARRIER_ITSZ_256KB 0x06 | ||
165 | #define HARRIER_ITSZ_512KB 0x07 | ||
166 | #define HARRIER_ITSZ_1MB 0x08 | ||
167 | #define HARRIER_ITSZ_2MB 0x09 | ||
168 | #define HARRIER_ITSZ_4MB 0x0A | ||
169 | #define HARRIER_ITSZ_8MB 0x0B | ||
170 | #define HARRIER_ITSZ_16MB 0x0C | ||
171 | #define HARRIER_ITSZ_32MB 0x0D | ||
172 | #define HARRIER_ITSZ_64MB 0x0E | ||
173 | #define HARRIER_ITSZ_128MB 0x0F | ||
174 | #define HARRIER_ITSZ_256MB 0x10 | ||
175 | #define HARRIER_ITSZ_512MB 0x11 | ||
176 | #define HARRIER_ITSZ_1GB 0x12 | ||
177 | #define HARRIER_ITSZ_2GB 0x13 | ||
178 | |||
179 | /* inbound translation offset */ | ||
180 | #define HARRIER_ITOF_SHIFT 0x10 | ||
181 | #define HARRIER_ITOF_MSK 0xffff | ||
182 | |||
183 | /* inbound translation atttributes */ | ||
184 | #define HARRIER_ITAT_PRE (1<<3) | ||
185 | #define HARRIER_ITAT_RAE (1<<4) | ||
186 | #define HARRIER_ITAT_WPE (1<<5) | ||
187 | #define HARRIER_ITAT_MEM (1<<6) | ||
188 | #define HARRIER_ITAT_ENA (1<<7) | ||
189 | #define HARRIER_ITAT_GBL (1<<16) | ||
190 | |||
191 | #define HARRIER_LBA_OFF 0x80 | ||
192 | #define HARRIER_LBA_MSK (1<<31) | ||
193 | |||
194 | #define HARRIER_XCSR_SIZE 1024 | ||
195 | |||
196 | /* macros to calculate message passing register offsets */ | ||
197 | #define HARRIER_MP_XCSR(x) ((u32)HARRIER_XCSR_MP_BASE_OFF + (u32)x) | ||
198 | |||
199 | #define HARRIER_MP_PMEP(x) ((u32)HARRIER_PMEP_MP_BASE_OFF + (u32)x) | ||
200 | |||
201 | /* | ||
202 | * Define PCI configuration space register offsets | ||
203 | */ | ||
204 | #define HARRIER_MPBAR_OFF PCI_BASE_ADDRESS_0 | ||
205 | #define HARRIER_ITBAR0_OFF PCI_BASE_ADDRESS_1 | ||
206 | #define HARRIER_ITBAR1_OFF PCI_BASE_ADDRESS_2 | ||
207 | #define HARRIER_ITBAR2_OFF PCI_BASE_ADDRESS_3 | ||
208 | #define HARRIER_ITBAR3_OFF PCI_BASE_ADDRESS_4 | ||
209 | |||
210 | #define HARRIER_XCSR_CONFIG(x) ((u32)HARRIER_XCSR_TO_PCFS_OFF + (u32)x) | ||
211 | |||
212 | #endif /* __ASMPPC_HARRIER_DEFS_H */ | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 4862398e05bf..bf34c5f4c051 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -39,7 +39,6 @@ | |||
39 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ | 39 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ |
40 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ | 40 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ |
41 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ | 41 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ |
42 | #define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */ | ||
43 | #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ | 42 | #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ |
44 | #define I2C_DRIVERID_PCF8583 25 /* real time clock */ | 43 | #define I2C_DRIVERID_PCF8583 25 /* real time clock */ |
45 | #define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ | 44 | #define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ |
@@ -95,7 +94,6 @@ | |||
95 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | 94 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
96 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ | 95 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ |
97 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ | 96 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ |
98 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ | ||
99 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ | 97 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ |
100 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ | 98 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ |
101 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ | 99 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ |
diff --git a/include/linux/init.h b/include/linux/init.h index 11b84e106053..93538b696e3d 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -139,6 +139,7 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; | |||
139 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 139 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
140 | 140 | ||
141 | /* Defined in init/main.c */ | 141 | /* Defined in init/main.c */ |
142 | extern int do_one_initcall(initcall_t fn); | ||
142 | extern char __initdata boot_command_line[]; | 143 | extern char __initdata boot_command_line[]; |
143 | extern char *saved_command_line; | 144 | extern char *saved_command_line; |
144 | extern unsigned int reset_devices; | 145 | extern unsigned int reset_devices; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index aaa998f65c7a..2651f805ba6d 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -108,6 +108,13 @@ struct completion; | |||
108 | struct pt_regs; | 108 | struct pt_regs; |
109 | struct user; | 109 | struct user; |
110 | 110 | ||
111 | #ifdef CONFIG_PREEMPT_VOLUNTARY | ||
112 | extern int _cond_resched(void); | ||
113 | # define might_resched() _cond_resched() | ||
114 | #else | ||
115 | # define might_resched() do { } while (0) | ||
116 | #endif | ||
117 | |||
111 | /** | 118 | /** |
112 | * might_sleep - annotation for functions that can sleep | 119 | * might_sleep - annotation for functions that can sleep |
113 | * | 120 | * |
@@ -118,13 +125,6 @@ struct user; | |||
118 | * be bitten later when the calling function happens to sleep when it is not | 125 | * be bitten later when the calling function happens to sleep when it is not |
119 | * supposed to. | 126 | * supposed to. |
120 | */ | 127 | */ |
121 | #ifdef CONFIG_PREEMPT_VOLUNTARY | ||
122 | extern int _cond_resched(void); | ||
123 | # define might_resched() _cond_resched() | ||
124 | #else | ||
125 | # define might_resched() do { } while (0) | ||
126 | #endif | ||
127 | |||
128 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP | 128 | #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP |
129 | void __might_sleep(char *file, int line); | 129 | void __might_sleep(char *file, int line); |
130 | # define might_sleep() \ | 130 | # define might_sleep() \ |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 2486eb4edbf1..331e5f1c2d8e 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -89,6 +89,7 @@ struct lock_class { | |||
89 | 89 | ||
90 | struct lockdep_subclass_key *key; | 90 | struct lockdep_subclass_key *key; |
91 | unsigned int subclass; | 91 | unsigned int subclass; |
92 | unsigned int dep_gen_id; | ||
92 | 93 | ||
93 | /* | 94 | /* |
94 | * IRQ/softirq usage tracking bits: | 95 | * IRQ/softirq usage tracking bits: |
@@ -189,6 +190,14 @@ struct lock_chain { | |||
189 | u64 chain_key; | 190 | u64 chain_key; |
190 | }; | 191 | }; |
191 | 192 | ||
193 | #define MAX_LOCKDEP_KEYS_BITS 13 | ||
194 | /* | ||
195 | * Subtract one because we offset hlock->class_idx by 1 in order | ||
196 | * to make 0 mean no class. This avoids overflowing the class_idx | ||
197 | * bitfield and hitting the BUG in hlock_class(). | ||
198 | */ | ||
199 | #define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1) | ||
200 | |||
192 | struct held_lock { | 201 | struct held_lock { |
193 | /* | 202 | /* |
194 | * One-way hash of the dependency chain up to this point. We | 203 | * One-way hash of the dependency chain up to this point. We |
@@ -205,14 +214,14 @@ struct held_lock { | |||
205 | * with zero), here we store the previous hash value: | 214 | * with zero), here we store the previous hash value: |
206 | */ | 215 | */ |
207 | u64 prev_chain_key; | 216 | u64 prev_chain_key; |
208 | struct lock_class *class; | ||
209 | unsigned long acquire_ip; | 217 | unsigned long acquire_ip; |
210 | struct lockdep_map *instance; | 218 | struct lockdep_map *instance; |
211 | 219 | struct lockdep_map *nest_lock; | |
212 | #ifdef CONFIG_LOCK_STAT | 220 | #ifdef CONFIG_LOCK_STAT |
213 | u64 waittime_stamp; | 221 | u64 waittime_stamp; |
214 | u64 holdtime_stamp; | 222 | u64 holdtime_stamp; |
215 | #endif | 223 | #endif |
224 | unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS; | ||
216 | /* | 225 | /* |
217 | * The lock-stack is unified in that the lock chains of interrupt | 226 | * The lock-stack is unified in that the lock chains of interrupt |
218 | * contexts nest ontop of process context chains, but we 'separate' | 227 | * contexts nest ontop of process context chains, but we 'separate' |
@@ -226,11 +235,11 @@ struct held_lock { | |||
226 | * The following field is used to detect when we cross into an | 235 | * The following field is used to detect when we cross into an |
227 | * interrupt context: | 236 | * interrupt context: |
228 | */ | 237 | */ |
229 | int irq_context; | 238 | unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */ |
230 | int trylock; | 239 | unsigned int trylock:1; |
231 | int read; | 240 | unsigned int read:2; /* see lock_acquire() comment */ |
232 | int check; | 241 | unsigned int check:2; /* see lock_acquire() comment */ |
233 | int hardirqs_off; | 242 | unsigned int hardirqs_off:1; |
234 | }; | 243 | }; |
235 | 244 | ||
236 | /* | 245 | /* |
@@ -294,11 +303,15 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
294 | * 2: full validation | 303 | * 2: full validation |
295 | */ | 304 | */ |
296 | extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, | 305 | extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, |
297 | int trylock, int read, int check, unsigned long ip); | 306 | int trylock, int read, int check, |
307 | struct lockdep_map *nest_lock, unsigned long ip); | ||
298 | 308 | ||
299 | extern void lock_release(struct lockdep_map *lock, int nested, | 309 | extern void lock_release(struct lockdep_map *lock, int nested, |
300 | unsigned long ip); | 310 | unsigned long ip); |
301 | 311 | ||
312 | extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass, | ||
313 | unsigned long ip); | ||
314 | |||
302 | # define INIT_LOCKDEP .lockdep_recursion = 0, | 315 | # define INIT_LOCKDEP .lockdep_recursion = 0, |
303 | 316 | ||
304 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) | 317 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) |
@@ -313,8 +326,9 @@ static inline void lockdep_on(void) | |||
313 | { | 326 | { |
314 | } | 327 | } |
315 | 328 | ||
316 | # define lock_acquire(l, s, t, r, c, i) do { } while (0) | 329 | # define lock_acquire(l, s, t, r, c, n, i) do { } while (0) |
317 | # define lock_release(l, n, i) do { } while (0) | 330 | # define lock_release(l, n, i) do { } while (0) |
331 | # define lock_set_subclass(l, s, i) do { } while (0) | ||
318 | # define lockdep_init() do { } while (0) | 332 | # define lockdep_init() do { } while (0) |
319 | # define lockdep_info() do { } while (0) | 333 | # define lockdep_info() do { } while (0) |
320 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) | 334 | # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) |
@@ -400,9 +414,11 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
400 | 414 | ||
401 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 415 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
402 | # ifdef CONFIG_PROVE_LOCKING | 416 | # ifdef CONFIG_PROVE_LOCKING |
403 | # define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) | 417 | # define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
418 | # define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) | ||
404 | # else | 419 | # else |
405 | # define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) | 420 | # define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
421 | # define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, NULL, i) | ||
406 | # endif | 422 | # endif |
407 | # define spin_release(l, n, i) lock_release(l, n, i) | 423 | # define spin_release(l, n, i) lock_release(l, n, i) |
408 | #else | 424 | #else |
@@ -412,11 +428,11 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
412 | 428 | ||
413 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 429 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
414 | # ifdef CONFIG_PROVE_LOCKING | 430 | # ifdef CONFIG_PROVE_LOCKING |
415 | # define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) | 431 | # define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
416 | # define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i) | 432 | # define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i) |
417 | # else | 433 | # else |
418 | # define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) | 434 | # define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
419 | # define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i) | 435 | # define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i) |
420 | # endif | 436 | # endif |
421 | # define rwlock_release(l, n, i) lock_release(l, n, i) | 437 | # define rwlock_release(l, n, i) lock_release(l, n, i) |
422 | #else | 438 | #else |
@@ -427,9 +443,9 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
427 | 443 | ||
428 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 444 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
429 | # ifdef CONFIG_PROVE_LOCKING | 445 | # ifdef CONFIG_PROVE_LOCKING |
430 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) | 446 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
431 | # else | 447 | # else |
432 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) | 448 | # define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
433 | # endif | 449 | # endif |
434 | # define mutex_release(l, n, i) lock_release(l, n, i) | 450 | # define mutex_release(l, n, i) lock_release(l, n, i) |
435 | #else | 451 | #else |
@@ -439,11 +455,11 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
439 | 455 | ||
440 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 456 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
441 | # ifdef CONFIG_PROVE_LOCKING | 457 | # ifdef CONFIG_PROVE_LOCKING |
442 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) | 458 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) |
443 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i) | 459 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) |
444 | # else | 460 | # else |
445 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) | 461 | # define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) |
446 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i) | 462 | # define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) |
447 | # endif | 463 | # endif |
448 | # define rwsem_release(l, n, i) lock_release(l, n, i) | 464 | # define rwsem_release(l, n, i) lock_release(l, n, i) |
449 | #else | 465 | #else |
@@ -452,4 +468,16 @@ static inline void print_irqtrace_events(struct task_struct *curr) | |||
452 | # define rwsem_release(l, n, i) do { } while (0) | 468 | # define rwsem_release(l, n, i) do { } while (0) |
453 | #endif | 469 | #endif |
454 | 470 | ||
471 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
472 | # ifdef CONFIG_PROVE_LOCKING | ||
473 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) | ||
474 | # else | ||
475 | # define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) | ||
476 | # endif | ||
477 | # define lock_map_release(l) lock_release(l, 1, _THIS_IP_) | ||
478 | #else | ||
479 | # define lock_map_acquire(l) do { } while (0) | ||
480 | # define lock_map_release(l) do { } while (0) | ||
481 | #endif | ||
482 | |||
455 | #endif /* __LINUX_LOCKDEP_H */ | 483 | #endif /* __LINUX_LOCKDEP_H */ |
diff --git a/include/linux/mfd/t7l66xb.h b/include/linux/mfd/t7l66xb.h new file mode 100644 index 000000000000..e83c7f2036f9 --- /dev/null +++ b/include/linux/mfd/t7l66xb.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * This file contains the definitions for the T7L66XB | ||
3 | * | ||
4 | * (C) Copyright 2005 Ian Molton <spyro@f2s.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | #ifndef MFD_T7L66XB_H | ||
12 | #define MFD_T7L66XB_H | ||
13 | |||
14 | #include <linux/mfd/core.h> | ||
15 | #include <linux/mfd/tmio.h> | ||
16 | |||
17 | struct t7l66xb_platform_data { | ||
18 | int (*enable_clk32k)(struct platform_device *dev); | ||
19 | void (*disable_clk32k)(struct platform_device *dev); | ||
20 | int (*enable)(struct platform_device *dev); | ||
21 | int (*disable)(struct platform_device *dev); | ||
22 | int (*suspend)(struct platform_device *dev); | ||
23 | int (*resume)(struct platform_device *dev); | ||
24 | |||
25 | int irq_base; /* The base for subdevice irqs */ | ||
26 | |||
27 | struct tmio_nand_data *nand_data; | ||
28 | }; | ||
29 | |||
30 | |||
31 | #define IRQ_T7L66XB_MMC (1) | ||
32 | #define IRQ_T7L66XB_NAND (3) | ||
33 | |||
34 | #define T7L66XB_NR_IRQS 8 | ||
35 | |||
36 | #endif | ||
diff --git a/include/linux/mfd/tc6387xb.h b/include/linux/mfd/tc6387xb.h new file mode 100644 index 000000000000..fa06e0610b8e --- /dev/null +++ b/include/linux/mfd/tc6387xb.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * This file contains the definitions for the TC6387XB | ||
3 | * | ||
4 | * (C) Copyright 2005 Ian Molton <spyro@f2s.com> | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | */ | ||
10 | #ifndef MFD_TC6387XB_H | ||
11 | #define MFD_TC6387XB_H | ||
12 | |||
13 | struct tc6387xb_platform_data { | ||
14 | int (*enable_clk32k)(struct platform_device *dev); | ||
15 | void (*disable_clk32k)(struct platform_device *dev); | ||
16 | |||
17 | int (*enable)(struct platform_device *dev); | ||
18 | int (*disable)(struct platform_device *dev); | ||
19 | int (*suspend)(struct platform_device *dev); | ||
20 | int (*resume)(struct platform_device *dev); | ||
21 | }; | ||
22 | |||
23 | #endif | ||
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h index 7cc824a58f7c..fec7b3f7a81f 100644 --- a/include/linux/mfd/tc6393xb.h +++ b/include/linux/mfd/tc6393xb.h | |||
@@ -14,8 +14,8 @@ | |||
14 | * published by the Free Software Foundation. | 14 | * published by the Free Software Foundation. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef TC6393XB_H | 17 | #ifndef MFD_TC6393XB_H |
18 | #define TC6393XB_H | 18 | #define MFD_TC6393XB_H |
19 | 19 | ||
20 | /* Also one should provide the CK3P6MI clock */ | 20 | /* Also one should provide the CK3P6MI clock */ |
21 | struct tc6393xb_platform_data { | 21 | struct tc6393xb_platform_data { |
@@ -29,7 +29,7 @@ struct tc6393xb_platform_data { | |||
29 | int (*suspend)(struct platform_device *dev); | 29 | int (*suspend)(struct platform_device *dev); |
30 | int (*resume)(struct platform_device *dev); | 30 | int (*resume)(struct platform_device *dev); |
31 | 31 | ||
32 | int irq_base; /* a base for cascaded irq */ | 32 | int irq_base; /* base for subdevice irqs */ |
33 | int gpio_base; | 33 | int gpio_base; |
34 | 34 | ||
35 | struct tmio_nand_data *nand_data; | 35 | struct tmio_nand_data *nand_data; |
@@ -40,9 +40,6 @@ struct tc6393xb_platform_data { | |||
40 | */ | 40 | */ |
41 | #define IRQ_TC6393_NAND 0 | 41 | #define IRQ_TC6393_NAND 0 |
42 | #define IRQ_TC6393_MMC 1 | 42 | #define IRQ_TC6393_MMC 1 |
43 | #define IRQ_TC6393_OHCI 2 | ||
44 | #define IRQ_TC6393_SERIAL 3 | ||
45 | #define IRQ_TC6393_FB 4 | ||
46 | 43 | ||
47 | #define TC6393XB_NR_IRQS 8 | 44 | #define TC6393XB_NR_IRQS 8 |
48 | 45 | ||
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 9438d8c9ac1c..ec612e66391c 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -1,6 +1,21 @@ | |||
1 | #ifndef MFD_TMIO_H | 1 | #ifndef MFD_TMIO_H |
2 | #define MFD_TMIO_H | 2 | #define MFD_TMIO_H |
3 | 3 | ||
4 | #define tmio_ioread8(addr) readb(addr) | ||
5 | #define tmio_ioread16(addr) readw(addr) | ||
6 | #define tmio_ioread16_rep(r, b, l) readsw(r, b, l) | ||
7 | #define tmio_ioread32(addr) \ | ||
8 | (((u32) readw((addr))) | (((u32) readw((addr) + 2)) << 16)) | ||
9 | |||
10 | #define tmio_iowrite8(val, addr) writeb((val), (addr)) | ||
11 | #define tmio_iowrite16(val, addr) writew((val), (addr)) | ||
12 | #define tmio_iowrite16_rep(r, b, l) writesw(r, b, l) | ||
13 | #define tmio_iowrite32(val, addr) \ | ||
14 | do { \ | ||
15 | writew((val), (addr)); \ | ||
16 | writew((val) >> 16, (addr) + 2); \ | ||
17 | } while (0) | ||
18 | |||
4 | /* | 19 | /* |
5 | * data for the NAND controller | 20 | * data for the NAND controller |
6 | */ | 21 | */ |
@@ -10,8 +25,4 @@ struct tmio_nand_data { | |||
10 | unsigned int num_partitions; | 25 | unsigned int num_partitions; |
11 | }; | 26 | }; |
12 | 27 | ||
13 | #define TMIO_NAND_CONFIG "tmio-nand-config" | ||
14 | #define TMIO_NAND_CONTROL "tmio-nand-control" | ||
15 | #define TMIO_NAND_IRQ "tmio-nand" | ||
16 | |||
17 | #endif | 28 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 335288bff1b7..fa651609b65d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -834,7 +834,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
834 | struct vm_area_struct **pprev, unsigned long start, | 834 | struct vm_area_struct **pprev, unsigned long start, |
835 | unsigned long end, unsigned long newflags); | 835 | unsigned long end, unsigned long newflags); |
836 | 836 | ||
837 | #ifdef CONFIG_HAVE_GET_USER_PAGES_FAST | ||
838 | /* | 837 | /* |
839 | * get_user_pages_fast provides equivalent functionality to get_user_pages, | 838 | * get_user_pages_fast provides equivalent functionality to get_user_pages, |
840 | * operating on current and current->mm (force=0 and doesn't return any vmas). | 839 | * operating on current and current->mm (force=0 and doesn't return any vmas). |
@@ -848,25 +847,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
848 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 847 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
849 | struct page **pages); | 848 | struct page **pages); |
850 | 849 | ||
851 | #else | ||
852 | /* | ||
853 | * Should probably be moved to asm-generic, and architectures can include it if | ||
854 | * they don't implement their own get_user_pages_fast. | ||
855 | */ | ||
856 | #define get_user_pages_fast(start, nr_pages, write, pages) \ | ||
857 | ({ \ | ||
858 | struct mm_struct *mm = current->mm; \ | ||
859 | int ret; \ | ||
860 | \ | ||
861 | down_read(&mm->mmap_sem); \ | ||
862 | ret = get_user_pages(current, mm, start, nr_pages, \ | ||
863 | write, 0, pages, NULL); \ | ||
864 | up_read(&mm->mmap_sem); \ | ||
865 | \ | ||
866 | ret; \ | ||
867 | }) | ||
868 | #endif | ||
869 | |||
870 | /* | 850 | /* |
871 | * A callback you can register to apply pressure to ageable caches. | 851 | * A callback you can register to apply pressure to ageable caches. |
872 | * | 852 | * |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 825be3878f68..c0e14008a3c2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -641,6 +641,7 @@ int pci_restore_state(struct pci_dev *dev); | |||
641 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | 641 | int pci_set_power_state(struct pci_dev *dev, pci_power_t state); |
642 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 642 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
643 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 643 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
644 | void pci_pme_active(struct pci_dev *dev, bool enable); | ||
644 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 645 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
645 | pci_power_t pci_target_state(struct pci_dev *dev); | 646 | pci_power_t pci_target_state(struct pci_dev *dev); |
646 | int pci_prepare_to_sleep(struct pci_dev *dev); | 647 | int pci_prepare_to_sleep(struct pci_dev *dev); |
@@ -680,10 +681,12 @@ void pci_enable_bridges(struct pci_bus *bus); | |||
680 | /* Proper probing supporting hot-pluggable devices */ | 681 | /* Proper probing supporting hot-pluggable devices */ |
681 | int __must_check __pci_register_driver(struct pci_driver *, struct module *, | 682 | int __must_check __pci_register_driver(struct pci_driver *, struct module *, |
682 | const char *mod_name); | 683 | const char *mod_name); |
683 | static inline int __must_check pci_register_driver(struct pci_driver *driver) | 684 | |
684 | { | 685 | /* |
685 | return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); | 686 | * pci_register_driver must be a macro so that KBUILD_MODNAME can be expanded |
686 | } | 687 | */ |
688 | #define pci_register_driver(driver) \ | ||
689 | __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME) | ||
687 | 690 | ||
688 | void pci_unregister_driver(struct pci_driver *dev); | 691 | void pci_unregister_driver(struct pci_driver *dev); |
689 | void pci_remove_behind_bridge(struct pci_dev *dev); | 692 | void pci_remove_behind_bridge(struct pci_dev *dev); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 35a78415accc..9ec2bcce8e83 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2177,8 +2177,6 @@ | |||
2177 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 | 2177 | #define PCI_DEVICE_ID_HERC_WIN 0x5732 |
2178 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 | 2178 | #define PCI_DEVICE_ID_HERC_UNI 0x5832 |
2179 | 2179 | ||
2180 | #define PCI_VENDOR_ID_RDC 0x17f3 | ||
2181 | |||
2182 | #define PCI_VENDOR_ID_SITECOM 0x182d | 2180 | #define PCI_VENDOR_ID_SITECOM 0x182d |
2183 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | 2181 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 |
2184 | 2182 | ||
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h index 8c774905dcfe..4ab843622727 100644 --- a/include/linux/rcuclassic.h +++ b/include/linux/rcuclassic.h | |||
@@ -117,7 +117,7 @@ extern int rcu_needs_cpu(int cpu); | |||
117 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 117 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
118 | extern struct lockdep_map rcu_lock_map; | 118 | extern struct lockdep_map rcu_lock_map; |
119 | # define rcu_read_acquire() \ | 119 | # define rcu_read_acquire() \ |
120 | lock_acquire(&rcu_lock_map, 0, 0, 2, 1, _THIS_IP_) | 120 | lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_) |
121 | # define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) | 121 | # define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) |
122 | #else | 122 | #else |
123 | # define rcu_read_acquire() do { } while (0) | 123 | # define rcu_read_acquire() do { } while (0) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5270d449ff9d..cfb0d87b99fc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -87,6 +87,7 @@ struct sched_param { | |||
87 | #include <linux/task_io_accounting.h> | 87 | #include <linux/task_io_accounting.h> |
88 | #include <linux/kobject.h> | 88 | #include <linux/kobject.h> |
89 | #include <linux/latencytop.h> | 89 | #include <linux/latencytop.h> |
90 | #include <linux/cred.h> | ||
90 | 91 | ||
91 | #include <asm/processor.h> | 92 | #include <asm/processor.h> |
92 | 93 | ||
@@ -1551,16 +1552,10 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1551 | 1552 | ||
1552 | extern unsigned long long sched_clock(void); | 1553 | extern unsigned long long sched_clock(void); |
1553 | 1554 | ||
1554 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | 1555 | extern void sched_clock_init(void); |
1555 | static inline void sched_clock_init(void) | 1556 | extern u64 sched_clock_cpu(int cpu); |
1556 | { | ||
1557 | } | ||
1558 | |||
1559 | static inline u64 sched_clock_cpu(int cpu) | ||
1560 | { | ||
1561 | return sched_clock(); | ||
1562 | } | ||
1563 | 1557 | ||
1558 | #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK | ||
1564 | static inline void sched_clock_tick(void) | 1559 | static inline void sched_clock_tick(void) |
1565 | { | 1560 | { |
1566 | } | 1561 | } |
@@ -1572,28 +1567,11 @@ static inline void sched_clock_idle_sleep_event(void) | |||
1572 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) | 1567 | static inline void sched_clock_idle_wakeup_event(u64 delta_ns) |
1573 | { | 1568 | { |
1574 | } | 1569 | } |
1575 | 1570 | #else | |
1576 | #ifdef CONFIG_NO_HZ | ||
1577 | static inline void sched_clock_tick_stop(int cpu) | ||
1578 | { | ||
1579 | } | ||
1580 | |||
1581 | static inline void sched_clock_tick_start(int cpu) | ||
1582 | { | ||
1583 | } | ||
1584 | #endif | ||
1585 | |||
1586 | #else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ | ||
1587 | extern void sched_clock_init(void); | ||
1588 | extern u64 sched_clock_cpu(int cpu); | ||
1589 | extern void sched_clock_tick(void); | 1571 | extern void sched_clock_tick(void); |
1590 | extern void sched_clock_idle_sleep_event(void); | 1572 | extern void sched_clock_idle_sleep_event(void); |
1591 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1573 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
1592 | #ifdef CONFIG_NO_HZ | ||
1593 | extern void sched_clock_tick_stop(int cpu); | ||
1594 | extern void sched_clock_tick_start(int cpu); | ||
1595 | #endif | 1574 | #endif |
1596 | #endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ | ||
1597 | 1575 | ||
1598 | /* | 1576 | /* |
1599 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu | 1577 | * For kernel-internal use: high-speed (but slightly incorrect) per-cpu |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index a66304a09955..a1783b229ef4 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/string.h> | 5 | #include <linux/string.h> |
6 | #include <linux/mutex.h> | 6 | #include <linux/mutex.h> |
7 | #include <linux/cpumask.h> | ||
8 | #include <linux/nodemask.h> | ||
7 | 9 | ||
8 | struct seq_operations; | 10 | struct seq_operations; |
9 | struct file; | 11 | struct file; |
@@ -47,6 +49,16 @@ int seq_path(struct seq_file *, struct path *, char *); | |||
47 | int seq_dentry(struct seq_file *, struct dentry *, char *); | 49 | int seq_dentry(struct seq_file *, struct dentry *, char *); |
48 | int seq_path_root(struct seq_file *m, struct path *path, struct path *root, | 50 | int seq_path_root(struct seq_file *m, struct path *path, struct path *root, |
49 | char *esc); | 51 | char *esc); |
52 | int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits); | ||
53 | static inline int seq_cpumask(struct seq_file *m, cpumask_t *mask) | ||
54 | { | ||
55 | return seq_bitmap(m, mask->bits, NR_CPUS); | ||
56 | } | ||
57 | |||
58 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | ||
59 | { | ||
60 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); | ||
61 | } | ||
50 | 62 | ||
51 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); | 63 | int single_open(struct file *, int (*)(struct seq_file *, void *), void *); |
52 | int single_release(struct inode *, struct file *); | 64 | int single_release(struct inode *, struct file *); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cfcc45b3bef0..358661c9990e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -901,7 +901,7 @@ extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); | |||
901 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) | 901 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) |
902 | { | 902 | { |
903 | if (len > skb_headlen(skb) && | 903 | if (len > skb_headlen(skb) && |
904 | !__pskb_pull_tail(skb, len-skb_headlen(skb))) | 904 | !__pskb_pull_tail(skb, len - skb_headlen(skb))) |
905 | return NULL; | 905 | return NULL; |
906 | skb->len -= len; | 906 | skb->len -= len; |
907 | return skb->data += len; | 907 | return skb->data += len; |
@@ -918,7 +918,7 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len) | |||
918 | return 1; | 918 | return 1; |
919 | if (unlikely(len > skb->len)) | 919 | if (unlikely(len > skb->len)) |
920 | return 0; | 920 | return 0; |
921 | return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL; | 921 | return __pskb_pull_tail(skb, len - skb_headlen(skb)) != NULL; |
922 | } | 922 | } |
923 | 923 | ||
924 | /** | 924 | /** |
@@ -1321,7 +1321,7 @@ static inline int skb_padto(struct sk_buff *skb, unsigned int len) | |||
1321 | unsigned int size = skb->len; | 1321 | unsigned int size = skb->len; |
1322 | if (likely(size >= len)) | 1322 | if (likely(size >= len)) |
1323 | return 0; | 1323 | return 0; |
1324 | return skb_pad(skb, len-size); | 1324 | return skb_pad(skb, len - size); |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | static inline int skb_add_data(struct sk_buff *skb, | 1327 | static inline int skb_add_data(struct sk_buff *skb, |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 5bad61a93f65..2f5c16b1aacd 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -46,6 +46,7 @@ struct kmem_cache_cpu { | |||
46 | struct kmem_cache_node { | 46 | struct kmem_cache_node { |
47 | spinlock_t list_lock; /* Protect partial list and nr_partial */ | 47 | spinlock_t list_lock; /* Protect partial list and nr_partial */ |
48 | unsigned long nr_partial; | 48 | unsigned long nr_partial; |
49 | unsigned long min_partial; | ||
49 | struct list_head partial; | 50 | struct list_head partial; |
50 | #ifdef CONFIG_SLUB_DEBUG | 51 | #ifdef CONFIG_SLUB_DEBUG |
51 | atomic_long_t nr_slabs; | 52 | atomic_long_t nr_slabs; |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 61e5610ad165..e0c0fccced46 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -183,8 +183,14 @@ do { \ | |||
183 | 183 | ||
184 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 184 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
185 | # define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) | 185 | # define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) |
186 | # define spin_lock_nest_lock(lock, nest_lock) \ | ||
187 | do { \ | ||
188 | typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\ | ||
189 | _spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \ | ||
190 | } while (0) | ||
186 | #else | 191 | #else |
187 | # define spin_lock_nested(lock, subclass) _spin_lock(lock) | 192 | # define spin_lock_nested(lock, subclass) _spin_lock(lock) |
193 | # define spin_lock_nest_lock(lock, nest_lock) _spin_lock(lock) | ||
188 | #endif | 194 | #endif |
189 | 195 | ||
190 | #define write_lock(lock) _write_lock(lock) | 196 | #define write_lock(lock) _write_lock(lock) |
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index 8a2307ce7296..d79845d034b5 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h | |||
@@ -22,6 +22,8 @@ int in_lock_functions(unsigned long addr); | |||
22 | void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); | 22 | void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); |
23 | void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) | 23 | void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) |
24 | __acquires(lock); | 24 | __acquires(lock); |
25 | void __lockfunc _spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *map) | ||
26 | __acquires(lock); | ||
25 | void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); | 27 | void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); |
26 | void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); | 28 | void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); |
27 | void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); | 29 | void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); |
diff --git a/include/linux/swab.h b/include/linux/swab.h new file mode 100644 index 000000000000..270d5c208a89 --- /dev/null +++ b/include/linux/swab.h | |||
@@ -0,0 +1,309 @@ | |||
1 | #ifndef _LINUX_SWAB_H | ||
2 | #define _LINUX_SWAB_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/compiler.h> | ||
6 | #include <asm/byteorder.h> | ||
7 | |||
8 | /* | ||
9 | * casts are necessary for constants, because we never know how for sure | ||
10 | * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. | ||
11 | */ | ||
12 | #define __const_swab16(x) ((__u16)( \ | ||
13 | (((__u16)(x) & (__u16)0x00ffU) << 8) | \ | ||
14 | (((__u16)(x) & (__u16)0xff00U) >> 8))) | ||
15 | |||
16 | #define __const_swab32(x) ((__u32)( \ | ||
17 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ | ||
18 | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ | ||
19 | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ | ||
20 | (((__u32)(x) & (__u32)0xff000000UL) >> 24))) | ||
21 | |||
22 | #define __const_swab64(x) ((__u64)( \ | ||
23 | (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ | ||
24 | (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ | ||
25 | (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ | ||
26 | (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ | ||
27 | (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ | ||
28 | (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ | ||
29 | (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ | ||
30 | (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) | ||
31 | |||
32 | #define __const_swahw32(x) ((__u32)( \ | ||
33 | (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ | ||
34 | (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) | ||
35 | |||
36 | #define __const_swahb32(x) ((__u32)( \ | ||
37 | (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ | ||
38 | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) | ||
39 | |||
40 | /* | ||
41 | * Implement the following as inlines, but define the interface using | ||
42 | * macros to allow constant folding when possible: | ||
43 | * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 | ||
44 | */ | ||
45 | |||
46 | static inline __attribute_const__ __u16 ___swab16(__u16 val) | ||
47 | { | ||
48 | #ifdef __arch_swab16 | ||
49 | return __arch_swab16(val); | ||
50 | #elif defined(__arch_swab16p) | ||
51 | return __arch_swab16p(&val); | ||
52 | #else | ||
53 | return __const_swab16(val); | ||
54 | #endif | ||
55 | } | ||
56 | |||
57 | static inline __attribute_const__ __u32 ___swab32(__u32 val) | ||
58 | { | ||
59 | #ifdef __arch_swab32 | ||
60 | return __arch_swab32(val); | ||
61 | #elif defined(__arch_swab32p) | ||
62 | return __arch_swab32p(&val); | ||
63 | #else | ||
64 | return __const_swab32(val); | ||
65 | #endif | ||
66 | } | ||
67 | |||
68 | static inline __attribute_const__ __u64 ___swab64(__u64 val) | ||
69 | { | ||
70 | #ifdef __arch_swab64 | ||
71 | return __arch_swab64(val); | ||
72 | #elif defined(__arch_swab64p) | ||
73 | return __arch_swab64p(&val); | ||
74 | #elif defined(__SWAB_64_THRU_32__) | ||
75 | __u32 h = val >> 32; | ||
76 | __u32 l = val & ((1ULL << 32) - 1); | ||
77 | return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h))); | ||
78 | #else | ||
79 | return __const_swab64(val); | ||
80 | #endif | ||
81 | } | ||
82 | |||
83 | static inline __attribute_const__ __u32 ___swahw32(__u32 val) | ||
84 | { | ||
85 | #ifdef __arch_swahw32 | ||
86 | return __arch_swahw32(val); | ||
87 | #elif defined(__arch_swahw32p) | ||
88 | return __arch_swahw32p(&val); | ||
89 | #else | ||
90 | return __const_swahw32(val); | ||
91 | #endif | ||
92 | } | ||
93 | |||
94 | static inline __attribute_const__ __u32 ___swahb32(__u32 val) | ||
95 | { | ||
96 | #ifdef __arch_swahb32 | ||
97 | return __arch_swahb32(val); | ||
98 | #elif defined(__arch_swahb32p) | ||
99 | return __arch_swahb32p(&val); | ||
100 | #else | ||
101 | return __const_swahb32(val); | ||
102 | #endif | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * __swab16 - return a byteswapped 16-bit value | ||
107 | * @x: value to byteswap | ||
108 | */ | ||
109 | #define __swab16(x) \ | ||
110 | (__builtin_constant_p((__u16)(x)) ? \ | ||
111 | __const_swab16((x)) : \ | ||
112 | ___swab16((x))) | ||
113 | |||
114 | /** | ||
115 | * __swab32 - return a byteswapped 32-bit value | ||
116 | * @x: value to byteswap | ||
117 | */ | ||
118 | #define __swab32(x) \ | ||
119 | (__builtin_constant_p((__u32)(x)) ? \ | ||
120 | __const_swab32((x)) : \ | ||
121 | ___swab32((x))) | ||
122 | |||
123 | /** | ||
124 | * __swab64 - return a byteswapped 64-bit value | ||
125 | * @x: value to byteswap | ||
126 | */ | ||
127 | #define __swab64(x) \ | ||
128 | (__builtin_constant_p((__u64)(x)) ? \ | ||
129 | __const_swab64((x)) : \ | ||
130 | ___swab64((x))) | ||
131 | |||
132 | /** | ||
133 | * __swahw32 - return a word-swapped 32-bit value | ||
134 | * @x: value to wordswap | ||
135 | * | ||
136 | * __swahw32(0x12340000) is 0x00001234 | ||
137 | */ | ||
138 | #define __swahw32(x) \ | ||
139 | (__builtin_constant_p((__u32)(x)) ? \ | ||
140 | __const_swahw32((x)) : \ | ||
141 | ___swahw32((x))) | ||
142 | |||
143 | /** | ||
144 | * __swahb32 - return a high and low byte-swapped 32-bit value | ||
145 | * @x: value to byteswap | ||
146 | * | ||
147 | * __swahb32(0x12345678) is 0x34127856 | ||
148 | */ | ||
149 | #define __swahb32(x) \ | ||
150 | (__builtin_constant_p((__u32)(x)) ? \ | ||
151 | __const_swahb32((x)) : \ | ||
152 | ___swahb32((x))) | ||
153 | |||
154 | /** | ||
155 | * __swab16p - return a byteswapped 16-bit value from a pointer | ||
156 | * @p: pointer to a naturally-aligned 16-bit value | ||
157 | */ | ||
158 | static inline __u16 __swab16p(const __u16 *p) | ||
159 | { | ||
160 | #ifdef __arch_swab16p | ||
161 | return __arch_swab16p(p); | ||
162 | #else | ||
163 | return __swab16(*p); | ||
164 | #endif | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * __swab32p - return a byteswapped 32-bit value from a pointer | ||
169 | * @p: pointer to a naturally-aligned 32-bit value | ||
170 | */ | ||
171 | static inline __u32 __swab32p(const __u32 *p) | ||
172 | { | ||
173 | #ifdef __arch_swab32p | ||
174 | return __arch_swab32p(p); | ||
175 | #else | ||
176 | return __swab32(*p); | ||
177 | #endif | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * __swab64p - return a byteswapped 64-bit value from a pointer | ||
182 | * @p: pointer to a naturally-aligned 64-bit value | ||
183 | */ | ||
184 | static inline __u64 __swab64p(const __u64 *p) | ||
185 | { | ||
186 | #ifdef __arch_swab64p | ||
187 | return __arch_swab64p(p); | ||
188 | #else | ||
189 | return __swab64(*p); | ||
190 | #endif | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * __swahw32p - return a wordswapped 32-bit value from a pointer | ||
195 | * @p: pointer to a naturally-aligned 32-bit value | ||
196 | * | ||
197 | * See __swahw32() for details of wordswapping. | ||
198 | */ | ||
199 | static inline __u32 __swahw32p(const __u32 *p) | ||
200 | { | ||
201 | #ifdef __arch_swahw32p | ||
202 | return __arch_swahw32p(p); | ||
203 | #else | ||
204 | return __swahw32(*p); | ||
205 | #endif | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * __swahb32p - return a high and low byteswapped 32-bit value from a pointer | ||
210 | * @p: pointer to a naturally-aligned 32-bit value | ||
211 | * | ||
212 | * See __swahb32() for details of high/low byteswapping. | ||
213 | */ | ||
214 | static inline __u32 __swahb32p(const __u32 *p) | ||
215 | { | ||
216 | #ifdef __arch_swahb32p | ||
217 | return __arch_swahb32p(p); | ||
218 | #else | ||
219 | return __swahb32(*p); | ||
220 | #endif | ||
221 | } | ||
222 | |||
223 | /** | ||
224 | * __swab16s - byteswap a 16-bit value in-place | ||
225 | * @p: pointer to a naturally-aligned 16-bit value | ||
226 | */ | ||
227 | static inline void __swab16s(__u16 *p) | ||
228 | { | ||
229 | #ifdef __arch_swab16s | ||
230 | __arch_swab16s(p); | ||
231 | #else | ||
232 | *p = __swab16p(p); | ||
233 | #endif | ||
234 | } | ||
235 | /** | ||
236 | * __swab32s - byteswap a 32-bit value in-place | ||
237 | * @p: pointer to a naturally-aligned 32-bit value | ||
238 | */ | ||
239 | static inline void __swab32s(__u32 *p) | ||
240 | { | ||
241 | #ifdef __arch_swab32s | ||
242 | __arch_swab32s(p); | ||
243 | #else | ||
244 | *p = __swab32p(p); | ||
245 | #endif | ||
246 | } | ||
247 | |||
248 | /** | ||
249 | * __swab64s - byteswap a 64-bit value in-place | ||
250 | * @p: pointer to a naturally-aligned 64-bit value | ||
251 | */ | ||
252 | static inline void __swab64s(__u64 *p) | ||
253 | { | ||
254 | #ifdef __arch_swab64s | ||
255 | __arch_swab64s(p); | ||
256 | #else | ||
257 | *p = __swab64p(p); | ||
258 | #endif | ||
259 | } | ||
260 | |||
261 | /** | ||
262 | * __swahw32s - wordswap a 32-bit value in-place | ||
263 | * @p: pointer to a naturally-aligned 32-bit value | ||
264 | * | ||
265 | * See __swahw32() for details of wordswapping | ||
266 | */ | ||
267 | static inline void __swahw32s(__u32 *p) | ||
268 | { | ||
269 | #ifdef __arch_swahw32s | ||
270 | __arch_swahw32s(p); | ||
271 | #else | ||
272 | *p = __swahw32p(p); | ||
273 | #endif | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * __swahb32s - high and low byteswap a 32-bit value in-place | ||
278 | * @p: pointer to a naturally-aligned 32-bit value | ||
279 | * | ||
280 | * See __swahb32() for details of high and low byte swapping | ||
281 | */ | ||
282 | static inline void __swahb32s(__u32 *p) | ||
283 | { | ||
284 | #ifdef __arch_swahb32s | ||
285 | __arch_swahb32s(p); | ||
286 | #else | ||
287 | *p = __swahb32p(p); | ||
288 | #endif | ||
289 | } | ||
290 | |||
291 | #ifdef __KERNEL__ | ||
292 | # define swab16 __swab16 | ||
293 | # define swab32 __swab32 | ||
294 | # define swab64 __swab64 | ||
295 | # define swahw32 __swahw32 | ||
296 | # define swahb32 __swahb32 | ||
297 | # define swab16p __swab16p | ||
298 | # define swab32p __swab32p | ||
299 | # define swab64p __swab64p | ||
300 | # define swahw32p __swahw32p | ||
301 | # define swahb32p __swahb32p | ||
302 | # define swab16s __swab16s | ||
303 | # define swab32s __swab32s | ||
304 | # define swab64s __swab64s | ||
305 | # define swahw32s __swahw32s | ||
306 | # define swahb32s __swahb32s | ||
307 | #endif /* __KERNEL__ */ | ||
308 | |||
309 | #endif /* _LINUX_SWAB_H */ | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 5811c5da69f9..0924cd9c30f6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -110,6 +110,8 @@ enum usb_interface_condition { | |||
110 | * @sysfs_files_created: sysfs attributes exist | 110 | * @sysfs_files_created: sysfs attributes exist |
111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
112 | * capability during autosuspend. | 112 | * capability during autosuspend. |
113 | * @needs_binding: flag set when the driver should be re-probed or unbound | ||
114 | * following a reset or suspend operation it doesn't support. | ||
113 | * @dev: driver model's view of this device | 115 | * @dev: driver model's view of this device |
114 | * @usb_dev: if an interface is bound to the USB major, this will point | 116 | * @usb_dev: if an interface is bound to the USB major, this will point |
115 | * to the sysfs representation for that device. | 117 | * to the sysfs representation for that device. |
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h new file mode 100644 index 000000000000..630962c04ca4 --- /dev/null +++ b/include/linux/usb/musb.h | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * This is used to for host and peripheral modes of the driver for | ||
3 | * Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC. | ||
4 | * | ||
5 | * Board initialization should put one of these into dev->platform_data, | ||
6 | * probably on some platform_device named "musb_hdrc". It encapsulates | ||
7 | * key configuration differences between boards. | ||
8 | */ | ||
9 | |||
10 | /* The USB role is defined by the connector used on the board, so long as | ||
11 | * standards are being followed. (Developer boards sometimes won't.) | ||
12 | */ | ||
13 | enum musb_mode { | ||
14 | MUSB_UNDEFINED = 0, | ||
15 | MUSB_HOST, /* A or Mini-A connector */ | ||
16 | MUSB_PERIPHERAL, /* B or Mini-B connector */ | ||
17 | MUSB_OTG /* Mini-AB connector */ | ||
18 | }; | ||
19 | |||
20 | struct clk; | ||
21 | |||
22 | struct musb_hdrc_eps_bits { | ||
23 | const char name[16]; | ||
24 | u8 bits; | ||
25 | }; | ||
26 | |||
27 | struct musb_hdrc_config { | ||
28 | /* MUSB configuration-specific details */ | ||
29 | unsigned multipoint:1; /* multipoint device */ | ||
30 | unsigned dyn_fifo:1; /* supports dynamic fifo sizing */ | ||
31 | unsigned soft_con:1; /* soft connect required */ | ||
32 | unsigned utm_16:1; /* utm data witdh is 16 bits */ | ||
33 | unsigned big_endian:1; /* true if CPU uses big-endian */ | ||
34 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ | ||
35 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ | ||
36 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ | ||
37 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ | ||
38 | unsigned dma:1; /* supports DMA */ | ||
39 | unsigned vendor_req:1; /* vendor registers required */ | ||
40 | |||
41 | u8 num_eps; /* number of endpoints _with_ ep0 */ | ||
42 | u8 dma_channels; /* number of dma channels */ | ||
43 | u8 dyn_fifo_size; /* dynamic size in bytes */ | ||
44 | u8 vendor_ctrl; /* vendor control reg width */ | ||
45 | u8 vendor_stat; /* vendor status reg witdh */ | ||
46 | u8 dma_req_chan; /* bitmask for required dma channels */ | ||
47 | u8 ram_bits; /* ram address size */ | ||
48 | |||
49 | struct musb_hdrc_eps_bits *eps_bits; | ||
50 | }; | ||
51 | |||
52 | struct musb_hdrc_platform_data { | ||
53 | /* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */ | ||
54 | u8 mode; | ||
55 | |||
56 | /* for clk_get() */ | ||
57 | const char *clock; | ||
58 | |||
59 | /* (HOST or OTG) switch VBUS on/off */ | ||
60 | int (*set_vbus)(struct device *dev, int is_on); | ||
61 | |||
62 | /* (HOST or OTG) mA/2 power supplied on (default = 8mA) */ | ||
63 | u8 power; | ||
64 | |||
65 | /* (PERIPHERAL) mA/2 max power consumed (default = 100mA) */ | ||
66 | u8 min_power; | ||
67 | |||
68 | /* (HOST or OTG) msec/2 after VBUS on till power good */ | ||
69 | u8 potpgt; | ||
70 | |||
71 | /* Power the device on or off */ | ||
72 | int (*set_power)(int state); | ||
73 | |||
74 | /* Turn device clock on or off */ | ||
75 | int (*set_clock)(struct clk *clock, int is_on); | ||
76 | |||
77 | /* MUSB configuration-specific details */ | ||
78 | struct musb_hdrc_config *config; | ||
79 | }; | ||
80 | |||
81 | |||
82 | /* TUSB 6010 support */ | ||
83 | |||
84 | #define TUSB6010_OSCCLK_60 16667 /* psec/clk @ 60.0 MHz */ | ||
85 | #define TUSB6010_REFCLK_24 41667 /* psec/clk @ 24.0 MHz XI */ | ||
86 | #define TUSB6010_REFCLK_19 52083 /* psec/clk @ 19.2 MHz CLKIN */ | ||
87 | |||
88 | #ifdef CONFIG_ARCH_OMAP2 | ||
89 | |||
90 | extern int __init tusb6010_setup_interface( | ||
91 | struct musb_hdrc_platform_data *data, | ||
92 | unsigned ps_refclk, unsigned waitpin, | ||
93 | unsigned async_cs, unsigned sync_cs, | ||
94 | unsigned irq, unsigned dmachan); | ||
95 | |||
96 | extern int tusb6010_platform_retime(unsigned is_refclk); | ||
97 | |||
98 | #endif /* OMAP2 */ | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 09a3e6a7518f..655341d0f534 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -17,7 +17,8 @@ | |||
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | 18 | ||
19 | #define SERIAL_TTY_MAJOR 188 /* Nice legal number now */ | 19 | #define SERIAL_TTY_MAJOR 188 /* Nice legal number now */ |
20 | #define SERIAL_TTY_MINORS 255 /* loads of devices :) */ | 20 | #define SERIAL_TTY_MINORS 254 /* loads of devices :) */ |
21 | #define SERIAL_TTY_NO_MINOR 255 /* No minor was assigned */ | ||
21 | 22 | ||
22 | /* The maximum number of ports one device can grab at once */ | 23 | /* The maximum number of ports one device can grab at once */ |
23 | #define MAX_NUM_PORTS 8 | 24 | #define MAX_NUM_PORTS 8 |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 2f8b3c06a101..bc391ba101e9 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -38,11 +38,6 @@ struct route_info { | |||
38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
39 | 39 | ||
40 | 40 | ||
41 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
42 | extern struct rt6_info *ip6_prohibit_entry; | ||
43 | extern struct rt6_info *ip6_blk_hole_entry; | ||
44 | #endif | ||
45 | |||
46 | extern void ip6_route_input(struct sk_buff *skb); | 41 | extern void ip6_route_input(struct sk_buff *skb); |
47 | 42 | ||
48 | extern struct dst_entry * ip6_route_output(struct net *net, | 43 | extern struct dst_entry * ip6_route_output(struct net *net, |
@@ -118,7 +113,6 @@ extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | |||
118 | extern void rt6_ifdown(struct net *net, struct net_device *dev); | 113 | extern void rt6_ifdown(struct net *net, struct net_device *dev); |
119 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); | 114 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); |
120 | 115 | ||
121 | extern rwlock_t rt6_lock; | ||
122 | 116 | ||
123 | /* | 117 | /* |
124 | * Store a destination cache entry in a socket | 118 | * Store a destination cache entry in a socket |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index cbb59ebed4ae..7312c3dd309f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -140,8 +140,24 @@ struct ip_vs_seq { | |||
140 | 140 | ||
141 | 141 | ||
142 | /* | 142 | /* |
143 | * IPVS statistics object | 143 | * IPVS statistics objects |
144 | */ | 144 | */ |
145 | struct ip_vs_estimator { | ||
146 | struct list_head list; | ||
147 | |||
148 | u64 last_inbytes; | ||
149 | u64 last_outbytes; | ||
150 | u32 last_conns; | ||
151 | u32 last_inpkts; | ||
152 | u32 last_outpkts; | ||
153 | |||
154 | u32 cps; | ||
155 | u32 inpps; | ||
156 | u32 outpps; | ||
157 | u32 inbps; | ||
158 | u32 outbps; | ||
159 | }; | ||
160 | |||
145 | struct ip_vs_stats | 161 | struct ip_vs_stats |
146 | { | 162 | { |
147 | __u32 conns; /* connections scheduled */ | 163 | __u32 conns; /* connections scheduled */ |
@@ -156,7 +172,15 @@ struct ip_vs_stats | |||
156 | __u32 inbps; /* current in byte rate */ | 172 | __u32 inbps; /* current in byte rate */ |
157 | __u32 outbps; /* current out byte rate */ | 173 | __u32 outbps; /* current out byte rate */ |
158 | 174 | ||
175 | /* | ||
176 | * Don't add anything before the lock, because we use memcpy() to copy | ||
177 | * the members before the lock to struct ip_vs_stats_user in | ||
178 | * ip_vs_ctl.c. | ||
179 | */ | ||
180 | |||
159 | spinlock_t lock; /* spin lock */ | 181 | spinlock_t lock; /* spin lock */ |
182 | |||
183 | struct ip_vs_estimator est; /* estimator */ | ||
160 | }; | 184 | }; |
161 | 185 | ||
162 | struct dst_entry; | 186 | struct dst_entry; |
@@ -440,7 +464,7 @@ struct ip_vs_app | |||
440 | */ | 464 | */ |
441 | extern const char *ip_vs_proto_name(unsigned proto); | 465 | extern const char *ip_vs_proto_name(unsigned proto); |
442 | extern void ip_vs_init_hash_table(struct list_head *table, int rows); | 466 | extern void ip_vs_init_hash_table(struct list_head *table, int rows); |
443 | #define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table(t, sizeof(t)/sizeof(t[0])) | 467 | #define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table((t), ARRAY_SIZE((t))) |
444 | 468 | ||
445 | #define IP_VS_APP_TYPE_FTP 1 | 469 | #define IP_VS_APP_TYPE_FTP 1 |
446 | 470 | ||
@@ -620,7 +644,7 @@ extern int sysctl_ip_vs_expire_quiescent_template; | |||
620 | extern int sysctl_ip_vs_sync_threshold[2]; | 644 | extern int sysctl_ip_vs_sync_threshold[2]; |
621 | extern int sysctl_ip_vs_nat_icmp_send; | 645 | extern int sysctl_ip_vs_nat_icmp_send; |
622 | extern struct ip_vs_stats ip_vs_stats; | 646 | extern struct ip_vs_stats ip_vs_stats; |
623 | extern struct ctl_path net_vs_ctl_path[]; | 647 | extern const struct ctl_path net_vs_ctl_path[]; |
624 | 648 | ||
625 | extern struct ip_vs_service * | 649 | extern struct ip_vs_service * |
626 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); | 650 | ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); |
@@ -659,7 +683,7 @@ extern void ip_vs_sync_conn(struct ip_vs_conn *cp); | |||
659 | /* | 683 | /* |
660 | * IPVS rate estimator prototypes (from ip_vs_est.c) | 684 | * IPVS rate estimator prototypes (from ip_vs_est.c) |
661 | */ | 685 | */ |
662 | extern int ip_vs_new_estimator(struct ip_vs_stats *stats); | 686 | extern void ip_vs_new_estimator(struct ip_vs_stats *stats); |
663 | extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); | 687 | extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); |
664 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); | 688 | extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); |
665 | 689 | ||
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 6affcfaa123e..853fe83d9f37 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -89,7 +89,10 @@ extern void __qdisc_run(struct Qdisc *q); | |||
89 | 89 | ||
90 | static inline void qdisc_run(struct Qdisc *q) | 90 | static inline void qdisc_run(struct Qdisc *q) |
91 | { | 91 | { |
92 | if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) | 92 | struct netdev_queue *txq = q->dev_queue; |
93 | |||
94 | if (!netif_tx_queue_stopped(txq) && | ||
95 | !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) | ||
93 | __qdisc_run(q); | 96 | __qdisc_run(q); |
94 | } | 97 | } |
95 | 98 | ||
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 613173b5db69..920c4e9cb93d 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -41,6 +41,7 @@ struct atmel_lcdfb_info { | |||
41 | struct work_struct task; | 41 | struct work_struct task; |
42 | 42 | ||
43 | unsigned int guard_time; | 43 | unsigned int guard_time; |
44 | unsigned int smem_len; | ||
44 | struct platform_device *pdev; | 45 | struct platform_device *pdev; |
45 | struct clk *bus_clk; | 46 | struct clk *bus_clk; |
46 | struct clk *lcdc_clk; | 47 | struct clk *lcdc_clk; |
diff --git a/include/video/radeon.h b/include/video/radeon.h index 95a1f2038b1d..099ffa5e5bee 100644 --- a/include/video/radeon.h +++ b/include/video/radeon.h | |||
@@ -742,6 +742,10 @@ | |||
742 | #define SOFT_RESET_RB (1 << 6) | 742 | #define SOFT_RESET_RB (1 << 6) |
743 | #define SOFT_RESET_HDP (1 << 7) | 743 | #define SOFT_RESET_HDP (1 << 7) |
744 | 744 | ||
745 | /* WAIT_UNTIL bit constants */ | ||
746 | #define WAIT_DMA_GUI_IDLE (1 << 9) | ||
747 | #define WAIT_2D_IDLECLEAN (1 << 16) | ||
748 | |||
745 | /* SURFACE_CNTL bit consants */ | 749 | /* SURFACE_CNTL bit consants */ |
746 | #define SURF_TRANSLATION_DIS (1 << 8) | 750 | #define SURF_TRANSLATION_DIS (1 << 8) |
747 | #define NONSURF_AP0_SWP_16BPP (1 << 20) | 751 | #define NONSURF_AP0_SWP_16BPP (1 << 20) |