Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4948
b: refs/heads/master
c: c94c0d2
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 23, 2005
1 parent 8fd8201 commit 462b58d
Show file tree
Hide file tree
Showing 64 changed files with 722 additions and 740 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: 53776eb4acdd3ec576d75b61b656ef8d51e430ea
refs/heads/master: c94c0d201f1c1a62184f4f220c1615347aafbee7
11 changes: 0 additions & 11 deletions trunk/arch/i386/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,6 @@ void kernel_fpu_begin(void)
}
EXPORT_SYMBOL_GPL(kernel_fpu_begin);

void restore_fpu( struct task_struct *tsk )
{
if ( cpu_has_fxsr ) {
asm volatile( "fxrstor %0"
: : "m" (tsk->thread.i387.fxsave) );
} else {
asm volatile( "frstor %0"
: : "m" (tsk->thread.i387.fsave) );
}
}

/*
* FPU tag word conversions.
*/
Expand Down
20 changes: 12 additions & 8 deletions trunk/arch/i386/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,23 +700,27 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas

/*
* Restore %fs and %gs if needed.
*
* Glibc normally makes %fs be zero, and %gs is one of
* the TLS segments.
*/
if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
if (unlikely(prev->fs | next->fs))
loadsegment(fs, next->fs);

if (prev->gs | next->gs)
loadsegment(gs, next->gs);
}

/*
* Now maybe reload the debug registers
*/
if (unlikely(next->debugreg[7])) {
set_debugreg(current->thread.debugreg[0], 0);
set_debugreg(current->thread.debugreg[1], 1);
set_debugreg(current->thread.debugreg[2], 2);
set_debugreg(current->thread.debugreg[3], 3);
set_debugreg(next->debugreg[0], 0);
set_debugreg(next->debugreg[1], 1);
set_debugreg(next->debugreg[2], 2);
set_debugreg(next->debugreg[3], 3);
/* no 4 and 5 */
set_debugreg(current->thread.debugreg[6], 6);
set_debugreg(current->thread.debugreg[7], 7);
set_debugreg(next->debugreg[6], 6);
set_debugreg(next->debugreg[7], 7);
}

if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
Expand Down
14 changes: 1 addition & 13 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ static struct nop {
This runs before SMP is initialized to avoid SMP problems with
self modifying code. This implies that assymetric systems where
APs have less capabilities than the boot processor are not handled.
In this case boot with "noreplacement". */
Tough. Make sure you disable such features by hand. */
void apply_alternatives(void *start, void *end)
{
struct alt_instr *a;
Expand Down Expand Up @@ -1442,24 +1442,12 @@ void apply_alternatives(void *start, void *end)
}
}

static int no_replacement __initdata = 0;

void __init alternative_instructions(void)
{
extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
if (no_replacement)
return;
apply_alternatives(__alt_instructions, __alt_instructions_end);
}

static int __init noreplacement_setup(char *s)
{
no_replacement = 1;
return 0;
}

__setup("noreplacement", noreplacement_setup);

static char * __init machine_specific_memory_setup(void);

#ifdef CONFIG_MCA
Expand Down
6 changes: 3 additions & 3 deletions trunk/crypto/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static unsigned int crypt_slow(const struct cipher_desc *desc,
struct scatter_walk *in,
struct scatter_walk *out, unsigned int bsize)
{
unsigned int alignmask = crypto_tfm_alg_alignmask(desc->tfm);
unsigned long alignmask = crypto_tfm_alg_alignmask(desc->tfm);
u8 buffer[bsize * 2 + alignmask];
u8 *src = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1);
u8 *dst = src + bsize;
Expand Down Expand Up @@ -160,7 +160,7 @@ static int crypt_iv_unaligned(struct cipher_desc *desc,
unsigned int nbytes)
{
struct crypto_tfm *tfm = desc->tfm;
unsigned int alignmask = crypto_tfm_alg_alignmask(tfm);
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
u8 *iv = desc->info;

if (unlikely(((unsigned long)iv & alignmask))) {
Expand Down Expand Up @@ -424,7 +424,7 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm)
}

