* Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c [not found] <527D70A5.7010905@FreeBSD.org> @ 2013-11-28 21:33 ` Andreas Tobler 2013-11-28 22:38 ` Peter Maydell 2013-11-29 4:01 ` Andreas Färber 0 siblings, 2 replies; 4+ messages in thread From: Andreas Tobler @ 2013-11-28 21:33 UTC (permalink / raw) To: qemu-ppc, qemu-devel [-- Attachment #1: Type: text/plain, Size: 612 bytes --] Hello, On 09.11.13 00:15, Andreas Tobler wrote: > Hello, > > the attached patch fixes compilation on FreeBSD for > hw/ppc/mac_new/oldworld.c on FreeBSD. > > The affected function is present in machine/param.h on FreeBSD: > > #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) > > To make it compile on FreeBSD I'd like to propose the below patch which > is in use since a longer time on the ports tree (FreeBSD) and in my > personal git tree. > > Thanks, > > Andreas > > Signed-off-by: Andreas Tobler <address@hidden> > This time qemu-devel list included. Ping? TIA, Andreas [-- Attachment #2: round_page.diff --] [-- Type: text/plain, Size: 902 bytes --] diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 5e79575..cce2dec 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -125,6 +125,10 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr) return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR; } +#if defined(__FreeBSD__) +#undef round_page +#endif + static hwaddr round_page(hwaddr addr) { return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK; diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 2f27754..b8c6678 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -59,6 +59,10 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr) return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR; } +#if defined(__FreeBSD__) +#undef round_page +#endif + static hwaddr round_page(hwaddr addr) { return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK; ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c 2013-11-28 21:33 ` [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c Andreas Tobler @ 2013-11-28 22:38 ` Peter Maydell 2013-11-28 22:48 ` Andreas Tobler 2013-11-29 4:01 ` Andreas Färber 1 sibling, 1 reply; 4+ messages in thread From: Peter Maydell @ 2013-11-28 22:38 UTC (permalink / raw) To: Andreas Tobler; +Cc: qemu-ppc@nongnu.org, QEMU Developers On 28 November 2013 21:33, Andreas Tobler <andreast@freebsd.org> wrote: > Hello, > > On 09.11.13 00:15, Andreas Tobler wrote: >> Hello, >> >> the attached patch fixes compilation on FreeBSD for >> hw/ppc/mac_new/oldworld.c on FreeBSD. >> >> The affected function is present in machine/param.h on FreeBSD: >> >> #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >> >> To make it compile on FreeBSD I'd like to propose the below patch which >> is in use since a longer time on the ports tree (FreeBSD) and in my >> personal git tree. Rather than doing this: + #if defined(__FreeBSD__) + #undef round_page + #endif personally I'd prefer it if we just replaced the uses of round_page() with TARGET_PAGE_ALIGN(), which is the macro we define in the headers for aligning up to the next page size. Up to the ppc submaintainers though... thanks -- PMM ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c 2013-11-28 22:38 ` Peter Maydell @ 2013-11-28 22:48 ` Andreas Tobler 0 siblings, 0 replies; 4+ messages in thread From: Andreas Tobler @ 2013-11-28 22:48 UTC (permalink / raw) To: Peter Maydell; +Cc: qemu-ppc@nongnu.org, QEMU Developers On 28.11.13 23:38, Peter Maydell wrote: > On 28 November 2013 21:33, Andreas Tobler <andreast@freebsd.org> wrote: >> Hello, >> >> On 09.11.13 00:15, Andreas Tobler wrote: >>> Hello, >>> >>> the attached patch fixes compilation on FreeBSD for >>> hw/ppc/mac_new/oldworld.c on FreeBSD. >>> >>> The affected function is present in machine/param.h on FreeBSD: >>> >>> #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >>> >>> To make it compile on FreeBSD I'd like to propose the below patch which >>> is in use since a longer time on the ports tree (FreeBSD) and in my >>> personal git tree. > > Rather than doing this: > + #if defined(__FreeBSD__) > + #undef round_page > + #endif > > personally I'd prefer it if we just replaced the uses of round_page() > with TARGET_PAGE_ALIGN(), which is the macro we define in > the headers for aligning up to the next page size. > > Up to the ppc submaintainers though... Whatever you prefer, I'm ready to test.... Thanks for the feedback. Andreas ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c 2013-11-28 21:33 ` [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c Andreas Tobler 2013-11-28 22:38 ` Peter Maydell @ 2013-11-29 4:01 ` Andreas Färber 1 sibling, 0 replies; 4+ messages in thread From: Andreas Färber @ 2013-11-29 4:01 UTC (permalink / raw) To: Andreas Tobler; +Cc: Peter Maydell, qemu-ppc, qemu-devel Am 28.11.2013 22:33, schrieb Andreas Tobler: > Hello, > > On 09.11.13 00:15, Andreas Tobler wrote: >> Hello, >> >> the attached patch fixes compilation on FreeBSD for >> hw/ppc/mac_new/oldworld.c on FreeBSD. >> >> The affected function is present in machine/param.h on FreeBSD: >> >> #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) >> >> To make it compile on FreeBSD I'd like to propose the below patch which >> is in use since a longer time on the ports tree (FreeBSD) and in my >> personal git tree. >> >> Thanks, >> >> Andreas >> >> Signed-off-by: Andreas Tobler <address@hidden> >> > > This time qemu-devel list included. > > Ping? I remember writing a patch to fix this or a very similar issue in those files by adding a prefix for the local version. Have you checked the list archives or git log? Apart from that, the Sob is broken and we prefer patches git-send-email style with a ready-to-apply commit message: http://wiki.qemu.org/Contribute/SubmitAPatch Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-29 4:01 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <527D70A5.7010905@FreeBSD.org> 2013-11-28 21:33 ` [Qemu-devel] [PATCH] fix compilation on FreeBSD for mac_*world.c Andreas Tobler 2013-11-28 22:38 ` Peter Maydell 2013-11-28 22:48 ` Andreas Tobler 2013-11-29 4:01 ` Andreas Färber
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).