* [PATCH 0/3] Miscellaneous powerpc patches @ 2007-10-10 18:48 Grant Likely 2007-10-10 18:48 ` [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided Grant Likely ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw) To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand Paulus, Here are some patches that have been received favorably on the mailing list. However, they aren't specific to one particular platform, so Kumar suggested that they should probably go straight to your tree. If they look okay to you, can you please pick them up? Thanks, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided. 2007-10-10 18:48 [PATCH 0/3] Miscellaneous powerpc patches Grant Likely @ 2007-10-10 18:48 ` Grant Likely 2007-10-10 18:48 ` [PATCH 2/3] Remove empty ppc_md.setup_arch hooks Grant Likely 2007-10-10 18:48 ` [PATCH 3/3] Platforms shouldn't mess with ROOT_DEV Grant Likely 2 siblings, 0 replies; 5+ messages in thread From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw) To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand From: Grant Likely <grant.likely@secretlab.ca> This allows platforms which don't have anything to do at setup_arch time (like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> --- arch/powerpc/kernel/setup_32.c | 3 ++- arch/powerpc/kernel/setup_64.c | 3 ++- include/asm-powerpc/machdep.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 7474502..cd870a8 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p) conswitchp = &dummy_con; #endif - ppc_md.setup_arch(); + if (ppc_md.setup_arch) + ppc_md.setup_arch(); if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab); paging_init(); diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 3089eae..008ab68 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p) conswitchp = &dummy_con; #endif - ppc_md.setup_arch(); + if (ppc_md.setup_arch) + ppc_md.setup_arch(); paging_init(); ppc64_boot_msg(0x15, "Setup Done"); diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 71c6e7e..cc7c17f 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h @@ -99,7 +99,7 @@ struct machdep_calls { #endif /* CONFIG_PPC64 */ int (*probe)(void); - void (*setup_arch)(void); + void (*setup_arch)(void); /* Optional, may be NULL */ void (*init_early)(void); /* Optional, may be NULL. */ void (*show_cpuinfo)(struct seq_file *m); ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] Remove empty ppc_md.setup_arch hooks. 2007-10-10 18:48 [PATCH 0/3] Miscellaneous powerpc patches Grant Likely 2007-10-10 18:48 ` [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided Grant Likely @ 2007-10-10 18:48 ` Grant Likely 2007-10-10 20:28 ` Josh Boyer 2007-10-10 18:48 ` [PATCH 3/3] Platforms shouldn't mess with ROOT_DEV Grant Likely 2 siblings, 1 reply; 5+ messages in thread From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw) To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand From: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> --- arch/powerpc/platforms/40x/virtex.c | 5 ----- arch/powerpc/platforms/40x/walnut.c | 5 ----- arch/powerpc/platforms/44x/bamboo.c | 5 ----- arch/powerpc/platforms/44x/ebony.c | 5 ----- arch/powerpc/platforms/44x/sequoia.c | 5 ----- 5 files changed, 0 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c index b52aa94..14bbc32 100644 --- a/arch/powerpc/platforms/40x/virtex.c +++ b/arch/powerpc/platforms/40x/virtex.c @@ -36,14 +36,9 @@ static int __init virtex_probe(void) return 1; } -static void __init virtex_setup_arch(void) -{ -} - define_machine(virtex) { .name = "Xilinx Virtex", .probe = virtex_probe, - .setup_arch = virtex_setup_arch, .init_IRQ = xilinx_intc_init_tree, .get_irq = xilinx_intc_get_irq, .calibrate_decr = generic_calibrate_decr, diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index c17fdf2..eb0c136 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c @@ -53,14 +53,9 @@ static int __init walnut_probe(void) return 1; } -static void __init walnut_setup_arch(void) -{ -} - define_machine(walnut) { .name = "Walnut", .probe = walnut_probe, - .setup_arch = walnut_setup_arch, .progress = udbg_progress, .init_IRQ = uic_init_tree, .get_irq = uic_get_irq, diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c index 9bc45de..470e1a3 100644 --- a/arch/powerpc/platforms/44x/bamboo.c +++ b/arch/powerpc/platforms/44x/bamboo.c @@ -50,14 +50,9 @@ static int __init bamboo_probe(void) return 1; } -static void __init bamboo_setup_arch(void) -{ -} - define_machine(bamboo) { .name = "Bamboo", .probe = bamboo_probe, - .setup_arch = bamboo_setup_arch, .progress = udbg_progress, .init_IRQ = uic_init_tree, .get_irq = uic_get_irq, diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index 5a7fec8..40e18fc 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c @@ -57,14 +57,9 @@ static int __init ebony_probe(void) return 1; } -static void __init ebony_setup_arch(void) -{ -} - define_machine(ebony) { .name = "Ebony", .probe = ebony_probe, - .setup_arch = ebony_setup_arch, .progress = udbg_progress, .init_IRQ = uic_init_tree, .get_irq = uic_get_irq, diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c index 7d0d9d5..30700b3 100644 --- a/arch/powerpc/platforms/44x/sequoia.c +++ b/arch/powerpc/platforms/44x/sequoia.c @@ -50,14 +50,9 @@ static int __init sequoia_probe(void) return 1; } -static void __init sequoia_setup_arch(void) -{ -} - define_machine(sequoia) { .name = "Sequoia", .probe = sequoia_probe, - .setup_arch = sequoia_setup_arch, .progress = udbg_progress, .init_IRQ = uic_init_tree, .get_irq = uic_get_irq, ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] Remove empty ppc_md.setup_arch hooks. 2007-10-10 18:48 ` [PATCH 2/3] Remove empty ppc_md.setup_arch hooks Grant Likely @ 2007-10-10 20:28 ` Josh Boyer 0 siblings, 0 replies; 5+ messages in thread From: Josh Boyer @ 2007-10-10 20:28 UTC (permalink / raw) To: Grant Likely; +Cc: arnd, linuxppc-dev, paulus On Wed, 2007-10-10 at 12:48 -0600, Grant Likely wrote: > From: Grant Likely <grant.likely@secretlab.ca> Assuming Paul likes the overall change, the 4xx parts look fine to me. > Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> > --- > > arch/powerpc/platforms/40x/virtex.c | 5 ----- > arch/powerpc/platforms/40x/walnut.c | 5 ----- > arch/powerpc/platforms/44x/bamboo.c | 5 ----- > arch/powerpc/platforms/44x/ebony.c | 5 ----- > arch/powerpc/platforms/44x/sequoia.c | 5 ----- > 5 files changed, 0 insertions(+), 25 deletions(-) > > diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c > index b52aa94..14bbc32 100644 > --- a/arch/powerpc/platforms/40x/virtex.c > +++ b/arch/powerpc/platforms/40x/virtex.c > @@ -36,14 +36,9 @@ static int __init virtex_probe(void) > return 1; > } > > -static void __init virtex_setup_arch(void) > -{ > -} > - > define_machine(virtex) { > .name = "Xilinx Virtex", > .probe = virtex_probe, > - .setup_arch = virtex_setup_arch, > .init_IRQ = xilinx_intc_init_tree, > .get_irq = xilinx_intc_get_irq, > .calibrate_decr = generic_calibrate_decr, > diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c > index c17fdf2..eb0c136 100644 > --- a/arch/powerpc/platforms/40x/walnut.c > +++ b/arch/powerpc/platforms/40x/walnut.c > @@ -53,14 +53,9 @@ static int __init walnut_probe(void) > return 1; > } > > -static void __init walnut_setup_arch(void) > -{ > -} > - > define_machine(walnut) { > .name = "Walnut", > .probe = walnut_probe, > - .setup_arch = walnut_setup_arch, > .progress = udbg_progress, > .init_IRQ = uic_init_tree, > .get_irq = uic_get_irq, > diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c > index 9bc45de..470e1a3 100644 > --- a/arch/powerpc/platforms/44x/bamboo.c > +++ b/arch/powerpc/platforms/44x/bamboo.c > @@ -50,14 +50,9 @@ static int __init bamboo_probe(void) > return 1; > } > > -static void __init bamboo_setup_arch(void) > -{ > -} > - > define_machine(bamboo) { > .name = "Bamboo", > .probe = bamboo_probe, > - .setup_arch = bamboo_setup_arch, > .progress = udbg_progress, > .init_IRQ = uic_init_tree, > .get_irq = uic_get_irq, > diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c > index 5a7fec8..40e18fc 100644 > --- a/arch/powerpc/platforms/44x/ebony.c > +++ b/arch/powerpc/platforms/44x/ebony.c > @@ -57,14 +57,9 @@ static int __init ebony_probe(void) > return 1; > } > > -static void __init ebony_setup_arch(void) > -{ > -} > - > define_machine(ebony) { > .name = "Ebony", > .probe = ebony_probe, > - .setup_arch = ebony_setup_arch, > .progress = udbg_progress, > .init_IRQ = uic_init_tree, > .get_irq = uic_get_irq, > diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c > index 7d0d9d5..30700b3 100644 > --- a/arch/powerpc/platforms/44x/sequoia.c > +++ b/arch/powerpc/platforms/44x/sequoia.c > @@ -50,14 +50,9 @@ static int __init sequoia_probe(void) > return 1; > } > > -static void __init sequoia_setup_arch(void) > -{ > -} > - > define_machine(sequoia) { > .name = "Sequoia", > .probe = sequoia_probe, > - .setup_arch = sequoia_setup_arch, > .progress = udbg_progress, > .init_IRQ = uic_init_tree, > .get_irq = uic_get_irq, > > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] Platforms shouldn't mess with ROOT_DEV 2007-10-10 18:48 [PATCH 0/3] Miscellaneous powerpc patches Grant Likely 2007-10-10 18:48 ` [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided Grant Likely 2007-10-10 18:48 ` [PATCH 2/3] Remove empty ppc_md.setup_arch hooks Grant Likely @ 2007-10-10 18:48 ` Grant Likely 2 siblings, 0 replies; 5+ messages in thread From: Grant Likely @ 2007-10-10 18:48 UTC (permalink / raw) To: paulus, linuxppc-dev, galak, arnd, linas, benh, geoffrey.levand From: Grant Likely <grant.likely@secretlab.ca> There is no good reason for board platform code to mess with the ROOT_DEV. Remove it from all in-tree platforms except powermac Signed-off-by: Grant Likely <grant.likely@secretlab.ca> --- arch/powerpc/platforms/52xx/efika.c | 9 --------- arch/powerpc/platforms/52xx/lite5200.c | 12 ------------ arch/powerpc/platforms/cell/setup.c | 5 ----- arch/powerpc/platforms/celleb/setup.c | 5 ----- arch/powerpc/platforms/chrp/setup.c | 10 ---------- arch/powerpc/platforms/pseries/setup.c | 5 ----- 6 files changed, 0 insertions(+), 46 deletions(-) diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c index 6fc17fa..a0da70c 100644 --- a/arch/powerpc/platforms/52xx/efika.c +++ b/arch/powerpc/platforms/52xx/efika.c @@ -180,15 +180,6 @@ static void __init efika_setup_arch(void) { rtas_initialize(); -#ifdef CONFIG_BLK_DEV_INITRD - initrd_below_start_ok = 1; - - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif - ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */ - efika_pcisetup(); #ifdef CONFIG_PM diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 0caa3d9..a0b4934 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c @@ -156,18 +156,6 @@ static void __init lite5200_setup_arch(void) of_node_put(np); } #endif - -#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif - } /* diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index db66542..3d679b1 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -161,11 +161,6 @@ static void __init cell_setup_arch(void) /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000; - if (ROOT_DEV == 0) { - printk("No ramdisk, default root is /dev/hda2\n"); - ROOT_DEV = Root_HDA2; - } - /* Find and initialize PCI host bridges */ init_pci_config_tokens(); find_and_init_phbs(); diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c index 0f1dddb..1769d75 100644 --- a/arch/powerpc/platforms/celleb/setup.c +++ b/arch/powerpc/platforms/celleb/setup.c @@ -101,11 +101,6 @@ static void __init celleb_setup_arch(void) /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000; - if (ROOT_DEV == 0) { - printk("No ramdisk, default root is /dev/hda2\n"); - ROOT_DEV = Root_HDA2; - } - #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 96498ad..5930626 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -290,16 +290,6 @@ void __init chrp_setup_arch(void) ppc_md.set_rtc_time = rtas_set_rtc_time; } -#ifdef CONFIG_BLK_DEV_INITRD - /* this is fine for chrp */ - initrd_below_start_ok = 1; - - if (initrd_start) - ROOT_DEV = Root_RAM0; - else -#endif - ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */ - /* On pegasos, enable the L2 cache if not already done by OF */ pegasos_set_l2cr(); diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index f0b7146..fdb9b1c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -257,11 +257,6 @@ static void __init pSeries_setup_arch(void) /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000; - if (ROOT_DEV == 0) { - printk("No ramdisk, default root is /dev/sda2\n"); - ROOT_DEV = Root_SDA2; - } - fwnmi_init(); /* Find and initialize PCI host bridges */ ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-10 20:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-10-10 18:48 [PATCH 0/3] Miscellaneous powerpc patches Grant Likely 2007-10-10 18:48 ` [PATCH 1/3] Only call ppc_md.setup_arch() if it is provided Grant Likely 2007-10-10 18:48 ` [PATCH 2/3] Remove empty ppc_md.setup_arch hooks Grant Likely 2007-10-10 20:28 ` Josh Boyer 2007-10-10 18:48 ` [PATCH 3/3] Platforms shouldn't mess with ROOT_DEV Grant Likely
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).