Re: [PATCH] pseries: don't die if unknown/missing interrupt controller property

2007-07-06 Thread Sonny Rao
On Thu, Jul 05, 2007 at 08:37:34AM -0500, Olof Johansson wrote: > On Sun, Jul 01, 2007 at 08:49:37PM -0400, Sonny Rao wrote: > > The pseries platform does not have a default function for init_IRQ and > > does not install one if it doesn't find or doesn't recognize an > > interrupt controller in the

Re: powerpc stacktrace and lockdep support

2007-07-06 Thread Johannes Berg
*sigh* I really shouldn't have mailed this out in the first place. Every time I look at it I find new bugs despite the fact that it actually works on my machine. > ld r3,SOFTE(r1) > - bl .local_irq_restore > +#ifdef CONFIG_TRACE_IRQFLAGS > + cmpdi r3,0 > + beq 14f

Re: powerpc stacktrace and lockdep support

2007-07-06 Thread Johannes Berg
Sergei, Thanks for your review! > I suggest to also remove these 3 lines from the heading comment in this > file -- they're not true anyway: > > * This file gets included from lowlevel asm headers too, to provide > * wrapped versions of the local_irq_*() APIs, based on the > * raw_loca

Re: powerpc stacktrace and lockdep support

2007-07-06 Thread Johannes Berg
On Thu, 2007-07-05 at 00:40 +0200, Johannes Berg wrote: > On Sat, 2007-06-30 at 10:58 +0200, Christoph Hellwig wrote: > > On Thu, Jun 28, 2007 at 06:20:42PM +0200, Johannes Berg wrote: > > > This one doesn't break 32-bit build by simply disabling irqtrace for > > > 32-bit. > > > > This looks reall

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Johannes Berg
On Thu, 2007-07-05 at 16:55 -0500, Scott Wood wrote: > As revealed by the recent "Prevent data exception in kernel space" > patch, versions of glibc prior to 2.4[1] assume that, on powerpc32, they > can execute out of any readable mapping, regardless of whether it is > marked for execution. Thi

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Andreas Schwab
Geert Uytterhoeven <[EMAIL PROTECTED]> writes: > Is there anything we can do about this? Define it as IGNORE_IOCTL in fs/compat_ioctl.c? Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6

Too verbose compat_ioctl messages?

2007-07-06 Thread Geert Uytterhoeven
Hi, Fuse-san discovered that running the umount that's part of busybox on a PS3 with a recent kernel causes an error message to be printed on the console: | ioctl32(busybox:1340): Unknown cmd fd(3) cmd(4c01){t:'L';sz:0} arg() on /dev/sda1 On older kernels (e.g. 2.6.16), thi

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Segher Boessenkool
> As revealed by the recent "Prevent data exception in kernel > space" patch, versions of glibc prior to 2.4[1] assume that, Are you sure that this hasn't been fixed somewhere in the 2.3 series, too? > on powerpc32, they can execute out of any readable mapping, > regardless of whether it is marke

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Segher Boessenkool
>> As revealed by the recent "Prevent data exception in kernel space" >> patch, versions of glibc prior to 2.4[1] assume that, on >> powerpc32, they >> can execute out of any readable mapping, regardless of whether it is >> marked for execution. This happens in the elf_machine_load_address() >>

Re: PCI IO range limitation

2007-07-06 Thread Marian Balakowicz
Benjamin Herrenschmidt wrote: > On Tue, 2007-07-03 at 11:24 +0200, Marian Balakowicz wrote: >> Benjamin Herrenschmidt wrote: >>> On Thu, 2007-06-28 at 12:20 +0200, Marian Balakowicz wrote: I guess that with the above dropping of non-zero based PCI IO ranges this is not supposed to be work

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Johannes Berg
On Fri, 2007-07-06 at 15:36 +0200, Segher Boessenkool wrote: > > Umm, are you sure about this? The "prevent data exception in kernel > > space" patch came from a test program I had that attempted to > > execute a > > page with /no permissions/ at all! > > I haven't looked at the code path in de

Re: Executing from readablee, no-exec pages