if (ops->cit_mode == CRYPTO_TFM_MODE_CBC) {
unsigned int align;
unsigned long align;
unsigned long addr;

switch (crypto_tfm_alg_blocksize(tfm)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/crypto/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg,

switch (flags & CRYPTO_TFM_MODE_MASK) {
case CRYPTO_TFM_MODE_CBC:
len = ALIGN(len, alg->cra_alignmask + 1);
len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1);
len += alg->cra_blocksize;
break;
}
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,19 @@ acpi_ec_enter_burst_mode (
status = acpi_ec_read_status(ec);
if (status != -EINVAL &&
!(status & ACPI_EC_FLAG_BURST)){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"entering burst mode \n"));
acpi_hw_low_level_write(8, ACPI_EC_BURST_ENABLE, &ec->command_addr);
status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF);
if (status){
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
ACPI_DEBUG_PRINT((ACPI_DB_ERROR," status = %d\n", status));
return_VALUE(-EINVAL);
}
acpi_hw_low_level_read(8, &tmp, &ec->data_addr);
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
if(tmp != 0x90 ) {/* Burst ACK byte*/
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"Ack failed \n"));
return_VALUE(-EINVAL);
}
} else
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"already be in burst mode \n"));
}

atomic_set(&ec->leaving_burst , 0);
return_VALUE(0);
}
Expand All @@ -202,7 +199,6 @@ acpi_ec_leave_burst_mode (
status = acpi_ec_read_status(ec);
if (status != -EINVAL &&
(status & ACPI_EC_FLAG_BURST)){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"leaving burst mode\n"));
acpi_hw_low_level_write(8, ACPI_EC_BURST_DISABLE, &ec->command_addr);
status = acpi_ec_wait(ec, ACPI_EC_FLAG_IBF);
if (status){
Expand All @@ -212,14 +208,7 @@ acpi_ec_leave_burst_mode (
}
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
status = acpi_ec_read_status(ec);
if (status != -EINVAL &&
(status & ACPI_EC_FLAG_BURST)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"------->status fail\n"));
return_VALUE(-EINVAL);
}
}else
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"already be in Non-burst mode \n"));
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"leaving burst mode\n"));
}

return_VALUE(0);
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,9 @@ static void drain_rx_pools (amb_dev * dev) {
drain_rx_pool (dev, pool);
}

static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) {
static inline void fill_rx_pool (amb_dev * dev, unsigned char pool,
unsigned int __nocast priority)
{
rx_in rx;
amb_rxq * rxq;

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,8 @@ static void reset_chip (struct fs_dev *dev)
}
}

