* Re: PowerBook5,8 - TrackPad update
From: Michael Hanselmann @ 2005-12-09 23:33 UTC (permalink / raw)
To: Andy Botting
Cc: Stelian Pop, Parag Warudkar, linux-kernel, linuxppc-dev,
debian-powerpc, johannes
In-Reply-To: <1133840316.10415.4.camel@localhost>
> I managed to get this working on my 15" PowerBook, but the USB id for my
> Keyboard/Trackpad is 0x0214 as opposed to the 0x0215 you have in the
> patch. Are you going to add 0x0214 (and any others?) to this patch
> before sending it off?
This patch adds support for 0x0214 and 0x0216 in addition to 0x0215. I
found those IDs in the Info.plist of Mac OS X (see comment in the patch).
It applies cleanly to 2.6.15-rc5 (vanilla).
---
--- linux-2.6.15-rc5/drivers/usb/input/appletouch.c.orig 2005-12-04 20:25:21.000000000 +0100
+++ linux-2.6.15-rc5/drivers/usb/input/appletouch.c 2005-12-09 21:02:55.000000000 +0100
@@ -6,9 +6,19 @@
* Copyright (C) 2005 Stelian Pop (stelian@popies.net)
* Copyright (C) 2005 Frank Arnold (frank@scirocco-5v-turbo.de)
* Copyright (C) 2005 Peter Osterlund (petero2@telia.com)
+ * Copyright (C) 2005 Parag Warudkar (parag.warudkar@gmail.com)
+ * Copyright (C) 2005 Michael Hanselmann (linux-kernel@hansmi.ch)
*
* Thanks to Alex Harper <basilisk@foobox.net> for his inputs.
*
+ * Nov 2005 - Parag Warudkar
+ * o Added ability to export data via relayfs
+ *
+ * Nov 2005 - Michael Hanselmann
+ * o Compile relayfs support only if enabled in the kernel
+ * o Enable relayfs only if requested by the user
+ * o Added support for new October 2005 PowerBooks (Geyser 2)
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -35,9 +45,18 @@
#include <linux/input.h>
#include <linux/usb_input.h>
+#if defined(CONFIG_RELAYFS_FS) || defined(CONFIG_RELAYFS_FS_MODULE)
+#include <linux/relayfs_fs.h>
+#endif
+
/* Apple has powerbooks which have the keyboard with different Product IDs */
#define APPLE_VENDOR_ID 0x05AC
+/* These names come from Info.plist in AppleUSBTrackpad.kext */
+#define GEYSER_ANSI_PRODUCT_ID 0x0214
+#define GEYSER_ISO_PRODUCT_ID 0x0215
+#define GEYSER_JIS_PRODUCT_ID 0x0216
+
#define ATP_DEVICE(prod) \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
USB_DEVICE_ID_MATCH_INT_CLASS | \
@@ -53,12 +72,21 @@
{ ATP_DEVICE(0x020F) },
{ ATP_DEVICE(0x030A) },
{ ATP_DEVICE(0x030B) },
- { } /* Terminating entry */
+
+ /* PowerBooks Oct 2005 */
+ { ATP_DEVICE(GEYSER_ANSI_PRODUCT_ID) },
+ { ATP_DEVICE(GEYSER_ISO_PRODUCT_ID) },
+ { ATP_DEVICE(GEYSER_JIS_PRODUCT_ID) },
+
+ /* Terminating entry */
+ { }
};
MODULE_DEVICE_TABLE (usb, atp_table);
-/* size of a USB urb transfer */
-#define ATP_DATASIZE 81
+#if defined(CONFIG_RELAYFS_FS) || defined(CONFIG_RELAYFS_FS_MODULE)
+struct rchan* rch = NULL;
+struct rchan_callbacks* rcb = NULL;
+#endif
/*
* number of sensors. Note that only 16 instead of 26 X (horizontal)
@@ -73,6 +101,7 @@
/* maximum pressure this driver will report */
#define ATP_PRESSURE 300
+
/*
* multiplication factor for the X and Y coordinates.
* We try to keep the touchpad aspect ratio while still doing only simple
@@ -108,6 +137,8 @@
signed char xy_old[ATP_XSENSORS + ATP_YSENSORS];
/* accumulated sensors */
int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
+ int overflowwarn; /* overflow warning printed? */
+ int datalen; /* size of an USB urb transfer */
};
#define dbg_dump(msg, tab) \
@@ -124,7 +155,7 @@
if (debug) printk(format, ##a); \
} while (0)
-MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold");
+MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Parag Warudkar, Michael Hanselmann");
MODULE_DESCRIPTION("Apple PowerBooks USB touchpad driver");
MODULE_LICENSE("GPL");
@@ -132,6 +163,20 @@
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activate debugging output");
+static int relayfs = 0;
+module_param(relayfs, int, 0644);
+MODULE_PARM_DESC(relayfs, "Activate relayfs support");
+
+/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
+static inline int atp_is_geyser_2(struct atp *dev)
+{
+ int16_t productId = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+ return (productId == GEYSER_ANSI_PRODUCT_ID) ||
+ (productId == GEYSER_ISO_PRODUCT_ID) ||
+ (productId == GEYSER_JIS_PRODUCT_ID);
+}
+
static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
int *z, int *fingers)
{
@@ -175,6 +220,13 @@
case 0:
/* success */
break;
+ case -EOVERFLOW:
+ if(!dev->overflowwarn) {
+ printk("appletouch: OVERFLOW with data "
+ "length %d, actual length is %d\n",
+ dev->datalen, dev->urb->actual_length);
+ dev->overflowwarn = 1;
+ }
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
@@ -189,23 +241,83 @@
}
/* drop incomplete datasets */
- if (dev->urb->actual_length != ATP_DATASIZE) {
+ if (dev->urb->actual_length != dev->datalen) {
dprintk("appletouch: incomplete data package.\n");
goto exit;
}
+#if defined(CONFIG_RELAYFS_FS) || defined(CONFIG_RELAYFS_FS_MODULE)
+ if (relayfs && dev->data) {
+ relay_write(rch, dev->data, dev->urb->actual_length);
+ }
+#endif
+
/* reorder the sensors values */
- for (i = 0; i < 8; i++) {
+ if (atp_is_geyser_2(dev)) {
+ memset(dev->xy_cur, 0, sizeof(dev->xy_cur));
+
+ /*
+ * The values are laid out like this:
+ * Y1, Y2, -, Y3, Y4, -, ...
+ * '-' is an unused value.
+ *
+ * The logic in a loop:
+ * for (i = 0, j = 19; i < 20; i += 2, j += 3) {
+ * dev->xy_cur[i] = dev->data[j];
+ * dev->xy_cur[i + 1] = dev->data[j + 1];
+ * }
+ *
+ * This code is called about 100 times per second for each
+ * interrupt from the touchpad. Therefore it should be as fast
+ * as possible. Writing the following code in a loop would take
+ * about twice the time to run if not more.
+ */
+
/* X values */
- dev->xy_cur[i ] = dev->data[5 * i + 2];
- dev->xy_cur[i + 8] = dev->data[5 * i + 4];
- dev->xy_cur[i + 16] = dev->data[5 * i + 42];
- if (i < 2)
- dev->xy_cur[i + 24] = dev->data[5 * i + 44];
+ dev->xy_cur[0] = dev->data[19];
+ dev->xy_cur[1] = dev->data[20];
+ dev->xy_cur[2] = dev->data[22];
+ dev->xy_cur[3] = dev->data[23];
+ dev->xy_cur[4] = dev->data[25];
+ dev->xy_cur[5] = dev->data[26];
+ dev->xy_cur[6] = dev->data[28];
+ dev->xy_cur[7] = dev->data[29];
+ dev->xy_cur[8] = dev->data[31];
+ dev->xy_cur[9] = dev->data[32];
+ dev->xy_cur[10] = dev->data[34];
+ dev->xy_cur[11] = dev->data[35];
+ dev->xy_cur[12] = dev->data[37];
+ dev->xy_cur[13] = dev->data[38];
+ dev->xy_cur[14] = dev->data[40];
+ dev->xy_cur[15] = dev->data[41];
+ dev->xy_cur[16] = dev->data[43];
+ dev->xy_cur[17] = dev->data[44];
+ dev->xy_cur[18] = dev->data[46];
+ dev->xy_cur[19] = dev->data[47];
/* Y values */
- dev->xy_cur[i + 26] = dev->data[5 * i + 1];
- dev->xy_cur[i + 34] = dev->data[5 * i + 3];
+ dev->xy_cur[ATP_XSENSORS + 0] = dev->data[1];
+ dev->xy_cur[ATP_XSENSORS + 1] = dev->data[2];
+ dev->xy_cur[ATP_XSENSORS + 2] = dev->data[4];
+ dev->xy_cur[ATP_XSENSORS + 3] = dev->data[5];
+ dev->xy_cur[ATP_XSENSORS + 4] = dev->data[7];
+ dev->xy_cur[ATP_XSENSORS + 5] = dev->data[8];
+ dev->xy_cur[ATP_XSENSORS + 6] = dev->data[10];
+ dev->xy_cur[ATP_XSENSORS + 7] = dev->data[11];
+ dev->xy_cur[ATP_XSENSORS + 8] = dev->data[13];
+ } else {
+ for (i = 0; i < 8; i++) {
+ /* X values */
+ dev->xy_cur[i ] = dev->data[5 * i + 2];
+ dev->xy_cur[i + 8] = dev->data[5 * i + 4];
+ dev->xy_cur[i + 16] = dev->data[5 * i + 42];
+ if (i < 2)
+ dev->xy_cur[i + 24] = dev->data[5 * i + 44];
+
+ /* Y values */
+ dev->xy_cur[i + 26] = dev->data[5 * i + 1];
+ dev->xy_cur[i + 34] = dev->data[5 * i + 3];
+ }
}
dbg_dump("sample", dev->xy_cur);
@@ -216,16 +328,23 @@
dev->x_old = dev->y_old = -1;
memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
- /* 17" Powerbooks have 10 extra X sensors */
- for (i = 16; i < ATP_XSENSORS; i++)
- if (dev->xy_cur[i]) {
- printk("appletouch: 17\" model detected.\n");
+ /* 17" Powerbooks have extra X sensors */
+ for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
+ if (!dev->xy_cur[i]) continue;
+
+ printk("appletouch: 17\" model detected.\n");
+ if(atp_is_geyser_2(dev))
+ input_set_abs_params(dev->input, ABS_X, 0,
+ (20 - 1) *
+ ATP_XFACT - 1,
+ ATP_FUZZ, 0);
+ else
input_set_abs_params(dev->input, ABS_X, 0,
(ATP_XSENSORS - 1) *
ATP_XFACT - 1,
ATP_FUZZ, 0);
- break;
- }
+ break;
+ }
goto exit;
}
@@ -282,7 +401,8 @@
memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
}
- input_report_key(dev->input, BTN_LEFT, !!dev->data[80]);
+ input_report_key(dev->input, BTN_LEFT,
+ !!dev->data[dev->datalen - 1]);
input_sync(dev->input);
@@ -323,7 +443,6 @@
int int_in_endpointAddr = 0;
int i, retval = -ENOMEM;
-
/* set up the endpoint information */
/* use only the first interrupt-in endpoint */
iface_desc = iface->cur_altsetting;
@@ -353,6 +472,8 @@
dev->udev = udev;
dev->input = input_dev;
+ dev->overflowwarn = 0;
+ dev->datalen = (atp_is_geyser_2(dev)?64:81);
dev->urb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->urb) {
@@ -360,7 +481,7 @@
goto err_free_devs;
}
- dev->data = usb_buffer_alloc(dev->udev, ATP_DATASIZE, GFP_KERNEL,
+ dev->data = usb_buffer_alloc(dev->udev, dev->datalen, GFP_KERNEL,
&dev->urb->transfer_dma);
if (!dev->data) {
retval = -ENOMEM;
@@ -369,7 +490,7 @@
usb_fill_int_urb(dev->urb, udev,
usb_rcvintpipe(udev, int_in_endpointAddr),
- dev->data, ATP_DATASIZE, atp_complete, dev, 1);
+ dev->data, dev->datalen, atp_complete, dev, 1);
usb_make_path(udev, dev->phys, sizeof(dev->phys));
strlcat(dev->phys, "/input0", sizeof(dev->phys));
@@ -385,14 +506,25 @@
set_bit(EV_ABS, input_dev->evbit);
- /*
- * 12" and 15" Powerbooks only have 16 x sensors,
- * 17" models are detected later.
- */
- input_set_abs_params(input_dev, ABS_X, 0,
- (16 - 1) * ATP_XFACT - 1, ATP_FUZZ, 0);
- input_set_abs_params(input_dev, ABS_Y, 0,
- (ATP_YSENSORS - 1) * ATP_YFACT - 1, ATP_FUZZ, 0);
+ if (atp_is_geyser_2(dev)) {
+ /*
+ * Oct 2005 15" PowerBooks have 15 X sensors, 17" are detected
+ * later.
+ */
+ input_set_abs_params(input_dev, ABS_X, 0,
+ ((15 - 1) * ATP_XFACT) - 1, ATP_FUZZ, 0);
+ input_set_abs_params(input_dev, ABS_Y, 0,
+ ((9 - 1) * ATP_YFACT) - 1, ATP_FUZZ, 0);
+ } else {
+ /*
+ * 12" and 15" Powerbooks only have 16 x sensors,
+ * 17" models are detected later.
+ */
+ input_set_abs_params(input_dev, ABS_X, 0,
+ (16 - 1) * ATP_XFACT - 1, ATP_FUZZ, 0);
+ input_set_abs_params(input_dev, ABS_Y, 0,
+ (ATP_YSENSORS - 1) * ATP_YFACT - 1, ATP_FUZZ, 0);
+ }
input_set_abs_params(input_dev, ABS_PRESSURE, 0, ATP_PRESSURE, 0, 0);
set_bit(EV_KEY, input_dev->evbit);
@@ -427,7 +559,7 @@
usb_kill_urb(dev->urb);
input_unregister_device(dev->input);
usb_free_urb(dev->urb);
- usb_buffer_free(dev->udev, ATP_DATASIZE,
+ usb_buffer_free(dev->udev, dev->datalen,
dev->data, dev->urb->transfer_dma);
kfree(dev);
}
@@ -463,11 +595,30 @@
static int __init atp_init(void)
{
+#if defined(CONFIG_RELAYFS_FS) || defined(CONFIG_RELAYFS_FS_MODULE)
+ if (relayfs) {
+ rcb = kmalloc(sizeof(struct rchan_callbacks), GFP_KERNEL);
+ rcb->subbuf_start = NULL;
+ rcb->buf_mapped = NULL;
+ rcb->buf_unmapped = NULL;
+ rch = relay_open("atpdata", NULL, 256, 256, NULL);
+ if (!rch) return -ENOMEM;
+ printk("appletouch: Relayfs enabled.\n");
+ } else {
+ printk("appletouch: Relayfs disabled.\n");
+ }
+#endif
return usb_register(&atp_driver);
}
static void __exit atp_exit(void)
{
+#if defined(CONFIG_RELAYFS_FS) || defined(CONFIG_RELAYFS_FS_MODULE)
+ if (relayfs) {
+ relay_close(rch);
+ kfree(rcb);
+ }
+#endif
usb_deregister(&atp_driver);
}
^ permalink raw reply
* Re: [PATCH] generate COFF zImage in arch/powerpc/boot
From: Olaf Hering @ 2005-12-10 18:31 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17284.61088.219693.162392@cargo.ozlabs.ibm.com>
On Thu, Nov 24, Paul Mackeras wrote:
> Olaf Hering writes:
>
> > It just died while uncompressing vmlinux. Some unaligned load.
> > So we either need a very simple byte by byte memcpy, or my version below.
>
> This should achieve the same effect and is quite a bit simpler. Your
> version looks a bit strange - it copies 1-3 bytes to align the source
> pointer, then copies 1-3 bytes to align the destination pointer, then
> if the source pointer isn't aligned it goes back and tries again... :)
My version worked better:
0 > .registers
Client's Fix Pt Regs:
00 00000000 003FFDE0 00000000 0115F890 0112FFF5 0000461D 0116007C FAAD15E5
08 CD12EF34 0000461E 00538042 01167890 0115DBA8 DEADBEEF DEADBEEF DEADBEEF
10 DEADBEEF DEADBEEF DEADBEEF DEADBEEF 00000006 00000000 0002BA4C 0115F890
18 0000461D 01133E26 00000000 00000000 003FFE70 0115C16C 0100F991 0000461D
Special Regs:
%IV: 00000600 %SRR0: 01000EAC %SRR1: 00003070 %MQ: 00000000
%CR: 39000035 %LR: 010034CC %CTR: 000007C5 %XER: E000BE6F
%DAR: 0112FFFD %DSISR: 00004104 %SDR1: 004E0000
> diff -urN powerpc/arch/powerpc/boot/string.S merge-hack/arch/powerpc/boot/string.S
> --- powerpc/arch/powerpc/boot/string.S 2005-11-16 15:55:17.000000000 +1100
> +++ merge-hack/arch/powerpc/boot/string.S 2005-11-24 09:18:47.000000000 +1100
> @@ -107,7 +107,7 @@
> rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */
> addi r6,r3,-4
> addi r4,r4,-4
> - beq 2f /* if less than 8 bytes to do */
> + beq 3f /* if less than 8 bytes to do */
> andi. r0,r6,3 /* get dest word aligned */
r4 is still unaligned at this point,
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply
* ARCH=powerpc doesnt boot on 7200
From: Olaf Hering @ 2005-12-10 21:36 UTC (permalink / raw)
To: linuxppc-dev
My 7200 doesnt boot if the kernel runs at 32MB. It dies somewhere after turn_on_mmu().
It boots ok if it runs at 7MB. 2.6.14 and earlier booted ok with 32MB.
Any idea how to fix this? What does ARCH=powerpc different in this regard?
0 > boot file: 1.1.1.3,coffloading XCOFF
tsize=4E08 dsize=1547BC bsize=BC80 entry=500000
SECTIONS:
.text 00500000 00500000 00004E08 000000FC
.data 00505000 00505000 001547BC 00004F04
.bss 0065A000 0065A000 0000BC80 00000000
.note.GN 00000000 00000000 00000000 00000000
loading .text, done..
loading .data, done..
clearing .bss, done..
zImage starting: loaded at 0x00500000 (sp: 0x003fff00)
Allocating 0x4b4660 bytes for kernel ...
OF version = 'Open Firmware, 1.0.5'
old OF detected
gunzipping (0x700000 <- 0x505c44:0x6597bb)...done 0x29d618 bytes
entering kernel at 0x00710000(deadbeef/deadbeef/ff8099b8)
OF stdout device is: /bandit@F2000000/gc@10/escc@13000/ch-a@13020
command line:
root_addr_cells: 00000001
root_size_cells: 00000001
scanning memory:
node /memory@0 :
00000000 04800000
memory layout at init:
memory_limit : 00000000 (16 MB aligned)
alloc_bottom : 00bb9000
alloc_top : 04800000
alloc_top_hi : 04800000
rmo_top : 04800000
ram_top : 04800000
Looking for displays
found display : /bandit@F2000000/IMS,tt128mb8@F, opening ... done
found display : /platinum@F8000000, opening ... failed
copying OF device tree ...
starting device tree allocs at 00bb9000
alloc_up(00100000, 00001000)
trying: 0x00bb9000
-> 00bb9000
alloc_bottom : 00bb9000
alloc_top : 04800000
alloc_top_hi : 04800000
rmo_top : 04800000
ram_top : 04800000
Building dt strings...
Building dt structure...
reserved memory map:
00bb9000 - 00010000
Device tree strings 0x00bba000 -> 0x00bba4bf
Device tree struct 0x00bbb000 -> 0x00bc9000
Calling quiesce ...
returning from prom_init
->dt_header_start=0x00bb9000
-> early_init_devtree()
...
--- /dev/shm/k_good.txt 2005-12-10 22:03:33.221815504 +0100
+++ /dev/shm/k_bad.txt 2005-12-10 22:04:12.027916080 +0100
@@ -7,7 +7,7 @@
00000000 04800000
memory layout at init:
memory_limit : 00000000 (16 MB aligned)
- alloc_bottom : 00bb9000
+ alloc_bottom : 024b9000
alloc_top : 04800000
alloc_top_hi : 04800000
rmo_top : 04800000
@@ -16,11 +16,14 @@
found display : /bandit@F2000000/IMS,tt128mb8@F, opening ... done
found display : /platinum@F8000000, opening ... failed
copying OF device tree ...
-starting device tree allocs at 00bb9000
+starting device tree allocs at 024b9000
alloc_up(00100000, 00001000)
- trying: 0x00bb9000
- -> 00bb9000
- alloc_bottom : 00bb9000
+ trying: 0x024b9000
+CLAIM failed trying: 0x025b9000
+CLAIM failed trying: 0x026b9000
+CLAIM failed trying: 0x027b9000
+ -> 027b9000
+ alloc_bottom : 027b9000
alloc_top : 04800000
alloc_top_hi : 04800000
rmo_top : 04800000
@@ -28,23 +31,22 @@
Building dt strings...
Building dt structure...
reserved memory map:
- 00bb9000 - 00010000
-Device tree strings 0x00bba000 -> 0x00bba4bf
-Device tree struct 0x00bbb000 -> 0x00bc9000
+ 027b9000 - 00010000
+Device tree strings 0x027ba000 -> 0x027ba4bf
+Device tree struct 0x027bb000 -> 0x027c9000
Calling quiesce ...
returning from prom_init
-->dt_header_start=0x00bb9000
+->dt_header_start=0x027b9000
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply
* Re: ARCH=powerpc doesnt boot on 7200
From: Olaf Hering @ 2005-12-10 22:12 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20051210213632.GA21561@suse.de>
On Sat, Dec 10, Olaf Hering wrote:
> My 7200 doesnt boot if the kernel runs at 32MB. It dies somewhere after turn_on_mmu().
> It boots ok if it runs at 7MB. 2.6.14 and earlier booted ok with 32MB.
> Any idea how to fix this? What does ARCH=powerpc different in this regard?
601 has only 16MB mapped after turn_on_mmu. I changed my zImage to start
claim at 5MB for this case, and it works again.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply
* [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
From: Johannes Berg @ 2005-12-10 23:11 UTC (permalink / raw)
To: linuxppc-dev; +Cc: akpm, paulus
ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
machine, will not properly set smp_tb_synchronized, thus causing
gettimeofday() to not use the HW timebase and to be limited to jiffy
resolution. This, among others, causes unacceptable pauses when
launching X.org.
Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
---
With this patch, X.org startup time goes down from ~30 seconds to normal
(just a second or so). The know-how really comes from BenH who I
discussed with on IRC.
--- linux-2.6.15-rc5.orig/arch/ppc/kernel/smp.c 2005-12-10 23:56:23.026328000 +0100
+++ linux-2.6.15-rc5/arch/ppc/kernel/smp.c 2005-12-11 00:03:40.556328000 +0100
@@ -301,6 +301,11 @@
/* Probe platform for CPUs: always linear. */
num_cpus = smp_ops->probe();
+
+ if (num_cpus < 2) {
+ smp_tb_synchronized = 1;
+ }
+
for (i = 0; i < num_cpus; ++i)
cpu_set(i, cpu_possible_map);
^ permalink raw reply
* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
From: Benjamin Herrenschmidt @ 2005-12-10 23:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: akpm, linuxppc-dev, paulus
In-Reply-To: <1134256279.3810.8.camel@localhost>
On Sun, 2005-12-11 at 00:11 +0100, Johannes Berg wrote:
> ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
> machine, will not properly set smp_tb_synchronized, thus causing
> gettimeofday() to not use the HW timebase and to be limited to jiffy
> resolution. This, among others, causes unacceptable pauses when
> launching X.org.
>
> Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
Please, remove the useless { }
Ben.
> ---
>
> With this patch, X.org startup time goes down from ~30 seconds to normal
> (just a second or so). The know-how really comes from BenH who I
> discussed with on IRC.
>
> --- linux-2.6.15-rc5.orig/arch/ppc/kernel/smp.c 2005-12-10 23:56:23.026328000 +0100
> +++ linux-2.6.15-rc5/arch/ppc/kernel/smp.c 2005-12-11 00:03:40.556328000 +0100
> @@ -301,6 +301,11 @@
>
> /* Probe platform for CPUs: always linear. */
> num_cpus = smp_ops->probe();
> +
> + if (num_cpus < 2) {
> + smp_tb_synchronized = 1;
> + }
> +
> for (i = 0; i < num_cpus; ++i)
> cpu_set(i, cpu_possible_map);
>
>
^ permalink raw reply
* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
From: Johannes Berg @ 2005-12-11 0:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: akpm, linuxppc-dev
In-Reply-To: <1134258468.6989.36.camel@gaston>
ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
machine, will not properly set smp_tb_synchronized, thus causing
gettimeofday() to not use the HW timebase and to be limited to jiffy
resolution. This, among others, causes unacceptable pauses when
launching X.org.
Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
---
With this patch, X.org startup time goes down from ~30 seconds to normal
(just a second or so). The know-how really comes from BenH who I
discussed with on IRC.
--- linux-2.6.15-rc5.orig/arch/ppc/kernel/smp.c 2005-12-10 23:56:23.026328000 +0100
+++ linux-2.6.15-rc5/arch/ppc/kernel/smp.c 2005-12-11 00:56:53.756328000 +0100
@@ -301,6 +301,10 @@
/* Probe platform for CPUs: always linear. */
num_cpus = smp_ops->probe();
+
+ if (num_cpus < 2)
+ smp_tb_synchronized = 1;
+
for (i = 0; i < num_cpus; ++i)
cpu_set(i, cpu_possible_map);
^ permalink raw reply
* Re: [patch] ppc32: set smp_tb_synchronized on UP with SMP kernel
From: Benjamin Herrenschmidt @ 2005-12-11 0:25 UTC (permalink / raw)
To: Johannes Berg; +Cc: akpm, linuxppc-dev
In-Reply-To: <1134259249.4387.3.camel@localhost>
On Sun, 2005-12-11 at 01:00 +0100, Johannes Berg wrote:
> ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU
> machine, will not properly set smp_tb_synchronized, thus causing
> gettimeofday() to not use the HW timebase and to be limited to jiffy
> resolution. This, among others, causes unacceptable pauses when
> launching X.org.
>
> Signed-Off-By: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> With this patch, X.org startup time goes down from ~30 seconds to normal
> (just a second or so). The know-how really comes from BenH who I
> discussed with on IRC.
>
> --- linux-2.6.15-rc5.orig/arch/ppc/kernel/smp.c 2005-12-10 23:56:23.026328000 +0100
> +++ linux-2.6.15-rc5/arch/ppc/kernel/smp.c 2005-12-11 00:56:53.756328000 +0100
> @@ -301,6 +301,10 @@
>
> /* Probe platform for CPUs: always linear. */
> num_cpus = smp_ops->probe();
> +
> + if (num_cpus < 2)
> + smp_tb_synchronized = 1;
> +
> for (i = 0; i < num_cpus; ++i)
> cpu_set(i, cpu_possible_map);
>
>
^ permalink raw reply
* RE: Linux process ABI broken in 2.6?
From: Joakim Tjernlund @ 2005-12-11 15:11 UTC (permalink / raw)
To: linuxppc-dev
>=20
> > On Fri, 2005-12-09 at 00:07 +0100, Tjernlund wrote:
> > > Seems like ppc32 kernel pass the application entry point address
> > > in r7 and MSR in r8 when starting the application. The=20
> source might be
> > > ret_from_syscall, in entry.S:=20
> > > ...
> > > lwz r7,_NIP(r1)
> > > lwz r8,_MSR(r1)
> > > FIX_SRR1(r8, r0)
> > > lwz r2,GPR2(r1)
> > > lwz r1,GPR1(r1)
> > > mtspr SPRN_SRR0,r7
> > > mtspr SPRN_SRR1,r8
> > > SYNC
> > > RFI
> > > I am not convinced this is the source, but a non zero r7
> > > breaks static apps in uClibc.
> > >=20
> > > Is this on purpose and why?
> > >=20
> > > Secion 8.4.1 in
> > >=20
> http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-PPC32/LSB
> -Core-PPC32.html#PROCESSINITIALIZATION
> > >=20
> > > says:
> > > "Contrary to what is stated in the Registers part of=20
> chapter 3 of the System V Application Binary Interface=20
> PowerPC Processor
> > > Supplement there are no values set in registers r3, r4,=20
> r5, r6 and r7. Instead the values specified to appear in all of those
> > > registers except r7 are placed on the stack. The value to=20
> be placed into register r7, the termination function pointer=20
> is not passed
> > > to the process."
> > >=20
> > > How do one not pass a termination function in r7 other=20
> than setting
> > > r7 to zero?
> >
> > Just ignore those registers on entry. The semantics of a=20
> syscall are to
> > clobber all volatile registers and there is no point doing anything
> > else.
> >
> > Ben.
>=20
> [Sorry to break the thread, but I mailed from the wrong=20
> account which I can't reach ATM]
>=20
> Sure, but this syscall is a bit special as it has to prepare=20
> the runtime env. for the new process.
> Not having any defined value for register at process startup feels ..
>=20
> An undefined r7 register makes it hard to differ between=20
> dynamic and static apps in crt1.
> I now understand why glibc has its own non standard=20
> __libc_start function and I really don't
> want that in uClibc. Is it too much trouble to define r7 to=20
> always have a zero
> value at process startup?
>=20
> As far as I can tell 2.4 has all unused registers zeroed.
The only way to pass any info from ld.so to crt is to mess with the
stack, write a NULL word
before argc and set the stack ptr to point to it. Then let crt test for
a null word, if null
then crt will know that this is a dynamic app, if not then it is a
static app with no rtld_fini
function.
I feel the messing with the stack in this way not ideal, so I would like
to see a better
exec ABI where at least one register,r7, will be zero.
The fix is trivial, just swap r7 to r9 in the above assembler code.
Is that feasible?
Jocke
^ permalink raw reply
* [2.6 patch] defconfig's shouldn't set CONFIG_BROKEN=y
From: Adrian Bunk @ 2005-12-11 18:52 UTC (permalink / raw)
To: linux-kernel
Cc: linux-sh, tony.luck, linux-ia64, grundler, matthew, linuxppc-dev,
lethal, kkojima, rmk, parisc-linux
defconfig's shouldn't set CONFIG_BROKEN=y.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
arch/arm/configs/bast_defconfig | 3 +--
arch/arm/configs/collie_defconfig | 3 +--
arch/arm/configs/s3c2410_defconfig | 3 +--
arch/ia64/configs/sim_defconfig | 3 +--
arch/ia64/configs/zx1_defconfig | 3 +--
arch/m32r/mappi/defconfig.smp | 3 +--
arch/m32r/mappi/defconfig.up | 3 +--
arch/m32r/mappi3/defconfig.smp | 3 +--
arch/parisc/configs/712_defconfig | 3 +--
arch/parisc/configs/a500_defconfig | 3 +--
arch/parisc/configs/c3000_defconfig | 3 +--
arch/ppc/configs/mpc86x_ads_defconfig | 3 +--
arch/ppc/configs/mpc885ads_defconfig | 3 +--
arch/ppc/configs/rpxcllf_defconfig | 3 +--
arch/ppc/configs/rpxlite_defconfig | 3 +--
arch/sh/configs/hp680_defconfig | 3 +--
arch/sh/configs/sh03_defconfig | 3 +--
arch/sh/configs/systemh_defconfig | 3 +--
18 files changed, 18 insertions(+), 36 deletions(-)
--- linux-2.6.15-rc5-mm2-full/arch/arm/configs/bast_defconfig.old 2005-12-11 19:37:15.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/arm/configs/bast_defconfig 2005-12-11 19:37:37.000000000 +0100
@@ -14,8 +14,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
#
--- linux-2.6.15-rc5-mm2-full/arch/arm/configs/collie_defconfig.old 2005-12-11 19:37:44.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/arm/configs/collie_defconfig 2005-12-11 19:37:52.000000000 +0100
@@ -13,8 +13,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/arm/configs/s3c2410_defconfig.old 2005-12-11 19:38:01.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/arm/configs/s3c2410_defconfig 2005-12-11 19:38:08.000000000 +0100
@@ -13,8 +13,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/ia64/configs/sim_defconfig.old 2005-12-11 19:38:17.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ia64/configs/sim_defconfig 2005-12-11 19:38:38.000000000 +0100
@@ -6,9 +6,8 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
+CONFIG_CLEAN_COMPILE=y
# CONFIG_STANDALONE is not set
-CONFIG_BROKEN=y
CONFIG_BROKEN_ON_SMP=y
#
--- linux-2.6.15-rc5-mm2-full/arch/ia64/configs/zx1_defconfig.old 2005-12-11 19:38:52.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ia64/configs/zx1_defconfig 2005-12-11 19:38:59.000000000 +0100
@@ -8,8 +8,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/m32r/mappi/defconfig.smp.old 2005-12-11 19:39:08.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/m32r/mappi/defconfig.smp 2005-12-11 19:39:15.000000000 +0100
@@ -13,8 +13,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/m32r/mappi/defconfig.up.old 2005-12-11 19:39:25.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/m32r/mappi/defconfig.up 2005-12-11 19:39:32.000000000 +0100
@@ -13,8 +13,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/m32r/mappi3/defconfig.smp.old 2005-12-11 19:39:41.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/m32r/mappi3/defconfig.smp 2005-12-11 19:39:48.000000000 +0100
@@ -13,8 +13,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/parisc/configs/712_defconfig.old 2005-12-11 19:40:00.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/parisc/configs/712_defconfig 2005-12-11 19:40:08.000000000 +0100
@@ -16,8 +16,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/parisc/configs/a500_defconfig.old 2005-12-11 19:40:32.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/parisc/configs/a500_defconfig 2005-12-11 19:40:38.000000000 +0100
@@ -16,8 +16,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/parisc/configs/c3000_defconfig.old 2005-12-11 19:40:50.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/parisc/configs/c3000_defconfig 2005-12-11 19:40:57.000000000 +0100
@@ -16,8 +16,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/ppc/configs/mpc86x_ads_defconfig.old 2005-12-11 19:41:53.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ppc/configs/mpc86x_ads_defconfig 2005-12-11 19:42:01.000000000 +0100
@@ -17,8 +17,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/ppc/configs/mpc885ads_defconfig.old 2005-12-11 19:42:21.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ppc/configs/mpc885ads_defconfig 2005-12-11 19:42:30.000000000 +0100
@@ -17,8 +17,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
--- linux-2.6.15-rc5-mm2-full/arch/ppc/configs/rpxcllf_defconfig.old 2005-12-11 19:42:40.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ppc/configs/rpxcllf_defconfig 2005-12-11 19:42:48.000000000 +0100
@@ -15,8 +15,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
#
--- linux-2.6.15-rc5-mm2-full/arch/ppc/configs/rpxlite_defconfig.old 2005-12-11 19:43:21.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/ppc/configs/rpxlite_defconfig 2005-12-11 19:43:27.000000000 +0100
@@ -15,8 +15,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
#
--- linux-2.6.15-rc5-mm2-full/arch/sh/configs/hp680_defconfig.old 2005-12-11 19:43:36.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/sh/configs/hp680_defconfig 2005-12-11 19:43:43.000000000 +0100
@@ -14,8 +14,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
#
--- linux-2.6.15-rc5-mm2-full/arch/sh/configs/sh03_defconfig.old 2005-12-11 19:43:53.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/sh/configs/sh03_defconfig 2005-12-11 19:44:02.000000000 +0100
@@ -14,8 +14,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
--- linux-2.6.15-rc5-mm2-full/arch/sh/configs/systemh_defconfig.old 2005-12-11 19:44:19.000000000 +0100
+++ linux-2.6.15-rc5-mm2-full/arch/sh/configs/systemh_defconfig 2005-12-11 19:44:40.000000000 +0100
@@ -14,8 +14,7 @@
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
-# CONFIG_CLEAN_COMPILE is not set
-CONFIG_BROKEN=y
+CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
^ permalink raw reply
* Re: [2.6 patch] defconfig's shouldn't set CONFIG_BROKEN=y
From: Russell King @ 2005-12-11 19:21 UTC (permalink / raw)
To: Adrian Bunk
Cc: linux-sh, tony.luck, linux-ia64, grundler, matthew, linux-kernel,
linuxppc-dev, lethal, kkojima, parisc-linux
In-Reply-To: <20051211185212.GQ23349@stusta.de>
On Sun, Dec 11, 2005 at 07:52:12PM +0100, Adrian Bunk wrote:
> defconfig's shouldn't set CONFIG_BROKEN=y.
NACK. This changes other configuration options in addition, for example
in collie_defconfig:
-CONFIG_MTD_OBSOLETE_CHIPS=y
-# CONFIG_MTD_AMDSTD is not set
-CONFIG_MTD_SHARP=y
-# CONFIG_MTD_JEDEC is not set
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply
* Re: [2.6 patch] defconfig's shouldn't set CONFIG_BROKEN=y
From: Adrian Bunk @ 2005-12-11 19:31 UTC (permalink / raw)
To: linux-kernel, tony.luck, linux-ia64, matthew, grundler,
parisc-linux, paulus, linuxppc-dev, lethal, kkojima, dwmw2
Cc: linux-mtd
In-Reply-To: <20051211192109.GA22537@flint.arm.linux.org.uk>
On Sun, Dec 11, 2005 at 07:21:10PM +0000, Russell King wrote:
> On Sun, Dec 11, 2005 at 07:52:12PM +0100, Adrian Bunk wrote:
> > defconfig's shouldn't set CONFIG_BROKEN=y.
>
> NACK. This changes other configuration options in addition, for example
> in collie_defconfig:
>
> -CONFIG_MTD_OBSOLETE_CHIPS=y
> -# CONFIG_MTD_AMDSTD is not set
> -CONFIG_MTD_SHARP=y
> -# CONFIG_MTD_JEDEC is not set
That's not a problem introduced by my patch.
Either the depency of MTD_OBSOLETE_CHIPS on BROKEN is correct (in which
case CONFIG_MTD_OBSOLETE_CHIPS=y wouldn't bring you anything), or the
dependency on BROKEN is not correct and should be corrected.
David, can you comment on this issue?
> Russell King
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* Re: [2.6 patch] defconfig's shouldn't set CONFIG_BROKEN=y
From: Russell King @ 2005-12-11 19:44 UTC (permalink / raw)
To: Adrian Bunk
Cc: tony.luck, linux-ia64, grundler, matthew, linux-kernel, linux-mtd,
linuxppc-dev, lethal, dwmw2, kkojima, parisc-linux
In-Reply-To: <20051211193118.GR23349@stusta.de>
On Sun, Dec 11, 2005 at 08:31:18PM +0100, Adrian Bunk wrote:
> On Sun, Dec 11, 2005 at 07:21:10PM +0000, Russell King wrote:
> > On Sun, Dec 11, 2005 at 07:52:12PM +0100, Adrian Bunk wrote:
> > > defconfig's shouldn't set CONFIG_BROKEN=y.
> >
> > NACK. This changes other configuration options in addition, for example
> > in collie_defconfig:
> >
> > -CONFIG_MTD_OBSOLETE_CHIPS=y
> > -# CONFIG_MTD_AMDSTD is not set
> > -CONFIG_MTD_SHARP=y
> > -# CONFIG_MTD_JEDEC is not set
>
> That's not a problem introduced by my patch.
It's a problem introduced by your patch because the resulting defconfig
file becomes _wrong_ by your change, and other changes in the defconfig
are thereby hidden.
If you change any options in a defconfig file, and they're obviously not
leaf options, you should check what impact they have on other options by
running it through an "oldconfig" cycle. That's what I just did with
this script:
#!/bin/sh -e
alias amake='make CROSS_COMPILE=arm-linux- ARCH=arm'
amake $1 O=../build/t >/dev/null 2>&1
mv ../build/t/.config ../build/t/.config.orig
sed '/CONFIG_BROKEN/d;s,^# CONFIG_CLEAN_COMPILE is not set,CONFIG_CLEAN_COMPILE=y,' < ../build/t/.config.orig > ../build/t/.config
amake oldconfig O=../build/t >/dev/null 2>&1
diff -u ../build/t/.config.orig ../build/t/.config
Hence I discovered that disabling CONFIG_BROKEN removes the above
options for the collie case.
BTW, it might be worth using something like the above script for all
the changes to the defconfig files in your patch so that it correctly
updates these files. It will also mean that any review of it is more
meaningful because we can see the full extent of your changes.
> Either the depency of MTD_OBSOLETE_CHIPS on BROKEN is correct (in which
> case CONFIG_MTD_OBSOLETE_CHIPS=y wouldn't bring you anything), or the
> dependency on BROKEN is not correct and should be corrected.
That's something which collie folk need to comment on. However, what
I can say is that the collie_defconfig builds successfully today:
http://armlinux.simtec.co.uk/kautobuild/2.6.15-rc5-git1/collie_defconfig/zimage.log
so it's quite possible that the Kconfig is out of sync with reality.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply
* Re: 82xx-HCI-USB & Webcams / PWC
From: Wolfgang Denk @ 2005-12-11 21:47 UTC (permalink / raw)
To: Absolut Hunter; +Cc: linuxppc-embedded
In-Reply-To: <003101c5fcf5$1ff05b80$6405a8c0@absolut>
Hello,
in message <003101c5fcf5$1ff05b80$6405a8c0@absolut> you wrote:
>
> Has anyone attempted to use the Phillips web cam driver, pwc.o, that is
> built into the standard 2.4.25 DENX kernel? I think its version 8.x
> something.
The current code uses version 10.0.7a of the driver. This driver has
been tested on several MPC5200 based systems (plain old IceCube,
TQM5200, and custom hardware). It works fine there.
> Anyone tried this?
We did, and it works fine. [Make sure to use current code, i. e. commit
e09474c3e0963b58470b447ab25188499e5c4af1 or later; see
http://www.denx.de/cgi-bin/gitweb.cgi?p=linuxppc_2_4_devel.git;a=commit;h=e09474c3e0963b58470b447ab25188499e5c4af1
See also Documentation/README.webcam inthe source tree.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Genius doesn't work on an assembly line basis. You can't simply say,
"Today I will be brilliant."
-- Kirk, "The Ultimate Computer", stardate 4731.3
^ permalink raw reply
* [PATCH] powerpc: Fix clock spreading setting on some powermacs
From: Benjamin Herrenschmidt @ 2005-12-12 2:13 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Andrew Morton, linuxppc-dev list
The code that sets the clock spreading feature of the Intrepid ASIC
must not be run on some machine models or those won't boot. This
fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This is 2.6.15 material.
Index: linux-work/arch/powerpc/platforms/powermac/feature.c
===================================================================
--- linux-work.orig/arch/powerpc/platforms/powermac/feature.c 2005-11-19 10:56:07.000000000 +1100
+++ linux-work/arch/powerpc/platforms/powermac/feature.c 2005-12-12 12:17:02.000000000 +1100
@@ -1650,11 +1650,19 @@
*/
if (macio->type == macio_intrepid) {
- if (enable)
- UN_OUT(UNI_N_CLOCK_SPREADING, 2);
- else
- UN_OUT(UNI_N_CLOCK_SPREADING, 0);
- mdelay(40);
+ struct device_node *clock =
+ of_find_node_by_path("/uni-n@f8000000/hw-clock");
+ if (clock && get_property(clock, "platform-do-clockspreading",
+ NULL)) {
+ printk(KERN_INFO "%sabling clock spreading on Intrepid"
+ " ASIC\n", enable ? "En" : "Dis");
+ if (enable)
+ UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+ else
+ UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+ mdelay(40);
+ }
+ of_node_put(clock);
}
while (machine_is_compatible("PowerBook5,2") ||
@@ -1724,6 +1732,9 @@
pmac_low_i2c_close(ui2c);
break;
}
+ printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+ enable ? "En" : "Dis");
+
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
DBG("write result: %d,", rc);
Index: linux-work/arch/ppc/platforms/pmac_feature.c
===================================================================
--- linux-work.orig/arch/ppc/platforms/pmac_feature.c 2005-11-14 20:32:16.000000000 +1100
+++ linux-work/arch/ppc/platforms/pmac_feature.c 2005-12-12 12:16:38.000000000 +1100
@@ -1606,11 +1606,19 @@
*/
if (macio->type == macio_intrepid) {
- if (enable)
- UN_OUT(UNI_N_CLOCK_SPREADING, 2);
- else
- UN_OUT(UNI_N_CLOCK_SPREADING, 0);
- mdelay(40);
+ struct device_node *clock =
+ of_find_node_by_path("/uni-n@f8000000/hw-clock");
+ if (clock && get_property(clock, "platform-do-clockspreading",
+ NULL)) {
+ printk(KERN_INFO "%sabling clock spreading on Intrepid"
+ " ASIC\n", enable ? "En" : "Dis");
+ if (enable)
+ UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+ else
+ UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+ mdelay(40);
+ }
+ of_node_put(clock);
}
while (machine_is_compatible("PowerBook5,2") ||
@@ -1680,6 +1688,8 @@
pmac_low_i2c_close(ui2c);
break;
}
+ printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+ enable ? "En" : "Dis");
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
DBG("write result: %d,", rc);
^ permalink raw reply
* Re: Linux process ABI broken in 2.6?
From: Paul Mackerras @ 2005-12-12 2:28 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-dev
In-Reply-To: <F6AD7E21CDF4E145A44F61F43EE6D939486E0C@tmnt04.transmode.se>
Joakim Tjernlund writes:
> Is it too much trouble to define r7 to always have
> a zero
> value at process startup?
That's not much trouble, but what will you do for existing kernels?
Won't you have to do something like testing *r1 anyway?
Paul.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix clock spreading setting on some powermacs
From: Andrew Morton @ 2005-12-12 2:45 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1134353605.6989.69.camel@gaston>
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> The code that sets the clock spreading feature of the Intrepid ASIC
> must not be run on some machine models or those won't boot. This
> fixes it.
I have a bunch of powerpc fixes for 2.6.15, some of which are in Paul's
tree. I presently have:
powerpc-fix-a-huge-page-bug.patch
powerpc-remove-debug-code-in-hash-path.patch
fix-windfarm-model-id-table.patch
powerpc-set-cache-info-defaults.patch
powerpc-fix-slb-flushing-path-in-hugepage.patch
powerpc-add-missing-icache-flushes-for-hugepages.patch
ppc32-set-smp_tb_synchronized-on-up-with-smp-kernel.patch
Linus is back online now. Paul, do you intend to send a batch to Linus?
If so, please do so asap so I can merge up anything that's left over.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix clock spreading setting on some powermacs
From: Paul Mackerras @ 2005-12-12 3:27 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev
In-Reply-To: <20051211184520.7f565283.akpm@osdl.org>
Andrew Morton writes:
> Linus is back online now. Paul, do you intend to send a batch to Linus?
> If so, please do so asap so I can merge up anything that's left over.
Yes, I have all of those patches in my powerpc-merge tree and I'll
send him a "please pull" message once it's mirrored to kernel.org.
Paul.
^ permalink raw reply
* 82xx IRQ handling
From: Dmytro Bablinyuk @ 2005-12-12 2:42 UTC (permalink / raw)
To: linuxppc-embedded
Hi everybody,
I am trying to setup an IRQ handler for IRQ4:
#define IRQ SIU_INT_IRQ4
volatile cpm2_map_t *immap;
int irq_flags = 0;
immap = (cpm2_map_t *)CPM_MAP_ADDR;
immap->im_intctl.ic_simrh &= ~(0x0800);
request_irq(IRQ,
&irq_handler, /* our handler */
irq_flags,
"interrupt_test",
NULL);
immap->im_intctl.ic_simrh |= 0x0800;
I can see on a scope that IRQ line pulls up/down but handler get never
called. I am sure I made some very stupid mistake here but I will really
appreciate if somebody can help me with this.
Thank you
Dmytro
^ permalink raw reply
* Re: 82xx IRQ handling
From: Dan Malek @ 2005-12-12 5:01 UTC (permalink / raw)
To: Dmytro Bablinyuk; +Cc: linuxppc-embedded
In-Reply-To: <439CE3A2.8020603@rftechnology.com.au>
On Dec 11, 2005, at 9:42 PM, Dmytro Bablinyuk wrote:
> immap->im_intctl.ic_simrh &= ~(0x0800);
You should not be messing around with this register
in your code. The generic 82xx interrupt functions
will properly manage this for you.
> request_irq(IRQ,
> &irq_handler, /* our handler */
> irq_flags,
> "interrupt_test",
> NULL);
This is all you should do.
Thanks.
-- Dan
^ permalink raw reply
* Re: 82xx IRQ handling
From: Dmytro Bablinyuk @ 2005-12-12 6:00 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-embedded
In-Reply-To: <dc0620490d9bef30d3a4b629483cd3f9@embeddededge.com>
>
>> immap->im_intctl.ic_simrh &= ~(0x0800);
>
>
> You should not be messing around with this register
> in your code. The generic 82xx interrupt functions
> will properly manage this for you.
Thank you Dan,
It's working now!
By the way question - shall I program somewhere an edge of the IRQ or it
always triggers on the rising edge?
Also does anybody knows any source code example of using 82xx General
Purpose Timer Unit so that it triggers interrupt handler after some period.
Thank you
^ permalink raw reply
* RE: Linux process ABI broken in 2.6?
From: Joakim Tjernlund @ 2005-12-12 8:09 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
=20
>=20
> Joakim Tjernlund writes:
>=20
> > Is it too much trouble to define r7 to always have
> > a zero
> > value at process startup?
>=20
> That's not much trouble, but what will you do for existing kernels?
> Won't you have to do something like testing *r1 anyway?
No, I don't plan to do anything. I just got the first report that static
uClibc apps dosen't work for 2.6, so if the current kernel is fixed I
will just
point to a newer kernel or they can patch their old kernel with the
required 2 line fix.
Thanks
Jocke
>=20
> Paul.
>=20
>=20
^ permalink raw reply
* Re: Re: 82xx IRQ handling
From: debora liu @ 2005-12-12 8:31 UTC (permalink / raw)
To: Dmytro Bablinyuk; +Cc: Linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2469 bytes --]
Hello, Dmytro Bablinyuk
In message <2005-12-12 14:00:46 dmytro.bablinyuk@rftechnology.com.au> you wrote:
>
>By the way question - shall I program somewhere an edge of the IRQ or it
>always triggers on the rising edge?
>
IRQ_POLARITY_POSITIVE /* high level or low->high edge */
IRQ_POLARITY_NEGATIVE /* low level or high->low edge */
you should modify OpenPIC_InitSenses, example my board:
static u_char sc82xx_openpic_initsenses[] __initdata = {
#if defined(CONFIG_SVM_GEMINI)
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 0,PCI0 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 1 ,PCI1*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 2 ,PCI2 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* DUART CH1 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* DUART CH2 */
(IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ3, PCI3 or DPRAM */
(IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ4, DPRAM */
#elif defined (CONFIG_SVM_IT6160A)
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 0 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 1 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ 2, xr16L788 chip1*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* DUART CH1 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* DUART CH2 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ3, xr16L788 chip2*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* EPIC IRQ4,spare */
#else
#error No board defined.!!!
#endif
};
static void __init
sc82xx_init_IRQ(void)
{
OpenPIC_InitSenses = sc82xx_openpic_initsenses;
OpenPIC_NumInitSenses = sizeof(sc82xx_openpic_initsenses);
/*
* We need to tell openpic_set_sources where things actually are.
* mpc10x_common will setup OpenPIC_Addr at ioremap(EUMB phys base +
* EPIC offset (0x40000)); The EPIC IRQ Register Address Map -
* Interrupt Source Configuration Registers gives these numbers
* as offsets starting at 0x50200, we need to adjust occordinly.
*/
openpic_set_sources(0, 3, OpenPIC_Addr + 0x10200); /* 0=IRQ0, 1=IRQ1, 2=IRQ2 *
openpic_set_sources(3, 2, OpenPIC_Addr + 0x11120); /* 3=UART0, 4=UART1 *
openpic_set_sources(5, 2, OpenPIC_Addr + 0x10260); /* 5=IRQ3, 6=IRQ4 *
openpic_init (0);
}
= = = = = = = = = = = = = = = = = = = =
debora liu
deboraliu@tom.com
2005-12-12
[-- Attachment #2: fox.gif --]
[-- Type: image/gif, Size: 9519 bytes --]
^ permalink raw reply
* eldk-3.1.1 mpc823 SCC3 CTS/CD
From: debora liu @ 2005-12-12 8:40 UTC (permalink / raw)
To: linuxppc-embedde
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
Hello denx:
I found one bug when SCC3 as UART, my cpu is mpc823.
cts/cd config as:
CTS PC5
CD PC4
your ELDK-3.1.1 linux-2.4.25 uart.c set pcpar,pcso, pcdir:
immap->im_ioport.iop_pcpar &= ~iobits;
immap->im_ioport.iop_pcso |= iobits;
immap->im_ioport.iop_pcdir &= ~iobits;
but MPC823UM tell me CD3 and CTS3 is bit6 and bit7 on PCSO register, so I modify:
fix_pcso = iobits;
#if defined(CONFIG_UART_CTS_CONTROL_SCC3)
fix_pcso &=~(1 << (15 - CONFIG_CTS3_PIN));
fix_pcso |= 0x0100;
#endif
#if defined(CONFIG_UART_CD_CONTROL_SCC3)
fix_pcso &=~(1 << (15 - CONFIG_CD3_PIN));
fix_pcso |= 0x0200;
#endif
immap->im_ioport.iop_pcpar &= ~iobits;
immap->im_ioport.iop_pcso |= fix_pcso;
immap->im_ioport.iop_pcdir &= ~iobits;
My board have success communication to moderm with SCC3 hard flow control.
debora liu
deboraliu@tom.com
2005-12-12
[-- Attachment #2: fox.gif --]
[-- Type: image/gif, Size: 9519 bytes --]
^ permalink raw reply
* Re: [2.6 patch] defconfig's shouldn't set CONFIG_BROKEN=y
From: David Woodhouse @ 2005-12-12 9:38 UTC (permalink / raw)
To: Adrian Bunk
Cc: tony.luck, linux-ia64, grundler, matthew, linux-kernel, linux-mtd,
linuxppc-dev, lethal, kkojima, parisc-linux
In-Reply-To: <20051211193118.GR23349@stusta.de>
On Sun, 2005-12-11 at 20:31 +0100, Adrian Bunk wrote:
> Either the depency of MTD_OBSOLETE_CHIPS on BROKEN is correct (in
> which case CONFIG_MTD_OBSOLETE_CHIPS=y wouldn't bring you anything),
> or the dependency on BROKEN is not correct and should be corrected.
>
> David, can you comment on this issue?
I don't see any justification for MTD_OBSOLETE_CHIPS depending on
BROKEN. That option covers a few of the obsolete chip drivers which
people shouldn't be using any more -- and I'm perfectly willing to
believe that one or two of those don't work any more, but if that's the
case then those individual drivers ought to be marked BROKEN (or just
removed). We shouldn't mark MTD_OBSOLETE_CHIPS broken.
I'd like to see the collie_defconfig updated to use the appropriate CFI
driver back end.
--
dwmw2
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox