Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144973
b: refs/heads/master
c: bd67ce0
h: refs/heads/master
i:
  144971: 8dc8b0e
v: v3
  • Loading branch information
Linus Torvalds committed May 15, 2009
1 parent 57ec850 commit dc2cda7
Show file tree
Hide file tree
Showing 54 changed files with 358 additions and 351 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8e2f53ac99f4ce7d63807a84f98d1b80df598cf
refs/heads/master: bd67ce0f661482bd073f94144dd7e5a093ef012f
20 changes: 12 additions & 8 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1411,13 +1411,12 @@ config PAGE_SIZE_4KB

config PAGE_SIZE_8KB
bool "8kB"
depends on EXPERIMENTAL && CPU_R8000
depends on (EXPERIMENTAL && CPU_R8000) || CPU_CAVIUM_OCTEON
help
Using 8kB page size will result in higher performance kernel at
the price of higher memory consumption. This option is available
only on the R8000 processor. Not that at the time of this writing
this option is still high experimental; there are also issues with
compatibility of user applications.
only on R8000 and cnMIPS processors. Note that you will need a
suitable Linux distribution to support this.

config PAGE_SIZE_16KB
bool "16kB"
Expand All @@ -1428,6 +1427,15 @@ config PAGE_SIZE_16KB
all non-R3000 family processors. Note that you will need a suitable
Linux distribution to support this.

config PAGE_SIZE_32KB
bool "32kB"
depends on CPU_CAVIUM_OCTEON
help
Using 32kB page size will result in higher performance kernel at
the price of higher memory consumption. This option is available
only on cnMIPS cores. Note that you will need a suitable Linux
distribution to support this.

config PAGE_SIZE_64KB
bool "64kB"
depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX
Expand Down Expand Up @@ -1958,10 +1966,6 @@ config SECCOMP

endmenu

config RWSEM_GENERIC_SPINLOCK
bool
default y

config LOCKDEP_SUPPORT
bool
default y
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

KBUILD_DEFCONFIG := ip22_defconfig

cflags-y := -ffunction-sections

#
# Select the object file format to substitute into the linker script.
#
Expand Down Expand Up @@ -50,6 +48,9 @@ ifneq ($(SUBARCH),$(ARCH))
endif
endif

cflags-y := -ffunction-sections
cflags-y += $(call cc-option, -mno-check-zero-division)

ifdef CONFIG_32BIT
ld-emul = $(32bit-emul)
vmlinux-32 = vmlinux
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/alchemy/common/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

extern int allow_au1k_wait; /* default off for CP0 Counter */

static cycle_t au1x_counter1_read(void)
static cycle_t au1x_counter1_read(struct clocksource *cs)
{
return au_readl(SYS_RTCREAD);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/cavium-octeon/csrc-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void octeon_init_cvmcount(void)
local_irq_restore(flags);
}