static void __devinit *aligned_kmalloc (int size, int flags, int alignment)
static void __devinit *aligned_kmalloc (int size, unsigned int __nocast flags,
int alignment)
{
void *t;

Expand Down Expand Up @@ -1464,7 +1465,8 @@ static inline int nr_buffers_in_freepool (struct fs_dev *dev, struct freepool *f
does. I've seen "receive abort: no buffers" and things started
working again after that... -- REW */

static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags)
static void top_off_fp (struct fs_dev *dev, struct freepool *fp,
unsigned int __nocast gfp_flags)
{
struct FS_BPENTRY *qe, *ne;
struct sk_buff *skb;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/pci.h>
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/atm/idt77252.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static char const rcsid[] =
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/wait.h>
#include <linux/jiffies.h>
#include <asm/semaphore.h>
#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -780,7 +781,7 @@ push_on_scq(struct idt77252_dev *card, struct vc_map *vc, struct sk_buff *skb)
return 0;

out:
if (jiffies - scq->trans_start > HZ) {
if (time_after(jiffies, scq->trans_start + HZ)) {
printk("%s: Error pushing TBD for %d.%d\n",
card->name, vc->tx_vcc->vpi, vc->tx_vcc->vci);
#ifdef CONFIG_ATM_IDT77252_DEBUG
Expand Down
107 changes: 61 additions & 46 deletions trunk/drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/ioport.h> /* for request_region */
#include <linux/uio.h>
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/atm_zatm.h>
#include <linux/capability.h>
#include <linux/bitops.h>
Expand Down Expand Up @@ -1257,22 +1257,22 @@ static int __init zatm_init(struct atm_dev *dev)

static int __init zatm_start(struct atm_dev *dev)
{
struct zatm_dev *zatm_dev;
struct zatm_dev *zatm_dev = ZATM_DEV(dev);
struct pci_dev *pdev = zatm_dev->pci_dev;
unsigned long curr;
int pools,vccs,rx;
int error,i,ld;
int error, i, ld;

DPRINTK("zatm_start\n");
zatm_dev = ZATM_DEV(dev);
zatm_dev->rx_map = zatm_dev->tx_map = NULL;
for (i = 0; i < NR_MBX; i++)
zatm_dev->mbx_start[i] = 0;
if (request_irq(zatm_dev->irq,&zatm_int,SA_SHIRQ,DEV_LABEL,dev)) {
printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
dev->number,zatm_dev->irq);
return -EAGAIN;
for (i = 0; i < NR_MBX; i++)
zatm_dev->mbx_start[i] = 0;
error = request_irq(zatm_dev->irq, zatm_int, SA_SHIRQ, DEV_LABEL, dev);
if (error < 0) {
printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
dev->number,zatm_dev->irq);
goto done;
}
request_region(zatm_dev->base,uPD98401_PORTS,DEV_LABEL);
/* define memory regions */
pools = NR_POOLS;
if (NR_SHAPERS*SHAPER_SIZE > pools*POOL_SIZE)
Expand All @@ -1299,51 +1299,66 @@ static int __init zatm_start(struct atm_dev *dev)
"%ld VCs\n",dev->number,NR_SHAPERS,pools,rx,
(zatm_dev->mem-curr*4)/VC_SIZE);
/* create mailboxes */
for (i = 0; i < NR_MBX; i++)
if (mbx_entries[i]) {
unsigned long here;

here = (unsigned long) kmalloc(2*MBX_SIZE(i),
GFP_KERNEL);
if (!here) {
error = -ENOMEM;
goto out;
}
if ((here^(here+MBX_SIZE(i))) & ~0xffffUL)/* paranoia */
here = (here & ~0xffffUL)+0x10000;
zatm_dev->mbx_start[i] = here;
if ((here^virt_to_bus((void *) here)) & 0xffff) {
printk(KERN_ERR DEV_LABEL "(itf %d): system "
"bus incompatible with driver\n",
dev->number);
error = -ENODEV;
goto out;
}
DPRINTK("mbx@0x%08lx-0x%08lx\n",here,here+MBX_SIZE(i));
zatm_dev->mbx_end[i] = (here+MBX_SIZE(i)) & 0xffff;
zout(virt_to_bus((void *) here) >> 16,MSH(i));
zout(virt_to_bus((void *) here),MSL(i));
zout((here+MBX_SIZE(i)) & 0xffff,MBA(i));
zout(here & 0xffff,MTA(i));
zout(here & 0xffff,MWA(i));
for (i = 0; i < NR_MBX; i++) {
void *mbx;
dma_addr_t mbx_dma;

if (!mbx_entries[i])
continue;
mbx = pci_alloc_consistent(pdev, 2*MBX_SIZE(i), &mbx_dma);
if (!mbx) {
error = -ENOMEM;
goto out;
}
/*
* Alignment provided by pci_alloc_consistent() isn't enough
* for this device.
*/
if (((unsigned long)mbx ^ mbx_dma) & 0xffff) {
printk(KERN_ERR DEV_LABEL "(itf %d): system "
"bus incompatible with driver\n", dev->number);
pci_free_consistent(pdev, 2*MBX_SIZE(i), mbx, mbx_dma);
error = -ENODEV;
goto out;
}
DPRINTK("mbx@0x%08lx-0x%08lx\n", mbx, mbx + MBX_SIZE(i));
zatm_dev->mbx_start[i] = (unsigned long)mbx;
zatm_dev->mbx_dma[i] = mbx_dma;
zatm_dev->mbx_end[i] = (zatm_dev->mbx_start[i] + MBX_SIZE(i)) &
0xffff;
zout(mbx_dma >> 16, MSH(i));
zout(mbx_dma, MSL(i));
zout(zatm_dev->mbx_end[i], MBA(i));
zout((unsigned long)mbx & 0xffff, MTA(i));
zout((unsigned long)mbx & 0xffff, MWA(i));
}
error = start_tx(dev);
if (error) goto out;
if (error)
goto out;
error = start_rx(dev);
if (error) goto out;
if (error)
goto out_tx;
error = dev->phy->start(dev);
if (error) goto out;
if (error)
goto out_rx;
zout(0xffffffff,IMR); /* enable interrupts */
/* enable TX & RX */
zout(zin(GMR) | uPD98401_GMR_SE | uPD98401_GMR_RE,GMR);
return 0;
out:
for (i = 0; i < NR_MBX; i++)
kfree(zatm_dev->mbx_start[i]);
done:
return error;

out_rx:
kfree(zatm_dev->rx_map);
out_tx:
kfree(zatm_dev->tx_map);
out:
while (i-- > 0) {
pci_free_consistent(pdev, 2*MBX_SIZE(i),
(void *)zatm_dev->mbx_start[i],
zatm_dev->mbx_dma[i]);
}
free_irq(zatm_dev->irq, dev);
return error;
goto done;
}


Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/atm/zatm.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct zatm_dev {
int chans; /* map size, must be 2^n */
/*-------------------------------- mailboxes */
unsigned long mbx_start[NR_MBX];/* start addresses */
dma_addr_t mbx_dma[NR_MBX];
u16 mbx_end[NR_MBX]; /* end offset (in bytes) */
/*-------------------------------- other pointers */
u32 pool_base; /* Free buffer pool dsc (word addr) */
Expand Down
Loading

0 comments on commit 462b58d

Please sign in to comment.