Commit 1ca94929 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] Cobalt: Fix UART I/O type
  [MIPS] Fixup copy_from_user_inatomic
  [MIPS] Fix struct sigcontext for N32 userland
  [MIPS] Make some __setup functions static
  [MIPS] Declare highstart_pfn, highend_pfn only if CONFIG_HIGHMEM=y
  [MIPS] Allow selection of KGDB only on platforms where it's supported.
parents c9ce2283 0cfd5267
...@@ -144,6 +144,7 @@ config BASLER_EXCITE ...@@ -144,6 +144,7 @@ config BASLER_EXCITE
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
help help
The eXcite is a smart camera platform manufactured by The eXcite is a smart camera platform manufactured by
Basler Vision Technologies AG Basler Vision Technologies AG
...@@ -210,6 +211,7 @@ config MIPS_EV64120 ...@@ -210,6 +211,7 @@ config MIPS_EV64120
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
help help
This is an evaluation board based on the Galileo GT-64120 This is an evaluation board based on the Galileo GT-64120
single-chip system controller that contains a MIPS R5000 compatible single-chip system controller that contains a MIPS R5000 compatible
...@@ -374,6 +376,7 @@ config MOMENCO_JAGUAR_ATX ...@@ -374,6 +376,7 @@ config MOMENCO_JAGUAR_ATX
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
help help
The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by
Momentum Computer <http://www.momenco.com/>. Momentum Computer <http://www.momenco.com/>.
...@@ -391,6 +394,7 @@ config MOMENCO_OCELOT ...@@ -391,6 +394,7 @@ config MOMENCO_OCELOT
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
help help
The Ocelot is a MIPS-based Single Board Computer (SBC) made by The Ocelot is a MIPS-based Single Board Computer (SBC) made by
Momentum Computer <http://www.momenco.com/>. Momentum Computer <http://www.momenco.com/>.
...@@ -480,6 +484,8 @@ config DDB5477 ...@@ -480,6 +484,8 @@ config DDB5477
select SYS_HAS_CPU_R5432 select SYS_HAS_CPU_R5432
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
select SYS_SUPPORTS_KGDB
select SYS_SUPPORTS_KGDB
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
help help
This enables support for the R5432-based NEC DDB Vrc-5477, This enables support for the R5432-based NEC DDB Vrc-5477,
...@@ -508,6 +514,7 @@ config PMC_YOSEMITE ...@@ -508,6 +514,7 @@ config PMC_YOSEMITE
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_HIGHMEM
select SYS_SUPPORTS_KGDB
select SYS_SUPPORTS_SMP select SYS_SUPPORTS_SMP
help help
Yosemite is an evaluation board for the RM9000x2 processor Yosemite is an evaluation board for the RM9000x2 processor
...@@ -584,6 +591,7 @@ config SGI_IP27 ...@@ -584,6 +591,7 @@ config SGI_IP27
select SYS_HAS_CPU_R10000 select SYS_HAS_CPU_R10000
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_NUMA
select SYS_SUPPORTS_SMP select SYS_SUPPORTS_SMP
select GENERIC_HARDIRQS_NO__DO_IRQ select GENERIC_HARDIRQS_NO__DO_IRQ
...@@ -633,6 +641,7 @@ config SIBYTE_SWARM ...@@ -633,6 +641,7 @@ config SIBYTE_SWARM
select SYS_HAS_CPU_SB1 select SYS_HAS_CPU_SB1
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_HIGHMEM
select SYS_SUPPORTS_KGDB
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
config SIBYTE_SENTOSA config SIBYTE_SENTOSA
...@@ -773,6 +782,7 @@ config TOSHIBA_RBTX4927 ...@@ -773,6 +782,7 @@ config TOSHIBA_RBTX4927
select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
select TOSHIBA_BOARDS select TOSHIBA_BOARDS
select GENERIC_HARDIRQS_NO__DO_IRQ select GENERIC_HARDIRQS_NO__DO_IRQ
help help
...@@ -793,6 +803,7 @@ config TOSHIBA_RBTX4938 ...@@ -793,6 +803,7 @@ config TOSHIBA_RBTX4938
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_KGDB
select TOSHIBA_BOARDS select TOSHIBA_BOARDS
select GENERIC_HARDIRQS_NO__DO_IRQ select GENERIC_HARDIRQS_NO__DO_IRQ
help help
...@@ -959,6 +970,7 @@ config IRQ_MV64340 ...@@ -959,6 +970,7 @@ config IRQ_MV64340
config DDB5XXX_COMMON config DDB5XXX_COMMON
bool bool
select SYS_SUPPORTS_KGDB
config MIPS_BOARDS_GEN config MIPS_BOARDS_GEN
bool bool
...@@ -1007,6 +1019,7 @@ config SOC_AU1X00 ...@@ -1007,6 +1019,7 @@ config SOC_AU1X00
select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R1
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_APM_EMULATION select SYS_SUPPORTS_APM_EMULATION
select SYS_SUPPORTS_KGDB
config PNX8550 config PNX8550
bool bool
...@@ -1019,6 +1032,7 @@ config SOC_PNX8550 ...@@ -1019,6 +1032,7 @@ config SOC_PNX8550
select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R1
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select GENERIC_HARDIRQS_NO__DO_IRQ select GENERIC_HARDIRQS_NO__DO_IRQ
select SYS_SUPPORTS_KGDB
config SWAP_IO_SPACE config SWAP_IO_SPACE
bool bool
......
...@@ -39,7 +39,7 @@ config DEBUG_STACK_USAGE ...@@ -39,7 +39,7 @@ config DEBUG_STACK_USAGE
config KGDB config KGDB
bool "Remote GDB kernel debugging" bool "Remote GDB kernel debugging"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB
select DEBUG_INFO select DEBUG_INFO
help help
If you say Y here, it will be possible to remotely debug the MIPS If you say Y here, it will be possible to remotely debug the MIPS
...@@ -48,6 +48,9 @@ config KGDB ...@@ -48,6 +48,9 @@ config KGDB
better 32 MB RAM to avoid excessive linking time. This is only better 32 MB RAM to avoid excessive linking time. This is only
useful for kernel hackers. If unsure, say N. useful for kernel hackers. If unsure, say N.
config SYS_SUPPORTS_KGDB
bool
config GDB_CONSOLE config GDB_CONSOLE
bool "Console output to GDB" bool "Console output to GDB"
depends on KGDB depends on KGDB
......
...@@ -130,7 +130,7 @@ void __init plat_mem_setup(void) ...@@ -130,7 +130,7 @@ void __init plat_mem_setup(void)
set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE)); set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE));
/* I/O port resource must include UART and LCD/buttons */ /* I/O port resource must include LCD/buttons */
ioport_resource.end = 0x0fffffff; ioport_resource.end = 0x0fffffff;
/* request I/O space for devices used on all i[345]86 PCs */ /* request I/O space for devices used on all i[345]86 PCs */
...@@ -149,24 +149,24 @@ void __init plat_mem_setup(void) ...@@ -149,24 +149,24 @@ void __init plat_mem_setup(void)
register_pci_controller(&cobalt_pci_controller); register_pci_controller(&cobalt_pci_controller);
#endif #endif
#ifdef CONFIG_SERIAL_8250
if (cobalt_board_id > COBALT_BRD_ID_RAQ1) { if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
#ifdef CONFIG_EARLY_PRINTK #ifdef CONFIG_EARLY_PRINTK
cobalt_early_console(); cobalt_early_console();
#endif #endif
#ifdef CONFIG_SERIAL_8250
uart.line = 0; uart.line = 0;
uart.type = PORT_UNKNOWN; uart.type = PORT_UNKNOWN;
uart.uartclk = 18432000; uart.uartclk = 18432000;
uart.irq = COBALT_SERIAL_IRQ; uart.irq = COBALT_SERIAL_IRQ;
uart.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF |
uart.iobase = 0xc800000; UPF_SKIP_TEST;
uart.iotype = UPIO_PORT; uart.iotype = UPIO_MEM;
uart.mapbase = 0x1c800000;
early_serial_setup(&uart); early_serial_setup(&uart);
}
#endif #endif
}
} }
/* /*
......
...@@ -98,7 +98,7 @@ static void au1k_wait(void) ...@@ -98,7 +98,7 @@ static void au1k_wait(void)
static int __initdata nowait = 0; static int __initdata nowait = 0;
int __init wait_disable(char *s) static int __init wait_disable(char *s)
{ {
nowait = 1; nowait = 1;
......
...@@ -543,7 +543,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -543,7 +543,7 @@ void __init setup_arch(char **cmdline_p)
#endif #endif
} }
int __init fpu_disable(char *s) static int __init fpu_disable(char *s)
{ {
int i; int i;
...@@ -555,7 +555,7 @@ int __init fpu_disable(char *s) ...@@ -555,7 +555,7 @@ int __init fpu_disable(char *s)
__setup("nofpu", fpu_disable); __setup("nofpu", fpu_disable);
int __init dsp_disable(char *s) static int __init dsp_disable(char *s)
{ {
cpu_data[0].ases &= ~MIPS_ASE_DSP; cpu_data[0].ases &= ~MIPS_ASE_DSP;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Makefile for MIPS-specific library files.. # Makefile for MIPS-specific library files..
# #
lib-y += csum_partial.o memcpy.o memset.o promlib.o \ lib-y += csum_partial.o memcpy.o memcpy-inatomic.o memset.o promlib.o \
strlen_user.o strncpy_user.o strnlen_user.o uncached.o strlen_user.o strncpy_user.o strnlen_user.o uncached.o
obj-y += iomap.o obj-y += iomap.o
......
This diff is collapsed.
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
unsigned long highstart_pfn, highend_pfn;
/* /*
* We have up to 8 empty zeroed pages so we can map one of the right colour * We have up to 8 empty zeroed pages so we can map one of the right colour
* when needed. This is necessary only on R4000 / R4400 SC and MC versions * when needed. This is necessary only on R4000 / R4400 SC and MC versions
...@@ -261,6 +259,8 @@ EXPORT_SYMBOL(copy_from_user_page); ...@@ -261,6 +259,8 @@ EXPORT_SYMBOL(copy_from_user_page);
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
unsigned long highstart_pfn, highend_pfn;
pte_t *kmap_pte; pte_t *kmap_pte;
pgprot_t kmap_prot; pgprot_t kmap_prot;
......
...@@ -42,6 +42,7 @@ struct sigcontext { ...@@ -42,6 +42,7 @@ struct sigcontext {
#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
#include <linux/posix_types.h>
/* /*
* Keep this struct definition in sync with the sigcontext fragment * Keep this struct definition in sync with the sigcontext fragment
* in arch/mips/tools/offset.c * in arch/mips/tools/offset.c
...@@ -53,27 +54,25 @@ struct sigcontext { ...@@ -53,27 +54,25 @@ struct sigcontext {
* entries, add sc_dsp and sc_reserved for padding. No prisoners. * entries, add sc_dsp and sc_reserved for padding. No prisoners.
*/ */
struct sigcontext { struct sigcontext {
unsigned long sc_regs[32]; __u64 sc_regs[32];
unsigned long sc_fpregs[32]; __u64 sc_fpregs[32];
unsigned long sc_mdhi; __u64 sc_mdhi;
unsigned long sc_hi1; __u64 sc_hi1;
unsigned long sc_hi2; __u64 sc_hi2;
unsigned long sc_hi3; __u64 sc_hi3;
unsigned long sc_mdlo; __u64 sc_mdlo;
unsigned long sc_lo1; __u64 sc_lo1;
unsigned long sc_lo2; __u64 sc_lo2;
unsigned long sc_lo3; __u64 sc_lo3;
unsigned long sc_pc; __u64 sc_pc;
unsigned int sc_fpc_csr; __u32 sc_fpc_csr;
unsigned int sc_used_math; __u32 sc_used_math;
unsigned int sc_dsp; __u32 sc_dsp;
unsigned int sc_reserved; __u32 sc_reserved;
}; };
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/posix_types.h>
struct sigcontext32 { struct sigcontext32 {
__u32 sc_regmask; /* Unused */ __u32 sc_regmask; /* Unused */
__u32 sc_status; /* Unused */ __u32 sc_status; /* Unused */
......
...@@ -435,8 +435,32 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); ...@@ -435,8 +435,32 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
__cu_len; \ __cu_len; \
}) })
#define __copy_to_user_inatomic __copy_to_user #define __copy_to_user_inatomic(to,from,n) \
#define __copy_from_user_inatomic __copy_from_user ({ \
void __user *__cu_to; \
const void *__cu_from; \
long __cu_len; \
\
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
__cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \
__cu_len; \
})
#define __copy_from_user_inatomic(to,from,n) \
({ \
void *__cu_to; \
const void __user *__cu_from; \
long __cu_len; \
\
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
__cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \
__cu_len); \
__cu_len; \
})
/* /*
* copy_to_user: - Copy a block of data into user space. * copy_to_user: - Copy a block of data into user space.
...@@ -490,6 +514,29 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); ...@@ -490,6 +514,29 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
__cu_len_r; \ __cu_len_r; \
}) })
#define __invoke_copy_from_user_inatomic(to,from,n) \
({ \
register void *__cu_to_r __asm__ ("$4"); \
register const void __user *__cu_from_r __asm__ ("$5"); \
register long __cu_len_r __asm__ ("$6"); \
\
__cu_to_r = (to); \
__cu_from_r = (from); \
__cu_len_r = (n); \
__asm__ __volatile__( \
".set\tnoreorder\n\t" \
__MODULE_JAL(__copy_user_inatomic) \
".set\tnoat\n\t" \
__UA_ADDU "\t$1, %1, %2\n\t" \
".set\tat\n\t" \
".set\treorder" \
: "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \
: \
: "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \
"memory"); \
__cu_len_r; \
})
/* /*
* __copy_from_user: - Copy a block of data from user space, with less checking. * __copy_from_user: - Copy a block of data from user space, with less checking.
* @to: Destination address, in kernel space. * @to: Destination address, in kernel space.
......
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