Commit bd5a54e9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Ignore vmlinux.lds generated files
  [MIPS] kgdb: Do not call fixup_exception
  [MIPS] RB532: Do not define registers that are already defined
  [MIPS] IP27: Export symbol pcibus_to_node to modules.
  [MIPS] kgdb: s/(void *)0)/NULL/
  [MIPS] kgdb: smp_call_function's 3rd argument is a pointer.
  [MIPS] TXx9: Fix mips_hpt_frequency initialization
  [MIPS] emma2rh: Fix build error by header file inclusion weeding.
  [MIPS] Jazz: Fix build error by header file inclusion weeding.
  [MIPS] Wire up new syscalls.
  [MIPS] Convert printk statements during kernel setup to use severity levels
parents 811da237 3e6259c3
...@@ -25,23 +25,9 @@ ...@@ -25,23 +25,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/initrd.h>
#include <linux/irq.h>
#include <linux/ioport.h>
#include <linux/param.h> /* for HZ */
#include <linux/root_dev.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <asm/cpu.h>
#include <asm/bootinfo.h>
#include <asm/addrspace.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/bcache.h>
#include <asm/irq.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/debug.h>
#include <asm/emma2rh/emma2rh.h> #include <asm/emma2rh/emma2rh.h>
......
...@@ -5,33 +5,22 @@ ...@@ -5,33 +5,22 @@
* License. See the file "COPYING" in the main directory of this archive * License. See the file "COPYING" in the main directory of this archive
* for more details. * for more details.
* *
* Copyright (C) 1996, 1997, 1998, 2001, 07 by Ralf Baechle * Copyright (C) 1996, 1997, 1998, 2001, 07, 08 by Ralf Baechle
* Copyright (C) 2001 MIPS Technologies, Inc. * Copyright (C) 2001 MIPS Technologies, Inc.
* Copyright (C) 2007 by Thomas Bogendoerfer * Copyright (C) 2007 by Thomas Bogendoerfer
*/ */
#include <linux/eisa.h> #include <linux/eisa.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/fb.h>
#include <linux/pm.h>
#include <linux/screen_info.h> #include <linux/screen_info.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/jazz.h> #include <asm/jazz.h>
#include <asm/jazzdma.h> #include <asm/jazzdma.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/time.h>
#include <asm/traps.h>
#include <asm/mc146818-time.h>
extern asmlinkage void jazz_handle_int(void); extern asmlinkage void jazz_handle_int(void);
......
...@@ -62,13 +62,13 @@ void arch_kgdb_breakpoint(void) ...@@ -62,13 +62,13 @@ void arch_kgdb_breakpoint(void)
static void kgdb_call_nmi_hook(void *ignored) static void kgdb_call_nmi_hook(void *ignored)
{ {
kgdb_nmicallback(raw_smp_processor_id(), (void *)0); kgdb_nmicallback(raw_smp_processor_id(), NULL);
} }
void kgdb_roundup_cpus(unsigned long flags) void kgdb_roundup_cpus(unsigned long flags)
{ {
local_irq_enable(); local_irq_enable();
smp_call_function(kgdb_call_nmi_hook, NULL, NULL); smp_call_function(kgdb_call_nmi_hook, NULL, 0);
local_irq_disable(); local_irq_disable();
} }
...@@ -190,9 +190,6 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, ...@@ -190,9 +190,6 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd,
struct pt_regs *regs = args->regs; struct pt_regs *regs = args->regs;
int trap = (regs->cp0_cause & 0x7c) >> 2; int trap = (regs->cp0_cause & 0x7c) >> 2;
if (fixup_exception(regs))
return NOTIFY_DONE;
/* Userpace events, ignore. */ /* Userpace events, ignore. */
if (user_mode(regs)) if (user_mode(regs))
return NOTIFY_DONE; return NOTIFY_DONE;
......
...@@ -647,6 +647,12 @@ einval: li v0, -EINVAL ...@@ -647,6 +647,12 @@ einval: li v0, -EINVAL
sys sys_timerfd_create 2 sys sys_timerfd_create 2
sys sys_timerfd_gettime 2 sys sys_timerfd_gettime 2
sys sys_timerfd_settime 4 sys sys_timerfd_settime 4
sys sys_signalfd4 4
sys sys_eventfd2 2 /* 4325 */
sys sys_epoll_create1 1
sys sys_dup3 3
sys sys_pipe2 2
sys sys_inotify_init1 1
.endm .endm
/* We pre-compute the number of _instruction_ bytes needed to /* We pre-compute the number of _instruction_ bytes needed to
......
...@@ -481,4 +481,10 @@ sys_call_table: ...@@ -481,4 +481,10 @@ sys_call_table:
PTR sys_timerfd_create /* 5280 */ PTR sys_timerfd_create /* 5280 */
PTR sys_timerfd_gettime PTR sys_timerfd_gettime
PTR sys_timerfd_settime PTR sys_timerfd_settime
PTR sys_signalfd4
PTR sys_eventfd2
PTR sys_epoll_create1 /* 5285 */
PTR sys_dup3
PTR sys_pipe2
PTR sys_inotify_init1
.size sys_call_table,.-sys_call_table .size sys_call_table,.-sys_call_table
...@@ -407,4 +407,10 @@ EXPORT(sysn32_call_table) ...@@ -407,4 +407,10 @@ EXPORT(sysn32_call_table)
PTR sys_timerfd_create PTR sys_timerfd_create
PTR sys_timerfd_gettime /* 5285 */ PTR sys_timerfd_gettime /* 5285 */
PTR sys_timerfd_settime PTR sys_timerfd_settime
PTR sys_signalfd4
PTR sys_eventfd2
PTR sys_epoll_create1
PTR sys_dup3 /* 5290 */
PTR sys_pipe2
PTR sys_inotify_init1
.size sysn32_call_table,.-sysn32_call_table .size sysn32_call_table,.-sysn32_call_table
...@@ -529,4 +529,10 @@ sys_call_table: ...@@ -529,4 +529,10 @@ sys_call_table:
PTR sys_timerfd_create PTR sys_timerfd_create
PTR sys_timerfd_gettime PTR sys_timerfd_gettime
PTR sys_timerfd_settime PTR sys_timerfd_settime
PTR compat_sys_signalfd4
PTR sys_eventfd2 /* 4325 */
PTR sys_epoll_create1
PTR sys_dup3
PTR sys_pipe2
PTR sys_inotify_init1
.size sys_call_table,.-sys_call_table .size sys_call_table,.-sys_call_table
...@@ -78,7 +78,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type) ...@@ -78,7 +78,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
/* Sanity check */ /* Sanity check */
if (start + size < start) { if (start + size < start) {
printk("Trying to add an invalid memory region, skipped\n"); pr_warning("Trying to add an invalid memory region, skipped\n");
return; return;
} }
...@@ -92,7 +92,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type) ...@@ -92,7 +92,7 @@ void __init add_memory_region(phys_t start, phys_t size, long type)
} }
if (x == BOOT_MEM_MAP_MAX) { if (x == BOOT_MEM_MAP_MAX) {
printk("Ooops! Too many entries in the memory map!\n"); pr_err("Ooops! Too many entries in the memory map!\n");
return; return;
} }
...@@ -108,22 +108,22 @@ static void __init print_memory_map(void) ...@@ -108,22 +108,22 @@ static void __init print_memory_map(void)
const int field = 2 * sizeof(unsigned long); const int field = 2 * sizeof(unsigned long);
for (i = 0; i < boot_mem_map.nr_map; i++) { for (i = 0; i < boot_mem_map.nr_map; i++) {
printk(" memory: %0*Lx @ %0*Lx ", printk(KERN_INFO " memory: %0*Lx @ %0*Lx ",
field, (unsigned long long) boot_mem_map.map[i].size, field, (unsigned long long) boot_mem_map.map[i].size,
field, (unsigned long long) boot_mem_map.map[i].addr); field, (unsigned long long) boot_mem_map.map[i].addr);
switch (boot_mem_map.map[i].type) { switch (boot_mem_map.map[i].type) {
case BOOT_MEM_RAM: case BOOT_MEM_RAM:
printk("(usable)\n"); printk(KERN_CONT "(usable)\n");
break; break;
case BOOT_MEM_ROM_DATA: case BOOT_MEM_ROM_DATA:
printk("(ROM data)\n"); printk(KERN_CONT "(ROM data)\n");
break; break;
case BOOT_MEM_RESERVED: case BOOT_MEM_RESERVED:
printk("(reserved)\n"); printk(KERN_CONT "(reserved)\n");
break; break;
default: default:
printk("type %lu\n", boot_mem_map.map[i].type); printk(KERN_CONT "type %lu\n", boot_mem_map.map[i].type);
break; break;
} }
} }
...@@ -185,11 +185,11 @@ static unsigned long __init init_initrd(void) ...@@ -185,11 +185,11 @@ static unsigned long __init init_initrd(void)
sanitize: sanitize:
if (initrd_start & ~PAGE_MASK) { if (initrd_start & ~PAGE_MASK) {
printk(KERN_ERR "initrd start must be page aligned\n"); pr_err("initrd start must be page aligned\n");
goto disable; goto disable;
} }
if (initrd_start < PAGE_OFFSET) { if (initrd_start < PAGE_OFFSET) {
printk(KERN_ERR "initrd start < PAGE_OFFSET\n"); pr_err("initrd start < PAGE_OFFSET\n");
goto disable; goto disable;
} }
...@@ -221,18 +221,18 @@ static void __init finalize_initrd(void) ...@@ -221,18 +221,18 @@ static void __init finalize_initrd(void)
goto disable; goto disable;
} }
if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) { if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
printk("Initrd extends beyond end of memory"); printk(KERN_ERR "Initrd extends beyond end of memory");
goto disable; goto disable;
} }
reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT); reserve_bootmem(__pa(initrd_start), size, BOOTMEM_DEFAULT);
initrd_below_start_ok = 1; initrd_below_start_ok = 1;
printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n", pr_info("Initial ramdisk at: 0x%lx (%lu bytes)\n",
initrd_start, size); initrd_start, size);
return; return;
disable: disable:
printk(" - disabling initrd\n"); printk(KERN_CONT " - disabling initrd\n");
initrd_start = 0; initrd_start = 0;
initrd_end = 0; initrd_end = 0;
} }
...@@ -310,14 +310,12 @@ static void __init bootmem_init(void) ...@@ -310,14 +310,12 @@ static void __init bootmem_init(void)
if (min_low_pfn >= max_low_pfn) if (min_low_pfn >= max_low_pfn)
panic("Incorrect memory mapping !!!"); panic("Incorrect memory mapping !!!");
if (min_low_pfn > ARCH_PFN_OFFSET) { if (min_low_pfn > ARCH_PFN_OFFSET) {
printk(KERN_INFO pr_info("Wasting %lu bytes for tracking %lu unused pages\n",
"Wasting %lu bytes for tracking %lu unused pages\n", (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page),
(min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page), min_low_pfn - ARCH_PFN_OFFSET);
min_low_pfn - ARCH_PFN_OFFSET);
} else if (min_low_pfn < ARCH_PFN_OFFSET) { } else if (min_low_pfn < ARCH_PFN_OFFSET) {
printk(KERN_INFO pr_info("%lu free pages won't be used\n",
"%lu free pages won't be used\n", ARCH_PFN_OFFSET - min_low_pfn);
ARCH_PFN_OFFSET - min_low_pfn);
} }
min_low_pfn = ARCH_PFN_OFFSET; min_low_pfn = ARCH_PFN_OFFSET;
...@@ -471,7 +469,7 @@ static void __init arch_mem_init(char **cmdline_p) ...@@ -471,7 +469,7 @@ static void __init arch_mem_init(char **cmdline_p)
/* call board setup routine */ /* call board setup routine */
plat_mem_setup(); plat_mem_setup();
printk("Determined physical RAM map:\n"); pr_info("Determined physical RAM map:\n");
print_memory_map(); print_memory_map();
strlcpy(command_line, arcs_cmdline, sizeof(command_line)); strlcpy(command_line, arcs_cmdline, sizeof(command_line));
...@@ -482,7 +480,7 @@ static void __init arch_mem_init(char **cmdline_p) ...@@ -482,7 +480,7 @@ static void __init arch_mem_init(char **cmdline_p)
parse_early_param(); parse_early_param();
if (usermem) { if (usermem) {
printk("User-defined physical RAM map:\n"); pr_info("User-defined physical RAM map:\n");
print_memory_map(); print_memory_map();
} }
......
...@@ -205,6 +205,7 @@ int pcibus_to_node(struct pci_bus *bus) ...@@ -205,6 +205,7 @@ int pcibus_to_node(struct pci_bus *bus)
return bc->nasid; return bc->nasid;
} }
EXPORT_SYMBOL(pcibus_to_node);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3, DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
pci_fixup_ioc3); pci_fixup_ioc3);
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
#define GPIO_ALE (1 << 0x0a) #define GPIO_ALE (1 << 0x0a)
#define GPIO_CLE (1 << 0x0b) #define GPIO_CLE (1 << 0x0b)
extern char *board_type;
static struct resource korina_dev0_res[] = { static struct resource korina_dev0_res[] = {
{ {
.name = "korina_regs", .name = "korina_regs",
...@@ -265,14 +263,6 @@ static void __init parse_mac_addr(char *macstr) ...@@ -265,14 +263,6 @@ static void __init parse_mac_addr(char *macstr)
} }
/* DEVICE CONTROLLER 1 */
#define CFG_DC_DEV1 ((void *)0xb8010010)
#define CFG_DC_DEV2 ((void *)0xb8010020)
#define CFG_DC_DEVBASE 0x0
#define CFG_DC_DEVMASK 0x4
#define CFG_DC_DEVC 0x8
#define CFG_DC_DEVTC 0xC
/* NAND definitions */ /* NAND definitions */
#define NAND_CHIP_DELAY 25 #define NAND_CHIP_DELAY 25
...@@ -301,16 +291,16 @@ static void __init rb532_nand_setup(void) ...@@ -301,16 +291,16 @@ static void __init rb532_nand_setup(void)
static int __init plat_setup_devices(void) static int __init plat_setup_devices(void)
{ {
/* Look for the CF card reader */ /* Look for the CF card reader */
if (!readl(CFG_DC_DEV1 + CFG_DC_DEVMASK)) if (!readl(IDT434_REG_BASE + DEV1MASK))
rb532_devs[1] = NULL; rb532_devs[1] = NULL;
else { else {
cf_slot0_res[0].start = cf_slot0_res[0].start =
readl(CFG_DC_DEV1 + CFG_DC_DEVBASE); readl(IDT434_REG_BASE + DEV1BASE);
cf_slot0_res[0].end = cf_slot0_res[0].start + 0x1000; cf_slot0_res[0].end = cf_slot0_res[0].start + 0x1000;
} }
/* Read the NAND resources from the device controller */ /* Read the NAND resources from the device controller */
nand_slot0_res[0].start = readl(CFG_DC_DEV2 + CFG_DC_DEVBASE); nand_slot0_res[0].start = readl(IDT434_REG_BASE + DEV2BASE);
nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000;
/* Initialise the NAND device */ /* Initialise the NAND device */
......
...@@ -328,6 +328,9 @@ void __init arch_init_irq(void) ...@@ -328,6 +328,9 @@ void __init arch_init_irq(void)
void __init plat_time_init(void) void __init plat_time_init(void)
{ {
#ifdef CONFIG_CPU_TX49XX
mips_hpt_frequency = txx9_cpu_clock / 2;
#endif
txx9_board_vec->time_init(); txx9_board_vec->time_init();
} }
......
...@@ -344,16 +344,22 @@ ...@@ -344,16 +344,22 @@
#define __NR_timerfd_create (__NR_Linux + 321) #define __NR_timerfd_create (__NR_Linux + 321)
#define __NR_timerfd_gettime (__NR_Linux + 322) #define __NR_timerfd_gettime (__NR_Linux + 322)
#define __NR_timerfd_settime (__NR_Linux + 323) #define __NR_timerfd_settime (__NR_Linux + 323)
#define __NR_signalfd4 (__NR_Linux + 324)
#define __NR_eventfd2 (__NR_Linux + 325)
#define __NR_epoll_create1 (__NR_Linux + 326)
#define __NR_dup3 (__NR_Linux + 327)
#define __NR_pipe2 (__NR_Linux + 328)
#define __NR_inotify_init1 (__NR_Linux + 329)
/* /*
* Offset of the last Linux o32 flavoured syscall * Offset of the last Linux o32 flavoured syscall
*/ */
#define __NR_Linux_syscalls 323 #define __NR_Linux_syscalls 329
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
#define __NR_O32_Linux 4000 #define __NR_O32_Linux 4000
#define __NR_O32_Linux_syscalls 323 #define __NR_O32_Linux_syscalls 329
#if _MIPS_SIM == _MIPS_SIM_ABI64 #if _MIPS_SIM == _MIPS_SIM_ABI64
...@@ -644,16 +650,22 @@ ...@@ -644,16 +650,22 @@
#define __NR_timerfd_create (__NR_Linux + 280) #define __NR_timerfd_create (__NR_Linux + 280)
#define __NR_timerfd_gettime (__NR_Linux + 281) #define __NR_timerfd_gettime (__NR_Linux + 281)
#define __NR_timerfd_settime (__NR_Linux + 282) #define __NR_timerfd_settime (__NR_Linux + 282)
#define __NR_signalfd4 (__NR_Linux + 283)
#define __NR_eventfd2 (__NR_Linux + 284)
#define __NR_epoll_create1 (__NR_Linux + 285)
#define __NR_dup3 (__NR_Linux + 286)
#define __NR_pipe2 (__NR_Linux + 287)
#define __NR_inotify_init1 (__NR_Linux + 288)
/* /*
* Offset of the last Linux 64-bit flavoured syscall * Offset of the last Linux 64-bit flavoured syscall
*/ */
#define __NR_Linux_syscalls 282 #define __NR_Linux_syscalls 288
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
#define __NR_64_Linux 5000 #define __NR_64_Linux 5000
#define __NR_64_Linux_syscalls 282 #define __NR_64_Linux_syscalls 288
#if _MIPS_SIM == _MIPS_SIM_NABI32 #if _MIPS_SIM == _MIPS_SIM_NABI32
...@@ -948,16 +960,22 @@ ...@@ -948,16 +960,22 @@
#define __NR_timerfd_create (__NR_Linux + 284) #define __NR_timerfd_create (__NR_Linux + 284)
#define __NR_timerfd_gettime (__NR_Linux + 285) #define __NR_timerfd_gettime (__NR_Linux + 285)
#define __NR_timerfd_settime (__NR_Linux + 286) #define __NR_timerfd_settime (__NR_Linux + 286)
#define __NR_signalfd4 (__NR_Linux + 287)
#define __NR_eventfd2 (__NR_Linux + 288)
#define __NR_epoll_create1 (__NR_Linux + 289)
#define __NR_dup3 (__NR_Linux + 290)
#define __NR_pipe2 (__NR_Linux + 291)
#define __NR_inotify_init1 (__NR_Linux + 292)
/* /*
* Offset of the last N32 flavoured syscall * Offset of the last N32 flavoured syscall
*/ */
#define __NR_Linux_syscalls 286 #define __NR_Linux_syscalls 292
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
#define __NR_N32_Linux 6000 #define __NR_N32_Linux 6000
#define __NR_N32_Linux_syscalls 286 #define __NR_N32_Linux_syscalls 292
#ifdef __KERNEL__ #ifdef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment