test patch relative to 2.5.30
Subsystems (29)
Below is a quick patch for 2.5.30. Warning: it has been tested only lightly. It worked for me on a Big Sur in UP mode. I think MP is broken at the moment. My focus was to try to get the AGP/DRM code into shape so we can have it merged into 2.5. The primary reason I tought it would be good to make this barely tested patch available is because 2.5.29 likes to eat filesystems on IDE disks (it ate the rootfs on one of my machines and subtly corrupted a couple of files on another machine...). With 2.5.30, I haven't seen any file corruption so far, but your mileage obviously may vary.
--david
Documentation/mmio_barrier.txt new file +15 -0
@@ -0,0 +1,15 @@ +On some platforms, so-called memory-mapped I/O is weakly ordered. For +example, the following might occur: + +CPU A writes 0x1 to Device #1 +CPU B writes 0x2 to Device #1 +Device #1 sees 0x2 +Device #1 sees 0x1 + +On such platforms, driver writers are responsible for ensuring that I/O +writes to memory-mapped addresses on their device arrive in the order +intended. The mmiob() macro is provided for this purpose. A typical use +of this macro might be immediately prior to the exit of a critical +section of code proteced by spinlocks. This would ensure that subsequent +writes to I/O space arrived only after all prior writes (much like a +typical memory barrier op, mb(), only with respect to I/O).
Makefile +1 -1
@@ -221,7 +221,7 @@ CPPFLAGS := -D__KERNEL__ -I$(HPATH) -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -g -O2 \ -fomit-frame-pointer -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
arch/i386/mm/fault.c +0 -2
@@ -28,8 +28,6 @@extern void die (const char *,struct pt_regs *,long ); -extern int console_loglevel; -/* * Ugly, ugly, but the goto's result in better assembly.. */
arch/ia64/Makefile +1 -1
@@ -13,7 +13,7 @@ export AWK -OBJCOPYFLAGS := --strip-all +OBJCOPYFLAGS := --strip-all LDFLAGS_vmlinux := -static -T arch/$(ARCH)/vmlinux.lds AFLAGS_KERNEL := -mconstant-gp EXTRA @@ -26,7 +26,7 @@
GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
ifneq ($(GCC_VERSION),2)
- CFLAGS += -frename-registers --param max-inline-insns 00
+ CFLAGS += -frename-registers --param max-inline-insnsP00
endif
ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y)
arch/ia64/boot/Makefile +4 -2
@@ -12,8 +12,10 @@ OBJECTS = bootloader.o -targets-$(CONFIG_IA64_HP_SIM) += bootloader -targets-$(CONFIG_IA64_GENERIC) += bootloader +targets-$(CONFIG_IA64_HP_SIM) += bootloader +targets-$(CONFIG_IA64_GENERIC) += bootloader + +CFLAGS := $(CFLAGS) $(CFLAGS_KERNEL) all: $(targets-y)
arch/ia64/config.in +93 -96
252 lines not on this page · raw message
arch/ia64/hp/Config.in deleted +0 -9
@@ -1,9 +0,0 @@ -mainmenu_option next_comment -comment 'HP Simulator drivers' - -bool 'Simulated Ethernet ' CONFIG_HP_SIMETH -bool 'Simulated serial driver support' CONFIG_HP_SIMSERIAL -if [ "$CONFIG_SCSI" != "n" ]; then - bool 'Simulated SCSI disk' CONFIG_HP_SIMSCSI -fi -endmenu
arch/ia64/hp/common/sba_iommu.c +163 -336
841 lines not on this page · raw message
arch/ia64/hp/sim/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +mainmenu_option next_comment +comment 'HP Simulator drivers' + +bool 'Simulated Ethernet ' CONFIG_HP_SIMETH +bool 'Simulated serial driver support' CONFIG_HP_SIMSERIAL +if [ "$CONFIG_SCSI" != "n" ]; then + bool 'Simulated SCSI disk' CONFIG_HP_SIMSCSI +fi +endmenu
arch/ia64/hp/sim/hpsim_console.c +6 -6
@@ -30,12 +30,12 @@static kdev_t simcons_console_device (struct console *);struct console hpsim_cons = { - name:"simcons" , - write: simcons_write, - device: simcons_console_device, - setup: simcons_init, - flags:CON_PRINTBUFFER , - index:-1 , + .name ="simcons" , + .write = simcons_write, + .device = simcons_console_device, + .setup = simcons_init, + .flags =CON_PRINTBUFFER , + .index =-1 , }; static int
arch/ia64/hp/sim/hpsim_irq.c +8 -8
@@ -22,14 +22,14 @@ }static struct hw_interrupt_type irq_type_hp_sim = { - typename:"hpsim" , - startup: hpsim_irq_startup, - shutdown: hpsim_irq_noop, - enable: hpsim_irq_noop, - disable: hpsim_irq_noop, - ack: hpsim_irq_noop, - end: hpsim_irq_noop, - set_affinity: (void (*)(unsigned int ,unsigned long )) hpsim_irq_noop, + .typename ="hpsim" , + .startup = hpsim_irq_startup, + .shutdown = hpsim_irq_noop, + .enable = hpsim_irq_noop, + .disable = hpsim_irq_noop, + .ack = hpsim_irq_noop, + .end = hpsim_irq_noop, + .set_affinity = (void (*)(unsigned int ,unsigned long )) hpsim_irq_noop, };void __init
arch/ia64/hp/sim/hpsim_setup.c +7 -6
@@ -1,18 +1,19 @@/* * Platform dependent support for HP simulator. * -* Copyright (C) 1998, 1999 Hewlett-Packard Co -* Copyright (C) 1998, 1999 David Mosberger-Tang <[email protected]> +* Copyright (C) 1998, 1999, 2002 Hewlett-Packard Co +* David Mosberger-Tang <[email protected]> * Copyright (C) 1999 Vijay Chander <[email protected]> */ +#include <linux/console.h> #include <linux/init.h> +#include <linux/kdev_t.h> #include <linux/kernel.h> +#include <linux/major.h> #include <linux/param.h> +#include <linux/root_dev.h> #include <linux/string.h> #include <linux/types.h> -#include <linux/kdev_t.h> -#include <linux/console.h> -#include <linux/root_dev.h> #include <asm/delay.h> #include <asm/irq.h>
@@ -55,5 +56,5 @@ {ROOT_DEV = Root_SDA1;/* default to first SCSI drive */ -register_console (&hpsim_cons); +register_console (&hpsim_cons); }
arch/ia64/hp/sim/simscsi.c +39 -11
93 lines not on this page · raw message
arch/ia64/hp/sim/simserial.c +67 -60
244 lines not on this page · raw message
arch/ia64/hp/zx1/hpzx1_machvec.c +0 -2
@@ -1,4 +1,2 @@#define MACHVEC_PLATFORM_NAME hpzx1#include <asm/machvec_init.h> -#define MACHVEC_PLATFORM_NAME hpzx1 -#include <asm/machvec_init.h>
arch/ia64/hp/zx1/hpzx1_misc.c +153 -187
460 lines not on this page · raw message
arch/ia64/ia32/binfmt_elf32.c +1 -1
@@ -67,7 +67,7 @@ }static struct vm_operations_struct ia32_shared_page_vm_ops = { - nopage: ia32_install_shared_page + .nopage =ia32_install_shared_page };void
arch/ia64/ia32/ia32_ioctl.c +2 -0
@@ -30,6 +30,8 @@#include <asm/ia32.h> #include <../drivers/char/drm/drm.h> +#include <../drivers/char/drm/mga_drm.h> +#include <../drivers/char/drm/i810_drm.h> #define IOCTL_NR (a) ((a) & ~(_IOC_SIZEMASK << _IOC_SIZESHIFT))
arch/ia64/kernel/acpi.c +116 -125
489 lines not on this page · raw message
arch/ia64/kernel/efi.c +126 -24
199 lines not on this page · raw message
arch/ia64/kernel/entry.S +1 -0
@@ -175,6 +175,7 @@ (p6) srlz.d ld8 sp=[r21] // load kernel stack pointer of new task mov IA64_KR(CURRENT)=r20 // update "current" application register + mov r8=r13 // return pointer to previously running task mov r13=in0 // set "current" pointer ;; DO_LOAD_SWITCH_STACK
arch/ia64/kernel/ia64_ksyms.c +0 -6
@@ -88,12 +88,6 @@#include <asm/smplock.h> EXPORT_SYMBOL (kernel_flag); -/* #include <asm/system.h> */ -EXPORT_SYMBOL (__global_sti); -EXPORT_SYMBOL (__global_cli); -EXPORT_SYMBOL (__global_save_flags); -EXPORT_SYMBOL (__global_restore_flags); -#else /* !CONFIG_SMP */ EXPORT_SYMBOL (__flush_tlb_all);
arch/ia64/kernel/init_task.c +2 -2
@@ -34,8 +34,8 @@ } s;unsigned long stack[KERNEL_STACK_SIZE /sizeof (unsigned long )]; } init_thread_union __attribute__((section(".data.init_task"))) = {{ - task:INIT_TASK (init_thread_union.s.task), - thread_info:INIT_THREAD_INFO (init_thread_union.s.thread_info) + .task =INIT_TASK (init_thread_union.s.task), + .thread_info =INIT_THREAD_INFO (init_thread_union.s.thread_info) }}; asm (".global init_task; init_task = init_thread_union" );
arch/ia64/kernel/iosapic.c +32 -27
123 lines not on this page · raw message
arch/ia64/kernel/irq.c +21 -290
111 lines not on this page · raw message
arch/ia64/kernel/perfmon.c +61 -56
117 lines not on this page · raw message
arch/ia64/kernel/perfmon_itanium.h new file +99 -0
99 lines not on this page · raw message
arch/ia64/kernel/perfmon_mckinley.h new file +134 -0
134 lines not on this page · raw message
arch/ia64/kernel/smpboot.c +44 -51
95 lines not on this page · raw message
arch/ia64/kernel/traps.c +49 -25
74 lines not on this page · raw message
arch/ia64/lib/Makefile +25 -19
44 lines not on this page · raw message
arch/ia64/lib/memcpy_mck.S new file +674 -0
674 lines not on this page · raw message
arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c +16 -16
Lines of this file are not shown. View the raw message.
drivers/char/agp/agp.c +50 -3
53 lines not on this page · raw message
drivers/char/agp/i460-agp.c +285 -289
574 lines not on this page · raw message
drivers/char/drm/drm_memory.h +114 -9
123 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
static int txdmacount = 128;
static int rxdmacount /* = 0 */;
+#if defined(__ia64__) || defined(__alpha__) || defined(__sparc__) || defined(__mips__) || \
+ defined(__arm__)
+ /* align rx buffers to 2 bytes so that IP header is aligned */
+# define RX_ALIGN
+# define RxFD_ALIGNMENT __attribute__ ((aligned (2), packed))
+#else
+# define RxFD_ALIGNMENT
+#endif
+
/* Set the copy breakpoint for the copy-only-tiny-buffer Rx method.
Lower values use more memory, but are faster. */
-#if defined(__alpha__) || defined(__sparc__) || defined(__mips__) || \
- defined(__arm__)
-static int rx_copybreak = 1518;
-#else
static int rx_copybreak = 200;
-#endif
/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work = 20;
@@ -377,18 +383,18 @@
/* The Speedo3 Rx and Tx frame/buffer descriptors. */
struct descriptor { /* A generic descriptor. */
- s32 cmd_status; /* All command and status fields. */
+ volatile s32 cmd_status; /* All command and status fields. */
u32 link; /* struct descriptor * */
unsigned char params[0];
};
/* The Speedo3 Rx and Tx buffer descriptors. */
struct RxFD { /* Receive frame descriptor. */
- s32 status;
+ volatile s32 status;
u32 link; /* struct RxFD * */
u32 rx_buf_addr; /* void * */
u32 count;
-};
+} RxFD_ALIGNMENT;
/* Selected elements of the Tx/RxFD.status word. */ enum RxFD_bits {
@@ -523,7 +529,12 @@
static int eepro100_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent);
+
static void eepro100_remove_one (struct pci_dev *pdev);
+#ifdef CONFIG_PM
+static int eepro100_suspend (struct pci_dev *pdev, u32 state); +static int eepro100_resume (struct pci_dev *pdev); +#endif
static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len); static int mdio_read(long ioaddr, int phy_id, int location);
@@ -1229,6 +1240,9 @@
for (i = 0; i < RX_RING_SIZE; i++) {
struct sk_buff *skb;
skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
+#ifdef RX_ALIGN
+ skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
+#endif
sp->rx_skbuff[i] = skb;
if (skb = NULL)
break; /* OK. Just initially short of Rx bufs. */
@@ -1620,6 +1634,9 @@
struct sk_buff *skb;
/* Get a fresh skbuff to replace the consumed one. */ skb = dev_alloc_skb(PKT_BUF_SZ + sizeof(struct RxFD));
+#ifdef RX_ALIGN
+ skb_reserve(skb, 2); /* Align IP on 16 byte boundary */
+#endif
sp->rx_skbuff[entry] = skb;
if (skb = NULL) {
sp->rx_ringp[entry] = NULL;
@@ -2303,7 +2320,9 @@
name: "eepro100",
id_table: eepro100_pci_tbl,
probe: eepro100_init_one,
+# if defined(MODULE) || defined(CONFIG_HOTPLUG)
remove: __devexit_p(eepro100_remove_one),
+# endif
#ifdef CONFIG_PM
suspend: eepro100_suspend,
resume: eepro100_resume,
include/asm-ia64/acpi.h +65 -2
67 lines not on this page · raw message
include/asm-ia64/hardirq.h +73 -69
142 lines not on this page · raw message
include/asm-ia64/offsets.h deleted +0 -130
130 lines not on this page · raw message
include/asm-ia64/system.h +13 -28
41 lines not on this page · raw message
include/asm-ia64/tlb.h +199 -4
203 lines not on this page · raw message
kernel/printk.c +118 -5
123 lines not on this page · raw message
sound/oss/cs4281/cs4281m.c +33 -44
77 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Hi David,
I updated the boot-change patch for 2.5.30. Curious to say, the kernel with the patch worked fine on two way Bigsur, while the original kernel caused panic at booting. Why don't you take it into your tree? :-)
Regards,
Kimi
Quoted 9 lines · On Sat, 10 Aug 2002 01:58:14 -0700 David Mosberger <[email protected]>…
Below is a quick patch for 2.5.30. Warning: it has been tested only lightly. It worked for me on a Big Sur in UP mode. I think MP is broken at the moment. My focus was to try to get the AGP/DRM code into shape so we can have it merged into 2.5. The primary reason I tought it would be good to make this barely tested patch available is because 2.5.29 likes to eat filesystems on IDE disks (it ate the rootfs on one of my machines and subtly corrupted a couple of files on another machine...). With 2.5.30, I haven't seen any file corruption so far, but your mileage obviously may vary.
Signature · 1 line
Kimio Suganuma <[email protected]>
arch/ia64/kernel/acpi.c +2 -0
@@ -603,6 +603,8 @@ available_cpus = 1; /* We've got at least one of these, no? */ } smp_boot_data.cpu_count = total_cpus; + +smp_build_cpu_map ();#endif /* Make boot-up look pretty */ printk ("%d CPUs available, %d CPUs total\n" , available_cpus, total_cpus);
arch/ia64/kernel/smpboot.c +65 -83
213 lines not on this page · raw message
include/asm-ia64/smp.h +1 -0
@@ -128,6 +128,7 @@extern int __cpu_disable (void );extern void __cpu_die (unsigned int cpu);extern int __cpu_up (unsigned int cpu); +extern void __init smp_build_cpu_map (void );extern void __init init_smp_config (void );extern void smp_do_timer (struct pt_regs *regs);
Binary files linux-2.5.30-base/vmlinux.kimi.gz and linux-2.5.30-lhcs/vmlinux.kimi.gz differ
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kimio Suganuma
Kimio> Hi David, I updated the boot-change patch for 2.5.30. Kimio> Curious to say, the kernel with the patch worked fine on two Kimio> way Bigsur, while the original kernel caused panic at Kimio> booting.
Thanks for the patch, I applied it now.
Kimio> Why don't you take it into your tree? :-)
It's simply a matter of finding time. Doing the DRM update was a big effort for me because I'm not all that familiar with AGP, GART, etc., yet it's important to clean it up so we can get it into the mainline of the kernel (otherwise, it will keep eating small bits of my time each time a new kernel is released). Of course, having 2.5.29 corrupt files on some of my IDE disks didn't help either. Anyhow, I think we're very close now to having DRM out of the way (only one open issue is left over).
--david