Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4942
b: refs/heads/master
c: b66da4a
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jul 17, 2005
1 parent 4f7001b commit ac465bf
Show file tree
Hide file tree
Showing 67 changed files with 749 additions and 733 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: 8ed693d29b25bbd88471ec043cc01581419d0481
refs/heads/master: b66da4a4859b0be3f12575863bf1d873116d1947
4 changes: 1 addition & 3 deletions trunk/arch/arm/nwfpe/fpa11.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
* stack+task struct. Use the same method as 'current' uses to
* reach them.
*/
register unsigned long *user_registers asm("sl");

#define GET_USERREG() (user_registers)
#define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1)

#include <linux/config.h>
#include <linux/thread_info.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/nwfpe/fpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void float_raise(signed char flags)
printk(KERN_DEBUG
"NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
current->comm, current->pid, flags,
__builtin_return_address(0), GET_USERREG()[15]);
__builtin_return_address(0), GET_USERREG()->ARM_pc);
#endif

/* Keep SoftFloat exception flags up to date. */
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/arm/nwfpe/fpmodule.inl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ static inline unsigned long readRegister(const unsigned int nReg)
for this in this routine. LDF/STF instructions with Rn = PC
depend on the PC being correct, as they use PC+8 in their
address calculations. */
unsigned long *userRegisters = GET_USERREG();
unsigned int val = userRegisters[nReg];
struct pt_regs *regs = GET_USERREG();
unsigned int val = regs->uregs[nReg];
if (REG_PC == nReg)
val -= 4;
return val;
Expand All @@ -38,8 +38,8 @@ static inline unsigned long readRegister(const unsigned int nReg)
static inline void
writeRegister(const unsigned int nReg, const unsigned long val)
{
unsigned long *userRegisters = GET_USERREG();
userRegisters[nReg] = val;
struct pt_regs *regs = GET_USERREG();
regs->uregs[nReg] = val;
}

static inline unsigned long readCPSR(void)
Expand All @@ -63,12 +63,12 @@ static inline unsigned long readConditionCodes(void)

static inline void writeConditionCodes(const unsigned long val)
{
unsigned long *userRegisters = GET_USERREG();
struct pt_regs *regs = GET_USERREG();
unsigned long rval;
/*
* Operate directly on userRegisters since
* the CPSR may be the PC register itself.
*/
rval = userRegisters[REG_CPSR] & ~CC_MASK;
userRegisters[REG_CPSR] = rval | (val & CC_MASK);
rval = regs->ARM_cpsr & ~CC_MASK;
regs->ARM_cpsr = rval | (val & CC_MASK);
}
11 changes: 11 additions & 0 deletions trunk/arch/i386/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ 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: 8 additions & 12 deletions trunk/arch/i386/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,27 +700,23 @@ 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 | next->fs))
if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
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(next->debugreg[0], 0);
set_debugreg(next->debugreg[1], 1);
set_debugreg(next->debugreg[2], 2);
set_debugreg(next->debugreg[3], 3);
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);
/* no 4 and 5 */
set_debugreg(next->debugreg[6], 6);
set_debugreg(next->debugreg[7], 7);
set_debugreg(current->thread.debugreg[6], 6);
set_debugreg(current->thread.debugreg[7], 7);
}

if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
Expand Down
14 changes: 13 additions & 1 deletion 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.
Tough. Make sure you disable such features by hand. */
In this case boot with "noreplacement". */
void apply_alternatives(void *start, void *end)
{
struct alt_instr *a;
Expand Down Expand Up @@ -1442,12 +1442,24 @@ 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 long alignmask = crypto_tfm_alg_alignmask(desc->tfm);
unsigned int 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 long alignmask = crypto_tfm_alg_alignmask(tfm);
unsigned int 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 long align;
unsigned int 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, (unsigned long)alg->cra_alignmask + 1);
len = ALIGN(len, alg->cra_alignmask + 1);
len += alg->cra_blocksize;
break;
}
Expand Down
17 changes: 14 additions & 3 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,22 @@ 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 @@ -199,6 +202,7 @@ 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 @@ -208,7 +212,14 @@ 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: 1 addition & 3 deletions trunk/drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,7 @@ 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,
unsigned int __nocast priority)
{
static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, int priority) {
rx_in rx;
amb_rxq * rxq;

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

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

Expand Down Expand Up @@ -1465,8 +1464,7 @@ 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,
unsigned int __nocast gfp_flags)
static void top_off_fp (struct fs_dev *dev, struct freepool *fp, int gfp_flags)
{
struct FS_BPENTRY *qe, *ne;
struct sk_buff *skb;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

#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: 1 addition & 2 deletions trunk/drivers/atm/idt77252.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ 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 @@ -781,7 +780,7 @@ push_on_scq(struct idt77252_dev *card, struct vc_map *vc, struct sk_buff *skb)
return 0;

out:
if (time_after(jiffies, scq->trans_start + HZ)) {
if (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
Loading

0 comments on commit ac465bf

Please sign in to comment.