Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21232
b: refs/heads/master
c: 09e4f90
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Feb 28, 2006
1 parent 1976ec1 commit e671c16
Show file tree
Hide file tree
Showing 26 changed files with 766 additions and 213 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: 9f5a405b6843933c1cae5826046a5dd6357f142a
refs/heads/master: 09e4f9029da1b53e835555c353a89c36b71233b0
54 changes: 54 additions & 0 deletions trunk/arch/mips/kernel/linux32.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,60 @@ asmlinkage int sys32_execve(nabi_no_regargs struct pt_regs regs)
return error;
}

struct dirent32 {
unsigned int d_ino;
unsigned int d_off;
unsigned short d_reclen;
char d_name[NAME_MAX + 1];
};

static void
xlate_dirent(void *dirent64, void *dirent32, long n)
{
long off;
struct dirent *dirp;
struct dirent32 *dirp32;

off = 0;
while (off < n) {
dirp = (struct dirent *)(dirent64 + off);
dirp32 = (struct dirent32 *)(dirent32 + off);
off += dirp->d_reclen;
dirp32->d_ino = dirp->d_ino;
dirp32->d_off = (unsigned int)dirp->d_off;
dirp32->d_reclen = dirp->d_reclen;
strncpy(dirp32->d_name, dirp->d_name, dirp->d_reclen - ((3 * 4) + 2));
}
return;
}

asmlinkage long
sys32_getdents(unsigned int fd, void * dirent32, unsigned int count)
{
long n;
void *dirent64;

dirent64 = (void *)((unsigned long)(dirent32 + (sizeof(long) - 1)) & ~(sizeof(long) - 1));
if ((n = sys_getdents(fd, dirent64, count - (dirent64 - dirent32))) < 0)
return(n);
xlate_dirent(dirent64, dirent32, n);
return(n);
}

asmlinkage int old_readdir(unsigned int fd, void * dirent, unsigned int count);

asmlinkage int
sys32_readdir(unsigned int fd, void * dirent32, unsigned int count)
{
int n;
struct dirent dirent64;

if ((n = old_readdir(fd, &dirent64, count)) < 0)
return(n);
xlate_dirent(&dirent64, dirent32, dirent64.d_reclen);
return(n);
}

asmlinkage int
sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ EXPORT(sysn32_call_table)
PTR sys_fdatasync
PTR sys_truncate
PTR sys_ftruncate /* 6075 */
PTR compat_sys_getdents
PTR sys32_getdents
PTR sys_getcwd
PTR sys_chdir
PTR sys_fchdir
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ sys_call_table:
PTR sys_uselib
PTR sys_swapon
PTR sys_reboot
PTR compat_sys_old_readdir
PTR sys32_readdir
PTR old_mmap /* 4090 */
PTR sys_munmap
PTR sys_truncate
Expand Down Expand Up @@ -345,7 +345,7 @@ sys_call_table:
PTR sys_setfsuid
PTR sys_setfsgid
PTR sys32_llseek /* 4140 */
PTR compat_sys_getdents
PTR sys32_getdents
PTR compat_sys_select
PTR sys_flock
PTR sys_msync
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,6 @@ void __init setup_arch(char **cmdline_p)
sparse_init();
paging_init();
resource_init();
#ifdef CONFIG_SMP
plat_smp_setup();
#endif
}

int __init fpu_disable(char *s)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
init_new_context(current, &init_mm);
current_thread_info()->cpu = 0;
smp_tune_scheduling();
plat_prepare_cpus(max_cpus);
prom_prepare_cpus(max_cpus);
}

