* [PATCH] fix x86_64 pte_user() and floppy.h for 2.5.69
@ 2003-05-06 14:04 mikpe
2003-05-06 14:22 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: mikpe @ 2003-05-06 14:04 UTC (permalink / raw)
To: ak; +Cc: linux-kernel
Andi,
2.5.69 failed to link on x86_64 due to a missing reference to pte_user().
I simply stole the one that i386 added in .68 -> .69.
There's also irqreturn_t warnings on floppy.h -- fixed also by syncing
with i386' floppy.h.
Boots fine on Simics.
/Mikael
--- linux-2.5.69/include/asm-x86_64/floppy.h.~1~ 2003-05-05 22:56:30.000000000 +0200
+++ linux-2.5.69/include/asm-x86_64/floppy.h 2003-05-06 15:19:34.000000000 +0200
@@ -22,7 +22,7 @@
* floppy accesses go through the track buffer.
*/
#define _CROSS_64KB(a,s,vdma) \
-(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
+(!(vdma) && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
@@ -62,10 +62,8 @@
static int bytes=0;
static int dma_wait=0;
#endif
- if(!doing_pdma) {
- floppy_interrupt(irq, dev_id, regs);
- return;
- }
+ if (!doing_pdma)
+ return floppy_interrupt(irq, dev_id, regs);
#ifdef TRACE_FLPY_INT
if(!calls)
@@ -96,7 +94,7 @@
calls++;
#endif
if(st == 0x20)
- return;
+ return IRQ_HANDLED;
if(!(st & 0x20)) {
virtual_dma_residue += virtual_dma_count;
virtual_dma_count=0;
--- linux-2.5.69/include/asm-x86_64/pgtable.h.~1~ 2003-04-08 01:47:26.000000000 +0200
+++ linux-2.5.69/include/asm-x86_64/pgtable.h 2003-05-06 15:12:40.000000000 +0200
@@ -241,6 +241,7 @@
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
+extern inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix x86_64 pte_user() and floppy.h for 2.5.69
2003-05-06 14:04 [PATCH] fix x86_64 pte_user() and floppy.h for 2.5.69 mikpe
@ 2003-05-06 14:22 ` Andi Kleen
2003-05-06 14:26 ` mikpe
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2003-05-06 14:22 UTC (permalink / raw)
To: mikpe; +Cc: ak, linux-kernel
On Tue, May 06, 2003 at 04:04:04PM +0200, mikpe@csd.uu.se wrote:
> Andi,
>
> 2.5.69 failed to link on x86_64 due to a missing reference to pte_user().
> I simply stole the one that i386 added in .68 -> .69.
> There's also irqreturn_t warnings on floppy.h -- fixed also by syncing
> with i386' floppy.h.
At least the floppy.h thing is already fixed.
The pte_user fix is not needed. The correct fix is to change the
#ifdef mm/memory.c checks for. It's broken for most/all
architecture which are not i386 including x86-64.
They have FIXADDR_START, but don't need this check and it's even
wrong to have it.
It should be probably just #ifdef __i386__ instead of checking
such common symbols or better just be moved into arch/i386/mm/fault.c
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix x86_64 pte_user() and floppy.h for 2.5.69
2003-05-06 14:22 ` Andi Kleen
@ 2003-05-06 14:26 ` mikpe
0 siblings, 0 replies; 3+ messages in thread
From: mikpe @ 2003-05-06 14:26 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kernel
Andi Kleen writes:
> On Tue, May 06, 2003 at 04:04:04PM +0200, mikpe@csd.uu.se wrote:
> > Andi,
> >
> > 2.5.69 failed to link on x86_64 due to a missing reference to pte_user().
> > I simply stole the one that i386 added in .68 -> .69.
> > There's also irqreturn_t warnings on floppy.h -- fixed also by syncing
> > with i386' floppy.h.
>
> At least the floppy.h thing is already fixed.
>
> The pte_user fix is not needed. The correct fix is to change the
> #ifdef mm/memory.c checks for. It's broken for most/all
> architecture which are not i386 including x86-64.
> They have FIXADDR_START, but don't need this check and it's even
> wrong to have it.
Ah, Ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-05-06 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 14:04 [PATCH] fix x86_64 pte_user() and floppy.h for 2.5.69 mikpe
2003-05-06 14:22 ` Andi Kleen
2003-05-06 14:26 ` mikpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®