From 445857e0fc16ba3f74e778dd5a8707459c84f933 Mon Sep 17 00:00:00 2001 From: Dale Farnsworth Date: Fri, 1 Feb 2008 08:11:41 +1100 Subject: [POWERPC] Remove dead code at KernelAltiVec This code isn't referenced anywhere, so remove it. Signed-off-by: Dale Farnsworth Signed-off-by: Paul Mackerras --- arch/ppc/kernel/head.S | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'arch/ppc') diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 1b0ec7202dd5..e7e642b95138 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S @@ -700,23 +700,6 @@ load_up_altivec: /* we haven't used ctr or xer or lr */ b fast_exception_return -/* - * AltiVec unavailable trap from kernel - print a message, but let - * the task use AltiVec in the kernel until it returns to user mode. - */ -KernelAltiVec: - lwz r3,_MSR(r1) - oris r3,r3,MSR_VEC@h - stw r3,_MSR(r1) /* enable use of AltiVec after return */ - lis r3,87f@h - ori r3,r3,87f@l - mr r4,r2 /* current */ - lwz r5,_NIP(r1) - bl printk - b ret_from_except -87: .string "AltiVec used in kernel (task=%p, pc=%x) \n" - .align 4,0 - /* * giveup_altivec(tsk) * Disable AltiVec for the task given as the argument, -- cgit v1.2.3 From 4217c7b529af3abea090d875f0ef133ed2d44285 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Mon, 11 Feb 2008 07:07:59 +1100 Subject: [POWERPC] Use FIELD_SIZEOF in arch/ppc Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code that matches its definition. The modification was made using the following semantic patch (http://www.emn.fr/x-info/coccinelle/) // @haskernel@ @@ #include @depends on haskernel@ type t; identifier f; @@ - (sizeof(((t*)0)->f)) + FIELD_SIZEOF(t, f) @depends on haskernel@ type t; identifier f; @@ - sizeof(((t*)0)->f) + FIELD_SIZEOF(t, f) // Signed-off-by: Julia Lawall Signed-off-by: Paul Mackerras --- arch/ppc/8xx_io/commproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/ppc') diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 9d656de0f0f1..752443df5ecf 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c @@ -43,7 +43,7 @@ ({ \ u32 offset = offsetof(immap_t, member); \ void *addr = ioremap (IMAP_ADDR + offset, \ - sizeof( ((immap_t*)0)->member)); \ + FIELD_SIZEOF(immap_t, member)); \ addr; \ }) -- cgit v1.2.3 From 1d18a602e9116dc89da6750dcbda44bb1eb82b8e Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 29 Mar 2008 08:21:07 +1100 Subject: [POWERPC] ppc: Replace remaining __FUNCTION__ occurrences __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- arch/ppc/8xx_io/fec.c | 4 ++-- arch/ppc/platforms/radstone_ppc7d.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/ppc') diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c index 11b0aa6ca97e..1d4b49ad0d7f 100644 --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c @@ -520,7 +520,7 @@ fec_enet_interrupt(int irq, void * dev_id) #ifdef CONFIG_USE_MDIO fec_enet_mii(dev); #else -printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__,__LINE__,__FUNCTION__); +printk("%s[%d] %s: unexpected FEC_ENET_MII event\n", __FILE__, __LINE__, __func__); #endif /* CONFIG_USE_MDIO */ } @@ -1441,7 +1441,7 @@ irqreturn_t mii_link_interrupt(int irq, void * dev_id) fecp->fec_ecntrl = ecntrl; /* restore old settings */ } #else -printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__,__LINE__,__FUNCTION__); +printk("%s[%d] %s: unexpected Link interrupt\n", __FILE__, __LINE__, __func__); #endif /* CONFIG_USE_MDIO */ #ifndef CONFIG_RPXCLASSIC diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 44d4398a36ff..fc928a26609b 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c @@ -512,7 +512,7 @@ static void __init ppc7d_init_irq(void) { int irq; - pr_debug("%s\n", __FUNCTION__); + pr_debug("%s\n", __func__); i8259_init(0, 0); mv64360_init_irq(); @@ -569,7 +569,7 @@ static int __init ppc7d_map_irq(struct pci_dev *dev, unsigned char idsel, }; const long min_idsel = 10, max_idsel = 14, irqs_per_slot = 4; - pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __FUNCTION__, + pr_debug("%s: %04x/%04x/%x: idsel=%hx pin=%hu\n", __func__, dev->vendor, dev->device, PCI_FUNC(dev->devfn), idsel, pin); return PCI_IRQ_TABLE_LOOKUP; @@ -1300,7 +1300,7 @@ static void ppc7d_init2(void) u32 data; u8 data8; - pr_debug("%s: enter\n", __FUNCTION__); + pr_debug("%s: enter\n", __func__); /* Wait for debugger? */ if (ppc7d_wait_debugger) { @@ -1333,7 +1333,7 @@ static void ppc7d_init2(void) ppc_md.set_rtc_time = ppc7d_set_rtc_time; ppc_md.get_rtc_time = ppc7d_get_rtc_time; - pr_debug("%s: exit\n", __FUNCTION__); + pr_debug("%s: exit\n", __func__); } /* Called from machine_init(), early, before any of the __init functions -- cgit v1.2.3 From 1e5ef43e8c206128560eb6c32a19a7951033a3c3 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Sat, 29 Mar 2008 08:21:10 +1100 Subject: [POWERPC] ppc: Remove redundant display of free swap space in show_mem() show_mem() has no need to print the amount of free swap space manually because show_free_areas() does this already and is called by the former. The two outputs only differ in text formatting: printk("Free swap = %lukB\n", ...); printk("Free swap: %6ldkB\n", ...); Signed-off-by: Johannes Weiner Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- arch/ppc/mm/init.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/ppc') diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 7444df3889c5..1a63711081b5 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c @@ -109,7 +109,6 @@ void show_mem(void) printk("Mem-info:\n"); show_free_areas(); - printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); i = max_mapnr; while (i-- > 0) { total++; -- cgit v1.2.3 From c5d5d94aa54ba1f7691b79336b18804d4b0adf48 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Sun, 16 Mar 2008 04:27:07 +1100 Subject: [POWERPC] Use __SPIN_LOCK_UNLOCKED macro in mpc52xx_set_psc_clkdiv __SPIN_LOCK_UNLOCKED is newer and is not deprecated. Signed-off-by: Robert P. J. Day Signed-off-by: Paul Mackerras --- arch/ppc/syslib/mpc52xx_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/ppc') diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index 9f504fc7693e..ab0cf4ced9e5 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c @@ -279,7 +279,7 @@ int mpc52xx_match_psc_function(int psc_idx, const char *func) int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv) { - static spinlock_t lock = SPIN_LOCK_UNLOCKED; + static DEFINE_SPINLOCK(lock); struct mpc52xx_cdm __iomem *cdm; unsigned long flags; u16 mclken_div; -- cgit v1.2.3