summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 17:52:29 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 17:52:29 -0800
commitbaf4e2cf9dddbc39fdb7dde6e3f9ebc107b67b78 (patch)
treeb11a69e0dda62c40b231ae748138ce7908d9cade /include
parent6805de5d7eb97f6e905b152b2fc1ee03fd0fb3aa (diff)
v2.4.0.9 -> v2.4.0.10
- got a few too-new R128 #defines in the Radeon merge. Fix. - tulip driver update from Jeff Garzik - more cpq and DAC elevator fixes from Jens. Looks good. - Petr Vandrovec: nicer ncpfs behaviour - Andy Grover: APCI update - Cort Dougan: PPC update - David Miller: sparc updates - David Miller: networking updates - Neil Brown: RAID5 fixes
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc/delay.h41
-rw-r--r--include/asm-ppc/dma.h38
-rw-r--r--include/asm-ppc/elf.h19
-rw-r--r--include/asm-ppc/feature.h2
-rw-r--r--include/asm-ppc/gemini.h168
-rw-r--r--include/asm-ppc/gemini_serial.h41
-rw-r--r--include/asm-ppc/hardirq.h6
-rw-r--r--include/asm-ppc/hw_irq.h16
-rw-r--r--include/asm-ppc/ide.h25
-rw-r--r--include/asm-ppc/io.h21
-rw-r--r--include/asm-ppc/ioctls.h1
-rw-r--r--include/asm-ppc/irq.h9
-rw-r--r--include/asm-ppc/keylargo.h9
-rw-r--r--include/asm-ppc/linux_logo.h3
-rw-r--r--include/asm-ppc/machdep.h37
-rw-r--r--include/asm-ppc/mman.h1
-rw-r--r--include/asm-ppc/mmu.h7
-rw-r--r--include/asm-ppc/mmu_context.h7
-rw-r--r--include/asm-ppc/parport.h18
-rw-r--r--include/asm-ppc/pci-bridge.h79
-rw-r--r--include/asm-ppc/pci.h20
-rw-r--r--include/asm-ppc/pgtable.h127
-rw-r--r--include/asm-ppc/prep_nvram.h5
-rw-r--r--include/asm-ppc/processor.h58
-rw-r--r--include/asm-ppc/prom.h8
-rw-r--r--include/asm-ppc/raven.h2
-rw-r--r--include/asm-ppc/segment.h6
-rw-r--r--include/asm-ppc/serial.h5
-rw-r--r--include/asm-ppc/smp.h2
-rw-r--r--include/asm-ppc/smplock.h4
-rw-r--r--include/asm-ppc/termios.h1
-rw-r--r--include/asm-ppc/unistd.h4
-rw-r--r--include/asm-sparc/mostek.h3
-rw-r--r--include/asm-sparc64/mostek.h3
-rw-r--r--include/asm-sparc64/pbm.h17
-rw-r--r--include/asm-sparc64/watchdog.h31
-rw-r--r--include/linux/acpi.h2
-rw-r--r--include/linux/dn.h8
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/vt_kern.h2
-rw-r--r--include/net/dn.h27
-rw-r--r--include/net/dn_nsp.h11
-rw-r--r--include/net/ipx.h8
-rw-r--r--include/net/x25.h1
44 files changed, 429 insertions, 475 deletions
diff --git a/include/asm-ppc/delay.h b/include/asm-ppc/delay.h
index 2116a2f2cdc6..8cc1fde24b4d 100644
--- a/include/asm-ppc/delay.h
+++ b/include/asm-ppc/delay.h
@@ -2,6 +2,8 @@
#ifndef _PPC_DELAY_H
#define _PPC_DELAY_H
+#include <asm/param.h>
+
/*
* Copyright 1996, Paul Mackerras.
*
@@ -11,25 +13,38 @@
* 2 of the License, or (at your option) any later version.
*/
-extern unsigned long loops_per_sec;
+extern unsigned long loops_per_jiffy;
-extern __inline__ void __delay(unsigned int loops)
-{
- if (loops != 0)
- __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : :
- "r" (loops) : "ctr");
-}
+/* maximum permitted argument to udelay */
+#define __MAX_UDELAY 1000000
-extern __inline__ void udelay(unsigned long usecs)
+extern void __delay(unsigned int loops);
+
+/* N.B. the `secs' parameter here is a fixed-point number with
+ the binary point to the left of the most-significant bit. */
+extern __inline__ void __const_udelay(unsigned int secs)
{
- unsigned long loops;
+ unsigned int loops;
- /* compute (usecs * 2^32 / 10^6) * loops_per_sec / 2^32 */
- usecs *= 0x10c6; /* 2^32 / 10^6 */
__asm__("mulhwu %0,%1,%2" : "=r" (loops) :
- "r" (usecs), "r" (loops_per_sec));
- __delay(loops);
+ "r" (secs), "r" (loops_per_jiffy));
+ __delay(loops * HZ);
}
+/*
+ * note that 4294 == 2^32 / 10^6, multiplying by 4294 converts from
+ * microseconds to a 32-bit fixed-point number of seconds.
+ */
+extern __inline__ void __udelay(unsigned int usecs)
+{
+ __const_udelay(usecs * 4294);
+}
+
+extern void __bad_udelay(void); /* deliberately undefined */
+
+#define udelay(n) (__builtin_constant_p(n)? \
+ ((n) > __MAX_UDELAY? __bad_udelay(): __const_udelay((n) * 4294u)) : \
+ __udelay(n))
+
#endif /* defined(_PPC_DELAY_H) */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/dma.h b/include/asm-ppc/dma.h
index 735d91d1f645..56f56cd0ad8d 100644
--- a/include/asm-ppc/dma.h
+++ b/include/asm-ppc/dma.h
@@ -102,13 +102,13 @@ extern unsigned long ISA_DMA_THRESHOLD;
/* used in nasty hack for sound - see prep_setup_arch() -- Cort */
extern long ppc_cs4232_dma, ppc_cs4232_dma2;
#if defined(CONFIG_CS4232)
-#if defined(CONFIG_PREP) || defined(CONFIG_ALL_PPC)
+#if defined(CONFIG_ALL_PPC)
#define SND_DMA1 ppc_cs4232_dma
#define SND_DMA2 ppc_cs4232_dma2
-#else /* !CONFIG_PREP && !CONFIG_ALL_PPC */
+#else /* !CONFIG_ALL_PPC */
#define SND_DMA1 -1
#define SND_DMA2 -1
-#endif /* !CONFIG_PREP */
+#endif /* CONFIG_ALL_PPC */
#elif defined(CONFIG_MSS)
#define SND_DMA1 CONFIG_MSS_DMA
#define SND_DMA2 CONFIG_MSS_DMA2
@@ -201,40 +201,8 @@ static __inline__ void release_dma_lock(unsigned long flags)
/* enable/disable a specific DMA channel */
static __inline__ void enable_dma(unsigned int dmanr)
{
- /*
- * The Radstone PPC2 and PPC2a boards have inverted DREQ
- * lines (active low) so each command needs to be logically
- * ORed with 0x40
- */
unsigned char ucDmaCmd=0x00;
-#if defined(CONFIG_PREP) || defined(CONFIG_ALL_PPC)
- if(_prep_type==_PREP_Radstone)
- {
- switch(ucSystemType)
- {
- case RS_SYS_TYPE_PPC2:
- case RS_SYS_TYPE_PPC2a:
- case RS_SYS_TYPE_PPC2ep:
- {
- /*
- * DREQ lines are active low
- */
- ucDmaCmd=0x40;
- break;
- }
-
- default:
- {
- /*
- * DREQ lines are active high
- */
- break;
- }
- }
- }
-#endif /* CONFIG_PREP || CONFIG_ALL_PPC */
-
if (dmanr != 4)
{
dma_outb(0, DMA2_MASK_REG); /* This may not be enabled */
diff --git a/include/asm-ppc/elf.h b/include/asm-ppc/elf.h
index 6a0e2e87472e..85124797a769 100644
--- a/include/asm-ppc/elf.h
+++ b/include/asm-ppc/elf.h
@@ -70,5 +70,24 @@ typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
+/*
+ * We need to put in some extra aux table entries to tell glibc what
+ * the cache block size is, so it can use the dcbz instruction safely.
+ */
+#define AT_DCACHEBSIZE 17
+#define AT_ICACHEBSIZE 18
+#define AT_UCACHEBSIZE 19
+
+extern int dcache_bsize;
+extern int icache_bsize;
+extern int ucache_bsize;
+
+#define DLINFO_EXTRA_ITEMS 3
+#define EXTRA_DLINFO do { \
+ NEW_AUX_ENT(0, AT_DCACHEBSIZE, dcache_bsize); \
+ NEW_AUX_ENT(1, AT_ICACHEBSIZE, icache_bsize); \
+ NEW_AUX_ENT(2, AT_UCACHEBSIZE, ucache_bsize); \
+} while (0)
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-ppc/feature.h b/include/asm-ppc/feature.h
index 7a33ea8d320f..9e9f831d5bb7 100644
--- a/include/asm-ppc/feature.h
+++ b/include/asm-ppc/feature.h
@@ -86,6 +86,8 @@ extern void feature_set_usb_power(struct device_node* device, int power);
extern void feature_set_firewire_power(struct device_node* device, int power);
+extern void feature_core99_kick_cpu1(void);
+
/*
* Sleep related functions. At term, they should be high-priority notifiers
*/
diff --git a/include/asm-ppc/gemini.h b/include/asm-ppc/gemini.h
deleted file mode 100644
index ebd01c9b6598..000000000000
--- a/include/asm-ppc/gemini.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * include/asm-ppc/gemini.h
- *
- *
- * Onboard registers and descriptions for Synergy Microsystems'
- * "Gemini" boards.
- *
- */
-#ifdef __KERNEL__
-#ifndef __PPC_GEMINI_H
-#define __PPC_GEMINI_H
-
-/* Registers */
-
-#define GEMINI_SERIAL_B (0xffeffb00)
-#define GEMINI_SERIAL_A (0xffeffb08)
-#define GEMINI_USWITCH (0xffeffd00)
-#define GEMINI_BREV (0xffeffe00)
-#define GEMINI_BECO (0xffeffe08)
-#define GEMINI_FEAT (0xffeffe10)
-#define GEMINI_BSTAT (0xffeffe18)
-#define GEMINI_CPUSTAT (0xffeffe20)
-#define GEMINI_L2CFG (0xffeffe30)
-#define GEMINI_MEMCFG (0xffeffe38)
-#define GEMINI_FLROM (0xffeffe40)
-#define GEMINI_P0PCI (0xffeffe48)
-#define GEMINI_FLWIN (0xffeffe50)
-#define GEMINI_P0INTMASK (0xffeffe60)
-#define GEMINI_P0INTAP (0xffeffe68)
-#define GEMINI_PCIERR (0xffeffe70)
-#define GEMINI_LEDBASE (0xffeffe80)
-#define GEMINI_RTC (0xffe9fff8)
-#define GEMINI_LEDS 8
-#define GEMINI_SWITCHES 8
-
-
-/* Flash ROM bit definitions */
-#define GEMINI_FLS_WEN (1<<0)
-#define GEMINI_FLS_JMP (1<<6)
-#define GEMINI_FLS_BOOT (1<<7)
-
-/* Memory bit definitions */
-#define GEMINI_MEM_TYPE_MASK 0xc0
-#define GEMINI_MEM_SIZE_MASK 0x38
-#define GEMINI_MEM_BANK_MASK 0x07
-
-/* L2 cache bit definitions */
-#define GEMINI_L2_SIZE_MASK 0xc0
-#define GEMINI_L2_RATIO_MASK 0x03
-
-/* Timebase register bit definitons */
-#define GEMINI_TIMEB0_EN (1<<0)
-#define GEMINI_TIMEB1_EN (1<<1)
-#define GEMINI_TIMEB2_EN (1<<2)
-#define GEMINI_TIMEB3_EN (1<<3)
-
-/* CPU status bit definitions */
-#define GEMINI_CPU_ID_MASK 0x03
-#define GEMINI_CPU_COUNT_MASK 0x0c
-#define GEMINI_CPU0_HALTED (1<<4)
-#define GEMINI_CPU1_HALTED (1<<5)
-#define GEMINI_CPU2_HALTED (1<<6)
-#define GEMINI_CPU3_HALTED (1<<7)
-
-/* Board status bit definitions */
-#define GEMINI_BRD_FAIL (1<<0) /* FAIL led is lit */
-#define GEMINI_BRD_BUS_MASK 0x0c /* PowerPC bus speed */
-
-/* Board family/feature bit descriptions */
-#define GEMINI_FEAT_HAS_FLASH (1<<0)
-#define GEMINI_FEAT_HAS_ETH (1<<1)
-#define GEMINI_FEAT_HAS_SCSI (1<<2)
-#define GEMINI_FEAT_HAS_P0 (1<<3)
-#define GEMINI_FEAT_FAM_MASK 0xf0
-
-/* Mod/ECO bit definitions */
-#define GEMINI_ECO_LEVEL_MASK 0x0f
-#define GEMINI_MOD_MASK 0xf0
-
-/* Type/revision bit definitions */
-#define GEMINI_REV_MASK 0x0f
-#define GEMINI_TYPE_MASK 0xf0
-
-/* User switch definitions */
-#define GEMINI_SWITCH_VERBOSE 1 /* adds "debug" to boot cmd line */
-#define GEMINI_SWITCH_SINGLE_USER 7 /* boots into "single-user" mode */
-
-#define SGS_RTC_CONTROL 0
-#define SGS_RTC_SECONDS 1
-#define SGS_RTC_MINUTES 2
-#define SGS_RTC_HOURS 3
-#define SGS_RTC_DAY 4
-#define SGS_RTC_DAY_OF_MONTH 5
-#define SGS_RTC_MONTH 6
-#define SGS_RTC_YEAR 7
-
-#define SGS_RTC_SET 0x80
-#define SGS_RTC_IS_STOPPED 0x80
-
-#define GRACKLE_CONFIG_ADDR_ADDR (0xfec00000)
-#define GRACKLE_CONFIG_DATA_ADDR (0xfee00000)
-
-#define GEMINI_BOOT_INIT (0xfff00100)
-
-#ifndef __ASSEMBLY__
-
-static inline void grackle_write( unsigned long addr, unsigned long data )
-{
- __asm__ __volatile__(
- " stwbrx %1, 0, %0\n \
- sync\n \
- stwbrx %3, 0, %2\n \
- sync "
- : /* no output */
- : "r" (GRACKLE_CONFIG_ADDR_ADDR), "r" (addr),
- "r" (GRACKLE_CONFIG_DATA_ADDR), "r" (data));
-}
-
-static inline unsigned long grackle_read( unsigned long addr )
-{
- unsigned long val;
-
- __asm__ __volatile__(
- " stwbrx %1, 0, %2\n \
- sync\n \
- lwbrx %0, 0, %3\n \
- sync "
- : "=r" (val)
- : "r" (addr), "r" (GRACKLE_CONFIG_ADDR_ADDR),
- "r" (GRACKLE_CONFIG_DATA_ADDR));
-
- return val;
-}
-
-static inline void gemini_led_on( int led )
-{
- if (led >= 0 && led < GEMINI_LEDS)
- *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 1;
-}
-
-static inline void gemini_led_off(int led)
-{
- if (led >= 0 && led < GEMINI_LEDS)
- *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 0;
-}
-
-static inline int gemini_led_val(int led)
-{
- int val = 0;
- if (led >= 0 && led < GEMINI_LEDS)
- val = *(unsigned char *)(GEMINI_LEDBASE + (led<<3));
- return (val & 0x1);
-}
-
-/* returns processor id from the board */
-static inline int gemini_processor(void)
-{
- unsigned char cpu = *(unsigned char *)(GEMINI_CPUSTAT);
- return (int) ((cpu == 0) ? 4 : (cpu & GEMINI_CPU_ID_MASK));
-}
-
-
-extern void _gemini_reboot(void);
-extern void gemini_prom_init(void);
-extern void gemini_init_l2(void);
-#endif /* __ASSEMBLY__ */
-#endif
-#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/gemini_serial.h b/include/asm-ppc/gemini_serial.h
deleted file mode 100644
index e4e08467e00d..000000000000
--- a/include/asm-ppc/gemini_serial.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifdef __KERNEL__
-#ifndef __ASMPPC_GEMINI_SERIAL_H
-#define __ASMPPC_GEMINI_SERIAL_H
-
-#include <linux/config.h>
-#include <asm/gemini.h>
-
-#ifdef CONFIG_SERIAL_MANY_PORTS
-#define RS_TABLE_SIZE 64
-#else
-#define RS_TABLE_SIZE 4
-#endif
-
-/* Rate for the 24.576 Mhz clock for the onboard serial chip */
-#define BASE_BAUD (24576000 / 16)
-
-#ifdef CONFIG_SERIAL_DETECT_IRQ
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
-#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
-#else
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
-#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF)
-#endif
-
-#define STD_SERIAL_PORT_DEFNS \
- { 0, BASE_BAUD, GEMINI_SERIAL_A, 15, STD_COM_FLAGS }, /* ttyS0 */ \
- { 0, BASE_BAUD, GEMINI_SERIAL_B, 14, STD_COM_FLAGS }, /* ttyS1 */ \
-
-#ifdef CONFIG_GEMINI_PU32
-#define PU32_SERIAL_PORT_DEFNS \
- { 0, BASE_BAUD, NULL, 0, STD_COM_FLAGS },
-#else
-#define PU32_SERIAL_PORT_DEFNS
-#endif
-
-#define SERIAL_PORT_DFNS \
- STD_SERIAL_PORT_DEFNS \
- PU32_SERIAL_PORT_DEFNS
-
-#endif
-#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/hardirq.h b/include/asm-ppc/hardirq.h
index 8a270c8c1b96..66aa6abeb544 100644
--- a/include/asm-ppc/hardirq.h
+++ b/include/asm-ppc/hardirq.h
@@ -47,7 +47,7 @@ typedef struct {
#include <asm/atomic.h>
extern unsigned char global_irq_holder;
-extern unsigned volatile int global_irq_lock;
+extern unsigned volatile long global_irq_lock;
extern atomic_t global_irq_count;
static inline void release_irqlock(int cpu)
@@ -66,8 +66,8 @@ static inline void hardirq_enter(int cpu)
++local_irq_count(cpu);
atomic_inc(&global_irq_count);
while (test_bit(0,&global_irq_lock)) {
- if (smp_processor_id() == global_irq_holder) {
- printk("uh oh, interrupt while we hold global irq lock!\n");
+ if (cpu == global_irq_holder) {
+ printk("uh oh, interrupt while we hold global irq lock! (CPU %d)\n", cpu);
#ifdef CONFIG_XMON
xmon(0);
#endif
diff --git a/include/asm-ppc/hw_irq.h b/include/asm-ppc/hw_irq.h
index 7d47901719a5..54e4d711133c 100644
--- a/include/asm-ppc/hw_irq.h
+++ b/include/asm-ppc/hw_irq.h
@@ -28,17 +28,23 @@ extern void __no_use_set_lost(unsigned long);
#define __cli() int_control.int_cli()
#define __sti() int_control.int_sti()
-#define __save_flags(flags) int_control.int_save_flags(&flags)
-#define __restore_flags(flags) int_control.int_restore_flags(flags)
+#define __save_flags(flags) int_control.int_save_flags((unsigned long *)&flags)
+#define __restore_flags(flags) int_control.int_restore_flags((unsigned long)flags)
#define __save_and_cli(flags) ({__save_flags(flags);__cli();})
-#define __set_lost(irq) ({ if ((ulong)int_control.int_set_lost) int_control.int_set_lost(irq); })
+#define __set_lost(irq) ({ if ((unsigned long)int_control.int_set_lost) int_control.int_set_lost(irq); })
extern void do_lost_interrupts(unsigned long);
-extern atomic_t ppc_n_lost_interrupts;
#define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);})
#define unmask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->enable) irq_desc[irq].handler->enable(irq);})
-#define mask_and_ack_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->ack) irq_desc[irq].handler->ack(irq);})
+#define ack_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->ack) irq_desc[irq].handler->ack(irq);})
+
+/* Should we handle this via lost interrupts and IPIs or should we don't care like
+ * we do now ? --BenH.
+ */
+struct hw_interrupt_type;
+static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
+
#endif /* _PPC_HW_IRQ_H */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
index 179bdec67e27..a9e3baf0d476 100644
--- a/include/asm-ppc/ide.h
+++ b/include/asm-ppc/ide.h
@@ -37,6 +37,8 @@ extern ide_ioreg_t chrp_idedma_regbase; /* one for both channels */
extern unsigned int chrp_ide_irq;
extern void chrp_ide_probe(void);
+extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
+
struct ide_machdep_calls {
void (*insw)(ide_ioreg_t port, void *buf, int ns);
void (*outsw)(ide_ioreg_t port, void *buf, int ns);
@@ -90,10 +92,9 @@ static __inline__ int ide_default_irq(ide_ioreg_t base)
static __inline__ ide_ioreg_t ide_default_io_base(int index)
{
- if ( ppc_ide_md.default_io_base )
+ if (ppc_ide_md.default_io_base)
return ppc_ide_md.default_io_base(index);
- else
- return -1;
+ return 0;
}
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw,
@@ -124,10 +125,9 @@ static __inline__ void ide_init_default_hwifs(void)
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
- if ( ppc_ide_md.ide_check_region )
+ if (ppc_ide_md.ide_check_region)
return ppc_ide_md.ide_check_region(from, extent);
- else
- return -1;
+ return 0;
}
static __inline__ void ide_request_region (ide_ioreg_t from, unsigned int extent, const char *name)
@@ -148,19 +148,6 @@ static __inline__ void ide_fix_driveid (struct hd_driveid *id)
ppc_ide_md.fix_driveid(id);
}
-#if 0 /* inb/outb from io.h is OK now -- paulus */
-#undef inb
-#define inb(port) in_8((unsigned char *)((port) + ppc_ide_md.io_base))
-#undef inb_p
-#define inb_p(port) inb(port)
-
-#undef outb
-#define outb(val, port) \
- out_8((unsigned char *)((port) + ppc_ide_md.io_base), (val) )
-#undef outb_p
-#define outb_p(val, port) outb(val, port)
-#endif
-
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index 03f9db09a48f..6023635116de 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -222,20 +222,6 @@ extern inline void * bus_to_virt(unsigned long address)
}
/*
- * The PCI bus bridge can translate addresses issued by the processor(s)
- * into a different address on the PCI bus. On 32-bit cpus, we assume
- * this mapping is 1-1, but on 64-bit systems it often isn't.
- */
-#ifndef CONFIG_PPC64BRIDGE
-#define phys_to_bus(x) (x)
-#define bus_to_phys(x) (x)
-
-#else
-extern unsigned long phys_to_bus(unsigned long pa);
-extern unsigned long bus_to_phys(unsigned int ba, int busnr);
-#endif /* CONFIG_PPC64BRIDGE */
-
-/*
* Change virtual addresses to physical addresses and vv, for
* addresses in the area where the kernel has the RAM mapped.
*/
@@ -364,6 +350,13 @@ out:
return retval;
}
+/* Make some pcmcia drivers happy */
+static inline int isa_check_signature(unsigned long io_addr,
+ const unsigned char *signature, int length)
+{
+ return 0;
+}
+
/* Nothing to do */
#define dma_cache_inv(_start,_size) do { } while (0)
diff --git a/include/asm-ppc/ioctls.h b/include/asm-ppc/ioctls.h
index 0f879c163c4c..e700d29fd47e 100644
--- a/include/asm-ppc/ioctls.h
+++ b/include/asm-ppc/ioctls.h
@@ -9,6 +9,7 @@
#define FIONBIO _IOW('f', 126, int)
#define FIONREAD _IOR('f', 127, int)
#define TIOCINQ FIONREAD
+#define FIOQSIZE _IOR('f', 128, loff_t)
#define TIOCGETP _IOR('t', 8, struct sgttyb)
#define TIOCSETP _IOW('t', 9, struct sgttyb)
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index c3ae15763fc9..139dfea0cb8d 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -4,6 +4,7 @@
#include <linux/config.h>
#include <asm/machdep.h> /* ppc_md */
+#include <asm/atomic.h>
extern void disable_irq(unsigned int);
extern void disable_irq_nosync(unsigned int);
@@ -163,9 +164,6 @@ extern irq_node_t *new_irq_node(void);
#ifndef CONFIG_8260
#define NUM_8259_INTERRUPTS 16
-#define IRQ_8259_CASCADE 16
-#define openpic_to_irq(n) ((n)+NUM_8259_INTERRUPTS)
-#define irq_to_openpic(n) ((n)-NUM_8259_INTERRUPTS)
#else /* CONFIG_8260 */
@@ -214,7 +212,10 @@ static __inline__ int irq_cannonicalize(int irq)
#endif
#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
-extern unsigned int ppc_lost_interrupts[NR_MASK_WORDS];
+/* pendatic: these are long because they are used with set_bit --RR */
+extern unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
+extern unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
+extern atomic_t ppc_n_lost_interrupts;
#endif /* _ASM_IRQ_H */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/keylargo.h b/include/asm-ppc/keylargo.h
index 5408262a1790..02d3d58b2189 100644
--- a/include/asm-ppc/keylargo.h
+++ b/include/asm-ppc/keylargo.h
@@ -20,10 +20,19 @@
#define KEYLARGO_GPIO_CNT 17
/* Specific GPIO regs */
+
#define KL_GPIO_ETH_PHY_RESET (KEYLARGO_GPIO_0+0x10)
#define KL_GPIO_ETH_PHY_RESET_ASSERT 0x04
#define KL_GPIO_ETH_PHY_RESET_RELEASE 0x05
#define KL_GPIO_ETH_PHY_RESET_TRISTATE 0x00
+
+#define KL_GPIO_KICK_CPU1 (KEYLARGO_GPIO_0+0x0a)
+#define KL_GPIO_KICK_CPU1_UP 0x04
+#define KL_GPIO_KICK_CPU1_DOWN 0x38
+
+#define KL_GPIO_PMU_MESSAGE_IRQ (KEYLARGO_GPIO_EXTINT_0+0x09)
+#define KL_GPIO_PMU_MESSAGE_BIT 0x02
+
/*
* Bits in feature control register
*/
diff --git a/include/asm-ppc/linux_logo.h b/include/asm-ppc/linux_logo.h
index c35e6db5bb50..d3aa2d267af5 100644
--- a/include/asm-ppc/linux_logo.h
+++ b/include/asm-ppc/linux_logo.h
@@ -34,9 +34,6 @@ extern unsigned char linux_logo_green[];
extern unsigned char linux_logo_blue[];
extern unsigned char linux_logo[];
extern unsigned char linux_logo_bw[];
-extern unsigned char linux_logo16_red[];
-extern unsigned char linux_logo16_green[];
-extern unsigned char linux_logo16_blue[];
extern unsigned char linux_logo16[];
#endif
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h
index 67111965fe2a..ca254d0e7a86 100644
--- a/include/asm-ppc/machdep.h
+++ b/include/asm-ppc/machdep.h
@@ -10,6 +10,7 @@
struct pt_regs;
struct pci_bus;
+struct pci_dev;
struct machdep_calls {
void (*setup_arch)(void);
@@ -45,7 +46,7 @@ struct machdep_calls {
unsigned char (*nvram_read_val)(int addr);
void (*nvram_write_val)(int addr, unsigned char val);
-/* Tons of keyboard stuff. */
+ /* Tons of keyboard stuff. */
int (*kbd_setkeycode)(unsigned int scancode,
unsigned int keycode);
int (*kbd_getkeycode)(unsigned int scancode);
@@ -59,25 +60,25 @@ struct machdep_calls {
unsigned char *ppc_kbd_sysrq_xlate;
#endif
- /* PCI interfaces */
- int (*pcibios_read_config_byte)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned char *val);
- int (*pcibios_read_config_word)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned short *val);
- int (*pcibios_read_config_dword)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned int *val);
- int (*pcibios_write_config_byte)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned char val);
- int (*pcibios_write_config_word)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned short val);
- int (*pcibios_write_config_dword)(unsigned char bus,
- unsigned char dev_fn, unsigned char offset, unsigned int val);
+ /*
+ * optional PCI "hooks"
+ */
+
+ /* Called after scanning the bus, before allocating
+ * resources
+ */
void (*pcibios_fixup)(void);
- void (*pcibios_fixup_bus)(struct pci_bus *);
- void* (*pci_dev_io_base)(unsigned char bus, unsigned char devfn, int physical);
- void* (*pci_dev_mem_base)(unsigned char bus, unsigned char devfn);
- int (*pci_dev_root_bridge)(unsigned char bus, unsigned char devfn);
+ /* Called for each PCI bus in the system
+ * when it's probed
+ */
+ void (*pcibios_fixup_bus)(struct pci_bus *);
+
+ /* Called when pci_enable_device() is called (initial=0) or
+ * when a device with no assigned resource is found (initial=1).
+ * Returns 0 to allow assignement/enabling of the device
+ */
+ int (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
/* this is for modules, since _machine can be a define -- Cort */
int ppc_machine;
diff --git a/include/asm-ppc/mman.h b/include/asm-ppc/mman.h
index 64abf0c58ced..1c0dbe2051d1 100644
--- a/include/asm-ppc/mman.h
+++ b/include/asm-ppc/mman.h
@@ -13,6 +13,7 @@
#define MAP_ANONYMOUS 0x20 /* don't use a file */
#define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */
#define MAP_NORESERVE 0x40 /* don't reserve swap pages */
+#define MAP_LOCKED 0x80
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
index 3efe39d00866..976ea6cc9afb 100644
--- a/include/asm-ppc/mmu.h
+++ b/include/asm-ppc/mmu.h
@@ -6,12 +6,13 @@
#ifndef _PPC_MMU_H_
#define _PPC_MMU_H_
-/* Default "unsigned long" context */
-typedef unsigned long mm_context_t;
-
#include <linux/config.h>
#ifndef __ASSEMBLY__
+
+/* Default "unsigned long" context */
+typedef unsigned long mm_context_t;
+
/* Hardware Page Table Entry */
typedef struct _PTE {
#ifdef CONFIG_PPC64BRIDGE
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
index fed474d14e92..f8ef4e604bf6 100644
--- a/include/asm-ppc/mmu_context.h
+++ b/include/asm-ppc/mmu_context.h
@@ -56,13 +56,6 @@ extern void mmu_context_overflow(void);
*/
extern void set_context(int context, void *pgd);
-#ifdef CONFIG_8xx
-extern inline void mmu_context_overflow(void)
-{
- atomic_set(&next_mmu_context, -1);
-}
-#endif
-
/*
* Get a new mmu context for task tsk if necessary.
*/
diff --git a/include/asm-ppc/parport.h b/include/asm-ppc/parport.h
new file mode 100644
index 000000000000..11f96d3de5b6
--- /dev/null
+++ b/include/asm-ppc/parport.h
@@ -0,0 +1,18 @@
+/*
+ * parport.h: platform-specific PC-style parport initialisation
+ *
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
+ *
+ * This file should only be included by drivers/parport/parport_pc.c.
+ */
+
+#ifndef _ASM_PPC_PARPORT_H
+#define _ASM_PPC_PARPORT_H
+
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
+{
+ return parport_pc_find_isa_ports (autoirq, autodma);
+}
+
+#endif /* !(_ASM_PPC_PARPORT_H) */
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h
index 9e5385e512e8..a6c8d89192c0 100644
--- a/include/asm-ppc/pci-bridge.h
+++ b/include/asm-ppc/pci-bridge.h
@@ -2,49 +2,70 @@
#ifndef _ASM_PCI_BRIDGE_H
#define _ASM_PCI_BRIDGE_H
-void pmac_find_bridges(void);
+struct device_node;
+struct pci_controller;
/*
* pci_io_base returns the memory address at which you can access
* the I/O space for PCI bus number `bus' (or NULL on error).
- *
- * NOTE: This doesn't handle the new Uni-N chip which requires
- * per-device io_base.
*/
-void *pci_io_base(unsigned int bus);
-
-/* This version handles the new Uni-N host bridge, the iobase is now
- * a per-device thing. I also added the memory base so PReP can
- * be fixed to return 0xc0000000 (I didn't actually implement it)
- *
- * pci_dev_io_base() returns either a virtual (ioremap'ed) address or
- * a physical address. In-kernel clients will use logical while the
- * sys_pciconfig_iobase syscall returns a physical one to userland.
+extern void *pci_bus_io_base(unsigned int bus);
+extern unsigned long pci_bus_io_base_phys(unsigned int bus);
+extern unsigned long pci_bus_mem_base_phys(unsigned int bus);
+
+/*
+ * PCI <-> OF matching functions
*/
-void *pci_dev_io_base(unsigned char bus, unsigned char devfn, int physical);
-void *pci_dev_mem_base(unsigned char bus, unsigned char devfn);
+extern int pci_device_from_OF_node(struct device_node *node,
+ u8* bus, u8* devfn);
+extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
-/* Returns the root-bridge number (Uni-N number) of a device */
-int pci_dev_root_bridge(unsigned char bus, unsigned char devfn);
+/* Get the PCI host controller for a bus */
+extern struct pci_controller* pci_bus_to_hose(int bus);
+
+/* Get the PCI host controller for an OF device */
+extern struct pci_controller*
+pci_find_hose_for_OF_device(struct device_node* node);
/*
- * pci_device_loc returns the bus number and device/function number
- * for a device on a PCI bus, given its device_node struct.
- * It returns 0 if OK, -1 on error.
+ * Structure of a PCI controller (host bridge)
*/
-int pci_device_loc(struct device_node *dev, unsigned char *bus_ptr,
- unsigned char *devfn_ptr);
+struct pci_controller {
+ struct pci_controller *next;
+ struct pci_bus *bus;
+ void *arch_data;
+
+ int first_busno;
+ int last_busno;
+
+ void *io_base_virt;
+ unsigned long io_base_phys;
+
+ /* Some machines (PReP) have a non 1:1 mapping of
+ * the PCI memory space in the CPU bus space
+ */
+ unsigned long pci_mem_offset;
-struct bridge_data {
+ struct pci_ops *ops;
volatile unsigned int *cfg_addr;
volatile unsigned char *cfg_data;
- void *io_base; /* virtual */
- unsigned long io_base_phys;
- int bus_number;
- int max_bus;
- struct bridge_data *next;
- struct device_node *node;
+
+ /* Currently, we limit ourselves to 1 IO range and 3 mem
+ * ranges since the common pci_bus structure can't handle more
+ */
+ struct resource io_resource;
+ struct resource mem_resources[3];
+ int mem_resource_count;
};
+/* These are used for config access before all the PCI probing
+ has been done. */
+int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, int where, u8 *val);
+int early_read_config_word(struct pci_controller *hose, int bus, int dev_fn, int where, u16 *val);
+int early_read_config_dword(struct pci_controller *hose, int bus, int dev_fn, int where, u32 *val);
+int early_write_config_byte(struct pci_controller *hose, int bus, int dev_fn, int where, u8 val);
+int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn, int where, u16 val);
+int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, int where, u32 val);
+
#endif
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index 1a661f050cc8..a1cfa7d31dc2 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -6,13 +6,11 @@
#define IOBASE_BRIDGE_NUMBER 0
#define IOBASE_MEMORY 1
#define IOBASE_IO 2
+#define IOBASE_ISA_IO 3
+#define IOBASE_ISA_MEM 4
-/* Can be used to override the logic in pci_scan_bus for skipping
- * already-configured bus numbers - to be used for buggy BIOSes
- * or architectures with incomplete PCI setup by the loader.
- */
-#define pcibios_assign_all_busses() 0
+extern int pcibios_assign_all_busses(void);
#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x10000000
@@ -27,6 +25,18 @@ extern inline void pcibios_penalize_isa_irq(int irq)
/* We don't do dynamic PCI IRQ allocation */
}
+extern unsigned long pci_resource_to_bus(struct pci_dev *pdev, struct resource *res);
+
+/*
+ * The PCI bus bridge can translate addresses issued by the processor(s)
+ * into a different address on the PCI bus. On 32-bit cpus, we assume
+ * this mapping is 1-1, but on 64-bit systems it often isn't.
+ *
+ * Obsolete ! Drivers should now use pci_resource_to_bus
+ */
+extern unsigned long pci_phys_to_bus(unsigned long pa, int busnr);
+extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
+
/* Dynamic DMA Mapping stuff
* ++ajoshi
*/
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
index 0f4579cd7ba8..353f5c9bfbe8 100644
--- a/include/asm-ppc/pgtable.h
+++ b/include/asm-ppc/pgtable.h
@@ -17,22 +17,22 @@ extern void local_flush_tlb_mm(struct mm_struct *mm);
extern void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr);
extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
unsigned long end);
-extern inline void flush_hash_page(unsigned context, unsigned long va)
+static inline void flush_hash_page(unsigned context, unsigned long va)
{ }
#elif defined(CONFIG_8xx)
#define __tlbia() asm volatile ("tlbia" : : )
-extern inline void local_flush_tlb_all(void)
+static inline void local_flush_tlb_all(void)
{ __tlbia(); }
-extern inline void local_flush_tlb_mm(struct mm_struct *mm)
+static inline void local_flush_tlb_mm(struct mm_struct *mm)
{ __tlbia(); }
-extern inline void local_flush_tlb_page(struct vm_area_struct *vma,
+static inline void local_flush_tlb_page(struct vm_area_struct *vma,
unsigned long vmaddr)
{ __tlbia(); }
-extern inline void local_flush_tlb_range(struct mm_struct *mm,
+static inline void local_flush_tlb_range(struct mm_struct *mm,
unsigned long start, unsigned long end)
{ __tlbia(); }
-extern inline void flush_hash_page(unsigned context, unsigned long va)
+static inline void flush_hash_page(unsigned context, unsigned long va)
{ }
#else
struct mm_struct;
@@ -49,7 +49,7 @@ extern void local_flush_tlb_range(struct mm_struct *mm, unsigned long start,
#define flush_tlb_page local_flush_tlb_page
#define flush_tlb_range local_flush_tlb_range
-extern inline void flush_tlb_pgtables(struct mm_struct *mm,
+static inline void flush_tlb_pgtables(struct mm_struct *mm,
unsigned long start, unsigned long end)
{
/* PPC has hw page tables. */
@@ -323,9 +323,9 @@ extern pte_t * __bad_pagetable(void);
* setup: the pgd is never bad, and a pmd always exists (as it's folded
* into the pgd entry)
*/
-extern inline int pgd_none(pgd_t pgd) { return 0; }
-extern inline int pgd_bad(pgd_t pgd) { return 0; }
-extern inline int pgd_present(pgd_t pgd) { return 1; }
+static inline int pgd_none(pgd_t pgd) { return 0; }
+static inline int pgd_bad(pgd_t pgd) { return 0; }
+static inline int pgd_present(pgd_t pgd) { return 1; }
#define pgd_clear(xp) do { } while (0)
#define pgd_page(pgd) \
@@ -335,45 +335,45 @@ extern inline int pgd_present(pgd_t pgd) { return 1; }
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
-extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
-extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
-extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
-extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
-extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
+static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
+static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
+static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
+static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
+static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
-extern inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
-extern inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; }
+static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; }
+static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; }
-extern inline pte_t pte_rdprotect(pte_t pte) {
+static inline pte_t pte_rdprotect(pte_t pte) {
pte_val(pte) &= ~_PAGE_USER; return pte; }
-extern inline pte_t pte_exprotect(pte_t pte) {
+static inline pte_t pte_exprotect(pte_t pte) {
pte_val(pte) &= ~_PAGE_USER; return pte; }
-extern inline pte_t pte_wrprotect(pte_t pte) {
+static inline pte_t pte_wrprotect(pte_t pte) {
pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; }
-extern inline pte_t pte_mkclean(pte_t pte) {
+static inline pte_t pte_mkclean(pte_t pte) {
pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; }
-extern inline pte_t pte_mkold(pte_t pte) {
+static inline pte_t pte_mkold(pte_t pte) {
pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
-extern inline pte_t pte_mkread(pte_t pte) {
+static inline pte_t pte_mkread(pte_t pte) {
pte_val(pte) |= _PAGE_USER; return pte; }
-extern inline pte_t pte_mkexec(pte_t pte) {
+static inline pte_t pte_mkexec(pte_t pte) {
pte_val(pte) |= _PAGE_USER; return pte; }
-extern inline pte_t pte_mkwrite(pte_t pte)
+static inline pte_t pte_mkwrite(pte_t pte)
{
pte_val(pte) |= _PAGE_RW;
if (pte_val(pte) & _PAGE_DIRTY)
pte_val(pte) |= _PAGE_HWWRITE;
return pte;
}
-extern inline pte_t pte_mkdirty(pte_t pte)
+static inline pte_t pte_mkdirty(pte_t pte)
{
pte_val(pte) |= _PAGE_DIRTY;
if (pte_val(pte) & _PAGE_RW)
pte_val(pte) |= _PAGE_HWWRITE;
return pte;
}
-extern inline pte_t pte_mkyoung(pte_t pte) {
+static inline pte_t pte_mkyoung(pte_t pte) {
pte_val(pte) |= _PAGE_ACCESSED; return pte; }
/* Certain architectures need to do special things when pte's
@@ -387,7 +387,7 @@ extern inline pte_t pte_mkyoung(pte_t pte) {
* and a page entry and page directory to the page they refer to.
*/
-extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
+static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
{
pte_t pte;
pte_val(pte) = physpage | pgprot_val(pgprot);
@@ -401,12 +401,73 @@ extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
pte; \
})
-extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{
pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
return pte;
}
+/*
+ * Atomic PTE updates.
+ *
+ * pte_update clears and sets bit atomically, and returns
+ * the old pte value.
+ */
+static inline unsigned long pte_update(pte_t *p, unsigned long clr,
+ unsigned long set)
+{
+ unsigned long old, tmp;
+
+ __asm__ __volatile__("\
+1: lwarx %0,0,%3
+ andc %1,%0,%4
+ or %1,%1,%5
+ stwcx. %1,0,%3
+ bne- 1b"
+ : "=&r" (old), "=&r" (tmp), "=m" (*p)
+ : "r" (p), "r" (clr), "r" (set), "m" (*p)
+ : "cc" );
+ return old;
+}
+
+static inline int ptep_test_and_clear_young(pte_t *ptep)
+{
+ return (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED) != 0;
+}
+
+static inline int ptep_test_and_clear_dirty(pte_t *ptep)
+{
+ return (pte_update(ptep, _PAGE_DIRTY | _PAGE_HWWRITE, 0)
+ & _PAGE_DIRTY) != 0;
+}
+
+static inline pte_t ptep_get_and_clear(pte_t *ptep)
+{
+ return __pte(pte_update(ptep, ~0UL, 0));
+}
+
+static inline void ptep_set_wrprotect(pte_t *ptep)
+{
+ pte_update(ptep, _PAGE_RW | _PAGE_HWWRITE, 0);
+}
+
+static inline void ptep_mkdirty(pte_t *ptep)
+{
+ /*
+ * N.B. this doesn't set the _PAGE_HWWRITE bit in the case
+ * where _PAGE_RW is set and _PAGE_DIRTY was clear. This
+ * doesn't matter; all it will mean is that if the next call
+ * to hash_page for this page is for a read, it will put a
+ * readonly HPTE into the hash table rather than a R/W HPTE.
+ * A call to hash_page for a write to this page will set
+ * _PAGE_HWWRITE and put a R/W HPTE into the hash table.
+ * -- paulus.
+ */
+ pte_update(ptep, 0, _PAGE_DIRTY);
+}
+
+#define pte_same(A,B) (pte_val(A) == pte_val(B))
+
#define pmd_page(pmd) (pmd_val(pmd))
/* to find an entry in a kernel page-table-directory */
@@ -417,13 +478,13 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
/* Find an entry in the second-level page table.. */
-extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
+static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
{
return (pmd_t *) dir;
}
/* Find an entry in the third-level page table.. */
-extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
+static inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
{
return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
}
@@ -486,8 +547,6 @@ extern void kernel_set_cachemode (unsigned long address, unsigned long size,
#define io_remap_page_range remap_page_range
-#include <asm-generic/pgtable.h>
-
-#endif __ASSEMBLY__
+#endif /* __ASSEMBLY__ */
#endif /* _PPC_PGTABLE_H */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/prep_nvram.h b/include/asm-ppc/prep_nvram.h
index 82ec215081a4..85694899c2c2 100644
--- a/include/asm-ppc/prep_nvram.h
+++ b/include/asm-ppc/prep_nvram.h
@@ -21,6 +21,11 @@
#ifndef _PPC_PREP_NVRAM_H
#define _PPC_PREP_NVRAM_H
+#define MAX_PREP_NVRAM 0x8000
+#define PREP_NVRAM_AS0 0x74
+#define PREP_NVRAM_AS1 0x75
+#define PREP_NVRAM_DATA 0x77
+
#define NVSIZE 4096 /* size of NVRAM */
#define OSAREASIZE 512 /* size of OSArea space */
#define CONFSIZE 1024 /* guess at size of Configuration space */
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 5908d7f32edc..cd87f248e695 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -203,6 +203,12 @@
#define SPRN_IMISS 0x3D4 /* Instruction TLB Miss Register */
#define SPRN_IMMR 0x27E /* Internal Memory Map Register */
#define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */
+#define L2CR_PIPE_LATEWR (0x01800000) /* late-write SRAM */
+#define L2CR_L2CTL (0x00100000) /* RAM control */
+#define L2CR_INST_DISABLE (0x00400000) /* disable for insn's */
+#define L2CR_L2I (0x00200000) /* global invalidate */
+#define L2CR_L2E (0x80000000) /* enable */
+#define L2CR_L2WT (0x00080000) /* write-through */
#define SPRN_LR 0x008 /* Link Register */
#define SPRN_MMCR0 0x3B8 /* Monitor Mode Control Register 0 */
#define SPRN_MMCR1 0x3BC /* Monitor Mode Control Register 1 */
@@ -233,14 +239,14 @@
#define SPRN_SRR1 0x01B /* Save/Restore Register 1 */
#define SPRN_SRR2 0x3DE /* Save/Restore Register 2 */
#define SPRN_SRR3 0x3DF /* Save/Restore Register 3 */
-#define SPRN_TBHI 0x3DC /* Time Base High */
-#define SPRN_TBHU 0x3CC /* Time Base High User-mode */
-#define SPRN_TBLO 0x3DD /* Time Base Low */
-#define SPRN_TBLU 0x3CD /* Time Base Low User-mode */
-#define SPRN_TBRL 0x10D /* Time Base Read Lower Register */
-#define SPRN_TBRU 0x10C /* Time Base Read Upper Register */
-#define SPRN_TBWL 0x11D /* Time Base Write Lower Register */
-#define SPRN_TBWU 0x11C /* Time Base Write Upper Register */
+#define SPRN_TBRL 0x10C /* Time Base Read Lower Register (user, R/O) */
+#define SPRN_TBRU 0x10D /* Time Base Read Upper Register (user, R/O) */
+#define SPRN_TBWL 0x11C /* Time Base Lower Register (supervisor, R/W) */
+#define SPRN_TBWU 0x11D /* Time Base Upper Register (supervisor, R/W) */
+#define SPRN_TBHI 0x3DC /* Time Base High (4xx) */
+#define SPRN_TBHU 0x3CC /* Time Base High User-mode (4xx) */
+#define SPRN_TBLO 0x3DD /* Time Base Low (4xx) */
+#define SPRN_TBLU 0x3CD /* Time Base Low User-mode (4xx) */
#define SPRN_TCR 0x3DA /* Timer Control Register */
#define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */
#define WP_2_17 0 /* 2^17 clocks */
@@ -262,15 +268,17 @@
#define TCR_FIE 0x00800000 /* FIT Interrupt Enable */
#define TCR_ARE 0x00400000 /* Auto Reload Enable */
#define SPRN_THRM1 0x3FC /* Thermal Management Register 1 */
-#define THRM1_TIN (1<<0)
-#define THRM1_TIV (1<<1)
-#define THRM1_THRES (0x7f<<2)
-#define THRM1_TID (1<<29)
-#define THRM1_TIE (1<<30)
-#define THRM1_V (1<<31)
+/* these bits were defined in inverted endian sense originally, ugh, confusing */
+#define THRM1_TIN (1 << 31)
+#define THRM1_TIV (1 << 30)
+#define THRM1_THRES(x) ((x&0x7f)<<23)
+#define THRM3_SITV(x) ((x&0x3fff)<<1)
+#define THRM1_TID (1<<2)
+#define THRM1_TIE (1<<1)
+#define THRM1_V (1<<0)
#define SPRN_THRM2 0x3FD /* Thermal Management Register 2 */
#define SPRN_THRM3 0x3FE /* Thermal Management Register 3 */
-#define THRM3_E (1<<31)
+#define THRM3_E (1<<0)
#define SPRN_TSR 0x3D8 /* Timer Status Register */
#define TSR_ENW 0x80000000 /* Enable Next Watchdog */
#define TSR_WIS 0x40000000 /* WDT Interrupt Status */
@@ -500,8 +508,8 @@
#define _MACH_fads 0x00000020 /* Motorola FADS board */
#define _MACH_rpxlite 0x00000040 /* RPCG RPX-Lite 8xx board */
#define _MACH_bseip 0x00000080 /* Bright Star Engineering ip-Engine */
-#define _MACH_yk 0x00000100 /* Motorola Yellowknife */
-#define _MACH_gemini 0x00000200 /* Synergy Microsystems gemini board */
+#define _MACH_unused0 0x00000100 /* Now free to be used */
+#define _MACH_unused1 0x00000200 /* Now free to be used */
#define _MACH_classic 0x00000400 /* RPCG RPX-Classic 8xx board */
#define _MACH_oak 0x00000800 /* IBM "Oak" 403 eval. board */
#define _MACH_walnut 0x00001000 /* IBM "Walnut" 405GP eval. board */
@@ -509,24 +517,11 @@
#define _MACH_tqm860 0x00004000 /* TQM860/L */
#define _MACH_tqm8xxL 0x00008000 /* TQM8xxL */
-
/* see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
#define _PREP_Firm 0x02 /* firmworks prep */
#define _PREP_IBM 0x00 /* ibm prep */
#define _PREP_Bull 0x03 /* bull prep */
-#define _PREP_Radstone 0x04 /* Radstone Technology PLC prep */
-
-/*
- * Radstone board types
- */
-#define RS_SYS_TYPE_PPC1 0
-#define RS_SYS_TYPE_PPC2 1
-#define RS_SYS_TYPE_PPC1a 2
-#define RS_SYS_TYPE_PPC2a 3
-#define RS_SYS_TYPE_PPC4 4
-#define RS_SYS_TYPE_PPC4a 5
-#define RS_SYS_TYPE_PPC2ep 6
/* these are arbitrary */
#define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */
@@ -715,9 +710,6 @@ void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
#elif defined(CONFIG_APUS)
#define _machine _MACH_apus
#define have_of 0
-#elif defined(CONFIG_GEMINI)
-#define _machine _MACH_gemini
-#define have_of 0
#elif defined(CONFIG_8260)
#define _machine _MACH_8260
#define have_of 0
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
index 0c57690eaeee..b80c460b3374 100644
--- a/include/asm-ppc/prom.h
+++ b/include/asm-ppc/prom.h
@@ -80,14 +80,15 @@ extern struct device_node *find_type_devices(const char *type);
extern struct device_node *find_path_device(const char *path);
extern struct device_node *find_compatible_devices(const char *type,
const char *compat);
-extern struct device_node *find_pci_device_OFnode(unsigned char bus,
- unsigned char dev_fn);
extern struct device_node *find_phandle(phandle);
extern struct device_node *find_all_nodes(void);
extern int device_is_compatible(struct device_node *device, const char *);
extern int machine_is_compatible(const char *compat);
extern unsigned char *get_property(struct device_node *node, const char *name,
int *lenp);
+extern void prom_add_property(struct device_node* np, struct property* prop);
+extern void prom_get_irq_senses(unsigned char *, int, int);
+
extern void print_properties(struct device_node *node);
extern int call_rtas(const char *service, int nargs, int nret,
unsigned long *outputs, ...);
@@ -96,7 +97,8 @@ extern void prom_drawhex(unsigned long v);
extern void prom_drawchar(char c);
extern void map_bootx_text(void);
-
+extern void bootx_update_display(unsigned long phys, int width, int height,
+ int depth, int pitch);
#endif /* _PPC_PROM_H */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/raven.h b/include/asm-ppc/raven.h
index ee873ff8232f..e912088b0447 100644
--- a/include/asm-ppc/raven.h
+++ b/include/asm-ppc/raven.h
@@ -31,5 +31,5 @@
extern struct hw_interrupt_type raven_pic;
extern int raven_init(void);
-#endif _ASMPPC_RAVEN_H
+#endif /* _ASMPPC_RAVEN_H */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/segment.h b/include/asm-ppc/segment.h
index 0eef1e5e744d..0f2f7428d437 100644
--- a/include/asm-ppc/segment.h
+++ b/include/asm-ppc/segment.h
@@ -1,7 +1 @@
-#ifndef __PPC_SEGMENT_H
-#define __PPC_SEGMENT_H
-
-/* Only here because we have some old header files that expect it.. */
-
-#endif
#include <asm/uaccess.h>
diff --git a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h
index 60c1a14ff3ac..721476591e5d 100644
--- a/include/asm-ppc/serial.h
+++ b/include/asm-ppc/serial.h
@@ -5,10 +5,6 @@
#ifdef __KERNEL__
#include <linux/config.h>
-#ifdef CONFIG_GEMINI
-#include <asm/gemini_serial.h>
-#else
-
/*
* This assumes you have a 1.8432 MHz clock for your UART.
*
@@ -127,5 +123,4 @@
HUB6_SERIAL_PORT_DFNS \
MCA_SERIAL_PORT_DFNS
-#endif /* CONFIG_GEMINI */
#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h
index 4851e13fd149..6dfc778b94bc 100644
--- a/include/asm-ppc/smp.h
+++ b/include/asm-ppc/smp.h
@@ -15,7 +15,7 @@
#ifndef __ASSEMBLY__
struct cpuinfo_PPC {
- unsigned long loops_per_sec;
+ unsigned long loops_per_jiffy;
unsigned long pvr;
unsigned long *pgd_cache;
unsigned long *pte_cache;
diff --git a/include/asm-ppc/smplock.h b/include/asm-ppc/smplock.h
index 5fdd5733b47f..4b7ba58e914b 100644
--- a/include/asm-ppc/smplock.h
+++ b/include/asm-ppc/smplock.h
@@ -39,13 +39,13 @@ do { \
* so we only need to worry about other
* CPU's.
*/
-extern __inline__ void lock_kernel(void)
+static __inline__ void lock_kernel(void)
{
if (!++current->lock_depth)
spin_lock(&kernel_flag);
}
-extern __inline__ void unlock_kernel(void)
+static __inline__ void unlock_kernel(void)
{
if (--current->lock_depth < 0)
spin_unlock(&kernel_flag);
diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h
index 2a9b8b02512b..22f53ce8b2cd 100644
--- a/include/asm-ppc/termios.h
+++ b/include/asm-ppc/termios.h
@@ -43,6 +43,7 @@ struct ltchars {
#define FIONBIO _IOW('f', 126, int)
#define FIONREAD _IOR('f', 127, int)
#define TIOCINQ FIONREAD
+#define FIOQSIZE _IOR('f', 128, loff_t)
#define TIOCGETP _IOR('t', 8, struct sgttyb)
#define TIOCSETP _IOW('t', 9, struct sgttyb)
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
index 5c432792b381..c0a69ef721fc 100644
--- a/include/asm-ppc/unistd.h
+++ b/include/asm-ppc/unistd.h
@@ -206,6 +206,10 @@
#define __NR_pciconfig_iobase 200
#define __NR_multiplexer 201
#define __NR_getdents64 202
+#define __NR_pivot_root 203
+#define __NR_fcntl64 204
+#define __NR_madvise 205
+#define __NR_mincore 206
#define __NR(n) #n
diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h
index c9a10cd864f7..be60a9afa41f 100644
--- a/include/asm-sparc/mostek.h
+++ b/include/asm-sparc/mostek.h
@@ -1,4 +1,4 @@
-/* $Id: mostek.h,v 1.12 1999/08/31 18:51:41 davem Exp $
+/* $Id: mostek.h,v 1.13 2001/01/11 15:07:09 davem Exp $
* mostek.h: Describes the various Mostek time of day clock registers.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -64,6 +64,7 @@ struct mostek48t02 {
volatile unsigned char year; /* Year (0-99) */
};
+extern spinlock_t mostek_lock;
extern unsigned long mstk48t02_regs;
/* Control register values. */
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h
index e153a36cfea1..b000c1586b4d 100644
--- a/include/asm-sparc64/mostek.h
+++ b/include/asm-sparc64/mostek.h
@@ -1,4 +1,4 @@
-/* $Id: mostek.h,v 1.3 1999/08/30 10:14:50 davem Exp $
+/* $Id: mostek.h,v 1.4 2001/01/11 15:07:09 davem Exp $
* mostek.h: Describes the various Mostek time of day clock registers.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -66,6 +66,7 @@ static __inline__ void mostek_write(unsigned long addr, u8 val)
#define MOSTEK_MONTH 0x07feUL
#define MOSTEK_YEAR 0x07ffUL
+extern spinlock_t mostek_lock;
extern unsigned long mstk48t02_regs;
/* Control register values. */
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index c17e9bf23d71..0826267255ac 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -1,4 +1,4 @@
-/* $Id: pbm.h,v 1.22 2000/03/25 05:18:30 davem Exp $
+/* $Id: pbm.h,v 1.23 2001/01/11 16:26:45 davem Exp $
* pbm.h: UltraSparc PCI controller software state.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
@@ -18,11 +18,12 @@
/* The abstraction used here is that there are PCI controllers,
* each with one (Sabre) or two (PSYCHO/SCHIZO) PCI bus modules
- * underneath. Each PCI controller has a single IOMMU shared
- * by the PCI bus modules underneath, and if a streaming buffer
+ * underneath. Each PCI bus module uses an IOMMU (shared by both
+ * PBMs of a controller, or per-PBM), and if a streaming buffer
* is present, each PCI bus module has it's own. (ie. the IOMMU
- * is shared between PBMs, the STC is not) Furthermore, each
- * PCI bus module controls it's own autonomous PCI bus.
+ * might be shared between PBMs, the STC is never shared)
+ * Furthermore, each PCI bus module controls it's own autonomous
+ * PCI bus.
*/
#define PBM_LOGCLUSTERS 3
@@ -150,6 +151,9 @@ struct pci_pbm_info {
/* This PBM's streaming buffer. */
struct pci_strbuf stc;
+ /* IOMMU state, potentially shared by both PBM segments. */
+ struct pci_iommu *iommu;
+
/* Now things for the actual PCI bus probes. */
unsigned int pci_first_busno;
unsigned int pci_last_busno;
@@ -189,9 +193,6 @@ struct pci_controller_info {
unsigned int pci_first_busno;
unsigned int pci_last_busno;
- /* IOMMU state shared by both PBM segments. */
- struct pci_iommu iommu;
-
void *starfire_cookie;
};
diff --git a/include/asm-sparc64/watchdog.h b/include/asm-sparc64/watchdog.h
new file mode 100644
index 000000000000..4d5b03b60e4d
--- /dev/null
+++ b/include/asm-sparc64/watchdog.h
@@ -0,0 +1,31 @@
+/* $Id: watchdog.h,v 1.1 2001/01/18 04:47:44 davem Exp $
+ *
+ * watchdog - Driver interface for the hardware watchdog timers
+ * present on Sun Microsystems boardsets
+ *
+ * Copyright (c) 2000 Eric Brower <ebrower@usa.net>
+ *
+ */
+
+#ifndef _SPARC64_WATCHDOG_H
+#define _SPARC64_WATCHDOG_H
+
+#include <linux/watchdog.h>
+
+/* Solaris compatibility ioctls--
+ * Ref. <linux/watchdog.h> for standard linux watchdog ioctls
+ */
+#define WIOCSTART _IO (WATCHDOG_IOCTL_BASE, 10) /* Start Timer */
+#define WIOCSTOP _IO (WATCHDOG_IOCTL_BASE, 11) /* Stop Timer */
+#define WIOCGSTAT _IOR(WATCHDOG_IOCTL_BASE, 12, int)/* Get Timer Status */
+
+/* Status flags from WIOCGSTAT ioctl
+ */
+#define WD_FREERUN 0x01 /* timer is running, interrupts disabled */
+#define WD_EXPIRED 0x02 /* timer has expired */
+#define WD_RUNNING 0x04 /* timer is running, interrupts enabled */
+#define WD_STOPPED 0x08 /* timer has not been started */
+#define WD_SERVICED 0x10 /* timer interrupt was serviced */
+
+#endif /* ifndef _SPARC64_WATCHDOG_H */
+
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index ff1dcaf45551..38b7a6a982a5 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -28,8 +28,6 @@
#include <linux/wait.h>
#endif /* __KERNEL__ */
-u64 acpi_get_rsdp_ptr(void);
-
/*
* System sleep states
*/
diff --git a/include/linux/dn.h b/include/linux/dn.h
index c7448158b152..d98b0c3c7903 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -45,7 +45,12 @@
#define DSO_LINKINFO 7 /* Set/Get link information */
#define DSO_STREAM 8 /* Set socket type to stream */
#define DSO_SEQPACKET 9 /* Set socket type to sequenced packet */
-#define DSO_MAX 10 /* Maximum option number */
+#define DSO_MAXWINDOW 11 /* Maximum window size allowed */
+#define DSO_NODELAY 12 /* Turn off nagle */
+#define DSO_CORK 13 /* Wait for more data! */
+#define DSO_SERVICES 14 /* NSP Services field */
+#define DSO_INFO 15 /* NSP Info field */
+#define DSO_MAX 15 /* Maximum option number */
/* LINK States */
@@ -138,5 +143,6 @@ struct dn_addr {
#define SIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, struct dn_naddr)
#define OSIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, int)
#define OSIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, int)
+/* #define SIOCATEOR _IOR(DECNET_IOCTL_BASE, 0x01, int) */
#endif /* _LINUX_DN_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4f6645a3d555..d139801f4041 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -563,6 +563,7 @@ extern void FASTCALL(wake_up_process(struct task_struct * tsk));
#define wake_up_interruptible_all(x) __wake_up((x),TASK_INTERRUPTIBLE, 0)
#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
#define wake_up_interruptible_sync_nr(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, nr)
+asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struct rusage * ru);
extern int in_group_p(gid_t);
extern int in_egroup_p(gid_t);
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 80feae4c7e40..f24e4de6b9ac 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -30,7 +30,7 @@ extern struct vt_struct {
wait_queue_head_t paste_wait;
} *vt_cons[MAX_NR_CONSOLES];
-void (*kd_mksound)(unsigned int hz, unsigned int ticks);
+extern void (*kd_mksound)(unsigned int hz, unsigned int ticks);
/* console.c */
diff --git a/include/net/dn.h b/include/net/dn.h
index 52c6ba44d4b8..c4c598f2f15c 100644
--- a/include/net/dn.h
+++ b/include/net/dn.h
@@ -9,6 +9,8 @@ typedef unsigned short dn_address;
#define dn_ntohs(x) le16_to_cpu((unsigned short)(x))
#define dn_htons(x) cpu_to_le16((unsigned short)(x))
+#define DN_SK(sk) (&sk->protinfo.dn)
+
struct dn_scp /* Session Control Port */
{
unsigned char state;
@@ -44,9 +46,23 @@ struct dn_scp /* Session Control Port */
#define DN_SEND 2
#define DN_DONTSEND 1
#define DN_NOCHANGE 0
+ unsigned short flowrem_dat;
+ unsigned short flowrem_oth;
+ unsigned short flowloc_dat;
+ unsigned short flowloc_oth;
+ unsigned char services_rem;
+ unsigned char services_loc;
+ unsigned char info_rem;
+ unsigned char info_loc;
+
+ unsigned short segsize_rem;
+ unsigned short segsize_loc;
+
+ unsigned char at_eor;
+ unsigned char nonagle;
+ unsigned char multi_ireq;
unsigned char accept_mode;
- unsigned short mss;
- unsigned long seg_size; /* Running total of current segment */
+ unsigned long seg_total; /* Running total of current segment */
struct optdata_dn conndata_in;
struct optdata_dn conndata_out;
@@ -80,7 +96,8 @@ struct dn_scp /* Session Control Port */
* multipliers.
*/
#define NSP_MIN_WINDOW 1
-#define NSP_MAX_WINDOW 512
+#define NSP_MAX_WINDOW (0x07fe)
+ unsigned long max_window;
unsigned long snd_window;
#define NSP_INITIAL_SRTT (HZ)
unsigned long nsp_srtt;
@@ -116,6 +133,7 @@ struct dn_scp /* Session Control Port */
struct timer_list delack_timer;
int delack_pending;
void (*delack_fxn)(struct sock *sk);
+
};
/*
@@ -128,7 +146,7 @@ struct dn_scp /* Session Control Port */
* segsize : Size of segment
* segnum : Number, for data, otherdata and linkservice
* xmit_count : Number of times we've transmitted this skb
- * stamp : Time stamp of first transmission, used in RTT calculations
+ * stamp : Time stamp of most recent transmission, used in RTT calculations
* iif: Input interface number
*
* As a general policy, this structure keeps all addresses in network
@@ -136,6 +154,7 @@ struct dn_scp /* Session Control Port */
* and src_port are in network order. All else is in host order.
*
*/
+#define DN_SKB_CB(skb) ((struct dn_skb_cb *)(skb)->cb)
struct dn_skb_cb {
unsigned short dst;
unsigned short src;
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 8b628d2e5341..3948c30a33ca 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -24,12 +24,12 @@ extern void dn_nsp_send_disc(struct sock *sk, unsigned char type,
unsigned short reason, int gfp);
extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type,
unsigned short reason);
-extern void dn_nsp_send_lnk(struct sock *sk, unsigned short flags);
+extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval);
extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags);
extern void dn_nsp_output(struct sock *sk);
extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum);
-extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int oob);
+extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oob);
extern unsigned long dn_nsp_persist(struct sock *sk);
extern int dn_nsp_xmit_timeout(struct sock *sk);
@@ -120,6 +120,7 @@ struct nsp_conn_init_msg
#define NSP_FC_NONE 0x00 /* Flow Control None */
#define NSP_FC_SRC 0x04 /* Seg Req. Count */
#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */
+#define NSP_FC_MASK 0x0c /* FC type mask */
unsigned char info __attribute__((packed));
unsigned short segsize __attribute__((packed));
};
@@ -178,13 +179,13 @@ static __inline__ int before_or_equal(unsigned short seq1, unsigned short seq2)
static __inline__ void seq_add(unsigned short *seq, unsigned short off)
{
- *seq += off;
- *seq &= 0x0fff;
+ (*seq) += off;
+ (*seq) &= 0x0fff;
}
static __inline__ int seq_next(unsigned short seq1, unsigned short seq2)
{
- return (((seq2&0x0fff) - (seq1&0x0fff)) == 1);
+ return equal(seq1 + 1, seq2);
}
/*
diff --git a/include/net/ipx.h b/include/net/ipx.h
index bc023a6624c0..ba788670fd6c 100644
--- a/include/net/ipx.h
+++ b/include/net/ipx.h
@@ -73,6 +73,14 @@ typedef struct ipx_route {
struct ipx_route *ir_next;
} ipx_route;
+#ifdef __KERNEL__
+struct ipx_cb {
+ u8 ipx_tctrl;
+ u32 ipx_dest_net;
+ u32 ipx_source_net;
+ int last_hop_index;
+};
+#endif
#define IPX_MIN_EPHEMERAL_SOCKET 0x4000
#define IPX_MAX_EPHEMERAL_SOCKET 0x7fff
diff --git a/include/net/x25.h b/include/net/x25.h
index 257618d44983..2e1e884261dd 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -217,6 +217,7 @@ extern void x25_start_t23timer(struct sock *);
extern void x25_stop_heartbeat(struct sock *);
extern void x25_stop_timer(struct sock *);
extern unsigned long x25_display_timer(struct sock *);
+extern void x25_check_rbuf(struct sock *);
/* sysctl_net_x25.c */
extern void x25_register_sysctl(void);