From 1f0abae87812244ad8d68034609c86129c6b8404 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 5 Dec 2007 14:32:13 -0800 Subject: [IA64] increase .data.patch offset /opt/crosstool/gcc-3.4.5-glibc-2.3.6/ia64-unknown-linux-gnu/lib/gcc/ia64-unknown-linux-gnu/3.4.5/../../../../ia64-unknown-linux-gnu/bin/ld: section .data.patch [a000000000000500 -> a000000000000507] overlaps section .dynamic [a0000000000003c8 -> a000000000000507] This only appears to be a problem with strangely configured cross-compilation ... native compilers don't have this issue. But in the interests of helping others at least compile for ia64, this can go in. -Tony Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/kernel/gate.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/gate.lds.S b/arch/ia64/kernel/gate.lds.S index 454d7a7dfa9..3cb1abc00e2 100644 --- a/arch/ia64/kernel/gate.lds.S +++ b/arch/ia64/kernel/gate.lds.S @@ -30,7 +30,7 @@ SECTIONS * the dynamic symbol table et al. If this amount is insufficient, * ld -shared will barf. Just increase it here. */ - . = GATE_ADDR + 0x500; + . = GATE_ADDR + 0x600; .data.patch : { __start_gate_mckinley_e9_patchlist = .; -- cgit v1.2.1-2-g3f67 From ff08e657f3e7224d090dd816e00cea2c110575c4 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 7 Dec 2007 14:42:08 -0800 Subject: [IA64] don't assume that unwcheck.py is executable Don't assume that this file has execute permissions. For example, patch(1) loses that information. Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/Makefile | 2 +- arch/ia64/scripts/unwcheck.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 arch/ia64/scripts/unwcheck.py diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 34951aa2370..b916ccfdef8 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile @@ -77,7 +77,7 @@ vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(srctree)/arch/ia64/scripts/unwcheck.py $< + -$(Q)READELF=$(READELF) python $(srctree)/arch/ia64/scripts/unwcheck.py $< archclean: $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/ia64/scripts/unwcheck.py b/arch/ia64/scripts/unwcheck.py old mode 100755 new mode 100644 -- cgit v1.2.1-2-g3f67 From bdc2619ab95d45d434c16d5c216bc6243761f6fb Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 7 Dec 2007 16:10:19 -0800 Subject: [IA64] export copy_page() to modules With the unionfs patch applied I get ERROR: "copy_page" [fs/unionfs/unionfs.ko] undefined! the other architectures (some, at least) export copy_page() so I guess ia64 should also do so. To do this we need to move the copy_page() functions out of lib.a and into built-in.o and add the EXPORT_SYMBOL(). Cc: Sam Ravnborg Cc: Kyle McMartin Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/hp/sim/boot/Makefile | 2 +- arch/ia64/kernel/ia64_ksyms.c | 3 +++ arch/ia64/lib/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/ia64/hp/sim/boot/Makefile b/arch/ia64/hp/sim/boot/Makefile index df6e9968c84..2e805e0cc56 100644 --- a/arch/ia64/hp/sim/boot/Makefile +++ b/arch/ia64/hp/sim/boot/Makefile @@ -33,5 +33,5 @@ $(obj)/vmlinux.bin: vmlinux FORCE LDFLAGS_bootloader = -static -T $(obj)/bootloader: $(src)/bootloader.lds $(obj)/bootloader.o $(obj)/boot_head.o $(obj)/fw-emu.o \ - lib/lib.a arch/ia64/lib/lib.a FORCE + lib/lib.a arch/ia64/lib/built-in.o arch/ia64/lib/lib.a FORCE $(call if_changed,ld) diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index bd17190bebb..c3b4412ccc6 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c @@ -63,6 +63,9 @@ EXPORT_SYMBOL(__udivdi3); EXPORT_SYMBOL(__moddi3); EXPORT_SYMBOL(__umoddi3); +#include +EXPORT_SYMBOL(copy_page); + #if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) extern void xor_ia64_2(void); extern void xor_ia64_3(void); diff --git a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile index 46edf8444c7..98771e2a78a 100644 --- a/arch/ia64/lib/Makefile +++ b/arch/ia64/lib/Makefile @@ -11,8 +11,8 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ flush.o ip_fast_csum.o do_csum.o \ memset.o strlen.o xor.o -lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o -lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o +obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o +obj-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o lib-$(CONFIG_PERFMON) += carta_random.o AFLAGS___divdi3.o = -- cgit v1.2.1-2-g3f67 From b9ab117c2f2eac8432def6a2ea03711bfa7f35d5 Mon Sep 17 00:00:00 2001 From: Shi Weihua Date: Mon, 3 Dec 2007 12:57:50 +0800 Subject: [IA64] signal : fix missing error checkings Not all the return value of __copy_from_user and __put_user is checked.This patch fixed it. Signed-off-by: Shi Weihua Signed-off-by: Tony Luck --- arch/ia64/kernel/signal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index cdb64cc4d9c..4c730099d58 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c @@ -98,7 +98,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) if ((flags & IA64_SC_FLAG_FPH_VALID) != 0) { struct ia64_psr *psr = ia64_psr(&scr->pt); - __copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16); + err |= __copy_from_user(current->thread.fph, &sc->sc_fr[32], 96*16); psr->mfh = 0; /* drop signal handler's fph contents... */ preempt_disable(); if (psr->dfh) @@ -244,7 +244,7 @@ static long setup_sigcontext (struct sigcontext __user *sc, sigset_t *mask, struct sigscratch *scr) { unsigned long flags = 0, ifs, cfm, nat; - long err; + long err = 0; ifs = scr->pt.cr_ifs; @@ -257,12 +257,12 @@ setup_sigcontext (struct sigcontext __user *sc, sigset_t *mask, struct sigscratc ia64_flush_fph(current); if ((current->thread.flags & IA64_THREAD_FPH_VALID)) { flags |= IA64_SC_FLAG_FPH_VALID; - __copy_to_user(&sc->sc_fr[32], current->thread.fph, 96*16); + err = __copy_to_user(&sc->sc_fr[32], current->thread.fph, 96*16); } nat = ia64_get_scratch_nat_bits(&scr->pt, scr->scratch_unat); - err = __put_user(flags, &sc->sc_flags); + err |= __put_user(flags, &sc->sc_flags); err |= __put_user(nat, &sc->sc_nat); err |= PUT_SIGSET(mask, &sc->sc_mask); err |= __put_user(cfm, &sc->sc_cfm); -- cgit v1.2.1-2-g3f67 From 9e004ebd2dab980d663784d096aa6dc449225bd8 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Fri, 7 Dec 2007 14:44:05 -0800 Subject: [IA64] iosapic cleanup Make some IOSAPIC functions static and remove one that is unused. Signed-off-by: Simon Horman Signed-off-by: Tony Luck --- arch/ia64/kernel/iosapic.c | 19 +++---------------- include/asm-ia64/iosapic.h | 2 -- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 274a5938304..96460ca2b90 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -199,19 +199,6 @@ static inline int __gsi_to_irq(unsigned int gsi) return -1; } -/* - * Translate GSI number to the corresponding IA-64 interrupt vector. If no - * entry exists, return -1. - */ -inline int -gsi_to_vector (unsigned int gsi) -{ - int irq = __gsi_to_irq(gsi); - if (check_irq_used(irq) < 0) - return -1; - return irq_to_vector(irq); -} - int gsi_to_irq (unsigned int gsi) { @@ -429,7 +416,7 @@ iosapic_end_level_irq (unsigned int irq) #define iosapic_disable_level_irq mask_irq #define iosapic_ack_level_irq nop -struct irq_chip irq_type_iosapic_level = { +static struct irq_chip irq_type_iosapic_level = { .name = "IO-SAPIC-level", .startup = iosapic_startup_level_irq, .shutdown = iosapic_shutdown_level_irq, @@ -478,7 +465,7 @@ iosapic_ack_edge_irq (unsigned int irq) #define iosapic_disable_edge_irq nop #define iosapic_end_edge_irq nop -struct irq_chip irq_type_iosapic_edge = { +static struct irq_chip irq_type_iosapic_edge = { .name = "IO-SAPIC-edge", .startup = iosapic_startup_edge_irq, .shutdown = iosapic_disable_edge_irq, @@ -491,7 +478,7 @@ struct irq_chip irq_type_iosapic_edge = { .set_affinity = iosapic_set_affinity }; -unsigned int +static unsigned int iosapic_version (char __iomem *addr) { /* diff --git a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h index b8f71285914..a3a4288daae 100644 --- a/include/asm-ia64/iosapic.h +++ b/include/asm-ia64/iosapic.h @@ -80,7 +80,6 @@ extern int iosapic_remove (unsigned int gsi_base); #else #define iosapic_remove(gsi_base) (-EINVAL) #endif /* CONFIG_HOTPLUG */ -extern int gsi_to_vector (unsigned int gsi); extern int gsi_to_irq (unsigned int gsi); extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, unsigned long trigger); @@ -94,7 +93,6 @@ extern int __init iosapic_register_platform_intr (u32 int_type, u16 eid, u16 id, unsigned long polarity, unsigned long trigger); -extern unsigned int iosapic_version (char __iomem *addr); #ifdef CONFIG_NUMA extern void __devinit map_iosapic_to_node (unsigned int, int); -- cgit v1.2.1-2-g3f67 From afc2cf35b43ca58bd73b86b2f72af8b9bdb67ab8 Mon Sep 17 00:00:00 2001 From: Mike Habeck Date: Mon, 26 Nov 2007 11:19:57 -0600 Subject: [IA64] SGI Altix : fix bug in sn_io_late_init() When initializing pci_controller->node to point to the closest node we need to take into consideration that a PIC PCI Bridge ASIC can be connected to a headless/memless node just like the TIOCP and TIOCE Bridge ASICs Signed-off-by: Mike Habeck Signed-off-by: Tony Luck --- arch/ia64/sn/kernel/io_common.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 4594770e685..f3250c17765 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c @@ -545,19 +545,18 @@ sn_io_late_init(void) nasid = NASID_GET(bussoft->bs_base); cnode = nasid_to_cnodeid(nasid); if ((bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) || - (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE)) { - /* TIO PCI Bridge: find nearest node with CPUs */ + (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE) || + (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC)) { + /* PCI Bridge: find nearest node with CPUs */ int e = sn_hwperf_get_nearest_node(cnode, NULL, &near_cnode); if (e < 0) { near_cnode = (cnodeid_t)-1; /* use any node */ - printk(KERN_WARNING "pcibr_bus_fixup: failed " - "to find near node with CPUs to TIO " + printk(KERN_WARNING "sn_io_late_init: failed " + "to find near node with CPUs for " "node %d, err=%d\n", cnode, e); } PCI_CONTROLLER(bus)->node = near_cnode; - } else if (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC) { - PCI_CONTROLLER(bus)->node = cnode; } } -- cgit v1.2.1-2-g3f67 From b898a424ed68ba73d6d4562d6370985b2e9bec61 Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Wed, 21 Nov 2007 14:58:25 -0800 Subject: [IA64] rename _bss to __bss_start Rename _bss to __bss_start as on other architectures. That makes it possible to use the instead of own declarations. Also add __bss_stop because that symbol exists on other architectures. Signed-off-by: Bernhard Walle Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/hp/sim/boot/bootloader.lds | 3 ++- arch/ia64/kernel/setup.c | 3 +-- arch/ia64/kernel/vmlinux.lds.S | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/ia64/hp/sim/boot/bootloader.lds b/arch/ia64/hp/sim/boot/bootloader.lds index 69ae5853103..3977f25a126 100644 --- a/arch/ia64/hp/sim/boot/bootloader.lds +++ b/arch/ia64/hp/sim/boot/bootloader.lds @@ -22,10 +22,11 @@ SECTIONS .sdata : { *(.sdata) } _edata = .; - _bss = .; + __bss_start = .; .sbss : { *(.sbss) *(.scommon) } .bss : { *(.bss) *(COMMON) } . = ALIGN(64 / 8); + __bss_stop = .; _end = . ; /* Stabs debugging sections. */ diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 2b3751eef5c..4ac2b1f1bd3 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -95,7 +95,6 @@ static struct resource bss_resource = { .name = "Kernel bss", .flags = IORESOURCE_BUSY | IORESOURCE_MEM }; -extern char _text[], _end[], _etext[], _edata[], _bss[]; unsigned long ia64_max_cacheline_size; @@ -206,7 +205,7 @@ static int __init register_memory(void) code_resource.end = ia64_tpa(_etext) - 1; data_resource.start = ia64_tpa(_etext); data_resource.end = ia64_tpa(_edata) - 1; - bss_resource.start = ia64_tpa(_bss); + bss_resource.start = ia64_tpa(__bss_start); bss_resource.end = ia64_tpa(_end) - 1; efi_initialize_iomem_resources(&code_resource, &data_resource, &bss_resource); diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 00232b4357b..757e419ebcf 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S @@ -240,11 +240,12 @@ SECTIONS .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) { *(.sdata) *(.sdata1) *(.srdata) } _edata = .; - _bss = .; + __bss_start = .; .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { *(.sbss) *(.scommon) } .bss : AT(ADDR(.bss) - LOAD_OFFSET) { *(.bss) *(COMMON) } + __bss_stop = .; _end = .; -- cgit v1.2.1-2-g3f67 From 685c7f5d3629d558b17ee193b6d7f194e82aadf0 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Wed, 21 Nov 2007 14:58:26 -0800 Subject: [IA64] make full use of macro efi_md_size Macro efi_md_size is defined in efi.c, and here we apply it throughout efi.c. Signed-off-by: Li Zefan Acked-by: Simon Horman Signed-off-by: Andrew Morton Signed-off-by: Tony Luck --- arch/ia64/kernel/efi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 8e8f8b6193e..242d7934112 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -370,7 +370,7 @@ efi_get_pal_addr (void) continue; } - if (md->num_pages << EFI_PAGE_SHIFT > IA64_GRANULE_SIZE) + if (efi_md_size(md) > IA64_GRANULE_SIZE) panic("Woah! PAL code size bigger than a granule!"); #if EFI_DEBUG @@ -378,7 +378,7 @@ efi_get_pal_addr (void) printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n", smp_processor_id(), md->phys_addr, - md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), + md->phys_addr + efi_md_size(md), vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE); #endif return __va(md->phys_addr); @@ -523,7 +523,7 @@ efi_init (void) md = p; printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n", i, md->type, md->attribute, md->phys_addr, - md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), + md->phys_addr + efi_md_size(md), md->num_pages >> (20 - EFI_PAGE_SHIFT)); } } @@ -656,7 +656,7 @@ efi_memory_descriptor (unsigned long phys_addr) for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { md = p; - if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT)) + if (phys_addr - md->phys_addr < efi_md_size(md)) return md; } return NULL; @@ -1158,7 +1158,7 @@ efi_initialize_iomem_resources(struct resource *code_resource, res->name = name; res->start = md->phys_addr; - res->end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) - 1; + res->end = md->phys_addr + efi_md_size(md) - 1; res->flags = flags; if (insert_resource(&iomem_resource, res) < 0) -- cgit v1.2.1-2-g3f67 From c2eeb321a8f059112bdf0f8d4ac7ab35800f3f66 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 19 Nov 2007 17:47:53 -0800 Subject: [IA64] Add missing "space" to concatenated strings Signed-off-by: Joe Perches Signed-off-by: Tony Luck --- arch/ia64/kernel/kprobes.c | 10 +++++----- arch/ia64/mm/tlb.c | 2 +- arch/ia64/sn/kernel/io_common.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 5fd65d8302c..90518e43aba 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -182,8 +182,8 @@ static int __kprobes unsupported_inst(uint template, uint slot, qp = kprobe_inst & 0x3f; if (is_cmp_ctype_unc_inst(template, slot, major_opcode, kprobe_inst)) { if (slot == 1 && qp) { - printk(KERN_WARNING "Kprobes on cmp unc" - "instruction on slot 1 at <0x%lx>" + printk(KERN_WARNING "Kprobes on cmp unc " + "instruction on slot 1 at <0x%lx> " "is not supported\n", addr); return -EINVAL; @@ -221,8 +221,8 @@ static int __kprobes unsupported_inst(uint template, uint slot, * bit 12 to be equal to 1 */ if (slot == 1 && qp) { - printk(KERN_WARNING "Kprobes on test bit" - "instruction on slot at <0x%lx>" + printk(KERN_WARNING "Kprobes on test bit " + "instruction on slot at <0x%lx> " "is not supported\n", addr); return -EINVAL; } @@ -242,7 +242,7 @@ static int __kprobes unsupported_inst(uint template, uint slot, */ int x6=(kprobe_inst >> 27) & 0x3F; if ((x6 == 0x10) || (x6 == 0x11)) { - printk(KERN_WARNING "Kprobes on" + printk(KERN_WARNING "Kprobes on " "Indirect Predict is not supported\n"); return -EINVAL; } diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index 1682fc63903..cef164729db 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c @@ -180,7 +180,7 @@ ia64_tlb_init (void) long status; if ((status = ia64_pal_vm_page_size(&tr_pgbits, &purge.mask)) != 0) { - printk(KERN_ERR "PAL_VM_PAGE_SIZE failed with status=%ld;" + printk(KERN_ERR "PAL_VM_PAGE_SIZE failed with status=%ld; " "defaulting to architected purge page-sizes.\n", status); purge.mask = 0x115557000UL; } diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index f3250c17765..c4eb84f9e78 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c @@ -347,7 +347,7 @@ sn_common_bus_fixup(struct pci_bus *bus, if (controller->node >= num_online_nodes()) { struct pcibus_bussoft *b = SN_PCIBUS_BUSSOFT(bus); - printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%u" + printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%u " "L_IO=%lx L_MEM=%lx BASE=%lx\n", b->bs_asic_type, b->bs_xid, b->bs_persist_busnum, b->bs_legacy_io, b->bs_legacy_mem, b->bs_base); -- cgit v1.2.1-2-g3f67 From 965d747264c91ed206846d74ae09f757a36a373b Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Fri, 7 Dec 2007 14:59:30 -0800 Subject: [IA64] operator priority fix in acpi_map_lsapic() '!' has a higher priority than '&', so as was this won't test the first bit, but rather evaluates to false for any non-zero lsapic->lapic_flags. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Simon Horman Signed-off-by: Tony Luck --- arch/ia64/kernel/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 897e2083a3b..00b5d08f6da 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -860,7 +860,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) lsapic = (struct acpi_madt_local_sapic *)obj->buffer.pointer; if ((lsapic->header.type != ACPI_MADT_TYPE_LOCAL_SAPIC) || - (!lsapic->lapic_flags & ACPI_MADT_ENABLED)) { + (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))) { kfree(buffer.pointer); return -EINVAL; } -- cgit v1.2.1-2-g3f67 From 3661999a17b0397c7a93c200b280c55958ba3593 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Tue, 13 Nov 2007 14:55:20 +0800 Subject: [IA64] kprobe: make kreturn probe handler stack unwind correct Restore regs->ccr_iip before kreturn probe handler runs. In this way, if probe handler does unwind, unwind can correctly get the stack trace. Fixes: http://sourceware.org/bugzilla/show_bug.cgi?id=5051 Signed-off-by: Shaohua Li Signed-off-by: Tony Luck --- arch/ia64/kernel/kprobes.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 90518e43aba..fc4d2676264 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -430,6 +430,23 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) * real return address, and all the rest will point to * kretprobe_trampoline */ + hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { + if (ri->task != current) + /* another task is sharing our hash bucket */ + continue; + + orig_ret_address = (unsigned long)ri->ret_addr; + if (orig_ret_address != trampoline_address) + /* + * This is the real return address. Any other + * instances associated with this task are for + * other calls deeper on the call stack + */ + break; + } + + regs->cr_iip = orig_ret_address; + hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { if (ri->task != current) /* another task is sharing our hash bucket */ @@ -452,8 +469,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) kretprobe_assert(ri, orig_ret_address, trampoline_address); - regs->cr_iip = orig_ret_address; - reset_current_kprobe(); spin_unlock_irqrestore(&kretprobe_lock, flags); preempt_enable_no_resched(); -- cgit v1.2.1-2-g3f67 From aa0ebec9cfb8a3fab966db75ac21d05a43f312a1 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Fri, 9 Nov 2007 10:51:01 +0900 Subject: [IA64] Fix iosapic interrupt delivery mode for CPE If "CPEI Processor Override" bit is not set in "Platform Interrupt Source Flags" in "Platform Interrupt Sources Structure" in ACPI MADT, the target processor of CPEI is restricted to a specific CPU. Because of this, the delivery mode for CPEI should be IOSAPIC_FIXED. Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck --- arch/ia64/kernel/iosapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 96460ca2b90..398e2fd1cd2 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -925,7 +925,7 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi, case ACPI_INTERRUPT_CPEI: irq = vector = IA64_CPE_VECTOR; BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL)); - delivery = IOSAPIC_LOWEST_PRIORITY; + delivery = IOSAPIC_FIXED; mask = 1; break; default: -- cgit v1.2.1-2-g3f67