2007-07-06 Thread David Woodhouse
On Thu, 2007-07-05 at 16:55 -0500, Scott Wood wrote: > To maintain compatibility with these versions, we could change the test > in do_page_fault() to include VM_READ as well as VM_EXEC on targets that > don't have a separate exec-bit in hardware (are there any powerpc mmus > that do?). 64-bi

[PATCH] compat32: ignore the LOOP_CLR_FD ioctl

2007-07-06 Thread Geert Uytterhoeven
compat32: Ignore the LOOP_CLR_FD ioctl for the loop block device, to kill an annoying kernel message when e.g. busybox umount is used. Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> --- fs/compat_ioctl.c |4 1 files changed, 4 insertions(+) --- a/fs/compat_ioctl.c +++ b/fs/compat

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Geert Uytterhoeven
On Fri, 6 Jul 2007, Andreas Schwab wrote: > Geert Uytterhoeven <[EMAIL PROTECTED]> writes: > > > Is there anything we can do about this? > > Define it as IGNORE_IOCTL in fs/compat_ioctl.c? Works fine, thx! I'll submit a patch. With kind regards, Geert Uytterhoeven Software Architect Sony Net

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Scott Wood
On Fri, Jul 06, 2007 at 03:24:20PM +0200, Segher Boessenkool wrote: > >Personally, I'd rather stick the VM_READ in there, partially for > >selfish reasons (our root filesystems are based on older glibcs), > >and because it seems a little too soon to deprecate glibc 2.3, > > Oh I don't know, can't

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread H. Peter Anvin
Geert Uytterhoeven wrote: > > Fuse-san discovered that running the umount that's part of busybox on a PS3 > with a recent kernel causes an error message to be printed on the console: > > | ioctl32(busybox:1340): Unknown cmd fd(3) cmd(4c01){t:'L';sz:0} > arg() on /dev/sda1 > > On ol

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Andi Kleen
"H. Peter Anvin" <[EMAIL PROTECTED]> writes: > > For one thing, it looks like we're returning the wrong thing (EINVAL > rather than ENOTTY) across the board. This was unfortunately a common > misunderstanding with non-tty-related ioctls in the early days of Linux. ENOTTY is so excessively misnam

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread H. Peter Anvin
Andi Kleen wrote: > "H. Peter Anvin" <[EMAIL PROTECTED]> writes: >> For one thing, it looks like we're returning the wrong thing (EINVAL >> rather than ENOTTY) across the board. This was unfortunately a common >> misunderstanding with non-tty-related ioctls in the early days of Linux. > > ENOTTY

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: >> >> ENOTTY is so excessively misnamed that it is actually surprising >> anybody ever got that "right" (for very small values of right i guess) > > But it *isn't* a typewriter. Of course, it's not a giraffe either. > The union of things that are not typewriters and n

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Jeremy Fitzhardinge
H. Peter Anvin wrote: > The union of things that are not typewriters and not giraffes are rather > large, indeed. > > This is getting philosophical. > I think my point is that we're rather short of good quality open source giraffe drivers. J ___

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Jeremy Fitzhardinge
Andi Kleen wrote: > "H. Peter Anvin" <[EMAIL PROTECTED]> writes: > >> For one thing, it looks like we're returning the wrong thing (EINVAL >> rather than ENOTTY) across the board. This was unfortunately a common >> misunderstanding with non-tty-related ioctls in the early days of Linux. >>

Re: Too verbose compat_ioctl messages?

2007-07-06 Thread Andi Kleen
On Fri, Jul 06, 2007 at 11:33:43AM -0700, Jeremy Fitzhardinge wrote: > Andi Kleen wrote: > >"H. Peter Anvin" <[EMAIL PROTECTED]> writes: > > > >>For one thing, it looks like we're returning the wrong thing (EINVAL > >>rather than ENOTTY) across the board. This was unfortunately a common > >>misu

[PATCH] pasemi: don't auto-select CONFIG_EMBEDDED

