* Re: Linux 2.4.21-pre3: some compile fixes I needed
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
@ 2003-01-07 10:50 ` Eyal Lebedinsky
2003-01-07 12:17 ` Linux 2.4.21-pre3 Dave Jones
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Eyal Lebedinsky @ 2003-01-07 10:50 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
linux/drivers/char/Makefile
===========================
Well, here the build fails with a suggestion that I fix the
Makefile. This trivial change allows the build to continue.
drivers/ieee1394/sbp2.c
=======================
It stil fails as before. The attached fix is a blind hack to
get it to compile rather than an educated fix.
linux/drivers/usb/hcd/ehci-hcd.c
================================
A problem for older gcc.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
[-- Attachment #2: 2.4.21-pre3-char.patch --]
[-- Type: text/plain, Size: 438 bytes --]
--- linux/drivers/char/Makefile.orig Tue Jan 7 20:13:30 2003
+++ linux/drivers/char/Makefile Tue Jan 7 20:17:16 2003
@@ -24,7 +24,7 @@
export-objs := busmouse.o console.o keyboard.o sysrq.o \
misc.o pty.o random.o selection.o serial.o \
sonypi.o tty_io.o tty_ioctl.o generic_serial.o \
- au1000_gpio.o hp_psaux.o nvram.o
+ au1000_gpio.o hp_psaux.o nvram.o scx200.o
mod-subdirs := joystick ftape drm drm-4.0 pcmcia
[-- Attachment #3: 2.4.21-pre3-sbp2.patch --]
[-- Type: text/plain, Size: 830 bytes --]
--- linux/drivers/ieee1394/sbp2.c.orig Thu Dec 19 10:22:33 2002
+++ linux/drivers/ieee1394/sbp2.c Thu Dec 19 10:23:17 2002
@@ -1511,7 +1511,7 @@
* physical dma in hardware). Mostly just here for debugging...
*/
static int sbp2_handle_physdma_write(struct hpsb_host *host, int nodeid, int destid, quadlet_t *data,
- u64 addr, unsigned int length)
+ u64 addr, unsigned int length, u16 flags)
{
/*
@@ -1527,7 +1527,7 @@
* physical dma in hardware). Mostly just here for debugging...
*/
static int sbp2_handle_physdma_read(struct hpsb_host *host, int nodeid, quadlet_t *data,
- u64 addr, unsigned int length)
+ u64 addr, unsigned int length, u16 flags)
{
/*
[-- Attachment #4: 2.4.21-pre3-ehci-dbg.patch --]
[-- Type: text/plain, Size: 703 bytes --]
--- linux/drivers/usb/hcd/ehci-dbg.c.orig Tue Jan 7 20:55:20 2003
+++ linux/drivers/usb/hcd/ehci-dbg.c Tue Jan 7 21:00:05 2003
@@ -39,6 +39,7 @@
#define ehci_dbg(ehci, fmt, args...) do { } while (0)
#endif
+#if 0
#define ehci_err(ehci, fmt, args...) \
printk(KERN_ERR "%s %s: " fmt, hcd_name, \
(ehci)->hcd.pdev->slot_name, ## args )
@@ -48,6 +49,14 @@
#define ehci_warn(ehci, fmt, args...) \
printk(KERN_WARNING "%s %s: " fmt, hcd_name, \
(ehci)->hcd.pdev->slot_name, ## args )
+#else
+#define ehci_err(ehci, fmt, args...) \
+ do { } while (0)
+#define ehci_info(ehci, fmt, args...) \
+ do { } while (0)
+#define ehci_warn(ehci, fmt, args...) \
+ do { } while (0)
+#endif
#endif
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Linux 2.4.21-pre3
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
2003-01-07 10:50 ` Linux 2.4.21-pre3: some compile fixes I needed Eyal Lebedinsky
@ 2003-01-07 12:17 ` Dave Jones
2003-01-07 12:52 ` DervishD
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Dave Jones @ 2003-01-07 12:17 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
On Mon, Jan 06, 2003 at 07:32:37PM -0200, Marcelo Tossati wrote:
> <bero@arklinux.org>:
> o AGP support for VIA P4X333 boards
Bogus. Uses incorrect naming, as the P4X333 is a chipset, not
a northbridge. The P4X400 also matches this ID for eg.
Also needes s/Via/VIA/
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Linux 2.4.21-pre3
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
2003-01-07 10:50 ` Linux 2.4.21-pre3: some compile fixes I needed Eyal Lebedinsky
2003-01-07 12:17 ` Linux 2.4.21-pre3 Dave Jones
@ 2003-01-07 12:52 ` DervishD
2003-01-07 17:01 ` Adrian Bunk
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: DervishD @ 2003-01-07 12:52 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
Hi Marcelo :))
Did you get my *new* patch to do_mmap_pgoff with the corrections
that David S. Miller did?
If you want me to resend for next pre, just tell.
Raúl
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Linux 2.4.21-pre3
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
` (2 preceding siblings ...)
2003-01-07 12:52 ` DervishD
@ 2003-01-07 17:01 ` Adrian Bunk
2003-01-11 15:29 ` Christoph Hellwig
2003-01-11 22:15 ` Helge Deller
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Bunk @ 2003-01-07 17:01 UTC (permalink / raw)
To: Marcelo Tosatti, Jean Tourrilhes; +Cc: lkml
On Mon, Jan 06, 2003 at 07:32:37PM -0200, Marcelo Tosatti wrote:
> So here goes -pre3...
>
>
> Summary of changes from v2.4.21-pre2 to v2.4.21-pre3
> ============================================
>...
> Jean Tourrilhes <jt@bougret.hpl.hp.com>:
>...
> o donauboe IrDA driver
>...
Please apply the patch below (stolen from 2.5) that does the following:
* C99 initializers
* fix public symbol name conflict (compile error if both donauboe and
toshoboe are compiled statically
into the kernel)
cu
Adrian
--- 1.1/drivers/net/irda/donauboe.c Fri Oct 11 10:26:35 2002
+++ 1.2/drivers/net/irda/donauboe.c Thu Nov 7 12:57:09 2002
@@ -1825,26 +1825,26 @@
return 0;
}
-static struct pci_driver toshoboe_pci_driver = {
- name : "toshoboe",
- id_table : toshoboe_pci_tbl,
- probe : toshoboe_open,
- remove : toshoboe_close,
- suspend : toshoboe_gotosleep,
- resume : toshoboe_wakeup
+static struct pci_driver donauboe_pci_driver = {
+ .name = "donauboe",
+ .id_table = toshoboe_pci_tbl,
+ .probe = toshoboe_open,
+ .remove = toshoboe_close,
+ .suspend = toshoboe_gotosleep,
+ .resume = toshoboe_wakeup
};
-int __init
-toshoboe_init (void)
+static int __init
+donauboe_init (void)
{
- return pci_module_init(&toshoboe_pci_driver);
+ return pci_module_init(&donauboe_pci_driver);
}
-STATIC void __exit
-toshoboe_cleanup (void)
+static void __exit
+donauboe_cleanup (void)
{
- pci_unregister_driver(&toshoboe_pci_driver);
+ pci_unregister_driver(&donauboe_pci_driver);
}
-module_init(toshoboe_init);
-module_exit(toshoboe_cleanup);
+module_init(donauboe_init);
+module_exit(donauboe_cleanup);
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Linux 2.4.21-pre3
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
` (3 preceding siblings ...)
2003-01-07 17:01 ` Adrian Bunk
@ 2003-01-11 15:29 ` Christoph Hellwig
2003-01-11 22:15 ` Helge Deller
5 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2003-01-11 15:29 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
> o bring APM up to date
This doesn't compile on SMP. To get Alan's update working you need rml's patch
for set_cpus_allowed() in 2.4, that I try to feed you for two month now..
diff -urN linux-2.4.20-pre8/include/linux/sched.h linux/include/linux/sched.h
--- linux-2.4.20-pre8/include/linux/sched.h Mon Sep 30 17:41:22 2002
+++ linux/include/linux/sched.h Tue Oct 1 18:35:28 2002
@@ -163,6 +164,12 @@
extern int start_context_thread(void);
extern int current_is_keventd(void);
+#if CONFIG_SMP
+extern void set_cpus_allowed(struct task_struct *p, unsigned long new_mask);
+#else
+# define set_cpus_allowed(p, new_mask) do { } while (0)
+#endif
+
/*
* The default fd array needs to be at least BITS_PER_LONG,
* as this is the granularity returned by copy_fdset().
diff -urN linux-2.4.20-pre8/kernel/ksyms.c linux/kernel/ksyms.c
--- linux-2.4.20-pre8/kernel/ksyms.c Mon Sep 30 17:41:22 2002
+++ linux/kernel/ksyms.c Tue Oct 1 18:34:41 2002
@@ -451,6 +451,9 @@
EXPORT_SYMBOL(interruptible_sleep_on_timeout);
EXPORT_SYMBOL(schedule);
EXPORT_SYMBOL(schedule_timeout);
+#if CONFIG_SMP
+EXPORT_SYMBOL(set_cpus_allowed);
+#endif
EXPORT_SYMBOL(yield);
EXPORT_SYMBOL(__cond_resched);
EXPORT_SYMBOL(jiffies);
diff -urN linux-2.4.20-pre8/kernel/sched.c linux/kernel/sched.c
--- linux-2.4.20-pre8/kernel/sched.c Mon Sep 30 17:41:22 2002
+++ linux/kernel/sched.c Tue Oct 1 18:54:49 2002
@@ -850,6 +850,44 @@
void scheduling_functions_end_here(void) { }
+#if CONFIG_SMP
+/**
+ * set_cpus_allowed() - change a given task's processor affinity
+ * @p: task to bind
+ * @new_mask: bitmask of allowed processors
+ *
+ * Upon return, the task is running on a legal processor. Note the caller
+ * must have a valid reference to the task: it must not exit() prematurely.
+ * This call can sleep; do not hold locks on call.
+ */
+void set_cpus_allowed(struct task_struct *p, unsigned long new_mask)
+{
+ new_mask &= cpu_online_map;
+ BUG_ON(!new_mask);
+
+ p->cpus_allowed = new_mask;
+
+ /*
+ * If the task is on a no-longer-allowed processor, we need to move
+ * it. If the task is not current, then set need_resched and send
+ * its processor an IPI to reschedule.
+ */
+ if (!(p->cpus_runnable & p->cpus_allowed)) {
+ if (p != current) {
+ p->need_resched = 1;
+ smp_send_reschedule(p->processor);
+ }
+ /*
+ * Wait until we are on a legal processor. If the task is
+ * current, then we should be on a legal processor the next
+ * time we reschedule. Otherwise, we need to wait for the IPI.
+ */
+ while (!(p->cpus_runnable & p->cpus_allowed))
+ schedule();
+ }
+}
+#endif /* CONFIG_SMP */
+
#ifndef __alpha__
/*
diff -urN linux-2.4.20-pre8/kernel/softirq.c linux/kernel/softirq.c
--- linux-2.4.20-pre8/kernel/softirq.c Mon Sep 30 17:41:22 2002
+++ linux/kernel/softirq.c Tue Oct 1 18:53:01 2002
@@ -368,9 +368,7 @@
sigfillset(¤t->blocked);
/* Migrate to the right CPU */
- current->cpus_allowed = 1UL << cpu;
- while (smp_processor_id() != cpu)
- schedule();
+ set_cpus_allowed(current, 1UL << cpu);
sprintf(current->comm, "ksoftirqd_CPU%d", bind_cpu);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Linux 2.4.21-pre3
2003-01-06 21:32 Linux 2.4.21-pre3 Marcelo Tosatti
` (4 preceding siblings ...)
2003-01-11 15:29 ` Christoph Hellwig
@ 2003-01-11 22:15 ` Helge Deller
2003-01-12 0:11 ` [PATCH] non-G450/G550 build of matroxfb in 2.4.21-pre3 (was Re: Linux 2.4.21-pre3) Petr Vandrovec
5 siblings, 1 reply; 8+ messages in thread
From: Helge Deller @ 2003-01-11 22:15 UTC (permalink / raw)
To: Marcelo Tosatti, lkml
On Monday 06 January 2003 22:32, Marcelo Tosatti wrote:
> So here goes -pre3...
depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3/kernel/drivers/video/matrox/matroxfb_DAC1064.o
depmod: g450_mnp2f
depmod: matroxfb_g450_setpll_cond
depmod: matroxfb_g450_setclk
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH] non-G450/G550 build of matroxfb in 2.4.21-pre3 (was Re: Linux 2.4.21-pre3)
2003-01-11 22:15 ` Helge Deller
@ 2003-01-12 0:11 ` Petr Vandrovec
0 siblings, 0 replies; 8+ messages in thread
From: Petr Vandrovec @ 2003-01-12 0:11 UTC (permalink / raw)
To: marcelo; +Cc: deller, lkml, alan
On Sat, Jan 11, 2003 at 11:15:11PM +0100, Helge Deller wrote:
> On Monday 06 January 2003 22:32, Marcelo Tosatti wrote:
> > So here goes -pre3...
>
> depmod: *** Unresolved symbols in /lib/modules/2.4.21-pre3/kernel/drivers/video/matrox/matroxfb_DAC1064.o
> depmod: g450_mnp2f
> depmod: matroxfb_g450_setpll_cond
> depmod: matroxfb_g450_setclk
Hi Marcelo,
please apply patch below.
Use g450/g550 related code only if we are building driver supporting
g450/g550. Otherwise we end up with couple of undefined symbols
related to the G450 PLL.
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz
diff -urdN linux/drivers/video/matrox/matroxfb_DAC1064.c linux/drivers/video/matrox/matroxfb_DAC1064.c
--- linux/drivers/video/matrox/matroxfb_DAC1064.c 2003-01-12 00:43:23.000000000 +0100
+++ linux/drivers/video/matrox/matroxfb_DAC1064.c 2003-01-12 00:55:38.000000000 +0100
@@ -276,6 +276,7 @@
hw->MXoptionReg = mx;
}
+#ifdef CONFIG_FB_MATROX_G450
static void g450_set_plls(WPMINFO2) {
u_int32_t c2_ctl;
unsigned int pxc;
@@ -365,6 +366,7 @@
}
}
}
+#endif
void DAC1064_global_init(WPMINFO2) {
struct matrox_hw_state* hw = &ACCESS_FBINFO(hw);
@@ -372,6 +374,7 @@
hw->DACreg[POS1064_XMISCCTRL] &= M1064_XMISCCTRL_DAC_WIDTHMASK;
hw->DACreg[POS1064_XMISCCTRL] |= M1064_XMISCCTRL_LUT_EN;
hw->DACreg[POS1064_XPIXCLKCTRL] = M1064_XPIXCLKCTRL_PLL_UP | M1064_XPIXCLKCTRL_EN | M1064_XPIXCLKCTRL_SRC_PLL;
+#ifdef CONFIG_FB_MATROX_G450
if (ACCESS_FBINFO(devflags.g450dac)) {
hw->DACreg[POS1064_XPWRCTRL] = 0x1F; /* powerup everything */
hw->DACreg[POS1064_XOUTPUTCONN] = 0x00; /* disable outputs */
@@ -420,7 +423,9 @@
}
/* Now set timming related variables... */
g450_set_plls(PMINFO2);
- } else {
+ } else
+#endif
+ {
if (ACCESS_FBINFO(outputs[1]).src == MATROXFB_SRC_CRTC1) {
hw->DACreg[POS1064_XPIXCLKCTRL] = M1064_XPIXCLKCTRL_PLL_UP | M1064_XPIXCLKCTRL_EN | M1064_XPIXCLKCTRL_SRC_EXT;
hw->DACreg[POS1064_XMISCCTRL] |= GX00_XMISCCTRL_MFC_MAFC | G400_XMISCCTRL_VDO_MAFC12;
@@ -622,6 +627,7 @@
.compute = m1064_compute,
};
+#ifdef CONFIG_FB_MATROX_G450
static int g450_compute(void* out, struct my_timming* m) {
#define minfo ((struct matrox_fb_info*)out)
if (m->mnp < 0) {
@@ -639,6 +645,7 @@
.name = "Primary output",
.compute = g450_compute,
};
+#endif
#endif /* NEED_DAC1064 */
@@ -821,6 +828,7 @@
#endif
#ifdef CONFIG_FB_MATROX_G100
+#ifdef CONFIG_FB_MATROX_G450
static void g450_mclk_init(WPMINFO2) {
/* switch all clocks to PCI source */
pci_write_config_dword(ACCESS_FBINFO(pcidev), PCI_OPTION_REG, ACCESS_FBINFO(hw).MXoptionReg | 4);
@@ -938,6 +946,10 @@
return;
}
+#else
+static inline void g450_preinit(WPMINFO2) {
+}
+#endif
static int MGAG100_preinit(WPMINFO2) {
static const int vxres_g100[] = { 512, 640, 768, 800, 832, 960,
@@ -975,9 +987,12 @@
ACCESS_FBINFO(capable.plnwt) = ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGAG100
? ACCESS_FBINFO(devflags.sgram) : 1;
+#ifdef CONFIG_FB_MATROX_G450
if (ACCESS_FBINFO(devflags.g450dac)) {
ACCESS_FBINFO(outputs[0]).output = &g450out;
- } else {
+ } else
+#endif
+ {
ACCESS_FBINFO(outputs[0]).output = &m1064;
}
ACCESS_FBINFO(outputs[0]).src = MATROXFB_SRC_CRTC1;
^ permalink raw reply [flat|nested] 8+ messages in thread