summaryrefslogtreecommitdiff
path: root/linux/dev
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2009-12-09 02:59:26 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-20 02:09:13 +0100
commit735cf19fdebf4a3df886426a51cad78b7ef025f2 (patch)
tree9e944a89cb6ce3c5f3a61df6050c170d49291711 /linux/dev
parent5b6966db94a3f3113f7795d9513c832bd1a43f26 (diff)
Change types holding cpu flags from int to long
On amd64 the cpu flags is a 64-bit word, and long on 32-bit systems is 32-bit wide anyway. * linux/dev/glue/kmem.c (linux_kmalloc, linux_kfree, __get_free_pages, free_pages): Use unsigned long instead of unsigned. * linux/dev/include/asm-i386/system.h (__save_flags, __restore_flags): Likewise. * linux/dev/kernel/printk.c (printk): Likewise. * linux/src/drivers/scsi/advansys.c (DvcEnterCritical, DvcLeaveCritical, advansys_queuecommand, advansys_abort, advansys_reset, advansys_interrupt, interrupts_enabled, AdvISR): Likewise. * linux/src/drivers/scsi/aha152x.c (aha152x_intr): Likewise. * linux/src/drivers/scsi/aha1542.c (aha1542_intr_handle): Likewise. * linux/src/drivers/scsi/aic7xxx.c (aic7xxx_done_cmds_complete): Likewise. * linux/src/drivers/scsi/ultrastor.c (log_ultrastor_abort, ultrastor_queuecommand, ultrastor_abort): Likewise.
Diffstat (limited to 'linux/dev')
-rw-r--r--linux/dev/glue/kmem.c10
-rw-r--r--linux/dev/include/asm-i386/system.h4
-rw-r--r--linux/dev/kernel/printk.c3
3 files changed, 10 insertions, 7 deletions
diff --git a/linux/dev/glue/kmem.c b/linux/dev/glue/kmem.c
index c7fb198..2832171 100644
--- a/linux/dev/glue/kmem.c
+++ b/linux/dev/glue/kmem.c
@@ -218,7 +218,7 @@ void *
linux_kmalloc (unsigned int size, int priority)
{
int order, coalesced = 0;
- unsigned flags;
+ unsigned long flags;
struct pagehdr *ph;
struct blkhdr *bh, *new_bh;
@@ -310,7 +310,7 @@ again:
void
linux_kfree (void *p)
{
- unsigned flags;
+ unsigned long flags;
struct blkhdr *bh;
struct pagehdr *ph;
@@ -385,7 +385,8 @@ unsigned long
__get_free_pages (int priority, unsigned long order, int dma)
{
int i, pages_collected = 0;
- unsigned flags, bits, off, j, len;
+ unsigned bits, off, j, len;
+ unsigned long flags;
assert ((PAGE_SIZE << order) <= MEM_CHUNK_SIZE);
@@ -444,7 +445,8 @@ void
free_pages (unsigned long addr, unsigned long order)
{
int i;
- unsigned flags, bits, len, j;
+ unsigned bits, len, j;
+ unsigned long flags;
assert ((addr & PAGE_MASK) == 0);
diff --git a/linux/dev/include/asm-i386/system.h b/linux/dev/include/asm-i386/system.h
index 3e17d2d..f26a33e 100644
--- a/linux/dev/include/asm-i386/system.h
+++ b/linux/dev/include/asm-i386/system.h
@@ -224,9 +224,9 @@ static inline unsigned long __xchg(unsigned long x, void * ptr, int size)
#define __sti() __asm__ __volatile__ ("sti": : :"memory")
#define __cli() __asm__ __volatile__ ("cli": : :"memory")
#define __save_flags(x) \
-__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory")
+__asm__ __volatile__("pushf ; pop %0" : "=r" (x): /* no input */ :"memory")
#define __restore_flags(x) \
-__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory")
+__asm__ __volatile__("push %0 ; popf": /* no output */ :"g" (x):"memory")
#ifdef __SMP__
diff --git a/linux/dev/kernel/printk.c b/linux/dev/kernel/printk.c
index 8bed0d2..7c65d30 100644
--- a/linux/dev/kernel/printk.c
+++ b/linux/dev/kernel/printk.c
@@ -41,7 +41,8 @@ int
printk (char *fmt, ...)
{
va_list args;
- int n, flags;
+ int n;
+ unsigned long flags;
char *p, *msg, *buf_end;
static int msg_level = -1;