2007-07-06 Thread Olof Johansson
Disable auto-select of CONFIG_EMBEDDED. ELECTRA_IDE selects PATA_PLATFORM which should be sufficient. Signed-off-by: Olof Johansson <[EMAIL PROTECTED]> diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig index 4275ff8..95cd90f 100644 --- a/arch/powerpc/plat

Re: PowerPC equivalent to dma_mmap_writecombine()?

2007-07-06 Thread Timur Tabi
Arnd Bergmann wrote: > Not sure exactly what arm does here, but it sounds like you want > to call remap_pfn_range with the _PAGE_NO_CACHE bit set in the > protection flags, and _PAGE_GUARDED not set. I always have a hard time with these mapping functions. Is this right? vma->vm_page_prot = __pg

Re: PowerPC equivalent to dma_mmap_writecombine()?

2007-07-06 Thread Arnd Bergmann
On Friday 06 July 2007, Timur Tabi wrote: > Arnd Bergmann wrote: > > > Not sure exactly what arm does here, but it sounds like you want > > to call remap_pfn_range with the _PAGE_NO_CACHE bit set in the > > protection flags, and _PAGE_GUARDED not set. > > I always have a hard time with these mapp

Minor: Removed double return.

2007-07-06 Thread Manish Ahuja
Found 2 instances of return one right after each other in arch_add_memory(). This minor patch fixes it. Signed-off-by:Manish Ahuja <[EMAIL PROTECTED]> Index: 2.6.22-rc4/arch/powerpc/mm/mem.c === --- 2.6.22-rc4.orig/arch/powerpc/mm/

Re: [PATCH 2.6.23] 83xx USB platform code rework

2007-07-06 Thread Grant Likely
On 7/3/07, Li Yang <[EMAIL PROTECTED]> wrote: > Add 831x USB platform setup code and rework 834x USB > platform setup code. Move USB platform code to usb.c > for different boards with CPU of the same series to share > the USB initialization code. > > Signed-off-by: Li Yang <[EMAIL PROTECTED]> > Si

[PATCH] pseries: Re: Minor: Removed double return.

2007-07-06 Thread Linas Vepstas
You want to say its a patch in the subject line. --linas On Fri, Jul 06, 2007 at 04:59:55PM -0500, Manish Ahuja wrote: > Found 2 instances of return one right after each other in > arch_add_memory(). This minor patch fixes it. > Signed-off-by:Manish Ahuja <[EMAIL PROTECTED]> > > > Index: 2.6

[PATCH] Add USB support to mpc8349-mitx board port

2007-07-06 Thread Grant Likely
From: Grant Likely <[EMAIL PROTECTED]> This patch depends on Li Yang's patch: "83xx USB platform code rework" Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- arch/powerpc/platforms/83xx/mpc834x_itx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/plat

Re: [PATCH] Add USB support to mpc8349-mitx board port

2007-07-06 Thread Arnd Bergmann
On Saturday 07 July 2007, Grant Likely wrote: > --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c > +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c > @@ -63,6 +63,8 @@ static void __init mpc834x_itx_setup_arch(void) >   > ppc_md.pci_exclude_device = mpc83xx_exclude_device; >  #endif > + > +  

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Benjamin Herrenschmidt
On Fri, 2007-07-06 at 10:42 -0400, David Woodhouse wrote: > On Thu, 2007-07-05 at 16:55 -0500, Scott Wood wrote: > > To maintain compatibility with these versions, we could change the test > > in do_page_fault() to include VM_READ as well as VM_EXEC on targets that > > don't have a separate exec-

Re: Executing from readablee, no-exec pages

2007-07-06 Thread Benjamin Herrenschmidt
> Well, it means that leaving VM_READ out of the check (except where the > hardware PTE has an exec bit) isn't really buying us anything > security-wise (especially since the primary reason for no-exec protection > is to avoid code injections via stack overflow, and those pages will > usually alre

[PATCH] Handle reg-shift property for of_serial ports

2007-07-06 Thread David Woodhouse
The MV64660 has reg-shift==2 for its otherwise 16550-compatible uarts. While the bootwrapper copes with this, of_serial.c doesn't. (The udbg code doesn't either, but I'll fix that later). Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> diff --git a/drivers/serial/of_serial.c b/drivers/serial/o

