Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: Pass task_struct to schedule_tail() in ret_from_fork
  apbuart: Depend upon sparc.
  sparc64: Fix section mis-match errors.
  sparc32,leon: Fixed APBUART frequency detection
  sparc32, leon: APBUART driver must use archdata to get IRQ number
  sparc: Hook up syncfs system call.
This commit is contained in:
Linus Torvalds 2011-04-01 08:54:14 -07:00
Родитель 84daeb09ef 47c7c97a93
Коммит afdef69c7f
17 изменённых файлов: 32 добавлений и 41 удалений

Просмотреть файл

@ -403,8 +403,9 @@
#define __NR_name_to_handle_at 332 #define __NR_name_to_handle_at 332
#define __NR_open_by_handle_at 333 #define __NR_open_by_handle_at 333
#define __NR_clock_adjtime 334 #define __NR_clock_adjtime 334
#define __NR_syncfs 335
#define NR_syscalls 335 #define NR_syscalls 336
#ifdef __32bit_syscall_numbers__ #ifdef __32bit_syscall_numbers__
/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,

Просмотреть файл

@ -93,7 +93,7 @@ void auxio_set_lte(int on)
} }
EXPORT_SYMBOL(auxio_set_lte); EXPORT_SYMBOL(auxio_set_lte);
static struct of_device_id __initdata auxio_match[] = { static const struct of_device_id auxio_match[] = {
{ {
.name = "auxio", .name = "auxio",
}, },

Просмотреть файл

@ -140,7 +140,7 @@ out_free:
goto out; goto out;
} }
static struct of_device_id __initdata clock_board_match[] = { static const struct of_device_id clock_board_match[] = {
{ {
.name = "clock-board", .name = "clock-board",
}, },
@ -245,7 +245,7 @@ out_free:
goto out; goto out;
} }
static struct of_device_id __initdata fhc_match[] = { static const struct of_device_id fhc_match[] = {
{ {
.name = "fhc", .name = "fhc",
}, },

Просмотреть файл

@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev)
return 0; return 0;
} }
static struct vio_device_id __initdata ds_match[] = { static const struct vio_device_id ds_match[] = {
{ {
.type = "domain-services-port", .type = "domain-services-port",
}, },

Просмотреть файл

@ -1283,7 +1283,7 @@ linux_syscall_trace:
.globl ret_from_fork .globl ret_from_fork
ret_from_fork: ret_from_fork:
call schedule_tail call schedule_tail
mov %g3, %o0 ld [%g3 + TI_TASK], %o0
b ret_sys_call b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0 ld [%sp + STACKFRAME_SZ + PT_I0], %o0

Просмотреть файл

@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size
return hp; return hp;
} }
static void mdesc_memblock_free(struct mdesc_handle *hp) static void __init mdesc_memblock_free(struct mdesc_handle *hp)
{ {
unsigned int alloc_size; unsigned int alloc_size;
unsigned long start; unsigned long start;

Просмотреть файл

@ -496,7 +496,7 @@ out_err:
return err; return err;
} }
static struct of_device_id __initdata fire_match[] = { static const struct of_device_id fire_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pciex108e,80f0", .compatible = "pciex108e,80f0",

Просмотреть файл

@ -592,7 +592,7 @@ out_err:
return err; return err;
} }
static struct of_device_id __initdata psycho_match[] = { static const struct of_device_id psycho_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,8000", .compatible = "pci108e,8000",

Просмотреть файл

@ -581,7 +581,7 @@ out_err:
return err; return err;
} }
static struct of_device_id __initdata sabre_match[] = { static const struct of_device_id sabre_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,a001", .compatible = "pci108e,a001",

Просмотреть файл

@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op)
* and pci108e,8001. So list the chips in reverse chronological * and pci108e,8001. So list the chips in reverse chronological
* order. * order.
*/ */
static struct of_device_id __initdata schizo_match[] = { static const struct of_device_id schizo_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "pci108e,a801", .compatible = "pci108e,a801",

Просмотреть файл

@ -998,7 +998,7 @@ out_err:
return err; return err;
} }
static struct of_device_id __initdata pci_sun4v_match[] = { static const struct of_device_id pci_sun4v_match[] = {
{ {
.name = "pci", .name = "pci",
.compatible = "SUNW,sun4v-pci", .compatible = "SUNW,sun4v-pci",

Просмотреть файл

@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op)
return 0; return 0;
} }
static struct of_device_id __initdata power_match[] = { static const struct of_device_id power_match[] = {
{ {
.name = "power", .name = "power",
}, },

Просмотреть файл

@ -84,4 +84,4 @@ sys_call_table:
/*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
/*335*/ .long sys_syncfs

Просмотреть файл

@ -85,6 +85,7 @@ sys_call_table32:
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
.word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
.word sys_syncfs
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
@ -161,3 +162,4 @@ sys_call_table:
/*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
.word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
.word sys_syncfs

Просмотреть файл

@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op)
return platform_device_register(&rtc_cmos_device); return platform_device_register(&rtc_cmos_device);
} }
static struct of_device_id __initdata rtc_match[] = { static const struct of_device_id rtc_match[] = {
{ {
.name = "rtc", .name = "rtc",
.compatible = "m5819", .compatible = "m5819",
@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op)
return platform_device_register(&rtc_bq4802_device); return platform_device_register(&rtc_bq4802_device);
} }
static struct of_device_id __initdata bq4802_match[] = { static const struct of_device_id bq4802_match[] = {
{ {
.name = "rtc", .name = "rtc",
.compatible = "bq4802", .compatible = "bq4802",
@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op)
return platform_device_register(&m48t59_rtc); return platform_device_register(&m48t59_rtc);
} }
static struct of_device_id __initdata mostek_match[] = { static const struct of_device_id mostek_match[] = {
{ {
.name = "eeprom", .name = "eeprom",
}, },

Просмотреть файл

@ -1506,7 +1506,7 @@ config SERIAL_BCM63XX_CONSOLE
config SERIAL_GRLIB_GAISLER_APBUART config SERIAL_GRLIB_GAISLER_APBUART
tristate "GRLIB APBUART serial support" tristate "GRLIB APBUART serial support"
depends on OF depends on OF && SPARC
select SERIAL_CORE select SERIAL_CORE
---help--- ---help---
Add support for the GRLIB APBUART serial port. Add support for the GRLIB APBUART serial port.

Просмотреть файл

@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = {
static int __devinit apbuart_probe(struct platform_device *op) static int __devinit apbuart_probe(struct platform_device *op)
{ {
int i = -1; int i;
struct uart_port *port = NULL; struct uart_port *port = NULL;
i = 0;
for (i = 0; i < grlib_apbuart_port_nr; i++) { for (i = 0; i < grlib_apbuart_port_nr; i++) {
if (op->dev.of_node == grlib_apbuart_nodes[i]) if (op->dev.of_node == grlib_apbuart_nodes[i])
break; break;
@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op)
port = &grlib_apbuart_ports[i]; port = &grlib_apbuart_ports[i];
port->dev = &op->dev; port->dev = &op->dev;
port->irq = op->archdata.irqs[0];
uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
@ -598,24 +598,12 @@ static struct platform_driver grlib_apbuart_of_driver = {
static int grlib_apbuart_configure(void) static int grlib_apbuart_configure(void)
{ {
struct device_node *np, *rp; struct device_node *np;
const u32 *prop; int line = 0;
int freq_khz, line = 0;
/* Get bus frequency */
rp = of_find_node_by_path("/");
if (!rp)
return -ENODEV;
rp = of_get_next_child(rp, NULL);
if (!rp)
return -ENODEV;
prop = of_get_property(rp, "clock-frequency", NULL);
if (!prop)
return -ENODEV;
freq_khz = *prop;
for_each_matching_node(np, apbuart_match) { for_each_matching_node(np, apbuart_match) {
const int *irqs, *ampopts; const int *ampopts;
const u32 *freq_hz;
const struct amba_prom_registers *regs; const struct amba_prom_registers *regs;
struct uart_port *port; struct uart_port *port;
unsigned long addr; unsigned long addr;
@ -623,11 +611,11 @@ static int grlib_apbuart_configure(void)
ampopts = of_get_property(np, "ampopts", NULL); ampopts = of_get_property(np, "ampopts", NULL);
if (ampopts && (*ampopts == 0)) if (ampopts && (*ampopts == 0))
continue; /* Ignore if used by another OS instance */ continue; /* Ignore if used by another OS instance */
irqs = of_get_property(np, "interrupts", NULL);
regs = of_get_property(np, "reg", NULL); regs = of_get_property(np, "reg", NULL);
/* Frequency of APB Bus is frequency of UART */
freq_hz = of_get_property(np, "freq", NULL);
if (!irqs || !regs) if (!regs || !freq_hz || (*freq_hz == 0))
continue; continue;
grlib_apbuart_nodes[line] = np; grlib_apbuart_nodes[line] = np;
@ -638,12 +626,12 @@ static int grlib_apbuart_configure(void)
port->mapbase = addr; port->mapbase = addr;
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
port->irq = *irqs; port->irq = 0;
port->iotype = UPIO_MEM; port->iotype = UPIO_MEM;
port->ops = &grlib_apbuart_ops; port->ops = &grlib_apbuart_ops;
port->flags = UPF_BOOT_AUTOCONF; port->flags = UPF_BOOT_AUTOCONF;
port->line = line; port->line = line;
port->uartclk = freq_khz * 1000; port->uartclk = *freq_hz;
port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
line++; line++;