Commit 8e517818 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://ppc.bkbits.net/for-linus-ppc64

into home.transmeta.com:/home/torvalds/v2.5/linux
parents a1940218 980e2c9b
...@@ -507,18 +507,18 @@ _GLOBAL(__copy_tofrom_user) ...@@ -507,18 +507,18 @@ _GLOBAL(__copy_tofrom_user)
blr blr
/* read fault, initial single-byte copy */ /* read fault, initial single-byte copy */
100: li r4,0 100: li r9,0
b 90f b 90f
/* write fault, initial single-byte copy */ /* write fault, initial single-byte copy */
101: li r4,1 101: li r9,1
90: subf r5,r8,r5 90: subf r5,r8,r5
li r3,0 li r3,0
b 99f b 99f
/* read fault, initial word copy */ /* read fault, initial word copy */
102: li r4,0 102: li r9,0
b 91f b 91f
/* write fault, initial word copy */ /* write fault, initial word copy */
103: li r4,1 103: li r9,1
91: li r3,2 91: li r3,2
b 99f b 99f
...@@ -542,38 +542,47 @@ _GLOBAL(__copy_tofrom_user) ...@@ -542,38 +542,47 @@ _GLOBAL(__copy_tofrom_user)
#endif #endif
/* read fault in cacheline loop */ /* read fault in cacheline loop */
104: li r4,0 104: li r9,0
b 92f b 92f
/* fault on dcbz (effectively a write fault) */ /* fault on dcbz (effectively a write fault) */
/* or write fault in cacheline loop */ /* or write fault in cacheline loop */
105: li r4,1 105: li r9,1
92: li r3,LG_CACHELINE_BYTES 92: li r3,LG_CACHELINE_BYTES
b 99f b 99f
/* read fault in final word loop */ /* read fault in final word loop */
108: li r4,0 108: li r9,0
b 93f b 93f
/* write fault in final word loop */ /* write fault in final word loop */
109: li r4,1 109: li r9,1
93: andi. r5,r5,3 93: andi. r5,r5,3
li r3,2 li r3,2
b 99f b 99f
/* read fault in final byte loop */ /* read fault in final byte loop */
110: li r4,0 110: li r9,0
b 94f b 94f
/* write fault in final byte loop */ /* write fault in final byte loop */
111: li r4,1 111: li r9,1
94: li r5,0 94: li r5,0
li r3,0 li r3,0
/* /*
* At this stage the number of bytes not copied is * At this stage the number of bytes not copied is
* r5 + (ctr << r3), and r4 is 0 for read or 1 for write. * r5 + (ctr << r3), and r9 is 0 for read or 1 for write.
*/ */
99: mfctr r0 99: mfctr r0
slw r3,r0,r3 slw r3,r0,r3
add r3,r3,r5 add. r3,r3,r5
cmpwi 0,r4,0 beq 120f /* shouldn't happen */
cmpwi 0,r9,0
bne 120f bne 120f
/* for read fault, clear out the destination: r3 bytes starting at 4(r6) */ /* for a read fault, first try to continue the copy one byte at a time */
mtctr r3
130: lbz r0,4(r4)
131: stb r0,4(r6)
addi r4,r4,1
addi r6,r6,1
bdnz 130b
/* then clear out the destination: r3 bytes starting at 4(r6) */
132: mfctr r3
srwi. r0,r3,2 srwi. r0,r3,2
li r9,0 li r9,0
mtctr r0 mtctr r0
...@@ -594,6 +603,8 @@ _GLOBAL(__copy_tofrom_user) ...@@ -594,6 +603,8 @@ _GLOBAL(__copy_tofrom_user)
.long 31b,109b .long 31b,109b
.long 40b,110b .long 40b,110b
.long 41b,111b .long 41b,111b
.long 130b,132b
.long 131b,120b
.long 112b,120b .long 112b,120b
.long 114b,120b .long 114b,120b
.text .text
......
...@@ -156,6 +156,13 @@ void k2_setup_hoses(void) ...@@ -156,6 +156,13 @@ void k2_setup_hoses(void)
__raw_writel(0x00000080, K2_PCI32_BAR+PSBAR); /* Base@0x80 */ __raw_writel(0x00000080, K2_PCI32_BAR+PSBAR); /* Base@0x80 */
__raw_writel(0x00000000, K2_PCI32_BAR+PPBAR); __raw_writel(0x00000000, K2_PCI32_BAR+PPBAR);
__raw_writel(0xc0000000, K2_PCI32_BAR+BPMDLK);
__raw_writel(0xd0000000, K2_PCI32_BAR+TPMDLK);
__raw_writel(0x80000000, K2_PCI32_BAR+BIODLK);
__raw_writel(0x80100000, K2_PCI32_BAR+TIODLK);
__raw_writel(0xe0008000, K2_PCI32_BAR+DLKCTRL);
__raw_writel(0xffffffff, K2_PCI32_BAR+DLKDEV);
/* PCI64 mappings */ /* PCI64 mappings */
__raw_writel(0x00100000, K2_PCI64_BAR+PIBAR); /* PCI I/O base */ __raw_writel(0x00100000, K2_PCI64_BAR+PIBAR); /* PCI I/O base */
__raw_writel(0x10000000, K2_PCI64_BAR+PMBAR); /* PCI Mem base */ __raw_writel(0x10000000, K2_PCI64_BAR+PMBAR); /* PCI Mem base */
......
...@@ -61,6 +61,12 @@ ...@@ -61,6 +61,12 @@
#define BARPP 0x000f8130 #define BARPP 0x000f8130
#define PSBAR 0x000f8140 #define PSBAR 0x000f8140
#define PPBAR 0x000f8150 #define PPBAR 0x000f8150
#define BPMDLK 0x000f8200 /* Bottom of Peripheral Memory Space */
#define TPMDLK 0x000f8210 /* Top of Peripheral Memory Space */
#define BIODLK 0x000f8220 /* Bottom of Peripheral I/O Space */
#define TIODLK 0x000f8230 /* Top of Perioheral I/O Space */
#define DLKCTRL 0x000f8240 /* Deadlock control */
#define DLKDEV 0x000f8250 /* Deadlock device */
/* System standard configuration registers space */ /* System standard configuration registers space */
#define DCR 0xff200000 #define DCR 0xff200000
......
...@@ -243,6 +243,8 @@ mpc10x_bridge_init(struct pci_controller *hose, ...@@ -243,6 +243,8 @@ mpc10x_bridge_init(struct pci_controller *hose,
#ifdef CONFIG_MPC10X_STORE_GATHERING #ifdef CONFIG_MPC10X_STORE_GATHERING
mpc10x_enable_store_gathering(hose); mpc10x_enable_store_gathering(hose);
#else
mpc10x_disable_store_gathering(hose);
#endif #endif
if (ppc_md.progress) ppc_md.progress("mpc10x:exit", 0x100); if (ppc_md.progress) ppc_md.progress("mpc10x:exit", 0x100);
...@@ -376,3 +378,25 @@ mpc10x_enable_store_gathering(struct pci_controller *hose) ...@@ -376,3 +378,25 @@ mpc10x_enable_store_gathering(struct pci_controller *hose)
return 0; return 0;
} }
int __init
mpc10x_disable_store_gathering(struct pci_controller *hose)
{
uint picr1;
early_read_config_dword(hose,
0,
PCI_DEVFN(0,0),
MPC10X_CFG_PICR1_REG,
&picr1);
picr1 &= ~MPC10X_CFG_PICR1_ST_GATH_EN;
early_write_config_dword(hose,
0,
PCI_DEVFN(0,0),
MPC10X_CFG_PICR1_REG,
picr1);
return 0;
}
...@@ -240,6 +240,7 @@ todc_get_rtc_time(void) ...@@ -240,6 +240,7 @@ todc_get_rtc_time(void)
switch (todc_info->rtc_type) { switch (todc_info->rtc_type) {
case TODC_TYPE_DS1557: case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747: case TODC_TYPE_DS1747:
break; break;
...@@ -274,6 +275,7 @@ todc_get_rtc_time(void) ...@@ -274,6 +275,7 @@ todc_get_rtc_time(void)
if (todc_info->rtc_type != TODC_TYPE_MC146818) { if (todc_info->rtc_type != TODC_TYPE_MC146818) {
switch (todc_info->rtc_type) { switch (todc_info->rtc_type) {
case TODC_TYPE_DS1557: case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747: case TODC_TYPE_DS1747:
break; break;
...@@ -367,6 +369,7 @@ static unsigned char __init todc_read_timereg(int addr) ...@@ -367,6 +369,7 @@ static unsigned char __init todc_read_timereg(int addr)
switch (todc_info->rtc_type) { switch (todc_info->rtc_type) {
case TODC_TYPE_DS1557: case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747: case TODC_TYPE_DS1747:
case TODC_TYPE_MC146818: case TODC_TYPE_MC146818:
...@@ -381,6 +384,7 @@ static unsigned char __init todc_read_timereg(int addr) ...@@ -381,6 +384,7 @@ static unsigned char __init todc_read_timereg(int addr)
switch (todc_info->rtc_type) { switch (todc_info->rtc_type) {
case TODC_TYPE_DS1557: case TODC_TYPE_DS1557:
case TODC_TYPE_DS1743:
case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */
case TODC_TYPE_DS1747: case TODC_TYPE_DS1747:
case TODC_TYPE_MC146818: case TODC_TYPE_MC146818:
......
...@@ -840,61 +840,6 @@ asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long a ...@@ -840,61 +840,6 @@ asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long a
return sys32_fcntl(fd, cmd, arg); return sys32_fcntl(fd, cmd, arg);
} }
static int put_statfs (struct statfs32 *ubuf, struct statfs *kbuf)
{
int err;
err = put_user (kbuf->f_type, &ubuf->f_type);
err |= __put_user (kbuf->f_bsize, &ubuf->f_bsize);
err |= __put_user (kbuf->f_blocks, &ubuf->f_blocks);
err |= __put_user (kbuf->f_bfree, &ubuf->f_bfree);
err |= __put_user (kbuf->f_bavail, &ubuf->f_bavail);
err |= __put_user (kbuf->f_files, &ubuf->f_files);
err |= __put_user (kbuf->f_ffree, &ubuf->f_ffree);
err |= __put_user (kbuf->f_namelen, &ubuf->f_namelen);
err |= __put_user (kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]);
err |= __put_user (kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]);
return err;
}
extern asmlinkage int sys_statfs(const char * path, struct statfs * buf);
asmlinkage int sys32_statfs(const char * path, struct statfs32 *buf)
{
int ret;
struct statfs s;
mm_segment_t old_fs = get_fs();
char *pth;
pth = getname (path);
ret = PTR_ERR(pth);
if (!IS_ERR(pth)) {
set_fs (KERNEL_DS);
ret = sys_statfs((const char *)pth, &s);
set_fs (old_fs);
putname (pth);
if (put_statfs(buf, &s))
return -EFAULT;
}
return ret;
}
extern asmlinkage int sys_fstatfs(unsigned int fd, struct statfs * buf);
asmlinkage int sys32_fstatfs(unsigned int fd, struct statfs32 *buf)
{
int ret;
struct statfs s;
mm_segment_t old_fs = get_fs();
set_fs (KERNEL_DS);
ret = sys_fstatfs(fd, &s);
set_fs (old_fs);
if (put_statfs(buf, &s))
return -EFAULT;
return ret;
}
extern asmlinkage long sys_truncate(const char * path, unsigned long length); extern asmlinkage long sys_truncate(const char * path, unsigned long length);
extern asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length); extern asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
......
...@@ -50,7 +50,7 @@ sys_call_table32: ...@@ -50,7 +50,7 @@ sys_call_table32:
/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys32_getrlimit /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys32_getrlimit
.word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write .word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
.word sys32_fcntl64, sys_ni_syscall, sys32_statfs, sys32_fstatfs, sys_oldumount .word sys32_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
/*160*/ .word sys32_sched_setaffinity, sys32_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall /*160*/ .word sys32_sched_setaffinity, sys32_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
.word sys_quotactl, sys_set_tid_address, sys32_mount, sys_ustat, sys_setxattr .word sys_quotactl, sys_set_tid_address, sys32_mount, sys_ustat, sys_setxattr
/*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys32_getdents /*170*/ .word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys32_getdents
...@@ -197,7 +197,7 @@ sunos_sys_table: ...@@ -197,7 +197,7 @@ sunos_sys_table:
.word sunos_nosys, sunos_nosys .word sunos_nosys, sunos_nosys
/*150*/ .word sys_getsockname, sunos_nosys, sunos_nosys /*150*/ .word sys_getsockname, sunos_nosys, sunos_nosys
.word sys_poll, sunos_nosys, sunos_nosys .word sys_poll, sunos_nosys, sunos_nosys
.word sunos_getdirentries, sys32_statfs, sys32_fstatfs .word sunos_getdirentries, compat_sys_statfs, compat_sys_fstatfs
.word sys_oldumount, sunos_nosys, sunos_nosys .word sys_oldumount, sunos_nosys, sunos_nosys
.word sys_getdomainname, sys_setdomainname .word sys_getdomainname, sys_setdomainname
.word sunos_nosys, sys_quotactl, sunos_nosys .word sunos_nosys, sys_quotactl, sunos_nosys
......
This diff is collapsed.
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/vfs.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -164,5 +164,6 @@ int mpc10x_bridge_init(struct pci_controller *hose, ...@@ -164,5 +164,6 @@ int mpc10x_bridge_init(struct pci_controller *hose,
uint phys_eumb_base); uint phys_eumb_base);
unsigned long mpc10x_get_mem_size(uint mem_map); unsigned long mpc10x_get_mem_size(uint mem_map);
int mpc10x_enable_store_gathering(struct pci_controller *hose); int mpc10x_enable_store_gathering(struct pci_controller *hose);
int mpc10x_disable_store_gathering(struct pci_controller *hose);
#endif /* __PPC_KERNEL_MPC10X_H */ #endif /* __PPC_KERNEL_MPC10X_H */
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#ifdef CONFIG_PPC_STD_MMU #ifdef CONFIG_PPC_STD_MMU
/* Classic PPC with hash-table based MMU... */ /* Classic PPC with hash-table based MMU... */
struct free_pte_ctx; struct mmu_gather;
extern void tlb_flush(struct free_pte_ctx *tlb); extern void tlb_flush(struct mmu_gather *tlb);
/* Get the generic bits... */ /* Get the generic bits... */
#include <asm-generic/tlb.h> #include <asm-generic/tlb.h>
...@@ -44,10 +44,6 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, ...@@ -44,10 +44,6 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
#else #else
/* Embedded PPC with software-loaded TLB, very simple... */ /* Embedded PPC with software-loaded TLB, very simple... */
struct flush_tlb_arch { };
#define tlb_init_arch(tlb, full_flush) do { } while (0)
#define tlb_finish_arch(tlb) do { } while (0)
#define tlb_start_vma(tlb, vma) do { } while (0) #define tlb_start_vma(tlb, vma) do { } while (0)
#define tlb_end_vma(tlb, vma) do { } while (0) #define tlb_end_vma(tlb, vma) do { } while (0)
#define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) #define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0)
......
...@@ -64,4 +64,17 @@ struct compat_flock { ...@@ -64,4 +64,17 @@ struct compat_flock {
short __unused; short __unused;
}; };
struct compat_statfs {
int f_type;
int f_bsize;
int f_blocks;
int f_bfree;
int f_bavail;
int f_files;
int f_ffree;
compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_spare[6];
};
#endif /* _ASM_SPARC64_COMPAT_H */ #endif /* _ASM_SPARC64_COMPAT_H */
...@@ -5,25 +5,11 @@ ...@@ -5,25 +5,11 @@
#ifndef __KERNEL_STRICT_NAMES #ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h> #include <linux/types.h>
#include <linux/compat.h> /* for compat_fsid_t */
typedef __kernel_fsid_t fsid_t; typedef __kernel_fsid_t fsid_t;
#endif #endif
struct statfs32 {
int f_type;
int f_bsize;
int f_blocks;
int f_bfree;
int f_bavail;
int f_files;
int f_ffree;
compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_spare[6];
};
struct statfs { struct statfs {
long f_type; long f_type;
long f_bsize; long f_bsize;
......
This diff is collapsed.
...@@ -2672,11 +2672,13 @@ int __init ip_rt_init(void) ...@@ -2672,11 +2672,13 @@ int __init ip_rt_init(void)
ip_rt_gc_interval; ip_rt_gc_interval;
add_timer(&rt_periodic_timer); add_timer(&rt_periodic_timer);
#ifdef CONFIG_PROC_FS
if (rt_cache_proc_init()) if (rt_cache_proc_init())
goto out_enomem; goto out_enomem;
proc_net_create ("rt_cache_stat", 0, rt_cache_stat_get_info); proc_net_create ("rt_cache_stat", 0, rt_cache_stat_get_info);
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_NET_CLS_ROUTE
create_proc_read_entry("net/rt_acct", 0, 0, ip_rt_acct_read, NULL); create_proc_read_entry("net/rt_acct", 0, 0, ip_rt_acct_read, NULL);
#endif
#endif #endif
xfrm_init(); xfrm_init();
out: out:
......
...@@ -2412,6 +2412,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v) ...@@ -2412,6 +2412,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v)
read_unlock_bh(&tp->syn_wait_lock); read_unlock_bh(&tp->syn_wait_lock);
} }
case TCP_SEQ_STATE_LISTENING: case TCP_SEQ_STATE_LISTENING:
if (v != (void *)1)
tcp_listen_unlock(); tcp_listen_unlock();
break; break;
case TCP_SEQ_STATE_TIME_WAIT: case TCP_SEQ_STATE_TIME_WAIT:
......
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