Commit 8080f231224ccd3169f39e73fd750ba98d5b98a7

Authored by David Howells
Committed by Linus Torvalds
1 parent c13cf856cb

[PATCH] FRV: Make the FRV arch work again

The attached patch implements a bunch of small changes to the FRV arch to
make it work again.

It deals with the following problems:

 (1) SEM_DEBUG should be SEMAPHORE_DEBUG.

 (2) The argument list to pcibios_penalize_isa_irq() has changed.

 (3) CONFIG_HIGHMEM can't be used directly in #if as it may not be defined.

 (4) page->private is no longer directly accessible.

 (5) linux/hardirq.h assumes asm/hardirq.h will include linux/irq.h

 (6) The IDE MMIO access functions are given pointers, not integers, and so
     get type casting errors.

 (7) __pa() is passed an explicit u64 type in drivers/char/mem.c, but that
     can't be cast directly to a pointer on a 32-bit platform.

 (8) SEMAPHORE_DEBUG should not be contingent on WAITQUEUE_DEBUG as that no
     longer exists.

 (9) PREEMPT_ACTIVE is too low a value.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 9 changed files with 15 additions and 14 deletions Side-by-side Diff

arch/frv/kernel/semaphore.c
... ... @@ -20,7 +20,7 @@
20 20 struct task_struct *task;
21 21 };
22 22  
23   -#if SEM_DEBUG
  23 +#if SEMAPHORE_DEBUG
24 24 void semtrace(struct semaphore *sem, const char *str)
25 25 {
26 26 if (sem->debug)
arch/frv/mb93090-mb00/pci-irq.c
... ... @@ -60,7 +60,7 @@
60 60 }
61 61 }
62 62  
63   -void __init pcibios_penalize_isa_irq(int irq, int active)
  63 +void __init pcibios_penalize_isa_irq(int irq)
64 64 {
65 65 }
66 66  
... ... @@ -108,7 +108,7 @@
108 108  
109 109 memset((void *) empty_zero_page, 0, PAGE_SIZE);
110 110  
111   -#if CONFIG_HIGHMEM
  111 +#ifdef CONFIG_HIGHMEM
112 112 if (num_physpages - num_mappedpages) {
113 113 pgd_t *pge;
114 114 pud_t *pue;
arch/frv/mm/pgalloc.c
... ... @@ -85,7 +85,7 @@
85 85 struct page *page = virt_to_page(pgd);
86 86 page->index = (unsigned long) pgd_list;
87 87 if (pgd_list)
88   - pgd_list->private = (unsigned long) &page->index;
  88 + set_page_private(pgd_list, (unsigned long) &page->index);
89 89 pgd_list = page;
90 90 set_page_private(page, (unsigned long)&pgd_list);
91 91 }
92 92  
... ... @@ -94,10 +94,10 @@
94 94 {
95 95 struct page *next, **pprev, *page = virt_to_page(pgd);
96 96 next = (struct page *) page->index;
97   - pprev = (struct page **)page_private(page);
  97 + pprev = (struct page **) page_private(page);
98 98 *pprev = next;
99 99 if (next)
100   - next->private = (unsigned long) pprev;
  100 + set_page_private(next, (unsigned long) pprev);
101 101 }
102 102  
103 103 void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
include/asm-frv/hardirq.h
... ... @@ -14,6 +14,7 @@
14 14  
15 15 #include <linux/config.h>
16 16 #include <linux/threads.h>
  17 +#include <linux/irq.h>
17 18  
18 19 typedef struct {
19 20 unsigned int __softirq_pending;
include/asm-frv/ide.h
... ... @@ -33,10 +33,10 @@
33 33 /*
34 34 * some bits needed for parts of the IDE subsystem to compile
35 35 */
36   -#define __ide_mm_insw(port, addr, n) insw(port, addr, n)
37   -#define __ide_mm_insl(port, addr, n) insl(port, addr, n)
38   -#define __ide_mm_outsw(port, addr, n) outsw(port, addr, n)
39   -#define __ide_mm_outsl(port, addr, n) outsl(port, addr, n)
  36 +#define __ide_mm_insw(port, addr, n) insw((unsigned long) (port), addr, n)
  37 +#define __ide_mm_insl(port, addr, n) insl((unsigned long) (port), addr, n)
  38 +#define __ide_mm_outsw(port, addr, n) outsw((unsigned long) (port), addr, n)
  39 +#define __ide_mm_outsl(port, addr, n) outsl((unsigned long) (port), addr, n)
40 40  
41 41  
42 42 #endif /* __KERNEL__ */
include/asm-frv/page.h
... ... @@ -47,8 +47,8 @@
47 47  
48 48 #define devmem_is_allowed(pfn) 1
49 49  
50   -#define __pa(vaddr) virt_to_phys((void *) vaddr)
51   -#define __va(paddr) phys_to_virt((unsigned long) paddr)
  50 +#define __pa(vaddr) virt_to_phys((void *) (unsigned long) (vaddr))
  51 +#define __va(paddr) phys_to_virt((unsigned long) (paddr))
52 52  
53 53 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
54 54  
include/asm-frv/semaphore.h
... ... @@ -20,7 +20,7 @@
20 20 #include <linux/spinlock.h>
21 21 #include <linux/rwsem.h>
22 22  
23   -#define SEMAPHORE_DEBUG WAITQUEUE_DEBUG
  23 +#define SEMAPHORE_DEBUG 0
24 24  
25 25 /*
26 26 * the semaphore definition
include/asm-frv/thread_info.h
... ... @@ -58,7 +58,7 @@
58 58  
59 59 #endif
60 60  
61   -#define PREEMPT_ACTIVE 0x4000000
  61 +#define PREEMPT_ACTIVE 0x10000000
62 62  
63 63 /*
64 64 * macros/functions for gaining access to the thread information structure