/* preload SMP state for boot cpu */
Expand Down
13 changes: 6 additions & 7 deletions trunk/arch/mips/kernel/smp_mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static struct irqaction irq_call = {
* Make sure all CPU's are in a sensible state before we boot any of the
* secondarys
*/
void plat_smp_setup(void)
void prom_prepare_cpus(unsigned int max_cpus)
{
unsigned long val;
int i, num;
Expand Down Expand Up @@ -179,9 +179,11 @@ void plat_smp_setup(void)
write_vpe_c0_vpeconf0(tmp);

/* Record this as available CPU */
cpu_set(i, phys_cpu_present_map);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
if (i < max_cpus) {
cpu_set(i, phys_cpu_present_map);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
}

/* disable multi-threading with TC's */
Expand Down Expand Up @@ -239,10 +241,7 @@ void plat_smp_setup(void)
set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
}
}

void __init plat_prepare_cpus(unsigned int max_cpus)
{
cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
cpu_ipi_call_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ;

Expand Down
24 changes: 18 additions & 6 deletions trunk/arch/mips/pmc-sierra/yosemite/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,37 @@ void __init prom_grab_secondary(void)
* We don't want to start the secondary CPU yet nor do we have a nice probing
* feature in PMON so we just assume presence of the secondary core.
*/
void __init plat_smp_setup(void)
static char maxcpus_string[] __initdata =
KERN_WARNING "max_cpus set to 0; using 1 instead\n";

void __init prom_prepare_cpus(unsigned int max_cpus)
{
int i;
int enabled = 0, i;

if (max_cpus == 0) {
printk(maxcpus_string);
max_cpus = 1;
}

cpus_clear(phys_cpu_present_map);

for (i = 0; i < 2; i++) {
if (i == max_cpus)
break;

/*
* The boot CPU
*/
cpu_set(i, phys_cpu_present_map);
__cpu_number_map[i] = i;
__cpu_logical_map[i] = i;
enabled++;
}
}

void __init plat_prepare_cpus(unsigned int max_cpus)
{
/*
* Be paranoid. Enable the IPI only if we're really about to go SMP.
*/
if (cpus_weight(cpu_possible_map))
if (enabled > 1)
set_c0_status(STATUSF_IP5);
}

Expand Down
7 changes: 1 addition & 6 deletions trunk/arch/mips/sgi-ip27/ip27-smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static __init void intr_clear_all(nasid_t nasid)
REMOTE_HUB_CLR_INTR(nasid, i);
}

void __init plat_smp_setup(void)
void __init prom_prepare_cpus(unsigned int max_cpus)
{
cnodeid_t cnode;

Expand All @@ -161,11 +161,6 @@ void __init plat_smp_setup(void)
alloc_cpupda(0, 0);
}

void __init plat_prepare_cpus(unsigned int max_cpus)
{
/* We already did everything necessary earlier */
}

