Skip to content

Commit 288a60c

Browse files
Chris ZankelLinus Torvalds
authored andcommitted
[PATCH] xtensa: remove io_remap_page_range and minor clean-ups
Remove io_remap_page_range() from all of Linux 2.6.x (as requested and suggested by Randy Dunlap) and minor clean-ups. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent fac97ae commit 288a60c

12 files changed

Lines changed: 22 additions & 64 deletions

File tree

‎arch/xtensa/kernel/pci.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
402402
__pci_mmap_set_flags(dev, vma, mmap_state);
403403
__pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine);
404404

405-
ret = io_remap_page_range(vma, vma->vm_start, vma->vm_pgoff<<PAGE_SHIFT,
406-
vma->vm_end - vma->vm_start, vma->vm_page_prot);
405+
ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
406+
vma->vm_end - vma->vm_start,vma->vm_page_prot);
407407

408408
return ret;
409409
}

‎arch/xtensa/kernel/platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ _F(int, pcibios_fixup, (void), { return 0; });
3939
_F(int, get_rtc_time, (time_t* t), { return 0; });
4040
_F(int, set_rtc_time, (time_t t), { return 0; });
4141

42-
#if CONFIG_XTENSA_CALIBRATE_CCOUNT
42+
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
4343
_F(void, calibrate_ccount, (void),
4444
{
4545
printk ("ERROR: Cannot calibrate cpu frequency! Assuming 100MHz.\n");

‎arch/xtensa/kernel/process.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ int
457457
dump_task_fpu(struct pt_regs *regs, struct task_struct *task, elf_fpregset_t *r)
458458
{
459459
/* see asm/coprocessor.h for this magic number 16 */
460-
#if TOTAL_CPEXTRA_SIZE > 16
460+
#if XTENSA_CP_EXTRA_SIZE > 16
461461
do_save_fpregs (r, regs, task);
462462

463463
/* For now, bit 16 means some extra state may be present: */

‎arch/xtensa/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void __init setup_arch(char **cmdline_p)
304304
# endif
305305
#endif
306306

307-
#if CONFIG_PCI
307+
#ifdef CONFIG_PCI
308308
platform_pcibios_init();
309309
#endif
310310
}

‎arch/xtensa/kernel/signal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ restore_cpextra (struct _cpstate *buf)
182182

183183
struct task_struct *tsk = current;
184184
release_all_cp(tsk);
185-
return __copy_from_user(tsk->thread.cpextra, buf, TOTAL_CPEXTRA_SIZE);
185+
return __copy_from_user(tsk->thread.cpextra, buf, XTENSA_CP_EXTRA_SIZE);
186186
#endif
187187
return 0;
188188
}

‎arch/xtensa/kernel/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void __init time_init(void)
6868
* speed for the CALIBRATE.
6969
*/
7070

71-
#if CONFIG_XTENSA_CALIBRATE_CCOUNT
71+
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
7272
printk("Calibrating CPU frequency ");
7373
platform_calibrate_ccount();
7474
printk("%d.%02d MHz\n", (int)ccount_per_jiffy/(1000000/HZ),

‎arch/xtensa/mm/init.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void __init mem_init(void)
239239
high_memory = (void *) __va(max_mapnr << PAGE_SHIFT);
240240
highmemsize = 0;
241241

242-
#if CONFIG_HIGHMEM
242+
#ifdef CONFIG_HIGHMEM
243243
#error HIGHGMEM not implemented in init.c
244244
#endif
245245

‎include/asm-xtensa/atomic.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ typedef struct { volatile int counter; } atomic_t;
2222
#include <asm/processor.h>
2323
#include <asm/system.h>
2424

25-
#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
25+
#define ATOMIC_INIT(i) { (i) }
2626

2727
/*
2828
* This Xtensa implementation assumes that the right mechanism

‎include/asm-xtensa/bitops.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static __inline__ int test_bit(int nr, const volatile void *addr)
174174
return 1UL & (((const volatile unsigned int *)addr)[nr>>5] >> (nr&31));
175175
}
176176

177-
#if XCHAL_HAVE_NSAU
177+
#if XCHAL_HAVE_NSA
178178

179179
static __inline__ int __cntlz (unsigned long x)
180180
{

‎include/asm-xtensa/hardirq.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ typedef struct {
2323
unsigned int __nmi_count; /* arch dependent */
2424
} ____cacheline_aligned irq_cpustat_t;
2525

26+
void ack_bad_irq(unsigned int irq);
2627
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
2728

2829
#endif /* _XTENSA_HARDIRQ_H */

0 commit comments

Comments
 (0)