From 95177be3143b99ecf78a1c1e4ace167caf8298ca Mon Sep 17 00:00:00 2001 From: Hongjie Yang Date: Tue, 9 Jan 2007 10:18:36 +0100 Subject: [PATCH] --- yaml --- r: 45351 b: refs/heads/master c: dd401e2b9250e3bb07ef388ddccbbf80aa106fc7 h: refs/heads/master i: 45349: af64170cb80de8fd17bca0ef45aaa0baec017aa0 45347: 24b61df3d137de69151218e7c568bf7bae714400 45343: 5de68c037be9bf3551f91db54d47f1f552956c50 v: v3 --- [refs] | 2 +- trunk/arch/s390/kernel/head31.S | 12 +++++++++++- trunk/arch/s390/kernel/head64.S | 12 +++++++++++- trunk/drivers/pci/quirks.c | 14 ++++++-------- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 1328aa464142..2ace420f65c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2f5c33b3180169f3eafb698b66686962d637fb0e +refs/heads/master: dd401e2b9250e3bb07ef388ddccbbf80aa106fc7 diff --git a/trunk/arch/s390/kernel/head31.S b/trunk/arch/s390/kernel/head31.S index 4388b3309e0c..eca507050e47 100644 --- a/trunk/arch/s390/kernel/head31.S +++ b/trunk/arch/s390/kernel/head31.S @@ -164,11 +164,14 @@ startup_continue: srl %r7,28 clr %r6,%r7 # compare cc with last access code be .Lsame-.LPG1(%r13) - b .Lchkmem-.LPG1(%r13) + lhi %r8,0 # no program checks + b .Lsavchk-.LPG1(%r13) .Lsame: ar %r5,%r1 # add 128KB to end of chunk bno .Lloop-.LPG1(%r13) # r1 < 0x80000000 -> loop .Lchkmem: # > 2GB or tprot got a program check + lhi %r8,1 # set program check flag +.Lsavchk: clr %r4,%r5 # chunk size > 0? be .Lchkloop-.LPG1(%r13) st %r4,0(%r3) # store start address of chunk @@ -190,8 +193,15 @@ startup_continue: je .Ldonemem # if not, leave chi %r10,0 # do we have chunks left? je .Ldonemem + chi %r8,1 # program check ? + je .Lpgmchk + lr %r4,%r5 # potential new chunk + alr %r5,%r1 # add 128KB to end of chunk + j .Llpcnt +.Lpgmchk: alr %r5,%r1 # add 128KB to end of chunk lr %r4,%r5 # potential new chunk +.Llpcnt: clr %r5,%r9 # should we go on? jl .Lloop .Ldonemem: diff --git a/trunk/arch/s390/kernel/head64.S b/trunk/arch/s390/kernel/head64.S index c526279e1123..6ba3f4512dd1 100644 --- a/trunk/arch/s390/kernel/head64.S +++ b/trunk/arch/s390/kernel/head64.S @@ -172,12 +172,15 @@ startup_continue: srl %r7,28 clr %r6,%r7 # compare cc with last access code je .Lsame - j .Lchkmem + lghi %r8,0 # no program checks + j .Lsavchk .Lsame: algr %r5,%r1 # add 128KB to end of chunk # no need to check here, brc 12,.Lloop # this is the same chunk .Lchkmem: # > 16EB or tprot got a program check + lghi %r8,1 # set program check flag +.Lsavchk: clgr %r4,%r5 # chunk size > 0? je .Lchkloop stg %r4,0(%r3) # store start address of chunk @@ -204,8 +207,15 @@ startup_continue: chi %r10, 0 # do we have chunks left? je .Ldonemem .Lhsaskip: + chi %r8,1 # program check ? + je .Lpgmchk + lgr %r4,%r5 # potential new chunk + algr %r5,%r1 # add 128KB to end of chunk + j .Llpcnt +.Lpgmchk: algr %r5,%r1 # add 128KB to end of chunk lgr %r4,%r5 # potential new chunk +.Llpcnt: clgr %r5,%r9 # should we go on? jl .Lloop .Ldonemem: diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index 0535efc4f184..8f0322d6f3bf 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -1117,11 +1117,10 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_h static void quirk_sis_96x_smbus(struct pci_dev *dev) { u8 val = 0; + printk(KERN_INFO "Enabling SiS 96x SMBus.\n"); + pci_read_config_byte(dev, 0x77, &val); + pci_write_config_byte(dev, 0x77, val & ~0x10); pci_read_config_byte(dev, 0x77, &val); - if (val & 0x10) { - printk(KERN_INFO "Enabling SiS 96x SMBus.\n"); - pci_write_config_byte(dev, 0x77, val & ~0x10); - } } /* @@ -1153,12 +1152,11 @@ static void quirk_sis_503(struct pci_dev *dev) printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 (compatible=%d)\n", devid, sis_96x_compatible); /* - * Ok, it now shows up as a 96x.. run the 96x quirk by - * hand in case it has already been processed. - * (depends on link order, which is apparently not guaranteed) + * Ok, it now shows up as a 96x.. The 96x quirks are after + * the 503 quirk in the quirk table, so they'll automatically + * run and enable things like the SMBus device */ dev->device = devid; - quirk_sis_96x_smbus(dev); } static void __init quirk_sis_96x_compatible(struct pci_dev *dev)