static cycle_t octeon_cvmcount_read(void)
static cycle_t octeon_cvmcount_read(struct clocksource *cs)
{
return read_c0_cvmcount();
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static inline unsigned long __fls(unsigned long word)
int num;

if (BITS_PER_LONG == 32 &&
__builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
__builtin_constant_p(cpu_has_clo_clz) && cpu_has_clo_clz) {
__asm__(
" .set push \n"
" .set mips32 \n"
Expand Down Expand Up @@ -644,7 +644,7 @@ static inline int fls(int x)
{
int r;

if (__builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
if (__builtin_constant_p(cpu_has_clo_clz) && cpu_has_clo_clz) {
__asm__("clz %0, %1" : "=r" (x) : "r" (x));

return 32 - x;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/include/asm/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static inline
__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len,
__wsum sum, int *err_ptr)
{
might_sleep();
might_fault();
return __csum_partial_copy_user((__force void *)src, dst,
len, sum, err_ptr);
}
Expand All @@ -53,7 +53,7 @@ static inline
__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len,
__wsum sum, int *err_ptr)
{
might_sleep();
might_fault();
if (access_ok(VERIFY_WRITE, dst, len))
return __csum_partial_copy_user(src, (__force void *)dst,
len, sum, err_ptr);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/mips/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/*
* Architecture specific compatibility types
*/
#include <linux/seccomp.h>
#include <linux/thread_info.h>
#include <linux/types.h>
#include <asm/page.h>
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@
#define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \
cpu_has_mips64r1 | cpu_has_mips64r2)

/*
* MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
* pre-MIPS32/MIPS53 processors have CLO, CLZ. For 64-bit kernels
* cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
*/
# ifndef cpu_has_clo_clz
# define cpu_has_clo_clz cpu_has_mips_r
# endif

#ifndef cpu_has_dsp
#define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP)
#endif
Expand Down
142 changes: 50 additions & 92 deletions trunk/arch/mips/include/asm/div64.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,105 +6,63 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#ifndef _ASM_DIV64_H
#define _ASM_DIV64_H
#ifndef __ASM_DIV64_H
#define __ASM_DIV64_H

#include <linux/types.h>
#include <asm-generic/div64.h>

#if (_MIPS_SZLONG == 32)
#if BITS_PER_LONG == 64

#include <asm/compiler.h>
#include <linux/types.h>

/*
* No traps on overflows for any of these...
*/

#define do_div64_32(res, high, low, base) ({ \
unsigned long __quot32, __mod32; \
unsigned long __cf, __tmp, __tmp2, __i; \
\
__asm__(".set push\n\t" \
".set noat\n\t" \
".set noreorder\n\t" \
"move %2, $0\n\t" \
"move %3, $0\n\t" \
"b 1f\n\t" \
" li %4, 0x21\n" \
"0:\n\t" \
"sll $1, %0, 0x1\n\t" \
"srl %3, %0, 0x1f\n\t" \
"or %0, $1, %5\n\t" \
"sll %1, %1, 0x1\n\t" \
"sll %2, %2, 0x1\n" \
"1:\n\t" \
"bnez %3, 2f\n\t" \
" sltu %5, %0, %z6\n\t" \
"bnez %5, 3f\n" \
"2:\n\t" \
" addiu %4, %4, -1\n\t" \
"subu %0, %0, %z6\n\t" \
"addiu %2, %2, 1\n" \
"3:\n\t" \
"bnez %4, 0b\n\t" \
" srl %5, %1, 0x1f\n\t" \
".set pop" \
: "=&r" (__mod32), "=&r" (__tmp), \
"=&r" (__quot32), "=&r" (__cf), \
"=&r" (__i), "=&r" (__tmp2) \
: "Jr" (base), "0" (high), "1" (low)); \
\
(res) = __quot32; \
__mod32; })

#define do_div(n, base) ({ \
unsigned long long __quot; \
unsigned long __mod; \
unsigned long long __div; \
unsigned long __upper, __low, __high, __base; \
\
__div = (n); \
__base = (base); \
\
__high = __div >> 32; \
__low = __div; \
__upper = __high; \
\
if (__high) \
__asm__("divu $0, %z2, %z3" \
: "=h" (__upper), "=l" (__high) \
: "Jr" (__high), "Jr" (__base) \
: GCC_REG_ACCUM); \
\
__mod = do_div64_32(__low, __upper, __low, __base); \
\
__quot = __high; \
__quot = __quot << 32 | __low; \
(n) = __quot; \
__mod; })

#endif /* (_MIPS_SZLONG == 32) */

#if (_MIPS_SZLONG == 64)