Re: [PATCH] Add USB support to mpc8349-mitx board port

2007-07-06 Thread Grant Likely
On 7/6/07, Arnd Bergmann <[EMAIL PROTECTED]> wrote: > On Saturday 07 July 2007, Grant Likely wrote: > > --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c > > +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c > > @@ -63,6 +63,8 @@ static void __init mpc834x_itx_setup_arch(void) > > > > ppc_md.pci_exclud

[PATCH 01/11] dtc: fix asm for version 17

2007-07-06 Thread Milton Miller
The version 17 flat device tree format added struct size. When writing versin 17 assembly output the field must be emitted. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Found when trying to parse the binary from the assembled output. Index: dtc/flattree.c ===

[PATCH 02/11] dtc: move declaration of yyerror

2007-07-06 Thread Milton Miller
yyerror() is used by both dtc-parser.y and dtc-lexer.l, so move the declaration to srcpos.h. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- eliminates implicit declaration warning. Index: dtc/dtc-parser.y === --- dtc.orig/dtc-

[PATCH 05/11] dtc: clean up grow_data_for()

2007-07-06 Thread Milton Miller
Change the grow_data_for function to copy struct data and modifiy the fields it is updating instead of storing all fields individually to a stack allocated struct. This reduces maintence for future enhancements as now all instances of struct data are created by modifying a copy of an existing stru

[PATCH 08/11] dtc: store labels in asscending order

2007-07-06 Thread Milton Miller
When adding a label, walk to the end of the list since the label reflects the end of the data. Since merging data buffers already preserved the order, this will cause the labels to be emitted in order when writing assembly output. It should also aid emiting labels when writing dts output should t

[PATCH 11/11] dtc: format memory reserve as pairs on two lines

2007-07-06 Thread Milton Miller
When writing the memory reserve table in assembly output, emit both halves of each 64 bit number on a single .long statement. This results in two lines per memory reserve slot instead of four, each line contains one field (start or size). Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Pure

[PATCH 06/11] dtc: allow a label: in any dts context

2007-07-06 Thread Milton Miller
Change the lexer to recognise a label in any context. Place before other celldata and bytestrings to avoid the initial characters being stolen by other matches. A label is a character sequence starting with an alphabetic or underscore optinally followed by the same plus digits and terminating in

[PATCH 03/11] dtc: complain about unparsed digits in cell lists

2007-07-06 Thread Milton Miller
Check that strtoul() parsed the complete string. As with the number overflow case, write a non-fatal error message to stdout. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- I saw the FIXME and knew how to fix it. I think the severity should be higher, but opted for the detailed error me

[PATCH 04/11] dtc: implement labels on memory reserve slots

2007-07-06 Thread Milton Miller
Allow a label to be placed on a memory reserve entry. Change the parser to recogonise and store them. Emit them when writing assembly output. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- The infrastructure for storing the label was already present, so the changes are small. Index: dtc/d

[PATCH 10/11] dtc: align header comments in asm output

2007-07-06 Thread Milton Miller
Insert tabs to align the comments describing the fields of the boot parameters header struct. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Previously some of the comments were seperated by one space and others by one tab from the field. Purely cosmetic, but then so are the comments. Ind

[PATCH 09/11] dtc: add a testcase with labels

2007-07-06 Thread Milton Miller
Create a source file with labels for use as a testcase to check parsing dts files. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- I started with the existing test01.dts and added labels and a labeled subnode. The labels could instead be added to that file if desired, but that would mean t

[PATCH 00/11] dtc: some fixes, and make asm labels for data

2007-07-06 Thread Milton Miller
The following series adds the features of labeling memory reserve slots and labeling specific bytes or cells of property data. When translating from dts to asm, a global symbol is created with the name matching the label in the dts file. With these features a program does not need to understand t

[PATCH 07/11] dtc: implement labels on property data

2007-07-06 Thread Milton Miller
Extend the parser grammer to allow labels before or after any property data (string, cell list, or byte list), and any byte or cell within the property data. Store the labels using the same linked list structure as node references using in a parallel list. When writing assembly output emit glob