summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/hardirq.h13
-rw-r--r--include/asm-alpha/hw_irq.h17
-rw-r--r--include/asm-alpha/machvec.h6
-rw-r--r--include/asm-alpha/mmu_context.h86
-rw-r--r--include/asm-alpha/pci.h17
-rw-r--r--include/asm-alpha/pgalloc.h78
-rw-r--r--include/asm-alpha/pgtable.h3
-rw-r--r--include/asm-alpha/smp.h2
-rw-r--r--include/asm-alpha/socket.h2
-rw-r--r--include/asm-arm/arch-cl7500/hardware.h2
-rw-r--r--include/asm-arm/arch-cl7500/memory.h10
-rw-r--r--include/asm-arm/arch-cl7500/param.h2
-rw-r--r--include/asm-arm/arch-cl7500/processor.h2
-rw-r--r--include/asm-arm/arch-cl7500/serial.h6
-rw-r--r--include/asm-arm/arch-cl7500/system.h25
-rw-r--r--include/asm-arm/arch-cl7500/time.h9
-rw-r--r--include/asm-arm/arch-nexuspci/dma.h9
-rw-r--r--include/asm-arm/arch-nexuspci/hardware.h47
-rw-r--r--include/asm-arm/arch-nexuspci/io.h187
-rw-r--r--include/asm-arm/arch-nexuspci/irq.h54
-rw-r--r--include/asm-arm/arch-nexuspci/irqs.h33
-rw-r--r--include/asm-arm/arch-nexuspci/memory.h15
-rw-r--r--include/asm-arm/arch-nexuspci/system.h4
-rw-r--r--include/asm-arm/arch-nexuspci/time.h39
-rw-r--r--include/asm-arm/arch-nexuspci/uncompress.h46
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h17
-rw-r--r--include/asm-arm/parport.h13
-rw-r--r--include/asm-arm/pci.h14
-rw-r--r--include/asm-arm/pgtable.h3
-rw-r--r--include/asm-arm/socket.h2
-rw-r--r--include/asm-arm/system.h11
-rw-r--r--include/asm-i386/hardirq.h16
-rw-r--r--include/asm-i386/hw_irq.h1
-rw-r--r--include/asm-i386/parport.h2
-rw-r--r--include/asm-i386/pgtable.h1
-rw-r--r--include/asm-i386/socket.h2
-rw-r--r--include/asm-i386/spinlock.h1
-rw-r--r--include/asm-ia64/pgtable.h1
-rw-r--r--include/asm-ia64/socket.h2
-rw-r--r--include/asm-m68k/pgtable.h1
-rw-r--r--include/asm-m68k/socket.h2
-rw-r--r--include/asm-mips/bitops.h7
-rw-r--r--include/asm-mips/bootinfo.h5
-rw-r--r--include/asm-mips/hardirq.h16
-rw-r--r--include/asm-mips/io.h4
-rw-r--r--include/asm-mips/keyboard.h3
-rw-r--r--include/asm-mips/parport.h4
-rw-r--r--include/asm-mips/pgtable.h3
-rw-r--r--include/asm-mips/socket.h4
-rw-r--r--include/asm-mips64/checksum.h4
-rw-r--r--include/asm-mips64/dma.h3
-rw-r--r--include/asm-mips64/hardirq.h16
-rw-r--r--include/asm-mips64/keyboard.h3
-rw-r--r--include/asm-mips64/mmu_context.h3
-rw-r--r--include/asm-mips64/mmzone.h1
-rw-r--r--include/asm-mips64/pgtable.h3
-rw-r--r--include/asm-mips64/sn/sn0/hubmd.h4
-rw-r--r--include/asm-mips64/socket.h4
-rw-r--r--include/asm-ppc/pgtable.h1
-rw-r--r--include/asm-ppc/socket.h2
-rw-r--r--include/asm-sh/pgtable.h1
-rw-r--r--include/asm-sh/socket.h2
-rw-r--r--include/asm-sparc/pgtable.h1
-rw-r--r--include/asm-sparc/socket.h4
-rw-r--r--include/asm-sparc/spinlock.h23
-rw-r--r--include/asm-sparc64/pgtable.h1
-rw-r--r--include/asm-sparc64/socket.h4
-rw-r--r--include/linux/ac97_codec.h2
-rw-r--r--include/linux/affs_fs.h1
-rw-r--r--include/linux/in6.h14
-rw-r--r--include/linux/input.h14
-rw-r--r--include/linux/ioport.h1
-rw-r--r--include/linux/irq.h23
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/netdevice.h39
-rw-r--r--include/linux/netfilter.h66
-rw-r--r--include/linux/netfilter_decnet.h6
-rw-r--r--include/linux/netfilter_ipv4.h1
-rw-r--r--include/linux/nfsd/nfsd.h5
-rw-r--r--include/linux/nfsd/nfsfh.h62
-rw-r--r--include/linux/pkt_sched.h10
-rw-r--r--include/linux/pm.h6
-rw-r--r--include/linux/udf_167.h3
-rw-r--r--include/linux/udf_fs.h17
-rw-r--r--include/linux/udf_fs_i.h3
-rw-r--r--include/linux/udf_fs_sb.h3
-rw-r--r--include/net/dn_neigh.h4
-rw-r--r--include/net/ip.h8
-rw-r--r--include/net/ipv6.h4
-rw-r--r--include/net/protocol.h4
-rw-r--r--include/net/sock.h2
91 files changed, 682 insertions, 546 deletions
diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
index 6f8b9ffe3..1c8101d58 100644
--- a/include/asm-alpha/hardirq.h
+++ b/include/asm-alpha/hardirq.h
@@ -46,7 +46,16 @@ extern unsigned long __irq_attempt[];
extern int global_irq_holder;
extern spinlock_t global_irq_lock;
-extern atomic_t global_irq_count;
+
+static inline int irqs_running (void)
+{
+ int i;
+
+ for (i = 0; i < smp_num_cpus; i++)
+ if (local_irq_count(i))
+ return 1;
+ return 0;
+}
static inline void release_irqlock(int cpu)
{
@@ -60,7 +69,6 @@ static inline void release_irqlock(int cpu)
static inline void irq_enter(int cpu, int irq)
{
++local_irq_count(cpu);
- atomic_inc(&global_irq_count);
while (spin_is_locked(&global_irq_lock))
barrier();
@@ -68,7 +76,6 @@ static inline void irq_enter(int cpu, int irq)
static inline void irq_exit(int cpu, int irq)
{
- atomic_dec(&global_irq_count);
--local_irq_count(cpu);
}
diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h
index 1bf6629b4..40ac4056d 100644
--- a/include/asm-alpha/hw_irq.h
+++ b/include/asm-alpha/hw_irq.h
@@ -1,5 +1,14 @@
-/* This exists merely to satisfy <linux/irq.h>. There is
- nothing that would go here of general interest.
+#ifndef _ALPHA_HW_IRQ_H
+#define _ALPHA_HW_IRQ_H
- Everything of consequence is in arch/alpha/kernel/irq_impl.h,
- to be used only in arch/alpha/kernel/. */
+#include <linux/config.h>
+
+static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
+
+#ifdef CONFIG_ALPHA_GENERIC
+#define ACTUAL_NR_IRQS alpha_mv.nr_irqs
+#else
+#define ACTUAL_NR_IRQS NR_IRQS
+#endif
+
+#endif
diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h
index b8a2a1a96..0aad19668 100644
--- a/include/asm-alpha/machvec.h
+++ b/include/asm-alpha/machvec.h
@@ -22,7 +22,6 @@ struct linux_hose_info;
struct pci_dev;
struct pci_ops;
struct pci_controler;
-struct irqaction;
struct alpha_machine_vector
{
@@ -67,10 +66,9 @@ struct alpha_machine_vector
void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
struct task_struct *, long);
- void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *, long);
+ void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
void (*mv_flush_tlb_current)(struct mm_struct *);
- void (*mv_flush_tlb_other)(struct mm_struct *);
void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
struct vm_area_struct *vma,
unsigned long addr);
@@ -82,7 +80,7 @@ struct alpha_machine_vector
void (*init_arch)(void);
void (*init_irq)(void);
- void (*init_rtc)(struct irqaction *);
+ void (*init_rtc)(void);
void (*init_pci)(void);
void (*kill_arch)(int);
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index 1d150d523..6b268f4e6 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -22,7 +22,8 @@
#include <asm/io.h>
#endif
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
{
}
@@ -58,8 +59,7 @@ __reload_thread(struct thread_struct *pcb)
* in use) and the Valid bit set, then entries can also effectively be
* made coherent by assigning a new, unused ASN to the currently
* running process and not reusing the previous ASN before calling the
- * appropriate PALcode routine to invalidate the translation buffer
- * (TB)".
+ * appropriate PALcode routine to invalidate the translation buffer (TB)".
*
* In short, the EV4 has a "kind of" ASN capability, but it doesn't actually
* work correctly and can thus not be used (explaining the lack of PAL-code
@@ -123,8 +123,6 @@ extern unsigned long last_asn;
#define __MMU_EXTERN_INLINE
#endif
-extern void get_new_mm_context(struct task_struct *p, struct mm_struct *mm);
-
static inline unsigned long
__get_new_mm_context(struct mm_struct *mm, long cpu)
{
@@ -133,6 +131,7 @@ __get_new_mm_context(struct mm_struct *mm, long cpu)
if ((asn & HARDWARE_ASN_MASK) >= MAX_ASN) {
tbiap();
+ imb();
next = (asn & ~HARDWARE_ASN_MASK) + ASN_FIRST_VERSION;
}
cpu_last_asn(cpu) = next;
@@ -140,35 +139,6 @@ __get_new_mm_context(struct mm_struct *mm, long cpu)
}
__EXTERN_INLINE void
-ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
- struct task_struct *next, long cpu)
-{
- /* As described, ASN's are broken. But we can optimize for
- switching between threads -- if the mm is unchanged from
- current we needn't flush. */
- /* ??? May not be needed because EV4 PALcode recognizes that
- ASN's are broken and does a tbiap itself on swpctx, under
- the "Must set ASN or flush" rule. At least this is true
- for a 1992 SRM, reports Joseph Martin (jmartin@hlo.dec.com).
- I'm going to leave this here anyway, just to Be Sure. -- r~ */
-
- if (prev_mm != next_mm)
- tbiap();
-}
-
-__EXTERN_INLINE void
-ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm, long cpu)
-{
- /* This is only called after changing mm on current. */
- tbiap();
-
- current->thread.ptbr
- = ((unsigned long) next_mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
-
- __reload_thread(&current->thread);
-}
-
-__EXTERN_INLINE void
ev5_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
struct task_struct *next, long cpu)
{
@@ -193,28 +163,50 @@ ev5_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
}
__EXTERN_INLINE void
-ev5_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm, long cpu)
+ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
+ struct task_struct *next, long cpu)
{
- unsigned long mmc = __get_new_mm_context(next_mm, cpu);
- next_mm->context = mmc;
- current->thread.asn = mmc & HARDWARE_ASN_MASK;
- current->thread.ptbr
- = ((unsigned long) next_mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
+ /* As described, ASN's are broken for TLB usage. But we can
+ optimize for switching between threads -- if the mm is
+ unchanged from current we needn't flush. */
+ /* ??? May not be needed because EV4 PALcode recognizes that
+ ASN's are broken and does a tbiap itself on swpctx, under
+ the "Must set ASN or flush" rule. At least this is true
+ for a 1992 SRM, reports Joseph Martin (jmartin@hlo.dec.com).
+ I'm going to leave this here anyway, just to Be Sure. -- r~ */
+ if (prev_mm != next_mm)
+ tbiap();
+
+ /* Do continue to allocate ASNs, because we can still use them
+ to avoid flushing the icache. */
+ ev5_switch_mm(prev_mm, next_mm, next, cpu);
+}
- __reload_thread(&current->thread);
+extern void __load_new_mm_context(struct mm_struct *);
+
+__EXTERN_INLINE void
+ev5_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
+{
+ __load_new_mm_context(next_mm);
}
+__EXTERN_INLINE void
+ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
+{
+ __load_new_mm_context(next_mm);
+ tbiap();
+}
#ifdef CONFIG_ALPHA_GENERIC
-# define switch_mm alpha_mv.mv_switch_mm
-# define activate_mm(x,y) alpha_mv.mv_activate_mm((x),(y),smp_processor_id())
+# define switch_mm(a,b,c,d) alpha_mv.mv_switch_mm((a),(b),(c),(d))
+# define activate_mm(x,y) alpha_mv.mv_activate_mm((x),(y))
#else
# ifdef CONFIG_ALPHA_EV4
-# define switch_mm ev4_switch_mm
-# define activate_mm(x,y) ev4_activate_mm((x),(y),smp_processor_id())
+# define switch_mm(a,b,c,d) ev4_switch_mm((a),(b),(c),(d))
+# define activate_mm(x,y) ev4_activate_mm((x),(y))
# else
-# define switch_mm ev5_switch_mm
-# define activate_mm(x,y) ev5_activate_mm((x),(y),smp_processor_id())
+# define switch_mm(a,b,c,d) ev5_switch_mm((a),(b),(c),(d))
+# define activate_mm(x,y) ev5_activate_mm((x),(y))
# endif
#endif
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index 4695112ce..1a68d43a3 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -12,22 +12,7 @@
struct pci_dev;
struct pci_bus;
struct resource;
-
-/* A PCI IOMMU allocation arena. There are typically two of these
- regions per bus. */
-/* ??? The 8400 has a 32-byte pte entry, and the entire table apparently
- lives directly on the host bridge (no tlb?). We don't support this
- machine, but if we ever did, we'd need to parameterize all this quite
- a bit further. Probably with per-bus operation tables. */
-
-struct pci_iommu_arena
-{
- spinlock_t lock;
- unsigned long *ptes;
- dma_addr_t dma_base;
- unsigned int size;
- unsigned int alloc_hint;
-};
+struct pci_iommu_arena;
/* A controler. Used to manage multiple PCI busses. */
diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
index e4689c758..f3d42ed96 100644
--- a/include/asm-alpha/pgalloc.h
+++ b/include/asm-alpha/pgalloc.h
@@ -3,50 +3,84 @@
#include <linux/config.h>
+#ifndef __EXTERN_INLINE
+#define __EXTERN_INLINE extern inline
+#define __MMU_EXTERN_INLINE
+#endif
+
+extern void __load_new_mm_context(struct mm_struct *);
+
+
/* Caches aren't brain-dead on the Alpha. */
#define flush_cache_all() do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
#define flush_cache_range(mm, start, end) do { } while (0)
#define flush_cache_page(vma, vmaddr) do { } while (0)
#define flush_page_to_ram(page) do { } while (0)
-/*
- * The icache is not coherent with the dcache on alpha, thus before
- * running self modified code like kernel modules we must always run
- * an imb().
- */
+
+/* Note that the following two definitions are _highly_ dependent
+ on the contexts in which they are used in the kernel. I personally
+ think it is criminal how loosely defined these macros are. */
+
+/* We need to flush the kernel's icache after loading modules. The
+ only other use of this macro is in load_aout_interp which is not
+ used on Alpha.
+
+ Note that this definition should *not* be used for userspace
+ icache flushing. While functional, it is _way_ overkill. The
+ icache is tagged with ASNs and it suffices to allocate a new ASN
+ for the process. */
#ifndef __SMP__
#define flush_icache_range(start, end) imb()
#else
#define flush_icache_range(start, end) smp_imb()
extern void smp_imb(void);
#endif
-#define flush_icache_page(vma, page) do { } while (0)
+
+/* We need to flush the userspace icache after setting breakpoints in
+ ptrace. I don't think it's needed in do_swap_page, or do_no_page,
+ but I don't know how to get rid of it either.
+
+ Instead of indiscriminately using imb, take advantage of the fact
+ that icache entries are tagged with the ASN and load a new mm context. */
+/* ??? Ought to use this in arch/alpha/kernel/signal.c too. */
+
+#ifndef __SMP__
+static inline void
+flush_icache_page(struct vm_area_struct *vma, struct page *page)
+{
+ if (vma->vm_flags & VM_EXEC) {
+ struct mm_struct *mm = vma->vm_mm;
+ mm->context = 0;
+ if (current->active_mm == mm)
+ __load_new_mm_context(mm);
+ }
+}
+#else
+extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
+#endif
+
/*
* Use a few helper functions to hide the ugly broken ASN
* numbers on early Alphas (ev4 and ev45)
*/
-#ifndef __EXTERN_INLINE
-#define __EXTERN_INLINE extern inline
-#define __MMU_EXTERN_INLINE
-#endif
-
__EXTERN_INLINE void
ev4_flush_tlb_current(struct mm_struct *mm)
{
+ __load_new_mm_context(mm);
tbiap();
}
__EXTERN_INLINE void
-ev4_flush_tlb_other(struct mm_struct *mm)
+ev5_flush_tlb_current(struct mm_struct *mm)
{
+ __load_new_mm_context(mm);
}
-extern void ev5_flush_tlb_current(struct mm_struct *mm);
-
-__EXTERN_INLINE void
-ev5_flush_tlb_other(struct mm_struct *mm)
+extern inline void
+flush_tlb_other(struct mm_struct *mm)
{
mm->context = 0;
}
@@ -62,7 +96,12 @@ ev4_flush_tlb_current_page(struct mm_struct * mm,
struct vm_area_struct *vma,
unsigned long addr)
{
- tbi(2 + ((vma->vm_flags & VM_EXEC) != 0), addr);
+ int tbi_flag = 2;
+ if (vma->vm_flags & VM_EXEC) {
+ __load_new_mm_context(mm);
+ tbi_flag = 3;
+ }
+ tbi(tbi_flag, addr);
}
__EXTERN_INLINE void
@@ -71,7 +110,7 @@ ev5_flush_tlb_current_page(struct mm_struct * mm,
unsigned long addr)
{
if (vma->vm_flags & VM_EXEC)
- ev5_flush_tlb_current(mm);
+ __load_new_mm_context(mm);
else
tbi(2, addr);
}
@@ -79,16 +118,13 @@ ev5_flush_tlb_current_page(struct mm_struct * mm,
#ifdef CONFIG_ALPHA_GENERIC
# define flush_tlb_current alpha_mv.mv_flush_tlb_current
-# define flush_tlb_other alpha_mv.mv_flush_tlb_other
# define flush_tlb_current_page alpha_mv.mv_flush_tlb_current_page
#else
# ifdef CONFIG_ALPHA_EV4
# define flush_tlb_current ev4_flush_tlb_current
-# define flush_tlb_other ev4_flush_tlb_other
# define flush_tlb_current_page ev4_flush_tlb_current_page
# else
# define flush_tlb_current ev5_flush_tlb_current
-# define flush_tlb_other ev5_flush_tlb_other
# define flush_tlb_current_page ev5_flush_tlb_current_page
# endif
#endif
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index ff8c6e9d1..0c5052788 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -40,6 +40,7 @@
#define PTRS_PER_PMD (1UL << (PAGE_SHIFT-3))
#define PTRS_PER_PGD ((1UL << (PAGE_SHIFT-3))-1)
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
/* Number of pointers that fit on a page: this will go away. */
#define PTRS_PER_PAGE (1UL << (PAGE_SHIFT-3))
@@ -306,4 +307,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
#define pgd_ERROR(e) \
printk("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
+extern void paging_init(void);
+
#endif /* _ALPHA_PGTABLE_H */
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
index c189b6569..12ebc5087 100644
--- a/include/asm-alpha/smp.h
+++ b/include/asm-alpha/smp.h
@@ -55,6 +55,8 @@ extern int __cpu_logical_map[NR_CPUS];
#define hard_smp_processor_id() __hard_smp_processor_id()
#define smp_processor_id() (current->processor)
+extern unsigned long cpu_present_mask;
+
#endif /* __SMP__ */
#define NO_PROC_ID (-1)
diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h
index a40786fad..f8b4154bd 100644
--- a/include/asm-alpha/socket.h
+++ b/include/asm-alpha/socket.h
@@ -43,6 +43,8 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 19
#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
diff --git a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h
index b155e6933..69ce419cc 100644
--- a/include/asm-arm/arch-cl7500/hardware.h
+++ b/include/asm-arm/arch-cl7500/hardware.h
@@ -52,7 +52,7 @@
#define FLUSH_BASE 0xdf000000
-#ifndef __ASSEMBLER__
+#ifndef __ASSEMBLY__
/*
* for use with inb/outb
diff --git a/include/asm-arm/arch-cl7500/memory.h b/include/asm-arm/arch-cl7500/memory.h
index ecd1aa035..a1811df0c 100644
--- a/include/asm-arm/arch-cl7500/memory.h
+++ b/include/asm-arm/arch-cl7500/memory.h
@@ -18,16 +18,18 @@
* Task size: 3GB
*/
#define TASK_SIZE (0xc0000000UL)
+#define TASK_SIZE_26 (0x04000000UL)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
+#define PHYS_OFFSET (0x10000000UL)
-#ifndef __ASSEMBLY__
-extern unsigned long __virt_to_phys(unsigned long vpage);
-extern unsigned long __phys_to_virt(unsigned long ppage);
-#endif
+#define __virt_to_phys__is_a_macro
+#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt__is_a_macro
+#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/*
* These are exactly the same on the RiscPC as the
diff --git a/include/asm-arm/arch-cl7500/param.h b/include/asm-arm/arch-cl7500/param.h
index 46c223599..c2ae51097 100644
--- a/include/asm-arm/arch-cl7500/param.h
+++ b/include/asm-arm/arch-cl7500/param.h
@@ -3,3 +3,5 @@
*
* Copyright (C) 1999 Nexus Electronics Ltd
*/
+
+#define HZ 100
diff --git a/include/asm-arm/arch-cl7500/processor.h b/include/asm-arm/arch-cl7500/processor.h
index 41bf0451f..3f75f16bc 100644
--- a/include/asm-arm/arch-cl7500/processor.h
+++ b/include/asm-arm/arch-cl7500/processor.h
@@ -11,8 +11,6 @@
#ifndef __ASM_ARCH_PROCESSOR_H
#define __ASM_ARCH_PROCESSOR_H
-#include <asm/arch/memory.h>
-
/*
* Bus types
*/
diff --git a/include/asm-arm/arch-cl7500/serial.h b/include/asm-arm/arch-cl7500/serial.h
index 4132273cc..256b2a34e 100644
--- a/include/asm-arm/arch-cl7500/serial.h
+++ b/include/asm-arm/arch-cl7500/serial.h
@@ -20,10 +20,12 @@
*/
#define BASE_BAUD (1843200 / 16)
+#define RS_TABLE_SIZE 16
+
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
/* UART CLK PORT IRQ FLAGS */
-#define SERIAL_PORT_DFNS \
+#define STD_SERIAL_PORT_DEFNS \
{ 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
{ 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ \
{ 0, BASE_BAUD, 0x804002e8, 41, STD_COM_FLAGS }, /* ttyS2 */ \
@@ -39,4 +41,6 @@
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS12 */ \
{ 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */
+#define EXTRA_SERIAL_PORT_DEFNS
+
#endif
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
index 201c5c305..24b64ede3 100644
--- a/include/asm-arm/arch-cl7500/system.h
+++ b/include/asm-arm/arch-cl7500/system.h
@@ -8,21 +8,20 @@
#include <asm/iomd.h>
-#define arch_reset(mode) { \
- outb (0, IOMD_ROMCR0); \
- cli(); \
- __asm__ __volatile__( \
- "mcr p15, 0, %0, c1, c0, 0;" \
- "mov pc, #0" \
- : \
- : "r" (cpu_reset())); \
+#define arch_do_idle() \
+ outb(0, IOMD_SUSMODE)
+
+#define arch_reset(mode) { \
+ outb (0, IOMD_ROMCR0); \
+ cli(); \
+ __asm__ __volatile__("msr spsr, r1;" \
+ "mcr p15, 0, %0, c1, c0, 0;" \
+ "movs pc, #0" \
+ : \
+ : "r" (cpu_reset())); \
}
-/*
- * We can wait for an interrupt...
- */
-#define arch_do_idle() \
- outb(0, IOMD_SUSMODE)
+#define arch_power_off() do { } while (0)
#define arch_power_off() do { } while (0)
diff --git a/include/asm-arm/arch-cl7500/time.h b/include/asm-arm/arch-cl7500/time.h
index 59cb2d6fd..e2c927605 100644
--- a/include/asm-arm/arch-cl7500/time.h
+++ b/include/asm-arm/arch-cl7500/time.h
@@ -17,12 +17,11 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
/* Twinkle the lights. */
- static int count, bit = 8, dir = 1;
+ static int count, state = 0xff;
if (count-- == 0) {
- bit += dir;
- if (bit == 8 || bit == 15) dir = -dir;
- count = 5;
- *((volatile unsigned int *)(0xe002ba00)) = 1 << bit;
+ state ^= 1;
+ count = 25;
+ *((volatile unsigned int *)(0xe002ba00)) = state;
}
}
diff --git a/include/asm-arm/arch-nexuspci/dma.h b/include/asm-arm/arch-nexuspci/dma.h
index 6d0a46e17..d8f89e3c4 100644
--- a/include/asm-arm/arch-nexuspci/dma.h
+++ b/include/asm-arm/arch-nexuspci/dma.h
@@ -1,9 +1,12 @@
/*
* linux/include/asm-arm/arch-nexuspci/dma.h
*
- * Architecture DMA routines - NexusPCI has no DMA, so this file is very
- * simple. :-)
+ * Architecture DMA routines
*
- * Copyright (C) 1998 Philip Blundell
+ * Copyright (C) 1998, 1999 Philip Blundell
*/
+/*
+ * This is the maximum DMA address that can be DMAd to.
+ */
+#define MAX_DMA_ADDRESS 0xffffffff
diff --git a/include/asm-arm/arch-nexuspci/hardware.h b/include/asm-arm/arch-nexuspci/hardware.h
index 2d267d89a..364edd010 100644
--- a/include/asm-arm/arch-nexuspci/hardware.h
+++ b/include/asm-arm/arch-nexuspci/hardware.h
@@ -1,31 +1,66 @@
/*
* linux/include/asm-arm/arch-nexuspci/hardware.h
*
- * Copyright (C) 1998-1999 Philip Blundell
+ * Copyright (C) 1998, 1999, 2000 FutureTV Labs Ltd.
*
- * This file contains the hardware definitions of the Nexus PCI card.
+ * This file contains the hardware definitions of the FTV PCI card.
*/
#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H
/* Logical Physical
- * 0xfff00000 0x10000000 SCC2691 DUART
* 0xffe00000 0x20000000 INTCONT
* 0xffd00000 0x30000000 Status
* 0xffc00000 0x60000000 PLX registers
- * 0xfe000000 0x70000000 PCI I/O
+ * 0xfe000000 0xC0000000 PCI I/O
+ * 0xfd000000 0x70000000 cache flush
+ * 0xfc000000 0x80000000 PCI/ISA memory
+ * 0xe0000000 0x10000000 SCC2691 DUART
*/
/*
* Mapping areas
*/
+#define INTCONT_BASE 0xffe00000
+#define STATUS_BASE 0xffd00000
+#define PLX_BASE 0xffc00000
#define PCIO_BASE 0xfe000000
-#define FLUSH_BASE 0xdf000000
+#define FLUSH_BASE 0xfd000000
+#define DUART_BASE 0xe0000000
+#define PCIMEM_BASE 0xfc000000
+
+#define PLX_IO_START 0xC0000000
+#define PLX_MEM_START 0x80000000
+#define PLX_START 0x60000000
+#define STATUS_START 0x30000000
+#define INTCONT_START 0x20000000
+#define DUART_START 0x10000000
/*
* RAM definitions
*/
#define RAM_BASE 0x40000000
-#define FLUSH_BASE_PHYS 0x40000000
+#define FLUSH_BASE_PHYS 0x70000000
+
+/*
+ * Miscellaneous INTCONT bits
+ */
+#define INTCONT_FIQ_PLX 0x00
+#define INTCONT_FIQ_D 0x02
+#define INTCONT_FIQ_C 0x04
+#define INTCONT_FIQ_B 0x06
+#define INTCONT_FIQ_A 0x08
+#define INTCONT_FIQ_SYSERR 0x0a
+#define INTCONT_IRQ_DUART 0x0c
+#define INTCONT_IRQ_PLX 0x0e
+#define INTCONT_IRQ_D 0x10
+#define INTCONT_IRQ_C 0x12
+#define INTCONT_IRQ_B 0x14
+#define INTCONT_IRQ_A 0x16
+#define INTCONT_IRQ_SYSERR 0x1e
+
+#define INTCONT_WATCHDOG 0x18
+#define INTCONT_LED 0x1a
+#define INTCONT_PCI_RESET 0x1c
#endif
diff --git a/include/asm-arm/arch-nexuspci/io.h b/include/asm-arm/arch-nexuspci/io.h
index 3c8d15b3d..81033afa2 100644
--- a/include/asm-arm/arch-nexuspci/io.h
+++ b/include/asm-arm/arch-nexuspci/io.h
@@ -1,147 +1,96 @@
/*
* linux/include/asm-arm/arch-nexuspci/io.h
*
- * Copyright (C) 1997,1998 Russell King
- *
- * Modifications:
- * 06-Dec-1997 RMK Created.
+ * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 2000 FutureTV Labs Ltd.
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
-#define IO_SPACE_LIMIT 0xffffffff
+#define IO_SPACE_LIMIT 0xffff
/*
- * Dynamic IO functions - let the compiler
- * optimize the expressions
+ * Translation of various region addresses to virtual addresses
*/
-#define DECLARE_DYN_OUT(fnsuffix,instr,typ) \
-extern __inline__ void __out##fnsuffix (unsigned int value, unsigned int port) \
-{ \
- __asm__ __volatile__( \
- "str" ##instr## " %0, [%1, %2]" \
- : \
- : "r" (value), "r" (PCIO_BASE), typ (port)); \
-}
-
-#define DECLARE_DYN_IN(sz,fnsuffix,instr,typ) \
-extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \
-{ \
- unsigned long value; \
- __asm__ __volatile__( \
- "ldr" ##instr## " %0, [%1, %2]" \
- : "=&r" (value) \
- : "r" (PCIO_BASE), typ (port)); \
- return (unsigned sz)value; \
+#define __io_pci(a) (PCIO_BASE + (a))
+#if 1
+#define __mem_pci(a) ((unsigned long)(a))
+#define __mem_isa(a) (PCIMEM_BASE + (unsigned long)(a))
+#else
+
+extern __inline__ unsigned long ___mem_pci(unsigned long a)
+{
+ /* PCI addresses must have been ioremapped */
+ if (a <= 0xc0000000 || a >= 0xe0000000)
+ *((int *)0) = 0;
+ return a;
}
-extern __inline__ unsigned int __ioaddr (unsigned int port) \
-{ \
- return (unsigned int)(PCIO_BASE + port); \
+extern __inline__ unsigned long ___mem_isa(unsigned long a)
+{
+ if (a >= 16*1048576)
+ BUG();
+ return PCIMEM_BASE + a;
}
+#define __mem_pci(a) ___mem_pci((unsigned long)(a))
+#define __mem_isa(a) ___mem_isa((unsigned long)(a))
+#endif
-#define DECLARE_IO(sz,fnsuffix,instr,typ) \
- DECLARE_DYN_OUT(fnsuffix,instr,typ) \
- DECLARE_DYN_IN(sz,fnsuffix,instr,typ)
-
-DECLARE_IO(char,b,"b","Jr")
-DECLARE_IO(short,w,"h","r")
-DECLARE_IO(int,l,"","Jr")
-
-#undef DECLARE_IO
-#undef DECLARE_DYN_OUT
-#undef DECLARE_DYN_IN
+/* the following macro is depreciated */
+#define __ioaddr(p) __io_pci(p)
/*
- * Constant address IO functions
- *
- * These have to be macros for the 'J' constraint to work -
- * +/-4096 immediate operand.
+ * Generic virtual read/write
*/
-#define __outbc(value,port) \
-({ \
- __asm__ __volatile__( \
- "strb %0, [%1, %2]" \
- : \
- : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \
-})
-
-#define __inbc(port) \
-({ \
- unsigned char result; \
- __asm__ __volatile__( \
- "ldrb %0, [%1, %2]" \
- : "=r" (result) \
- : "r" (PCIO_BASE), "Jr" (port)); \
- result; \
-})
-
-#define __outwc(value,port) \
-({ \
- __asm__ __volatile__( \
- "strh %0, [%1, %2]" \
- : \
- : "r" (value), "r" (PCIO_BASE), "r" (port)); \
-})
+#define __arch_getb(a) (*(volatile unsigned char *)(a))
+#define __arch_getl(a) (*(volatile unsigned int *)(a))
+
+extern __inline__ unsigned int __arch_getw(unsigned long a)
+{
+ unsigned int value;
+ __asm__ __volatile__("ldr%?h %0, [%1, #0] @ getw"
+ : "=&r" (value)
+ : "r" (a));
+ return value;
+}
-#define __inwc(port) \
-({ \
- unsigned short result; \
- __asm__ __volatile__( \
- "ldrh %0, [%1, %2]" \
- : "=r" (result) \
- : "r" (PCIO_BASE), "r" (port)); \
- result & 0xffff; \
-})
-#define __outlc(value,port) \
-({ \
- __asm__ __volatile__( \
- "str %0, [%1, %2]" \
- : \
- : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \
-})
+#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v))
+#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
-#define __inlc(port) \
-({ \
- unsigned long result; \
- __asm__ __volatile__( \
- "ldr %0, [%1, %2]" \
- : "=r" (result) \
- : "r" (PCIO_BASE), "Jr" (port)); \
- result; \
-})
+extern __inline__ void __arch_putw(unsigned int value, unsigned long a)
+{
+ __asm__ __volatile__("str%?h %0, [%1, #0] @ putw"
+ : : "r" (value), "r" (a));
+}
-#define __ioaddrc(port) \
-({ \
- unsigned long addr; \
- addr = PCIO_BASE + port; \
- addr; \
-})
+#define inb(p) __arch_getb(__io_pci(p))
+#define inw(p) __arch_getw(__io_pci(p))
+#define inl(p) __arch_getl(__io_pci(p))
-#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
-#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
-#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
-#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
-#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
-#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
-#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
+#define outb(v,p) __arch_putb(v,__io_pci(p))
+#define outw(v,p) __arch_putw(v,__io_pci(p))
+#define outl(v,p) __arch_putl(v,__io_pci(p))
/*
- * Translated address IO functions
- *
- * IO address has already been translated to a virtual address
+ * ioremap support - validate a PCI memory address,
+ * and convert a PCI memory address to a physical
+ * address for the page tables.
*/
-#define outb_t(v,p) \
- (*(volatile unsigned char *)(p) = (v))
-
-#define inb_t(p) \
- (*(volatile unsigned char *)(p))
-
-#define outl_t(v,p) \
- (*(volatile unsigned long *)(p) = (v))
+#define valid_ioaddr(off,sz) ((off) < 0x80000000 && (off) + (sz) <= 0x80000000)
+#define io_to_phys(off) ((off) + PLX_MEM_START)
-#define inl_t(p) \
- (*(volatile unsigned long *)(p))
+/*
+ * ioremap takes a PCI memory address, as specified in
+ * linux/Documentation/IO-mapping.txt
+ */
+#define __arch_ioremap(off,size,nocache) \
+({ \
+ unsigned long _off = (off), _size = (size); \
+ void *_ret = (void *)0; \
+ if (valid_ioaddr(_off, _size)) \
+ _ret = __ioremap(io_to_phys(_off), _size, 0); \
+ _ret; \
+})
#endif
diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h
index 000e6e75f..501a97c87 100644
--- a/include/asm-arm/arch-nexuspci/irq.h
+++ b/include/asm-arm/arch-nexuspci/irq.h
@@ -1,42 +1,62 @@
/*
* include/asm-arm/arch-nexuspci/irq.h
*
- * Copyright (C) 1998 Philip Blundell
- *
- * Changelog:
- * 22-08-1998 RMK Restructured IRQ routines
+ * Copyright (C) 1998, 1999, 2000 Philip Blundell
*/
#include <asm/io.h>
#define fixup_irq(x) (x)
-#define INTCONT 0xffe00000
-
extern unsigned long soft_irq_mask;
-static void nexuspci_mask_irq(unsigned int irq)
+static const unsigned char irq_cmd[] =
+{
+ INTCONT_IRQ_DUART,
+ INTCONT_IRQ_PLX,
+ INTCONT_IRQ_D,
+ INTCONT_IRQ_C,
+ INTCONT_IRQ_B,
+ INTCONT_IRQ_A,
+ INTCONT_IRQ_SYSERR
+};
+
+static void ftvpci_mask_irq(unsigned int irq)
{
- writel((irq << 1), INTCONT);
+ __raw_writel(irq_cmd[irq], INTCONT_BASE);
soft_irq_mask &= ~(1<<irq);
}
-static void nexuspci_unmask_irq(unsigned int irq)
+static void ftvpci_unmask_irq(unsigned int irq)
{
- writel((irq << 1) + 1, INTCONT);
soft_irq_mask |= (1<<irq);
+ __raw_writel(irq_cmd[irq] | 1, INTCONT_BASE);
}
static __inline__ void irq_init_irq(void)
{
unsigned int i;
+
+ /* Mask all FIQs */
+ __raw_writel(INTCONT_FIQ_PLX, INTCONT_BASE);
+ __raw_writel(INTCONT_FIQ_D, INTCONT_BASE);
+ __raw_writel(INTCONT_FIQ_C, INTCONT_BASE);
+ __raw_writel(INTCONT_FIQ_B, INTCONT_BASE);
+ __raw_writel(INTCONT_FIQ_A, INTCONT_BASE);
+ __raw_writel(INTCONT_FIQ_SYSERR, INTCONT_BASE);
+
/* Disable all interrupts initially. */
for (i = 0; i < NR_IRQS; i++) {
- irq_desc[i].valid = 1;
- irq_desc[i].probe_ok = 1;
- irq_desc[i].mask_ack = nexuspci_mask_irq;
- irq_desc[i].mask = nexuspci_mask_irq;
- irq_desc[i].unmask = nexuspci_unmask_irq;
- mask_irq(i);
- }
+ if (i >= FIRST_IRQ && i <= LAST_IRQ) {
+ irq_desc[i].valid = 1;
+ irq_desc[i].probe_ok = 1;
+ irq_desc[i].mask_ack = ftvpci_mask_irq;
+ irq_desc[i].mask = ftvpci_mask_irq;
+ irq_desc[i].unmask = ftvpci_unmask_irq;
+ ftvpci_mask_irq(i);
+ } else {
+ irq_desc[i].valid = 0;
+ irq_desc[i].probe_ok = 0;
+ }
+ }
}
diff --git a/include/asm-arm/arch-nexuspci/irqs.h b/include/asm-arm/arch-nexuspci/irqs.h
index 69af6e833..fdc88f1d5 100644
--- a/include/asm-arm/arch-nexuspci/irqs.h
+++ b/include/asm-arm/arch-nexuspci/irqs.h
@@ -1,30 +1,23 @@
/*
* linux/include/asm-arm/arch-nexuspci/irqs.h
*
- * Copyright (C) 1997, 1998 Philip Blundell
+ * Copyright (C) 1997, 1998, 2000 Philip Blundell
*/
-/* Most of the IRQ sources can generate both FIQs and IRQs.
- The exceptions to this are the DUART, which can only generate IRQs,
- and the PLX SYSERR output, which can only generate FIQs. We route
- both FIQs and IRQs through the generic IRQ handling system and the
- choice by the driver of which to use is basically an arbitrary one. */
+/* The hardware is capable of routing any interrupt source (except the
+ DUART) to either IRQ or FIQ. We ignore FIQ and use IRQ exclusively
+ for simplicity. */
-#define TREAT_FIQS_AS_IRQS
+#define IRQ_DUART 0
+#define IRQ_PLX 1
+#define IRQ_PCI_D 2
+#define IRQ_PCI_C 3
+#define IRQ_PCI_B 4
+#define IRQ_PCI_A 5
+#define IRQ_SYSERR 6 /* only from IOSLAVE rev B */
-#define FIQ_PLX 0
-#define FIQ_PCI_D 1
-#define FIQ_PCI_C 2
-#define FIQ_PCI_B 3
-#define FIQ_PCI_A 4
-#define FIQ_SYSERR 5
-
-#define IRQ_DUART 6
-#define IRQ_PLX 7
-#define IRQ_PCI_D 8
-#define IRQ_PCI_C 9
-#define IRQ_PCI_B 10
-#define IRQ_PCI_A 11
+#define FIRST_IRQ IRQ_DUART
+#define LAST_IRQ IRQ_SYSERR
/* timer is part of the DUART */
#define IRQ_TIMER IRQ_DUART
diff --git a/include/asm-arm/arch-nexuspci/memory.h b/include/asm-arm/arch-nexuspci/memory.h
index 3018e8c40..de0429b6b 100644
--- a/include/asm-arm/arch-nexuspci/memory.h
+++ b/include/asm-arm/arch-nexuspci/memory.h
@@ -1,7 +1,7 @@
/*
* linux/include/asm-arm/arch-nexuspci/memory.h
*
- * Copyright (c) 1997, 1998 Philip Blundell.
+ * Copyright (c) 1997, 1998, 2000 FutureTV Labs Ltd.
* Copyright (c) 1999 Russell King
*
*/
@@ -19,21 +19,22 @@
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x40000000UL)
+#define BUS_OFFSET (0xe0000000UL)
/*
- * On NexusPCI, the DRAM is contiguous
+ * DRAM is contiguous
*/
-#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
+#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_phys__is_a_macro
#define __phys_to_virt__is_a_macro
/*
- * On the PCI bus the DRAM appears at address 0
+ * On the PCI bus the DRAM appears at address 0xe0000000
*/
#define __virt_to_bus__is_a_macro
-#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
+#define __virt_to_bus(x) ((unsigned long)(x) - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt__is_a_macro
-#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
+#define __bus_to_virt(x) ((unsigned long)(x) + PAGE_OFFSET - BUS_OFFSET)
#endif
diff --git a/include/asm-arm/arch-nexuspci/system.h b/include/asm-arm/arch-nexuspci/system.h
index 2f8fc9eac..3ef541df3 100644
--- a/include/asm-arm/arch-nexuspci/system.h
+++ b/include/asm-arm/arch-nexuspci/system.h
@@ -1,12 +1,12 @@
/*
* linux/include/asm-arm/arch-nexuspci/system.h
*
- * Copyright (c) 1996-1999 Russell King.
+ * Copyright (c) 1996, 97, 98, 99, 2000 FutureTV Labs Ltd.
*/
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H
-#define arch_do_idle() do { } while (0)
+#define arch_do_idle() cpu_do_idle()
#define arch_reset(mode) do { } while (0)
#define arch_power_off() do { } while (0)
diff --git a/include/asm-arm/arch-nexuspci/time.h b/include/asm-arm/arch-nexuspci/time.h
index fbf53e887..b1ff948a1 100644
--- a/include/asm-arm/arch-nexuspci/time.h
+++ b/include/asm-arm/arch-nexuspci/time.h
@@ -1,34 +1,37 @@
/*
* linux/include/asm-arm/arch-nexuspci/time.h
*
- * Copyright (c) 1997 Phil Blundell.
+ * Copyright (c) 1997, 1998, 1999, 2000 FutureTV Labs Ltd.
*
- * Nexus PCI card has no real-time clock. We get timer ticks from the
+ * The FTV PCI card has no real-time clock. We get timer ticks from the
* SCC chip.
*/
-#define UART_BASE 0xfff00000
-#define INTCONT 0xffe00000
-
static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- static int count = 50;
+ static int count = 25;
+ unsigned char stat = __raw_readb(DUART_BASE + 0x14);
+ if (!(stat & 0x10))
+ return; /* Not for us */
- writeb(0x90, UART_BASE + 8);
+ /* Reset counter */
+ __raw_writeb(0x90, DUART_BASE + 8);
if (--count == 0) {
static int state = 1;
state ^= 1;
- writeb(0x1a + state, INTCONT);
+ __raw_writeb(0x1a + state, INTCONT_BASE);
+ __raw_writeb(0x18 + state, INTCONT_BASE);
count = 50;
}
- readb(UART_BASE + 0x14);
- readb(UART_BASE + 0x14);
- readb(UART_BASE + 0x14);
- readb(UART_BASE + 0x14);
- readb(UART_BASE + 0x14);
- readb(UART_BASE + 0x14);
+ /* Wait for slow rise time */
+ __raw_readb(DUART_BASE + 0x14);
+ __raw_readb(DUART_BASE + 0x14);
+ __raw_readb(DUART_BASE + 0x14);
+ __raw_readb(DUART_BASE + 0x14);
+ __raw_readb(DUART_BASE + 0x14);
+ __raw_readb(DUART_BASE + 0x14);
do_timer(regs);
}
@@ -37,10 +40,10 @@ extern __inline__ void setup_timer(void)
{
int tick = 3686400 / 16 / 2 / 100;
- writeb(tick & 0xff, UART_BASE + 0x1c);
- writeb(tick >> 8, UART_BASE + 0x18);
- writeb(0x80, UART_BASE + 8);
- writeb(0x10, UART_BASE + 0x14);
+ __raw_writeb(tick & 0xff, DUART_BASE + 0x1c);
+ __raw_writeb(tick >> 8, DUART_BASE + 0x18);
+ __raw_writeb(0x80, DUART_BASE + 8);
+ __raw_writeb(0x10, DUART_BASE + 0x14);
timer_irq.handler = timer_interrupt;
diff --git a/include/asm-arm/arch-nexuspci/uncompress.h b/include/asm-arm/arch-nexuspci/uncompress.h
index 4332c4a94..e03ea93b3 100644
--- a/include/asm-arm/arch-nexuspci/uncompress.h
+++ b/include/asm-arm/arch-nexuspci/uncompress.h
@@ -1,18 +1,56 @@
/*
* linux/include/asm-arm/arch-nexuspci/uncompress.h
- * from linux/include/asm-arm/arch-ebsa110/uncompress.h
*
- * Copyright (C) 1996,1997,1998 Russell King
+ * Copyright (C) 1998, 1999, 2000 Philip Blundell
*/
+#include <asm/hardware.h>
+#include <asm/io.h>
+
+/*
+ * Write a character to the UART
+ */
+void _ll_write_char(char c)
+{
+ while (!(__raw_readb(DUART_START + 0x4) & 0x4))
+ ;
+ __raw_writeb(c, DUART_START + 0xc);
+}
+
/*
* This does not append a newline
*/
static void puts(const char *s)
{
+ while (*s)
+ _ll_write_char(*(s++));
+}
+
+/*
+ * Set up for decompression
+ */
+static void arch_decomp_setup(void)
+{
+ /* LED off */
+ __raw_writel(INTCONT_LED, INTCONT_START);
+
+ /* Set up SCC */
+ __raw_writeb(42, DUART_START + 8);
+ __raw_writeb(48, DUART_START + 8);
+ __raw_writeb(16, DUART_START + 8);
+ __raw_writeb(0x93, DUART_START);
+ __raw_writeb(0x17, DUART_START);
+ __raw_writeb(0xbb, DUART_START + 4);
+ __raw_writeb(0x78, DUART_START + 16);
+ __raw_writeb(0xa0, DUART_START + 8);
+ __raw_writeb(5, DUART_START + 8);
}
/*
- * nothing to do
+ * Stroke the watchdog so we don't get reset during decompression.
*/
-#define arch_decomp_setup()
+static inline void arch_decomp_wdog(void)
+{
+ __raw_writel(INTCONT_WATCHDOG, INTCONT_START);
+ __raw_writel(INTCONT_WATCHDOG | 1, INTCONT_START);
+}
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
index ffdad2180..33ced71ba 100644
--- a/include/asm-arm/arch-sa1100/uncompress.h
+++ b/include/asm-arm/arch-sa1100/uncompress.h
@@ -6,14 +6,21 @@
#include <linux/config.h>
-#if defined(CONFIG_SA1100_EMPEG) || \
- defined(CONFIG_SA1100_VICTOR) || \
- defined(CONFIG_SA1100_LART)
+#if defined(CONFIG_SA1100_EMPEG) || \
+ defined(CONFIG_SA1100_VICTOR) || \
+ defined(CONFIG_SA1100_LART)
+#define SERBASE _Ser3UTCR0;
+#elif defined(CONFIG_SA1100_BRUTUS)
+#define SERBASE _Ser1UTCR0;
+#endif
+
+
+#ifdef SERBASE
#include "hardware.h"
#include "serial_reg.h"
-static volatile unsigned long* serial_port = (unsigned long*)_Ser3UTCR0;
+static volatile unsigned long* serial_port = (unsigned long*)SERBASE;
/*
* The following code assumes the serial port has already been
@@ -41,7 +48,7 @@ static void puts( const char *s )
#else
-#define puts( x )
+static inline void puts( const char *s ) {}
#endif
diff --git a/include/asm-arm/parport.h b/include/asm-arm/parport.h
index fddb4f548..0f6c12151 100644
--- a/include/asm-arm/parport.h
+++ b/include/asm-arm/parport.h
@@ -6,8 +6,8 @@
* This file should only be included by drivers/parport/parport_pc.c.
*/
-#ifndef __ASM_ARM_PARPORT_H
-#define __ASM_ARM_PARPORT_H
+#ifndef __ASMARM_PARPORT_H
+#define __ASMARM_PARPORT_H
#include <linux/config.h>
@@ -26,8 +26,11 @@
#endif
static int __maybe_init parport_pc_init_pci(int irq, int dma);
+static int __devinit parport_pc_init_superio(void);
static int user_specified __maybe_initdata = 0;
+
+
int __init
parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
{
@@ -43,7 +46,9 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
+#ifdef CONFIG_PCI
count += parport_pc_init_superio ();
+#endif
/* Probe all the likely ports. */
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
@@ -52,10 +57,12 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0], NULL))
count++;
+#ifdef CONFIG_PCI
count += parport_pc_init_pci (irq[0], dma[0]);
+#endif
}
return count;
}
-#endif /* !(_ASM_I386_PARPORT_H) */
+#endif /* !(_ASMARM_PARPORT_H) */
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index e0de271b3..542487cf6 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -20,19 +20,7 @@ struct pci_dev;
* sets *dma_addrp to the pci side dma address as well, else *dma_addrp
* is undefined.
*/
-#define pci_alloc_consistent(hwdev,size,handle) \
- ({ \
- void *__ret; \
- int __gfp = GFP_KERNEL; \
- \
- if ((hwdev) == NULL || \
- (hwdev)->dma_mask != 0xffffffff) \
- __gfp |= GFP_DMA; \
- \
- __ret = consistent_alloc(__gfp, (size), \
- (handle)); \
- __ret; \
- })
+extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle);
/* Free and unmap a consistent DMA buffer.
* cpu_addr is what was returned from pci_alloc_consistent,
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index 418ed812a..dad099ff9 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -32,7 +32,8 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PGDIR_MASK (~(PGDIR_SIZE-1))
-#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 1
+#define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR)
/*
* The table below defines the page protection levels that we insert into our
diff --git a/include/asm-arm/socket.h b/include/asm-arm/socket.h
index d0d2ddb36..48775c3ea 100644
--- a/include/asm-arm/socket.h
+++ b/include/asm-arm/socket.h
@@ -39,4 +39,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 9c9b95d8a..a0daf6edf 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -7,17 +7,6 @@
#include <linux/config.h>
-#define __ebsa285_data __attribute__((__section__(".data.ebsa285")))
-#define __netwinder_data __attribute__((__section__(".data.netwinder")))
-
-#ifdef CONFIG_TEXT_SECTIONS
-#define __ebsa285_text __attribute__((__section__(".text.ebsa285")))
-#define __netwinder_text __attribute__((__section__(".text.netwinder")))
-#else
-#define __ebsa285_text
-#define __netwinder_text
-#endif
-
/* information about the system we're running on */
extern unsigned int system_rev;
extern unsigned int system_serial_low;
diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h
index 6b8e92620..fb0c3e5d4 100644
--- a/include/asm-i386/hardirq.h
+++ b/include/asm-i386/hardirq.h
@@ -4,6 +4,22 @@
#include <linux/threads.h>
#include <linux/irq.h>
+typedef struct {
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+ atomic_t __nmi_counter;
+ unsigned int __pad[5];
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
+
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
+
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 920faed06..194522179 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -68,7 +68,6 @@ extern int irq_vector[NR_IRQS];
* Interrupt entry/exit code at both C and assembly level
*/
-extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
extern void mask_irq(unsigned int irq);
extern void unmask_irq(unsigned int irq);
extern void disable_8259A_irq(unsigned int irq);
diff --git a/include/asm-i386/parport.h b/include/asm-i386/parport.h
index 432fc56f7..2f7e8d295 100644
--- a/include/asm-i386/parport.h
+++ b/include/asm-i386/parport.h
@@ -9,8 +9,6 @@
#ifndef _ASM_I386_PARPORT_H
#define _ASM_I386_PARPORT_H 1
-#include <linux/config.h>
-
/* Maximum number of ports to support. It is useless to set this greater
than PARPORT_MAX (in <linux/parport.h>). */
#define PARPORT_PC_MAX_PORTS 8
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index d58f5a7a6..cadb5cbf7 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -113,6 +113,7 @@ extern unsigned long empty_zero_page[1024];
#define PGDIR_MASK (~(PGDIR_SIZE-1))
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
diff --git a/include/asm-i386/socket.h b/include/asm-i386/socket.h
index cc27f2e32..5bfc09971 100644
--- a/include/asm-i386/socket.h
+++ b/include/asm-i386/socket.h
@@ -39,4 +39,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h
index 4ce58066c..e187026a2 100644
--- a/include/asm-i386/spinlock.h
+++ b/include/asm-i386/spinlock.h
@@ -53,6 +53,7 @@ typedef struct {
".section .text.lock,\"ax\"\n" \
"2:\t" \
"testb $1,%0\n\t" \
+ "rep;nop\n\t" \
"jne 2b\n\t" \
"jmp 1b\n" \
".previous"
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index a941cfccf..a076bca9f 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -87,6 +87,7 @@
#define PGDIR_MASK (~(PGDIR_SIZE-1))
#define PTRS_PER_PGD (__IA64_UL(1) << (PAGE_SHIFT-3))
#define USER_PTRS_PER_PGD PTRS_PER_PGD
+#define FIRST_USER_PGD_NR 0
/*
* Definitions for second level:
diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h
index 8aeee3046..8c1f4d80a 100644
--- a/include/asm-ia64/socket.h
+++ b/include/asm-ia64/socket.h
@@ -46,4 +46,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* _ASM_IA64_SOCKET_H */
diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h
index a92c28b12..8e0f4f24c 100644
--- a/include/asm-m68k/pgtable.h
+++ b/include/asm-m68k/pgtable.h
@@ -43,6 +43,7 @@
#define PTRS_PER_PMD 8
#define PTRS_PER_PGD 128
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
/* Virtual address region for use by kernel_map() */
#define KMAP_START 0xd0000000
diff --git a/include/asm-m68k/socket.h b/include/asm-m68k/socket.h
index cc27f2e32..0bd5a5315 100644
--- a/include/asm-m68k/socket.h
+++ b/include/asm-m68k/socket.h
@@ -39,4 +39,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 5733d0999..caffa4ede 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: bitops.h,v 1.7 1999/08/19 22:56:33 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -56,11 +56,12 @@ extern __inline__ unsigned long ffz(unsigned long word);
#if defined(CONFIG_CPU_HAS_LLSC)
+#include <asm/mipsregs.h>
+
/*
* These functions for MIPS ISA > 1 are interrupt and SMP proof and
* interrupt friendly
*/
-#include <asm/mipsregs.h>
/*
* The following functions will only work for the R4000!
@@ -145,8 +146,6 @@ extern __inline__ int test_and_change_bit(int nr, void *addr)
#else /* MIPS I */
-#include <asm/mipsregs.h>
-
extern __inline__ void set_bit(int nr, void * addr)
{
int mask;
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h
index dea93f931..1e4fb5d51 100644
--- a/include/asm-mips/bootinfo.h
+++ b/include/asm-mips/bootinfo.h
@@ -1,4 +1,4 @@
-/* $Id: bootinfo.h,v 1.10 2000/01/26 00:07:45 ralf Exp $
+/* $Id: bootinfo.h,v 1.11 2000/03/06 11:14:32 raiko Exp $
*
* bootinfo.h -- Definition of the Linux/MIPS boot information structure
*
@@ -12,9 +12,6 @@
#ifndef __ASM_MIPS_BOOTINFO_H
#define __ASM_MIPS_BOOTINFO_H
-/* XXX */
-#include <linux/config.h>
-
/*
* Values for machgroup
*/
diff --git a/include/asm-mips/hardirq.h b/include/asm-mips/hardirq.h
index 68697ef74..f3854a267 100644
--- a/include/asm-mips/hardirq.h
+++ b/include/asm-mips/hardirq.h
@@ -1,4 +1,4 @@
-/* $Id: hardirq.h,v 1.7 2000/02/23 00:41:38 ralf Exp $
+/* $Id: hardirq.h,v 1.8 2000/03/02 02:37:13 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -13,6 +13,20 @@
#include <linux/threads.h>
#include <linux/irq.h>
+typedef struct {
+ unsigned int __local_irq_count;
+ unsigned int __local_bh_count;
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
+
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
+
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index ebcb61569..3af11a591 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.12 2000/02/16 01:45:55 ralf Exp $
+/* $Id: io.h,v 1.13 2000/02/24 00:13:19 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -16,8 +16,6 @@
*/
#undef CONF_SLOWDOWN_IO
-#include <linux/config.h>
-
#include <asm/addrspace.h>
/*
diff --git a/include/asm-mips/keyboard.h b/include/asm-mips/keyboard.h
index 6748eb8c2..70c4d8174 100644
--- a/include/asm-mips/keyboard.h
+++ b/include/asm-mips/keyboard.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: keyboard.h,v 1.14 1999/08/19 22:56:33 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -11,7 +11,6 @@
#ifdef __KERNEL__
-#include <linux/config.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <asm/bootinfo.h>
diff --git a/include/asm-mips/parport.h b/include/asm-mips/parport.h
index 57683df44..9ca9b628f 100644
--- a/include/asm-mips/parport.h
+++ b/include/asm-mips/parport.h
@@ -1,4 +1,4 @@
-/* $Id: parport.h,v 1.2 2000/02/18 00:24:48 ralf Exp $
+/* $Id: parport.h,v 1.3 2000/03/02 02:37:13 ralf Exp $
*
* parport.h: ia32-specific parport initialisation
*
@@ -9,8 +9,6 @@
#ifndef _ASM_PARPORT_H
#define _ASM_PARPORT_H 1
-#include <linux/config.h>
-
/* Maximum number of ports to support. It is useless to set this greater
than PARPORT_MAX (in <linux/parport.h>). */
#define PARPORT_PC_MAX_PORTS 8
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 9b909eeab..a21e78b04 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.30 2000/02/24 00:13:19 ralf Exp $
+/* $Id: pgtable.h,v 1.31 2000/03/02 02:37:13 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -79,6 +79,7 @@ extern void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 1024
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
#define VMALLOC_START KSEG2
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h
index d7192c809..5108021ba 100644
--- a/include/asm-mips/socket.h
+++ b/include/asm-mips/socket.h
@@ -1,5 +1,5 @@
/*
- * $Id: socket.h,v 1.5 1998/03/17 22:16:17 ralf Exp $
+ * $Id: socket.h,v 1.6 2000/02/25 21:52:09 ralf Exp $
*/
#ifndef _ASM_SOCKET_H
#define _ASM_SOCKET_H
@@ -58,6 +58,8 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#ifdef __KERNEL__
+#define SO_PEERNAME 28
+
/* Types of sockets. */
#define SOCK_DGRAM 1 /* Connectionless, unreliable datagrams
of fixed maximum length. */
diff --git a/include/asm-mips64/checksum.h b/include/asm-mips64/checksum.h
index effc917c7..94206a81c 100644
--- a/include/asm-mips64/checksum.h
+++ b/include/asm-mips64/checksum.h
@@ -1,4 +1,4 @@
-/* $Id: checksum.h,v 1.5 2000/02/18 00:24:48 ralf Exp $
+/* $Id: checksum.h,v 1.6 2000/02/18 22:06:19 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -10,8 +10,6 @@
#ifndef _ASM_CHECKSUM_H
#define _ASM_CHECKSUM_H
-#include <asm/checksum.h>
-
/*
* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
diff --git a/include/asm-mips64/dma.h b/include/asm-mips64/dma.h
index b109ce0ff..ef380f1d4 100644
--- a/include/asm-mips64/dma.h
+++ b/include/asm-mips64/dma.h
@@ -1,4 +1,4 @@
-/* $Id: dma.h,v 1.3 1999/12/04 03:59:12 ralf Exp $
+/* $Id: dma.h,v 1.4 2000/01/29 01:42:28 ralf Exp $
*
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992.
@@ -13,7 +13,6 @@
#ifndef _ASM_DMA_H
#define _ASM_DMA_H
-#include <linux/config.h>
#include <asm/io.h> /* need byte IO */
#include <linux/spinlock.h> /* And spinlocks */
#include <linux/delay.h>
diff --git a/include/asm-mips64/hardirq.h b/include/asm-mips64/hardirq.h
index 7200ad062..29d780328 100644
--- a/include/asm-mips64/hardirq.h
+++ b/include/asm-mips64/hardirq.h
@@ -1,4 +1,4 @@
-/* $Id: hardirq.h,v 1.4 2000/02/23 00:41:38 ralf Exp $
+/* $Id: hardirq.h,v 1.5 2000/03/02 02:37:13 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -13,6 +13,20 @@
#include <linux/threads.h>
#include <linux/irq.h>
+typedef struct {
+ unsigned long __local_irq_count;
+ unsigned long __local_bh_count;
+ unsigned long __pad[14];
+} ____cacheline_aligned irq_cpustat_t;
+
+extern irq_cpustat_t irq_stat [NR_CPUS];
+
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
+
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
diff --git a/include/asm-mips64/keyboard.h b/include/asm-mips64/keyboard.h
index 6748eb8c2..067d06e69 100644
--- a/include/asm-mips64/keyboard.h
+++ b/include/asm-mips64/keyboard.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: keyboard.h,v 1.1 1999/08/19 22:56:34 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -11,7 +11,6 @@
#ifdef __KERNEL__
-#include <linux/config.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <asm/bootinfo.h>
diff --git a/include/asm-mips64/mmu_context.h b/include/asm-mips64/mmu_context.h
index ca41d022b..878fe8300 100644
--- a/include/asm-mips64/mmu_context.h
+++ b/include/asm-mips64/mmu_context.h
@@ -1,4 +1,4 @@
-/* $Id: mmu_context.h,v 1.3 2000/02/04 07:40:53 ralf Exp $
+/* $Id: mmu_context.h,v 1.4 2000/02/23 00:41:38 ralf Exp $
*
* Switch a MMU context.
*
@@ -12,7 +12,6 @@
#ifndef _ASM_MMU_CONTEXT_H
#define _ASM_MMU_CONTEXT_H
-#include <linux/config.h>
#include <asm/pgalloc.h>
/* Fuck. The f-word is here so you can grep for it :-) */
diff --git a/include/asm-mips64/mmzone.h b/include/asm-mips64/mmzone.h
index e49d0fc75..795aed323 100644
--- a/include/asm-mips64/mmzone.h
+++ b/include/asm-mips64/mmzone.h
@@ -4,6 +4,7 @@
#ifndef _ASM_MMZONE_H_
#define _ASM_MMZONE_H_
+#include <linux/config.h>
#include <asm/sn/types.h>
#include <asm/sn/addrs.h>
#include <asm/sn/arch.h>
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index 0dc2145cf..87b06e444 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.13 2000/02/27 01:03:24 kanoj Exp $
+/* $Id: pgtable.h,v 1.14 2000/03/02 02:37:13 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -72,6 +72,7 @@ extern void (*_flush_page_to_ram)(struct page * page);
#define PTRS_PER_PMD 1024
#define PTRS_PER_PTE 512
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
#define VMALLOC_START XKSEG
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
diff --git a/include/asm-mips64/sn/sn0/hubmd.h b/include/asm-mips64/sn/sn0/hubmd.h
index 3ba29154e..f1133fab1 100644
--- a/include/asm-mips64/sn/sn0/hubmd.h
+++ b/include/asm-mips64/sn/sn0/hubmd.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: hubmd.h,v 1.1 2000/01/13 00:17:02 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -12,6 +12,8 @@
#ifndef _ASM_SN_SN0_HUBMD_H
#define _ASM_SN_SN0_HUBMD_H
+#include <linux/config.h>
+
/*
* Hub Memory/Directory interface registers
*/
diff --git a/include/asm-mips64/socket.h b/include/asm-mips64/socket.h
index 5c8a18041..02be40b6b 100644
--- a/include/asm-mips64/socket.h
+++ b/include/asm-mips64/socket.h
@@ -1,4 +1,4 @@
-/* $Id: socket.h,v 1.1 1999/08/18 23:37:52 ralf Exp $
+/* $Id: socket.h,v 1.2 2000/02/25 21:52:09 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -63,6 +63,8 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#ifdef __KERNEL__
+#define SO_PEERNAME 28
+
/* Types of sockets. */
#define SOCK_DGRAM 1 /* Connectionless, unreliable datagrams
of fixed maximum length. */
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 303b2aa05..56bb212f4 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -138,6 +138,7 @@ extern unsigned long ioremap_bot, ioremap_base;
#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 1024
#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
diff --git a/include/asm-ppc/socket.h b/include/asm-ppc/socket.h
index 8a71d5f3d..39a7bac36 100644
--- a/include/asm-ppc/socket.h
+++ b/include/asm-ppc/socket.h
@@ -45,4 +45,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 9dbd7005c..d5744c35d 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -91,6 +91,7 @@ extern inline void flush_tlb_pgtables(struct mm_struct *mm,
#define PGDIR_MASK (~(PGDIR_SIZE-1))
#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_PGD_NR 0
#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
diff --git a/include/asm-sh/socket.h b/include/asm-sh/socket.h
index 67f9b89e5..a3de49dc2 100644
--- a/include/asm-sh/socket.h
+++ b/include/asm-sh/socket.h
@@ -39,4 +39,6 @@
#define SO_ATTACH_FILTER 26
#define SO_DETACH_FILTER 27
+#define SO_PEERNAME 28
+
#endif /* __ASM_SH_SOCKET_H */
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index 6899b49cd..2d66e87f8 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -118,6 +118,7 @@ BTFIXUPDEF_INT(page_kernel)
#define PTRS_PER_PMD BTFIXUP_SIMM13(ptrs_per_pmd)
#define PTRS_PER_PGD BTFIXUP_SIMM13(ptrs_per_pgd)
#define USER_PTRS_PER_PGD BTFIXUP_SIMM13(user_ptrs_per_pgd)
+#define FIRST_USER_PGD_NR 0
#define PAGE_NONE __pgprot(BTFIXUP_INT(page_none))
#define PAGE_SHARED __pgprot(BTFIXUP_INT(page_shared))
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h
index ed60657ce..f749e3445 100644
--- a/include/asm-sparc/socket.h
+++ b/include/asm-sparc/socket.h
@@ -1,4 +1,4 @@
-/* $Id: socket.h,v 1.12 1998/07/22 22:06:48 davem Exp $ */
+/* $Id: socket.h,v 1.13 2000/02/27 19:47:43 davem Exp $ */
#ifndef _ASM_SOCKET_H
#define _ASM_SOCKET_H
@@ -40,6 +40,8 @@
#define SO_ATTACH_FILTER 0x001a
#define SO_DETACH_FILTER 0x001b
+#define SO_PEERNAME 0x001c
+
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h
index e2cad467e..0b3df22b9 100644
--- a/include/asm-sparc/spinlock.h
+++ b/include/asm-sparc/spinlock.h
@@ -12,7 +12,12 @@
#include <asm/psr.h>
-/* Define this to use the verbose/debugging versions in arch/sparc/lib/debuglocks.c */
+/*
+ * Define this to use the verbose/debugging versions in
+ * arch/sparc/lib/debuglocks.c
+ *
+ * Be sure to make check_asm whenever changing this option.
+ */
#define SPIN_LOCK_DEBUG
#ifdef SPIN_LOCK_DEBUG
@@ -82,9 +87,13 @@ do { unsigned long flags; \
typedef unsigned char spinlock_t;
#define SPIN_LOCK_UNLOCKED 0
-#define spin_lock_init(lock) (*(lock) = 0)
+#define spin_lock_init(lock) (*((unsigned char *)(lock)) = 0)
#define spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0)
-#define spin_unlock_wait(lock) do { barrier(); } while(*(volatile unsigned char *)lock)
+
+#define spin_unlock_wait(lock) \
+do { \
+ barrier(); \
+} while(*((volatile unsigned char *)lock))
extern __inline__ void spin_lock(spinlock_t *lock)
{
@@ -93,7 +102,7 @@ extern __inline__ void spin_lock(spinlock_t *lock)
orcc %%g2, 0x0, %%g0
bne,a 2f
ldub [%0], %%g2
- .text 2
+ .subsection 2
2: orcc %%g2, 0x0, %%g0
bne,a 2b
ldub [%0], %%g2
@@ -159,7 +168,7 @@ extern __inline__ void _read_lock(rwlock_t *rw)
ldstub [%%g1 + 3], %%g2
" : /* no outputs */
: "r" (lp)
- : "g2", "g4", "g7", "memory", "cc");
+ : "g2", "g4", "memory", "cc");
}
#define read_lock(lock) \
@@ -179,7 +188,7 @@ extern __inline__ void _read_unlock(rwlock_t *rw)
ldstub [%%g1 + 3], %%g2
" : /* no outputs */
: "r" (lp)
- : "g2", "g4", "g7", "memory", "cc");
+ : "g2", "g4", "memory", "cc");
}
#define read_unlock(lock) \
@@ -199,7 +208,7 @@ extern __inline__ void write_lock(rwlock_t *rw)
ldstub [%%g1 + 3], %%g2
" : /* no outputs */
: "r" (lp)
- : "g2", "g4", "g7", "memory", "cc");
+ : "g2", "g4", "memory", "cc");
}
#define write_unlock(rw) do { (rw)->lock = 0; } while(0)
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index 8bb88ee49..b271dad95 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -51,6 +51,7 @@
/* Kernel has a separate 44bit address space. */
#define USER_PTRS_PER_PGD ((const int)((current->thread.flags & SPARC_FLAG_32BIT) ? \
(1) : (PTRS_PER_PGD)))
+#define FIRST_USER_PGD_NR 0
#define PTE_TABLE_SIZE 0x2000 /* 1024 entries 8 bytes each */
#define PMD_TABLE_SIZE 0x2000 /* 2048 entries 4 bytes each */
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
index 0f25b82c1..644f064b0 100644
--- a/include/asm-sparc64/socket.h
+++ b/include/asm-sparc64/socket.h
@@ -1,4 +1,4 @@
-/* $Id: socket.h,v 1.5 1998/07/22 22:06:49 davem Exp $ */
+/* $Id: socket.h,v 1.6 2000/02/27 19:47:58 davem Exp $ */
#ifndef _ASM_SOCKET_H
#define _ASM_SOCKET_H
@@ -40,6 +40,8 @@
#define SO_ATTACH_FILTER 0x001a
#define SO_DETACH_FILTER 0x001b
+#define SO_PEERNAME 0x001c
+
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h
index 68989d76d..7090e0625 100644
--- a/include/linux/ac97_codec.h
+++ b/include/linux/ac97_codec.h
@@ -1,6 +1,8 @@
#ifndef _AC97_CODEC_H_
#define _AC97_CODEC_H_
+#include <linux/types.h>
+#include <linux/soundcard.h>
/* AC97 1.0 */
#define AC97_RESET 0x0000 //
diff --git a/include/linux/affs_fs.h b/include/linux/affs_fs.h
index 10cd77b8d..ab3b8c078 100644
--- a/include/linux/affs_fs.h
+++ b/include/linux/affs_fs.h
@@ -104,6 +104,7 @@ extern void affs_dir_truncate(struct inode *);
extern struct inode_operations affs_file_inode_operations;
extern struct inode_operations affs_dir_inode_operations;
+extern struct inode_operations affs_symlink_inode_operations;
extern struct file_operations affs_file_operations;
extern struct file_operations affs_file_operations_ofs;
extern struct file_operations affs_dir_operations;
diff --git a/include/linux/in6.h b/include/linux/in6.h
index ca5e768ba..13eed62d6 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -56,9 +56,9 @@ struct sockaddr_in6 {
__u16 sin6_port; /* Transport layer port # */
__u32 sin6_flowinfo; /* IPv6 flow information */
struct in6_addr sin6_addr; /* IPv6 address */
+ __u32 sin6_scope_id; /* scope id (new in RFC2553) */
};
-
struct ipv6_mreq {
/* IPv6 multicast address of group */
struct in6_addr ipv6mr_multiaddr;
@@ -157,18 +157,6 @@ struct in6_flowlabel_req
#define IPV6_AUTHHDR 10
#define IPV6_FLOWINFO 11
-#if 0
-/* Aliases for obsolete names */
-#define IPV6_RXHOPOPTS IPV6_HOPOPTS
-#define IPV6_RXDSTOPTS IPV6_DSTOPTS
-#define IPV6_RXSRCRT IPV6_RTHDR
-#endif
-
-/*
- * Alternative names
- */
-#define SCM_SRCRT IPV6_RXSRCRT
-
#define IPV6_UNICAST_HOPS 16
#define IPV6_MULTICAST_IF 17
#define IPV6_MULTICAST_HOPS 18
diff --git a/include/linux/input.h b/include/linux/input.h
index e65ce8f45..d5b75700a 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -234,11 +234,15 @@ struct input_event {
#define KEY_RECORD 167
#define KEY_REWIND 168
#define KEY_PHONE 169
+
#define KEY_CONFIG 171
#define KEY_HOMEPAGE 172
#define KEY_REFRESH 173
#define KEY_EXIT 174
#define KEY_MOVE 175
+#define KEY_EDIT 176
+#define KEY_SCROLLUP 177
+#define KEY_SCROLLDOWN 178
#define KEY_UNKNOWN 180
@@ -339,7 +343,9 @@ struct input_event {
#define ABS_HAT3Y 0x17
#define ABS_PRESSURE 0x18
#define ABS_DISTANCE 0x19
-#define ABS_MISC 0x1a
+#define ABS_TILT_X 0x1a
+#define ABS_TILT_Y 0x1b
+#define ABS_MISC 0x1c
#define ABS_MAX 0x1f
/*
@@ -442,11 +448,6 @@ struct input_handle {
struct input_handle *hnext;
};
-int keybdev_init(void);
-int mousedev_init(void);
-int joydev_init(void);
-int evdev_init(void);
-
void input_register_device(struct input_dev *);
void input_unregister_device(struct input_dev *);
@@ -459,6 +460,7 @@ void input_close_device(struct input_handle *);
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
#define input_report_key(a,b,c) input_event(a, EV_KEY, b, c)
+#define input_report_btn(a,b,c) input_event(a, EV_KEY, b, !!(c))
#define input_report_rel(a,b,c) input_event(a, EV_REL, b, c)
#define input_report_abs(a,b,c) input_event(a, EV_ABS, b, c)
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 6c5349546..a24e7770a 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -78,6 +78,7 @@ extern struct resource iomem_resource;
extern int get_resource_list(struct resource *, char *buf, int size);
+extern int check_resource(struct resource *root, unsigned long, unsigned long);
extern int request_resource(struct resource *root, struct resource *new);
extern int release_resource(struct resource *new);
extern int allocate_resource(struct resource *root, struct resource *new,
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 4a6df60ae..7407d39db 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -26,7 +26,7 @@ struct hw_interrupt_type {
void (*disable)(unsigned int irq);
void (*ack)(unsigned int irq);
void (*end)(unsigned int irq);
- void (*set_affinity)(unsigned int irq, unsigned int mask);
+ void (*set_affinity)(unsigned int irq, unsigned long mask);
};
typedef struct hw_interrupt_type hw_irq_controller;
@@ -44,34 +44,19 @@ typedef struct {
struct irqaction *action; /* IRQ action list */
unsigned int depth; /* nested irq disables */
spinlock_t lock;
- unsigned int __pad[3];
} ____cacheline_aligned irq_desc_t;
extern irq_desc_t irq_desc [NR_IRQS];
-typedef struct {
- unsigned int __local_irq_count;
- unsigned int __local_bh_count;
- atomic_t __nmi_counter;
- unsigned int __pad[5];
-} ____cacheline_aligned irq_cpustat_t;
-
-extern irq_cpustat_t irq_stat [NR_CPUS];
-
-/*
- * Simple wrappers reducing source bloat
- */
-#define local_irq_count(cpu) (irq_stat[(cpu)].__local_irq_count)
-#define local_bh_count(cpu) (irq_stat[(cpu)].__local_bh_count)
-#define nmi_counter(cpu) (irq_stat[(cpu)].__nmi_counter)
-
#include <asm/hw_irq.h> /* the arch dependent stuff */
extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
-extern spinlock_t irq_controller_lock;
extern int setup_irq(unsigned int , struct irqaction * );
extern hw_irq_controller no_irq_type; /* needed in every arch ? */
+extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
+
+extern volatile unsigned long irq_err_count;
#endif /* __asm_h */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a01877f10..bcf872ade 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -400,7 +400,6 @@ extern void free_area_init_node(int nid, pg_data_t *pgdat,
unsigned long * zones_size, unsigned long zone_start_paddr);
extern void mem_init(void);
extern void show_mem(void);
-extern void oom(struct task_struct * tsk);
extern void si_meminfo(struct sysinfo * val);
extern void swapin_readahead(swp_entry_t);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2c7103040..13d09502b 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -184,7 +184,8 @@ enum netdev_state_t
__LINK_STATE_XOFF=0,
__LINK_STATE_START,
__LINK_STATE_PRESENT,
- __LINK_STATE_SCHED
+ __LINK_STATE_SCHED,
+ __LINK_STATE_NOCARRIER
};
@@ -287,6 +288,7 @@ struct net_device
void *ip_ptr; /* IPv4 specific data */
void *dn_ptr; /* DECnet specific data */
void *ip6_ptr; /* IPv6 specific data */
+ void *ec_ptr; /* Econet specific data */
struct Qdisc *qdisc;
struct Qdisc *qdisc_sleeping;
@@ -533,6 +535,30 @@ extern __inline__ void dev_put(struct net_device *dev)
#define __dev_put(dev) atomic_dec(&(dev)->refcnt)
#define dev_hold(dev) atomic_inc(&(dev)->refcnt)
+/* Carrier loss detection, dial on demand. The functions netif_carrier_on
+ * and _off may be called from IRQ context, but it is caller
+ * who is responsible for serialization of these calls.
+ */
+
+extern __inline__ int netif_carrier_ok(struct net_device *dev)
+{
+ return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
+}
+
+extern void __netdev_watchdog_up(struct net_device *dev);
+
+extern __inline__ void netif_carrier_on(struct net_device *dev)
+{
+ clear_bit(__LINK_STATE_NOCARRIER, &dev->state);
+ if (netif_running(dev))
+ __netdev_watchdog_up(dev);
+}
+
+extern __inline__ void netif_carrier_off(struct net_device *dev)
+{
+ set_bit(__LINK_STATE_NOCARRIER, &dev->state);
+}
+
/* Hot-plugging. */
extern __inline__ int netif_device_present(struct net_device *dev)
{
@@ -544,22 +570,15 @@ extern __inline__ void netif_device_detach(struct net_device *dev)
if (test_and_clear_bit(__LINK_STATE_PRESENT, &dev->state) &&
netif_running(dev)) {
netif_stop_queue(dev);
- if (dev->tx_timeout &&
- del_timer(&dev->watchdog_timer))
- __dev_put(dev);
}
}
extern __inline__ void netif_device_attach(struct net_device *dev)
{
- if (test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
+ if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
netif_running(dev)) {
netif_wake_queue(dev);
- if (dev->tx_timeout) {
- dev->watchdog_timer.expires = jiffies + dev->watchdog_timeo;
- add_timer(&dev->watchdog_timer);
- dev_hold(dev);
- }
+ __netdev_watchdog_up(dev);
}
}
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index dd55f2376..954229d6c 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -6,6 +6,7 @@
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/net.h>
+#include <linux/if.h>
#include <linux/wait.h>
#include <linux/list.h>
#endif
@@ -28,7 +29,7 @@
extern void netfilter_init(void);
/* Largest hook number + 1 */
-#define NF_MAX_HOOKS 5
+#define NF_MAX_HOOKS 8
struct sk_buff;
struct net_device;
@@ -39,19 +40,12 @@ typedef unsigned int nf_hookfn(unsigned int hooknum,
const struct net_device *out,
int (*okfn)(struct sk_buff *));
-typedef unsigned int nf_cacheflushfn(const void *packet,
- const struct net_device *in,
- const struct net_device *out,
- u_int32_t packetcount,
- u_int32_t bytecount);
-
struct nf_hook_ops
{
struct list_head list;
/* User fills in from here down. */
nf_hookfn *hook;
- nf_cacheflushfn *flush;
int pf;
int hooknum;
/* Hooks are ordered in ascending priority. */
@@ -74,6 +68,19 @@ struct nf_sockopt_ops
int (*get)(struct sock *sk, int optval, void *user, int *len);
};
+/* Each queued (to userspace) skbuff has one of these. */
+struct nf_info
+{
+ /* The ops struct which sent us to userspace. */
+ struct nf_hook_ops *elem;
+
+ /* If we're sent to userspace, this keeps housekeeping info */
+ int pf;
+ unsigned int hook;
+ struct net_device *indev, *outdev;
+ int (*okfn)(struct sk_buff *);
+};
+
/* Function to register/unregister hook points. */
int nf_register_hook(struct nf_hook_ops *reg);
void nf_unregister_hook(struct nf_hook_ops *reg);
@@ -85,7 +92,7 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
-/* Activate hook/flush; either okfn or kfree_skb called, unless a hook
+/* Activate hook; either okfn or kfree_skb called, unless a hook
returns NF_STOLEN (in which case, it's up to the hook to deal with
the consequences).
@@ -117,47 +124,20 @@ int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
struct net_device *indev, struct net_device *outdev,
int (*okfn)(struct sk_buff *));
-void nf_cacheflush(int pf, unsigned int hook, const void *packet,
- const struct net_device *indev, const struct net_device *outdev,
- __u32 packetcount, __u32 bytecount);
-
/* Call setsockopt() */
int nf_setsockopt(struct sock *sk, int pf, int optval, char *opt,
int len);
int nf_getsockopt(struct sock *sk, int pf, int optval, char *opt,
int *len);
-struct nf_wakeme
-{
- wait_queue_head_t sleep;
- struct sk_buff_head skbq;
-};
-
-/* For netfilter device. */
-struct nf_interest
-{
- struct list_head list;
-
- int pf;
- /* Bitmask of hook numbers to match (1 << hooknum). */
- unsigned int hookmask;
- /* If non-zero, only catch packets with this mark. */
- unsigned int mark;
- /* If non-zero, only catch packets of this reason. */
- unsigned int reason;
-
- struct nf_wakeme *wake;
-};
-
-/* For asynchronous packet handling. */
-extern void nf_register_interest(struct nf_interest *interest);
-extern void nf_unregister_interest(struct nf_interest *interest);
-extern void nf_getinfo(const struct sk_buff *skb,
- struct net_device **indev,
- struct net_device **outdev,
- unsigned long *mark);
+/* Packet queuing */
+typedef int (*nf_queue_outfn_t)(struct sk_buff *skb,
+ struct nf_info *info, void *data);
+extern int nf_register_queue_handler(int pf,
+ nf_queue_outfn_t outfn, void *data);
+extern int nf_unregister_queue_handler(int pf);
extern void nf_reinject(struct sk_buff *skb,
- unsigned long mark,
+ struct nf_info *info,
unsigned int verdict);
#ifdef CONFIG_NETFILTER_DEBUG
diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h
index 04b122441..2f8704f02 100644
--- a/include/linux/netfilter_decnet.h
+++ b/include/linux/netfilter_decnet.h
@@ -30,6 +30,10 @@
#define NF_DN_LOCAL_OUT 3
/* Packets about to hit the wire. */
#define NF_DN_POST_ROUTING 4
-#define NF_DN_NUMHOOKS 5
+/* Input Hello Packets */
+#define NF_DN_HELLO 5
+/* Input Routing Packets */
+#define NF_DN_ROUTE 6
+#define NF_DN_NUMHOOKS 7
#endif /*__LINUX_DECNET_NETFILTER_H*/
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
index 12996c14d..6111c47d8 100644
--- a/include/linux/netfilter_ipv4.h
+++ b/include/linux/netfilter_ipv4.h
@@ -51,7 +51,6 @@
#ifdef CONFIG_NETFILTER_DEBUG
#ifdef __KERNEL__
-void debug_print_hooks_ip(unsigned int nf_debug);
void nf_debug_ip_local_deliver(struct sk_buff *skb);
void nf_debug_ip_loopback_xmit(struct sk_buff *newskb);
void nf_debug_ip_finish_output2(struct sk_buff *skb);
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 5b3c3860c..d71a6923b 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -36,8 +36,9 @@
#define MAY_SATTR 8
#define MAY_TRUNC 16
#define MAY_LOCK 32
-#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK) & (MAY_READ | MAY_WRITE | MAY_EXEC)
-# error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK."
+#define MAY_OWNER_OVERRIDE 64
+#if (MAY_SATTR | MAY_TRUNC | MAY_LOCK | MAX_OWNER_OVERRIDE) & (MAY_READ | MAY_WRITE | MAY_EXEC | MAY_OWNER_OVERRIDE)
+# error "please use a different value for MAY_SATTR or MAY_TRUNC or MAY_LOCK or MAY_OWNER_OVERRIDE."
#endif
#define MAY_CREATE (MAY_EXEC|MAY_WRITE)
#define MAY_REMOVE (MAY_EXEC|MAY_WRITE|MAY_TRUNC)
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index ac73ca409..20e850ec5 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -161,16 +161,16 @@ fh_init(struct svc_fh *fhp)
static inline void
fill_pre_wcc(struct svc_fh *fhp)
{
- struct inode *inode;
-
- inode = fhp->fh_dentry->d_inode;
- if (!fhp->fh_pre_saved) {
- fhp->fh_pre_mtime = inode->i_mtime;
- fhp->fh_pre_ctime = inode->i_ctime;
- fhp->fh_pre_size = inode->i_size;
- fhp->fh_pre_saved = 1;
- }
- fhp->fh_locked = 1;
+ struct inode *inode;
+
+ inode = fhp->fh_dentry->d_inode;
+ if (!fhp->fh_pre_saved) {
+ fhp->fh_pre_mtime = inode->i_mtime;
+ fhp->fh_pre_ctime = inode->i_ctime;
+ fhp->fh_pre_size = inode->i_size;
+ fhp->fh_pre_saved = 1;
+ }
+ fhp->fh_locked = 1;
}
/*
@@ -179,24 +179,30 @@ fill_pre_wcc(struct svc_fh *fhp)
static inline void
fill_post_wcc(struct svc_fh *fhp)
{
- struct inode *inode = fhp->fh_dentry->d_inode;
-
- if (fhp->fh_post_saved)
- printk("nfsd: inode locked twice during operation.\n");
-
- fhp->fh_post_mode = inode->i_mode;
- fhp->fh_post_nlink = inode->i_nlink;
- fhp->fh_post_uid = inode->i_uid;
- fhp->fh_post_gid = inode->i_gid;
- fhp->fh_post_size = inode->i_size;
- fhp->fh_post_blksize = inode->i_blksize;
- fhp->fh_post_blocks = inode->i_blocks;
- fhp->fh_post_rdev = inode->i_rdev;
- fhp->fh_post_atime = inode->i_atime;
- fhp->fh_post_mtime = inode->i_mtime;
- fhp->fh_post_ctime = inode->i_ctime;
- fhp->fh_post_saved = 1;
- fhp->fh_locked = 0;
+ struct inode *inode = fhp->fh_dentry->d_inode;
+
+ if (fhp->fh_post_saved)
+ printk("nfsd: inode locked twice during operation.\n");
+
+ fhp->fh_post_mode = inode->i_mode;
+ fhp->fh_post_nlink = inode->i_nlink;
+ fhp->fh_post_uid = inode->i_uid;
+ fhp->fh_post_gid = inode->i_gid;
+ fhp->fh_post_size = inode->i_size;
+ if (inode->i_blksize) {
+ fhp->fh_post_blksize = inode->i_blksize;
+ fhp->fh_post_blocks = inode->i_blocks;
+ } else {
+ fhp->fh_post_blksize = BLOCK_SIZE;
+ /* how much do we care for accuracy with MinixFS? */
+ fhp->fh_post_blocks = (inode->i_size+511) >> 9;
+ }
+ fhp->fh_post_rdev = inode->i_rdev;
+ fhp->fh_post_atime = inode->i_atime;
+ fhp->fh_post_mtime = inode->i_mtime;
+ fhp->fh_post_ctime = inode->i_ctime;
+ fhp->fh_post_saved = 1;
+ fhp->fh_locked = 0;
}
#endif /* CONFIG_NFSD_V3 */
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 6b9fcbc47..06a263d94 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -192,6 +192,16 @@ struct tc_red_qopt
unsigned char Wlog; /* log(W) */
unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
unsigned char Scell_log; /* cell size for idle damping */
+ unsigned char flags;
+#define TC_RED_ECN 1
+};
+
+struct tc_red_xstats
+{
+ __u32 early; /* Early drops */
+ __u32 pdrop; /* Drops due to queue limits */
+ __u32 other; /* Drops due to drop() calls */
+ __u32 marked; /* Marked packets */
};
/* GRED section */
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 4d0a950a9..1a4205a9d 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -106,7 +106,7 @@ struct pm_dev
struct list_head entry;
};
-#if defined(CONFIG_ACPI) || defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
+#ifdef CONFIG_PM
extern int pm_active;
@@ -147,7 +147,7 @@ struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from);
extern inline void pm_access(struct pm_dev *dev) {}
extern inline void pm_dev_idle(struct pm_dev *dev) {}
-#else /* CONFIG_ACPI || CONFIG_APM || CONFIG_APM_MODULE */
+#else /* CONFIG_PM */
#define PM_IS_ACTIVE() 0
@@ -180,7 +180,7 @@ extern inline struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from)
extern inline void pm_access(struct pm_dev *dev) {}
extern inline void pm_dev_idle(struct pm_dev *dev) {}
-#endif /* CONFIG_ACPI || CONFIG_APM || CONFIG_APM_MODULE */
+#endif /* CONFIG_PM */
extern void (*pm_idle)(void);
extern void (*pm_power_off)(void);
diff --git a/include/linux/udf_167.h b/include/linux/udf_167.h
index 19b3aa8e2..ee09bd9ad 100644
--- a/include/linux/udf_167.h
+++ b/include/linux/udf_167.h
@@ -390,13 +390,10 @@ struct LogicalVolIntegrityDesc {
#define INTEGRITY_TYPE_CLOSE 1
/* Recorded Address (ECMA 167 4/7.1) */
-#ifndef _LINUX_UDF_FS_I_H
-/* Declared in udf_fs_i.h */
typedef struct {
Uint32 logicalBlockNum;
Uint16 partitionReferenceNum;
} lb_addr;
-#endif
/* Extent interpretation (ECMA 167 4/14.14.1.1) */
#define EXTENT_RECORDED_ALLOCATED 0x00
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 162823404..47980eaaf 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -29,10 +29,6 @@
*
* HISTORY
*
- * 10/02/98 dgb rearranged all headers
- * 11/26/98 blf added byte order macros
- * 12/05/98 dgb removed other includes to reduce kernel namespace pollution.
- * This should only be included by the kernel now!
*/
#if !defined(_LINUX_UDF_FS_H)
@@ -40,10 +36,10 @@
#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
-#define UDF_DEFAULT_PREALLOC_DIR_BLOCKS 0
-#define UDFFS_DATE "2000/01/17"
-#define UDFFS_VERSION "0.9.0"
+#define UDFFS_DATE "2000/02/29"
+#define UDFFS_VERSION "0.9.1"
+
#define UDFFS_DEBUG
#ifdef UDFFS_DEBUG
@@ -60,7 +56,12 @@
#define udf_info(f, a...) \
printk (KERN_INFO "UDF-fs INFO " ## f, ## a);
-/* Prototype for fs/filesystem.c (the only thing really required in this file) */
+#ifdef __KERNEL__
+/*
+ * Function prototypes (all other prototypes included in udfdecl.h)
+ */
extern int init_udf_fs(void);
+#endif /* __KERNEL__ */
+
#endif /* !defined(_LINUX_UDF_FS_H) */
diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h
index a4bf4ba34..cd816d56b 100644
--- a/include/linux/udf_fs_i.h
+++ b/include/linux/udf_fs_i.h
@@ -43,7 +43,8 @@ struct udf_inode_info
unsigned i_alloc_type : 3;
unsigned i_extended_fe : 1;
unsigned i_strat_4096 : 1;
- unsigned reserved : 27;
+ unsigned i_new_inode : 1;
+ unsigned reserved : 26;
};
#endif
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
index d160eed0a..15696cf33 100644
--- a/include/linux/udf_fs_sb.h
+++ b/include/linux/udf_fs_sb.h
@@ -96,6 +96,9 @@ struct udf_sb_info
/* Fileset Info */
__u16 s_serialnum;
+ /* highest UDF revision we have recorded to this media */
+ __u16 s_udfrev;
+
/* Miscellaneous flags */
__u32 s_flags;
diff --git a/include/net/dn_neigh.h b/include/net/dn_neigh.h
index 7a1be0265..4887475e1 100644
--- a/include/net/dn_neigh.h
+++ b/include/net/dn_neigh.h
@@ -19,8 +19,8 @@ struct dn_neigh {
extern void dn_neigh_init(void);
extern void dn_neigh_cleanup(void);
extern struct neighbour *dn_neigh_lookup(struct neigh_table *tbl, void *ptr);
-extern void dn_neigh_router_hello(struct sk_buff *skb);
-extern void dn_neigh_endnode_hello(struct sk_buff *skb);
+extern int dn_neigh_router_hello(struct sk_buff *skb);
+extern int dn_neigh_endnode_hello(struct sk_buff *skb);
extern void dn_neigh_pointopoint_hello(struct sk_buff *skb);
extern int dn_neigh_elist(struct net_device *dev, unsigned char *ptr, int n);
diff --git a/include/net/ip.h b/include/net/ip.h
index ecf397dbb..f3ab5ac7b 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -170,11 +170,9 @@ extern __inline__ int ip_send(struct sk_buff *skb)
extern __inline__
int ip_decrease_ttl(struct iphdr *iph)
{
- u16 check = iph->check;
- check = ntohs(check) + 0x0100;
- if ((check & 0xFF00) == 0)
- check++; /* carry overflow */
- iph->check = htons(check);
+ u32 check = iph->check;
+ check += __constant_htons(0x0100);
+ iph->check = check + (check>>16);
return --iph->ttl;
}
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index fe8865a3b..aef0d2619 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -4,7 +4,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
- * $Id: ipv6.h,v 1.19 2000/01/09 02:19:26 davem Exp $
+ * $Id: ipv6.h,v 1.20 2000/02/27 19:51:38 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -20,6 +20,8 @@
#include <net/ndisc.h>
#include <net/flow.h>
+#define SIN6_LEN_RFC2133 24
+
/*
* NextHeader field of IPv6 header
*/
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 53b58205e..0d8d4d99f 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -45,9 +45,6 @@ struct inet_protocol
const char *name;
};
-extern rwlock_t inet_protocol_lock;
-
-
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
struct inet6_protocol
{
@@ -65,7 +62,6 @@ struct inet6_protocol
const char *name;
};
-extern rwlock_t inet6_protocol_lock;
#endif
extern struct inet_protocol *inet_protocol_base;
diff --git a/include/net/sock.h b/include/net/sock.h
index 3bc870fc4..6782beca0 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -894,7 +894,7 @@ extern __inline__ void sk_filter_charge(struct sock *sk, struct sk_filter *fp)
* socket is looked up by one cpu and unhasing is made by another CPU.
* It is true for udp/raw, netlink (leak to receive and error queues), tcp
* (leak to backlog). Packet socket does all the processing inside
- * ptype_lock, so that it has not this race condition. UNIX sockets
+ * BR_NETPROTO_LOCK, so that it has not this race condition. UNIX sockets
* use separate SMP lock, so that they are prone too.
*/