/*
* Launch a slave into smp_bootstrap(). It doesn't take an argument, and we
* set sp to the kernel stack of the newly created idle process, gp to the proc
Expand Down
10 changes: 3 additions & 7 deletions trunk/arch/mips/sibyte/cfe/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* Common setup before any secondaries are started
*/
void __init plat_smp_setup(void)
void __init prom_prepare_cpus(unsigned int max_cpus)
{
int i, num;

Expand All @@ -40,18 +40,14 @@ void __init plat_smp_setup(void)
__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;

for (i = 1, num = 0; i < NR_CPUS; i++) {
for (i=1, num=0; i<NR_CPUS; i++) {
if (cfe_cpu_stop(i) == 0) {
cpu_set(i, phys_cpu_present_map);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
}
printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num);
}

void __init plat_prepare_cpus(unsigned int max_cpus)
{
printk("Detected %i available secondary CPU(s)\n", num);
}

/*
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/char/sx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,17 +1095,17 @@ static inline void sx_receive_chars (struct sx_port *port)

sx_dprintk (SX_DEBUG_RECEIVE, "rxop=%d, c = %d.\n", rx_op, c);

/* Don't copy past the end of the hardware receive buffer */
if (rx_op + c > 0x100) c = 0x100 - rx_op;

sx_dprintk (SX_DEBUG_RECEIVE, "c = %d.\n", c);

/* Don't copy more bytes than there is room for in the buffer */

c = tty_prepare_flip_string(tty, &rp, c);

sx_dprintk (SX_DEBUG_RECEIVE, "c = %d.\n", c);

/* Don't copy past the end of the hardware receive buffer */
if (rx_op + c > 0x100) c = 0x100 - rx_op;

sx_dprintk (SX_DEBUG_RECEIVE, "c = %d.\n", c);

/* If for one reason or another, we can't copy more data, we're done! */
if (c == 0) break;

Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ config BONDING
'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux.

The driver supports multiple bonding modes to allow for both high
performance and high availability operation.
perfomance and high availability operation.

Refer to <file:Documentation/networking/bonding.txt> for more
information.
Expand Down Expand Up @@ -698,8 +698,8 @@ config VORTEX
depends on NET_VENDOR_3COM && (PCI || EISA)
select MII
---help---
This option enables driver support for a large number of 10Mbps and
10/100Mbps EISA, PCI and PCMCIA 3Com network cards:
This option enables driver support for a large number of 10mbps and
10/100mbps EISA, PCI and PCMCIA 3Com network cards:

"Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
"Boomerang" (EtherLink XL 3c900 or 3c905) PCI
Expand Down Expand Up @@ -1021,7 +1021,7 @@ config EEXPRESS_PRO
depends on NET_ISA
---help---
If you have a network (Ethernet) card of this type, say Y. This
driver supports Intel i82595{FX,TX} based boards. Note however
driver supports intel i82595{FX,TX} based boards. Note however
that the EtherExpress PRO/100 Ethernet card has its own separate
driver. Please read the Ethernet-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
Expand Down Expand Up @@ -1207,7 +1207,7 @@ config IBM_EMAC_RX_SKB_HEADROOM
help
Additional receive skb headroom. Note, that driver
will always reserve at least 2 bytes to make IP header
aligned, so usually there is no need to add any additional
aligned, so usualy there is no need to add any additional
headroom.

If unsure, set to 0.
Expand Down Expand Up @@ -1933,7 +1933,7 @@ config MYRI_SBUS
will be called myri_sbus. This is recommended.

config NS83820
tristate "National Semiconductor DP83820 support"
tristate "National Semiconduct DP83820 support"
depends on PCI
help
This is a driver for the National Semiconductor DP83820 series
Expand Down Expand Up @@ -2513,7 +2513,7 @@ config PPP_FILTER
Say Y here if you want to be able to filter the packets passing over
PPP interfaces. This allows you to control which packets count as
activity (i.e. which packets will reset the idle timer or bring up
a demand-dialed link) and which packets are to be dropped entirely.
a demand-dialled link) and which packets are to be dropped entirely.
You need to say Y here if you wish to use the pass-filter and
active-filter options to pppd.

Expand Down Expand Up @@ -2701,8 +2701,8 @@ config SHAPER
<file:Documentation/networking/shaper.txt> for more information.

An alternative to this traffic shaper is the experimental
Class-Based Queuing (CBQ) scheduling support which you get if you
say Y to "QoS and/or fair queuing" above.
Class-Based Queueing (CBQ) scheduling support which you get if you
say Y to "QoS and/or fair queueing" above.

To compile this driver as a module, choose M here: the module
will be called shaper. If unsure, say N.
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/arcnet/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ config ARCNET_CAP
packet is stuffed with an extra 4 byte "cookie" which doesn't
actually appear on the network. After transmit the driver will send
back a packet with protocol byte 0 containing the status of the
transmission:
transmition:
0=no hardware acknowledge
1=excessive nak
2=transmission accepted by the receiver hardware
2=transmition accepted by the reciever hardware

Received packets are also stuffed with the extra 4 bytes but it will
be random data.
Expand Down
Loading

0 comments on commit e671c16

Please sign in to comment.