/*
* Hey, we're already 64-bit, no
* need to play games..
*/
#define do_div(n, base) ({ \
unsigned long __quot; \
unsigned int __mod; \
unsigned long __div; \
unsigned int __base; \
\
__div = (n); \
__base = (base); \
\
__mod = __div % __base; \
__quot = __div / __base; \
\
(n) = __quot; \
__mod; })
#define __div64_32(n, base) \
({ \
unsigned long __cf, __tmp, __tmp2, __i; \
unsigned long __quot32, __mod32; \
unsigned long __high, __low; \
unsigned long long __n; \
\
__high = *__n >> 32; \
__low = __n; \
__asm__( \
" .set push \n" \
" .set noat \n" \
" .set noreorder \n" \
" move %2, $0 \n" \
" move %3, $0 \n" \
" b 1f \n" \
" li %4, 0x21 \n" \
"0: \n" \
" sll $1, %0, 0x1 \n" \
" srl %3, %0, 0x1f \n" \
" or %0, $1, %5 \n" \
" sll %1, %1, 0x1 \n" \
" sll %2, %2, 0x1 \n" \
"1: \n" \
" bnez %3, 2f \n" \
" sltu %5, %0, %z6 \n" \
" bnez %5, 3f \n" \
"2: \n" \
" addiu %4, %4, -1 \n" \
" subu %0, %0, %z6 \n" \
" addiu %2, %2, 1 \n" \
"3: \n" \
" bnez %4, 0b\n\t" \
" srl %5, %1, 0x1f\n\t" \
" .set pop" \
: "=&r" (__mod32), "=&r" (__tmp), \
"=&r" (__quot32), "=&r" (__cf), \
"=&r" (__i), "=&r" (__tmp2) \
: "Jr" (base), "0" (__high), "1" (__low)); \
\
(__n) = __quot32; \
__mod32; \
})

#endif /* (_MIPS_SZLONG == 64) */
#endif /* BITS_PER_LONG == 64 */

#endif /* _ASM_DIV64_H */
#endif /* __ASM_DIV64_H */
9 changes: 7 additions & 2 deletions trunk/arch/mips/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ extern int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
enum dma_data_direction direction);
extern dma_addr_t dma_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size, enum dma_data_direction direction);
extern void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
size_t size, enum dma_data_direction direction);

static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
size_t size, enum dma_data_direction direction)
{
dma_unmap_single(dev, dma_address, size, direction);
}

extern void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
int nhwentries, enum dma_data_direction direction);
extern void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/mips/include/asm/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
return __virt_to_fix(vaddr);
}

#define kmap_get_fixmap_pte(vaddr) \
pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr))

/*
* Called from pgtable_init()
*/
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/mips/include/asm/hazards.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ do { \
__instruction_hazard(); \
} while (0)

#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
defined(CONFIG_CPU_R5500) || defined(CONFIG_MACH_ALCHEMY)
#elif defined(CONFIG_MACH_ALCHEMY) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
defined(CONFIG_CPU_LOONGSON2) || defined(CONFIG_CPU_R10000) || \
defined(CONFIG_CPU_R5500)

/*
* R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/mips/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
/* declarations for highmem.c */
extern unsigned long highstart_pfn, highend_pfn;

extern pte_t *kmap_pte;
extern pgprot_t kmap_prot;
extern pte_t *pkmap_page_table;

/*
Expand Down Expand Up @@ -62,6 +60,10 @@ extern struct page *__kmap_atomic_to_page(void *ptr);

#define flush_cache_kmaps() flush_cache_all()

extern void kmap_init(void);

#define kmap_prot PAGE_KERNEL

#endif /* __KERNEL__ */

#endif /* _ASM_HIGHMEM_H */
6 changes: 3 additions & 3 deletions trunk/arch/mips/include/asm/mach-au1x00/au1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ enum soc_au1500_ints {
#ifdef CONFIG_SOC_AU1100
enum soc_au1100_ints {
AU1100_FIRST_INT = MIPS_CPU_IRQ_BASE + 8,
AU1100_UART0_INT,
AU1100_UART0_INT = AU1100_FIRST_INT,
AU1100_UART1_INT,
AU1100_SD_INT,
AU1100_UART3_INT,
Expand Down Expand Up @@ -902,8 +902,8 @@ enum soc_au1200_ints {
AU1000_RTC_MATCH0_INT,
AU1000_RTC_MATCH1_INT,
AU1000_RTC_MATCH2_INT,

AU1200_NAND_INT = AU1200_FIRST_INT + 23,
AU1200_GPIO_203,
AU1200_NAND_INT,
AU1200_GPIO_204,
AU1200_GPIO_205,
AU1200_GPIO_206,
Expand Down
Loading

0 comments on commit dc2cda7

Please sign in to comment.